/* =========================================================================
   TauState — taustate.app stylesheet
   Palette + type grounded in the app's real design tokens:
   colors derive from the in-app "amethyst" theme (ThemeController.swift),
   display/UI face = SF Rounded (app's AppFonts), data/math face = SF Mono.
   No frameworks. Vanilla CSS, custom properties as the single source of truth.
   ========================================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Surfaces — dark purple-black deepening into amethyst (app theme) */
  --bg:            #0a0410;
  --bg-2:          #15082c;
  --surface:       #1a0b2c;
  --surface-2:     #23103b;
  --screen:        #14001f;   /* app primaryBackground rgb(.08,0,.12) */
  --screen-deep:   #0a000f;   /* app secondaryBackground rgb(.04,0,.06) */

  /* Accents — amethyst family (app accentColor / secondary / text / tertiary) */
  --accent:        #cc4dff;   /* app accentColor rgb(.8,.3,1) */
  --accent-2:      #ff80ff;   /* app accentSecondary rgb(1,.5,1) */
  --accent-soft:   #d18cff;   /* app accentTextColor rgb(.82,.55,1) */
  --accent-3:      #ff0099;   /* app accentTertiary rgb(1,0,.6) — exact */

  /* Ink */
  --ink:           #f4ecfe;
  --ink-soft:      #d2c0e8;
  --muted:         #9b84b6;
  --faint:         #5f4d78;

  /* Lines & glass */
  --line:          rgba(var(--tint-rgb), 0.10);
  --line-strong:   rgba(var(--tint-rgb), 0.18);
  --glass:         rgba(26, 11, 44, 0.55);
  --glass-hi:      rgba(40, 20, 60, 0.6);

  /* RGB triplets for alpha-composited colors (themeable) */
  --accent-rgb: 204, 77, 255;
  --accent-2-rgb: 255, 128, 255;
  --accent-3-rgb: 255, 0, 153;
  --tint-rgb: 216, 180, 255;
  --on-accent: var(--on-accent);

  /* Signature gradient */
  --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 52%, var(--accent-soft) 100%);
  --grad-soft: linear-gradient(120deg, rgba(var(--accent-rgb),.16), rgba(var(--accent-2-rgb),.10) 60%, rgba(var(--accent-3-rgb),.05));

  /* Type */
  --display: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui, -apple-system, sans-serif;
  --body:    -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono:    ui-monospace, "SF Mono", "SFMono-Regular", Menlo, "JetBrains Mono", monospace;

  /* Fluid type scale */
  --fs-eyebrow: 0.78rem;
  --fs-body:    clamp(1.02rem, 0.97rem + 0.35vw, 1.22rem);
  --fs-lead:    clamp(1.25rem, 1.05rem + 1.1vw, 1.9rem);
  --fs-h3:      clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem);
  --fs-h2:      clamp(2.2rem, 1.4rem + 3.4vw, 4.4rem);
  --fs-hero:    clamp(2.9rem, 1.2rem + 7.2vw, 7rem);
  --fs-h1page:  clamp(2.4rem, 1.5rem + 3.4vw, 4.6rem);

  /* Space & radius */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(6rem, 14vh, 12rem);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 36px;
  --r-pill: 999px;

  --shadow-card: 0 24px 60px -28px rgba(0,0,0,0.7), 0 2px 10px -4px rgba(0,0,0,0.6);
  --shadow-device: 0 60px 140px -50px rgba(0,0,0,0.85), 0 24px 60px -40px rgba(var(--accent-rgb),0.16);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}


