/* Hash Poker: House Rules, lit like a night room.
   The rules live in DESIGN.md. Every colour, face, radius and duration used on
   any page comes from this block. Add a token here before using a new value. */
:root {
  /* Night: the room. Matches the navy of the logo and the in-app table. */
  --night: #00071f;
  --night-2: #0b1433;
  --lamp: #18285e;
  --cream: #f4eadc;
  --cream-2: rgba(244, 234, 220, .74);
  --night-rule: rgba(244, 234, 220, .16);
  --red-on-night: #ff4a4f;

  /* Paper: the rulebook. */
  --paper: #fbf8f2;
  --paper-2: #f2ebde;
  --ink: #00071f;
  --ink-2: #4b5067;
  --line: #e0d7c7;
  --red: #c90c12;
  --red-ink: #9d090e;

  /* Kept for the inline styles on /app-review/. */
  --navy: var(--night);
  --panel: var(--night-2);
  --muted: var(--ink-2);

  --font-display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Bodoni's display cut has hairlines that vanish on 1x screens; a mid
     optical size keeps the contrast and keeps the H and 4 legible. */
  --display-opsz: "opsz" 28;


  --radius: 10px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: 700ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--red-on-night); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }

/* Night surface: header, home bands, invite, footer. */
.night { background: var(--night); color: var(--cream); }
.night a:hover { color: #fff; }

/* Masthead, shared by every page. */
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 76px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-variation-settings: "opsz" 14; font-size: 22px; font-weight: 600;
  letter-spacing: -.01em; text-decoration: none; color: var(--cream);
  white-space: nowrap;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.masthead nav { display: flex; gap: 6px 22px; flex-wrap: wrap; justify-content: flex-end; }
.masthead nav a { text-decoration: none; font-size: 15px; color: var(--cream-2); padding: 10px 0; white-space: nowrap; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--cream); }
.masthead nav a[aria-current] { text-decoration: underline; }

/* Home: the room. One pool of light falls on the table. */
.room {
  background:
    radial-gradient(ellipse 60% 70% at 72% 48%, var(--lamp) 0%, transparent 70%),
    var(--night);
}
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px; align-items: center; padding-block: 40px 96px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 500; font-variation-settings: var(--display-opsz);
  font-size: clamp(46px, 8.4vw, 120px); line-height: .92; letter-spacing: -.035em;
  margin: 0 0 32px; overflow-wrap: anywhere;
}
.hero h1 span { display: block; }
.lede { font-size: clamp(18px, 2vw, 21px); max-width: 30em; margin: 0 0 20px; color: var(--cream); text-wrap: pretty; }
.small { font-size: 15px; color: var(--cream-2); margin: 0; }
.table-shot { margin: 0; justify-self: center; width: 100%; max-width: 340px; position: relative; }
.table-shot video, .table-shot img {
  display: block; width: 100%; height: auto; aspect-ratio: 540 / 1174;
  object-fit: cover; border-radius: 28px; background: var(--night-2);
  box-shadow: 0 40px 120px -20px rgba(40, 90, 255, .35);
}
.table-shot figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--cream-2); margin-top: 14px;
}
.pause {
  flex: none; min-height: 36px; padding: 0 14px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--cream);
  background: rgba(0, 7, 31, .7); border: 1px solid var(--night-rule); border-radius: 999px; cursor: pointer;
}

/* The single page-load moment. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero .small { animation: rise var(--dur) var(--ease-out) both; }
  .hero .lede { animation-delay: 120ms; }
  .hero .small { animation-delay: 200ms; }
  .table-shot { animation: fade 1200ms var(--ease-out) 250ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes fade { from { opacity: 0; } }
}

/* Home: what is in the app, on paper. */
.features { padding: 104px 0; }
.features .wrap { display: grid; gap: 56px; }
.features h2, .first h2 {
  font-family: var(--font-display); font-weight: 500; font-variation-settings: var(--display-opsz);
  font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.02em; margin: 0;
}
.features .intro { color: var(--ink-2); margin: 20px 0 0; max-width: 22em; }
/* Every still on the page lives in this one row (DESIGN.md Layout: stills).
   Each column's fr is its image's width / height, so all three render at the
   same height at any width without cropping real UI. */
.screens { display: grid; grid-template-columns: 1.028fr .653fr .870fr; gap: 40px; align-items: start; }
.still { margin: 0; }
.still img { display: block; width: 100%; height: auto; border-radius: 18px; }
.still figcaption { font-size: 14px; color: var(--ink-2); margin-top: 12px; }
.features dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 72px; }
.features dl > div { padding: 24px 0; border-top: 1px solid var(--line); }
.features dl > div:last-child { border-bottom: 1px solid var(--line); }
.features dt {
  font-family: var(--font-display); font-variation-settings: var(--display-opsz);
  font-size: 26px; font-weight: 500; line-height: 1.2; margin: 0 0 6px;
}
.features dd { margin: 0; color: var(--ink-2); max-width: 34em; }
.features .key { border-top: 2px solid var(--red); grid-column: 1 / -1; }
.features .key dt { color: var(--red-ink); }

