/* Backtrack site. Graphite Trail: smoked glass, blue for "you are here", amber for "where you came from". */

@font-face { font-family: 'Bricolage'; src: url(../fonts/bricolage.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Geist'; src: url(../fonts/geist.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(../fonts/geist-mono.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0c0e;
  --bg-2: #101114;
  --surface: #141519;
  --surface-2: #1b1c21;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #edeef0;
  --ink-2: #a9acb3;
  --ink-3: #8b8f97;
  --ion: #7b93ff;
  --ion-strong: #9aacff;
  --on-ion: #0b0c0e;
  --ion-soft: rgba(123, 147, 255, 0.14);
  --ember: #ffb86b;
  --ember-soft: rgba(255, 184, 107, 0.12);
  --glass: rgba(20, 21, 24, 0.72);
  --hi: rgba(255, 255, 255, 0.06);
  --shadow-float: 0 0 0 1px var(--line), inset 0 1px 0 var(--hi), 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 0 0 1px var(--line), 0 12px 32px -16px rgba(0, 0, 0, 0.6);

  --font-display: 'Bricolage', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Fluid type scale, about a major third, from 320px to 1440px. */
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.16vw, 1.1rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.27rem + 0.9vw, 2rem);
  --step-3: clamp(1.95rem, 1.5rem + 2.25vw, 3.4rem);
  --step-4: clamp(2.6rem, 1.8rem + 3.9vw, 5.25rem);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius-l: 22px;
  --radius-m: 14px;
  --radius-s: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: linear(0, 0.18 4%, 0.56 12%, 0.86 22%, 1.02 34%, 1.04 42%, 1.01 58%, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f8fa;
    --bg-2: #eef0f3;
    --surface: #ffffff;
    --surface-2: #f1f2f5;
    --line: rgba(15, 17, 21, 0.08);
    --line-2: rgba(15, 17, 21, 0.15);
    --ink: #0f1115;
    --ink-2: #474c55;
    --ink-3: #5c616b;
    --ion: #3b5bff;
    --ion-strong: #2945e0;
    --on-ion: #ffffff;
    --ion-soft: rgba(59, 91, 255, 0.1);
    --ember: #a35200;
    --ember-soft: rgba(180, 90, 0, 0.09);
    --glass: rgba(255, 255, 255, 0.76);
    --hi: rgba(255, 255, 255, 0.9);
    --shadow-float: 0 0 0 1px var(--line), inset 0 1px 0 var(--hi), 0 10px 28px -12px rgba(15, 17, 21, 0.16), 0 40px 80px -36px rgba(15, 17, 21, 0.22);
    --shadow-soft: 0 0 0 1px var(--line), 0 12px 32px -18px rgba(15, 17, 21, 0.18);
  }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; font-variation-settings: 'opsz' 96; text-wrap: balance; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.015em; line-height: 1.2; font-weight: 640; }
::selection { background: var(--ion-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ion); outline-offset: 3px; border-radius: 6px; }
.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; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ion); color: var(--on-ion); font-weight: 600; text-decoration: none; transition: top 0.2s var(--ease); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(80px, 12vw, 160px); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 36ch; text-wrap: pretty; }
.muted { color: var(--ink-2); }
.measure { max-width: 62ch; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.7em; height: 1.55em; padding: 0 0.42em;
  font-family: var(--font-mono); font-size: 0.82em; font-weight: 500; line-height: 1;
  color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: 0.42em; box-shadow: inset 0 -1px 0 var(--line-2);
  vertical-align: 0.08em; white-space: nowrap;
}
.kbd.ember { color: var(--ember); border-color: color-mix(in srgb, var(--ember) 40%, transparent); background: var(--ember-soft); }
.ember { color: var(--ember); }
.ion { color: var(--ion); }