/* ---------- 1b. App color schemes (exact values from ThemeController.swift) ---------- */
html[data-theme="sapphire"] {
  --bg: #000514; --bg-2: #000d26;
  --surface: #091731; --surface-2: #13233e;
  --screen: #000d26; --screen-deep: #000514;
  --accent: #3380ff; --accent-2: #00ccff; --accent-soft: #73b3ff; --accent-3: #6600cc;
  --accent-rgb: 51, 128, 255; --accent-2-rgb: 0, 204, 255; --accent-3-rgb: 102, 0, 204; --tint-rgb: 174, 211, 255;
  --ink: #e7f2ff; --ink-soft: #b8d8ff; --muted: #7a94b2; --faint: #506175;
  --glass: rgba(9, 23, 49, 0.55); --glass-hi: rgba(19, 35, 62, 0.6);
  --on-accent: #09162b;
}
html[data-theme="petrol"] {
  --bg: #000e12; --bg-2: #001f24;
  --surface: #062a2d; --surface-2: #0e3639;
  --screen: #001f24; --screen-deep: #000e12;
  --accent: #00e0b8; --accent-2: #00b89e; --accent-soft: #26ebc7; --accent-3: #0099b8;
  --accent-rgb: 0, 224, 184; --accent-2-rgb: 0, 184, 158; --accent-3-rgb: 0, 153, 184; --tint-rgb: 129, 243, 223;
  --ink: #d9fbf5; --ink-soft: #90f4e3; --muted: #5aaa9c; --faint: #3b7067;
  --glass: rgba(6, 42, 45, 0.55); --glass-hi: rgba(14, 54, 57, 0.6);
  --on-accent: #00261f;
}
html[data-theme="tanne"] {
  --bg: #000d09; --bg-2: #051f14;
  --surface: #0d2a1d; --surface-2: #163727;
  --screen: #051f14; --screen-deep: #000d09;
  --accent: #33e680; --accent-2: #00b88c; --accent-soft: #59f299; --accent-3: #73f259;
  --accent-rgb: 51, 230, 128; --accent-2-rgb: 0, 184, 140; --accent-3-rgb: 115, 242, 89; --tint-rgb: 159, 247, 196;
  --ink: #e2fded; --ink-soft: #abf8cb; --muted: #6fad89; --faint: #49725a;
  --glass: rgba(13, 42, 29, 0.55); --glass-hi: rgba(22, 55, 39, 0.6);
  --on-accent: #092716;
}
html[data-theme="midnight"] {
  --bg: #000000; --bg-2: #05050a;
  --surface: #120f10; --surface-2: #201b18;
  --screen: #05050a; --screen-deep: #000000;
  --accent: #cc6600; --accent-2: #ff9900; --accent-soft: #ffa838; --accent-3: #993366;
  --accent-rgb: 204, 102, 0; --accent-2-rgb: 255, 153, 0; --accent-3-rgb: 153, 51, 102; --tint-rgb: 255, 205, 140;
  --ink: #fff0dc; --ink-soft: #ffd39a; --muted: #b29062; --faint: #755e40;
  --glass: rgba(18, 15, 16, 0.55); --glass-hi: rgba(32, 27, 24, 0.6);
  --on-accent: #231100;
}
html[data-theme="coffee"] {
  --bg: #140d0a; --bg-2: #261a14;
  --surface: #31241d; --surface-2: #3d3028;
  --screen: #261a14; --screen-deep: #140d0a;
  --accent: #cc804d; --accent-2: #e6b380; --accent-soft: #f5d1a8; --accent-3: #994d33;
  --accent-rgb: 204, 128, 77; --accent-2-rgb: 230, 179, 128; --accent-3-rgb: 153, 77, 51; --tint-rgb: 249, 228, 205;
  --ink: #fdf7f0; --ink-soft: #fae7d3; --muted: #aea090; --faint: #73695e;
  --glass: rgba(49, 36, 29, 0.55); --glass-hi: rgba(61, 48, 40, 0.6);
  --on-accent: #23160d;
}
html[data-theme="bloodmoon"] {
  --bg: #000000; --bg-2: #140000;
  --surface: #200808; --surface-2: #2e1111;
  --screen: #140000; --screen-deep: #000000;
  --accent: #ff0000; --accent-2: #ff6600; --accent-soft: #ff574d; --accent-3: #660033;
  --accent-rgb: 255, 0, 0; --accent-2-rgb: 255, 102, 0; --accent-3-rgb: 102, 0, 51; --tint-rgb: 255, 158, 152;
  --ink: #ffe2e0; --ink-soft: #ffaaa4; --muted: #b26f6a; --faint: #754946;
  --glass: rgba(32, 8, 8, 0.55); --glass-hi: rgba(46, 17, 17, 0.6);
  --on-accent: #2b0000;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(var(--accent-rgb),0.28); color: #fff; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  padding: 0.7rem 1.2rem; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-family: var(--display);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- 3. Layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section--tight { position: relative; padding-block: clamp(4rem, 9vh, 7rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 1.6em; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.04; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.015em; }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); line-height: 1.4; font-weight: 400; }
.text-grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.measure { max-width: 56ch; }

/* ---------- 4. Ambient background (aurora + math glyph field) ---------- */
.ambient { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background: radial-gradient(140% 100% at 50% -10%, var(--bg-2), var(--bg) 60%); }
.ambient__blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; mix-blend-mode: screen; will-change: transform; }
.blob-1 { width: 52vw; height: 52vw; left: -12vw; top: -8vw; background: radial-gradient(circle, rgba(var(--accent-rgb),0.55), transparent 65%); animation: drift1 26s var(--ease) infinite alternate; }
.blob-2 { width: 46vw; height: 46vw; right: -10vw; top: 18vh; background: radial-gradient(circle, rgba(var(--accent-2-rgb),0.42), transparent 66%); animation: drift2 32s var(--ease) infinite alternate; }
.blob-3 { width: 40vw; height: 40vw; left: 30vw; bottom: -14vw; background: radial-gradient(circle, rgba(var(--accent-rgb),0.30), transparent 68%); animation: drift3 38s var(--ease) infinite alternate; }
.ambient__grain { position: absolute; inset: 0; opacity: 0.05; 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='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.aurora-glyphs { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.aurora-glyphs canvas { width: 100%; height: 100%; display: block; }

@keyframes drift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-7vw, -5vh, 0) scale(1.08); } }
@keyframes drift3 { to { transform: translate3d(4vw, -8vh, 0) scale(1.15); } }

/* ---------- 5. Navigation ---------- */
.nav {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s var(--ease), padding .4s var(--ease);
  border-block-end: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10,4,16,0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-block-end-color: var(--line);
  padding-block: 0.7rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-size: 1.15rem; }
.brand__mark {
  width: 30px; height: 30px; flex: none; display: inline-block;
  background: url("/assets/brand/brain-grad-bold.png") center / contain no-repeat;
}
@supports ((-webkit-mask-repeat: no-repeat) or (mask-repeat: no-repeat)) {
  .brand__mark {
    background: var(--grad);
    -webkit-mask: url("/assets/brand/brain-bold.png") center / contain no-repeat;
    mask: url("/assets/brand/brain-bold.png") center / contain no-repeat;
  }
}
.brand__name b { font-weight: 800; }
.nav__links { display: flex; align-items: center; gap: 1.7rem; }
.nav__link { font-size: 0.92rem; color: var(--ink-soft); transition: color .25s var(--ease); position: relative; }
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--grad); }

