/* ═══════════════════════════════════════════════════════════════════════
   Fractalogie — premium marketing site
   Cosmic void · gold fractal · violet revelation · Fraunces / Space Grotesk
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --void: #04050c;
  --void-2: #080a16;
  --void-3: #0c0e1d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.14);

  --ink: #f5f2ea;
  --ink-80: rgba(245, 242, 234, 0.82);
  --ink-60: rgba(245, 242, 234, 0.6);
  --ink-40: rgba(245, 242, 234, 0.4);
  --ink-25: rgba(245, 242, 234, 0.25);

  --gold: #e7b765;
  --gold-2: #f2d49b;
  --signal: #6ff5ff;
  --revelation: #a87bff;
  --revelation-2: #c79bff;

  --maxw: 1180px;
  --r: 22px;
  --r-lg: 30px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-2: cubic-bezier(0.65, 0, 0.35, 1);

  --fs-display: 'Fraunces', Georgia, serif;
  --fs-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* overflow-x: clip prevents any horizontal scroll WITHOUT breaking position:sticky
   (unlike hidden/auto, clip doesn't create a scroll container). */
/* overflow-x: clip stops horizontal scroll WITHOUT breaking position:sticky
   (hidden makes html/body a scroll container → kills the sticky showcase). */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { max-width: 100%; overflow-x: clip; }
img, svg, canvas { max-width: 100%; }
::selection { background: rgba(168, 123, 255, 0.35); color: #fff; }

body {
  font-family: var(--fs-body);
  background: var(--void);
  color: var(--ink);
  line-height: 1.6;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Ambient layers ───────────────────────────────────────────────────── */
.bg {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(58% 44% at 80% 4%, rgba(168, 123, 255, 0.18), transparent 70%),
    radial-gradient(50% 40% at 10% 18%, rgba(231, 183, 101, 0.14), transparent 72%),
    radial-gradient(60% 50% at 50% 108%, rgba(111, 245, 255, 0.10), transparent 70%),
    var(--void);
}
#stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.75; }
/* film grain */
.grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.04;
  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='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain { 0%,100%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)} 40%{transform:translate(3%,-4%)} 60%{transform:translate(-3%,2%)} 80%{transform:translate(4%,-3%)} }

/* ── Type ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--fs-display); font-weight: 400; line-height: 1.06; letter-spacing: -0.02em; }
.eyebrow { font-family: var(--fs-mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); opacity: 0.85; }
.italic { font-style: italic; }
.grad { background: linear-gradient(108deg, var(--gold-2), var(--gold) 38%, var(--revelation) 92%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.grad-v { background: linear-gradient(108deg, var(--revelation-2), var(--signal)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
a { color: inherit; text-decoration: none; }

/* ── Layout ───────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: 820px; }
section { position: relative; padding: 110px 0; }
.center { text-align: center; }
.shead { max-width: 60ch; margin: 0 auto 60px; text-align: center; }
.shead .eyebrow { display: inline-block; margin-bottom: 18px; }
.shead h2 { font-size: clamp(32px, 5vw, 54px); margin-bottom: 20px; }
.shead p { color: var(--ink-60); font-size: 18px; }

/* ── Nav ──────────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(4, 5, 12, 0.55);
  border-bottom: 1px solid var(--line);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--fs-display); font-size: 20px; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links > a { font-size: 14.5px; color: var(--ink-60); transition: color 0.2s; position: relative; }
.nav-links > a:hover { color: var(--ink); }
.nav-cta { font-family: var(--fs-mono); font-size: 12px; letter-spacing: 0.04em; padding: 10px 18px; border-radius: 999px; color: var(--void) !important; background: linear-gradient(108deg, var(--gold-2), var(--gold)); font-weight: 600; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -6px rgba(231, 183, 101, 0.6); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 22px; cursor: pointer; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; padding: 16px 28px; border-radius: 999px; font-size: 15px; font-weight: 600; border: 0; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.btn-primary { color: var(--void); background: linear-gradient(108deg, var(--gold-2), var(--gold)); box-shadow: 0 12px 40px -10px rgba(231, 183, 101, 0.65); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -10px rgba(231, 183, 101, 0.75); }
.btn-ghost { color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); }
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.28); }

/* store badges */
.badges { display: flex; gap: 14px; flex-wrap: wrap; }
.store { position: relative; display: inline-flex; align-items: center; gap: 11px; padding: 12px 20px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line-2); transition: transform 0.25s var(--ease), border-color 0.25s; min-width: 190px; }
.store:hover { transform: translateY(-2px); border-color: var(--line-2); }
.store svg { width: 26px; height: 26px; flex-shrink: 0; }
.store .st { display: flex; flex-direction: column; line-height: 1.15; }
.store .st small { font-size: 10px; color: var(--ink-60); letter-spacing: 0.02em; }
.store .st b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.store .soon { position: absolute; top: -9px; right: 12px; font-family: var(--fs-mono); font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--void); background: linear-gradient(108deg, var(--gold-2), var(--gold)); padding: 3px 8px; border-radius: 999px; font-weight: 700; }
.store.dim { opacity: 0.92; cursor: default; }
.store.dim:hover { transform: none; } /* non-clickable "coming soon" — no hover lift */

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding: 70px 0 60px; min-height: calc(100vh - 68px); display: flex; align-items: center; position: relative; }
.hero .wrap { min-width: 0; width: 100%; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: center; width: 100%; }
.hero-grid > * { min-width: 0; }
.hero h1, .hero p.sub { overflow-wrap: break-word; }
.hero .pill { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-family: var(--fs-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-80); }
.hero .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
.hero h1 { font-size: clamp(44px, 6vw, 76px); margin-bottom: 24px; }
.hero p.sub { font-size: clamp(17px, 2vw, 20px); color: var(--ink-60); max-width: 46ch; margin-bottom: 36px; }
.hero-note { margin-top: 18px; font-family: var(--fs-mono); font-size: 11px; letter-spacing: 0.05em; color: var(--ink-40); }