/* ---------------------------------------------------------------- header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.02rem; letter-spacing: -0.015em; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a:not(.store) { padding: 8px 12px; border-radius: 10px; font-size: 0.94rem; color: var(--ink-2); text-decoration: none; transition: color 0.2s, background-color 0.2s; }
.nav a:not(.store):hover { color: var(--ink); background: var(--hi); }
.nav .stores { margin-left: 10px; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn span { display: block; width: 18px; height: 1.6px; margin: 4px auto; background: currentColor; border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu-btn[aria-expanded='true'] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.menu-btn[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded='true'] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.2s, visibility 0s 0.3s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition: transform 0.35s var(--ease), opacity 0.2s; }
  .nav a:not(.store) { padding: 14px 8px; font-size: 1.05rem; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .stores { margin: 16px 0 0; flex-direction: column; align-items: stretch; }
  .nav .stores .store { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  --tilt: 0deg;
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 8px 18px 8px 14px;
  border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi);
  transition: transform 0.35s var(--spring), box-shadow 0.25s var(--ease), background-color 0.25s;
  overflow: hidden; isolation: isolate;
}
.store::after { /* a sheen that sweeps across on hover */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, var(--hi) 50%, transparent 70%);
  transform: translateX(-110%); transition: transform 0.7s var(--ease);
}
.store:hover::after { transform: translateX(110%); }
.store:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hi), 0 14px 30px -14px rgba(0, 0, 0, 0.5); }
.store:active { transform: translateY(0) scale(0.97); transition-duration: 0.12s; }
.store.primary { background: var(--ion); color: var(--on-ion); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 30px -12px color-mix(in srgb, var(--ion) 70%, transparent); }
.store.primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 18px 36px -14px color-mix(in srgb, var(--ion) 80%, transparent); }
.store svg { width: 26px; height: 26px; flex: none; }
.store .t { display: flex; flex-direction: column; line-height: 1.15; }
.store .t small { font-size: 0.72rem; opacity: 0.78; letter-spacing: 0.01em; }
.store .t b { font-size: 1rem; font-weight: 640; letter-spacing: -0.01em; }
.store[aria-disabled='true'] { cursor: default; }
.store[aria-disabled='true'] .badge-dot { display: inline-block; }
.badge-dot { display: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); margin-left: 4px; animation: pulse 2.4s ease-in-out infinite; }
.store.primary .badge-dot { background: var(--on-ion); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22); }
.stores.compact .store { min-height: 40px; padding: 6px 12px 6px 10px; border-radius: 11px; gap: 8px; }
.stores.compact .store svg { width: 18px; height: 18px; }
.stores.compact .store .t small { display: none; }
.stores.compact .store .t b { font-size: 0.86rem; }
@keyframes pulse { 50% { transform: scale(0.75); opacity: 0.6; } }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding-block: clamp(40px, 7vw, 96px) clamp(72px, 10vw, 140px); overflow: clip; }
.hero-glow { position: absolute; inset: -20% -10% auto; height: 120%; pointer-events: none; z-index: -1;
  background:
    radial-gradient(40% 45% at 78% 28%, color-mix(in srgb, var(--ion) 22%, transparent), transparent 70%),
    radial-gradient(30% 35% at 12% 78%, color-mix(in srgb, var(--ember) 14%, transparent), transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--step-4); line-height: 0.95; letter-spacing: -0.045em; }
.hero h1 .line { display: block; }
.hero h1 .came { color: var(--ember); }
.hero .lead { margin-top: 26px; }
.hero .stores { margin-top: 36px; }
.hero .fine { margin-top: 18px; font-size: var(--step--1); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero .fine span { display: inline-flex; align-items: center; gap: 7px; }
.hero .fine span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); opacity: 0.7; }