/* language switcher */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--ink-soft); padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: rgba(255,255,255,0.03);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 15px; height: 15px; }
.lang summary:hover { color: var(--ink); border-color: rgba(var(--accent-rgb),0.5); }
.lang[open] summary { color: var(--ink); border-color: rgba(var(--accent-rgb),0.5); }
.lang__list {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 11rem;
  list-style: none; padding: 0.45rem; z-index: 120;
  background: rgba(16,7,28,0.92); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.lang__list a, .lang__list button {
  display: flex; align-items: center; width: 100%; text-align: left;
  padding: 0.55rem 0.8rem; border-radius: 10px; border: none; background: none; cursor: pointer;
  font-size: 0.92rem; color: var(--ink-soft);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang__list a:hover, .lang__list button:hover { background: rgba(var(--accent-rgb),0.1); color: var(--ink); }
.lang__list a[aria-current="true"], .lang__list button[aria-current="true"] { color: var(--accent); font-weight: 700; }
.lang__list a[aria-current="true"]::after, .lang__list button[aria-current="true"]::after { content: " ✓"; margin-inline-start: auto; }
.swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-inline-end: 9px; border: 1px solid rgba(255,255,255,0.3); }

/* burger */
.nav__burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line-strong);
  border-radius: 12px; cursor: pointer;
}
.nav__burger span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav--open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav__burger { display: flex; position: relative; z-index: 120; }
  .nav--open { background: rgba(10, 4, 16, 0.97); border-block-end-color: var(--line); }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    gap: 0.4rem; padding: 1.1rem var(--gutter) 1.6rem;
    background: rgba(10, 4, 16, 0.97);
    border-block-end: 1px solid var(--line-strong);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    max-height: calc(100dvh - 100%); overflow-y: auto;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-10px);
    transition: transform .3s var(--ease), opacity .3s var(--ease), visibility .3s var(--ease);
    z-index: 110;
  }
  .nav--open .nav__links { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .nav__link { font-size: 1.15rem; padding: 0.55rem 0; width: 100%; }
  .nav__link.is-active::after { display: none; }
  .nav__link.is-active { color: var(--accent); }
  .lang { margin-block-start: 0.8rem; }
  .lang__list { position: static; margin-block-start: 0.5rem; min-width: 0; width: 100%; }
  .btn--nav { margin-block-start: 1.2rem; width: 100%; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--display); font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em;
  padding: 0.85rem 1.5rem; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  white-space: nowrap;
}
.btn__icon { width: 1.05em; height: 1.05em; }
.btn--primary { color: var(--on-accent); background: var(--accent); box-shadow: 0 12px 30px -12px rgba(var(--accent-rgb),0.6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -14px rgba(var(--accent-rgb),0.75); background: color-mix(in srgb, var(--accent) 86%, #fff); }
.btn--ghost { color: var(--ink); background: rgba(255,255,255,0.04); border-color: var(--line-strong); backdrop-filter: blur(8px); }
.btn--ghost:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb),0.5); background: rgba(var(--accent-rgb),0.08); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.08rem; }
.btn:active { transform: translateY(0); }

/* ---------- 7. Hero (Start) ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: clamp(7rem, 16vh, 11rem) clamp(3rem, 7vh, 5rem); text-align: center; }
.hero__logo {
  width: clamp(64px, 11vw, 104px); aspect-ratio: 1; margin-inline: auto; margin-block-end: 2rem;
  background: url("/assets/brand/brain-grad.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 30px rgba(var(--accent-rgb),0.35));
}
@supports ((-webkit-mask-repeat: no-repeat) or (mask-repeat: no-repeat)) {
  .hero__logo {
    background: var(--grad);
    -webkit-mask: url("/assets/brand/brain.png") center / contain no-repeat;
    mask: url("/assets/brand/brain.png") center / contain no-repeat;
  }
}
.hero__title { font-size: var(--fs-hero); font-weight: 900; letter-spacing: -0.035em; max-width: 16ch; margin-inline: auto; }
.hero__sub { margin-block-start: 1.4rem; color: var(--ink-soft); font-size: var(--fs-lead); font-weight: 400; max-width: 36ch; margin-inline: auto; }
.hero__cta { margin-block-start: 2.4rem; display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.hero__device { margin-block-start: clamp(3.5rem, 8vh, 6rem); display: flex; justify-content: center; }
.hero__scroll { margin-block-start: 3rem; display: inline-flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--muted); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; }
.hero__scroll svg { width: 18px; animation: nudge 2s var(--ease) infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(5px); opacity: 1; } }

.note-pill {
  margin-block-start: 1.6rem; display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.88rem; color: var(--ink-soft); text-align: left;
  background: rgba(var(--accent-rgb),0.08); border: 1px solid var(--line-strong);
  padding: 0.6rem 1rem; border-radius: var(--r-md); max-width: 52ch;
}
.note-pill svg { width: 17px; height: 17px; flex: none; color: var(--accent); }

.stats-strip { margin-block-start: clamp(3rem, 7vh, 5rem); display: flex; gap: clamp(1rem, 3vw, 2.2rem); justify-content: center; flex-wrap: wrap; }
.stat-chip {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  min-width: 7.5rem; padding: 1rem 1.4rem;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.stat-chip b { font-family: var(--display); font-weight: 900; font-size: 1.7rem; color: var(--ink); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-chip span { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* ---------- 8. Page hero (subpages) ---------- */
.pagehero { padding-block: clamp(8rem, 18vh, 12rem) clamp(1.5rem, 4vh, 3rem); }
.pagehero h1 { font-size: var(--fs-h1page); margin-block-start: 1.2rem; max-width: 20ch; }
.pagehero .lead { margin-block-start: 1.6rem; }
.pagehero--center { text-align: center; }
.pagehero--center h1, .pagehero--center .lead { margin-inline: auto; }

