/* KardConnect pre-launch — prototype stylesheet. Concept: CONCEPT.md ("Under the light"). */

/* ── Fonts: the app's own Inter Tight + Fraunces (SIL OFL, installed via @expo-google-fonts) ─────────────────── */
@font-face { font-family: 'Inter Tight'; src: url('assets/fonts/InterTight-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('assets/fonts/InterTight-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('assets/fonts/InterTight-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('assets/fonts/InterTight-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('assets/fonts/Fraunces-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('assets/fonts/Fraunces-400i.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('assets/fonts/Fraunces-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }

/* ── Tokens ──────────────────────────────────────────────────────────────────────────────────────────────── */
:root {
  --night: #121212;
  --night-raised: #1b1b1b;
  --paper: #F5F4F0;
  --paper-raised: #EBE9E3;
  --ink: #171717;
  --copper: #A36648;
  --copper-on-night: #C9896A; /* 6.5:1 on night — small copper text */
  --copper-on-paper: #8A5238; /* 5.7:1 on paper */
  --muted: #929292;            /* 6.0:1 on night; not for paper */
  --paper-secondary: #5C5B57;  /* app LIGHT.textSecondary, 6.2:1 */
  --night-secondary: #B8B8B4;  /* app DARK.textSecondary, 9.4:1 */

  --sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', ui-serif, Georgia, serif;

  --fs-display: clamp(3rem, 1.45rem + 6.4vw, 7.1rem);
  --fs-h2: clamp(2.5rem, 1.5rem + 4.2vw, 5rem);
  --fs-h3: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem);
  --fs-lede: clamp(1.06rem, 0.98rem + 0.4vw, 1.3rem);
  --fs-body: 1.0625rem;

  --gutter: clamp(1.25rem, 0.6rem + 3.2vw, 3.5rem);
  --section: clamp(6rem, 4rem + 9vw, 11rem);
  --maxw: 1240px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-card: cubic-bezier(0.22, 1, 0.36, 1);

  /* the light (set by app.js): -1..1 */
  --lx: 0.15;
  --ly: -0.35;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
/* Cards deliberately cross the screen edge (a magazine crop): clip per section so mobile browsers never widen the
   layout viewport (body-level clipping alone doesn't stop that). */
main, .footer { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--paper);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--copper-on-night); outline-offset: 3px; border-radius: 6px; }
[data-stage="paper"] :focus-visible { outline-color: var(--copper-on-paper); }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--paper); color: var(--ink); padding: .6rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 600; transition: top .2s; }
.skip:focus { top: 1rem; }

/* Prototype marker — always visible, never in the way */
.proto-flag {
  position: fixed; z-index: 60; left: 50%; top: calc(max(.9rem, env(safe-area-inset-top)) + 52px);
  transform: translateX(-50%);
  font-size: .62rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #121212; background: #E9C9B6; padding: .35rem .75rem; border-radius: 999px;
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.5); pointer-events: none; white-space: nowrap;
}

/* ── The stage: night ↔ paper ("the lights come on") ─────────────────────────────────────────────────────── */
.backdrop { position: fixed; inset: 0; z-index: -1; background: var(--night); overflow: hidden; }
.backdrop__paper { position: absolute; inset: 0; background: var(--paper); opacity: 0; transition: opacity .7s var(--ease-out); }
.backdrop__glow {
  position: absolute; inset: -20%;
  background: radial-gradient(40% 32% at calc(62% + var(--lx) * 6%) calc(28% + var(--ly) * 5%), rgba(163,102,72,.16), transparent 70%);
  transition: opacity .7s var(--ease-out);
}
[data-stage="paper"] .backdrop__paper { opacity: 1; }
[data-stage="paper"] .backdrop__glow { opacity: 0; }
[data-stage="paper"] body { color: var(--ink); }
body { transition: color .7s var(--ease-out); }

