/* The Cool Table — landing page (/). One composition in the app's own
   language: ink and cream bands, gold only on ink, Doto Ticket caps for
   display, Space Mono Regular under it, dashed pixel rules, square boxes, no
   shadows or gradients. Silkscreen survives in the wordmark alone. /beta
   shares this file; legal pages keep styles.css. */

@font-face {
  font-family: "Doto Ticket";
  src: url("/fonts/DotoTicket-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("/fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f2ece1;
  --paper-muted: #e6dfd0;
  --ink: #1a1714;
  --ink-soft: #5c574d;
  --ink-quiet: #6e6659;
  --accent: #c8553d;
  --gold: #c9a227;
  --on-ink: #e6dfd0;
  --on-ink-quiet: #a39b8c;
  --bezel: #4a453b;
  --rule-ink: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px);
  --rule-quiet: repeating-linear-gradient(90deg, rgba(26, 23, 20, 0.35) 0 2px, transparent 2px 4px);
  --rule-on-ink: repeating-linear-gradient(90deg, rgba(230, 223, 208, 0.4) 0 2px, transparent 2px 4px);
  --doto: "Doto Ticket", "Space Mono", ui-monospace, monospace;
  --pixel: "Silkscreen", "Space Mono", ui-monospace, monospace;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  --gutter: 22px;
  --measure: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 24px;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.band-ink {
  background: var(--ink);
  color: var(--on-ink);
}

.band-paper {
  background: var(--paper);
  color: var(--ink);
}

/* Doto display: caps, line-height never under 1.05 x size. */
.display {
  margin: 0;
  font-family: var(--doto);
  font-weight: 900;
  text-transform: uppercase;
}

/* The full stop is a square pixel in its own colour, as in the app. */
.dot {
  color: var(--accent);
}

.band-ink .dot {
  color: var(--paper);
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

.band-ink .eyebrow {
  color: var(--on-ink-quiet);
}

/* Buttons: a solid block that inverts on hover. Never a weight change. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 16px 24px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.btn:hover {
  background: transparent;
  color: var(--ink);
}

.band-ink .btn {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.band-ink .btn:hover {
  background: transparent;
  color: var(--paper);
}

.btn:focus-visible,
.link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn:active {
  transform: translateY(1px);
}

.link {
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 6px;
  background: var(--rule-on-ink) bottom left / 100% 2px no-repeat;
}

.link:hover {
  color: var(--gold);
}

/* ── Top bar ─────────────────────────────────────────────────────────── */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: 20px;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}

.mark {
  width: 36px;
  height: 36px;
  flex: none;
  color: var(--gold);
}

.wordmark {
  margin: 0;
  font-family: var(--pixel);
  font-size: 14px;
  line-height: 16px;
}

.wordmark .dot {
  color: var(--gold);
}

/* The seats take their places one by one. */
.bar .seat {
  animation: take-seat 480ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bar g > g:nth-child(1) .seat { animation-delay: 200ms; }
.bar g > g:nth-child(2) .seat { animation-delay: 320ms; }
.bar g > g:nth-child(3) .seat { animation-delay: 440ms; }
.bar g > g:nth-child(4) .seat { animation-delay: 560ms; }
.bar g > g:nth-child(5) .seat { animation-delay: 680ms; }

@keyframes take-seat {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
}

.bar-link {
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 14px;
  border: 1.5px solid rgba(230, 223, 208, 0.5);
  color: var(--on-ink);
  transition: border-color 120ms ease, color 120ms ease;
}

.bar-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
}

/* A dot field behind the phone: the globe's grid, in gold, fading out. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.34) 1px, transparent 1.6px) 0 0 / 12px 12px;
  -webkit-mask-image: radial-gradient(ellipse 46% 62% at 76% 64%, #000 0, transparent 100%);
  mask-image: radial-gradient(ellipse 46% 62% at 76% 64%, #000 0, transparent 100%);
  pointer-events: none;
}

.hero > * {
  position: relative;
}

.hero-grid {
  display: grid;
  gap: 40px;
  padding-top: 28px;
}

.hero h1 {
  font-size: clamp(26px, 8.4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0.5px;
  color: var(--gold);
}

.hero-sub {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 26px;
  color: var(--paper);
}

.hero-lede {
  margin: 14px 0 0;
  max-width: 440px;
  font-size: 14px;
  line-height: 22px;
  color: var(--on-ink-quiet);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 28px;
}

/* One phone frame for every screen: the bezel from the App Store art
   (a warm grey ring, 11.5 % corner) drawn in CSS around a full screenshot.
   .device is the window: it shows the top of the phone and lets the rest run
   off its bottom edge; .hang shows the bottom instead; .tall shows more. */
.device {
  --show: 1320 / 1960;
  container-type: inline-size;
  aspect-ratio: var(--show);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

.device.hang {
  align-items: flex-end;
}

.device-body {
  flex: none;
  width: 100%;
  border: 4px solid var(--bezel);
  border-width: 1.3cqw;
  border-radius: 36px;
  border-radius: 11.5cqw;
  overflow: hidden;
  background: var(--paper);
}

.device-body img {
  width: 100%;
  height: auto;
}

.hero-phone {
  --show: 1320 / 1700;
  width: min(82%, 320px);
  margin: 0 auto;
}

/* ── Inside the app ──────────────────────────────────────────────────── */

.inside {
  padding: 56px 0 8px;
}

.inside-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.inside-head::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--rule-quiet);
}

