/* =====================================================================
   AnyGPT landing page  |  anygpt.ir
   Vanilla CSS, RTL-first, dark/light. All assets self-hosted.
   Design: teal signature accent, Yekan Bakh display + IRANSansX body.
   ===================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Tokens ---------- */
:root {
  --font-display: "Yekan Bakh", "IRANSansX", system-ui, sans-serif;
  --font-body: "IRANSansX", "Yekan Bakh", system-ui, sans-serif;

  --r-card: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 999px;

  --wrap: 1200px;
  --pad-y: clamp(3rem, 5.5vw, 5rem);
  --gap: clamp(1rem, 2vw, 1.5rem);

  /* vertical identity hues (per-assistant, not the page accent) */
  --legal: #3b82f6;
  --code: #8b5cf6;
  --pet: #f5a524;
  --sport: #29c17e;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* Dark (default) */
:root, [data-theme="dark"] {
  --bg: #0b0f10;
  --bg-2: #0e1517;
  --surface: #12191b;
  --surface-2: #182124;
  --surface-3: #1e292c;
  --border: rgba(255,255,255,.09);
  --border-2: rgba(255,255,255,.14);
  --text: #e9efee;
  --text-2: #c3cecc;
  --muted: #90a09d;
  --accent: #2dd4bf;
  --accent-2: #34e3cd;
  --accent-strong: #14b8a6;
  --accent-ink: #04130f;
  --accent-soft: rgba(45,212,191,.14);
  --accent-line: rgba(45,212,191,.30);
  --shadow: 0 24px 60px -20px rgba(0,0,0,.6);
  --shadow-sm: 0 10px 30px -12px rgba(0,0,0,.55);
  --grain-opacity: .04;
}

/* Light */
[data-theme="light"] {
  --bg: #f4f7f6;
  --bg-2: #eef3f2;
  --surface: #ffffff;
  --surface-2: #f4f8f7;
  --surface-3: #eaf1ef;
  --border: rgba(8,30,28,.10);
  --border-2: rgba(8,30,28,.16);
  --text: #0c1a18;
  --text-2: #2b3a37;
  --muted: #56655f;
  --accent: #0c8577;
  --accent-2: #0f9e8e;
  --accent-strong: #0a6f63;
  --accent-ink: #ffffff;
  --accent-soft: rgba(12,133,119,.10);
  --accent-line: rgba(12,133,119,.28);
  --shadow: 0 26px 60px -26px rgba(15,55,50,.28);
  --shadow-sm: 0 12px 30px -16px rgba(15,55,50,.22);
  --grain-opacity: .03;
}

html { background: var(--bg); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: clamp(15px, 1.1vw, 16.5px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* number-heavy display bits */
b, strong { font-weight: 700; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.section { padding-block: var(--pad-y); position: relative; }

.sec-head { max-width: 62ch; margin-inline: auto; text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head--start { margin-inline: 0; text-align: start; }
.sec-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.sec-lead { color: var(--muted); margin-top: .9rem; font-size: clamp(1rem, 1.4vw, 1.12rem); }

.ic { width: 1.25em; height: 1.25em; stroke-width: 1.75; flex: none; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===================================================================
   Buttons / chips
   =================================================================== */
.btn {
  --_bg: transparent;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .74rem 1.35rem; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 700; font-size: .98rem;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.btn .ic { width: 1.15em; height: 1.15em; }
.btn--lg { padding: .95rem 1.7rem; font-size: 1.05rem; }
.btn--block { width: 100%; justify-content: center; }
.btn--primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent-strong));
  color: var(--accent-ink);
  box-shadow: 0 10px 26px -10px var(--accent-line), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px var(--accent-line), inset 0 1px 0 rgba(255,255,255,.32); }
.btn--primary:active { transform: translateY(0) scale(.98); }
.btn--primary .ic { transition: transform .25s var(--ease); }
.btn--primary:hover .ic { transform: translateX(-4px); }   /* RTL: arrow points left */
.btn--ghost {
  background: var(--surface); color: var(--text);
  border-color: var(--border-2);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--surface-2); }
.btn--ghost:active { transform: translateY(0) scale(.98); }

.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .85rem; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border-2);
  font-size: .85rem; font-weight: 600; color: var(--text-2);
}
.chip .ic { width: 1.05em; height: 1.05em; color: var(--accent); }
.chip--brand { color: var(--text); background: var(--accent-soft); border-color: var(--accent-line); }
.chip__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ===================================================================
   Navigation
   =================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 1.2rem; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent-strong)); color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.brand__mark .ic { width: 20px; height: 20px; }
