/* AllerEase brand theme: white-dominant, sky-blue accents, Poppins, rounded cards,
   thin borders, generous whitespace. */

:root {
  --bg: #ffffff;
  --card: #ffffff;
  --line: #e8e8e8;

  --ink: #111111;
  --text: #737b8b;

  /* Primary accent is decorative (fills, dots, bars, highlights); it is too light to
     carry text on white, so text set on it is --ink and small accent text uses --accent-ink. */
  --brand: #2dceed;
  --brand-bg: #e9fafd;
  --accent-ink: #087f96;

  --safe: #1e8a5a;
  --safe-bg: #e4f5ec;
  --caution: #9a6200;
  --caution-bg: #fff3d6;
  --avoid: #c23b3b;
  --avoid-bg: #fde9e8;

  --radius: 20px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 8px 24px rgba(17, 17, 17, 0.05);
  --shadow-lg: 0 2px 6px rgba(17, 17, 17, 0.04), 0 20px 50px rgba(17, 17, 17, 0.08);

  --font: "Poppins", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); }

a { color: inherit; }

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a { text-decoration: none; color: var(--text); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 26px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2a2a2a; }
.btn-line { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink); }

.nav-cta { height: 40px; padding: 0 20px; font-size: 14px; }

/* Shared */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--brand-bg);
  border-radius: 999px;
}