.feature {
  display: grid;
  gap: 24px;
  padding: 36px 0 48px;
}

.feature + .feature {
  background: var(--rule-quiet) top left / 100% 2px no-repeat;
  padding-top: 48px;
}

.feature h2 {
  margin-top: 14px;
  font-size: clamp(30px, 8.6vw, 36px);
  line-height: 1.07;
  letter-spacing: 1px;
}

.feature p.feature-copy {
  margin: 14px 0 0;
  max-width: 400px;
  color: var(--ink-soft);
}

/* The phone sits in an ink tile: square, flat, the App Store panel's own
   ground, so the bezel reads the way it was drawn. */
.tile {
  background: var(--ink);
  padding: 36px 0 0;
}

.tile .device {
  width: min(72%, 300px);
  margin: 0 auto;
}

/* The globe row shows the whole screen down to its stats line, so the Table
   above it is never cut. */
.tile .device.tall {
  --show: 1320 / 2440;
}

/* Cultures at the table: two phones, one hanging from the top of the tile
   with the ring in view, one rising from the bottom with the breakdown. */
.tile-pair {
  display: grid;
  gap: 36px;
  padding: 0;
}

.tile-pair .device {
  --show: 1320 / 1700;
}

.tile-pair .device.hang {
  --show: 1320 / 1560;
}

/* ── The film ────────────────────────────────────────────────────────── */

.film {
  padding: 64px 0;
}

.film-grid {
  display: grid;
  gap: 28px;
}

.film h2 {
  font-size: clamp(32px, 9.4vw, 44px);
  line-height: 1.06;
  letter-spacing: 1px;
  color: var(--gold);
}

.film-copy {
  margin: 18px 0 0;
  max-width: 400px;
  font-size: 18px;
  line-height: 26px;
  color: var(--on-ink);
}

.film-frame {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.film video {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border: 1.5px solid var(--bezel);
  background: #0b0908;
}

.film .btn {
  width: 100%;
  margin-top: 16px;
}

/* ── How it works ────────────────────────────────────────────────────── */

.how {
  padding: 64px 0;
}

.how h2 {
  font-size: clamp(30px, 8.6vw, 36px);
  line-height: 1.07;
  letter-spacing: 1px;
}

.steps {
  display: grid;
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 20px 0 24px;
  background: var(--rule-ink) top left / 100% 2px no-repeat;
  counter-increment: step;
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--doto);
  font-weight: 900;
  font-size: 44px;
  line-height: 47px;
  color: var(--accent);
}

.steps h3 {
  margin: 10px 0 0;
  font-family: var(--doto);
  font-weight: 900;
  font-size: 20px;
  line-height: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.steps p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-soft);
}

/* ── Close ───────────────────────────────────────────────────────────── */

.close {
  padding: 72px 0 0;
  text-align: center;
}

.close .mark {
  width: 56px;
  height: 56px;
  margin: 0 auto;
}

.close h2 {
  margin-top: 24px;
  font-size: clamp(36px, 10.4vw, 56px);
  line-height: 1.06;
  letter-spacing: 1px;
  color: var(--gold);
}

.close p {
  margin: 14px auto 0;
  max-width: 420px;
  font-size: 14px;
  line-height: 22px;
  color: var(--on-ink-quiet);
}