.brand__word { font-size: 1.28rem; font-weight: 700; letter-spacing: -.02em; }
.brand__word b { color: var(--accent); font-weight: 800; }

.nav__links { display: flex; gap: .3rem; margin-inline-start: auto; }
.nav__links a {
  padding: .5rem .8rem; border-radius: var(--r-pill); font-weight: 600; font-size: .95rem; color: var(--text-2);
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }

.nav__actions { display: flex; align-items: center; gap: .55rem; margin-inline-start: .2rem; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  transition: background .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent-line); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ic { width: 20px; height: 20px; }

/* theme toggle icon swap */
.ic--moon { display: none; }
[data-theme="light"] .ic--sun { display: none; }
[data-theme="light"] .ic--moon { display: block; }

.nav__burger { display: none; }

.mnav {
  display: flex; flex-direction: column; gap: .2rem; padding: .6rem clamp(1.1rem,4vw,2rem) 1.1rem;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.mnav[hidden] { display: none; }
.mnav a { padding: .7rem .6rem; border-radius: 12px; font-weight: 600; color: var(--text-2); }
.mnav a:hover { background: var(--surface-2); color: var(--text); }
.mnav .btn { margin-top: .4rem; }

/* ===================================================================
   Hero
   =================================================================== */
.hero { position: relative; overflow: hidden; padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.hero__inner {
  display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: clamp(2rem, 4vw, 4rem);
  min-height: min(84vh, 760px);
}
.hero__copy { position: relative; z-index: 2; }
.hero__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.95rem, 4.1vw, 3.15rem); line-height: 1.18; letter-spacing: -.02em;
  margin: 1.1rem 0 1.1rem; text-wrap: balance;
}
.hero__title em {
  font-style: normal; position: relative; color: var(--accent);
  white-space: nowrap;
}
.hero__title em::after {
  content: ""; position: absolute; inset-inline: -.05em; bottom: .06em; height: .16em;
  background: var(--accent-soft); border-radius: 4px; z-index: -1;
}
.reveal-line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__sub { color: var(--text-2); font-size: clamp(1.02rem, 1.5vw, 1.2rem); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }

.hero__stats { display: flex; gap: clamp(1rem, 3vw, 2.4rem); margin-top: 2.2rem; flex-wrap: wrap; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats b { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; color: var(--text); line-height: 1.1; }
.hero__stats span { color: var(--muted); font-size: .85rem; }

/* hero background */
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(to right, var(--border) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 62%);
          mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 62%);
  opacity: .5;
}
.orb { position: absolute; border-radius: 50%; filter: blur(52px); opacity: .5; }
.orb--1 { width: 40vw; height: 40vw; max-width: 460px; max-height: 460px; inset-inline-start: -8%; top: -12%; background: radial-gradient(circle, var(--accent) 0%, transparent 68%); opacity: .28; }
.orb--2 { width: 34vw; height: 34vw; max-width: 400px; max-height: 400px; inset-inline-end: -6%; top: 6%; background: radial-gradient(circle, var(--legal) 0%, transparent 68%); opacity: .18; }
.orb--3 { width: 30vw; height: 30vw; max-width: 360px; max-height: 360px; inset-inline-start: 30%; bottom: -18%; background: radial-gradient(circle, var(--sport) 0%, transparent 68%); opacity: .14; }

/* hero demo card (real mini chat) */
.hero__demo { position: relative; z-index: 2; }
.hero__demo-glow {
  position: absolute; inset: 8% 6%; z-index: -1; border-radius: 40px; filter: blur(46px); opacity: .5;
  background: radial-gradient(circle at 30% 20%, var(--accent) 0%, transparent 60%), radial-gradient(circle at 80% 90%, var(--legal) 0%, transparent 60%);
}
.chat {
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  border: 1px solid var(--border-2); border-radius: var(--r-card);
  box-shadow: var(--shadow); overflow: hidden;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.chat__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.chat__title { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 700; font-size: .95rem; }
.chat__title .ic { color: var(--accent); }
.chat__tag { font-size: .72rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: .2rem .6rem; border-radius: var(--r-pill); }
.chat__body { padding: 1.1rem; display: flex; flex-direction: column; gap: .8rem; min-height: 230px; }
.msg { max-width: 88%; }
.msg p { padding: .7rem .95rem; border-radius: 16px; font-size: .93rem; line-height: 1.75; }
.msg--user { align-self: flex-start; }
.msg--user p { background: var(--surface-3); border: 1px solid var(--border); border-start-start-radius: 6px; }
.msg--bot { align-self: flex-end; }
.msg--bot .msg__content p { background: var(--accent-soft); border: 1px solid var(--accent-line); border-start-end-radius: 6px; }
.msg__content { display: flex; flex-direction: column; gap: .5rem; }

.typing { display: inline-flex; gap: .28rem; padding: .8rem .95rem; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 16px; border-start-end-radius: 6px; }
.typing span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); opacity: .5; animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .18s; }
.typing span:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%,60%,100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.cite {
  display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start;
  padding: .4rem .7rem; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border-2);
  font-size: .82rem; font-weight: 600; color: var(--text-2);
  transition: border-color .2s, color .2s;
}
.cite:hover { border-color: var(--accent-line); color: var(--text); }
.cite .ic { color: var(--accent); width: 1em; height: 1em; }
.cite__date { font-size: .74rem; color: var(--muted); }