/* ── Nav ─────────────────────────────────────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(.9rem, env(safe-area-inset-top)) var(--gutter) .9rem;
  transition: background-color .5s var(--ease-out), box-shadow .5s;
}
.nav.is-solid { background: rgba(18,18,18,.66); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); box-shadow: inset 0 -1px 0 rgba(255,255,255,.07); }
[data-stage="paper"] .nav.is-solid { background: rgba(245,244,240,.72); box-shadow: inset 0 -1px 0 rgba(23,23,23,.08); }
.nav__mark { display: block; padding: .35rem 0; }
.mark { height: 24px; width: auto; }
.mark--dark { display: none; }
[data-stage="paper"] .mark--light { display: none; }
[data-stage="paper"] .mark--dark { display: block; }

/* ── Buttons ─────────────────────────────────────────────────────────────────────────────────────────────── */
.pill {
  --bg: var(--paper); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 1.15rem; border-radius: 999px; border: 0;
  font: 600 .9375rem/1 var(--sans); letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  color: var(--fg); background: var(--bg); cursor: pointer;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .3s;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 24px -12px rgba(0,0,0,.6);
}
.pill:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 14px 30px -14px rgba(163,102,72,.65); }
.pill:active { transform: translateY(0) scale(.98); transition-duration: .1s; }
.pill--nav { min-height: 40px; font-size: .875rem; padding: 0 1rem; }
.nav:not(.is-solid) .pill--nav { --bg: rgba(245,244,240,.1); --fg: var(--paper); box-shadow: inset 0 0 0 1px rgba(245,244,240,.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
[data-stage="paper"] .pill { --bg: var(--ink); --fg: var(--paper); box-shadow: 0 10px 24px -14px rgba(0,0,0,.5); }

/* ── Type ────────────────────────────────────────────────────────────────────────────────────────────────── */
.eyebrow { margin: 0 0 1.25rem; font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--copper-on-night); }
[data-stage-section="paper"] .eyebrow { color: var(--copper-on-paper); }
.display { margin: 0; font-size: var(--fs-display); font-weight: 600; line-height: .94; letter-spacing: -.048em; text-wrap: balance; }
.display em { color: #E2B293; letter-spacing: -.02em; padding-right: .04em; }
.h2 { margin: 0; font-size: var(--fs-h2); font-weight: 600; line-height: .98; letter-spacing: -.042em; text-wrap: balance; }
.h3 { margin: 0 0 1rem; font-size: var(--fs-h3); font-weight: 600; line-height: 1.05; letter-spacing: -.032em; text-wrap: balance; }
.lede { margin: 1.4rem 0 0; font-size: var(--fs-lede); line-height: 1.45; color: var(--night-secondary); max-width: 34ch; }
.lede--narrow { margin-inline: auto; }
.body { margin: 0; color: var(--paper-secondary); max-width: 40ch; }
.index { margin: 0 0 1.1rem; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-on-paper); font-variant-numeric: tabular-nums; }

/* ── Reveal (IntersectionObserver adds .is-in) ───────────────────────────────────────────────────────────── */
.reveal, .reveal-group > * { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out); }
.reveal.is-in, .reveal-group.is-in > * { opacity: 1; transform: none; filter: none; }
.reveal-group.is-in > :nth-child(2) { transition-delay: .12s; }
.hero .reveal:nth-child(2) { transition-delay: .08s; }
.hero .reveal:nth-child(3) { transition-delay: .18s; }
.hero .reveal:nth-child(4) { transition-delay: .28s; }

/* ══ The card (DOM port of components/card/CardRenderer.tsx) ════════════════════════════════════════════════ */
.kc {
  position: relative; width: 100%; aspect-ratio: 1.5858; container-type: size;
  border-radius: 4.8% / 7.61%; overflow: hidden; isolation: isolate;
  transform: translateZ(0);
}
.kc__bg, .kc__pattern, .kc__pattern svg, .kc__grain, .kc__brushed, .kc__spec, .kc__edge { position: absolute; inset: 0; width: 100%; height: 100%; }
.kc__el { position: absolute; margin: 0; overflow: hidden; }
.kc__text { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.16; white-space: normal; overflow-wrap: anywhere; }
.kc__grain { background: url('assets/grain.png') repeat; background-size: 256px; mix-blend-mode: overlay; opacity: .18; }
.kc__brushed { background: url('assets/brushed.png') center / 100% 100% no-repeat; mix-blend-mode: overlay; opacity: .6; }
/* Specular: SpecularLayer "soft" — a broad bloom that follows the light */
.kc__spec { overflow: hidden; mix-blend-mode: screen; }
.kc__spec::before {
  content: ''; position: absolute; left: -30%; top: -40%; width: 160%; height: 180%;
  background: radial-gradient(46.9% 44.4% at 50% 50%, rgba(255,255,255,1) 0%, rgba(255,255,255,.55) 18%, rgba(255,255,255,.12) 55%, rgba(255,255,255,0) 100%);
  opacity: var(--gloss, .16);
  transform: translate(calc(var(--lx) * 35%), calc(var(--ly) * 24.5%));
}
/* Edge: EdgeLayer — top rim, gentle falloff, hairline */
.kc__edge {
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, var(--rim, rgba(255,255,255,.45)), transparent) top / 100% 1.2px no-repeat,
    linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 30%, transparent 93%, rgba(0,0,0,.07) 100%);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.14);
}