/* The browser mockup */
.stage { position: relative; }
.browser {
  position: relative; border-radius: var(--radius-l); background: var(--surface);
  box-shadow: var(--shadow-float); overflow: hidden; aspect-ratio: 16 / 11;
  font-family: var(--font-body);
}
.browser .bar { display: flex; align-items: flex-end; gap: 6px; height: 46px; padding: 0 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.browser .lights { display: flex; gap: 7px; align-self: center; margin-right: 8px; }
.browser .lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.browser .tabs { position: relative; display: flex; gap: 2px; min-width: 0; flex: 1; }
.btab {
  position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 0; max-width: 190px;
  height: 36px; padding: 0 12px; border-radius: 10px 10px 0 0;
  font-size: 12.5px; color: var(--ink-3); white-space: nowrap; transition: color 0.3s;
}
.btab .t { overflow: hidden; text-overflow: ellipsis; }
.btab.is-active { color: var(--ink); }
.tab-ind { position: absolute; left: 0; bottom: 0; height: 36px; width: 25%; border-radius: 10px 10px 0 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line); z-index: -1; will-change: transform; }
.browser .tabs { isolation: isolate; }
.fav { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; color: #fff; font-size: 9.5px; font-weight: 700; font-family: var(--font-body); }
.browser .url { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.browser .url .field { flex: 1; height: 26px; border-radius: 8px; background: var(--bg-2); display: flex; align-items: center; padding: 0 12px; overflow: hidden; white-space: nowrap; }
.browser .page { position: relative; padding: clamp(18px, 3.2vw, 40px) clamp(18px, 3.6vw, 48px); }
.browser .page .kick { font-size: 12px; font-weight: 600; color: var(--ion); }
.browser .page .ttl { margin: 6px 0 18px; font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.browser .page .ln { height: 9px; border-radius: 5px; background: var(--surface-2); margin: 11px 0; }
.browser .page .blk { height: clamp(50px, 9vw, 110px); border-radius: 12px; background: var(--surface-2); margin-top: 20px; }
.browser .views { position: relative; }
.browser .view { position: absolute; inset: 0; }
.browser .view:first-child { position: relative; }

.mpill {
  position: absolute; top: 98px; right: 14px; z-index: 3;
  display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 8px 0 10px; max-width: 78%;
  border-radius: 12px; background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 0 0 1px var(--line-2), 0 8px 24px -8px rgba(0, 0, 0, 0.45);
  font-size: 12.5px; white-space: nowrap; overflow: hidden;
}
.mpill .t { overflow: hidden; text-overflow: ellipsis; }
.mpill .drain { position: absolute; left: 12px; right: 12px; bottom: 0; height: 1px; background: var(--ember); transform-origin: left; }
.mpill svg { flex: none; color: var(--ember); }

.keycap {
  position: absolute; z-index: 4; display: grid; place-items: center;
  width: 64px; height: 60px; border-radius: 14px;
  font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: var(--ember);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line-2), inset 0 -3px 0 var(--line-2), 0 16px 36px -14px rgba(0, 0, 0, 0.55);
}
.stage .keycap.k1 { left: -22px; bottom: 16%; }
.stage .keycap.k2 { right: -18px; bottom: -22px; color: var(--ion); width: 74px; }

/* Ambient: stops on a trail, drifting */
.ambient { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.ambient i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); opacity: 0.25; }
.ambient i.e { background: var(--ember); opacity: 0.5; }
.ambient i.n { background: var(--ion); opacity: 0.5; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stage { margin-top: 12px; }
  .stage .keycap.k1 { left: -6px; bottom: -24px; width: 56px; height: 52px; font-size: 17px; }
  .stage .keycap.k2 { right: -6px; width: 64px; height: 52px; font-size: 17px; }
  .btab:nth-child(n + 4) { display: none; }
}
@media (max-width: 520px) {
  .browser { aspect-ratio: 4 / 3.6; }
  .browser .lights { display: none; }
  .btab { padding: 0 8px; }
}

/* ---------------------------------------------------------------- the trail rail */
.rail { position: fixed; left: max(14px, calc((100vw - var(--max)) / 2 - 64px)); top: 120px; bottom: 80px; width: 12px; z-index: 5; pointer-events: none; display: none; }
.rail .rail-track { position: absolute; left: 5.5px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.rail .rail-fill { position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: linear-gradient(var(--ember), var(--ion)); transform-origin: top; transform: scaleY(0); }
.rail .stop { position: absolute; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink-3); transition: box-shadow 0.3s, background-color 0.3s, transform 0.4s var(--spring); }
.rail .stop.was { background: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft); }
.rail .stop.now { background: var(--ion); box-shadow: 0 0 0 4px var(--ion-soft); transform: scale(1.25); }
.rail .stop.past { background: var(--ink-3); box-shadow: none; }
@media (min-width: 1360px) { .rail { display: block; } }

