/* ============================================================
   Bandwidth on Demand (BoD) — Styles
   ============================================================ */

:root {
  --bg:           #ffffff;
  --panel:        #f0f8ff;
  --panel-border: rgba(66, 180, 230, 0.22);  /* light blue — footer / dividers */
  --blue:         #42b4e6;                    /* light blue — hero glow, committed bars */
  --blue-bright:  #29a0d4;                    /* deeper light blue — baseline dashed line */
  --green:        #1a7a4a;                    /* dark green — on-demand capacity bars */
  --red:          #e63946;                    /* red — eyebrow, footer accent, icons */
  --text:         #0b1b2e;
  --text-muted:   #5b7088;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 48px 16px 36px;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 480px;
  background: radial-gradient(
    circle,
    rgba(66, 180, 230, 0.18) 0%,
    rgba(66, 180, 230, 0.05) 45%,
    transparent 70%
  );
  filter: blur(10px);
  animation: glowPulse 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1;   }
}

.eyebrow {
  position: relative;
  z-index: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--red);
  margin: 0 0 18px;
}

h1 {
  position: relative;
  z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.subhead {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

/* ── Bars visualisation ───────────────────────────────────── */
.bars-viz {
  position: relative;
  z-index: 1;
  margin: 48px auto 0;
  max-width: 520px;
}

.bars-frame {
  position: relative;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  padding: 0 16px;
}

/* Dashed committed-bandwidth baseline */
.baseline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 46px;
  border-top: 1.5px dashed rgba(66, 180, 230, 0.55);
}

.baseline-label {
  position: absolute;
  left: 0;
  bottom: 52px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.bar {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  width: 16px;
}

/* Committed bandwidth — light blue */
.bar-base {
  width: 16px;
  height: 46px;
  background: var(--blue);
  border-radius: 0 0 3px 3px;
}

/* On-demand capacity — dark green */
.bar-demand {
  width: 16px;
  background: var(--green);
  border-radius: 3px 3px 0 0;
  animation: barDemand ease-in-out infinite;
}

@keyframes barDemand {
  0%, 100% { height: 6px;               }
  50%       { height: var(--peak, 40px); }
}

/* Legend */
.bars-legend {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.bars-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.swatch.base   { background: var(--blue);  }
.swatch.demand { background: var(--green); }

/* ── How it works ─────────────────────────────────────────── */
.how {
  max-width: 640px;
  margin: 80px auto 0;
  text-align: center;
}

.how p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* ── Feature grid ─────────────────────────────────────────── */
main { margin-top: 56px; }

.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Cards: red borders; JS adds .is-visible to trigger entrance */
.card {
  background: var(--panel);
  border: 1px solid rgba(230, 57, 70, 0.22);
  border-radius: 14px;
  padding: 26px 22px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.2s ease;
}

.card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  border-color: rgba(230, 57, 70, 0.55);
  transform: translateY(-2px);
}

/* Stagger delays via data-delay attribute */
.card[data-delay="1"] { transition-delay: 0.1s; }
.card[data-delay="2"] { transition-delay: 0.2s; }
.card[data-delay="3"] { transition-delay: 0.3s; }
.card[data-delay="4"] { transition-delay: 0.4s; }
.card[data-delay="5"] { transition-delay: 0.5s; }
.card[data-delay="6"] { transition-delay: 0.6s; }

/* Red icon circles */
.icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(230, 57, 70, 0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.icon-wrap svg {
  width: 20px;
  height: 20px;
  stroke: var(--red);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 8px;
}

.card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ── Footer ───────────────────────────────────────────────── */
footer1 {
  margin-top: 72px;
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid var(--panel-border);
}

footer p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  color: var(--text);
  margin: 0;
}

footer span { color: var(--red); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 680px) {
  .grid        { grid-template-columns: 1fr; }
  .page        { padding: 48px 18px 64px; }
  .bars-frame  { gap: 9px; padding: 0 8px; }
  .bar,
  .bar-base,
  .bar-demand  { width: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *           { animation: none !important; transition: none !important; }
  .card       { opacity: 1; transform: none; }
  .bar-demand { height: 24px !important; }
}