/* Home: your first hand, back in the room. */
.first { padding: 104px 0 96px; }
.first .lede { color: var(--cream-2); margin-top: 20px; }
.first ol { margin: 48px 0 0; padding: 0; list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.first li { counter-increment: step; border-top: 1px solid var(--night-rule); padding-top: 20px; }
.first li::before {
  content: counter(step); display: block; font-family: var(--font-display); font-variation-settings: var(--display-opsz);
  font-size: 56px; line-height: 1; margin-bottom: 14px; color: var(--cream);
}
.first h3 { font-size: 18px; margin: 0 0 6px; font-weight: 600; }
.first p { margin: 0; font-size: 16px; color: var(--cream-2); }

/* Footer, shared by every page. */
.site-footer { padding: 48px 0 56px; border-top: 1px solid var(--night-rule); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer nav a { padding: 8px 0; text-decoration: none; color: var(--cream-2); }
.site-footer nav a:hover { color: var(--cream); text-decoration: underline; }
.site-footer p { margin: 0; color: var(--cream-2); max-width: 46em; }

/* Long reads: privacy, terms, support, app review. */
.topbar { background: var(--night); }
.doc { max-width: 720px; margin: 0 auto; padding: 64px 24px 96px; }
.doc h1 {
  font-family: var(--font-display); font-weight: 500; font-variation-settings: var(--display-opsz);
  font-size: clamp(40px, 6vw, 60px); line-height: 1.02; letter-spacing: -.025em; margin: 0 0 14px;
}
.doc .updated { color: var(--ink-2); font-size: 15px; margin: 0 0 40px; }
.doc h2 {
  font-family: var(--font-display); font-weight: 600; font-variation-settings: "opsz" 14;
  font-size: 26px; line-height: 1.2; letter-spacing: -.01em;
  margin: 48px 0 12px; color: var(--ink);
}
.doc p, .doc li { font-size: 17px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--ink); }
.deletion {
  margin: 0 0 40px; padding: 18px 22px; background: var(--paper-2);
  border-left: 3px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0; font-size: 16px;
}
.deletion a { color: var(--red-ink) !important; font-weight: 600; }
.doc > footer {
  border-top: 1px solid var(--line); margin-top: 56px; padding-top: 18px;
  color: var(--ink-2); font-size: 14px;
}

/* Invite (/app/invite/<code>) */
.invite { padding: 48px 0 104px; max-width: 36em; }
.invite h1 {
  font-family: var(--font-display); font-weight: 500; font-variation-settings: var(--display-opsz);
  font-size: clamp(44px, 8vw, 80px); line-height: .95; letter-spacing: -.03em; margin: 0 0 36px;
}
.invite p { font-size: 18px; margin: 0 0 10px; }
.invite .note { font-size: 16px; color: var(--cream-2); }
.invite-code {
  font-family: var(--font-mono); font-size: clamp(34px, 10vw, 56px) !important; font-weight: 700;
  letter-spacing: .14em; background: var(--night-2); border: 1px solid var(--night-rule);
  border-radius: var(--radius); padding: 14px 22px; margin: 0 0 28px !important; display: inline-block;
}
.invite-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; font: inherit; font-size: 16px; font-weight: 600;
  color: var(--cream); background: transparent; border: 1px solid rgba(244, 234, 220, .4);
  border-radius: var(--radius); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms, border-color 150ms;
}
.btn:hover { border-color: var(--cream); }
.btn-primary { background: var(--red); border-color: var(--red); }
.btn-primary:hover { background: #e01016; border-color: #e01016; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 48px 72px; gap: 40px; }
  .table-shot { max-width: 300px; }
  .features { padding: 72px 0; }
  .features .wrap { gap: 40px; }
  .screens { gap: 24px; }
  .features dl { grid-template-columns: minmax(0, 1fr); }
  .first { padding: 72px 0; }
  .first ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 20px; }
  .masthead .wrap { flex-wrap: wrap; min-height: 0; padding-top: 14px; padding-bottom: 6px; gap: 2px 16px; }
  .masthead nav { justify-content: flex-start; }
  .brand { font-size: 19px; }
  .brand img { width: 30px; height: 30px; }
  .masthead nav { gap: 0 16px; }
  .masthead nav a { font-size: 14px; }
  .first ol { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; }
  .first li { display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: 20px 0; }
  .first li::before { font-size: 32px; margin: 0; grid-row: span 2; }
  /* Phones: the row stacks, each still at one width. */
  .screens { grid-template-columns: minmax(0, 300px); gap: 32px; }
  .features dt { font-size: 23px; }
  .doc { padding: 44px 20px 72px; }
}