/* ---------------------------------------------------------------- what it is */
.what .wrap { display: grid; gap: clamp(40px, 6vw, 72px); }
.what h2 { max-width: 18ch; }
.what h2 .soft { color: var(--ink-3); }
.what .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.what .cols p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.55; text-wrap: pretty; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 28px 24px 4px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat .n { font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .n small { font-size: 0.42em; letter-spacing: -0.01em; margin-left: 4px; color: var(--ink-2); font-weight: 600; }
.stat p { margin-top: 10px; font-size: var(--step--1); color: var(--ink-2); max-width: 24ch; }
@media (max-width: 860px) {
  .what .cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- how it works (pinned) */
.how { background: var(--bg-2); border-block: 1px solid var(--line); }
.how .intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.how .intro h2 { max-width: 14ch; }
.how .intro p { max-width: 38ch; color: var(--ink-2); }
.how-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { position: relative; padding: 24px 24px 24px 64px; border-radius: var(--radius-m); transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.step .num { position: absolute; left: 20px; top: 24px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); transition: color 0.3s, background-color 0.3s, box-shadow 0.3s; }
.step h3 { transition: color 0.3s; }
.step p { margin-top: 8px; color: var(--ink-2); }
.step .step-shot { display: none; margin-top: 18px; }
.step.is-active { background: var(--surface); box-shadow: var(--shadow-soft); }
.step.is-active .num { background: var(--ion); color: var(--on-ion); box-shadow: none; }
.step.is-done .num { background: var(--ember-soft); color: var(--ember); box-shadow: none; }
.screen { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-float); background: var(--surface); }
.screen .frame { position: absolute; inset: 0; }
.screen .frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.screen .frame.panel { display: grid; place-items: center; background: radial-gradient(70% 80% at 50% 0%, var(--ion-soft), transparent 70%), var(--bg-2); }
.screen .frame.panel img { width: auto; height: 92%; object-fit: contain; border-radius: 14px; box-shadow: var(--shadow-float); }
.screen .screen-cap { position: absolute; left: 16px; bottom: 16px; z-index: 2; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--line); }
.how .progress { margin-top: 18px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.how .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--ion)); transform-origin: left; transform: scaleX(0.25); }
@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
  .how .visual { display: none; }
  .step { padding: 22px 16px 22px 56px; background: var(--surface); box-shadow: var(--shadow-soft); }
  .step .num { left: 16px; top: 22px; }
  .step .step-shot { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
}

