/* ============================================================
   Caspa AI — Design System (rebuild v1, Cloudflare Pages)
   Conversion-first, evolved brand. No build step.
   ============================================================ */

:root {
  /* Brand */
  --brand: #00ff00;          /* caspa green */
  --brand-hover: #00b853;    /* action button hover */
  --brand-dark: #00a04a;     /* readable green for text/links on white */
  --brand-darker: #00803c;
  --brand-ink: #04310f;      /* dark text on bright green fills */
  --brand-tint: #eeffe9;
  --brand-tint-2: #ccffcc;
  --ink: #0b1512;            /* near-black green ink */
  --ink-2: #3d4a45;          /* secondary text */
  --ink-3: #6b7a74;          /* tertiary text */
  --paper: #ffffff;
  --paper-2: #f6faf8;        /* section alt background */
  --line: #e4ece8;
  --warn: #f59e0b;
  --star: #fbbf24;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --h1: clamp(2.2rem, 5.2vw, 3.6rem);
  --h2: clamp(1.7rem, 3.6vw, 2.5rem);
  --h3: clamp(1.15rem, 2vw, 1.4rem);

  /* Layout */
  --max: 1160px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 4px 24px rgba(11, 21, 18, .07);
  --shadow-lg: 0 12px 48px rgba(11, 21, 18, .13);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.0625rem;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--alt { background: var(--paper-2); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--ink-2); margin-top: 12px; font-size: 1.125rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand-darker); background: var(--brand-tint);
  border: 1px solid var(--brand-tint-2); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 1.0625rem; border-radius: 12px; cursor: pointer;
  padding: 14px 28px; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none !important; border: 0; line-height: 1.2;
}
.btn--primary {
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 6px 20px rgba(0, 200, 80, .35);
}
.btn--primary:hover { background: var(--brand-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0, 184, 83, .42); }
.btn--ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--lg { padding: 17px 36px; font-size: 1.15rem; border-radius: 14px; }
.btn--sm { padding: 9px 18px; font-size: .95rem; }
.btn-note { display: block; margin-top: 10px; font-size: .875rem; color: var(--ink-3); }
.btn-note strong { color: var(--brand-darker); }

/* ---------- Announcement bar ---------- */
.announce {
  background: linear-gradient(90deg, var(--ink) 0%, #0e2f1c 100%);
  color: #fff; text-align: center; font-size: .9rem; font-weight: 600; padding: 9px 16px;
}
.announce a { color: var(--brand); text-decoration: none; }
.announce a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; color: var(--brand-dark); text-decoration: none !important; }
.logo svg { flex: none; }
.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav a { color: var(--ink-2); font-weight: 600; font-size: .98rem; text-decoration: none !important; }
.nav a:hover { color: var(--ink); }
.nav .badge {
  font-size: .62rem; font-weight: 800; color: var(--brand-darker); background: var(--brand-tint-2);
  padding: 2px 6px; border-radius: 6px; vertical-align: super; margin-left: 3px;
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.dropdown { position: relative; }
.dropdown > button {
  background: none; border: 0; font: inherit; font-weight: 600; font-size: .98rem;
  color: var(--ink-2); cursor: pointer; display: flex; align-items: center; gap: 5px;
}
.dropdown > button:hover { color: var(--ink); }
.dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: -12px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; min-width: 260px;
  display: none; z-index: 110;
}
.dropdown.open .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 9px 14px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: .95rem; text-decoration: none !important; }
.dropdown-menu a:hover { background: var(--brand-tint); color: var(--ink); }
.hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 130%;
  background: radial-gradient(60% 50% at 50% 0%, var(--brand-tint) 0%, transparent 70%);
  z-index: -1;
}
.hero h1 { max-width: 880px; margin: 0 auto 20px; }
.hero h1 em { font-style: normal; color: var(--brand-dark); }
.hero .sub { max-width: 640px; margin: 0 auto 30px; color: var(--ink-2); font-size: 1.25rem; }
.hero-proof {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: 26px 0 6px; font-size: .95rem; color: var(--ink-2); font-weight: 600;
}
.stars { color: var(--star); letter-spacing: 2px; font-size: 1.05rem; }