/* hero device */
.hero-device { position: relative; display: flex; justify-content: center; }
.device { position: relative; width: min(330px, 78vw); border-radius: 44px; padding: 11px; background: linear-gradient(160deg, #2a2740, #0c0c16); box-shadow: 0 40px 100px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.06), 0 0 80px -20px rgba(168,123,255,0.35); }
.device::after { content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 120px; height: 26px; background: #07070d; border-radius: 14px; z-index: 3; }
.device img { width: 100%; border-radius: 34px; display: block; }
/* inset:0 (no horizontal overflow) — the "bleed" comes from blur (paint, never
   contributes to layout/scroll width). Avoids horizontal scroll on narrow phones. */
.device-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 50% 42%, rgba(168,123,255,0.42), transparent 72%); filter: blur(46px); }
.float-tag { position: absolute; padding: 10px 14px; border-radius: 14px; background: rgba(10,12,24,0.8); backdrop-filter: blur(10px); border: 1px solid var(--line-2); font-family: var(--fs-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--ink-80); box-shadow: 0 14px 40px -12px rgba(0,0,0,0.6); }
.float-tag .k { color: var(--gold); }
.ft-1 { top: 14%; left: -8%; animation: floaty 6s ease-in-out infinite; }
.ft-2 { bottom: 16%; right: -10%; animation: floaty 7s ease-in-out infinite reverse; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* ── Marquee ──────────────────────────────────────────────────────────── */
.marquee { overflow: hidden; contain: paint; width: 100%; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scrollx 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--fs-display); font-style: italic; font-size: 22px; color: var(--ink-40); white-space: nowrap; display: inline-flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: '✦'; color: var(--gold); font-style: normal; font-size: 12px; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ── Steps ────────────────────────────────────────────────────────────── */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding: 28px 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform 0.3s var(--ease), border-color 0.3s; }
.step:hover { transform: translateY(-5px); border-color: rgba(231,183,101,0.3); }
.step .num { font-family: var(--fs-mono); font-size: 12px; color: var(--gold); letter-spacing: 0.1em; }
.step h3 { font-size: 22px; margin: 16px 0 9px; }
.step p { font-size: 14.5px; color: var(--ink-60); }

/* ── Sticky showcase (scroll-driven) ──────────────────────────────────── */
.showcase { padding: 0; }
.showcase-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.showcase-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; }
.showcase-phone { position: relative; width: min(320px, 74vw); }
.showcase-phone .device { width: 100%; aspect-ratio: 1179 / 2556; }
.showcase-shot img { width: 100%; height: 100%; object-fit: cover; }
.showcase-shot { position: absolute; inset: 11px; border-radius: 34px; overflow: hidden; opacity: 0; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transform: scale(1.04); }
.showcase-shot.on { opacity: 1; transform: scale(1); }
.showcase-shot img { width: 100%; display: block; }
.showcase-steps { padding: 14vh 0; display: flex; flex-direction: column; gap: 14vh; }
.sc-step { opacity: 0.35; transition: opacity 0.4s var(--ease); }
.sc-step.on { opacity: 1; }
.sc-step .idx { font-family: var(--fs-mono); font-size: 12px; letter-spacing: 0.2em; color: var(--gold); }
.sc-step h3 { font-size: clamp(28px, 3.6vw, 40px); margin: 14px 0 14px; }
.sc-step p { color: var(--ink-60); font-size: 17px; max-width: 42ch; }

