/* LidShift — landing page styles.
   Dark-first, because the product is about a screen going quiet.
   Tokens are declared on :root (light) and overridden for .dark so the
   toggle wins in both directions; nothing gets its only value in a
   media query. */

:root {
  --bg: #F4F6FA;
  --bg-deep: #E8ECF3;
  --panel: #FFFFFF;
  --surface: rgba(13, 37, 95, 0.045);
  --surface-2: rgba(13, 37, 95, 0.075);
  --hairline: rgba(13, 37, 95, 0.12);
  --hairline-soft: rgba(13, 37, 95, 0.07);

  --text: #0A1526;
  --text-sec: rgba(10, 21, 38, 0.66);
  --text-ter: rgba(10, 21, 38, 0.58);

  --accent: #F79A1E;          /* fills, glows, the lid arc */
  --accent-warm: #FFC74A;
  --accent-ink: #9C5300;      /* accent as text/links on light */
  --accent-grad-1: #E08A00;   /* the headline gradient, contrast-safe per theme */
  --accent-grad-2: #B25A00;
  --navy: #0D255F;
  --navy-deep: #050D22;

  --nav-bg: rgba(244, 246, 250, 0.72);
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #FFFFFF;
  --shadow-card: 0 1px 2px rgba(10, 21, 38, 0.05), 0 12px 34px -14px rgba(10, 21, 38, 0.18);
  --shadow-lift: 0 2px 6px rgba(10, 21, 38, 0.07), 0 28px 60px -24px rgba(10, 21, 38, 0.28);

  /* Spacing scales with type so a larger system text size does not break layout. */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 11vh, 8rem);
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 11px;

  color-scheme: light;
}

.dark {
  --bg: #070E1C;
  --bg-deep: #04080F;
  --panel: #0C1730;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.085);
  --hairline: rgba(255, 255, 255, 0.11);
  --hairline-soft: rgba(255, 255, 255, 0.06);

  --text: #F3F6FB;
  --text-sec: rgba(236, 241, 248, 0.66);
  --text-ter: rgba(236, 241, 248, 0.55);

  --accent: #FFA524;
  --accent-warm: #FFC74A;
  --accent-ink: #FFB645;
  --accent-grad-1: #FFC74A;
  --accent-grad-2: #FFA524;

  --nav-bg: rgba(7, 14, 28, 0.68);
  --card: rgba(255, 255, 255, 0.045);
  --card-solid: #0C1730;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 70px -26px rgba(0, 0, 0, 0.85);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Ambient light ------------------------------------------------ */
/* A slow, wide wash behind everything — the icon's navy and amber, nothing
   moving fast enough to distract. Semi-transparent and blurred, per the
   large-moving-object rule. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.amb-1 { width: 46vw; height: 46vw; top: -14vw; left: -8vw;  background: radial-gradient(circle, rgba(13,37,95,.55), transparent 70%); }
.amb-2 { width: 38vw; height: 38vw; top: 6vh;  right: -10vw; background: radial-gradient(circle, rgba(255,165,36,.24), transparent 70%); }
.amb-3 { width: 44vw; height: 44vw; top: 92vh; left: 12vw;   background: radial-gradient(circle, rgba(13,37,95,.42), transparent 70%); }
.dark .amb-1 { background: radial-gradient(circle, rgba(21,58,140,.5), transparent 70%); }
.dark .amb-2 { background: radial-gradient(circle, rgba(255,165,36,.17), transparent 70%); }
.dark .amb-3 { background: radial-gradient(circle, rgba(13,37,95,.55), transparent 70%); }

/* ---------- Layout ------------------------------------------------------- */
.wrap { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 48rem; }
section { padding-block: var(--section-y); }
.stack { display: grid; gap: 1rem; }

/* ---------- Typography --------------------------------------------------- */
/* Tracking and leading are size-specific: tight and slightly negative as the
   type grows, near-zero for body copy. */
h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: -0.028em;
}
h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
}
h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -0.008em;
  font-weight: 650;
}
p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { font-weight: 650; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.1em;   /* positive tracking: small text needs air */
  text-transform: uppercase;
  color: var(--accent-ink);
}
.lede {
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-sec);
  letter-spacing: -0.006em;
  max-width: 40ch;
}
.section-head { display: grid; gap: 0.85rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head .lede { max-width: 52ch; }
.muted { color: var(--text-sec); }
.tiny { font-size: 0.8125rem; line-height: 1.55; color: var(--text-ter); letter-spacing: 0.005em; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
code, .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em;
  padding: 0.16em 0.42em;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
}

/* ---------- Nav ---------------------------------------------------------- */
#nav-top { position: absolute; top: 0; height: 1px; width: 100%; }
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}
/* Scroll edge, not a permanent hairline: the soft fade only appears once
   content actually runs beneath the bar. */
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 22px;
  background: linear-gradient(to bottom, var(--nav-bg), transparent);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.nav.scrolled::after { opacity: 1; }