/* ---------- Marquee / logo strip ---------- */
.marquee { overflow: hidden; position: relative; }
.marquee-track { display: flex; gap: 24px; width: max-content; animation: scroll 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee--gallery img {
  height: 300px; width: auto; border-radius: var(--radius); box-shadow: var(--shadow);
}
.logostrip { padding: 34px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.logostrip p { text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.logostrip .marquee-track { align-items: center; gap: 56px; }
.logostrip img { height: 26px; width: auto; opacity: .55; filter: grayscale(1); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 1rem; }
.card--media { padding: 0; overflow: hidden; }
.card--media .card-body { padding: 22px 24px 26px; }
.card--media img, .card--media video { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ---------- Feature split rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 80px; }
.split.rev > .split-media { order: 2; }
.split h2 { margin-bottom: 14px; }
.split p { color: var(--ink-2); font-size: 1.1rem; margin-bottom: 18px; }
.split ul { list-style: none; margin: 0 0 22px; }
.split li { padding-left: 30px; position: relative; margin-bottom: 10px; color: var(--ink-2); font-weight: 500; }
.split li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-tint-2); color: var(--brand-darker); font-size: .75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-top: 3px;
}
.split-media img, .split-media video { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--brand-ink);
  font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; box-shadow: 0 4px 14px rgba(0,200,80,.35);
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: center; }
.stat .num { font-size: clamp(2.2rem, 4.5vw, 3.2rem); font-weight: 800; color: var(--brand-dark); letter-spacing: -0.03em; }
.stat .lbl { color: var(--ink-2); font-weight: 600; margin-top: 4px; }
.stat .src { display: block; color: var(--ink-3); font-size: .8rem; margin-top: 4px; font-weight: 500; }

