/* EachSwipe — paper and ink.
   One committed look: warm paper, black ink, and a single accent that follows the card on screen. */

:root {
  --paper: #F4EFE6;
  --paper-deep: #EAE2D3;
  --ink: #14120F;
  --ink-2: #4C463C;
  --ink-3: #8A8275;
  --line: rgba(20, 18, 15, .12);
  --accent: #D9432B;           /* set live from the current card */
  --accent-ink: #FFFFFF;
  --display: "Fraunces", "Tiro Devanagari Hindi", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.3, .64, 1);
  --gutter: clamp(20px, 4vw, 64px);
  /* wide enough to read, never taller than the space between header and footer */
  --phone-w: max(230px, min(clamp(240px, 24vw, 340px), calc((100vh - 230px) * 9 / 19.2)));
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color .9s ease;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* paper texture: a dot grid that fades away from the centre, and film grain over everything */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(20, 18, 15, .16) .8px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 60% 45%, #000 20%, transparent 75%);
  opacity: .8;
}
.grain {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50;
  pointer-events: none; opacity: .13; mix-blend-mode: multiply;
}
.halo {
  position: fixed; z-index: 0; pointer-events: none;
  width: min(80vw, 900px); aspect-ratio: 1; border-radius: 50%;
  right: -10vw; top: 50%; transform: translate(0, -50%) scale(.6);
  background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 38%, transparent), transparent 70%);
  filter: blur(40px);
  opacity: 0;
  transition: background .9s ease, transform 1.4s var(--ease-out), opacity 1.4s ease;
}
body.ready .halo { opacity: 1; transform: translate(var(--hx, 0px), calc(-50% + var(--hy, 0px))) scale(1); }

/* header */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark .m1 { fill: var(--accent); transition: fill .9s ease; }
.brand-mark .m2 { fill: var(--ink); opacity: .42; }
.brand-mark .m3 { fill: var(--ink); opacity: .18; }
.brand-name {
  font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -.01em;
  font-variation-settings: "opsz" 24, "SOFT" 40, "WONK" 1;
}
.top-nav { display: flex; gap: 26px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.top-nav a { position: relative; padding: 6px 0; }
.top-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.top-nav a:hover::after { transform: scaleX(1); }

/* hero */
.hero {
  position: relative; z-index: 1; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center; gap: clamp(24px, 4vw, 64px);
  padding: clamp(12px, 2vh, 32px) var(--gutter) clamp(16px, 3vh, 40px);
  max-width: 1440px; width: 100%; margin: 0 auto;
}
.copy { max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: background .9s ease; box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }

.headline {
  margin: 0 0 26px;
  font-family: var(--display); font-weight: 480;
  font-size: clamp(50px, 7.4vw, 116px);
  line-height: .94; letter-spacing: -.035em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
  text-wrap: balance;
}
.headline .line { display: block; overflow: hidden; padding: .08em .12em .3em 0; margin: -.08em -.12em -.3em 0; }
.headline.settled .line { overflow: visible; }
.headline .w { display: inline-block; transform: translateY(110%); opacity: 0; }
body.ready .headline .w { animation: rise 1.1s var(--ease-out) forwards; }
.headline .line:nth-child(1) .w:nth-child(1) { animation-delay: .05s; }
.headline .line:nth-child(1) .w:nth-child(2) { animation-delay: .11s; }
.headline .line:nth-child(1) .w:nth-child(3) { animation-delay: .17s; }
.headline .line:nth-child(2) .w:nth-child(1) { animation-delay: .26s; }
.headline .line:nth-child(2) .w:nth-child(2) { animation-delay: .32s; }
.headline .line:nth-child(2) .w:nth-child(3) { animation-delay: .38s; }
.accent-word { font-style: italic; font-weight: 400; color: var(--accent); transition: color .9s ease; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
@keyframes rise { to { transform: translateY(0); opacity: 1; } }

.lede {
  margin: 0 0 34px; max-width: 520px;
  font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--ink-2);
  text-wrap: pretty;
}

.reveal { opacity: 0; transform: translateY(14px); }
body.ready .reveal { animation: fade-up 1s var(--ease-out) forwards; animation-delay: var(--d, .5s); }
.lede.reveal { --d: .5s; } .cta.reveal { --d: .62s; } .proof.reveal { --d: .74s; } .eyebrow.reveal { --d: .0s; } .stage-caption.reveal { --d: 1.1s; }
@keyframes fade-up { to { opacity: 1; transform: none; } }

/* call to action */
.cta { margin-bottom: 38px; }
.cta-row { display: flex; align-items: center; gap: 14px; min-height: 52px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px 14px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 15px; letter-spacing: -.005em;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 12px 30px -12px rgba(20,18,15,.5);
  transition: transform .35s var(--ease-spring), box-shadow .35s ease, background-color .3s ease;
}
.pill-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 30%, transparent); transition: background .9s ease, box-shadow .9s ease; }
.pill { border: 0; cursor: pointer; font-family: var(--sans); }
.pill-wide { width: 100%; justify-content: center; padding: 15px 22px; }
.pill.busy { opacity: .7; cursor: progress; }
.pill:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 20px 36px -14px rgba(20,18,15,.55); }
.pill:active { transform: translateY(0) scale(.99); }
.pill:focus-visible, .top-nav a:focus-visible, .foot-nav a:focus-visible, .feed:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 999px; }
.cta-note { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-3); }
.cta-note.error { color: #B3261E; }
.proof {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
}
.proof li { display: inline-flex; align-items: center; gap: 8px; }
.proof li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }

/* the phone */
.stage { display: flex; flex-direction: column; align-items: center; gap: 22px; perspective: 1600px; }
.phone {
  position: relative; width: var(--phone-w); aspect-ratio: 9 / 19.2;
  border-radius: calc(var(--phone-w) * .16);
  background: #0D0C0A;
  padding: calc(var(--phone-w) * .028);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 2px 0 rgba(255,255,255,.06) inset,
    0 40px 80px -30px rgba(20,18,15,.55),
    0 20px 40px -20px color-mix(in oklab, var(--accent) 40%, transparent);
  transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) translateY(40px);
  opacity: 0;
  transition: box-shadow .9s ease, transform .18s linear, opacity 1.2s ease;
  will-change: transform;
}
body.ready .phone { opacity: 1; transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) translateY(0); transition: box-shadow .9s ease, transform 1.4s var(--ease-out), opacity 1.2s ease; }
body.ready.tilting .phone { transition: box-shadow .9s ease, transform .18s linear; }
.phone-screen {
  position: absolute; inset: calc(var(--phone-w) * .028);
  border-radius: calc(var(--phone-w) * .135);
  background: #F7F2E8; overflow: hidden; isolation: isolate;
}
.island {
  position: absolute; z-index: 6; top: calc(var(--phone-w) * .04); left: 50%; transform: translateX(-50%);
  width: calc(var(--phone-w) * .30); height: calc(var(--phone-w) * .085); border-radius: 999px; background: #0D0C0A;
}
.progress {
  position: absolute; z-index: 5; top: calc(var(--phone-w) * .028); left: calc(var(--phone-w) * .05); right: calc(var(--phone-w) * .05);
  display: flex; gap: 4px;
}
.progress i { flex: 1; height: 2px; border-radius: 2px; background: rgba(20,18,15,.14); overflow: hidden; }
.progress i b { display: block; height: 100%; width: 0; background: var(--ink); opacity: .75; }
.progress i.done b { width: 100%; }
.progress i.live b { animation: fill var(--dwell, 4600ms) linear forwards; }
.feed.paused .progress i.live b { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }

.feed { position: absolute; inset: 0; touch-action: pan-x; cursor: grab; outline: none; }
.feed.dragging { cursor: grabbing; }
.card {
  position: absolute; inset: 0; overflow: hidden;
  transform: translateY(var(--y, 0)) scale(var(--s, 1));
  opacity: var(--o, 1);
  transition: transform .8s var(--ease-out), opacity .8s var(--ease-out);
  will-change: transform, opacity;
  background: #F7F2E8;
}
.feed.dragging .card { transition: none; }
/* The frames are 9:16 and the screen is taller. Show the whole frame, and fill the bands above and
   below with a blurred copy of itself, the way a video player does. */
.card img { position: absolute; inset: 0; width: 100%; height: 100%; }
.card img.bg { object-fit: cover; filter: blur(22px) saturate(1.15) brightness(.9); transform: scale(1.3); }
.card img.fg { object-fit: contain; }
.card .art-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 120px; color: rgba(20,18,15,.08); }
.card-chips {
  position: absolute; z-index: 2; left: calc(var(--phone-w) * .05); right: calc(var(--phone-w) * .05);
  bottom: calc(var(--phone-w) * .03); height: calc(var(--phone-w) * .175);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 4px;
}
.card-kicker, .card-meta {
  margin: 0; display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(14, 12, 10, .6); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: calc(var(--phone-w) * .032); line-height: 1.5; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset;
}
.card-kicker { overflow: hidden; text-overflow: ellipsis; display: block; flex: none; }
.card-kicker::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--card-accent); margin-right: 7px; vertical-align: 1px; }
.card-meta { font-weight: 500; }
.card-meta .len { padding: 1px 6px; border-radius: 999px; background: var(--card-accent); color: #fff; font-weight: 700; font-size: calc(var(--phone-w) * .028); letter-spacing: .02em; }

.swipe-hint {
  position: absolute; z-index: 7; right: calc(var(--phone-w) * .06); bottom: calc(var(--phone-w) * .06);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  opacity: 0; transition: opacity .6s ease;
}
.swipe-hint.show { opacity: .9; }
.hint-track { position: relative; width: 14px; height: 34px; border-radius: 999px; border: 1.5px solid var(--ink-2); }
.hint-thumb { position: absolute; left: 50%; top: 22px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--ink); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 20% { transform: translateY(0); opacity: 1; } 70%, 100% { transform: translateY(-16px); opacity: 0; } }