.eyebrow-rule { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.section-head {
  max-width: 820px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-title {
  margin: 0;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-sub {
  max-width: 580px;
  margin: 16px 0 0;
  font-size: 17px;
  color: var(--text);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 80px);
  /* Top-aligned so the copy stays put while the demo card grows and shrinks */
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) clamp(16px, 4vw, 48px) clamp(64px, 9vw, 128px);
}

.hero-title {
  margin: 0;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Highlighter stroke in the accent; the text itself stays near-black for contrast */
.hero-title-alt,
.manifesto em {
  background: linear-gradient(transparent 60%, rgba(45, 206, 237, 0.5) 60%, rgba(45, 206, 237, 0.5) 90%, transparent 90%);
}

.hero-sub {
  max-width: 480px;
  margin: 24px 0 32px;
  font-size: 18px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 52px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-facts dt { font-weight: 600; font-size: 30px; line-height: 1; color: var(--ink); }

.hero-facts dt::after {
  content: "";
  display: block;
  width: 20px;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--brand);
}

.hero-facts dd { margin: 10px 0 0; font-size: 13px; line-height: 1.5; }

/* Hero photo behind the interactive demo */

.hero-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.hero-demo-heading {
  grid-area: 1 / 1;
  margin-bottom: 14px;
  scroll-margin-top: 88px;
}

.hero-demo-heading .eyebrow { margin: 0; }

.label { grid-area: 1 / 1; }

.hero-photo {
  grid-area: 2 / 1;
  align-self: start;
  justify-self: start;
  width: 72%;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 28px;
  background: var(--brand-bg);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 49% center;
}

.photo-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  max-width: 210px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-radius: 14px;
}

.photo-tag-k { display: block; font-size: 12px; font-weight: 400; color: var(--text); }

/* Demo card */

.label {
  position: relative;
  align-self: start;
  justify-self: end;
  width: 72%;
  margin-top: 200px;
  padding: 22px 22px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.label-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.label-title { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.2; }
.label-note { margin: 0; font-size: 12px; }

.label-bar { height: 1px; background: var(--line); margin: 14px 0; }

.profile-heading { margin: 0 0 8px; font-weight: 500; font-size: 13px; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  border: 1px dashed #d4d4d4;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.chip[data-level="avoid"] { background: var(--avoid-bg); color: var(--avoid); border: 1px solid transparent; }
.chip[data-level="caution"] { background: var(--caution-bg); color: var(--caution); border: 1px solid transparent; }

.legend { display: flex; gap: 14px; margin: 10px 0 0; font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-hint { margin-left: auto; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-avoid { background: var(--avoid); }
.dot-caution { background: var(--caution); }

.products { list-style: none; margin: 0; padding: 0; }

.product { border-bottom: 1px solid var(--line); }
.product:last-child { border-bottom: 0; }

.product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  font-family: var(--font);
  font-size: 15px;
  text-align: left;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
}

.product-row:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

.product-thumb {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: cover;
  border-radius: 10px;
  background: var(--brand-bg);
}

.product-name { font-weight: 500; flex: 1; }

.verdict {
  min-width: 76px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.verdict-safe { background: var(--safe-bg); color: var(--safe); }
.verdict-caution { background: var(--caution-bg); color: var(--caution); }
.verdict-avoid { background: var(--avoid-bg); color: var(--avoid); }

.chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid #b8bec8;
  border-bottom: 2px solid #b8bec8;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}

.product.open .chev { transform: rotate(225deg) translate(-2px, -1px); }

.why { display: none; padding: 0 0 12px; font-size: 13px; }
.product.open .why { display: block; }

.ingredients { margin: 0 0 6px; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink); }
.ingredients mark { padding: 0 3px; border-radius: 4px; font-weight: 500; }
.ingredients mark.hit-avoid { background: var(--avoid-bg); color: var(--avoid); }
.ingredients mark.hit-caution { background: var(--caution-bg); color: var(--caution); }

.reasons { margin: 0; padding-left: 18px; }

.label-foot { margin: 0; font-size: 12px; }

/* Sections 2-4 share a max-width container; features sits on the light blue band */

.problem,
.journey,
.features {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 128px) clamp(16px, 4vw, 48px);
}

.features {
  background: var(--brand-bg);
  box-shadow: 0 0 0 100vmax var(--brand-bg);
  clip-path: inset(0 -100vmax);
}

/* Section 2: problem + data */

.problem { border-top: 1px solid var(--line); }

.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.facts {
  padding: 26px 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.facts-title { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.2; }

.facts-serving {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 6px 0 0;
  font-size: 13px;
}

.facts-serving b { font-weight: 500; color: var(--ink); }

.facts-row { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.facts-row:last-of-type { border-bottom: 0; }

.facts-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.facts-k { font-weight: 500; font-size: 15px; color: var(--ink); }

.facts-delta {
  padding: 2px 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  background: var(--brand-bg);
  border-radius: 999px;
}

.meter { display: grid; gap: 8px; }

.meter-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.meter-tag { font-size: 12px; }

.meter-track { height: 8px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }

.meter-fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 999px;
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.meter-before { background: #c9ced6; }
.meter-after { background: var(--brand); }

/* Bars grow in once the card scrolls into view (see reveal.js) */
.js .facts:not(.is-in) .meter-fill { transform: scaleX(0); }
.facts .meter-line + .meter-line .meter-fill { transition-delay: 0.25s; }

.meter-v { font-weight: 500; text-align: right; color: var(--ink); }

.label-bar-mid { margin: 4px 0 0; }

.facts-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.facts-big { font-weight: 600; font-size: 24px; line-height: 1; color: var(--ink); }

.facts-warning {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  background: var(--avoid-bg);
  color: var(--avoid);
  border-radius: 12px;
}

.facts-foot { margin: 12px 0 0; font-size: 12px; }

.aisle {
  position: relative;
  margin: 0 0 28px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--brand-bg);
}

.aisle img { display: block; width: 100%; height: auto; aspect-ratio: 11 / 7; object-fit: cover; }

.aisle figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-radius: 12px;
}

.ingredients-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: il; }

.ingredients-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  counter-increment: il;
}

.ingredients-list li::before {
  content: counter(il, decimal-leading-zero);
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--brand-bg);
  border-radius: 12px;
}

.il-k { font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--ink); }

.ingredients-list p { margin: 0; font-size: 14px; }

/* Section 3: journey */

/* Desktop: step list on the left, all screenshots stacked in one cell on the right.
   li uses display: contents so its children become direct grid items. */
