/* Ventaurio site — one stylesheet, zero external requests.
   Palette is lifted verbatim from lib/core/theme/app_colors.dart so the site
   and the product are literally the same colours; the hero gradient echoes the
   app icon (a counter-flow heat exchanger: warm stream crossing cool). */

:root {
  /* AppColors.light() */
  --bg: #f6f7fb;
  --card: #ffffff;
  --surface: rgba(255, 255, 255, 0.74);
  --line: #e6e8f0;
  --text: #171b26;
  --text-dim: #4c5265;
  --text-mute: #8b90a0;
  --brand: #2e5bff;
  --brand-soft: #e7edff;
  --success: #1db954;
  --warning: #f5a623;
  --warm: #f07c4a;
  --cool: #3aa6dd;
  --fresh: #2bb8a3;
  --stale: #9a8fe8;

  /* icon gradient */
  --icon-top: #2a7f95;
  --icon-bottom: #0b3b52;

  --shadow: 0 1px 2px rgba(16, 24, 48, 0.06), 0 10px 32px rgba(16, 24, 48, 0.08);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* AppColors.dark() */
    --bg: #0f1116;
    --card: #181b22;
    --surface: rgba(31, 35, 44, 0.66);
    --line: #272b36;
    --text: #f2f3f7;
    --text-dim: #b4b9c9;
    --text-mute: #787e92;
    --brand: #6c8cff;
    --brand-soft: #1f2a4d;
    --success: #34d26e;
    --warning: #ffb84d;
    --warm: #ff9a6b;
    --cool: #5cc1f0;
    --fresh: #43d6bf;
    --stale: #b0a6f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 14px 44px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── ambient background: the icon's two streams, slowed right down ──
   Two things fight banding here. The gradients carry extra intermediate stops
   with an eased alpha falloff, because a two-stop radial spread over half the
   viewport quantises into visible rings in 8-bit colour. On top sits a faint
   noise layer: dithering is the only real cure for banding, and 3% turbulence
   is invisible as texture while breaking the rings up completely. */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* No blur filter: the multi-stop gradient is already smooth, and blurring it
   just re-quantises to 8 bits a second time — which is where the rings came
   from in the first place. */
.ambient i { position: absolute; border-radius: 50%; opacity: 0.42; animation: drift 28s ease-in-out infinite alternate; }
.ambient i:nth-child(1) {
  width: 52vw; height: 52vw; top: -16vw; left: -12vw;
  background: radial-gradient(circle closest-side in oklab,
    color-mix(in srgb, var(--icon-top) 100%, transparent) 0%,
    color-mix(in srgb, var(--icon-top) 72%, transparent) 26%,
    color-mix(in srgb, var(--icon-top) 38%, transparent) 48%,
    color-mix(in srgb, var(--icon-top) 14%, transparent) 68%,
    color-mix(in srgb, var(--icon-top) 0%, transparent) 100%);
}
.ambient i:nth-child(2) {
  width: 44vw; height: 44vw; top: 26vh; right: -14vw; animation-delay: -14s; opacity: 0.3;
  background: radial-gradient(circle closest-side in oklab,
    color-mix(in srgb, var(--warm) 100%, transparent) 0%,
    color-mix(in srgb, var(--warm) 70%, transparent) 28%,
    color-mix(in srgb, var(--warm) 34%, transparent) 52%,
    color-mix(in srgb, var(--warm) 12%, transparent) 72%,
    color-mix(in srgb, var(--warm) 0%, transparent) 100%);
}
.ambient i:nth-child(3) {
  width: 38vw; height: 38vw; bottom: -10vw; left: 20vw; animation-delay: -7s; opacity: 0.26;
  background: radial-gradient(circle closest-side in oklab,
    color-mix(in srgb, var(--brand) 100%, transparent) 0%,
    color-mix(in srgb, var(--brand) 68%, transparent) 30%,
    color-mix(in srgb, var(--brand) 32%, transparent) 55%,
    color-mix(in srgb, var(--brand) 10%, transparent) 75%,
    color-mix(in srgb, var(--brand) 0%, transparent) 100%);
}
/* Dither layer — inline SVG turbulence, no request, no image asset. */
.ambient::after {
  content: "";
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.055;
  mix-blend-mode: overlay;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) { .ambient::after { opacity: 0.085; } }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 5vh, 0) scale(1.16); }
}

.wrap { max-width: 980px; margin: 0 auto; padding: 0 1.35rem; }