.stage-caption { margin: 0; font-size: 13.5px; color: var(--ink-3); text-align: center; max-width: 300px; }

/* footer */
.foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 18px var(--gutter) 26px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.foot p { margin: 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-nav a:hover { color: var(--ink); }

/* responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 8px; }
  .copy { max-width: none; }
  .headline { font-size: clamp(48px, 11.5vw, 88px); }
  :root { --phone-w: min(300px, 72vw); }
  .stage { padding-bottom: 8px; }
  .halo { right: -30vw; top: 62%; width: 120vw; }
  body::before { -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 70%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 90% 60% at 50% 70%, #000 10%, transparent 75%); }
}
@media (max-width: 560px) {
  .top { padding: 16px var(--gutter); }
  .top-nav { display: none; }
  .headline { font-size: clamp(44px, 14.5vw, 72px); }
  .cta-row { width: 100%; }
  .pill { width: 100%; justify-content: center; }
  .foot { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .headline .w, .reveal, .phone, .halo { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  .hint-thumb { animation: none; }
  .card { transition: none; }
}

/* the waitlist sheet */
.sheet {
  border: 0; padding: 0; margin: auto;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow: auto;
  border-radius: 28px; background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 100px -30px rgba(20,18,15,.6), 0 0 0 1px rgba(20,18,15,.06);
}
.sheet::backdrop { background: rgba(20, 18, 15, .42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sheet[open] { animation: sheet-in .5s var(--ease-out); }
.sheet[open]::backdrop { animation: fade-in .4s ease; }
.sheet.closing { animation: sheet-out .22s ease-in forwards; }
.sheet.closing::backdrop { animation: fade-out .22s ease-in forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } } @keyframes fade-out { to { opacity: 0; } }
.sheet-form, .sheet-done { position: relative; padding: 34px 36px 30px; }
.sheet-close {
  position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: color-mix(in oklab, var(--ink) 6%, transparent); color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: background .25s ease, transform .25s var(--ease-spring);
}
.sheet-close:hover { background: color-mix(in oklab, var(--ink) 12%, transparent); transform: rotate(90deg); }
.sheet-close svg { width: 16px; height: 16px; }
.sheet-eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); transition: color .9s ease; }
.sheet-title {
  margin: 0 0 10px; font-family: var(--display); font-weight: 480; font-size: 40px; line-height: 1; letter-spacing: -.03em;
  font-variation-settings: "opsz" 96, "SOFT" 30, "WONK" 1;
}
.sheet-title em { font-style: italic; font-weight: 400; color: var(--accent); font-variation-settings: "opsz" 96, "SOFT" 100, "WONK" 1; transition: color .9s ease; }
.sheet-lede { margin: 0 0 26px; font-size: 15px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.field label .opt { font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.field input, .field textarea {
  width: 100%; margin: 0; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: color-mix(in oklab, #fff 62%, transparent); color: var(--ink);
  font: inherit; font-size: 15px; line-height: 1.4; outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); background: #fff; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sheet-error { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #FBE9E7; color: #8F2418; font-size: 13.5px; }
.sheet-fine { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.sheet-fine a { text-decoration: underline; text-underline-offset: 3px; }
.sheet-done { text-align: center; padding-top: 44px; }
.done-mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; transition: background .9s ease; animation: pop .6s var(--ease-spring); }
.done-mark svg { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.sheet-done .sheet-lede { margin-bottom: 24px; }
body.sheet-open .grain { opacity: .08; }
@media (max-width: 560px) {
  .sheet { width: 100vw; max-width: none; max-height: calc(100dvh - 24px); margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet-form, .sheet-done { padding: 28px 22px calc(24px + env(safe-area-inset-bottom)); }
  .sheet-title { font-size: 34px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .sheet[open], .sheet[open]::backdrop, .done-mark { animation: none !important; } }