/* Physical presence: contact + cast shadow that answers the light */
.tilt { position: relative; transform-style: preserve-3d; will-change: transform; }
.tilt .kc {
  box-shadow:
    0 1px 1px rgba(0,0,0,.12),
    calc(var(--lx) * -14px) calc(18px + var(--ly) * -8px) 30px -10px rgba(0,0,0,.45),
    calc(var(--lx) * -34px) calc(46px + var(--ly) * -18px) 70px -24px rgba(0,0,0,.55);
}
[data-stage-section="paper"] .tilt .kc, .better .tilt .kc {
  box-shadow:
    0 1px 1px rgba(40,30,20,.1),
    calc(var(--lx) * -12px) calc(16px + var(--ly) * -6px) 26px -10px rgba(58,51,42,.28),
    calc(var(--lx) * -30px) calc(40px + var(--ly) * -14px) 60px -24px rgba(58,51,42,.32);
}

/* ══ 1 · Hero ═══════════════════════════════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative; min-height: 100svh; display: grid;
  grid-template-rows: 1fr auto; padding: calc(4.5rem + env(safe-area-inset-top)) var(--gutter) 2.5rem;
  max-width: var(--maxw); margin-inline: auto;
}
.hero__table { position: relative; min-height: 38svh; perspective: 1600px; }
@media (max-width: 959px) {
  .hero { padding-top: calc(3.6rem + env(safe-area-inset-top)); padding-bottom: 1.5rem; }
  .hero .eyebrow { margin-bottom: .9rem; }
  .hero .lede { margin-top: 1rem; }
  .hero .join { margin-top: 1.5rem; }
  .fan { --w: min(70vw, 330px); }
}
.hero__copy { position: relative; z-index: 2; }
.hero__copy .lede { max-width: 30ch; }

/* The table: a warm pool of light the cards rest in, and a soft floor shadow beneath the hand */
.hero__table::before {
  content: ''; position: absolute; left: 50%; top: 52%; width: 150%; aspect-ratio: 1.9; transform: translate(-44%, -50%);
  background: radial-gradient(closest-side, rgba(163,102,72,.30), rgba(163,102,72,.08) 55%, transparent 78%);
  pointer-events: none;
}
.hero__table::after {
  content: ''; position: absolute; left: 50%; top: 62%; width: 90%; height: 26%; transform: translate(-40%, -50%);
  background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); pointer-events: none;
}
.fan { position: absolute; inset: 0; z-index: 1; --w: min(74vw, 340px); }
/* depth: the card furthest from the light is a little darker */
.fan__slot--back .kc { filter: brightness(.78) saturate(.95); }
.fan__slot--mid .kc { filter: brightness(.93); }
.fan__slot { position: absolute; width: var(--w); left: 50%; top: 50%; }
/* mobile composition: a hand of three cards, the front one crossing the viewport edge */
.fan__slot--back  { transform: translate(-78%, -78%) rotate(-11deg); }
.fan__slot--mid   { transform: translate(-46%, -56%) rotate(-3deg); }
.fan__slot--front { transform: translate(-14%, -24%) rotate(7deg); }