.chat__input {
  display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem;
  border-top: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: .86rem;
}
.chat__input span { flex: 1; }
.chat__send { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
.chat__send .ic { width: 18px; height: 18px; }

/* ===================================================================
   Marquee band
   =================================================================== */
.marquee-band {
  display: flex; align-items: center; gap: 1.4rem; padding-block: 1.4rem;
  border-block: 1px solid var(--border); background: var(--bg-2); overflow: hidden;
}
.marquee-band__label {
  flex: none; font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--muted);
  padding-inline-start: clamp(1.1rem,4vw,2rem);
}
.marquee { flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: inline-flex; align-items: center; gap: 1.2rem; white-space: nowrap; will-change: transform; }
.marquee__track span { font-weight: 600; color: var(--text-2); font-size: .95rem; }
.marquee__track .sep { color: var(--accent); font-weight: 700; }

/* ===================================================================
   Assistants bento
   =================================================================== */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); grid-auto-rows: auto; }
.tile {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: clamp(1.3rem, 2.4vw, 2rem); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
  transform-style: preserve-3d;
}
.tile:hover { border-color: var(--border-2); }
.tile__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.tile h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.tile p { color: var(--muted); font-size: .98rem; }
.medallion {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; flex: none;
  color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}
.medallion .ic { width: 26px; height: 26px; }
.medallion--legal { background: linear-gradient(180deg, color-mix(in oklab, var(--legal) 90%, #fff), var(--legal)); }
.medallion--code { background: linear-gradient(180deg, color-mix(in oklab, var(--code) 90%, #fff), var(--code)); }
.medallion--pet { background: linear-gradient(180deg, color-mix(in oklab, var(--pet) 90%, #fff), var(--pet)); }
.medallion--sport { background: linear-gradient(180deg, color-mix(in oklab, var(--sport) 90%, #fff), var(--sport)); }
.medallion--open { background: linear-gradient(180deg, var(--accent-2), var(--accent-strong)); color: var(--accent-ink); }

.tile__list { margin-top: 1.1rem; display: grid; gap: .55rem; }
.tile__list li { display: flex; align-items: center; gap: .6rem; color: var(--text-2); font-size: .95rem; }
.tile__list .ic { color: var(--accent); width: 1.15em; height: 1.15em; }
.tile--wide .tile__list { grid-template-columns: 1fr 1fr; margin-top: auto; padding-top: 1.2rem; }

.tile__aura {
  position: absolute; inset-inline-end: -30%; top: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%;
  filter: blur(50px); opacity: .16; pointer-events: none; transition: opacity .35s;
}
.tile--legal .tile__aura { background: var(--legal); }
.tile--code .tile__aura { background: var(--code); }
.tile--pet .tile__aura { background: var(--pet); }
.tile--sport .tile__aura { background: var(--sport); }
.tile:hover .tile__aura { opacity: .28; }

.tile--open {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: start; gap: .5rem;
  background: linear-gradient(120deg, var(--accent-soft), transparent 60%), var(--surface);
  border-style: dashed; border-color: var(--accent-line);
}
.tile--open h3 { margin-top: .3rem; }

/* ===================================================================
   How it works (pinned)
   =================================================================== */
.how { padding: 0; }
.how__sticky { padding-block: var(--pad-y); }
.how__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; width: 100%; }
.how__text .sec-title { margin-top: 1rem; }
.how__text .sec-lead { margin-bottom: 2rem; }
.how__steps { display: grid; gap: .4rem; }
.how__step {
  display: flex; gap: 1rem; padding: 1.1rem 1.1rem; border-radius: var(--r-md);
  border: 1px solid transparent; transition: background .35s var(--ease), border-color .35s var(--ease), opacity .35s;
}
/* dim only when JS-driven motion is active; full-visible fallback otherwise */
html.anim .how__step { opacity: .5; }
html.anim .how__step.is-active { opacity: 1; }
.how__step.is-active { background: var(--surface); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.how__num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--muted); transition: all .35s var(--ease);
}
.how__step.is-active .how__num { background: linear-gradient(180deg, var(--accent-2), var(--accent-strong)); color: var(--accent-ink); border-color: transparent; }
.how__num .ic { width: 22px; height: 22px; }
.how__step h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.how__step p { color: var(--muted); font-size: .95rem; margin-top: .15rem; }

/* how visual */
.how__viz {
  position: relative; min-height: 380px; border-radius: var(--r-card);
  background: radial-gradient(120% 120% at 80% 0%, var(--accent-soft), transparent 55%), var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); padding: 1.4rem; overflow: hidden;
}
.viz-card {
  position: absolute; inset-inline: 1.4rem; padding: 1.1rem 1.2rem; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow-sm);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.viz-card--q { top: 1.4rem; }
.viz-card--search { top: 42%; transform: translateY(-50%); }
.viz-card--a { bottom: 1.4rem; }
/* JS-driven reveal; without motion all three stay visible */
html.anim .viz-card { opacity: 0; transform: translateY(16px) scale(.98); }
html.anim .viz-card--search { transform: translateY(-50%) scale(.98); }
html.anim .viz-card.is-show { opacity: 1; transform: translateY(0) scale(1); }
html.anim .viz-card--search.is-show { transform: translateY(-50%) scale(1); }
.viz-card__k { font-size: .74rem; font-weight: 700; color: var(--accent); text-transform: none; }
.viz-card p { margin-top: .4rem; font-size: .95rem; color: var(--text); }
.viz-rows { display: grid; gap: .5rem; margin: .8rem 0; }
.viz-rows span { height: .6rem; border-radius: 4px; background: var(--surface-3); overflow: hidden; position: relative; }
.viz-rows span::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent-line); animation: scan 1.4s infinite var(--ease); }
.viz-rows span:nth-child(2)::after { animation-delay: .2s; }
.viz-rows span:nth-child(3)::after { animation-delay: .4s; width: 30%; }
@keyframes scan { 0% { transform: translateX(120%); } 100% { transform: translateX(-260%); } }
.viz-source { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; color: var(--text-2); }
.viz-source .ic { color: var(--accent); }
.viz-card--a .cite { margin-top: .7rem; }

.how__progress { position: absolute; inset-inline: 1.4rem; bottom: .7rem; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.how__progress span { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: linear-gradient(90deg, var(--accent-strong), var(--accent-2)); border-radius: 4px; }

/* ===================================================================
   Features grouped
   =================================================================== */
.feat-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.feat-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: clamp(1.3rem, 2.2vw, 1.9rem); box-shadow: var(--shadow-sm);
}
.feat-group__k { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.feat-group__k .ic { color: var(--accent); }
.feat-group ul { margin-top: 1.1rem; display: grid; gap: .2rem; }
.feat-group li { padding: .8rem 0; border-top: 1px solid var(--border); }
.feat-group li:first-child { border-top: none; padding-top: 0; }
.feat-group h4 { font-weight: 700; font-size: 1rem; }
.feat-group li p { color: var(--muted); font-size: .92rem; margin-top: .1rem; }

/* ===================================================================
   Trust
   =================================================================== */
.trust { background: var(--bg-2); border-block: 1px solid var(--border); }
.trust__inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.trust__visual { position: relative; display: grid; place-items: center; min-height: 280px; }
.trust__shield {
  position: relative; z-index: 2; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 32px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent-strong)); color: var(--accent-ink);
  box-shadow: 0 24px 50px -18px var(--accent-line), inset 0 1px 0 rgba(255,255,255,.3);
}
.trust__shield .ic { width: 58px; height: 58px; }
.trust__ring { position: absolute; border: 1px solid var(--accent-line); border-radius: 50%; opacity: .6; }
.trust__ring--1 { width: 200px; height: 200px; }
.trust__ring--2 { width: 290px; height: 290px; opacity: .3; }
.trust__body .sec-lead { margin-bottom: 2rem; }
.trust__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.trust__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.2rem; }
.trust__item > .ic { width: 26px; height: 26px; color: var(--accent); margin-bottom: .6rem; }
.trust__item h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.trust__item p { color: var(--muted); font-size: .9rem; margin-top: .3rem; }

/* ===================================================================
   Pricing
   =================================================================== */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: clamp(1.4rem, 2.4vw, 2rem); box-shadow: var(--shadow-sm);
}
.plan--featured {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft), transparent 40%), var(--surface);
  box-shadow: var(--shadow); transform: translateY(-6px);
}
.plan__badge {
  position: absolute; inset-block-start: -.8rem; inset-inline-start: 50%; transform: translateX(50%);
  background: linear-gradient(180deg, var(--accent-2), var(--accent-strong)); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: .78rem; padding: .3rem .9rem; border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}
.plan__name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.plan__price { margin: .7rem 0 .3rem; display: flex; align-items: baseline; gap: .4rem; }
.plan__price b { font-family: var(--font-display); font-weight: 900; font-size: 2rem; letter-spacing: -.01em; }
.plan__price span { color: var(--muted); font-size: .9rem; }
.plan__price--soon {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--accent);
}
.plan__price--soon::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.plan__desc { color: var(--muted); font-size: .92rem; min-height: 2.6em; }
.plan__list { display: grid; gap: .6rem; margin: 1.1rem 0 1.5rem; }
.plan__list li { display: flex; align-items: center; gap: .55rem; font-size: .94rem; color: var(--text-2); }
.plan__list .ic { color: var(--accent); width: 1.1em; height: 1.1em; }
.plan .btn { margin-top: auto; }
.pricing__note { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 1.6rem; }

/* ===================================================================
   FAQ
   =================================================================== */
.faq__inner { max-width: 820px; margin-inline: auto; }
.acc { display: grid; gap: .7rem; margin-top: 2rem; }
.acc__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.acc__item[open] { border-color: var(--border-2); }
.acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.3rem; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
}
.acc summary::-webkit-details-marker { display: none; }
.acc__chev { color: var(--muted); transition: transform .3s var(--ease); }
.acc__item[open] .acc__chev { transform: rotate(180deg); color: var(--accent); }
.acc__panel { padding: 0 1.3rem; overflow: hidden; }
.acc__panel p { color: var(--muted); padding-bottom: 1.2rem; }