/* ---------- 9. Device frame + recreated app screens ---------- */
.device {
  --dev-w: clamp(248px, 74vw, 320px);
  width: var(--dev-w); aspect-ratio: 9 / 19.3;
  background: linear-gradient(160deg, #1f1030, #0a0418);
  border-radius: clamp(36px, 11vw, 52px);
  padding: clamp(7px, 2.2vw, 11px);
  box-shadow: var(--shadow-device), inset 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
}
.device::after {
  content: ""; position: absolute; right: -2px; top: 26%; width: 3px; height: 9%;
  background: linear-gradient(#3a2a4e, #1d1030); border-radius: 2px;
}
.device__screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: clamp(28px, 9vw, 42px);
  background: radial-gradient(120% 80% at 50% -10%, var(--screen), var(--screen-deep) 70%);
  color: var(--ink);
  font-family: var(--display);
  display: flex; flex-direction: column;
}
.device__island { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 34%; height: 18px; background: #000; border-radius: 999px; z-index: 5; }
.screen-pad { padding: clamp(14px, 5%, 22px); padding-top: 38px; display: flex; flex-direction: column; height: 100%; gap: clamp(8px, 2.6%, 14px); }

/* tiny app chrome */
.app-row { display: flex; align-items: center; justify-content: space-between; }
.app-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--ink-soft); background: rgba(255,255,255,0.05); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; }
.app-chip b { color: var(--accent); }
.app-xp { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.app-xp i { display: block; height: 100%; width: 68%; background: var(--grad); border-radius: inherit; }
.app-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* modes screen */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(6px, 2.2%, 10px); margin-top: 4px; }
.mode-card { background: rgba(255,255,255,0.045); border: 1px solid var(--line); border-radius: 14px; padding: 11px 10px; display: flex; flex-direction: column; gap: 6px; }
.mode-card .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); }
.mode-card .ic svg { width: 15px; }
.mode-card b { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.mode-card span { font-size: 9.5px; color: var(--muted); }

/* stats screen */
.stat-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stat-card { background: rgba(255,255,255,0.045); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat-card .n { font-family: var(--display); font-weight: 900; font-size: 24px; color: var(--ink); }
.stat-card .n small { color: var(--accent); }
.stat-card .l { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; padding: 4px 2px; }
.bars i { flex: 1; background: var(--grad); border-radius: 4px 4px 2px 2px; opacity: 0.85; }
.heat { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: rgba(var(--accent-rgb),0.12); }

/* rank screen */
.rank-badge { margin-inline: auto; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent)); box-shadow: 0 0 40px -8px rgba(var(--accent-rgb),0.5); }

