/* ==========================================================================
   ScaffoldPro Website — "Stage" design system
   Dark-first cinematic look: deep background, teal glow, device mockups,
   white content islands and scroll-driven reveals. Light theme supported.
   ========================================================================== */

/* ----------------------------- Theme tokens ----------------------------- */
:root,
html[data-theme="dark"] {
  --bg: #060d0f;
  --bg-2: #081316;
  --card: #0d1c21;
  --card-2: #12252c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef6f7;
  --text-2: #c4d4d7;
  --muted: #8fa6aa;
  --accent: #3fd6c6;
  --accent-soft: rgba(63, 214, 198, 0.12);
  --glow: rgba(31, 168, 156, 0.45);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --nav-bg: rgba(8, 18, 21, 0.86);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f5f8f9;
  --bg-2: #edf3f4;
  --card: #ffffff;
  --card-2: #f1f6f7;
  --line: #dde6ea;
  --line-strong: #c8d6db;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #5b6b78;
  --accent: #1f7180;
  --accent-soft: #e6f4f6;
  --glow: rgba(31, 113, 128, 0.22);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.72);
  color-scheme: light;
}

:root {
  --brand: #1f7180;
  --brand-deep: #102c3c;
  --btn: #1fa89c;
  --btn-hover: #19928a;
  --orange: #f97316;
  --orange-hover: #ea580c;
  --green: #22c55e;
  --rose: #e11d48;
  --amber: #f59e0b;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1220px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sections that always look like the dark "stage" (hero, video, CTA) */
.stage {
  --bg: #050c0d;
  --card: #0d1c21;
  --card-2: #12252c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef6f7;
  --text-2: #c4d4d7;
  --muted: #8fa6aa;
  --accent: #3fd6c6;
  --accent-soft: rgba(63, 214, 198, 0.12);
  color: var(--text);
  background: var(--bg);
}

/* White "content islands" that sit on the dark page (like the reference) */
.island,
.tab-card,
.growth-card {
  --card: #ffffff;
  --card-2: #f3f7f8;
  --line: #e2e9ec;
  --line-strong: #cfdbe0;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #5b6b78;
  --accent: #1f7180;
  --accent-soft: #e6f4f6;
  color: var(--text);
}

/* ------------------------------- Base ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; }
.mono { font-family: var(--mono); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }
.icon-md { width: 22px; height: 22px; }

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

/* ------------------------------ Buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--btn);
  color: #fff;
  box-shadow: 0 10px 30px rgba(31, 168, 156, 0.35);
}
.btn-primary:hover { background: var(--btn-hover); box-shadow: 0 14px 36px rgba(31, 168, 156, 0.45); }

.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3); }
.btn-orange:hover { background: var(--orange-hover); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.btn-whatsapp { background: #25d366; color: #fff; }

.btn-lg { padding: 14px 24px; border-radius: 14px; }
.btn-block { width: 100%; }

.btn-text-col { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.btn-main-text { font-size: 0.98rem; font-weight: 800; }
.btn-subtext { font-size: 0.74rem; font-weight: 600; opacity: 0.75; }

/* ------------------------------ Shared bits ---------------------------- */
.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 214, 198, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(63, 214, 198, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 214, 198, 0); }
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(63, 214, 198, 0.3);
  background: rgba(63, 214, 198, 0.08);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.stage-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 50% 62%, rgba(36, 170, 160, 0.45), rgba(22, 100, 100, 0.18) 45%, transparent 72%),
    radial-gradient(ellipse 70% 30% at 50% 100%, rgba(31, 113, 128, 0.35), transparent 70%);
}
.stage-glow.soft { opacity: 0.7; }

/* ------------------------------ Sections ------------------------------- */
.section {
  position: relative;
  padding: 120px 0;
}

.section-header {
  max-width: 820px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 18px;
}
.section-title em,
.hero-title em,
.big-statement em,
.cta-title em { color: var(--accent); }

.section-desc {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  font-weight: 500;
}

/* --------------------------- Reveal animations ------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; filter: none; }

.split-words .w {
  display: inline-block;
  white-space: pre;
}
.js .split-words .w {
  opacity: 0.08;
  transform: translateY(14px);
  filter: blur(6px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
  transition-delay: calc(var(--i) * 45ms);
}
.js .split-words.in .w { opacity: 1; transform: none; filter: none; }

/* ------------------------------- Navbar -------------------------------- */
.navbar {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 16px;
  transition: top .3s ease;
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 12px 10px 18px;
  border-radius: 18px;
  background: var(--nav-bg);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: box-shadow .3s ease, background-color .3s ease;
}
.navbar.scrolled .nav-container { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-logo { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.brand-name em { color: var(--orange); }
.brand-edition-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--orange);
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 6px;
  padding: 2px 6px;
}

