/* Drunk Diaries — waitlist.
   Dark only, on purpose: the app is locked to dark and this page is the same product.
   The rules here are the app's design system (drunk-diaries/docs/design-system.md):
   pure black, white type carrying the hierarchy, no cards or separators, one accent,
   and the pink-to-violet gradient on the primary action ONLY — its scarcity is the
   whole reason the CTA is unmissable. */

:root {
  --ink:        #FFFFFF;
  --ink-2:      rgba(255,255,255,.62);
  --ink-3:      rgba(255,255,255,.38);
  --bg:         #000000;
  --field:      #131313;
  --hairline:   rgba(255,255,255,.14);
  --accent:     #FF3D8B;
  --violet:     #8B5CF6;
  --on-accent:  #FFFFFF;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --stack:  clamp(4rem, 12vw, 8.5rem);

  /* SF Pro via the system stack. No custom font: text styles scale correctly on their
     own, and a webfont here would only be a slower copy of what the app already uses. */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -.035em; line-height: .98; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  padding: .75rem 1rem; background: var(--accent); color: var(--on-accent);
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

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


/* ── The mark ────────────────────────────────────────────────────────────────
   Two lowercase d's tilted opposite ways on a wobbling baseline — the same
   glyphs, tilts and drift as tools/make-icon.swift in the app repo, so the two
   cannot drift into being different marks. ±0.15rad = ±8.594°; the drift is
   0.030/0.38 of the type size; the pair is spaced a touch wide because the
   opposing tilts already lean them into each other. */
.mark {
  display: inline-flex;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .07em;
  font-style: normal;
  user-select: none;
}
.mark i { display: block; font-style: normal; }
.mark i:first-child { transform: rotate(-8.594deg) translateY(.079em); }
.mark i:last-child  { transform: rotate(8.594deg)  translateY(-.079em); }

.mark--xl {
  font-size: clamp(4.5rem, 17vw, 8rem);
  background: linear-gradient(135deg, var(--accent), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
}
.mark--sm { font-size: 1.5rem; }


/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 62rem; margin: 0 auto;
  padding: 1.25rem var(--gutter);
}
.topbar__note {
  color: var(--ink-3);
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}


/* ── Hero ────────────────────────────────────────────────────────────────── */
main { max-width: 62rem; margin: 0 auto; padding: 0 var(--gutter); }

.hero { padding: clamp(2rem, 8vw, 5rem) 0 var(--stack); }

h1 {
  font-size: clamp(2.75rem, 9.5vw, 5.75rem);
  max-width: 15ch;
  text-wrap: balance;
}

.lede {
  margin-top: clamp(1.25rem, 4vw, 1.75rem);
  max-width: 46ch;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1rem + .45vw, 1.3125rem);
  line-height: 1.45;
}


/* ── Waitlist form ───────────────────────────────────────────────────────── */
.waitlist { margin-top: clamp(2rem, 6vw, 3rem); max-width: 34rem; }

.waitlist__row { display: flex; flex-wrap: wrap; gap: .625rem; }

.waitlist input[type=email] {
  flex: 1 1 15rem;
  min-width: 0;
  padding: 1.0625rem 1.125rem;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}
.waitlist input::placeholder { color: var(--ink-3); }
.waitlist input:focus { border-color: var(--accent); }
.waitlist input[aria-invalid="true"] { border-color: var(--accent); }