/* main menu mini components (mirrors the real home screen) */
.mm-head { display: flex; align-items: center; gap: 9px; }
.mm-ava { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 2px solid var(--accent); background: rgba(var(--accent-rgb),0.16); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; color: #fff; }
.mm-hi { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mm-hi small { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.mm-hi b { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--accent-soft); line-height: 1.1; }
.mm-chip { flex: none; font-size: 10px; font-weight: 700; color: var(--ink-soft); background: rgba(255,255,255,0.06); border: 1px solid var(--line); padding: 5px 8px; border-radius: 999px; }
.mm-ico { width: 28px; height: 28px; flex: none; border-radius: 50%; background: rgba(255,255,255,0.06); display: grid; place-items: center; color: var(--accent-soft); }
.mm-ico svg { width: 14px; }
.mm-rankpill { align-self: flex-start; font-family: var(--mono); font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-soft); border: 1px solid var(--line-strong); padding: 3px 9px; border-radius: 999px; }
.mm-card { background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; }
.mm-level { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mm-level__l { display: flex; flex-direction: column; }
.mm-level__big { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mm-level__r { display: flex; flex-direction: column; gap: 5px; text-align: right; }
.mm-kv small { display: block; font-family: var(--mono); font-size: 7px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.mm-kv b { font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--accent-soft); }
.mm-daily { display: flex; align-items: center; gap: 10px; }
.mm-daily__ic { width: 30px; height: 30px; flex: none; border-radius: 50%; background: rgba(var(--accent-rgb),0.14); color: var(--accent); display: grid; place-items: center; }
.mm-daily__ic svg { width: 15px; }
.mm-daily__t { display: flex; flex-direction: column; min-width: 0; }
.mm-daily__t small { font-family: var(--mono); font-size: 7px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.mm-daily__t b { font-family: var(--display); font-weight: 800; font-size: 12.5px; color: var(--accent-soft); }
.mm-daily__t span { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-mode { display: flex; flex-direction: column; gap: 5px; padding: 13px; background: linear-gradient(150deg, rgba(var(--accent-rgb),0.16), rgba(255,255,255,0.04)); }
.mm-mode__tag { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-soft); }
.mm-mode__tag svg { width: 16px; }
.mm-mode b { font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--accent-soft); }
.mm-mode > span:last-child { font-size: 10px; color: var(--ink-soft); }
.mm-dots { display: flex; gap: 4px; justify-content: center; }
.mm-dots i { width: 4px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.18); }
.mm-dots i.is-on { width: 14px; background: var(--accent); }
.mm-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mm-tiles--2 { grid-template-columns: repeat(2, 1fr); }
.mm-tile { background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 13px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.mm-tile__ic { width: 26px; height: 26px; border-radius: 50%; background: rgba(var(--accent-rgb),0.14); color: var(--accent-soft); display: grid; place-items: center; }
.mm-tile__ic svg { width: 14px; }
.mm-tile b { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-soft); }
.mm-tile small { font-size: 9px; color: var(--muted); }
.mm-play { margin-block-start: auto; display: flex; align-items: center; gap: 10px; background: linear-gradient(120deg, rgba(var(--accent-rgb),0.5), rgba(var(--accent-rgb),0.28)); border: 1px solid rgba(var(--accent-rgb),0.45); border-radius: 999px; padding: 9px 14px; }
.mm-play__ic { width: 28px; height: 28px; flex: none; border-radius: 50%; background: rgba(255,255,255,0.22); color: #fff; display: grid; place-items: center; }
.mm-play__ic svg { width: 13px; }
.mm-play__t { display: flex; flex-direction: column; line-height: 1.1; }
.mm-play__t b { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; color: #fff; text-transform: uppercase; }
.mm-play__t small { font-family: var(--mono); font-size: 7px; letter-spacing: 0.2em; color: rgba(255,255,255,0.75); text-transform: uppercase; }
.mm-play__arr { margin-inline-start: auto; color: #fff; font-weight: 700; }
.ga-timer { align-self: center; display: inline-flex; align-items: center; gap: 5px; margin-block-start: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-soft); background: rgba(255,255,255,0.06); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }
.ga-timer svg { width: 12px; }
.ga-hint { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 999px; }
.mm-trend { width: 100%; height: 52px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.rank-badge span { width: 64px; height: 64px; border-radius: 50%; background: var(--screen-deep); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 22px; color: #fff; }
.rank-name { text-align: center; font-weight: 800; font-size: 17px; margin-top: 2px; }
.rank-sub { text-align: center; font-size: 10px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.1em; }
.ach-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 6px; }
.ach { aspect-ratio: 1; border-radius: 12px; background: rgba(255,255,255,0.045); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); }
.ach svg { width: 16px; }
.ach.is-locked { color: var(--faint); }

/* ---------- 10. App-faithful PLAY screen (mockups + live demo) ---------- */
.ga { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }
.ga__aura { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ga__aura span { position: absolute; font-family: var(--display); font-weight: 600; color: rgba(255,255,255,0.06); }

.ga-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 34px 12px 10px; background: rgba(255,255,255,0.05); }
.ga-ico { color: rgba(255,255,255,0.4); display: grid; place-items: center; }
.ga-ico svg { width: 17px; height: 17px; }
.ga-cluster { display: flex; align-items: center; gap: clamp(8px, 3.5%, 13px); font-family: var(--display); font-weight: 800; font-size: clamp(11px, 4%, 13px); }
.ga-stat { display: inline-flex; align-items: center; gap: 3px; color: rgba(255,255,255,0.6); white-space: nowrap; }
.ga-stat svg { width: 12px; height: 12px; }
.ga-stat--score { color: var(--accent-soft); }
.ga-stat--combo { color: var(--accent); }

.ga-task { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 4%, 16px); padding: 0 14px; }
.ga-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-soft); background: rgba(var(--accent-rgb),0.10); border: 1px solid rgba(var(--accent-rgb),0.28); padding: 4px 11px; border-radius: 999px; white-space: nowrap; transition: opacity .3s ease; }
.ga-q { font-family: var(--display); font-weight: 900; color: #fff; font-size: clamp(30px, 13%, 52px); letter-spacing: -0.03em; line-height: 1; text-align: center; }
.ga-a { font-family: var(--mono); font-weight: 700; color: #fff; font-size: clamp(19px, 8.5%, 34px); line-height: 1; min-height: 1em; transition: color .2s ease; }
.ga-a.is-error { color: #ff453a; }
.ga-a.is-correct { color: #4be39a; }
.ga-bar { width: 46%; max-width: 150px; height: 3px; border-radius: 2px; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.6); transition: background .2s ease, box-shadow .2s ease; }
.ga-bar.is-error { background: #ff453a; box-shadow: 0 0 10px rgba(255,69,58,0.6); }

.ga-pad { display: flex; flex-direction: column; gap: clamp(5px, 1.7%, 8px); padding: clamp(10px, 4%, 16px); padding-top: 0; }
.ga-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(5px, 1.7%, 8px); }
.ga-key { aspect-ratio: 1.6 / 1; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: clamp(15px, 5.6%, 21px); color: #fff; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: background .12s var(--ease), transform .08s var(--ease); }
.ga-key:hover { background: rgba(255,255,255,0.09); }
.ga-key:active { background: rgba(var(--accent-rgb),0.18); transform: scale(0.96); }
.ga-key.is-pressed { background: rgba(var(--accent-rgb),0.30); border-color: rgba(var(--accent-rgb),0.45); transform: scale(0.94); }
.ga-key--wide { aspect-ratio: auto; padding: clamp(8px, 3%, 12px) 0; }
.ga-q.is-small { font-size: clamp(20px, 9%, 38px); }
.ga-lives { display: inline-flex; gap: 3px; }
.ga-lives svg { width: 12px; height: 12px; color: #ff5b6e; }
.ga-lives .lost { color: rgba(255,255,255,0.18); }
/* ---------- 11. Heatmap vignette (matches the app's Aktivität view) ---------- */
.heatcard { display: flex; flex-direction: column; gap: 1.1rem; height: 100%; justify-content: center; }
.heatcard__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.heatcard__eyebrow { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.heatcard__legend { display: inline-flex; align-items: center; gap: 5px; font-size: 0.68rem; color: var(--muted); }
.heatcard__legend i { width: 11px; height: 11px; border-radius: 3px; }
.heatgrid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 5px; }
.heatgrid i { aspect-ratio: 1; border-radius: 3px; }
.hl0 { background: rgba(216,180,255,0.08); }
.hl1 { background: rgba(var(--accent-rgb),0.34); }
.hl2 { background: rgba(var(--accent-rgb),0.58); }
.hl3 { background: rgba(var(--accent-rgb),0.80); }
.hl4 { background: rgba(var(--accent-rgb),1); }
.heatcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.heatcard__count { color: var(--accent); font-weight: 800; font-family: var(--display); }

/* ---------- 12. Teaser cards (Start) ---------- */
.tcards { margin-block-start: clamp(2.5rem, 6vh, 4rem); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); }
.tcard {
  display: flex; flex-direction: column; gap: 0.8rem;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.tcard:hover { transform: translateY(-5px); border-color: rgba(var(--accent-rgb),0.45); background: var(--glass-hi); }
.tcard__k { font-family: var(--mono); color: var(--accent); font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; }
.tcard h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); }
.tcard p { font-size: 0.95rem; color: var(--muted); flex: 1; }
.tcard__link { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.tcard__link svg { width: 16px; transition: transform .3s var(--ease); }
.tcard:hover .tcard__link svg { transform: translateX(4px); }
.tcard:hover .tcard__link { color: var(--accent); }
@media (max-width: 860px) { .tcards { grid-template-columns: 1fr; } }

/* ---------- 13. Privacy band (Start) ---------- */
.privacy-band {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(160deg, rgba(var(--accent-rgb),0.07), rgba(10,4,16,0.3));
}
.privacy-band::before { content: ""; position: absolute; width: 50%; height: 160%; right: -15%; top: -40%; background: radial-gradient(circle, rgba(var(--accent-2-rgb),0.14), transparent 70%); filter: blur(40px); }
.privacy-band > * { position: relative; }
.privacy-band h2 { margin-block-start: 1.2rem; max-width: 18ch; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3.2rem); }
.privacy-band p { margin-block-start: 1.1rem; max-width: 56ch; color: var(--ink-soft); }
.band__link { display: inline-flex; align-items: center; gap: 0.4rem; margin-block-start: 1.5rem; font-family: var(--display); font-weight: 700; color: var(--accent); }
.band__link svg { width: 16px; transition: transform .3s var(--ease); }
.band__link:hover svg { transform: translateX(4px); }

/* ---------- 14. Philosophy ---------- */
.tenets { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; grid-template-columns: repeat(3, 1fr); }
.tenet { background: var(--bg); padding: clamp(1.6rem, 3vw, 2.4rem); }
.tenet__k { font-family: var(--mono); color: var(--accent); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; }
.tenet h3 { font-size: clamp(1.2rem, 0.9rem + 1vw, 1.6rem); margin-block: 0.8rem 0.6rem; }
.tenet p { font-size: 0.98rem; color: var(--muted); }
@media (max-width: 760px) { .tenets { grid-template-columns: 1fr; } }

.behind {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 3.5rem); box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.behind h2 { margin-block-start: 1.2rem; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.8rem); max-width: 22ch; }
.behind p { margin-block-start: 1.1rem; max-width: 64ch; color: var(--ink-soft); }

/* ---------- 15. App experience carousel ---------- */
.exp__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-block-end: 1rem; }
.carousel { position: relative; }
.carousel__track { display: flex; gap: clamp(1.5rem, 4vw, 3rem); overflow-x: auto; scroll-snap-type: x mandatory; padding-block: 1rem; padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: center; flex: none; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.slide__cap { text-align: center; }
.slide__cap b { display: block; font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.slide__cap span { font-size: 0.9rem; color: var(--muted); }
.carousel__nav { display: flex; gap: 0.6rem; justify-content: center; margin-block-start: 2rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); border: none; cursor: pointer; padding: 0; transition: width .3s var(--ease), background .3s var(--ease); }
.dot.is-active { width: 26px; background: var(--accent); border-radius: 999px; }
.carousel__arrows { display: flex; gap: 0.6rem; }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease); }
.arrow:hover { background: rgba(var(--accent-rgb),0.1); border-color: rgba(var(--accent-rgb),0.5); }
.arrow svg { width: 18px; }

/* ---------- 16. Mode / group / extra cards (Funktionen) ---------- */
.modecards { margin-block-start: clamp(2.5rem, 6vh, 4rem); display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.9rem, 2vw, 1.3rem); }
.modecard {
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: clamp(1.2rem, 2.4vw, 1.7rem);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.modecard:hover { border-color: rgba(var(--accent-rgb),0.4); background: rgba(var(--accent-rgb),0.05); transform: translateY(-3px); }
.modecard .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); }
.modecard .ic svg { width: 19px; }
.modecard b { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.05rem; margin-block-start: 0.3rem; }
.modecard p { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 1000px) { .modecards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .modecards { grid-template-columns: 1fr; } }