/* ===================================================================
   Final CTA
   =================================================================== */
.cta-band { padding-block: var(--pad-y); }
.cta-band__inner {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; border-radius: 32px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-2); box-shadow: var(--shadow);
}
.cta-band__glow { position: absolute; inset: -40% 20% auto; height: 320px; filter: blur(60px); opacity: .5;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%); }
.cta-band h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.7rem, 4vw, 2.8rem); letter-spacing: -.01em; }
.cta-band p { color: var(--muted); margin: .8rem auto 1.8rem; max-width: 40ch; }
.cta-band .btn { position: relative; z-index: 2; }

/* ===================================================================
   Footer
   =================================================================== */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-top: clamp(3rem, 5vw, 4.5rem); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer__brand p { color: var(--muted); font-size: .92rem; margin: 1rem 0 1.2rem; max-width: 32ch; }
.footer__stores { display: flex; gap: .6rem; flex-wrap: wrap; }
.store { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--surface); font-weight: 600; font-size: .88rem; transition: border-color .2s, background .2s; }
.store:hover { border-color: var(--accent-line); background: var(--surface-2); }
.store .ic { width: 1.1em; height: 1.1em; }
.footer__col { display: flex; flex-direction: column; gap: .6rem; }
.footer__col h5 { font-family: var(--font-display); font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.footer__col a { color: var(--muted); font-size: .92rem; display: inline-flex; align-items: center; gap: .5rem; transition: color .2s; }
.footer__col a:hover { color: var(--accent); }
.footer__col a .ic { width: 1.05em; height: 1.05em; }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.4rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .84rem;
}