/* show the right logo for the theme */
.brand-logo-light { display: none; }
html[data-theme="light"] .brand-logo-dark { display: none; }
html[data-theme="light"] .brand-logo-light { display: block; }
.stage .brand-logo-dark { display: block; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.nav-link {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  transition: color .2s ease, background-color .2s ease;
}
.nav-link:hover { color: var(--text); background: var(--accent-soft); }
.mobile-nav-login { display: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-actions .btn { padding: 10px 16px; font-size: 0.88rem; }

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: border-color .2s ease;
}
.theme-toggle-btn:hover { border-color: var(--accent); }
html[data-theme="dark"] .moon-icon,
html[data-theme="light"] .sun-icon { display: none; }
.sun-icon { color: #fbbf24; }

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.mobile-toggle span { width: 18px; height: 2px; border-radius: 2px; background: var(--text); }

/* -------------------------------- Hero --------------------------------- */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 160px 0 0;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
}

.hero-container {
  position: relative;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.9rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
  max-width: 1040px;
  margin: 26px auto 22px;
  color: var(--text);
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 500;
}
.hero-subtitle strong { color: var(--text-2); }

.hero-cta-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.icon-whatsapp-fill { color: #25d366; }

/* Device */
.hero-device-wrap {
  position: relative;
  margin: 72px auto 0;
  max-width: 1120px;
  perspective: 2000px;
}

.device-halo {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 8%;
  bottom: 0;
  border-radius: 80px;
  background: #1fa89c;
  filter: blur(110px);
  opacity: 0.42;
  pointer-events: none;
}

.device-tablet {
  position: relative;
  border-radius: 38px;
  padding: 16px;
  background: #0a0d0e;
  box-shadow:
    inset 0 0 0 2px #2c3638,
    0 0 0 1px #000,
    0 50px 120px rgba(0, 0, 0, 0.6);
  transform-origin: 50% 0%;
  transform: rotateX(var(--tilt, 0deg)) scale(var(--scale, 1));
  will-change: transform;
}

.device-screen {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #f3f6f8;
  aspect-ratio: 1180 / 700;
}

/* The app is laid out at a fixed desktop size and scaled to fit the screen */
.app-shell {
  position: absolute;
  left: 0;
  top: 0;
  width: 1180px;
  height: 700px;
  display: flex;
  transform-origin: 0 0;
  transform: scale(var(--app-scale, 1));
  text-align: left;
  color: #172633;
  font-size: 13px;
}

.app-shell i[data-lucide], .app-shell svg.lucide { width: 15px; height: 15px; flex: none; }

.app-sidebar {
  width: 220px;
  background: #102c3c;
  color: #a9c0c8;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
}
.app-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 20px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.app-brand img { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.06); padding: 4px; }
.app-brand strong { display: block; color: #fff; font-size: 14px; }
.app-brand span { font-size: 11px; }
.app-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-weight: 700; margin-bottom: 2px; }
.app-nav-item span { flex: 1; }
.app-nav-item kbd { font-family: var(--mono); font-size: 9.5px; color: #6f8c97; background: rgba(255,255,255,.05); padding: 1px 5px; border-radius: 4px; }
.app-nav-item.active { background: #1f7180; color: #fff; }
.app-nav-item.active kbd { color: #d6f1ef; }
.app-logout { margin-top: auto; display: flex; gap: 8px; align-items: center; padding: 9px 10px; color: #fca5a5; font-weight: 700; }

.app-main { flex: 1; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; }
.app-search { display: flex; align-items: center; gap: 8px; width: 280px; height: 36px; padding: 0 12px; border-radius: 9px; background: #fff; border: 1px solid #dce5ea; color: #9aa8b3; font-weight: 600; }
.app-top-actions { display: flex; gap: 8px; }
.app-top-actions span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 8px; background: #fff; border: 1px solid #dce5ea; font-weight: 700; color: #4b5b67; }

.app-hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 14px;
  background: linear-gradient(120deg, #102c3c, #1f7180);
  color: #fff;
}
.app-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #a7f3eb; }
.app-hero-panel h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; }
.app-hero-panel p { font-size: 12.5px; color: #c4dde2; }
.app-hero-buttons { display: flex; gap: 8px; flex: none; }
.app-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 9px; font-weight: 800; font-size: 12.5px; }
.app-btn.teal { background: #1fa89c; color: #fff; }
.app-btn.white { background: #fff; color: #102c3c; }
.app-btn.ghost { border: 1px solid rgba(255,255,255,.3); color: #fff; }

.app-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; flex: 1; min-height: 0; }
.app-card { background: #fff; border: 1px solid #dce5ea; border-radius: 14px; padding: 16px 18px; box-shadow: 0 12px 32px rgba(25, 49, 63, 0.06); }
.app-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.app-card-head h3 { font-size: 15px; font-weight: 800; }
.app-card-head p { font-size: 11.5px; color: #6d7b88; }
.app-eyebrow { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: #1f7180; }
.app-eyebrow.light { color: #a7f3eb; }
.app-chip { font-size: 11px; font-weight: 800; color: #1f7180; background: #e6f4f6; padding: 5px 9px; border-radius: 7px; white-space: nowrap; }
.app-stock-box { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; background: #102c3c; color: #fff; margin-bottom: 10px; }
.app-stock-num { display: block; font-size: 26px; font-weight: 800; font-family: var(--mono); margin: 2px 0; }
.app-stock-num small { font-family: var(--font); font-size: 12px; color: #a9c0c8; font-weight: 700; }
.app-stock-sub { font-size: 11px; color: #a9c0c8; }
.app-stock-icon { width: 44px; height: 44px; border-radius: 12px; background: #1fa89c; display: flex; align-items: center; justify-content: center; }
.app-stock-icon svg { width: 22px !important; height: 22px !important; }
.app-stock-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #eef2f4; }
.app-stock-row:last-child { border: 0; }
.app-stock-row div { flex: 1; }
.app-stock-row strong { display: block; font-size: 12.5px; }
.app-stock-row span { font-size: 11px; color: #8a9aa5; }
.app-stock-row em { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: #1f7180; background: #e6f4f6; padding: 4px 8px; border-radius: 7px; }
.letter { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; flex: none; }
.letter.c { background: #1f7180; }
.letter.p { background: #f97316; }
.letter.j { background: #6366f1; }
.app-shortcut { display: flex; align-items: center; gap: 11px; padding: 10px 8px; border-radius: 10px; border: 1px solid #eef2f4; margin-bottom: 8px; }
.app-shortcut div { flex: 1; }
.app-shortcut strong { display: block; font-size: 12.5px; }
.app-shortcut span { font-size: 11px; color: #8a9aa5; }
.sc-ic { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; }
.sc-ic.blue { background: #eff6ff; color: #2563eb; }
.sc-ic.green { background: #ecfdf5; color: #059669; }
.sc-ic.amber { background: #fffbeb; color: #d97706; }
.sc-ic.teal { background: #e6f4f6; color: #1f7180; }
.sc-arrow { color: #9aa8b3; }

/* Material strip */
.material-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  max-width: 1120px;
  margin: 56px auto 0;
}
.material-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  transition: border-color .3s ease, color .3s ease, transform .3s var(--ease);
}
.material-chip:hover { border-color: rgba(63, 214, 198, 0.45); color: var(--text); transform: translateY(-3px); }
.material-chip svg { width: 40px; height: 40px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Ticker */
.ticker-section {
  position: relative;
  padding: 64px 0 72px;
  text-align: center;
}
.ticker-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 22px; padding: 0 20px; }
.ticker-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.ticker-viewport:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.ticker-item svg { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------- Tabs ---------------------------------- */
.tabs-section { background: var(--bg); }

.tab-bar {
  display: flex;
  gap: 6px;
  max-width: 900px;
  margin: 0 auto 18px;
  padding: 6px;
  border-radius: 16px;
  background: var(--card-2);
  border: 1px solid var(--line);
}
.mockup-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.mockup-tab-btn:hover { color: var(--text); }
.mockup-tab-btn.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.tab-card {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
html[data-theme="light"] .tab-card { border: 1px solid var(--line); }

.mockup-view {
  display: none;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  padding: 44px;
  align-items: center;
  min-height: 420px;
}
.mockup-view.active { display: grid; animation: viewIn .6s var(--ease); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.tab-copy h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; margin: 16px 0 12px; }
.tab-copy p { color: var(--muted); font-size: 1rem; font-weight: 500; }
.tab-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-size: 0.85rem; font-weight: 800; color: var(--accent); }

.doc-card { border-radius: 16px; background: #f6f9fa; border: 1px solid #e2e9ec; padding: 22px; }
.doc-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.doc-kicker { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); }
.doc-head h4 { font-size: 1.05rem; font-weight: 800; margin: 2px 0; }
.doc-head p { font-size: 0.82rem; color: var(--muted); }
.doc-qr { flex: none; width: 74px; height: 74px; border-radius: 12px; border: 1px dashed #b9cbd1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #102c3c; font-size: 0.58rem; font-weight: 800; }
.doc-qr svg { width: 28px; height: 28px; }
.doc-row { display: grid; grid-template-columns: 2.4fr .7fr .8fr .8fr; gap: 8px; padding: 10px 12px; border-radius: 9px; font-size: 0.86rem; font-weight: 600; }
.doc-row:nth-child(even) { background: #fff; }
.doc-row span:not(:first-child) { text-align: right; }
.doc-row.head { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.doc-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #cfd9de; font-size: 0.82rem; color: var(--muted); }

.wa-card { border-radius: 18px; overflow: hidden; border: 1px solid #e2e9ec; max-width: 470px; margin-left: auto; }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #075e54; color: #fff; }
.wa-head strong { display: block; font-size: 0.9rem; }
.wa-head span { font-size: 0.74rem; color: #cde7e2; }
.wa-avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #075e54; display: flex; align-items: center; justify-content: center; flex: none; }
.wa-avatar svg { width: 18px; height: 18px; }
.wa-body { padding: 18px; background: #efeae2; }
.wa-bubble { background: #d9fdd3; border-radius: 14px; border-top-right-radius: 4px; padding: 14px 16px 8px; font-size: 0.86rem; color: #111b21; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-title { font-weight: 800; margin-bottom: 4px; }
.wa-bubble ul { list-style: none; margin: 10px 0; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); }
.wa-bubble li { display: flex; justify-content: space-between; padding: 2px 0; }
.wa-total { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.wa-total strong { font-size: 1.1rem; color: #075e54; }
.wa-pdf { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.05); border-radius: 10px; padding: 9px; margin-top: 10px; }
.wa-pdf svg { width: 26px; height: 26px; color: #e5483f; flex: none; }
.wa-pdf strong { display: block; font-size: 0.8rem; }
.wa-pdf small { font-size: 0.7rem; color: #667781; }
.wa-time { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 6px; font-size: 0.7rem; color: #667781; }
.wa-time svg { width: 14px; height: 14px; color: #53bdeb; }

.ai-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; }
.ai-photo, .ai-result { border-radius: 16px; padding: 18px; }
.ai-photo { background: #f6f9fa; border: 1px solid #e2e9ec; }
.ai-tag, .ai-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 800; color: var(--muted); }
.ai-ok { color: #059669; }
.ai-paper { position: relative; margin-top: 12px; padding: 20px; border-radius: 10px; background: #fffbea; border: 1px solid #f1e3b0; transform: rotate(-2deg); overflow: hidden; font-family: 'Segoe Print', 'Comic Sans MS', cursive; font-size: 0.9rem; line-height: 1.9; color: #334155; }
.ai-laser { position: absolute; left: 0; right: 0; height: 3px; top: 0; background: linear-gradient(90deg, transparent, #1fa89c, transparent); box-shadow: 0 0 14px #1fa89c; animation: laser 2.6s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 6%; } 50% { top: 92%; } }
.ai-result { background: #102c3c; color: #e6f2f3; }
.ai-result ul { list-style: none; margin: 14px 0 18px; display: grid; gap: 9px; font-size: 0.86rem; }
.ai-result li { display: flex; align-items: center; gap: 8px; }
.ai-result li svg { width: 16px; height: 16px; color: #3fd6c6; flex: none; }
.ai-result strong { color: #fff; }
.ai-result .ai-ok { color: #3fd6c6; }

/* ------------------------------- Video --------------------------------- */
.video-showcase-section { overflow: hidden; }

.video-showcase-frame {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #050c0d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55), 0 0 120px rgba(31, 168, 156, 0.22);
}
.video-showcase-player { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }

.video-showcase-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(31, 168, 156, 0.9);
  box-shadow: 0 0 0 10px rgba(31, 168, 156, 0.22), 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.video-showcase-toggle:hover { transform: scale(1.06); }
.video-showcase-toggle svg { width: 30px; height: 30px; }
.video-showcase-toggle .video-icon-pause { display: none; }
.video-showcase-frame.is-playing .video-showcase-toggle {
  left: auto; top: auto; right: 18px; bottom: 18px; margin: 0;
  width: 44px; height: 44px; opacity: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.video-showcase-frame.is-playing:hover .video-showcase-toggle,
.video-showcase-frame.is-playing .video-showcase-toggle:focus-visible { opacity: 1; }
.video-showcase-frame.is-playing .video-icon-play { display: none; }
.video-showcase-frame.is-playing .video-icon-pause { display: block; width: 20px; height: 20px; }

/* -------------------------- Problem / Solution -------------------------- */
.island { background: #fff; }

.problem-section { padding-top: 130px; }

.problem-head { max-width: 920px; margin: 0 auto 56px; text-align: center; }

.big-statement {
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  color: var(--text);
}

.pain-box {
  max-width: 1120px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: #f3f6f7;
  padding: 34px 38px;
}
.pain-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.pain-head h3 { font-size: 1.15rem; font-weight: 800; }
.pain-head p { font-size: 0.88rem; color: var(--rose); font-weight: 700; }
.pain-icon { width: 42px; height: 42px; border-radius: 12px; background: #ffe4e8; color: var(--rose); display: flex; align-items: center; justify-content: center; flex: none; }
.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.pain-item svg { width: 28px; height: 28px; color: var(--brand); margin-bottom: 12px; stroke-width: 1.8; }
.pain-item p { font-size: 0.92rem; color: var(--text-2); font-weight: 600; line-height: 1.55; }

.solution-band {
  margin-top: 90px;
  padding: 110px 0 120px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #e3f5f1 50%, #c6ebe3 100%);
}
.solution-band .big-statement { max-width: 920px; margin-left: auto; margin-right: auto; }

.flow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1080px;
  margin: 60px auto 0;
}
.flow-line { position: absolute; left: 10%; right: 10%; top: 31px; height: 2px; background: rgba(31, 113, 128, 0.18); border-radius: 2px; overflow: hidden; }
.flow-line-fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #1f7180, #3fd6c6); transform-origin: left; transform: scaleX(0); transition: transform 2s var(--ease) .3s; }
.flow-steps.in .flow-line-fill { transform: scaleX(1); }
.flow-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.flow-ic { width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; box-shadow: 0 10px 26px rgba(31, 113, 128, 0.2); }
.flow-ic svg { width: 26px; height: 26px; }
.flow-step strong { font-size: 0.95rem; font-weight: 800; }
.flow-step small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

.gain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 980px; margin: 54px auto 0; text-align: left; }
.gain-item { display: flex; gap: 12px; padding: 18px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.75); box-shadow: 0 6px 20px rgba(31, 113, 128, 0.08); }
.gain-item svg { width: 22px; height: 22px; color: #059669; flex: none; margin-top: 2px; }
.gain-item p { font-size: 0.93rem; color: var(--text-2); font-weight: 500; }
.gain-item strong { color: var(--text); }

/* ----------------------------- Architecture ---------------------------- */
.architecture-section { background: var(--bg); }

.architecture-layout {
  display: grid;
  grid-template-columns: 1fr 140px 1fr;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
.arch-modules-col { display: grid; gap: 14px; }
.arch-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color .3s ease, transform .3s var(--ease);
}
.arch-card:hover { border-color: rgba(63, 214, 198, 0.4); transform: translateX(4px); }
.arch-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.arch-ic svg { width: 20px; height: 20px; }
.arch-card h4 { font-size: 1rem; font-weight: 800; }
.arch-card p { font-size: 0.86rem; color: var(--muted); }

.arch-wires-col { height: 360px; }
.circuit-svg { width: 100%; height: 100%; }
.circuit-wire { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 6 8; opacity: 0.55; vector-effect: non-scaling-stroke; animation: wire 1.4s linear infinite; }
@keyframes wire { to { stroke-dashoffset: -28; } }

.core-chip-card {
  position: relative;
  overflow: hidden;
  padding: 40px 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, #0e2a30, #08171a);
  border: 1px solid rgba(63, 214, 198, 0.3);
  color: #eef6f7;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 0 80px rgba(31, 168, 156, 0.2);
}
.core-glow { position: absolute; inset: -40%; background: radial-gradient(circle at 50% 40%, rgba(63, 214, 198, 0.28), transparent 50%); pointer-events: none; }
.core-badge { position: relative; display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; color: #3fd6c6; border: 1px solid rgba(63, 214, 198, 0.35); border-radius: 999px; padding: 5px 12px; }
.core-icon { position: relative; width: 88px; height: 88px; margin: 26px auto; border-radius: 24px; background: linear-gradient(135deg, #1fa89c, #1f7180); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 50px rgba(63, 214, 198, 0.45); }
.core-icon svg { width: 40px; height: 40px; color: #fff; }
.core-ring { position: absolute; inset: -12px; border-radius: 30px; border: 1px solid rgba(63, 214, 198, 0.5); animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.core-chip-card h3 { position: relative; font-size: 1.5rem; font-weight: 800; }
.core-chip-card p { position: relative; color: #9fb4b8; margin: 8px 0 20px; }
.core-meta { position: relative; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.core-meta > span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); font-size: 0.78rem; font-weight: 700; }

/* -------------------------------- Bento -------------------------------- */
.bento-section { background: var(--bg-2); }
.bento-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.bento-card {
  position: relative;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .3s ease, transform .4s var(--ease);
}
.bento-card:hover { border-color: rgba(63, 214, 198, 0.35); transform: translateY(-4px); }
.bento-card h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 10px; }
.bento-card > p { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.bento-eyebrow { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; color: var(--accent); }

.bento-accent {
  background: linear-gradient(150deg, #1f7180 0%, #123b45 55%, #0b2228 100%);
  border-color: rgba(63, 214, 198, 0.35);
  color: #fff;
}
.bento-accent::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(63, 214, 198, 0.4), transparent 65%); }
.bento-accent .bento-eyebrow { color: #a7f3eb; }
.bento-accent > p { color: #c6e2e5; }
.bento-accent h3 { font-size: 1.7rem; }
.bento-stat { margin-top: 24px; display: inline-flex; flex-direction: column; padding: 14px 18px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.12); }
.bento-stat-num { font-family: var(--mono); font-size: 1.8rem; font-weight: 700; color: #fff; }
.bento-stat span:last-child { font-size: 0.8rem; color: #a9c8cc; }

.bento-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 0.7rem; font-weight: 800; color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 999px; }
.bento-widget { margin-top: 20px; padding: 18px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.widget-metrics { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.widget-metrics small { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.widget-num { font-size: 1.3rem; font-weight: 700; }
.widget-num.orange { color: var(--orange); }
.widget-track { height: 8px; border-radius: 9px; background: var(--line); overflow: hidden; }
.widget-bar { height: 100%; width: var(--w); border-radius: 9px; background: linear-gradient(90deg, #1f7180, #3fd6c6); }
.js .grow-bar { width: 0; transition: width 1.6s var(--ease) .3s; }
.js .in .grow-bar { width: var(--w); }
.widget-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.widget-legend .accent { color: var(--accent); font-weight: 800; }

.bento-chat { margin-top: 20px; padding: 16px; border-radius: 14px; background: #d9fdd3; color: #111b21; font-size: 0.88rem; max-width: 380px; }
.bento-chat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.bento-chat-head svg { width: 18px; height: 18px; color: #059669; }
.bento-chat .mono { font-size: 0.8rem; margin-top: 6px; }
.bento-chat-stamp { display: block; margin-top: 8px; font-size: 0.72rem; color: #667781; text-align: right; }

.bento-scanner { margin-top: 20px; }
.scanner-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 800; color: var(--amber); }
.scanner-tag svg { width: 15px; height: 15px; }
.scanner-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.scanner-pills span { font-family: var(--mono); font-size: 0.8rem; padding: 7px 12px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); }

/* --------------------------- Foundation curve -------------------------- */
.foundation-section { background: var(--bg); }

.growth-card {
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 40px;
  box-shadow: var(--shadow);
}
html[data-theme="light"] .growth-card { border: 1px solid var(--line); }

.growth-top { display: grid; grid-template-columns: 0.9fr 1.3fr; gap: 40px; align-items: start; }
.growth-intro p { color: var(--muted); font-weight: 600; margin: 16px 0 22px; max-width: 380px; }
.growth-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 28px; }
.g-stat { border-left: 2px solid var(--line); padding-left: 18px; }
.g-stat b { display: block; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.g-stat > span { font-size: 0.85rem; color: var(--muted); font-weight: 700; }

.growth-chart { position: relative; margin: 50px 0 10px; height: 380px; }
.growth-chart svg { width: 100%; height: 100%; overflow: visible; }
.growth-chart .axis { fill: none; stroke: #d6e0e4; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.growth-chart .grid { fill: none; stroke: #eef2f4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.growth-chart .curve { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.js .growth-chart .curve { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease) .2s; }
.js .growth-chart.in .curve { stroke-dashoffset: 0; }
.chart-label { position: absolute; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; color: #8a9aa5; }
.chart-label.y { left: -6px; top: 50%; transform: rotate(-90deg) translateX(50%); transform-origin: left top; }
.chart-label.x { left: 50%; bottom: -30px; transform: translateX(-50%); }

.curve-node { position: absolute; width: 0; height: 0; }
.node-ic {
  position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(31, 113, 128, 0.25);
}
.node-ic svg { width: 22px; height: 22px; }
.node-label { position: absolute; left: -80px; width: 160px; top: -56px; text-align: center; font-size: 0.82rem; font-weight: 800; color: var(--brand-deep); }
.js .curve-node { opacity: 0; transform: scale(0.4); transition: opacity .5s var(--ease), transform .6s cubic-bezier(.34, 1.56, .64, 1); transition-delay: var(--nd, 0s); }
.js .growth-chart.in .curve-node { opacity: 1; transform: none; }

.pillar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.pillar h3 { display: flex; align-items: center; gap: 8px; font-size: 0.98rem; font-weight: 800; margin-bottom: 8px; }
.pillar h3 svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.pillar p { font-size: 0.86rem; color: var(--muted); font-weight: 500; line-height: 1.55; }

/* ------------------------------ Equipment ------------------------------ */
.equipment-section { background: var(--bg-2); }
.equipment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.eq-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color .3s ease, transform .4s var(--ease);
}
.eq-card:hover { border-color: rgba(63, 214, 198, 0.4); transform: translateY(-4px); }
.eq-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.eq-ic svg { width: 22px; height: 22px; }
.eq-card h4 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.eq-card p { font-size: 0.9rem; color: var(--muted); font-weight: 500; }

/* ------------------------------ Calculator ----------------------------- */
.calculator-section { background: var(--bg); }
.calc-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.calc-inputs { display: flex; flex-direction: column; justify-content: center; gap: 40px; }
.slider-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.slider-header label { font-weight: 700; color: var(--text-2); }
.slider-val { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.slider-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.76rem; color: var(--muted); font-weight: 600; }

.custom-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 9px; background: var(--line-strong); outline-offset: 6px; }
.custom-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 5px solid var(--btn); box-shadow: 0 0 0 6px rgba(31, 168, 156, 0.2); cursor: pointer; }
.custom-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 5px solid var(--btn); box-shadow: 0 0 0 6px rgba(31, 168, 156, 0.2); cursor: pointer; }

.calc-results { display: flex; flex-direction: column; gap: 14px; }
.res-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius); background: var(--card-2); border: 1px solid var(--line); }
.res-card.highlight { background: linear-gradient(140deg, #1f7180, #123b45); border-color: rgba(63, 214, 198, 0.35); color: #fff; }
.res-card.highlight .res-label, .res-card.highlight .res-sub { color: #c6e2e5; }
.res-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.res-val { font-size: 1.6rem; font-weight: 700; }
.res-card.highlight .res-val { font-size: 2.2rem; }
.res-val.accent { color: var(--accent); }
.res-val.green { color: #10b981; }
.res-sub { font-size: 0.76rem; color: var(--muted); }
.res-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ----------------------------- Testimonials ---------------------------- */
.testimonials-section { background: var(--bg-2); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.test-stars { display: flex; gap: 3px; color: #fbbf24; }
.test-stars svg { width: 16px; height: 16px; fill: currentColor; }
.testimonial-card blockquote { flex: 1; font-size: 0.98rem; color: var(--text-2); font-weight: 500; line-height: 1.65; }
.test-author { display: flex; align-items: center; gap: 12px; }
.test-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #1fa89c, #1f7180); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.test-author strong { display: block; font-size: 0.95rem; }
.test-author span { font-size: 0.8rem; color: var(--muted); }

/* ------------------------------- Pricing ------------------------------- */
.pricing-section { background: var(--bg); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1180px; margin: 0 auto; align-items: stretch; }
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid var(--line);
}
.pricing-card.featured {
  border-color: rgba(63, 214, 198, 0.5);
  background: linear-gradient(180deg, rgba(31, 168, 156, 0.12), transparent 40%), var(--card);
  box-shadow: 0 0 0 1px rgba(63, 214, 198, 0.2), 0 30px 80px rgba(31, 168, 156, 0.18);
}
.plan-badge { position: absolute; top: -12px; right: 28px; padding: 5px 12px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; }
.pricing-card h3 { font-size: 1.4rem; font-weight: 800; }
.plan-desc { color: var(--muted); font-size: 0.92rem; margin: 6px 0 20px; min-height: 2.9em; }
.plan-price { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; min-height: 60px; }
.plan-note { font-size: 0.8rem; color: var(--muted); font-weight: 600; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid rgba(148, 163, 184, 0.16); }
.plan-includes { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
.plan-price .currency { font-size: 1.6rem; font-weight: 700; color: var(--muted); }
.plan-price .amount { font-size: 3.6rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan-price .period { font-size: 0.88rem; color: var(--muted); font-weight: 600; margin-left: 6px; }
.custom-pricing-tag { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.plan-features { list-style: none; display: grid; gap: 12px; align-content: start; margin-bottom: 30px; flex: 1; }
.plan-features li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--text-2); font-weight: 500; }
.plan-features svg { width: 18px; height: 18px; color: #10b981; flex: none; margin-top: 2px; }
.plan-features li.not-included { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(148, 163, 184, 0.5); }
.plan-features li.not-included svg { color: #ef4444; opacity: 0.8; }

/* --------------------------------- FAQ --------------------------------- */
.faq-section { background: var(--bg-2); }
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s ease; }
.faq-item.open { border-color: rgba(63, 214, 198, 0.4); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; text-align: left; font-weight: 700; font-size: 1rem; color: var(--text); }
.faq-icon { width: 20px; height: 20px; color: var(--accent); flex: none; transition: transform .35s var(--ease); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.faq-answer > p { overflow: hidden; padding: 0 24px; color: var(--muted); font-weight: 500; }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-item.open .faq-answer > p { padding-bottom: 22px; }

/* --------------------------------- CTA --------------------------------- */
.cta-section { overflow: hidden; padding: 150px 0; }
.cta-box { position: relative; text-align: center; max-width: 960px; }
.cta-title { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.04em; margin: 22px 0 18px; }
.cta-desc { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* -------------------------------- Footer ------------------------------- */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding-top: 72px; }
.footer-container { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer-text { color: var(--muted); font-size: 0.92rem; margin: 16px 0 18px; max-width: 340px; }
.footer-contact-info { display: grid; gap: 8px; }
.footer-contact-info p { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-2); }
.footer-contact-info svg { color: var(--accent); }
.footer-col h4 { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: var(--text-2); transition: color .2s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0; }
.bottom-flex { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }

/* ----------------------------- Support dock ---------------------------- */
.support-dock { position: fixed; right: 20px; bottom: 20px; z-index: 90; }
.support-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  background: var(--nav-bg);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  transition: transform .3s var(--ease);
}
.support-card:hover { transform: translateY(-3px); }
.support-avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; }
.support-dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid var(--bg); }
.support-details { display: flex; flex-direction: column; line-height: 1.25; }
.support-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.support-phone { font-size: 0.92rem; font-weight: 800; color: var(--text); }

/* -------------------------------- Modal -------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(.97);
  transition: transform .4s var(--ease);
}
.modal-backdrop.open .modal-card { transform: none; }
.modal-close-btn { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.modal-close-btn:hover { color: var(--text); border-color: var(--accent); }
.modal-header h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 12px 0 6px; }
.modal-header p { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }

.demo-form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: grid; gap: 6px; }
.form-group label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--text-2); }
.form-group label svg { color: var(--accent); }
.req { color: var(--rose); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--btn); box-shadow: 0 0 0 4px rgba(31, 168, 156, 0.18); }
.form-group textarea { resize: vertical; }
.phone-input-wrap { display: flex; }
.phone-prefix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 11px 0 0 11px; background: var(--card-2); color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.phone-input-wrap input { border-radius: 0 11px 11px 0; }
.form-error-msg { padding: 10px 14px; border-radius: 10px; background: rgba(225, 29, 72, 0.12); color: #fb7185; font-size: 0.86rem; font-weight: 600; }
.btn-loader { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-privacy-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.form-privacy-note svg { color: var(--accent); }

.modal-success { text-align: center; }
.success-icon { display: inline-flex; width: 70px; height: 70px; border-radius: 50%; background: rgba(16, 185, 129, 0.15); color: #10b981; align-items: center; justify-content: center; margin-bottom: 16px; }
.success-icon svg { width: 34px; height: 34px; }
.modal-success h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 10px; }
.success-message { color: var(--muted); }
.success-message strong { color: var(--text); }
.success-highlight-box { display: flex; gap: 10px; text-align: left; margin: 20px 0; padding: 14px; border-radius: 12px; background: var(--accent-soft); font-size: 0.86rem; color: var(--text-2); }
.success-highlight-box svg { color: var(--accent); flex: none; }
.success-cta-group { display: flex; flex-direction: column; gap: 10px; }

/* ------------------------------ Responsive ----------------------------- */
@media (max-width: 1460px) {
  .nav-link { padding: 8px 9px; font-size: 0.84rem; }
  .brand-edition-tag { display: none; }
}

@media (max-width: 1280px) {
  .nav-login-btn { display: none; }
}

@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s var(--ease), visibility .25s ease;
  }
  .nav-menu.open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 12px 14px; font-size: 0.95rem; }
  .mobile-nav-login { display: flex; align-items: center; gap: 8px; }
  .mobile-toggle { display: flex; }
  .nav-actions { margin-left: auto; }

  .architecture-layout { grid-template-columns: 1fr; gap: 24px; }
  .arch-wires-col { display: none; }
  .growth-top { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
  .mockup-view { grid-template-columns: 1fr; gap: 28px; }
  .wa-card { margin: 0 auto; }
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .section { padding: 90px 0; }
  .material-strip { grid-template-columns: repeat(3, 1fr); }
  .bento-grid,
  .testimonials-grid,
  .pricing-grid,
  .calc-card { grid-template-columns: minmax(0, 1fr); }
  .calc-card > *, .bento-card, .growth-top > * { min-width: 0; }
  .equipment-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-steps { grid-template-columns: 1fr; gap: 18px; max-width: 360px; }
  .flow-line { left: 31px; right: auto; top: 32px; bottom: 32px; width: 2px; height: auto; }
  .flow-line-fill { transform: scaleY(0); transform-origin: top; }
  .flow-steps.in .flow-line-fill { transform: scaleY(1); }
  .flow-step { display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; row-gap: 2px; text-align: left; align-items: center; }
  .flow-step .flow-ic { grid-row: span 2; margin: 0; }
  .flow-step strong { align-self: end; }
  .flow-step small { align-self: start; }
  .gain-grid { grid-template-columns: 1fr; }
  .growth-chart { height: 280px; }
  .node-label { display: none; }
  .tab-bar { overflow-x: auto; }
  .mockup-tab-btn { flex: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hero-section { padding-top: 120px; }
  .brand-edition-tag { display: none; }
  .nav-demo-btn { display: none; }
  .hero-cta-group .btn { width: 100%; }
  .device-tablet { border-radius: 22px; padding: 8px; }
  .device-screen { border-radius: 15px; }
  .material-strip { grid-template-columns: repeat(2, 1fr); }
  .mockup-view { padding: 24px; min-height: 0; }
  .mockup-tab-btn span { font-size: 0.82rem; }
  .ai-grid { grid-template-columns: 1fr; }
  .doc-row { grid-template-columns: 2fr .7fr .8fr; }
  .doc-row span:nth-child(3) { display: none; }
  .doc-qr { display: none; }
  .pain-box, .growth-card, .calc-card { padding: 24px; }
  .pain-grid, .pillar-grid, .equipment-grid { grid-template-columns: 1fr; }
  .growth-stats { grid-template-columns: 1fr 1fr; gap: 18px; }
  .growth-chart { height: 220px; margin-top: 36px; }
  .node-ic { width: 36px; height: 36px; left: -18px; top: -18px; }
  .node-ic svg { width: 16px; height: 16px; }
  .chart-label.y { display: none; }
  .res-row, .form-row { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; }
  .modal-card { padding: 24px; }
  .support-details { display: none; }
  .support-card { padding: 8px; }
  .video-showcase-frame { border-radius: var(--radius); }
  .video-showcase-toggle { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .video-showcase-frame.is-playing .video-showcase-toggle { opacity: .85; width: 38px; height: 38px; }
}

/* ------------------- Story slider: one order, start to end ------------------- */
.story-section { background: var(--bg-2); overflow: hidden; }
.story {
  --story-dur: 6s;
  max-width: 1120px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.story-steps { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }
.story-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 18px 20px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}
.story-step:last-child { border-right: 0; }
.story-step:hover { background: var(--accent-soft); }
.story-step:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.story-step-time { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.story-step-name { font-size: 0.95rem; font-weight: 700; color: var(--text-2); }
.story-step.is-active { color: var(--accent); background: var(--accent-soft); }
.story-step.is-active .story-step-name { color: var(--text); }
.story-step.is-done .story-bar i { transform: scaleX(1); }
.story-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.story-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.story-step.is-active .story-bar i { animation: story-progress var(--story-dur) linear forwards; }
.story.is-paused .story-step.is-active .story-bar i { animation-play-state: paused; }
@keyframes story-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* All slides sit side by side on one track; the track slides left / right.
   Every slide is in the row, so the box keeps the height of the tallest one. */
.story-stage { position: relative; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; }
.story-stage.is-dragging { cursor: grabbing; }
.story-track {
  --x: 0;
  --drag: 0px;
  display: flex;
  transform: translate3d(calc(var(--x) * -100% + var(--drag)), 0, 0);
  transition: transform .85s var(--ease);
  will-change: transform;
}
.story-stage.is-dragging .story-track { transition: none; }
.story-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 56px;
  opacity: .25;
  transform: scale(.94);
  transition: opacity .7s ease, transform .85s var(--ease);
}
.story-slide.is-active { opacity: 1; transform: none; }
.story-stage.is-dragging .story-slide { opacity: 1; transform: none; }

/* Parallax: the app card trails behind the text while the track moves */
.story-visual { transition: transform 1.05s var(--ease); }
.story-slide.is-before .story-visual { transform: translateX(-90px); }
.story-slide.is-after .story-visual { transform: translateX(90px); }

.story-slide.is-active .story-copy > * { animation: story-in .8s .15s var(--ease) both; }
.story-slide.is-active .story-copy > :nth-child(2) { animation-delay: .22s; }
.story-slide.is-active .story-copy > :nth-child(3) { animation-delay: .29s; }
.story-slide.is-active .story-copy > :nth-child(4) { animation-delay: .36s; }
.story.is-back .story-slide.is-active .story-copy > * { animation-name: story-in-back; }
@keyframes story-in { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes story-in-back { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }

/* Points slide in from the side one after another */
.story-slide.is-active .story-points li { animation: story-in .6s var(--ease) both; }
.story-slide.is-active .story-points li:nth-child(1) { animation-delay: .45s; }
.story-slide.is-active .story-points li:nth-child(2) { animation-delay: .55s; }
.story-slide.is-active .story-points li:nth-child(3) { animation-delay: .65s; }
.story.is-back .story-slide.is-active .story-points li { animation-name: story-in-back; }

.story-num { display: block; font-family: var(--mono); font-size: 0.85rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.story-copy h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); margin-bottom: 14px; }
.story-copy p { font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: 22px; }
.story-points { list-style: none; display: grid; gap: 10px; }
.story-points li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 600; color: var(--text-2); }
.story-points svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; }

/* Mock app card inside each slide (always a white "paper" look) */
.story-visual { display: flex; justify-content: center; }
.sv-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e9ec;
  box-shadow: 0 24px 50px rgba(2, 20, 24, 0.28);
}
.sv-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1px dashed #d5e0e4; }
.sv-kicker { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; color: #1f7180; }
.sv-head strong { font-size: 1.1rem; font-weight: 800; }
.sv-head small { font-size: 0.8rem; color: #5b6b78; font-weight: 600; }
.sv-rows { display: grid; gap: 4px; }
.sv-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: 0.88rem; font-weight: 600; color: #334155; }
.sv-row:nth-child(odd) { background: #f3f7f8; }
.sv-row b { color: #0f172a; }
.sv-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.8rem; font-weight: 700; color: #5b6b78; }
.sv-foot svg { width: 16px; height: 16px; color: #1f7180; }
.sv-stamp {
  position: absolute; top: 18px; right: 18px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px;
  background: #dcfce7; color: #15803d; font-size: 0.74rem; font-weight: 800;
}
.sv-stamp svg { width: 14px; height: 14px; }
.story-slide.is-active .sv-stamp { animation: sv-stamp .5s .9s var(--ease) both; }
@keyframes sv-stamp { from { opacity: 0; transform: scale(1.8) rotate(-8deg); } to { opacity: 1; transform: none; } }

.sv-bars { display: grid; gap: 14px; }
.sv-bar > div { display: flex; justify-content: space-between; font-size: 0.86rem; font-weight: 600; color: #334155; margin-bottom: 6px; }
.sv-track { display: block; height: 8px; border-radius: 999px; background: #e6eef1; overflow: hidden; }
.sv-track i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #1fa89c, #3fd6c6); transform: scaleX(0); transform-origin: left; }
.story-slide.is-active .sv-track i { animation: sv-grow 1s calc(.3s + var(--i) * .15s) var(--ease) forwards; }
@keyframes sv-grow { to { transform: scaleX(1); } }

.sv-grid { display: grid; gap: 4px; }
.sv-grid-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 0.86rem; font-weight: 600; color: #334155; }
.sv-grid-row > :not(:first-child) { text-align: right; }
.sv-grid-row.head { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #5b6b78; }
.sv-grid-row:not(.head):nth-child(even) { background: #f3f7f8; }
.sv-grid-row b { color: #0f172a; }
.sv-grid-row b.warn { color: #d97706; }
.sv-grid-row b.bad { color: #e11d48; }

.sv-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #e6f4f6; font-size: 0.9rem; font-weight: 700; color: #102c3c; }
.sv-total b { font-size: 1rem; color: #1f7180; }
.sv-total.big b { font-size: 1.4rem; }

.sv-chat { background: #efeae2; padding: 0; overflow: hidden; }
.sv-chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #075e54; color: #fff; }
.sv-chat-head small { display: block; font-size: 0.72rem; opacity: .8; }
.sv-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.sv-avatar svg { width: 18px; height: 18px; }
.sv-bubble { margin: 18px 18px 10px 48px; padding: 12px; border-radius: 12px 2px 12px 12px; background: #d9fdd3; font-size: 0.88rem; color: #111b21; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.sv-pdf { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: 8px; background: rgba(255, 255, 255, .7); }
.sv-pdf svg { width: 26px; height: 26px; color: #e11d48; flex: none; }
.sv-pdf strong { display: block; font-size: 0.84rem; }
.sv-pdf small { font-size: 0.76rem; color: #5b6b78; }
.sv-ticks { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 6px; font-size: 0.7rem; color: #667781; }
.sv-ticks svg { width: 15px; height: 15px; color: #53bdeb; }
.sv-paid { display: flex; align-items: center; gap: 10px; margin: 8px 18px 18px; padding: 12px 14px; border-radius: 12px; background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .1); }
.sv-paid svg { width: 26px; height: 26px; color: #16a34a; flex: none; }
.sv-paid strong { display: block; font-size: 0.88rem; color: #0f172a; }
.sv-paid small { font-size: 0.76rem; color: #5b6b78; font-weight: 600; }

/* Rows inside the card appear one after another */
.story-slide.is-active .sv-in { animation: sv-in .55s calc(.45s + var(--i, 0) * .12s) var(--ease) both; }
@keyframes sv-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

.story-controls { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 16px; border-top: 1px solid var(--line); }
.story-ctrl {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text-2);
  cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.story-ctrl:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.story-ctrl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.story-ctrl svg { width: 18px; height: 18px; }
.story-ic-play { display: none; }
.story.is-paused .story-ic-pause { display: none; }
.story.is-paused .story-ic-play { display: block; }
.story-count { min-width: 70px; text-align: center; font-size: 0.85rem; color: var(--muted); }
.story-count b { color: var(--text); }

@media (max-width: 1024px) {
  .story-slide { grid-template-columns: 1fr; gap: 32px; padding: 36px 32px; }
  .story-stage { min-height: 0; }
}
@media (max-width: 860px) {
  .story-steps { display: flex; overflow-x: auto; scrollbar-width: none; }
  .story-steps::-webkit-scrollbar { display: none; }
  .story-step { flex: 0 0 auto; padding: 14px 16px 16px; }
  .story-step-name { font-size: 0.86rem; white-space: nowrap; }
}
@media (max-width: 640px) {
  .story-slide { padding: 28px 20px; }
  .sv-card { padding: 18px; }
  .sv-chat { padding: 0; }
  .sv-grid-row { font-size: 0.8rem; gap: 6px; }
}

/* ---------------- Scroll rail: rows move sideways as the page scrolls ---------------- */
.scroll-rail {
  position: relative;
  padding: 56px 0;
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 22px;
}
/* Soft fade on both edges */
.scroll-rail::before,
.scroll-rail::after {
  content: "";
  position: absolute; top: 0; bottom: 0; z-index: 2;
  width: min(14vw, 180px);
  pointer-events: none;
}
.scroll-rail::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.scroll-rail::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.rail { overflow: visible; }
.rail-row {
  --rail-x: 0px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  transform: translate3d(var(--rail-x), 0, 0);
  will-change: transform;
}
.rail-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
.rail-chip svg { width: 20px; height: 20px; color: var(--accent); }
.rail-chip.accent { background: var(--btn); border-color: var(--btn); color: #fff; }
.rail-chip.accent svg { color: #fff; }
.rail-b .rail-row { gap: 28px; }
.rail-word {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  white-space: nowrap;
}
.rail-word.outline { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.rail-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); }
@media (max-width: 640px) {
  .scroll-rail { padding: 40px 0; gap: 16px; }
  .rail-chip { padding: 11px 16px; font-size: 0.88rem; }
  .rail-chip svg { width: 17px; height: 17px; }
  .rail-dot { width: 10px; height: 10px; }
}

/* --------------------------- Reduced motion ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal, .js .split-words .w, .js .curve-node { opacity: 1; transform: none; filter: none; }
  .js .growth-chart .curve { stroke-dashoffset: 0; }
  .ticker-track { animation: none; }
  .device-tablet { transform: none; }
}