.groupcards { margin-block-start: clamp(3rem, 7vh, 5rem); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-align: left; }
.groupcard { background: var(--bg); padding: clamp(1.4rem, 2.6vw, 2rem); }
.groupcard__k { font-family: var(--mono); color: var(--accent); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; }
.groupcard p { margin-block-start: 0.7rem; font-size: 0.92rem; color: var(--muted); }
@media (max-width: 1000px) { .groupcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .groupcards { grid-template-columns: 1fr; } }

.xcards { margin-block-start: clamp(2.5rem, 6vh, 4rem); display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.9rem, 2vw, 1.3rem); }
.xcard {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: clamp(1.2rem, 2.4vw, 1.6rem);
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-md);
}
.xcard .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent); }
.xcard .ic svg { width: 18px; }
.xcard b { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1rem; margin-block-start: 0.3rem; }
.xcard p { font-size: 0.86rem; color: var(--muted); }
@media (max-width: 1000px) { .xcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .xcards { grid-template-columns: 1fr; } }

/* ---------- 17. Key experiences ---------- */
.exps { display: flex; flex-direction: column; gap: clamp(5rem, 12vh, 9rem); }
.exp-row { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: clamp(2.5rem, 6vw, 6rem); }
.exp-row:nth-child(even) .exp-row__media { order: -1; }
.exp-row__k { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase; }
.exp-row h3 { margin-block: 1rem 1.1rem; max-width: 14ch; }
.exp-row p { color: var(--ink-soft); max-width: 42ch; }
.exp-row__media { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .exp-row { grid-template-columns: 1fr; gap: 2.5rem; }
  .exp-row:nth-child(even) .exp-row__media { order: 0; }
  .exp-row__text { text-align: center; }
  .exp-row h3, .exp-row p { margin-inline: auto; }
}