.deal { animation: deal 1.5s var(--ease-card) both; animation-delay: calc(.15s + var(--i) * .14s); }
@keyframes deal {
  0% { opacity: 0; transform: translate3d(8%, 46%, 0) rotate(14deg) rotateX(38deg) scale(.92); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.float { animation: float 9s ease-in-out infinite; animation-delay: calc(var(--i) * -2.7s); }
@keyframes float { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0); } 50% { transform: translate3d(0, -5px, 0) rotate(.35deg); } }
.hero .tilt { transform: rotateX(calc(var(--ly) * -5deg)) rotateY(calc(var(--lx) * 7deg)) translate3d(0, calc(var(--scroll, 0) * var(--depth, 0) * -1px), 0); transition: transform .9s var(--ease-out); }
.fan__slot--back .tilt { --depth: 30; }
.fan__slot--mid .tilt { --depth: 55; }
.fan__slot--front .tilt { --depth: 95; }

.scroll-cue { display: none; }

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: 1fr; align-items: center; gap: 2rem; padding-top: 6rem; padding-bottom: 4rem; }
  .hero__copy { order: 1; padding-bottom: 2rem; }
  .hero__table { order: 2; min-height: 82svh; }
  .fan { --w: min(32vw, 450px); }
  .fan__slot--back  { transform: translate(-50%, -84%) rotate(-12deg); }
  .fan__slot--mid   { transform: translate(-30%, -44%) rotate(-3.5deg); }
  .fan__slot--front { transform: translate(-10%, 0%) rotate(6deg); }
  .scroll-cue { display: block; position: absolute; left: var(--gutter); bottom: 2.2rem; width: 1px; height: 46px; background: rgba(245,244,240,.16); overflow: hidden; }
  .scroll-cue span { position: absolute; inset: 0 0 auto; height: 40%; background: var(--paper); animation: cue 2.4s var(--ease-out) infinite; }
  @keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }
}