/* ---------- Before / After ---------- */
.ba { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.ba img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.ba-tag {
  position: absolute; top: 14px; left: 14px; background: rgba(11,21,18,.78); color: #fff;
  font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em;
}
.ba-tag--after { background: var(--brand); }

/* ---------- Testimonials ---------- */
.grid > .tcard { align-self: start; }
.tcard { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.tcard blockquote { color: var(--ink-2); font-size: 1rem; flex: 1; }
.tcard .who { display: flex; align-items: center; gap: 12px; }
.tcard .who img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.tcard .who .name { font-weight: 700; font-size: .95rem; }
.tcard .who .role { color: var(--ink-3); font-size: .85rem; }

/* ---------- Pricing ---------- */
.toggle { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 40px; font-weight: 700; }
.toggle .save { color: var(--brand-darker); background: var(--brand-tint); border: 1px solid var(--brand-tint-2); font-size: .8rem; padding: 3px 10px; border-radius: 999px; }
.switch { position: relative; width: 52px; height: 28px; background: var(--line); border-radius: 999px; border: 0; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { left: 27px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.plan { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 34px 30px; display: flex; flex-direction: column; }
.plan--hot { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.plan-flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: var(--brand-ink); font-size: .78rem; font-weight: 800;
  padding: 5px 16px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-size: 1.25rem; }
.plan .price { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 2px; }
.plan .price small { font-size: 1rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.plan .was { color: var(--ink-3); text-decoration: line-through; font-weight: 600; font-size: .95rem; }
.plan .per { color: var(--ink-3); font-size: .9rem; margin-bottom: 20px; }
.plan ul { list-style: none; margin: 0 0 26px; }
.plan li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--ink-2); font-size: .98rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-dark); font-weight: 800; }
.plan .btn { margin-top: auto; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; font-weight: 700; font-size: 1.08rem; padding: 20px 40px 20px 0;
  list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--brand-dark); transition: transform .15s;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 0 22px; color: var(--ink-2); }
.faq-group-title { margin: 40px 0 8px; font-size: 1.2rem; color: var(--ink-3); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--ink) 0%, #0e3d22 60%, var(--brand-darker) 100%);
  border-radius: var(--radius-lg); color: #fff; text-align: center; padding: 72px 32px;
}
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { color: #c8e6d9; max-width: 560px; margin: 0 auto 30px; font-size: 1.15rem; }
.cta-band .btn-note { color: #9fd8c0; }
.cta-band .btn-note strong { color: var(--brand); }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  display: none; transform: translateY(110%); transition: transform .25s ease;
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta .btn { width: 100%; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #b7c6c0; padding: 64px 0 32px; margin-top: 0; }
.footer a { color: #b7c6c0; text-decoration: none; font-size: .95rem; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer h5 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer .logo { color: var(--brand); margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 26px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .875rem; color: #86988f; }

/* ---------- Blog cards ---------- */
.blog-card { text-decoration: none !important; color: inherit; display: block; }
.blog-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.blog-card .date { color: var(--ink-3); font-size: .85rem; margin-top: 6px; }

/* ---------- Legal ---------- */
.legal { max-width: 800px; margin: 0 auto; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--ink-3); margin-bottom: 36px; }
.legal h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: 12px; }
.legal ul, .legal ol { padding-left: 24px; margin-bottom: 16px; }

/* ---------- Tool embed ---------- */
.tool-frame { width: 100%; height: 780px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.rev > .split-media { order: 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .section { padding: 52px 0; }
  .nav, .nav-cta .btn--ghost { display: none; }
  .hamburger { display: block; }
  .header.menu-open .nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 68px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 16px 24px 24px; box-shadow: var(--shadow-lg);
  }
  .header.menu-open .nav a, .header.menu-open .dropdown { padding: 8px 0; width: 100%; }
  .dropdown-menu { position: static; box-shadow: none; border: 0; padding-left: 12px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .marquee--gallery img { height: 210px; }
  .sticky-cta { display: block; }
  .hero { padding-top: 44px; }
}

/* ============ v3: motion & modern layer (cerebric-inspired, caspa colours) ============ */

/* Morphing pill header */
.header { transition: margin .35s cubic-bezier(.16,1,.3,1), border-radius .35s cubic-bezier(.16,1,.3,1), box-shadow .35s, background .35s, border-color .35s, top .35s; }
.header.pill {
  top: 10px; margin: 0 40px; border-radius: 999px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(16px);
  border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(11,21,18,.12);
}
.header.pill .container { height: 56px; }
@media (max-width: 760px) {
  .header.pill { margin: 0 16px; }
  .header.menu-open .nav { top: 56px; border-radius: 0 0 20px 20px; }
}

/* Scroll reveal */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0s); will-change: opacity, transform; }
.rv.in { opacity: 1; transform: none; }

/* Hero ambient motion */
.hero::after {
  content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,0,.16) 0%, transparent 65%);
  top: -120px; right: -140px; z-index: -1; animation: blob 14s ease-in-out infinite alternate;
}
@keyframes blob { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px,50px) scale(1.15); } }

/* Typing cursor */
.type-cursor { display: inline-block; width: 3px; height: .95em; background: var(--brand-dark); margin-left: 3px; vertical-align: -0.12em; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Button shine */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); transition: left .5s ease; }
.btn--primary:hover::after { left: 130%; }