.vignette { width: min(420px, 100%); background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-card); backdrop-filter: blur(12px); }

/* modifier toggle list (app look) */
.modlist { display: flex; flex-direction: column; gap: 8px; margin-block-start: 1rem; }
.modrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 13px; padding: 10px 13px; }
.modname { font-family: var(--display); font-weight: 700; font-size: 0.86rem; color: var(--ink); letter-spacing: 0.01em; }
.modtoggle { flex: none; width: 38px; height: 22px; border-radius: 999px; background: rgba(255,255,255,0.10); border: 1px solid var(--line-strong); position: relative; transition: background .25s var(--ease); }
.modtoggle i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; opacity: 0.55; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.modtoggle.is-on { background: var(--accent); border-color: transparent; }
.modtoggle.is-on i { transform: translateX(16px); opacity: 1; }

/* ---------- 18. Immersive showcase ---------- */
.showcase { text-align: center; overflow: hidden; }
.showcase__inner { position: relative; }
.showcase h2 { max-width: 18ch; margin-inline: auto; }
.showcase .lead { margin-block: 1.6rem auto; max-width: 50ch; margin-inline: auto; }
.showcase__stage { margin-block-start: clamp(3rem, 8vh, 6rem); display: flex; justify-content: center; position: relative; }
.showcase__device { will-change: transform; }
.marquee { position: absolute; inset-inline: -10vw; top: 50%; transform: translateY(-50%); z-index: -1; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__row { display: flex; gap: 3.5rem; white-space: nowrap; font-family: var(--mono); font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; color: rgba(var(--accent-rgb),0.08); animation: scrollX 40s linear infinite; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- 19. Live demo ---------- */
.demo__stage { display: flex; justify-content: center; align-items: flex-start; gap: clamp(2rem, 5vw, 4.5rem); flex-wrap: wrap; }
.demo__device-wrap { position: relative; }
.demo__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 6; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); background: rgba(10,4,16,0.9); border: 1px solid var(--line-strong); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.demo__aside { max-width: 360px; align-self: center; }
.demo__aside .eyebrow { margin-block-end: 1rem; }
.demo__aside h3 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin-block-end: 1rem; }
.demo__aside p { color: var(--ink-soft); margin-block-end: 1.4rem; }
.demo__ops { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.demo__op { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 0.5rem 0.7rem; font-family: var(--mono); font-weight: 700; font-size: 1.1rem; color: var(--ink); background: rgba(255,255,255,0.04); border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; transition: all .2s var(--ease); }
.demo__op[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.demo__startover { margin-block-start: 1.2rem; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); background: none; border: none; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.demo__startover:hover { color: var(--ink); }
.demo__gameover { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; text-align: center; padding: 2rem; background: rgba(8,3,16,0.86); backdrop-filter: blur(6px); border-radius: inherit; opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s var(--ease); }
.demo__gameover.is-shown { opacity: 1; visibility: visible; }
.demo__gameover .go-k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.demo__gameover .go-score { font-family: var(--display); font-weight: 900; font-size: 3rem; color: #fff; line-height: 1; }
.demo__gameover .go-sub { color: var(--ink-soft); font-size: 0.92rem; }
.demo__gameover .btn { margin-block-start: 1rem; }
@media (max-width: 560px) { .demo__aside { text-align: center; } .demo__ops { justify-content: center; } }
.play-note { margin-block-start: clamp(2.5rem, 6vh, 4rem); text-align: center; color: var(--muted); font-size: 0.98rem; }
.play-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 20. Final CTA ---------- */
.final { text-align: center; }
.final__card { position: relative; border: 1px solid var(--line-strong); border-radius: var(--r-xl); padding: clamp(3rem, 8vw, 6rem) var(--gutter); background: linear-gradient(160deg, rgba(var(--accent-rgb),0.06), rgba(10,4,16,0.2)); overflow: hidden; }
.final__card::before { content: ""; position: absolute; width: 60%; height: 140%; left: 50%; top: -60%; transform: translateX(-50%); background: radial-gradient(circle, rgba(var(--accent-rgb),0.22), transparent 70%); filter: blur(40px); z-index: 0; }
.final__card > * { position: relative; z-index: 1; }
.final h2 { max-width: 18ch; margin-inline: auto; font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.6rem); }
.final .btn { margin-block-start: 2.4rem; }
.final__card--strip { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.final__mark { display: block; width: 56px; aspect-ratio: 1; margin-inline: auto; margin-block-end: 1.6rem; background: url("/assets/brand/brain-grad-bold.png") center / contain no-repeat; filter: drop-shadow(0 8px 26px rgba(var(--accent-rgb),0.3)); }
@supports ((-webkit-mask-repeat: no-repeat) or (mask-repeat: no-repeat)) {
  .final__mark { background: var(--grad); -webkit-mask: url("/assets/brand/brain-bold.png") center / contain no-repeat; mask: url("/assets/brand/brain-bold.png") center / contain no-repeat; }
}

/* ---------- 21. Footer ---------- */
.footer { border-block-start: 1px solid var(--line); padding-block: clamp(2.5rem, 6vh, 4rem); }
.footer__grid { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; flex-wrap: wrap; }
.footer__links { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.footer__links a { font-size: 0.92rem; color: var(--muted); transition: color .25s var(--ease); }
.footer__links a:hover { color: var(--ink); }
.footer__langs { width: 100%; font-size: 0.85rem; color: var(--faint); }
.footer__langs a { color: var(--muted); transition: color .25s var(--ease); }
.footer__langs a:hover { color: var(--ink); }
.footer__meta { font-size: 0.85rem; color: var(--faint); font-family: var(--mono); letter-spacing: 0.02em; }

/* ---------- 22. Reveal-on-scroll utility ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }

/* ---------- 23. Document pages (Datenschutz / Impressum / Kontakt) ---------- */
.doc { padding-block: clamp(8rem, 18vh, 12rem) var(--section-y); }
.doc__head { max-width: 760px; margin-inline: auto; margin-block-end: clamp(2.5rem, 6vh, 4rem); }
.doc__head--center { text-align: center; }
.doc__head h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); }
.doc__updated { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; margin-block-start: 1rem; }
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin-block: 2.8rem 1rem; }
.prose h3 { font-size: 1.2rem; margin-block: 1.8rem 0.7rem; color: var(--ink); }
.prose p { margin-block: 0.9rem; color: var(--ink-soft); }
.prose ul { margin-block: 1rem; padding-inline-start: 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; }
.prose li { color: var(--ink-soft); }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--accent-rgb),0.4); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--ink); }
.prose hr { border: none; border-block-start: 1px solid var(--line); margin-block: 2.5rem; }
.callout { background: var(--grad-soft); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.2rem 1.4rem; margin-block: 1.6rem; }
.callout p { margin: 0; color: var(--ink); }

