/* The Last Vote – placeholder site. Single dark theme (it is the brand). */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07090a;
  --bg-raised: #0e1415;
  --bg-panel: #131b1d;
  --teal: #1d2729;
  --cream: #f1ece1;
  --cream-dim: rgba(241, 236, 225, 0.78);
  --muted: #8e8f89;
  --line: rgba(241, 236, 225, 0.12);
  --line-strong: rgba(241, 236, 225, 0.22);
  --orange: #ff5a1f;
  --orange-a: #ff4a12;
  --orange-b: #ff8a3d;
  --gutter: 20px;
  --max: 1160px;
  --pad-l: max(var(--gutter), env(safe-area-inset-left));
  --pad-r: max(var(--gutter), env(safe-area-inset-right));
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  isolation: isolate; /* keeps the z-index:-1 atmosphere above the page background */
  background: var(--bg);
  color: var(--cream);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Atmosphere: one emergency light, the rest is tunnel. */
.atmosphere {
  position: absolute;
  inset: 0 0 auto 0;
  height: min(1100px, 150vh);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(60% 46% at 78% 30%, rgba(255, 90, 31, 0.13), transparent 70%),
    radial-gradient(90% 60% at 20% 0%, rgba(29, 39, 41, 0.9), transparent 75%),
    linear-gradient(180deg, #0b1011 0%, var(--bg) 100%);
}
.atmosphere svg {
  position: absolute;
  display: none; /* tunnel arches only where they can sit behind the teaser, clear of the copy */
  top: -20px;
  left: min(calc(100% - 235px), calc(50% + 345px));
  width: 1500px;
  height: 1000px;
  transform: translateX(-50%);
  -webkit-mask-image: radial-gradient(33% 52% at 50% 47%, #000 30%, transparent 100%);
  mask-image: radial-gradient(33% 52% at 50% 47%, #000 30%, transparent 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, var(--bg));
}

a { color: inherit; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--orange-b);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection { background: var(--orange); color: #0a0a0a; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad-l);
  padding-right: var(--pad-r);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--pad-l);
  top: 12px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--cream);
  color: #0a0a0a;
  border-radius: 8px;
}

/* HUD label: small spaced uppercase, like the score bar chips. */
.label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.label b { color: var(--orange-b); font-weight: 700; }

/* ---------- Header ---------- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: 6px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 44px;
}
.brand-name {
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.tally { display: block; width: 46px; height: auto; overflow: visible; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 9, 10, 0.55);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cream);
}
.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px 2px rgba(255, 90, 31, 0.6);
}

/* ---------- The one orchestrated moment: four strokes, then the last vote ---------- */
.tally .tb { transform-box: fill-box; }
.tally .slash { stroke-dasharray: 1; stroke-dashoffset: 0; }
.tally .glow { opacity: 0.55; }

@media (prefers-reduced-motion: no-preference) {
  .tally--draw .tb { animation: tb-in 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .tally--draw .tb:nth-child(1) { animation-delay: 0.25s; }
  .tally--draw .tb:nth-child(2) { animation-delay: 0.47s; }
  .tally--draw .tb:nth-child(3) { animation-delay: 0.69s; }
  .tally--draw .tb:nth-child(4) { animation-delay: 0.91s; }
  .tally--draw .slash { animation: slash-draw 0.6s cubic-bezier(0.6, 0, 0.2, 1) 1.4s both; }
  .tally--draw .glow { animation: glow-in 0.7s ease-out 1.8s both; }
  .chip .dot { animation: dot-pulse 2.6s ease-in-out 2.6s infinite; }
}
@keyframes tb-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes slash-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes glow-in {
  from { opacity: 0; }
  to { opacity: 0.55; }
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 30px;
  padding-top: 26px;
  padding-bottom: 56px;
}
.hero-copy { min-width: 0; }
.hero h1 {
  margin: 14px 0 0;
  font-size: clamp(2.5rem, 11.6vw, 3.5rem);
  font-weight: 820;
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero h1 .after { display: block; color: rgba(241, 236, 225, 0.5); }
.lede {
  margin: 20px 0 0;
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--cream-dim);
  text-wrap: pretty;
}
.lede strong { color: var(--cream); font-weight: 650; }

.quick-follow { margin-top: 24px; }
.quick-follow ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(19, 27, 29, 0.7);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: border-color 0.18s, background-color 0.18s, color 0.18s;
}
.pill:hover { border-color: var(--orange); }
.pill--primary {
  border-color: transparent;
  background: linear-gradient(100deg, var(--orange-a), var(--orange-b));
  color: #0b0b0b;
  font-weight: 750;
}
.pill--primary:hover { border-color: var(--cream); }

/* ---------- Teaser ---------- */
.teaser { margin: 0; min-width: 0; }
.teaser-frame {
  position: relative;
  width: min(100%, 360px);
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #0b0f10;
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 30px 80px -20px rgba(0, 0, 0, 0.9),
    0 0 90px -30px rgba(255, 90, 31, 0.45);
}
.teaser-frame video {
  /* Out of flow: the video's intrinsic 1080x1920 must never size the grid track. */
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b0f10;
}
.teaser-ui {
  position: absolute;
  inset: 10px;
  pointer-events: none;
}
/* Sound sits top right so it is in view on a phone before scrolling. */
#teaser-sound { position: absolute; top: 0; right: 0; }
#teaser-play { position: absolute; bottom: 0; left: 0; }
.teaser-ui[hidden] { display: none; }
.ui-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 9, 10, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--cream);
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ui-btn:hover { border-color: var(--orange); }
.ui-btn svg { width: 16px; height: 16px; flex: none; }
.ui-btn[aria-pressed="true"] { border-color: var(--orange); color: #fff; }
.ui-btn .on,
.ui-btn[aria-pressed="true"] .off { display: none; }
.ui-btn[aria-pressed="true"] .on { display: inline; }
.ui-btn svg.on,
.ui-btn svg.off { display: none; }
.ui-btn[aria-pressed="false"] svg.off,
.ui-btn[aria-pressed="true"] svg.on { display: block; }
.teaser figcaption {
  margin-top: 14px;
  text-align: center;
}

/* ---------- Sections ---------- */
.section {
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
}
.section h2 {
  margin: 12px 0 0;
  font-size: clamp(1.875rem, 8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.beats {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: beat;
}
.beats li {
  counter-increment: beat;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 8px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.beats li::before {
  content: "0" counter(beat);
  grid-row: span 2;
  padding-top: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--orange-b);
}
.beats h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.beats p {
  margin: 0;
  color: var(--cream-dim);
  font-size: 1rem;
  text-wrap: pretty;
}

.follow-list {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.follow-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 16px;
  min-height: 76px;
  padding: 16px 18px 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-raised));
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s;
}
.follow-link:hover { border-color: var(--orange); }
.follow-link .platform {
  font-size: 1.375rem;
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.follow-link .handle {
  grid-column: 1;
  font-size: 0.875rem;
  color: var(--muted);
}
.follow-link .arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  color: var(--orange);
  transition: transform 0.18s;
}
.follow-link:hover .arrow { transform: translate(2px, -2px); }

/* ---------- Footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.875rem;
}
.site-foot .foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.site-foot p { margin: 0; }
.site-foot nav { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.site-foot a {
  display: inline-block;
  padding: 6px 0;
  color: var(--cream-dim);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.site-foot a:hover { color: var(--cream); text-decoration-color: var(--orange); }

/* "Cookie settings" in the footer looks like the other footer links. */
.foot-btn {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--cream-dim);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  cursor: pointer;
}
.foot-btn:hover { color: var(--cream); text-decoration-color: var(--orange); }
.foot-btn[hidden] { display: none; }