/* ── Waitlist form (prototype) ───────────────────────────────────────────────────────────────────────────── */
.join { margin-top: 2.2rem; max-width: 30rem; }
.join__field {
  display: flex; align-items: center; gap: .35rem; padding: .35rem; border-radius: 999px;
  background: rgba(245,244,240,.06); box-shadow: inset 0 0 0 1px rgba(245,244,240,.16);
  transition: box-shadow .3s, background-color .3s;
}
.join__field:focus-within { box-shadow: inset 0 0 0 1px rgba(201,137,106,.9), 0 0 0 4px rgba(163,102,72,.18); background: rgba(245,244,240,.08); }
.join__field input {
  flex: 1; min-width: 0; height: 44px; padding: 0 .6rem 0 .9rem; border: 0; outline: 0; background: transparent;
  font: 400 1rem var(--sans); color: var(--paper); letter-spacing: -.01em;
}
.join__field input::placeholder { color: rgba(245,244,240,.42); }
.join__note { margin: .8rem 0 0 1rem; font-size: .84rem; color: var(--muted); min-height: 1.3em; }
.join__note a { color: var(--night-secondary); text-underline-offset: 3px; }
.join.is-error .join__field { box-shadow: inset 0 0 0 1px #E2685B, 0 0 0 4px rgba(226,104,91,.16); }
.join.is-error .join__note { color: #EDA59C; }
.join.is-done .join__field { display: none; }
.join__done { display: none; padding: 1.1rem 1.25rem; border-radius: 22px; background: rgba(245,244,240,.06); box-shadow: inset 0 0 0 1px rgba(245,244,240,.14); }
.join.is-done .join__done { display: block; animation: rise .8s var(--ease-out) both; }
.join__done strong { display: block; font-size: 1.1rem; letter-spacing: -.02em; margin-bottom: .3rem; }
.join__done p { margin: 0; color: var(--night-secondary); font-size: .92rem; }
.join__done .tag { display: inline-block; margin-top: .7rem; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #121212; background: #E9C9B6; border-radius: 999px; padding: .25rem .55rem; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 479px) {
  .join__field { flex-direction: column; align-items: stretch; border-radius: 22px; padding: .4rem; }
  .join__field input { height: 50px; text-align: left; }
  .join__field .pill { min-height: 50px; border-radius: 16px; }
}

/* ══ 2 · Pillars (paper) ════════════════════════════════════════════════════════════════════════════════════ */
.pillars, .better { color: var(--ink); }
.section-head { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section-head--center { text-align: center; }
.pillars { padding: var(--section) 0 calc(var(--section) * .6); }
.pillars .section-head { margin-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.pillar {
  max-width: var(--maxw); margin: 0 auto clamp(4.5rem, 3rem + 6vw, 9rem); padding: 0 var(--gutter);
  display: grid; gap: 2.5rem; align-items: center;
}
.pillar__copy { max-width: 30rem; }
.pillar__phone { display: flex; justify-content: center; }
@media (min-width: 900px) {
  .pillar { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .pillar--flip .pillar__phone { order: 2; }
  .pillar__copy { justify-self: start; }
  .pillar--flip .pillar__copy { justify-self: end; }
}

/* The physical card leaving the screen (Create) / arriving in the Deck (Keep) */
.pillar__phone { position: relative; }
.lift { position: absolute; width: min(58vw, 250px); z-index: 2; pointer-events: none; }
.lift--out { right: 2%; bottom: 13%; }
.lift--in { left: 2%; top: 9%; }
@media (min-width: 900px) { .lift--out { right: 6%; } .lift--in { left: 6%; } }
.reveal-group > .pillar__phone .lift { transition: transform 1.4s var(--ease-card) .25s, opacity 1s var(--ease-out) .25s; }
.reveal-group:not(.is-in) .lift--out { opacity: 0; transform: translate(-38%, -6%) rotate(0deg) scale(.86); }
.reveal-group.is-in .lift--out { opacity: 1; transform: rotate(-9deg); }
.reveal-group:not(.is-in) .lift--in { opacity: 0; transform: translate(-30%, -30%) rotate(-18deg) scale(1.06); }
.reveal-group.is-in .lift--in { opacity: 1; transform: rotate(7deg); }
@media (prefers-reduced-motion: reduce) { .reveal-group .lift { opacity: 1 !important; transition: none !important; } }

/* Phone: a minimal frame; the screen inside is laid out at the app's own 390 pt width and scaled */
.phone {
  --pw: min(78vw, 320px); --s: calc(var(--pw) / 390px);
  position: relative; width: var(--pw); aspect-ratio: 390 / 844; border-radius: calc(var(--pw) * .145);
  background: #0c0c0c; padding: calc(var(--pw) * .028);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08), 0 0 0 1px rgba(0,0,0,.65),
    0 2px 2px rgba(40,30,20,.08), 0 30px 60px -24px rgba(58,51,42,.45), 0 60px 120px -50px rgba(58,51,42,.4);
}
.phone__screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--pw) * .118); overflow: hidden; background: var(--paper); }
.phone__canvas { position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform: scale(var(--k, .8)); transform-origin: 0 0; }
.phone__island { position: absolute; z-index: 5; left: 50%; top: 11px; width: 122px; height: 35px; border-radius: 20px; background: #000; transform: translateX(-50%); }

/* App screen (LIGHT palette from theme/tokens.ts) */
.app { position: absolute; inset: 0; color: #171717; font-family: var(--sans); background: #F5F4F0; overflow: hidden; }
.app__status { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 40px; font: 600 16px/1 var(--sans); letter-spacing: -.01em; }
.app__status i { display: inline-block; width: 26px; height: 12px; border-radius: 3.5px; box-shadow: inset 0 0 0 1px rgba(23,23,23,.45); position: relative; }
.app__status i::after { content: ''; position: absolute; left: 2px; top: 2px; bottom: 2px; width: 70%; border-radius: 2px; background: #171717; }
.app__head { padding: 8px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.app__title { margin: 0; font: 600 32px/36px var(--sans); letter-spacing: -.9px; }
.app__sub { margin: 4px 0 0; font: 500 14px/19px var(--sans); letter-spacing: -.1px; color: #6B6963; }
.app__icons { display: flex; gap: 8px; }
.app__iconbtn { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; }
.app__iconbtn--filled { background: #171717; color: #F5F4F0; }
.app__tabbar { position: absolute; left: 50%; bottom: 34px; width: 300px; height: 62px; transform: translateX(-50%); border-radius: 22px; background: rgba(255,255,255,.86); box-shadow: 0 10px 30px -12px rgba(58,51,42,.35), inset 0 0 0 .5px rgba(23,23,23,.08); display: flex; padding: 6px; }
.app__tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 16px; font: 500 11px/1 var(--sans); color: #6B6963; }
.app__tab.is-on { background: #EBE9E3; color: #171717; }
.app__home { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; border-radius: 3px; background: #171717; transform: translateX(-50%); }

/* My Cards */
.app__carousel { position: relative; height: 256px; margin-top: 24px; perspective: 1100px; }
.app__ccard { position: absolute; top: 28px; width: 318px; left: 36px; }
.app__ccard--l { transform: translateX(-300px) rotateY(32deg) scale(.88); opacity: .55; }
.app__ccard--r { transform: translateX(300px) rotateY(-32deg) scale(.88); opacity: .55; }
.app__dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.app__dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(23,23,23,.18); }
.app__dots span.is-on { width: 18px; background: #171717; }
.app__label { margin-top: 18px; display: flex; justify-content: center; align-items: center; gap: 8px; font: 600 17px/22px var(--sans); letter-spacing: -.2px; }
.app__label small { font: 600 11px/14px var(--sans); letter-spacing: 1.6px; color: #6B6963; }
.app__actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.app__action { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 74px; font: 500 12px/16px var(--sans); color: #5C5B57; }
.app__tile { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0) 70%), #EBE9E3; box-shadow: inset 0 0 0 .5px rgba(23,23,23,.08); color: #171717; }
.app__action--primary .app__tile { background: #171717; color: #F5F4F0; }

/* Exchange */
.app__segment { margin: 22px auto 0; width: 220px; height: 44px; border-radius: 999px; background: #EBE9E3; padding: 4px; display: flex; position: relative; }
.app__segment span { flex: 1; display: grid; place-items: center; font: 600 15px/1 var(--sans); letter-spacing: -.1px; color: #6B6963; position: relative; z-index: 1; }
.app__segment span.is-on { color: #171717; }
.app__segment::before { content: ''; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.app__hint { margin: 8px 48px 0; text-align: center; font: 500 12px/16px var(--sans); color: #6B6963; }
.app__qrstage { position: relative; height: 284px; display: grid; place-items: center; margin-top: 16px; }
.app__halo { position: absolute; width: 374px; height: 374px; border-radius: 50%; background: radial-gradient(circle, rgba(163,102,72,.10), rgba(163,102,72,0) 62%); }
.app__qrpaper { position: relative; padding: 22px; border-radius: 32px; background: #FBFAF7; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7), 0 2px 4px rgba(0,0,0,.15); }
.app__qrpaper svg { width: 220px; height: 220px; }
.app__ring { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font: 500 12px/16px var(--sans); color: #6B6963; }
.app__copy { margin: 16px 40px 0; text-align: center; font: 500 14px/19px var(--sans); color: #6B6963; }
.app__chip { margin: 16px auto 0; width: 260px; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 10px; border-radius: 22px; background: #EBE9E3; box-shadow: inset 0 0 0 .5px rgba(23,23,23,.08); }
.app__chip .kc { width: 44px; }
.app__chip div { flex: 1; }
.app__chip small { display: block; font: 500 12px/16px var(--sans); color: #6B6963; }
.app__chip b { display: block; font: 600 17px/22px var(--sans); letter-spacing: -.2px; }

/* Deck */
.app__search { margin: 22px 24px 0; height: 46px; border-radius: 16px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: #fff; box-shadow: inset 0 0 0 .5px rgba(23,23,23,.1); font: 400 15px var(--sans); color: #8E8D88; }
.app__stack { position: relative; margin: 24px 24px 0; }
.app__srow { height: 64px; position: relative; }
.app__srow .kc { position: absolute; left: 0; top: 0; width: 342px; box-shadow: 0 -1px 0 rgba(255,255,255,.4), 0 -8px 22px -10px rgba(58,51,42,.35); }

/* ══ 3 · Make it yours (night) ══════════════════════════════════════════════════════════════════════════════ */
.studio { padding: var(--section) 0; }
.studio .section-head { margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.showcase { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; justify-items: center; }
.showcase__stage { position: relative; width: min(88vw, 560px); perspective: 1800px; }
.showcase__card {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  transform-style: preserve-3d; transition: transform .9s var(--ease-card); border-radius: 4.8% / 7.61%;
  transform: rotateX(calc(var(--ly) * -4deg)) rotateY(calc(var(--lx) * 6deg + var(--turn, 0deg)));
  touch-action: pan-y;
}
/* Each face is ONE flat plane (children flattened into it), so backface-visibility hides its whole content. */
.showcase__face { position: relative; transform-style: flat; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: rotateY(0deg); }
.showcase__face--back { position: absolute; inset: 0; transform: rotateY(180deg); }
.showcase__face .kc { transform: none; }
.showcase__layer { transform-style: preserve-3d; transition: opacity .55s var(--ease-out), transform .8s var(--ease-card); }
.showcase__layer.is-leaving { position: absolute; inset: 0; opacity: 0; transform: translate3d(calc(var(--dir, 1) * -7%), 0, -60px) rotateY(calc(var(--dir, 1) * 14deg)); }
.showcase__layer.is-entering { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 9%), 0, -40px) rotateY(calc(var(--dir, 1) * -16deg)); }
.showcase__card .kc { box-shadow: 0 1px 1px rgba(0,0,0,.14), calc(var(--lx) * -20px) calc(30px + var(--ly) * -12px) 50px -16px rgba(0,0,0,.6), calc(var(--lx) * -50px) calc(80px + var(--ly) * -26px) 110px -40px rgba(0,0,0,.65); }
.showcase__shadow { position: absolute; left: 12%; right: 12%; bottom: -14%; height: 18%; background: radial-gradient(50% 50% at 50% 50%, rgba(163,102,72,.22), transparent 70%); filter: blur(10px); pointer-events: none; }
.showcase__meta { margin: 2.8rem 0 .3rem; display: flex; gap: .8rem; align-items: baseline; justify-content: center; flex-wrap: wrap; text-align: center; }
.showcase__name { font: 600 1.35rem/1.2 var(--sans); letter-spacing: -.02em; }
.showcase__mood { font: italic 400 1.05rem/1.2 var(--serif); color: var(--night-secondary); }
.showcase__hint { margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }
.showcase__controls { width: 100%; max-width: 920px; margin-top: 2.2rem; display: grid; gap: 1.6rem; justify-items: center; }
.chips { display: flex; gap: .5rem; overflow-x: auto; max-width: 100%; padding: .4rem .2rem .8rem; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 1.2rem, #000 calc(100% - 1.2rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 1.2rem, #000 calc(100% - 1.2rem), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; scroll-snap-align: center; display: inline-flex; align-items: center; gap: .55rem; min-height: 44px;
  padding: .3rem .95rem .3rem .35rem; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(245,244,240,.06); color: var(--night-secondary); font: 500 .9rem/1 var(--sans);
  box-shadow: inset 0 0 0 1px rgba(245,244,240,.1); transition: background-color .3s, color .3s, box-shadow .3s, transform .3s var(--ease-out);
}
.chip:hover { color: var(--paper); transform: translateY(-1px); }
.chip[aria-checked="true"] { background: var(--paper); color: var(--ink); box-shadow: none; }
.chip .kc { width: 46px; border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.namefield { display: grid; gap: .45rem; width: min(100%, 22rem); text-align: center; }
.namefield__label { font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--copper-on-night); }
.namefield input { height: 50px; border-radius: 999px; border: 0; padding: 0 1.2rem; text-align: center; font: 500 1.05rem var(--sans); letter-spacing: -.01em; color: var(--paper); background: rgba(245,244,240,.06); box-shadow: inset 0 0 0 1px rgba(245,244,240,.16); outline: 0; transition: box-shadow .3s; }
.namefield input:focus { box-shadow: inset 0 0 0 1px rgba(201,137,106,.9), 0 0 0 4px rgba(163,102,72,.18); }
.namefield input::placeholder { color: rgba(245,244,240,.4); }
.namefield__note { font-size: .78rem; color: var(--muted); }

/* ══ 4 · A better way (paper, editorial) ════════════════════════════════════════════════════════════════════ */
.better { position: relative; padding: var(--section) 0; }
.manifesto { list-style: none; max-width: var(--maxw); margin: clamp(3rem, 2rem + 4vw, 6rem) auto 0; padding: 0 var(--gutter); }
.manifesto__line { display: grid; grid-template-columns: 2.5rem 1fr; gap: .4rem 1rem; padding: clamp(1.6rem, 1rem + 2vw, 2.8rem) 0; border-top: 1px solid rgba(23,23,23,.12); }
.manifesto__line:last-child { border-bottom: 1px solid rgba(23,23,23,.12); }
.manifesto__no { grid-row: span 2; font: italic 400 1.1rem/1 var(--serif); color: var(--copper-on-paper); padding-top: .6em; }
.manifesto__big { font-size: clamp(2.6rem, 1.4rem + 5.6vw, 6.4rem); font-weight: 600; line-height: .95; letter-spacing: -.05em; }
.manifesto__small { color: var(--paper-secondary); max-width: 36ch; }
@media (min-width: 900px) {
  .manifesto__line { grid-template-columns: 4rem 1fr 18rem; align-items: end; }
  .manifesto__no { grid-row: auto; padding: 0 0 .9rem; }
  .manifesto__small { padding-bottom: .7rem; }
}
.better__object { position: absolute; right: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); top: calc(var(--section) * .55); width: clamp(150px, 16vw, 230px); transform: rotate(8deg); }
@media (max-width: 899px) { .better__object { display: none; } }

/* ══ 5 · Final CTA (night) ══════════════════════════════════════════════════════════════════════════════════ */
.final { position: relative; max-width: var(--maxw); margin: 0 auto; padding: var(--section) var(--gutter) calc(var(--section) * .8); text-align: center; display: grid; justify-items: center; }
.final .lede { margin-inline: auto; }
.final .join { margin-inline: auto; width: 100%; }
.final .join__note { margin-left: 0; text-align: center; }
.h2--final { max-width: 12ch; }
/* the cards are transformed (they paint above static text): keep the copy above their shadows */
.final > :not(.final__cards) { position: relative; z-index: 1; }
.final__cards { position: relative; width: min(70vw, 300px); height: clamp(120px, 26vw, 190px); margin-bottom: 2.8rem; perspective: 1400px; }
.final__card { position: absolute; width: 78%; left: 50%; top: 50%; }
.final__card--a { transform: translate(-62%, -58%) rotate(-8deg); }
.final__card--b { transform: translate(-38%, -38%) rotate(5deg); }

/* ── Footer ──────────────────────────────────────────────────────────────────────────────────────────────── */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 2.2rem var(--gutter) calc(3.8rem + env(safe-area-inset-bottom)); display: grid; gap: 1.2rem; border-top: 1px solid rgba(245,244,240,.08); color: var(--muted); font-size: .88rem; }
.footer__mark { height: 22px; width: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.footer__links a { text-decoration: none; padding: .35rem 0; transition: color .2s; }
.footer__links a:hover { color: var(--paper); }
.footer__legal { margin: 0; font-size: .8rem; }
@media (min-width: 900px) { .footer { grid-template-columns: auto 1fr auto; align-items: center; } .footer__links { justify-content: center; } }

/* Review screenshots (?shot=1) */
.is-shot, .is-shot body { scroll-behavior: auto; }
.is-shot *, .is-shot *::before, .is-shot *::after { animation: none !important; transition: none !important; }
.is-shot [data-stage-section="paper"] { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax); }
.is-shot [data-stage-section="night"] { background: var(--night); color: var(--paper); box-shadow: 0 0 0 100vmax var(--night); clip-path: inset(0 -100vmax); }/* full-page captures use a very tall window: pin the viewport-relative hero to a real phone/desktop height */
.is-shot .hero { min-height: 844px; }
.is-shot .hero__table { min-height: 320px; }
@media (min-width: 960px) { .is-shot .hero { min-height: 900px; } .is-shot .hero__table { min-height: 740px; } }

/* ── Reduced motion: a still, composed page ──────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .deal, .float, .scroll-cue span { animation: none !important; }
  .reveal, .reveal-group > * { opacity: 1; transform: none; filter: none; transition: none; }
  .hero .tilt, .showcase__card, .showcase__layer { transition: none !important; }
  .hero .tilt { transform: none; }
  .showcase__card { transform: rotateY(var(--turn, 0deg)); }
  .backdrop__paper, body { transition-duration: .01s; }
}