/* ---------------------------------------------------------------- features */
.features .head { margin-bottom: clamp(36px, 5vw, 64px); max-width: 640px; }
.features .head p { margin-top: 18px; color: var(--ink-2); font-size: var(--step-1); }
.fgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card {
  --rx: 0deg; --ry: 0deg;
  position: relative; border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-soft);
  overflow: hidden; transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.5s var(--ease), box-shadow 0.3s;
}
.card:hover { box-shadow: 0 0 0 1px var(--line-2), 0 24px 48px -24px rgba(0, 0, 0, 0.55); }
.card .body { padding: clamp(22px, 3vw, 32px); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card p { margin-top: 10px; color: var(--ink-2); text-wrap: pretty; }
.card .media { position: relative; margin-top: 4px; background: radial-gradient(80% 70% at 50% 0%, var(--ion-soft), transparent 70%), var(--bg-2); border-top: 1px solid var(--line); display: grid; place-items: center; padding: 28px 24px 0; overflow: hidden; }
.card .media img { width: min(100%, 340px); border-radius: 14px 14px 0 0; box-shadow: var(--shadow-float); }
.card.big { grid-column: span 6; display: flex; flex-direction: column; }
.card.big .media { flex: 1; }
.card.small { grid-column: span 3; }
.ficon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ion-soft); color: var(--ion); flex: none; }
.ficon.e { background: var(--ember-soft); color: var(--ember); }
.ficon svg { width: 18px; height: 18px; }
@media (max-width: 1040px) { .card.small { grid-column: span 6; } }
@media (max-width: 700px) { .card.big, .card.small { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- gallery */
.gallery { background: var(--bg-2); border-block: 1px solid var(--line); overflow: clip; }
.gallery .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 36px; }
.gallery .head p { color: var(--ink-2); max-width: 40ch; margin-top: 14px; }
.gnav { display: flex; gap: 8px; }
.gnav button { width: 48px; height: 48px; border-radius: 14px; border: 0; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; display: grid; place-items: center; transition: transform 0.3s var(--spring), background-color 0.2s, opacity 0.2s; }
.gnav button:hover { background: var(--surface-2); }
.gnav button:active { transform: scale(0.94); }
.gnav button:disabled { opacity: 0.4; cursor: default; }
.track {
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2));
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  padding: 8px var(--edge) 28px; margin: 0; list-style: none;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.track::-webkit-scrollbar { display: none; }
.shot { flex: none; scroll-snap-align: start; margin: 0; }
.shot .pic { height: clamp(300px, 44vw, 520px); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-float); background: var(--surface); transition: transform 0.5s var(--ease); }
.shot:hover .pic { transform: translateY(-4px); }
.shot .pic img { height: 100%; width: auto; max-width: none; }
.shot.tall .pic { background: radial-gradient(80% 60% at 50% 0%, var(--ion-soft), transparent 70%), var(--surface); padding: 22px 22px 0; }
.shot.tall .pic img { border-radius: 14px 14px 0 0; box-shadow: var(--shadow-soft); height: auto; width: clamp(200px, 22vw, 290px); }
.shot figcaption { margin-top: 14px; font-size: var(--step--1); color: var(--ink-2); max-width: 46ch; }
.shot figcaption b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- shortcuts */
.keys .head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 72px); }
.keys .head p { margin-top: 18px; color: var(--ink-2); font-size: var(--step-1); }
.kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kcard { text-align: center; padding: 32px 18px 28px; border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow-soft); }
.combo { display: flex; justify-content: center; gap: 10px; margin-bottom: 24px; }
.cap {
  display: grid; place-items: center; min-width: 66px; height: 64px; padding: 0 16px; border-radius: 16px;
  font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: var(--ink);
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2), inset 0 -4px 0 var(--line-2), 0 10px 20px -12px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), color 0.2s;
}
.kcard:hover .cap, .kcard.is-pressed .cap { transform: translateY(3px); box-shadow: 0 0 0 1px var(--line-2), inset 0 -1px 0 var(--line-2), 0 4px 10px -8px rgba(0, 0, 0, 0.5); }
.kcard.is-pressed .cap { color: var(--ion); }
.kcard.back .cap.last { color: var(--ember); }
.kcard h3 { font-size: var(--step-1); }
.kcard p { margin-top: 8px; color: var(--ink-2); font-size: var(--step--1); }
.keys .note { margin-top: 28px; text-align: center; font-size: var(--step--1); color: var(--ink-3); }
@media (max-width: 960px) { .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kgrid { grid-template-columns: 1fr; } .cap { min-width: 58px; height: 56px; font-size: 19px; } }

/* ---------------------------------------------------------------- faq */
.faq .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); }
.faq .side p { margin-top: 18px; color: var(--ink-2); }
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 4px; font-size: var(--step-1); font-weight: 560; letter-spacing: -0.01em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .pm { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); transition: transform 0.4s var(--spring), background-color 0.2s; }
.qa summary .pm::before, .qa summary .pm::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; background: currentColor; border-radius: 2px; transform: translate(-50%, -50%); }
.qa summary .pm::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.3s var(--ease); }
.qa[open] summary .pm { transform: rotate(180deg); background: var(--ion-soft); color: var(--ion); }
.qa[open] summary .pm::after { transform: translate(-50%, -50%) rotate(0deg); }
.qa summary:hover { color: var(--ink); }
.qa .a { padding: 0 4px 24px; color: var(--ink-2); max-width: 64ch; }
.qa .a p + p { margin-top: 12px; }
.qa[open] .a { animation: qa-in 0.4s var(--ease); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 860px) { .faq .wrap { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- final cta */
.cta { text-align: center; overflow: clip; }
.cta .box { position: relative; padding: clamp(56px, 9vw, 120px) var(--gutter); border-radius: clamp(22px, 3vw, 36px); background: var(--surface); box-shadow: var(--shadow-float); overflow: hidden; isolation: isolate; }
.cta .box::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 70% at 50% 0%, var(--ion-soft), transparent 70%), radial-gradient(40% 50% at 50% 110%, var(--ember-soft), transparent 70%); }
.cta h2 { font-size: var(--step-4); letter-spacing: -0.045em; line-height: 0.95; max-width: 13ch; margin-inline: auto; }
.cta p { margin: 22px auto 0; max-width: 44ch; color: var(--ink-2); font-size: var(--step-1); }
.cta .stores { justify-content: center; margin-top: 36px; }
.cta svg.trail { position: absolute; left: 0; right: 0; bottom: 18%; width: 100%; height: 120px; z-index: -1; opacity: 0.55; }