.close .btn {
  margin-top: 28px;
}

.footer {
  margin-top: 72px;
  padding-top: 18px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  background: var(--rule-on-ink) top left / 100% 2px no-repeat;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.footer a {
  color: var(--on-ink-quiet);
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--paper);
}

/* ── Wider screens ───────────────────────────────────────────────────── */

@media (min-width: 720px) {
  :root {
    --gutter: 40px;
  }

  .bar {
    padding-top: 28px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: end;
    gap: 48px;
    padding-top: 40px;
  }

  .hero-text {
    align-self: center;
    padding-bottom: 72px;
  }

  .hero h1 {
    font-size: clamp(34px, 4.5vw, 58px);
  }

  .hero-sub {
    margin-top: 24px;
    font-size: 22px;
    line-height: 30px;
  }

  .hero-lede {
    font-size: 15px;
    line-height: 24px;
  }

  .hero-phone {
    --show: 1320 / 1900;
    width: 100%;
    max-width: 360px;
    margin: 0 0 0 auto;
  }

  .inside {
    padding-top: 88px;
  }

  .feature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 64px;
    padding: 64px 0;
  }

  .feature + .feature {
    padding-top: 64px;
  }

  .feature:nth-of-type(even) .tile {
    order: -1;
  }

  .feature h2 {
    font-size: clamp(32px, 3.9vw, 44px);
  }

  .tile {
    padding-top: 56px;
  }

  .tile .device {
    width: min(62%, 320px);
  }

  /* The cultures row gives its tile the wider column, so both phones are
     large enough to read the ring. */
  .feature-wide {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 56px;
  }

  .tile-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    padding: 0 44px;
  }

  .tile-pair .device {
    --show: 1320 / 1820;
    width: 100%;
    margin-top: 88px;
    align-self: end;
  }

  .tile-pair .device.hang {
    --show: 1320 / 1820;
    margin-top: 0;
    margin-bottom: 88px;
    align-self: start;
  }

  .film {
    padding: 96px 0;
  }

  .film-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 64px;
  }

  .film h2 {
    font-size: clamp(44px, 5.4vw, 64px);
  }

  .film-frame {
    margin: 0;
  }

  .how {
    padding: 96px 0;
  }

  .how h2 {
    font-size: 44px;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    margin-top: 40px;
  }

  .close {
    padding-top: 104px;
  }

  .footer {
    margin-top: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bar .seat {
    animation: none;
  }
}

/* ── /beta: the same bands, with the two ways in ─────────────────────── */

.hero-text > .eyebrow {
  margin-bottom: 14px;
}

.join-actions {
  display: grid;
  gap: 10px;
  max-width: 400px;
  margin-top: 28px;
}

.btn {
  gap: 12px;
}

.btn-logo {
  width: 16px;
  height: 16px;
  flex: none;
}

/* Second store: outlined, same footprint as the solid block. */
.band-ink .btn-alt {
  background: transparent;
  color: var(--paper);
}

.band-ink .btn-alt:hover {
  background: var(--paper);
  color: var(--ink);
}

.join-note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--on-ink-quiet);
}

.join-note a:hover {
  color: var(--gold);
}

.guides {
  display: grid;
  gap: 56px;
}

.guide h2 {
  margin-top: 12px;
}

.guide-steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.guide-steps li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  background: var(--rule-quiet) top left / 100% 2px no-repeat;
  font-size: 14px;
  line-height: 22px;
  counter-increment: step;
}

.guide-steps li:first-child {
  background-image: var(--rule-ink);
}

.guide-steps li::before {
  content: "0" counter(step);
  flex: none;
  width: 36px;
  font-family: var(--doto);
  font-weight: 900;
  font-size: 20px;
  line-height: 22px;
  letter-spacing: 2px;
  color: var(--accent);
}

.guide-steps strong {
  font-weight: 400;
  background: var(--paper-muted);
  padding: 1px 5px;
}

.guide-note {
  margin: 4px 0 0;
  padding-top: 16px;
  background: var(--rule-quiet) top left / 100% 2px no-repeat;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-soft);
}

.close-quiet {
  padding-top: 56px;
}

.close-quiet .mark {
  width: 40px;
  height: 40px;
}

.close-quiet .footer {
  margin-top: 40px;
}

@media (min-width: 720px) {
  .guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 72px;
  }
}