.steps {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  grid-auto-rows: auto;
  column-gap: clamp(32px, 5vw, 72px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step { display: contents; }

.step-head,
.step-body { grid-column: 1; }

.step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 0;
  font-family: var(--font);
  text-align: left;
  color: #a7adb8;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: color 0.15s ease;
}

.step-head:hover,
.step.is-active .step-head { color: var(--ink); }

.step-head:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

.step-n {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: #f5f6f8;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}

.step.is-active .step-n { color: var(--ink); background: var(--brand); }

.step-name { font-size: clamp(19px, 1.9vw, 24px); font-weight: 600; line-height: 1.2; }

.step-body {
  display: none;
  padding: 14px 0 20px 48px;
  border-bottom: 1px solid var(--line);
}

.step.is-active .step-body { display: block; }

.step-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.step-body p { margin: 0; font-size: 15px; }

.step-shot {
  grid-column: 2;
  grid-row: 1 / span 8;
  align-self: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  max-width: 600px;
  margin: 8px auto 0;
  padding: 36px 30px 30px;
  background: var(--brand-bg);
  border-radius: 28px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.step.is-active .step-shot {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.phone { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* Stagger the second phone so the pair reads as a sequence */
.phone + .phone { margin-top: 56px; }

.phone img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 22px rgba(17, 17, 17, 0.12));
}

.phone-cap {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  background: var(--card);
  border-radius: 999px;
}

/* Section 4: core features */

.feature-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.feature {
  position: relative;
  padding: 16px 18px 18px 66px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: default;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feature:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.feature.is-hot { border-color: var(--brand); box-shadow: var(--shadow); }

.feature-n {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--brand-bg);
  border-radius: 10px;
  transition: background 0.15s ease;
}

.feature.is-hot .feature-n { background: var(--brand); }

.feature h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.feature p { margin: 0; font-size: 14px; line-height: 1.6; }

.feature-note { display: inline-block; margin-top: 8px; font-size: 12px; }

.feature-phone { position: relative; }

.feature-phone img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 22px rgba(17, 17, 17, 0.12));
}

.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.hotspot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hotspot.is-hot { color: var(--ink); background: var(--brand); transform: translate(-50%, -50%) scale(1.15); }
.hotspot.is-hot::after { opacity: 1; transform: scale(1); }

.hotspot:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Bridge between the product half and the platform half (scroll-driven, see bridge.js).
   JS sets --swap (label to data) and --dark (the circle that fills the screen) from 0 to 1;
   the circle uses the engine section's background so the hand-off is seamless. */

.bridge {
  position: relative;
  height: 260vh;
  background: var(--bg);
}

.bridge-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 32px;
  padding: 0 16px;
}

.bridge-dark {
  position: absolute;
  inset: 0;
  background: var(--brand-bg);
  clip-path: circle(calc(var(--dark, 0) * 150vmax) at 50% 58%);
}

.bridge-caption {
  position: relative;
  display: grid;
  margin: 0;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
}

.cap { grid-area: 1 / 1; }
.cap-a { opacity: calc(1 - var(--swap, 0)); }
.cap-b { opacity: var(--swap, 0); }

.bridge-cards { position: relative; display: grid; width: min(460px, 100%); }

.bridge-label,
.bridge-json { grid-area: 1 / 1; }

.bridge-label {
  padding: 22px 24px 22px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  opacity: calc(1 - var(--swap, 0));
  transform: translateY(calc(var(--swap, 0) * -24px)) scale(calc(1 - var(--swap, 0) * 0.04));
}

.bl-title { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.2; }
.bl-bar { height: 1px; margin: 14px 0; background: var(--line); }

.bl-text,
.bl-may { margin: 0; font-size: 16px; line-height: 1.65; }
.bl-may { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--text); }

.tok { padding: 0 3px; border-radius: 5px; transition: background 0.25s ease, color 0.25s ease; }
.tok.is-hit { background: var(--avoid-bg); color: var(--avoid); font-weight: 500; }