/* ── Features grid ────────────────────────────────────────────────────── */
.features { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.feature { padding: 30px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s; }
.feature:hover { transform: translateY(-5px); border-color: rgba(231,183,101,0.3); background: var(--surface-2); }
.feature .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px; background: linear-gradient(150deg, rgba(231,183,101,0.2), rgba(168,123,255,0.16)); font-size: 24px; }
.feature h3 { font-size: 23px; margin-bottom: 11px; }
.feature p { font-size: 15px; color: var(--ink-60); }
.feature.span2 { grid-column: span 2; }

/* ── Editorial numbered list (the method) ─────────────────────────────── */
.arc { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 2px; }
.arc-row { display: grid; grid-template-columns: 90px 1fr; gap: 28px; padding: 30px 0; border-top: 1px solid var(--line); align-items: baseline; }
.arc-row:last-child { border-bottom: 1px solid var(--line); }
.arc-row .n { font-family: var(--fs-display); font-size: 40px; color: var(--ink-25); font-style: italic; }
.arc-row h3 { font-size: 27px; margin-bottom: 10px; }
.arc-row p { color: var(--ink-60); font-size: 16px; }

/* ── Split band ───────────────────────────────────────────────────────── */
.band { border-radius: var(--r-lg); padding: 60px; background: linear-gradient(150deg, rgba(168,123,255,0.14), rgba(231,183,101,0.06)); border: 1px solid var(--line); text-align: center; position: relative; overflow: hidden; }
.band h2 { font-size: clamp(30px, 4.4vw, 46px); margin-bottom: 18px; }
.band p { color: var(--ink-60); max-width: 54ch; margin: 0 auto 30px; font-size: 17px; }

