/* Nightstub site. Colors are the app's own tokens (ios/Nightstub/Design/Tokens.swift). */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #000000;
  --card: #1c1c1e;
  --ink: #f5f5f7;
  --ink2: #ebebf5;
  --muted: rgb(235 235 245 / 0.62);
  --sep: rgb(235 235 245 / 0.16);
  --accent: #ff5a2e;
  --on-accent: #111214;
  --gutter: 20px;
  --radius: 20px;
  color-scheme: dark light;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f2f7;
    --card: #ffffff;
    --ink: #111214;
    --ink2: #3c3c43;
    --muted: rgb(60 60 67 / 0.66);
    --sep: rgb(60 60 67 / 0.14);
    --accent: #e8441a;
    --on-accent: #ffffff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* The app's headings are SF Pro Expanded Heavy; Archivo at 125% width is the closest web match. */
.display {
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 125%;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

header.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.wordmark { font-size: 24px; text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px;
  border-radius: 14px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 17px; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.97); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hero: copy left, the entry-code screen right; stacked on phones. */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  padding: 40px 0 72px;
}
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); margin: 0 0 20px; }
.hero p.lede { font-size: 20px; color: var(--ink2); max-width: 30ch; margin: 0 0 32px; }
.hero .note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.phone {
  border-radius: 46px;
  padding: 10px;
  background: #0b0b0c;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 30px 80px rgb(0 0 0 / 0.45);
}
.phone img { border-radius: 37px; width: 100%; }
.hero .phone { width: min(320px, 38vh * 0.5 + 120px); justify-self: center; transform: rotate(3deg); }

/* Three moments of a night, phones at different heights so it reads as a sequence, not a grid of cards. */
.moments { padding: 40px 0 88px; }
.moments h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 48px; max-width: 18ch; }
.moments ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; align-items: start;
}
.moments li:nth-child(2) { margin-top: 56px; }
.moments li:nth-child(3) { margin-top: 112px; }
.moments h3 { font-size: 22px; margin: 24px 0 6px; }
.moments p { margin: 0; color: var(--muted); max-width: 32ch; }

.beta {
  border-top: 1px solid var(--sep);
  padding: 72px 0;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.beta h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; }
.beta p { margin: 0; color: var(--ink2); max-width: 52ch; }

footer {
  border-top: 1px solid var(--sep);
  padding: 28px 0 40px;
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center;
  font-size: 15px; color: var(--muted);
}
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .grow { flex: 1; }

/* Legal pages */
.doc { max-width: 720px; padding: 24px 0 72px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin: 16px 0 8px; }
.doc .updated { color: var(--muted); margin: 0 0 36px; font-size: 15px; }
.doc h2 { font-size: 21px; margin: 40px 0 10px; font-family: inherit; font-stretch: normal; letter-spacing: 0; }
.doc p, .doc li { color: var(--ink2); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .summary {
  background: var(--card); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 8px;
}
.doc .summary p { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--sep); }
.doc th { color: var(--ink); font-weight: 600; }
.doc td { color: var(--ink2); }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .rise.d1 { animation-delay: 0.08s; }
  .rise.d2 { animation-delay: 0.16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
  .hero .phone.rise { animation-name: rise-tilt; }
  @keyframes rise-tilt { from { opacity: 0; transform: translateY(24px) rotate(0deg); } }
}

@media (max-width: 767px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 16px 0 56px; }
  .hero p.lede { font-size: 18px; }
  .hero .phone { max-width: 270px; }
  .moments ol { grid-template-columns: 1fr; gap: 48px; }
  .moments li:nth-child(2), .moments li:nth-child(3) { margin-top: 0; }
  .moments .phone { max-width: 270px; }
  .beta { grid-template-columns: 1fr; padding: 56px 0; }
  .doc table, .doc thead, .doc tbody, .doc tr, .doc th, .doc td { display: block; }
  .doc thead { display: none; }
  .doc tr { border-bottom: 1px solid var(--sep); padding: 10px 0; }
  .doc td { border: 0; padding: 2px 0; }
  .doc td:first-child { color: var(--ink); font-weight: 600; }
}