.cta {
  flex: 0 0 auto;
  padding: 1.0625rem 1.625rem;
  border: 0; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: var(--on-accent);
  font: inherit; font-weight: 800; letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.cta:hover { transform: translateY(-1px); }
.cta:active { transform: translateY(0); opacity: .9; }
.cta[disabled] { opacity: .55; cursor: progress; transform: none; }

.cta--ghost {
  display: inline-block;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none;
}
.cta--ghost:hover { border-color: var(--accent); }

/* Off-screen rather than display:none — a bot that skips hidden fields is a bot the
   honeypot would not have caught. */
.trap {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.waitlist__fine { margin-top: .875rem; color: var(--ink-3); font-size: .875rem; }

.waitlist__status { margin-top: .625rem; font-size: .9375rem; font-weight: 600; min-height: 1.4em; }
.waitlist__status[data-state="error"] { color: var(--accent); }
.waitlist__status[data-state="ok"]    { color: var(--ink); }

.waitlist[data-done] .waitlist__row,
.waitlist[data-done] .waitlist__fine { display: none; }


/* ── The timeline ────────────────────────────────────────────────────────────
   The timestamp is the joke, so it is never small. */
.timeline { padding-bottom: var(--stack); }

/* Two per row below the breakpoint, four across above it. Grid rather than a wrapping
   flex row because flex wraps wherever it happens to run out of room — at 500px that
   is 3+1, which reads as a mistake rather than as a night in four parts. */
.timeline ol {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: clamp(.5rem, 2.4vw, 1.5rem) clamp(.75rem, 2.4vw, 1.5rem);
  align-items: baseline;
}
.timeline li {
  font-size: clamp(1.75rem, 6.2vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

/* The run of hours reading left to right IS the graphic, so above the breakpoint all
   four stay on one line, sized to what the 62rem container can hold. A 3+1 wrap reads
   as a mistake; the 2x2 below the breakpoint still reads as a sequence.
   This block must come after the base rule above — same specificity, so source order
   is what decides it, and having it first is exactly the bug that put the row into
   horizontal overflow between 768 and 1000px. */
@media (min-width: 48rem) {
  .timeline ol { grid-template-columns: repeat(4, max-content); }
  .timeline li { font-size: clamp(1.375rem, 3.1vw, 2.75rem); white-space: nowrap; }
}

/* Each hour leans a little further and fades a little more. The tilts are the mark's
   language (design-system.md), used here on the one element that is a hero. */
.timeline li:nth-child(1) { color: var(--ink);   transform: rotate(-1.5deg); }
.timeline li:nth-child(2) { color: rgba(255,255,255,.78); transform: rotate(1.2deg) translateY(.06em); }
.timeline li:nth-child(3) { color: rgba(255,255,255,.5);  transform: rotate(-2.4deg) translateY(-.04em); }
.timeline li:nth-child(4) { color: rgba(255,255,255,.28); transform: rotate(3.2deg) translateY(.09em); }

.timeline__caption {
  margin-top: clamp(1.5rem, 5vw, 2.25rem);
  max-width: 34ch;
  color: var(--ink-2);
}


/* ── Steps ───────────────────────────────────────────────────────────────── */
.steps { padding-bottom: var(--stack); }

.steps ol { display: grid; gap: clamp(2.25rem, 6vw, 3rem); }
@media (min-width: 48rem) { .steps ol { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }

.steps__n {
  display: block;
  color: var(--accent);
  font-size: .875rem; font-weight: 800; letter-spacing: .12em;
  margin-bottom: .875rem;
}
.steps h3 { font-size: clamp(1.375rem, 3.5vw, 1.75rem); }
.steps p { margin-top: .75rem; color: var(--ink-2); font-size: 1rem; max-width: 34ch; }


/* ── Privacy ─────────────────────────────────────────────────────────────── */
.privacy { padding-bottom: var(--stack); }
.privacy h2 { font-size: clamp(2rem, 6.5vw, 3.5rem); max-width: 16ch; text-wrap: balance; }
.privacy p { margin-top: 1.25rem; max-width: 44ch; color: var(--ink-2); }


/* ── Closer ──────────────────────────────────────────────────────────────── */
.closer { padding-bottom: var(--stack); }
.closer p { font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 800; letter-spacing: -.02em; }
.closer .cta--ghost { margin-top: 1.5rem; }


/* ── Footer ──────────────────────────────────────────────────────────────── */
.foot {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  max-width: 62rem; margin: 0 auto;
  padding: 2rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-3);
}
.foot p { font-size: .875rem; }


.foot__links { display: flex; gap: 1.25rem; margin-left: auto; font-size: .875rem; }
.foot__links a { color: var(--ink-2); text-decoration: none; }
.foot__links a:hover, .foot__links a:focus-visible { color: var(--ink); text-decoration: underline; }
a.mark { color: inherit; text-decoration: none; }


/* ── Legal and support pages ─────────────────────────────────────────────── */
/* Reading pages, so the measure is the design: one column, body size, nothing to press. */
.legal { max-width: 40rem; padding: clamp(2rem, 8vw, 5rem) 0 var(--stack); }
.legal h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); max-width: none; }
.legal__lede { margin: 1.5rem 0 0; font-size: clamp(1.125rem, 2.4vw, 1.375rem); color: var(--ink); }
.legal__date { margin: .75rem 0 0; font-size: .875rem; color: var(--ink-3); }
.legal section { margin-top: 3rem; }
.legal h2 { font-size: 1.375rem; letter-spacing: -.02em; line-height: 1.15; }
.legal p, .legal ul { margin: .875rem 0 0; color: var(--ink-2); }
.legal ul { padding-left: 1.25rem; list-style: disc; }
.legal li::marker { color: var(--ink-3); }
.legal li + li { margin-top: .5rem; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--accent); text-underline-offset: .15em; }


@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .cta:hover { transform: none; }
}
