/* Popkin — popkin.watch
   Palette mirrors the app's LB.* tokens (app/Letterwatchd/Theme/Theme.swift). Dark only. */

:root {
  --bg: #14181c;
  --bg-raised: #1c2229;
  --surface: #2c3440;
  --surface-2: #38424f;
  --text: #e9eef3;
  --text-2: #99aabb;   /* muted: 7.5:1 on --bg, the floor for small text */
  --orange: #ff8000;   /* the one accent */
  --you: #3fb9a6;
  --them: #e86a8c;
  --line: rgba(255, 255, 255, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  /* projector glow behind header + hero */
  background:
    radial-gradient(ellipse 60rem 34rem at 78% 8rem, rgba(255, 128, 0, 0.14), transparent 70%),
    radial-gradient(ellipse 40rem 26rem at 5% 36rem, rgba(63, 185, 166, 0.07), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--text); text-decoration-color: rgba(255, 128, 0, 0.6); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--orange); text-decoration-color: var(--orange); }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--bg); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Wordmark ---------- */

.wordmark {
  display: inline-block;
  font: 800 1.5rem/1 var(--font-display);
  letter-spacing: -0.035em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--text); }
.wm-i { position: relative; display: inline-block; }
/* the i's tittle is a single orange kernel */
.wm-i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.02em;
  width: 0.24em;
  height: 0.24em;
  margin-left: -0.12em;
  border-radius: 50%;
  background: var(--orange);
}

/* ---------- Header ---------- */

.site-header { padding-block: 1.5rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header nav a { color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--orange); }

/* ---------- Hero ---------- */

.hero {
  overflow: hidden;
  padding-block: clamp(2.5rem, 8vw, 6rem) clamp(3.5rem, 9vw, 7rem);
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 4rem);
}
.hero h1 {
  margin: 0 0 1.25rem;
  font: 800 clamp(2.6rem, 8.5vw, 4.75rem)/1.02 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--orange); }
.hero .lede {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.5;
  color: var(--text-2);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.45rem 0.95rem 0.45rem 0.8rem;
  border: 1px solid rgba(255, 128, 0, 0.45);
  border-radius: 999px;
  background: rgba(255, 128, 0, 0.08);
  font-size: 0.95rem;
  font-weight: 600;
}
.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 128, 0, 0.18);
}

/* decorative "secret ballot": three face-down posters, one revealed */
.ballot {
  position: relative;
  height: clamp(16rem, 34vw, 22rem);
}
.ballot span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(7.5rem, 15vw, 10rem);
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 8px, transparent 8px 16px),
    var(--surface);
}
.ballot span::after {
  position: absolute;
  left: 0.6rem;
  bottom: 0.5rem;
  font: 800 1.6rem/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  color: rgba(233, 238, 243, 0.35);
}
.ballot .b1 { transform: translate(-115%, -50%) rotate(-9deg); }
.ballot .b2 { transform: translate(15%, -50%) rotate(8deg); }
.ballot .b1::after { content: "3"; }
.ballot .b2::after { content: "2"; left: auto; right: 0.6rem; }
.ballot .b3 {
  z-index: 1;
  transform: translate(-50%, -54%);
  border-color: rgba(255, 128, 0, 0.6);
  background:
    linear-gradient(180deg, transparent 45%, rgba(20, 24, 28, 0.85)),
    radial-gradient(circle at 30% 25%, rgba(255, 128, 0, 0.9), transparent 55%),
    radial-gradient(circle at 75% 60%, rgba(232, 106, 140, 0.75), transparent 60%),
    linear-gradient(160deg, #3a2a20, #1c2229);
}
.ballot .b3::after { content: "1"; color: var(--text); }

/* ---------- Sections ---------- */

section { padding-block: clamp(3rem, 8vw, 5.5rem); }
section + section { border-top: 1px solid var(--line); }

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--orange);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h2 {
  margin: 0 0 2rem;
  font: 750 clamp(1.75rem, 4.5vw, 2.5rem)/1.15 var(--font-display);
  letter-spacing: -0.025em;
}
h3 {
  margin: 0 0 0.4rem;
  font: 700 1.15rem/1.3 var(--font-display);
  letter-spacing: -0.01em;
}

/* how it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.5rem 1.5rem 1.6rem;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  border: 2px solid var(--orange);
  color: var(--orange);
  font: 800 1rem/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}
.steps p, .features p { margin: 0; color: var(--text-2); }

/* features */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 2.5rem;
}
.features li { padding-top: 1rem; border-top: 2px solid var(--surface); }
.features li:nth-child(3n + 1) { border-top-color: var(--orange); }
.works-with {
  margin: 2.75rem 0 0;
  color: var(--text-2);
  font-weight: 600;
}

/* contact */
.contact { text-align: center; }
.contact p { margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.35rem); }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.6;
}
.site-footer p { margin: 0 0 0.35rem; }
.footer-links { margin-bottom: 1.25rem !important; font-size: 0.95rem; }
.footer-links a { color: var(--text); }
.footer-links .sep { margin-inline: 0.5rem; color: var(--text-2); }
.tmdb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}
.tmdb img { height: 0.875rem; width: auto; flex: none; }
.copyright { margin-top: 1rem !important; }

/* ---------- Privacy ---------- */

.prose {
  max-width: 42rem;
  padding-block: clamp(1.5rem, 5vw, 3rem) clamp(3rem, 8vw, 5rem);
}
.prose h1 {
  margin: 0 0 0.5rem;
  font: 800 clamp(2.4rem, 7vw, 3.5rem)/1.05 var(--font-display);
  letter-spacing: -0.035em;
}
.prose .updated { margin: 0 0 2rem; color: var(--text-2); font-size: 0.95rem; }
.prose h2 { margin: 2.75rem 0 0.85rem; font-size: clamp(1.35rem, 3.5vw, 1.6rem); }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.6rem; }
.prose li::marker { color: var(--orange); }
.prose strong { font-weight: 650; }

/* ---------- Narrow ---------- */

@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .ballot { height: 15rem; order: -1; margin-bottom: -0.5rem; }
  .steps, .features { grid-template-columns: 1fr; }
  .features { gap: 1.5rem; }
}
@media (min-width: 52.01rem) and (max-width: 64rem) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features li:nth-child(n) { border-top-color: var(--surface); }
  .features li:nth-child(2n + 1) { border-top-color: var(--orange); }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 0.15s ease, text-decoration-color 0.15s ease; }
}