.nav.scrolled { border-bottom: 1px solid var(--hairline-soft); }
.nav-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 680;
  letter-spacing: -0.015em;
  font-size: 1.0625rem;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 1px 4px rgba(5,13,34,.35); }
.nav-right { display: flex; align-items: center; gap: 0.35rem; }
.nav-link {
  color: var(--text-sec);
  font-size: 0.9375rem;
  font-weight: 550;
  padding: 0.5rem 0.7rem;
  border-radius: 9px;
  transition: color 140ms ease, background-color 140ms ease;
}
.nav-link:hover { color: var(--text); background: var(--surface); text-decoration: none; }
@media (max-width: 40rem) { .nav-link.hide-sm { display: none; } }

/* The one thing a visitor came to do: get the app. */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-ink);
  border: 1px solid var(--hairline);
  background: var(--surface);
}
.nav-cta:hover { color: var(--accent-ink); background: var(--surface-2); }
.nav-cta .ico { width: 1rem; height: 1rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-sec);
  cursor: pointer;
  padding: 0;
  transition: transform 110ms ease-out, background-color 140ms ease, color 140ms ease;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn:active { transform: scale(0.94); }   /* feedback on press, not release */

.ico { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lidshift-icons { display: none; }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 0.9688rem;
  font-weight: 620;
  letter-spacing: -0.004em;
  cursor: pointer;
  font-family: inherit;
  transition: transform 110ms ease-out, box-shadow 200ms ease, background-color 160ms ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.975); }
.btn-primary {
  background: linear-gradient(150deg, var(--accent-warm), var(--accent));
  color: #2A1600;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 10px 26px -10px rgba(247,154,30,.65);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 14px 32px -10px rgba(247,154,30,.8); }
.btn-secondary {
  background: var(--surface);
  border-color: var(--hairline);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* ---------- Hero -------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 8vh, 5.5rem) clamp(2rem, 5vh, 3rem); }
.hero-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}
.hero-copy { display: grid; gap: 1.35rem; justify-items: start; }
.hero-icon {
  width: clamp(72px, 11vw, 96px);
  height: clamp(72px, 11vw, 96px);
  border-radius: 22%;
  box-shadow: var(--shadow-lift);
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent-grad-1), var(--accent-grad-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 560;
  color: var(--text-sec);
  letter-spacing: 0.002em;
}
.pill .ico { width: 0.9375rem; height: 0.9375rem; }

/* ---------- The lid demo ------------------------------------------------- */
/* The whole product is one continuous gesture, so the page lets you perform
   it: grab the lid, move it, watch the desktop answer 1:1. */
.demo {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(13,37,95,.1), rgba(13,37,95,.02));
  box-shadow: var(--shadow-lift);
  padding: clamp(1.1rem, 2.6vw, 1.75rem);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.dark .demo { background: linear-gradient(170deg, rgba(30,72,160,.16), rgba(4,8,15,.5)); }

.stage {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  touch-action: none;          /* the lid owns vertical dragging */
  user-select: none;
  -webkit-user-select: none;
}