/* ── Pricing ──────────────────────────────────────────────────────────── */
.price-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); max-width: 1000px; margin: 0 auto; }
.plan { padding: 38px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.plan.featured { border-color: rgba(231,183,101,0.42); background: linear-gradient(160deg, rgba(231,183,101,0.1), var(--surface)); position: relative; }
.plan .tag { font-family: var(--fs-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.plan .amt { font-family: var(--fs-display); font-size: 54px; margin: 16px 0 2px; }
.plan .amt small { font-size: 16px; color: var(--ink-40); font-family: var(--fs-body); }
.plan .sub { color: var(--ink-40); font-size: 13px; margin-bottom: 4px; }
.plan ul { list-style: none; margin: 24px 0 0; display: grid; gap: 12px; }
.plan li { font-size: 14.5px; color: var(--ink-60); padding-left: 26px; position: relative; }
.plan li::before { content: '◆'; position: absolute; left: 0; color: var(--gold); font-size: 10px; top: 4px; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { max-width: 800px; margin: 0 auto; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; padding: 24px 0; display: flex; justify-content: space-between; gap: 20px; align-items: center; font-size: 19px; font-family: var(--fs-display); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .chev { color: var(--gold); transition: transform 0.3s var(--ease); flex-shrink: 0; font-size: 20px; }
.qa[open] summary .chev { transform: rotate(45deg); }
.qa .a { padding: 0 0 26px; color: var(--ink-60); font-size: 15.5px; max-width: 66ch; }

/* ── Stats ────────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat .v { font-family: var(--fs-display); font-size: clamp(40px, 6vw, 64px); }
.stat .l { font-family: var(--fs-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-40); margin-top: 6px; }

/* ── Final CTA ────────────────────────────────────────────────────────── */
.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(36px, 6vw, 68px); margin-bottom: 22px; }
.cta-final p { color: var(--ink-60); font-size: 18px; max-width: 48ch; margin: 0 auto 36px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer.site { border-top: 1px solid var(--line); padding: 64px 0 44px; }
footer.site .cols { display: flex; justify-content: space-between; gap: 44px; flex-wrap: wrap; }
footer.site .brand { margin-bottom: 16px; }
footer.site p.tg { color: var(--ink-40); font-size: 14px; max-width: 32ch; }
footer.site .fcol h4 { font-family: var(--fs-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 16px; font-weight: 400; }
footer.site .fcol a { display: block; color: var(--ink-60); font-size: 14px; margin-bottom: 11px; transition: color 0.2s; }
footer.site .fcol a:hover { color: var(--gold); }
footer.site .legal { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--ink-25); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── Reveal ───────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d='1'] { transition-delay: 0.09s; }
.reveal[data-d='2'] { transition-delay: 0.18s; }
.reveal[data-d='3'] { transition-delay: 0.27s; }
.reveal[data-d='4'] { transition-delay: 0.36s; }

/* ── Legal doc ────────────────────────────────────────────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.doc h1 { font-size: clamp(34px, 6vw, 52px); margin: 14px 0 8px; }
.doc .meta { color: var(--ink-40); font-family: var(--fs-mono); font-size: 12px; margin-bottom: 36px; }
.doc h2 { font-size: 25px; margin: 40px 0 14px; }
.doc p, .doc li { color: var(--ink-60); font-size: 16px; margin-bottom: 14px; }
.doc ul { padding-left: 22px; margin-bottom: 14px; }
.doc li { margin-bottom: 9px; }
.doc strong { color: var(--ink); }
.doc a { color: var(--gold); }
.doc .callout { border: 1px solid rgba(231,183,101,0.3); background: rgba(231,183,101,0.06); border-radius: 16px; padding: 20px 24px; margin: 20px 0; }
.doc .callout p { color: var(--ink); margin: 0; }
.doc .back { font-family: var(--fs-mono); font-size: 12px; color: var(--ink-40); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  #stars, .grain { display: none; }
  .marquee-track, .ft-1, .ft-2, .hero .pill .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .ft-1, .ft-2 { display: none; } /* decorative tags use negative offsets → hide on mobile */
  .hero { display: block; min-height: 0; padding: 44px 0 60px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 50px; text-align: center; }
  .hero .pill { margin-left: auto; margin-right: auto; }
  .hero p.sub { margin-left: auto; margin-right: auto; }
  .hero .badges { justify-content: center; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature.span2 { grid-column: span 1; }
  .showcase-inner { grid-template-columns: 1fr; }
  .showcase-sticky { position: relative; height: auto; padding: 30px 0; }
  .showcase-steps { padding: 0; gap: 70px; }
  .sc-step { opacity: 1; }
}
@media (max-width: 680px) {
  section { padding: 76px 0; }
  .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0; background: var(--void-2); border-bottom: 1px solid var(--line); padding: 14px 24px 24px; transform: translateY(-130%); transition: transform 0.34s var(--ease); }
  .nav-links.open { transform: none; }
  .nav-links > a { padding: 13px 0; width: 100%; }
  .nav-cta { width: 100%; text-align: center; margin-top: 6px; }
  .nav-toggle { display: block; }
  .steps, .features, .price-grid, .stats { grid-template-columns: 1fr; }
  .band { padding: 40px 24px; }
  .arc-row { grid-template-columns: 56px 1fr; gap: 16px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   SIGNATURE ANIMATIONS — toast, nebula, attractor, fractal zoom/tree,
   reversal, constellation cursor. All mobile-safe, reduced-motion aware.
   ═══════════════════════════════════════════════════════════════════════ */

/* toast (store badges) */
.store.dim { cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px); z-index: 200; background: rgba(12,14,28,0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-2); color: var(--ink); font-family: var(--fs-mono); font-size: 12.5px; letter-spacing: 0.02em; padding: 13px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.35s var(--ease); box-shadow: 0 14px 46px rgba(0,0,0,0.55); max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 7 · living nebula — drifting blobs inside the fixed bg (clipped, no overflow) */
.bg { overflow: hidden; }
.bg::before, .bg::after { content: ''; position: absolute; border-radius: 50%; filter: blur(64px); opacity: 0.5; pointer-events: none; }
.bg::before { width: 52vw; height: 52vw; background: radial-gradient(circle, rgba(168,123,255,0.26), transparent 68%); top: -12%; right: -6%; animation: drift1 28s ease-in-out infinite; }
.bg::after { width: 46vw; height: 46vw; background: radial-gradient(circle, rgba(231,183,101,0.2), transparent 68%); bottom: -14%; left: -8%; animation: drift2 34s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(-7%, 11%) scale(1.16); } }
@keyframes drift2 { 50% { transform: translate(9%, -9%) scale(1.12); } }

/* 6 · constellation cursor (behind content) */
.bg { z-index: -4; }
#stars { z-index: -3; }
#constellation { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.grain { z-index: -1; }

/* 3 · fractal tree — faint brand mark growing behind the hero */
#tree { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.4; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }

/* 1 · strange attractor section */
.attractor-sec { position: relative; min-height: 88vh; display: grid; place-items: center; overflow: hidden; padding: 0; }
#attractor { position: absolute; inset: 0; width: 100%; height: 100%; }
.attractor-copy { position: relative; z-index: 2; text-align: center; padding: 0 24px; }
.attractor-copy::before { content: ''; position: absolute; inset: -45% -34%; z-index: -1; background: radial-gradient(50% 50% at 50% 50%, rgba(4,5,12,0.5), transparent 74%); }
.attractor-copy h2, .attractor-copy p { text-shadow: 0 2px 26px rgba(4,5,12,0.9); }
.attractor-copy h2 { font-size: clamp(32px, 5.2vw, 56px); margin: 16px 0 18px; }
.attractor-copy p { color: var(--ink-70); max-width: 44ch; margin: 0 auto; font-size: 17px; }

/* 2 · fractal zoom (scroll-driven) */
.fzoom { position: relative; height: 260vh; }
.fzoom-sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; }
#fzoom { position: absolute; inset: 0; width: 100%; height: 100%; }
.fzoom-copy { position: relative; z-index: 2; text-align: center; padding: 0 24px; }
.fzoom-copy::before { content: ''; position: absolute; inset: -60% -40%; z-index: -1; background: radial-gradient(50% 50% at 50% 50%, rgba(4,5,12,0.5), transparent 72%); }
.fzoom-copy h2, .fzoom-copy p { text-shadow: 0 2px 26px rgba(4,5,12,0.9); }
.fzoom-copy h2 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 16px; }
.fzoom-copy p { color: var(--ink-70); max-width: 42ch; margin: 0 auto; font-size: 17px; }

/* 5 · the reversal (text swap) */
.reversal-sec .wrap { max-width: 880px; }
.reversal { position: relative; text-align: center; }
.reversal .rev-a, .reversal .rev-b { font-family: var(--fs-display); font-size: clamp(26px, 4.2vw, 46px); line-height: 1.18; letter-spacing: -0.02em; }
.reversal .rev-a { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reversal .rev-b { position: absolute; left: 0; right: 0; top: 0; opacity: 0; transform: translateY(12px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reversal .rev-a.out { opacity: 0; transform: translateY(-12px); }
.reversal .rev-b.in { opacity: 1; transform: translateY(0); }
.reversal em { font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .bg::before, .bg::after { animation: none; }
}
@media (max-width: 680px) {
  .fzoom { height: 200vh; }
  .attractor-sec { min-height: 78vh; }
  #tree { opacity: 0.28; }
}

/* language switcher (re-added for fr/es/de) */
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; font-family: var(--fs-mono); font-size: 12px; color: var(--ink-60); display: flex; align-items: center; gap: 5px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { color: var(--ink); }
.lang ul { position: absolute; right: 0; top: 150%; list-style: none; background: var(--void-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 140px; box-shadow: 0 18px 40px rgba(0,0,0,0.5); z-index: 80; }
.lang li a { display: block; padding: 9px 12px; font-size: 14px; border-radius: 8px; color: var(--ink-60); }
.lang li a:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 680px) { .lang ul { right: auto; left: 0; } }