/* Card lift */
.card, .plan { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.plan:hover { transform: translateY(-5px); }

/* Bento grid */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.tile { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.tile video, .tile > img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--paper-2); }
.tile--4 { display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch; }
.tile--4 video, .tile--4 > img { height: 100%; aspect-ratio: auto; min-height: 280px; }
.tile .tile-body { padding: 20px 22px 24px; }
.tile h3 { font-size: 1.15rem; margin-bottom: 6px; }
.tile p { color: var(--ink-2); font-size: .95rem; }
.tile--2 { grid-column: span 2; }
.tile--3 { grid-column: span 3; }
.tile--4 { grid-column: span 4; }
.tile--dark { background: linear-gradient(140deg, var(--ink) 0%, #0e3d22 100%); border: 0; color: #fff; justify-content: center; padding: 34px; }
.tile--dark h3 { color: #fff; font-size: 1.5rem; }
.tile--dark p { color: #c8e6d9; }
.tile--dark .big { font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 800; color: var(--brand); letter-spacing: -.03em; line-height: 1; margin-bottom: 10px; }
@media (max-width: 960px) { .bento { grid-template-columns: 1fr 1fr; } .tile--2, .tile--3, .tile--4 { grid-column: span 2; } .tile--4 { display: flex; flex-direction: column; } }

/* Giant footer wordmark */
.mega { overflow: hidden; background: var(--ink); padding: 30px 0 0; line-height: .8; }
.mega .mega-track { display: flex; gap: 40px; width: max-content; animation: scroll 30s linear infinite; }
.mega span {
  font-size: clamp(90px, 16vw, 210px); font-weight: 900; letter-spacing: -.04em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(0,255,0,.28);
}

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hero::after, .marquee-track, .mega .mega-track, .type-cursor { animation: none; }
}

/* ============ v4: dark mode + hero demo + logo ============ */

.logo-img { width: 30px; height: 30px; flex: none; }
.logo img { display: inline-block; }

/* Theme toggle */
.theme-toggle {
  background: none; border: 1.5px solid var(--line); border-radius: 999px;
  width: 38px; height: 38px; cursor: pointer; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
  transition: border-color .15s, color .15s, transform .3s;
}
.theme-toggle:hover { border-color: var(--ink-3); color: var(--ink); transform: rotate(20deg); }

/* Dark theme */
html[data-theme="dark"] {
  --paper: #0a0f0d; --paper-2: #101713;
  --ink: #f2f7f4; --ink-2: #b9c6c0; --ink-3: #8fa39a;
  --line: #21302a;
  --brand-dark: #00e070; --brand-darker: #00d060;
  --brand-tint: #0f2417; --brand-tint-2: #1a3d28;
  --shadow: 0 4px 24px rgba(0,0,0,.45); --shadow-lg: 0 12px 48px rgba(0,0,0,.6);
}
html[data-theme="dark"] body { background: var(--paper); }
html[data-theme="dark"] .header { background: rgba(10,15,13,.9); }
html[data-theme="dark"] .header.pill { background: rgba(16,23,19,.86); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .plan,
html[data-theme="dark"] .tile:not(.tile--dark),
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .logostrip,
html[data-theme="dark"] .btn--ghost { background: var(--paper-2); }
html[data-theme="dark"] .btn--ghost { color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .sticky-cta { background: rgba(10,15,13,.94); }
html[data-theme="dark"] .switch { background: var(--line); }
html[data-theme="dark"] .logostrip img { filter: grayscale(1) invert(1); opacity: .6; }
html[data-theme="dark"] .hero::after { background: radial-gradient(circle, rgba(0,255,0,.09) 0%, transparent 65%); }
html[data-theme="dark"] .footer { background: #060a08; }
html[data-theme="dark"] .mega { background: #060a08; }

/* Split hero with live demo */
.hero-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; text-align: left; }
.hero-split h1 { margin-left: 0; }
.hero-split .sub { margin-left: 0; }
.hero-split .hero-proof { justify-content: flex-start; }
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-split .hero-proof { justify-content: center; }
}

/* Before/after slider (shared) */
.baslider { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); touch-action: none; user-select: none; aspect-ratio: 1; max-width: 520px; margin: 0 auto; }
.baslider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.baslider .after-wrap { position: absolute; inset: 0; overflow: hidden; }
.baslider .handle { position: absolute; top: 0; bottom: 0; width: 4px; background: #fff; box-shadow: 0 0 14px rgba(0,0,0,.4); cursor: ew-resize; }
.baslider .handle::after { content: "◂ ▸"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--brand); color: var(--brand-ink); font-size: .8rem; font-weight: 800; padding: 8px 10px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.ba-tagl { position: absolute; top: 14px; font-size: .75rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; z-index: 2; }
.ba-tagl.b { left: 14px; background: rgba(11,21,18,.8); color: #fff; }
.ba-tagl.a { right: 14px; background: var(--brand); color: var(--brand-ink); }

/* Floating proof chip on the demo */
.float-chip {
  position: absolute; bottom: 18px; left: 18px; z-index: 3;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); color: var(--brand-ink);
  border-radius: 14px; padding: 10px 16px; font-weight: 800; font-size: .9rem;
  box-shadow: 0 8px 30px rgba(11,21,18,.25); animation: floaty 4s ease-in-out infinite alternate;
}
.float-chip b { color: #00803c; }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .float-chip { animation: none; } }

/* ============ v5: scrollytelling + progress bar ============ */

.progressbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--brand); z-index: 200; transition: width .08s linear; }

.scrolly { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.scrolly-media {
  position: sticky; top: 100px; height: min(72vh, 560px);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.scrolly-media { background: var(--paper-2); }
.scrolly-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(1.04); transition: opacity .6s ease, transform .8s ease;
}
.scrolly-media img.active { opacity: 1; transform: scale(1); }
.scrolly-media .stage {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: rgba(11,21,18,.8); color: #fff; font-size: .78rem; font-weight: 800;
  padding: 5px 13px; border-radius: 999px; backdrop-filter: blur(6px);
}
.sstep { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .4s ease; }
.sstep.active { opacity: 1; }
.sstep .snum { font-size: .82rem; font-weight: 800; letter-spacing: .1em; color: var(--brand-dark); text-transform: uppercase; margin-bottom: 10px; }
.sstep h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 12px; }
.sstep p { color: var(--ink-2); font-size: 1.1rem; }
.sstep .btn { align-self: flex-start; margin-top: 22px; }
@media (max-width: 860px) {
  .scrolly { grid-template-columns: 1fr; gap: 0; }
  .scrolly-media { top: 76px; height: 46vh; z-index: 5; }
  .sstep { min-height: 60vh; justify-content: flex-end; padding-bottom: 8vh; }
}


/* v6: modern how-it-works steps */
.step { position: relative; }
.step-ico {
  width: 58px; height: 58px; border-radius: 18px; margin-bottom: 18px; position: relative;
  background: linear-gradient(135deg, var(--brand) 0%, #7dffab 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,200,80,.3);
}
.step-ico svg { width: 28px; height: 28px; color: var(--brand-ink); }
.step-ico .n {
  position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: var(--brand); font-size: .74rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--paper);
}
.step { border-top: 3px solid transparent; }
.card.step:hover { border-color: var(--line); }
.steps-line { position: relative; }
html[data-theme="dark"] .step-ico { box-shadow: 0 8px 22px rgba(0,255,0,.15); }


/* v7: sequential step animation (grey -> brand as you scroll) */
.steps .step { opacity: 0; transform: translateY(26px); filter: grayscale(1); }
.steps .step.go {
  opacity: 1; transform: none; filter: grayscale(0);
  transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1), filter .9s ease;
}
.steps .step.go .step-ico { animation: stepPop .55s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes stepPop { 0% { transform: scale(.6); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
.steps .step.go .step-ico::after {
  content: ""; position: absolute; inset: -6px; border-radius: 22px;
  border: 2px solid rgba(0,255,0,.5); animation: stepRing 1s ease-out .3s both;
}
@keyframes stepRing { from { opacity: 1; transform: scale(.85); } to { opacity: 0; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) {
  .steps .step { opacity: 1; transform: none; filter: none; }
  .steps .step.go .step-ico, .steps .step.go .step-ico::after { animation: none; }
}