.bridge-json {
  align-self: center;
  margin: 0;
  padding: 24px 26px;
  font-family: var(--mono);
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.7;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  opacity: var(--swap, 0);
  transform: translateY(calc((1 - var(--swap, 0)) * 24px));
}

.bridge-json b { font-weight: 400; color: var(--accent-ink); }
.bridge-json s { text-decoration: none; color: var(--ink); }

/* Section 5: engine (light blue band) */

.engine { background: var(--brand-bg); }

.engine-inner,
.enterprise-inner,
.vision-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 128px) clamp(16px, 4vw, 48px);
}

.engine-inner { padding-top: clamp(24px, 4vw, 48px); }

.engine .eyebrow { background: var(--card); }

.pipeline {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.stages {
  list-style: none;
  margin: 0;
  padding: 0 0 0 24px;
  border-left: 2px solid #cdeff6;
}

/* Each stage is tall so scrolling through the list advances the console */
.stage {
  position: relative;
  min-height: 34vh;
  padding: 4px 0 24px;
  color: #a7adb8;
  transition: color 0.25s ease;
}

.stage:last-child { min-height: 0; }

.stage::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--card);
  border: 2px solid #cdeff6;
  border-radius: 50%;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.stage.is-done::before { background: #bdeef8; border-color: #bdeef8; }
.stage.is-active { color: var(--text); }
.stage.is-active::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 6px rgba(45, 206, 237, 0.2); }

.stage-n { font-size: 12px; font-weight: 500; }
.stage.is-active .stage-n { color: var(--accent-ink); }

.stage h3 { margin: 2px 0 6px; font-size: clamp(19px, 1.9vw, 24px); font-weight: 600; line-height: 1.25; color: inherit; }
.stage.is-active h3 { color: var(--ink); }

.stage p { margin: 0; max-width: 420px; font-size: 15px; }

.console {
  position: sticky;
  top: 96px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.console-dots { display: flex; gap: 6px; }
.console-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }

.console-stage { font-size: 12px; font-weight: 500; color: var(--ink); }

.console-block { padding: 16px 18px; }
.console-block + .console-block { border-top: 1px solid var(--line); }

.console-k { margin: 0 0 8px; font-size: 12px; font-weight: 500; }

.console-raw { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink); }
.console-raw span { padding: 0 2px; border-radius: 4px; transition: background 0.25s ease; }
.console-raw.is-hit span { background: rgba(45, 206, 237, 0.28); }

.console-json {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
  color: var(--text);
}

.console-json b { font-weight: 400; color: var(--accent-ink); }
.console-json s { text-decoration: none; color: var(--ink); }
.console-json u { text-decoration: none; color: var(--caution); }
.console-json i { font-style: normal; font-weight: 500; color: var(--accent-ink); }

.ln { display: inline; opacity: 0.2; transition: opacity 0.3s ease, background 0.3s ease; }
.ln.is-on { opacity: 1; }
.ln.is-new { background: var(--brand-bg); }

.infra {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding: 0;
}