/* ---------- Consent banner (only rendered when analytics is configured) ---------- */
.consent {
  position: fixed;
  z-index: 20;
  left: var(--pad-l);
  right: var(--pad-r);
  bottom: max(12px, env(safe-area-inset-bottom));
  max-width: 440px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(14, 20, 21, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.9);
}
.consent[hidden] { display: none; }
.consent-text {
  margin: 8px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--cream-dim);
}
.consent-text a { color: var(--cream); text-decoration-color: var(--orange); text-underline-offset: 3px; }
/* Both choices equally prominent: same size, same style, no pre-selection. */
.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.consent-actions .pill { justify-content: center; color: var(--cream); font: inherit; font-size: 0.9375rem; font-weight: 650; cursor: pointer; }

/* ---------- Legal + 404 ---------- */
.doc {
  padding-top: 34px;
  padding-bottom: 64px;
  max-width: 720px;
}
.doc h1 {
  margin: 12px 0 0;
  font-size: clamp(2.25rem, 10vw, 3.25rem);
  font-weight: 820;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.doc h2 {
  margin: 36px 0 0;
  font-size: 1.1875rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.doc p,
.doc ul,
.doc address {
  margin: 10px 0 0;
  color: var(--cream-dim);
  font-style: normal;
  font-size: 1rem;
  overflow-wrap: break-word;
}
.doc ul { padding-left: 1.15em; }
.doc li { margin-top: 4px; }
.doc li::marker { color: var(--orange); }
.doc a { text-decoration-color: var(--orange); text-underline-offset: 4px; }
.doc .lang-jump { margin-top: 16px; font-size: 0.9375rem; }
.doc section + section {
  margin-top: 56px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}
.doc .updated { margin-top: 28px; font-size: 0.875rem; color: var(--muted); }
/* Unfilled operator data stays loud until it is replaced. */
.ph {
  padding: 1px 6px;
  border: 1px dashed var(--orange);
  border-radius: 5px;
  color: var(--orange-b);
  font-size: 0.875em;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.lost {
  display: grid;
  align-content: center;
  min-height: 62vh;
  padding-top: 40px;
  padding-bottom: 64px;
}
.lost h1 {
  margin: 14px 0 0;
  font-size: clamp(2.5rem, 11.6vw, 4.5rem);
  font-weight: 820;
  line-height: 0.96;
  letter-spacing: -0.04em;
}
.lost h1 .after { display: block; color: rgba(241, 236, 225, 0.5); }
.lost p { margin: 20px 0 0; color: var(--cream-dim); }
.lost .pill { margin-top: 26px; justify-self: start; }

/* ---------- Wider screens ---------- */
@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .follow-list { grid-template-columns: repeat(3, 1fr); }
  .follow-link { min-height: 104px; align-content: end; }
  .beats { grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
  .beats li { grid-template-columns: 1fr; gap: 8px; padding: 22px 0 0; }
  .beats li::before { grid-row: auto; padding: 0; }
}

@media (min-width: 900px) {
  :root { --gutter: 48px; }
  body { font-size: 1.125rem; }
  .site-head { padding-top: 26px; }
  .tally { width: 58px; }
  .brand-name { font-size: 1.1875rem; }
  :root {
    --teaser-h: clamp(480px, 74vh, 700px);
    --teaser-w: calc(var(--teaser-h) * 9 / 16);
  }
  @supports (height: 1svh) {
    :root { --teaser-h: clamp(480px, 74svh, 700px); }
  }
  .hero {
    /* Explicit teaser track: no browser has to derive it from aspect-ratio. */
    grid-template-columns: minmax(0, 1fr) var(--teaser-w);
    align-items: center;
    gap: 72px;
    padding-top: 28px;
    padding-bottom: 72px;
    min-height: calc(100vh - 96px);
    min-height: calc(100svh - 96px);
  }
  .hero h1 { font-size: clamp(3.5rem, 6.3vw, 5.5rem); line-height: 0.94; }
  .lede { margin-top: 28px; font-size: 1.25rem; }
  .quick-follow { margin-top: 34px; }
  .teaser { width: var(--teaser-w); }
  .teaser-frame {
    width: var(--teaser-w);
    height: var(--teaser-h);
    aspect-ratio: auto;
  }
  .section { padding-top: 88px; padding-bottom: 88px; }
  .section h2 { font-size: 3.25rem; }
  .beats { margin-top: 44px; gap: 0 48px; }
  .follow-list { margin-top: 40px; gap: 16px; }
  .follow-link { min-height: 128px; padding: 22px 22px 22px 26px; }
  .follow-link .platform { font-size: 1.75rem; }
  .atmosphere svg { display: block; }
  /* Consent: one low bar along the bottom edge instead of a card over the hero CTAs. */
  .consent {
    left: 50%;
    right: auto;
    width: calc(min(100vw, var(--max)) - 2 * var(--gutter));
    max-width: none;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 32px;
    align-items: center;
    padding: 14px 16px 14px 22px;
  }
  .consent .label { grid-column: 1; }
  .consent-text { grid-column: 1; margin-top: 4px; font-size: 0.875rem; }
  .consent-actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; grid-template-columns: 132px 132px; }
}