/* --- The MacBook --- */
.mac { position: relative; width: 88%; }
.mac-base {
  position: relative;
  height: 2.4%;
  min-height: 9px;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, #D8DDE6, #9AA3B2 55%, #767F8F);
  box-shadow: 0 10px 26px -10px rgba(4,8,15,.75);
}
.dark .mac-base { background: linear-gradient(180deg, #AEB6C4, #6B7382 55%, #474E5C); }
.mac-base::before {   /* the notch you slide a finger into */
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: 16%; height: 42%;
  transform: translateX(-50%);
  border-radius: 0 0 6px 6px;
  background: rgba(4,8,15,.28);
}
.mac-shadow {
  position: absolute;
  left: 6%; right: 6%; top: 100%;
  height: 26px;
  background: radial-gradient(ellipse at center top, rgba(4,8,15,.5), transparent 72%);
  filter: blur(5px);
  pointer-events: none;
}

.lid-hinge {
  position: absolute;
  left: 0; right: 0; bottom: 100%;
  transform-origin: 50% 100%;      /* rotates about the hinge, like the real thing */
  will-change: transform;
  cursor: grab;
}
.lid-hinge:active { cursor: grabbing; }
.lid-hinge.dragging { cursor: grabbing; }

.lid {
  position: relative;
  padding: 2.4% 2.4% 3%;
  border-radius: 13px 13px 4px 4px;
  background: linear-gradient(185deg, #E2E7EF, #AFB8C6 60%, #8C95A4);
  box-shadow: 0 -2px 0 rgba(255,255,255,.35) inset, 0 -18px 40px -18px rgba(4,8,15,.6);
}
.dark .lid { background: linear-gradient(185deg, #B8C0CE, #7C8494 60%, #545C6B); }
.lid:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.lid-hinge:focus-visible { outline: none; }

/* --- The mock desktop the effects act on --- */
/* Everything inside is sized in container units, so the scene holds its
   proportions at any width — hero, a narrow phone, or a test grid. */
.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: #05070E;
  isolation: isolate;
  container-type: inline-size;
}
.desktop {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  background:
    radial-gradient(120% 90% at 22% 8%, rgba(255, 165, 36, 0.26), transparent 58%),
    radial-gradient(120% 100% at 84% 92%, rgba(72, 128, 255, 0.38), transparent 60%),
    linear-gradient(158deg, #14306C, #0A1836 58%, #070F24);
}
.desk-menubar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6.5cqw;
  display: flex;
  align-items: center;
  gap: 3cqw;
  padding-inline: 2.4cqw;
  background: rgba(6, 12, 26, 0.42);
  backdrop-filter: blur(1cqw);
  -webkit-backdrop-filter: blur(1cqw);
}
.desk-menubar i {
  display: block;
  height: 1.5cqw;
  border-radius: 0.4cqw;
  background: rgba(255, 255, 255, 0.5);
}
.desk-menubar i:nth-child(1) { width: 3cqw; background: rgba(255, 255, 255, 0.82); }
.desk-menubar i:nth-child(2) { width: 6cqw; }
.desk-menubar i:nth-child(3) { width: 4.5cqw; }
.desk-menubar i:nth-child(4) { width: 4.5cqw; }
.desk-menubar .spacer { flex: 1; background: none; }
.desk-menubar .mb-icon {
  width: 2.6cqw;
  height: 2.6cqw;
  border-radius: 0.5cqw;
  background: var(--accent-warm);
  box-shadow: 0 0 1.4cqw rgba(255, 199, 74, 0.85);
}

.desk-window {
  position: absolute;
  left: 10cqw; top: 12cqw;
  width: 58cqw;
  border-radius: 1.5cqw;
  overflow: hidden;
  background: rgba(244, 246, 250, 0.94);
  box-shadow: 0 4cqw 8cqw -3cqw rgba(2, 5, 12, 0.8);
}
.desk-window .titlebar {
  display: flex;
  align-items: center;
  gap: 1.1cqw;
  padding: 1.4cqw 1.8cqw;
  background: rgba(226, 231, 240, 0.96);
}
.desk-window .titlebar b { width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #FF5F57; }
.desk-window .titlebar b:nth-child(2) { background: #FEBC2E; }
.desk-window .titlebar b:nth-child(3) { background: #28C840; }
.desk-window .body { padding: 2.2cqw 2.4cqw 3cqw; display: grid; gap: 1.5cqw; }
.desk-window .body i { display: block; height: 1.1cqw; border-radius: 0.6cqw; background: rgba(10, 21, 38, 0.22); }
.desk-window .body i:nth-child(1) { width: 46%; height: 1.7cqw; background: rgba(10, 21, 38, 0.5); }
.desk-window .body i:nth-child(3) { width: 88%; }
.desk-window .body i:nth-child(4) { width: 72%; }
.desk-window .body i:nth-child(5) { width: 80%; }

.desk-dock {
  position: absolute;
  bottom: 2.6cqw; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.3cqw;
  padding: 1.2cqw 1.6cqw;
  border-radius: 2.4cqw;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(1.4cqw);
  -webkit-backdrop-filter: blur(1.4cqw);
  box-shadow: 0 1.4cqw 4cqw -1.4cqw rgba(2, 5, 12, 0.7);
}
.desk-dock i { display: block; width: 4.2cqw; height: 4.2cqw; border-radius: 1.3cqw; background: linear-gradient(150deg, #7FA6FF, #3D62D8); }
.desk-dock i:nth-child(2) { background: linear-gradient(150deg, #FFC74A, #F79A1E); }
.desk-dock i:nth-child(3) { background: linear-gradient(150deg, #7CE0B0, #2FA06B); }
.desk-dock i:nth-child(4) { background: linear-gradient(150deg, #FF9A9A, #D8453D); }
.desk-dock i:nth-child(5) { background: linear-gradient(150deg, #C7A6FF, #7B4FD8); }

/* --- Effect layers. Each is driven by --p (0…1 closure progress) and
       --edge (the moving front, as a percentage of screen height), mirroring
       the ranges in the app's own fragment shader. Only the selected layer
       is mounted. --- */
.screen {
  --p: 0;
  --edge: -25;
  --roll: 0;
  --band: 100;
  --collapse: 1;
  --line: 0;
  --fade: 1;
  --dim: 0;
  --burn: -2.5;
  --ember: 0;
  --out: 1;
}

.desktop { transform: scaleY(var(--collapse)); opacity: var(--fade); }

.fx { position: absolute; inset: 0; pointer-events: none; display: none; }
.screen[data-effect="glass"]   .fx-glass,
.screen[data-effect="shutter"] .fx-shutter,
.screen[data-effect="paper"]   .fx-paper,
.screen[data-effect="crt"]     .fx-crt,
.screen[data-effect="dim"]     .fx-dim,
.screen[data-effect="dust"]    .fx-dust,
.screen[data-effect="burn"]    .fx-burn,
.screen[data-effect="freeze"]  .fx-freeze { display: block; }
.fx > span { position: absolute; display: block; }

/* Glass: frost and refraction concentrated at a rounded moving edge, with a
   top-heavy shadow that advances with closure — never a black gap. */
.fx-glass .glass-veil {
  inset: 0;
  backdrop-filter: blur(calc(var(--p) * 1.4cqw)) saturate(calc(1 - var(--p) * 0.22));
  -webkit-backdrop-filter: blur(calc(var(--p) * 1.4cqw)) saturate(calc(1 - var(--p) * 0.22));
  /* Shadow first, so it lies over the frost: lower rows darken later, but
     every row arrives at the same attenuation by full closure. */
  background:
    linear-gradient(to bottom,
      rgba(3, 7, 16, calc(var(--p) * 0.92)) 0%,
      rgba(3, 7, 16, calc(var(--p) * 0.84)) 52%,
      rgba(3, 7, 16, calc(var(--p) * 0.76)) 100%),
    linear-gradient(to bottom,
      rgba(214, 232, 248, calc(var(--p) * 0.13)) 0%,
      rgba(214, 232, 248, calc(var(--p) * 0.08)) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(var(--edge) * 1%), transparent calc(var(--edge) * 1% + 9%));
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(var(--edge) * 1%), transparent calc(var(--edge) * 1% + 9%));
}
.fx-glass .glass-ridge {
  left: 0; right: 0;
  top: calc(var(--edge) * 1%);
  height: 14%;
  transform: translateY(-52%);
  opacity: calc(var(--p) * 1.6);
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(214, 231, 248, 0.2) 38%,
    rgba(248, 252, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.08) 62%,
    rgba(255, 255, 255, 0) 100%);
  filter: blur(0.12cqw);
}

/* Shutter: a soft dark curtain that travels fully offscreen at either end. */
.fx-shutter {
  background: linear-gradient(to bottom,
    #04070E 0%,
    #04070E calc(var(--edge) * 1%),
    rgba(4, 7, 14, 0) calc(var(--edge) * 1% + 4.5%));
}

/* Paper: the desktop curls downward into a sheet. Above the roll is black;
   the returning half shows a warm matte back. */
.fx-paper { overflow: hidden; }
.fx-paper .paper-void {
  left: 0; right: 0; top: 0;
  height: calc(var(--edge) * 1%);
  background: #04070E;
}
.fx-paper .paper-roll {
  left: -3%; right: -3%;
  top: calc(var(--edge) * 1%);
  height: 12%;
  transform: translateY(-52%);
  opacity: var(--roll);
  border-radius: 50% / 48%;
  background: linear-gradient(to bottom,
    #7E7A71 0%,
    #D6D2C8 24%,
    #F2EFE7 43%,
    #C6C2B7 68%,
    #615E57 100%);
  box-shadow: 0 16px 24px -8px rgba(2, 5, 12, 0.78);
}

/* CRT: vertical compression toward a cool light line, then black. */
.fx-crt .crt-void {
  inset: 0;
  background: #04070E;
  -webkit-mask-image: linear-gradient(to bottom, #000 0 calc(50% - var(--band) * 0.5%), transparent calc(50% - var(--band) * 0.5%) calc(50% + var(--band) * 0.5%), #000 calc(50% + var(--band) * 0.5%) 100%);
  mask-image: linear-gradient(to bottom, #000 0 calc(50% - var(--band) * 0.5%), transparent calc(50% - var(--band) * 0.5%) calc(50% + var(--band) * 0.5%), #000 calc(50% + var(--band) * 0.5%) 100%);
}
.fx-crt .crt-line {
  left: 4%; right: 4%;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: linear-gradient(to right, transparent, #BFE0FF, #EAF4FF, #BFE0FF, transparent);
  opacity: var(--line);
  box-shadow: 0 0 12px rgba(191, 224, 255, 0.9), 0 0 28px rgba(140, 190, 255, 0.55);
}

/* Dim: one flat veil. No capture involved. */
.fx-dim { background: #000; opacity: var(--dim); }

/* Dust: grains are drawn on a canvas by lid.js; black shows where they left. */
.fx-dust canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Burn: the intact desktop is the hole in a sheet of ash. The front moves in
   by the same distance from every edge (the screen is 16:10, hence 0.625),
   and an SVG displacement makes it ragged. */
.fx-burn { filter: url(#burn-edge); opacity: var(--out, 1); }
.fx-burn .burn-hole {
  top: calc(var(--burn) * 1%);
  bottom: calc(var(--burn) * 1%);
  left: calc(var(--burn) * 0.625%);
  right: calc(var(--burn) * 0.625%);
  border-radius: 2.2cqw;
  box-shadow:
    inset 0 0 0.9cqw 0.2cqw rgba(255, 110, 20, calc(var(--ember, 0) * 0.75)),
    inset 0 0 4cqw 1.2cqw rgba(24, 9, 3, calc(var(--ember, 0) * 0.7)),
    0 0 0 0.3cqw rgba(255, 190, 90, var(--ember, 0)),
    0 0 1.3cqw 0.7cqw rgba(255, 58, 6, calc(var(--ember, 0) * 0.9)),
    0 0 4.5cqw 1.6cqw rgba(60, 16, 4, 0.95),
    0 0 0 200cqw #0A0706;
}

/* Freeze & Shatter: shards built by lid.js, each a copy of the desktop.
   The #ice filter tints, frosts and bends the whole layer at once. */
.screen[data-effect="freeze"] > .desktop { visibility: hidden; }
.fx-freeze { filter: url(#ice); }
.fx-freeze .shard { position: absolute; inset: 0; will-change: transform; }
.fx-freeze .shard .desktop *,
.fx-freeze .shard .desktop { -webkit-backdrop-filter: none; backdrop-filter: none; }
.fx-freeze .shard svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx-freeze .shard polygon { fill: none; vector-effect: non-scaling-stroke; }
.fx-freeze .shard .rim { stroke: rgba(190, 232, 255, 0.85); stroke-width: 3.2; }
.fx-freeze .shard .crack { stroke: rgba(4, 24, 42, 0.9); stroke-width: 1.1; }

/* --- Demo chrome --- */
.demo-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.angle-readout {
  display: flex;
  align-items: baseline;
  gap: 0.08rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
}
.angle-readout .value {
  font-size: clamp(1.9rem, 4.6vw, 2.6rem);
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.angle-readout .unit {
  font-size: clamp(1.2rem, 2.8vw, 1.65rem);
  font-weight: 500;
  color: var(--text-ter);
  letter-spacing: -0.02em;
}
.angle-label { font-size: 0.75rem; font-weight: 640; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-ter); }

.grab-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-size: 0.8125rem;
  font-weight: 560;
  color: var(--text-sec);
  transition: opacity 320ms ease;
}
.grab-hint.gone { opacity: 0; }

.effect-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.1rem;
}

/* The cards echo the app's own menu-bar panel: same tint, same checkmark. */
.fx-card {
  position: relative;
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  padding: 0.7rem 0.4rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-sec);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 110ms ease-out, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.fx-card:hover { background: var(--surface-2); color: var(--text); }
.fx-card:active { transform: scale(0.97); }
.fx-card .ico { width: 1.25rem; height: 1.25rem; }
.fx-card[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  color: var(--text);
}
.fx-card[aria-pressed="true"] .ico { color: var(--accent-ink); }
.fx-card .tick {
  position: absolute;
  top: 5px; right: 6px;
  width: 0.75rem; height: 0.75rem;
  color: var(--accent-ink);
  opacity: 0;
  transition: opacity 160ms ease;
}
.fx-card[aria-pressed="true"] .tick { opacity: 1; }

.demo-caption {
  margin-top: 0.9rem;
  margin-bottom: 0.6rem;
  min-height: 2.6em;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-sec);
}
.demo-caption b { color: var(--text); font-weight: 640; }

.slider-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.9rem; }
.slider-row label { font-size: 0.8125rem; font-weight: 560; color: var(--text-ter); white-space: nowrap; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 2.25rem;
  background: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-2);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.1rem; height: 1.1rem;
  margin-top: -0.3rem;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--hairline);
  box-shadow: 0 1px 4px rgba(4,8,15,.4);
}
input[type="range"]::-moz-range-track { height: 5px; border-radius: 3px; background: var(--surface-2); }
input[type="range"]::-moz-range-thumb { width: 1.1rem; height: 1.1rem; border: 1px solid var(--hairline); border-radius: 50%; background: #fff; }
input[type="range"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Cards / features -------------------------------------------- */
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

.card {
  padding: 1.4rem 1.35rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  gap: 0.55rem;
  align-content: start;
}
.card p { font-size: 0.9375rem; line-height: 1.58; color: var(--text-sec); }
.card-icon {
  display: grid;
  place-items: center;
  width: 2.4rem; height: 2.4rem;
  margin-bottom: 0.3rem;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent-ink);
}
.card-icon .ico { width: 1.25rem; height: 1.25rem; stroke-width: 1.8; }

/* A two-column split for the privacy statement. */
.split {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 58rem) { .split { grid-template-columns: 1fr 1fr; } }

.checklist { display: grid; gap: 0.85rem; margin: 0; padding: 0; list-style: none; }
.checklist li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.7rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-sec);
}
.checklist .ico {
  width: 1.25rem; height: 1.25rem;
  margin-top: 0.18rem;
  color: var(--accent-ink);
  stroke-width: 2.1;
}
.checklist b { color: var(--text); font-weight: 640; }

/* Effects table-ish list */
.effect-list { display: grid; gap: 0.6rem; }
.effect-item {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.effect-item .glyph {
  display: grid;
  place-items: center;
  width: 2.6rem; height: 2.6rem;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
}
.effect-item h3 { margin-bottom: 0.15rem; }
.effect-item p { font-size: 0.9063rem; color: var(--text-sec); line-height: 1.5; }

/* Callout — the honest note about what this is */
.callout {
  padding: 1.35rem 1.4rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  display: grid;
  gap: 0.6rem;
}
.callout h3 { display: flex; align-items: center; gap: 0.5rem; }
.callout h3 .ico { color: var(--accent-ink); }
.callout p { font-size: 0.9375rem; line-height: 1.6; color: var(--text-sec); }

/* Requirements strip */
.spec-list { display: grid; gap: 0; margin: 0; padding: 0; }
.spec-list > div {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 0.9375rem;
}
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--text-ter); font-weight: 560; }
.spec-list dd { margin: 0; color: var(--text); }
@media (max-width: 34rem) {
  .spec-list > div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* Final CTA */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 3.75rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(13,37,95,.14), rgba(255,165,36,.09));
  box-shadow: var(--shadow-card);
  text-align: center;
  display: grid;
  gap: 1.15rem;
  justify-items: center;
}
.dark .cta { background: linear-gradient(150deg, rgba(21,58,140,.28), rgba(255,165,36,.08)); }

/* ---------- Doc pages (Impressum) --------------------------------------- */
.doc { max-width: 44rem; margin-inline: auto; padding: clamp(2.5rem, 7vh, 4.5rem) var(--gutter) clamp(3rem, 8vh, 5rem); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: 0.4rem; }
.doc-meta { color: var(--text-ter); font-size: 0.9375rem; margin-bottom: 2.25rem; }
.doc section { padding: 0; margin-bottom: 2rem; }
.doc h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.0625rem;
  font-weight: 660;
  letter-spacing: -0.008em;
  margin-bottom: 0.6rem;
}
.doc h2 .ico { width: 1.125rem; height: 1.125rem; color: var(--accent-ink); }
.doc p { color: var(--text-sec); font-size: 0.9688rem; line-height: 1.68; }
.doc p strong { color: var(--text); }
.doc .back { text-align: center; margin-top: 2.75rem; }
.doc h3 { font-size: 1rem; color: var(--text); margin: 1.4rem 0 0.3rem; }
.doc h2 + h3 { margin-top: 0.4rem; }
.doc p + p { margin-top: 0.75rem; }
.doc .doc-action { margin-top: 1.25rem; }
.doc ul { margin: 0.75rem 0; padding-left: 1.2rem; color: var(--text-sec); font-size: 0.9688rem; line-height: 1.68; }
.doc li + li { margin-top: 0.4rem; }
.doc li strong { color: var(--text); }
.doc ul + p { margin-top: 0.75rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 0 0 0.9rem; font-size: 0.9688rem; }
.kv dt { color: var(--text-ter); }
.kv dd { margin: 0; color: var(--text); }
.doc code { font-size: 0.875em; white-space: normal; overflow-wrap: anywhere; }

/* ---------- Footer ------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--hairline-soft);
  padding-block: 2.75rem;
  background: color-mix(in srgb, var(--bg-deep) 60%, transparent);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.9rem;
  justify-content: center;
  margin-bottom: 1.1rem;
}
/* Padded to a comfortable touch target rather than a bare line of text. */
.footer-links a {
  display: inline-block;
  padding: 0.55rem 0.6rem;
  border-radius: 9px;
  color: var(--text-sec);
  font-size: 0.9063rem;
  font-weight: 550;
}
.footer-links a:hover { color: var(--text); }
.footer-links a.lang { color: var(--accent-ink); }
.footer-note { text-align: center; }

/* ---------- Accessibility ----------------------------------------------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip {
  position: absolute;
  left: 0.75rem; top: -3.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--card-solid);
  border: 1px solid var(--hairline);
  color: var(--text);
  font-weight: 600;
  transition: top 180ms ease;
}
.skip:focus { top: 0.75rem; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Reveal on scroll — a short, non-vestibular lift. */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 620ms ease, transform 620ms cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: opacity 200ms ease; }
  .ambient { display: none; }
  .btn:active, .icon-btn:active, .fx-card:active { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .card, .effect-item, .demo, .btn-secondary { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--card-solid); }
  .ambient { display: none; }
}

@media (prefers-contrast: more) {
  :root { --hairline: rgba(10,21,38,.4); --text-sec: rgba(10,21,38,.86); }
  .dark { --hairline: rgba(255,255,255,.42); --text-sec: rgba(236,241,248,.88); }
  .card, .effect-item, .demo, .cta { background: var(--card-solid); }
}

@media print {
  .nav, .ambient, .demo, .footer-links { display: none; }
  body { background: #fff; color: #000; }
}