/* ===================================================================
   Reveal animation states (only when JS+motion active)
   =================================================================== */
html.anim [data-r] { opacity: 0; }
html.anim .reveal-line > span { display: inline-block; transform: translateY(110%); }

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 1024px) {
  .hero__inner { min-height: unset; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav__cta { display: none; }
  .nav__actions { margin-inline-start: auto; }

  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__demo { order: 2; max-width: 480px; }
  .how__inner { grid-template-columns: 1fr; }
  .how__viz { order: -1; min-height: 340px; }
  .trust__inner { grid-template-columns: 1fr; }
  .trust__visual { min-height: 200px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .tile--wide, .tile--open { grid-column: auto; grid-row: auto; }
  .tile--wide .tile__list { grid-template-columns: 1fr; }
  .feat-groups { grid-template-columns: 1fr; }
  .trust__grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan--featured { transform: none; }
  .footer__inner { grid-template-columns: 1fr; }
  .marquee-band { flex-direction: column; align-items: stretch; gap: .8rem; }
  .marquee-band__label { padding-inline: clamp(1.1rem,4vw,2rem); }
}

/* ===================================================================
   Reduced motion
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.anim [data-r] { opacity: 1; }
  html.anim .reveal-line > span { transform: none; }
  .typing span, .viz-rows span::after, .orb { animation: none; }
}