/* ---------------------------------------------------------------- footer */
.footer { padding-block: 56px 40px; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-2); }
.footer .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer nav a { text-decoration: none; color: var(--ink-2); }
.footer nav a:hover { color: var(--ink); text-decoration: underline; }
.footer .legal { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 6px; color: var(--ink-3); font-size: 0.82rem; }

/* ---------------------------------------------------------------- inner pages (privacy, press, 404) */
.doc { padding-block: clamp(48px, 8vw, 104px) clamp(72px, 10vw, 140px); }
.doc .wrap { max-width: calc(780px + var(--gutter) * 2); }
.doc h1 { font-size: var(--step-3); }
.doc .meta { margin-top: 14px; color: var(--ink-3); font-size: var(--step--1); }
.doc .summary { margin-top: 32px; padding: 22px 24px; border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-soft); }
.doc .summary p + p { margin-top: 10px; }
.doc h2 { font-size: var(--step-2); margin-top: 56px; letter-spacing: -0.025em; }
.doc h3 { margin-top: 28px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin-top: 14px; }
.doc ul { padding-left: 1.2em; margin: 14px 0 0; }
.doc li { margin-top: 8px; }
.doc li b, .doc p b { color: var(--ink); font-weight: 600; }
.doc a { color: var(--ion); }
.doc code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 5px; border-radius: 6px; background: var(--surface-2); }
.tbl { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: var(--step--1); }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--ink); font-weight: 600; }
.tbl td { color: var(--ink-2); }
.tbl-wrap { overflow-x: auto; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin-top: 18px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); }
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.dl a { display: block; text-decoration: none; color: var(--ink); border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden; transition: transform 0.4s var(--spring); }
.dl a:hover { transform: translateY(-3px); }
.dl .thumb { aspect-ratio: 16 / 10; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.dl .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.dl .thumb.contain img { object-fit: contain; padding: 18px; }
.dl .lbl { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; font-size: var(--step--1); }
.dl .lbl span { color: var(--ink-3); }
.copybox { position: relative; margin-top: 16px; padding: 20px 22px; border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-soft); }
.copybox p { margin: 0; color: var(--ink); }
.copybox button { margin-top: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 11px; font: inherit; font-size: 0.92rem; font-weight: 560; color: var(--ink); background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; text-decoration: none; transition: transform 0.3s var(--spring), background-color 0.2s; }
.btn:hover { background: var(--bg-2); }
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--ion); color: var(--on-ion); box-shadow: none; }

.lost { min-height: calc(100vh - 64px); display: grid; place-items: center; text-align: center; padding-block: 64px; }
.lost h1 { font-size: var(--step-4); letter-spacing: -0.045em; }
.lost p { margin: 20px auto 0; max-width: 40ch; color: var(--ink-2); font-size: var(--step-1); }
.lost .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.lost .crumbs { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 32px; }
.lost .crumbs i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); opacity: 0.5; }
.lost .crumbs i.e { background: var(--ember); opacity: 1; box-shadow: 0 0 0 5px var(--ember-soft); }
.lost .crumbs i.q { width: auto; height: auto; background: none; opacity: 1; font-family: var(--font-mono); color: var(--ink-3); font-style: normal; }
.lost .crumbs b { width: 40px; height: 1.5px; background: var(--line-2); }

/* ---------------------------------------------------------------- motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .card { transform: none !important; }
}
/* Set on <html> before paint when motion is allowed, so content never flashes in. */
.motion [data-reveal], .motion [data-hero] { opacity: 0; }