/* ── header ─────────────────────────────────────────────── */
header { position: sticky; top: 0; z-index: 20; padding: 1rem 0; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s, padding .25s; }
header.stuck { padding: .6rem 0; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(180%) blur(14px); border-bottom-color: var(--line); }
header .wrap { display: flex; align-items: center; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; text-decoration: none; color: var(--text); }
.logo svg { width: 28px; height: 28px; border-radius: 8px; flex: none; }
nav { margin-left: auto; display: flex; gap: 1.4rem; align-items: center; }
nav a { color: var(--text-dim); text-decoration: none; font-size: .93rem; transition: color .15s; }
nav a:hover { color: var(--text); }
@media (max-width: 640px) { nav a.hide-sm { display: none; } }
.langs { display: inline-flex; gap: .1rem; border: 1px solid var(--line); border-radius: 999px; padding: .12rem; background: var(--surface); }
.langs .lang { padding: .18rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--text-mute); }
.langs .lang.on { background: var(--brand); color: #fff; }
.langs .lang:hover { color: var(--text); }
.langs .lang.on:hover { color: #fff; }

/* ── hero ───────────────────────────────────────────────── */
.hero { padding: 4.5rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
@media (min-width: 820px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }

.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .34rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(8px); color: var(--text-dim); font-size: .82rem; font-weight: 600; margin-bottom: 1.4rem; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

h1 { font-size: clamp(2.05rem, 5.6vw, 3.35rem); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 1.1rem; }
h1 .grad { background: linear-gradient(100deg, var(--warm), var(--cool)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.14rem; color: var(--text-dim); margin: 0 0 2rem; max-width: 34em; }

.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .72rem 1.3rem; border-radius: 12px; font-weight: 600; font-size: .95rem; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { transform: translateY(-2px); }

/* app icon showpiece */
.hero-art { display: grid; place-items: center; }
.hero-art img { width: min(260px, 62vw); height: auto; aspect-ratio: 1; border-radius: 23%; box-shadow: var(--shadow); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }

/* ── stat strip ─────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 1rem; margin-top: 3rem; }
.stat { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(10px); }
.stat b { display: block; font-size: 1.85rem; letter-spacing: -.03em; line-height: 1.1; }
.stat span { color: var(--text-dim); font-size: .87rem; }
.stat:nth-child(1) b { color: var(--warm); }
.stat:nth-child(2) b { color: var(--brand); }
.stat:nth-child(3) b { color: var(--cool); }
.stat:nth-child(4) b { color: var(--fresh); }

/* ── sections ───────────────────────────────────────────── */
section { padding: 3.5rem 0; }
section > .wrap > h2 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); letter-spacing: -.03em; margin: 0 0 .6rem; }
.section-lead { color: var(--text-dim); margin: 0 0 2rem; max-width: 34em; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--surface); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: .85rem; background: color-mix(in srgb, var(--brand) 13%, transparent); color: var(--brand); }
.card.warm .ico { background: color-mix(in srgb, var(--warm) 15%, transparent); color: var(--warm); }
.card.cool .ico { background: color-mix(in srgb, var(--cool) 15%, transparent); color: var(--cool); }
.card.fresh .ico { background: color-mix(in srgb, var(--fresh) 15%, transparent); color: var(--fresh); }
.card .ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 .35rem; font-size: 1.02rem; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--text-dim); font-size: .94rem; }

/* ── brand marquee ──────────────────────────────────────── */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: .6rem; width: max-content; animation: slide 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%) } }
.brand { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; color: var(--text-dim); background: var(--surface); white-space: nowrap; }

/* ── pricing ────────────────────────────────────────────── */
.tiers { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: var(--surface); backdrop-filter: blur(10px); position: relative; }
.tier.featured { border-color: color-mix(in srgb, var(--brand) 55%, transparent); }
.tier .tag { position: absolute; top: -10px; right: 1.2rem; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.tier h3 { margin: 0; font-size: 1rem; color: var(--text-dim); font-weight: 600; }
.tier .price { font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; margin: .25rem 0 1rem; }
.tier .price small { font-size: .88rem; font-weight: 500; color: var(--text-mute); }
.tier ul { margin: 0; padding: 0; list-style: none; color: var(--text-dim); font-size: .94rem; }
.tier li { margin: .45rem 0; padding-left: 1.4rem; position: relative; }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* ── faq ────────────────────────────────────────────────── */
details { border: 1px solid var(--line); border-radius: 14px; padding: .95rem 1.15rem; margin-bottom: .6rem; background: var(--surface); backdrop-filter: blur(10px); }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .6rem; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; color: var(--brand); font-weight: 700; width: 1em; }
details[open] summary::before { content: "−"; }
details p { color: var(--text-dim); margin: .75rem 0 0; }

/* ── prose (privacy / support) ──────────────────────────── */
.prose { padding: 3rem 0 1rem; max-width: 720px; }
.prose h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); letter-spacing: -.03em; }
.prose h2 { font-size: 1.14rem; margin-top: 2.3rem; letter-spacing: -.01em; }
.prose li { margin: .45rem 0; }
.prose a { color: var(--brand); }
.updated { color: var(--text-mute); font-size: .9rem; }

/* ── footer ─────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; margin-top: 3rem; color: var(--text-mute); font-size: .88rem; }
footer a { color: var(--text-dim); text-decoration: none; }
footer a:hover { color: var(--text); }
.foot-brand { color: var(--text-dim); }
.foot-top { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
.foot-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.legal { margin-top: 1.6rem; line-height: 1.75; }
.disclaimer { margin-top: 1.2rem; font-size: .84rem; }

/* ── scroll reveal ──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .07s }
.reveal[data-d="2"] { transition-delay: .14s }
.reveal[data-d="3"] { transition-delay: .21s }

/* Respect the setting — vestibular disorders are not a style preference. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ambient i, .marquee-track, .pill .dot, .hero-art img { animation: none; }
  .card:hover, .btn:hover { transform: none; }
}