/* contact */
.contact-card { max-width: 560px; margin-inline: auto; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.2rem); text-align: center; box-shadow: var(--shadow-card); }
.contact-card .brand__mark { width: 48px; height: 48px; margin-inline: auto; margin-block-end: 1.5rem; }
.contact-list { display: flex; flex-direction: column; gap: 0.9rem; margin-block-start: 2rem; text-align: left; }
.contact-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255,255,255,0.02); transition: border-color .25s var(--ease), background .25s var(--ease); }
.contact-item:hover { border-color: rgba(var(--accent-rgb),0.4); background: rgba(var(--accent-rgb),0.05); }
.contact-item .ci-ic { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; }
.contact-item .ci-ic svg { width: 18px; }
.contact-item .ci-k { font-size: 0.8rem; color: var(--muted); }
.contact-item .ci-v { font-family: var(--display); font-weight: 600; color: var(--ink); }

/* 404 */
.errorwrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.error-card { text-align: center; max-width: 34rem; }
.error-card .ga-q { margin-block-end: 1.4rem; }
.error-card h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
.error-card p { margin-block: 1rem 1.8rem; color: var(--muted); }

/* ---------- 24. Responsive ---------- */
@media (max-width: 680px) {
  .footer__grid { flex-direction: column; align-items: flex-start; }
  .exp__head { flex-direction: column; align-items: flex-start; }
}

/* ---------- 25. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