.infra li {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* Section 6: enterprise */

.ent-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.industries { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.industry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font);
  text-align: left;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.industry:hover { color: var(--ink); border-color: #d4d4d4; }
.industry:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.industry.is-active { color: var(--ink); background: var(--brand-bg); border-color: var(--brand); }

.industry-name { font-size: 17px; font-weight: 600; line-height: 1.3; }
.industry-tag { font-size: 12px; font-weight: 500; }

.ent-desc { min-height: 3.4em; margin: 0 0 20px; font-size: 17px; }

.console-static { position: static; }

/* Section 7: vision, closing CTA, footer */

.vision { border-top: 1px solid var(--line); }

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tl-item {
  padding: 28px 24px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tl-item.is-now { background: var(--brand-bg); border-color: var(--brand); }

.tl-when {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: #f5f6f8;
  border-radius: 999px;
}

.tl-item.is-now .tl-when { background: var(--brand); }

.tl-item h3 { margin: 14px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.35; }
.tl-item p { margin: 0; font-size: 15px; }

.tl-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }

.tl-tags li {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: var(--brand-bg);
  border-radius: 999px;
}

.manifesto {
  max-width: 900px;
  margin: clamp(64px, 9vw, 112px) auto;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--ink);
}

.manifesto em { font-style: normal; }

.demo {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.demo-title { margin: 0 0 10px; font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; line-height: 1.2; }
.demo-copy p { margin: 0; }

.demo-frame {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.demo-frame video { display: block; width: 100%; height: auto; }

.cta {
  padding: 0 clamp(16px, 4vw, 48px) clamp(64px, 9vw, 112px);
  scroll-margin-top: 88px;
}

.cta-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  max-width: 1184px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 72px);
  background: var(--brand-bg);
  border-radius: 32px;
}

.cta-card .eyebrow { background: var(--card); }

.cta-title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cta-sub { max-width: 560px; margin: 16px 0 28px; font-size: 17px; }

.cta-contact {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.cta-contact h3 { margin: 0; font-size: 18px; font-weight: 600; }
.cta-contact p { margin: 0 0 4px; }
.cta-contact a { text-underline-offset: 3px; }
.cta-contact a:hover { color: var(--accent-ink); }

@media (max-width: 760px) {
  .cta-card { grid-template-columns: minmax(0, 1fr); padding-inline: clamp(20px, 5vw, 36px); }
  .cta-contact { width: min(100%, 260px); }
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 24px clamp(16px, 4vw, 48px);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.footer .brand { font-size: 17px; }
.footer p { margin: 0; }
.footer-top { margin-left: auto; text-decoration: none; font-weight: 500; color: var(--ink); }
.footer-top:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Responsive */

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }

  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-top: clamp(0px, 6vw, 88px); }
  .hero-demo-heading, .hero-photo {
    justify-self: center;
    width: min(100%, 405px);
  }
  .hero-photo { aspect-ratio: 3 / 2; }
  .label { width: calc(100% - 16px); margin-top: min(52vw, 420px); }

  .problem-grid { grid-template-columns: minmax(0, 1fr); }

  /* Mobile: every step shows its text and screenshot in sequence, no switching. */
  .steps { display: block; }
  .step { display: block; padding-bottom: 32px; }
  .step-head { color: var(--ink); cursor: default; }
  .step .step-n { color: var(--ink); background: var(--brand); }
  .step-body { display: block; padding-left: 0; border-bottom: 0; }
  .step-shot,
  .step.is-active .step-shot {
    margin: 0 auto;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .phone + .phone { margin-top: 32px; }

  .feature-map { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .feature-phone { order: -1; width: min(300px, 80%); margin: 0 auto 32px; }
  .feature-list-right { margin-top: 12px; }

  /* Mobile: no scroll-driven console; stages read as a list, output shows complete. */
  .pipeline { grid-template-columns: minmax(0, 1fr); }
  .stage { min-height: 0; color: var(--text); }
  .stage h3 { color: var(--ink); }
  .stage::before { background: var(--brand); border-color: var(--brand); }
  .stage .stage-n { color: var(--accent-ink); }
  .console { position: static; }
  .console-json { font-size: 12px; }

  .ent-grid { grid-template-columns: minmax(0, 1fr); }
  .ent-desc { min-height: 0; }
  .enterprise .console-json { font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }

  .timeline { grid-template-columns: minmax(0, 1fr); }
  .demo { grid-template-columns: minmax(0, 1fr); }
  .footer-top { margin-left: 0; }
}

@media (max-width: 520px) {
  .hero-facts dt { font-size: 24px; }
  .label { padding: 18px 16px 14px; }
  .legend-hint { display: none; }
  .facts { padding: 20px 18px 18px; }
  .meter-line { grid-template-columns: 66px minmax(0, 1fr) 56px; gap: 8px; }
  .step-shot { padding: 22px 16px; }
  .phone-cap { font-size: 11px; padding: 4px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .bridge { height: auto; }
  .bridge-stage { position: static; height: auto; padding: 96px 16px; }
}

