/* Layout: full-bleed globe hero with a telemetry rail, then quiet ruled sections.
   Single dark look on purpose. */
:root {
  color-scheme: dark;
  --bg: #050608;
  --surface: #0b0e12;
  --fg: #eef1f4;
  --muted: #8d97a3;
  --line: rgba(238, 241, 244, .14);
  --accent: #7fb4ff;
  --live: #5fd39a;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font: 300 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap.wide { max-width: 1640px; padding-inline: clamp(12px, 3vw, 56px); }

h1, h2, .mark { font-stretch: 125%; text-transform: uppercase; font-weight: 600; }
h1, h2 { line-height: 1.05; text-wrap: balance; }
.label, dt, nav a, .btn, footer, .state {
  font: 400 11px/1.5 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.label, dt { color: var(--muted); }

/* Header */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--gutter); border-bottom: 1px solid transparent; transition: background .3s, padding .3s, border-color .3s; }
.bar.solid, .bar.open { background: rgba(5, 6, 8, .93); padding-block: 15px; border-color: var(--line); }
nav a { padding-block: 6px; background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat; transition: color .2s, background-size .3s; }
nav a.current { color: var(--fg); background-size: 100% 1px; }
.menu { display: none; border: 1px solid var(--line); padding: 8px 16px; font: 400 11px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
section[id] { scroll-margin-top: 56px; }
footer a:hover { color: var(--fg); }
.mark { display: flex; align-items: center; font-size: 17px; letter-spacing: .34em; }
.mark i { display: inline-block; width: 3.6em; height: .8em; background: var(--fg); }
nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
nav a { color: #c3cad2; text-shadow: 0 0 8px var(--bg), 0 0 3px var(--bg); }
nav a:hover { color: var(--fg); }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: max(640px, 100svh); display: flex; flex-direction: column; justify-content: flex-end; border-bottom: 1px solid var(--line); }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#globe:active { cursor: grabbing; }
.hero-copy { position: relative; pointer-events: none; margin-block: auto; padding-top: 120px; padding-bottom: 48px; text-shadow: 0 0 18px var(--bg), 0 0 6px var(--bg); }
.hero-copy > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
h1 { font-size: clamp(34px, 6.4vw, 92px); margin-block: 18px 24px; letter-spacing: .01em; }
.lead { max-width: 44ch; color: #bcc4cd; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn { pointer-events: auto; cursor: pointer; display: inline-block; padding: 15px 28px; border: 1px solid rgba(238, 241, 244, .45); background: rgba(5, 6, 8, .5); color: var(--fg); text-shadow: none; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn.solid { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn.solid:hover { background: transparent; color: var(--fg); }

.telemetry { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); max-width: none; background: rgba(5, 6, 8, .72); }
.telemetry div { padding: 20px 20px 22px 0; min-width: 0; }
.telemetry div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.telemetry dd { overflow: hidden; text-overflow: ellipsis; font: 500 clamp(15px, 1.7vw, 21px)/1.4 var(--mono); font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; }

/* Sections */
.section { padding-block: clamp(80px, 11vw, 150px); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(24px, 3.2vw, 40px); letter-spacing: .06em; }
.head { margin-bottom: 52px; }
.head p { color: var(--muted); margin-top: 14px; max-width: 46ch; }
.wide .head { padding-inline: clamp(8px, 2vw, 16px); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 8vw, 120px); }
.split > * { min-width: 0; }
.head .statement { color: var(--fg); font-size: clamp(22px, 2.6vw, 32px); line-height: 1.4; margin-top: 36px; max-width: 24ch; }
.dossier div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center; padding-block: 24px; border-top: 1px solid var(--line); }
.dossier div:last-child { border-bottom: 1px solid var(--line); }
.redacted { display: block; width: var(--w); max-width: 100%; height: 22px; background: #d9dde2; transition: background .2s; }
.redacted span { display: block; font: 500 11px/22px var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: var(--bg); opacity: 0; }
.redacted:hover, .redacted:focus-visible { background: #ff7a6b; }
.redacted:hover span, .redacted:focus-visible span { opacity: 1; }

/* Poll */
.poll { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.poll button { display: flex; flex-direction: column; text-align: left; background: var(--bg); padding: clamp(18px, 1.5vw, 28px); min-width: 0; transition: background .25s; }
.poll button:not(:disabled):hover { background: var(--surface); }
.poll button:disabled { cursor: default; }
.poll button.mine { position: relative; z-index: 1; cursor: default; background: linear-gradient(rgba(127, 180, 255, .2), rgba(127, 180, 255, .05) 60%, #0b111b); animation: own-vote 2.4s ease-in-out infinite; }
.poll button.mine .option { text-shadow: 0 0 16px var(--accent); }
.poll button.mine .art::after { content: "Your vote"; position: absolute; left: 50%; bottom: 12px; z-index: 2; translate: -50% 0; padding: 6px 14px; background: var(--accent); color: #04070c; white-space: nowrap; font: 500 11px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; box-shadow: 0 0 24px var(--accent); }
.poll button.mine.arrived { animation: arrived 1.1s cubic-bezier(.2, .8, .2, 1), own-vote 2.4s ease-in-out 1.1s infinite; }
@keyframes own-vote { 0%, 100% { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 30px rgba(127, 180, 255, .16), 0 0 18px rgba(127, 180, 255, .35); } 50% { box-shadow: inset 0 0 0 2px #fff, inset 0 0 60px rgba(127, 180, 255, .34), 0 0 48px rgba(127, 180, 255, .8); } }
@keyframes arrived { 0% { transform: scale(1); filter: brightness(1); } 25% { transform: scale(1.04); filter: brightness(1.9); } 100% { transform: scale(1); filter: brightness(1); } }
.spark { position: fixed; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 5px var(--accent); pointer-events: none; z-index: 60; }

/* the reminder of one's own vote */
.voted { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-bottom: 18px; padding: 22px clamp(18px, 2vw, 30px); overflow: hidden; border: 1px solid var(--accent); background: linear-gradient(90deg, rgba(127, 180, 255, .22), rgba(127, 180, 255, .05)); animation: voted-glow 2.4s ease-in-out infinite; }
.voted::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent); translate: -110% 0; animation: voted-sweep 4s ease-in-out infinite; pointer-events: none; }
.voted span { font: 500 11px/1.6 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.voted strong { font: 600 clamp(22px, 3.2vw, 40px)/1.2 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .03em; overflow-wrap: anywhere; text-shadow: 0 0 14px var(--accent), 0 0 38px var(--accent); }
.voted em { margin-left: auto; font: normal 400 12px/1.6 var(--mono); color: var(--muted); }
.voted.show { animation: voted-in .8s cubic-bezier(.15, .8, .2, 1), voted-glow 2.4s ease-in-out .8s infinite; }
@keyframes voted-glow { 0%, 100% { box-shadow: 0 0 20px rgba(127, 180, 255, .3), inset 0 0 24px rgba(127, 180, 255, .12); } 50% { box-shadow: 0 0 52px rgba(127, 180, 255, .75), inset 0 0 44px rgba(127, 180, 255, .28); } }
@keyframes voted-sweep { 0%, 20% { translate: -110% 0; } 75%, 100% { translate: 360% 0; } }
@keyframes voted-in { from { opacity: 0; transform: scale(.94) translateY(14px); filter: blur(8px) brightness(2.4); } }
.art { display: block; position: relative; aspect-ratio: 4 / 5; max-width: 100%; margin-bottom: 28px; background: #070b11; border: 1px solid var(--line); overflow: hidden; transition: border-color .3s; }
.art canvas { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.art .man { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.art canvas#shades3d { transform-origin: 50% 50%; }
/* studio backdrops with a slowly moving spotlight */
[data-choice="watch"] .art { background: radial-gradient(80% 62% at 50% 45%, #23456b, #0b1421 58%, #030508); }
[data-choice="health"] .art { background: radial-gradient(85% 65% at 50% 40%, #0d3b39, #07181b 58%, #030709); }
[data-choice="security"] .art { background: radial-gradient(85% 65% at 50% 46%, #14306b, #0a1330 58%, #03050c); }
[data-choice="sunglasses"] .art { background: radial-gradient(58% 46% at 50% 36%, #f6e6cc, #a9825a 38%, #2c1d14 68%, #060504 100%); }
[data-choice="sunglasses"] .art.closeup { background: radial-gradient(90% 70% at 50% 42%, #fbf8f3, #e4dbd0 55%, #a99d90); }
[data-choice="watch"] .art::before, [data-choice="sunglasses"] .art::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .09), transparent 22%, transparent 50%, rgba(255, 255, 255, .06), transparent 74%); animation: spotlight 14s linear infinite; }
[data-choice="sunglasses"] .art::before { background: conic-gradient(from 0deg, transparent, rgba(255, 220, 180, .14), transparent 22%, transparent 50%, rgba(255, 220, 180, .1), transparent 74%); }
@keyframes spotlight { to { transform: rotate(1turn); } }
.poll button:not(:disabled):hover .art, .poll button.mine .art { border-color: rgba(127, 180, 255, .6); }
.option { overflow-wrap: anywhere; font: 600 clamp(17px, 1.35vw, 21px)/1.3 var(--sans); font-stretch: 118%; text-transform: uppercase; letter-spacing: .04em; min-height: 2.5em; }
.hint { color: var(--muted); font-size: 15px; margin-top: 12px; flex: 1; }
.result { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 36px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.share { font-size: clamp(34px, 4vw, 52px); font-weight: 500; line-height: 1; }
.count { font-size: 12px; color: var(--muted); }
.meter { display: block; height: 3px; background: var(--line); margin-top: 18px; }
.meter i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.cta { align-self: flex-start; margin-top: 28px; padding: 12px 24px; border: 1px solid rgba(238, 241, 244, .45); font: 400 11px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.poll button:not(:disabled):hover .cta { background: var(--fg); color: var(--bg); }
.poll button:disabled:not(.mine) .cta { opacity: .45; }
.poll .mine .cta { border-color: var(--accent); color: var(--accent); }
.poll.quiet .result, .poll.quiet .meter, .poll.quiet .cta { display: none; }
.poll .mine .cta { background: var(--accent); color: #04070c; }
.poll-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 18px; color: var(--muted); font: 400 12px/1.6 var(--mono); }

/* Location */
.console { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); border: 1px solid var(--line); }
.map { position: relative; min-height: max(640px, 78svh); background: #05080d; overflow: hidden; }
#map, #map-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.map { contain: paint; }
.state { position: absolute; left: 22px; bottom: 18px; right: 22px; color: var(--accent); text-shadow: 0 0 6px #000; z-index: 1; }
.map-actions { position: absolute; right: 16px; top: 16px; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.map-actions .btn { padding: 10px 18px; }
.hud { position: absolute; left: 22px; top: 22px; z-index: 1; max-width: 60%; font: 400 11px/1.6 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; text-shadow: 0 0 6px #000; }
.scan { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-shadow: 0 0 14px #000, 0 0 6px #000; }
.scan b { font: 600 clamp(46px, 7vw, 92px)/1 var(--sans); font-stretch: 125%; font-variant-numeric: tabular-nums; }
.scan span { font: 400 11px/1.6 var(--mono); letter-spacing: .4em; text-transform: uppercase; margin-top: 10px; padding-left: .4em; }

.side { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); }
.readout { flex: 1; display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); }
.readout div { flex: 1 1 40%; display: flex; flex-direction: column; justify-content: center; padding: 12px 22px; background: var(--bg); min-width: 0; }
.readout .primary, .readout .full { flex-basis: 100%; }
.readout dd { font: 400 14px/1.5 var(--mono); font-variant-numeric: tabular-nums; margin-top: 3px; overflow-wrap: anywhere; }
.readout .primary dd { font: 600 clamp(22px, 2.4vw, 32px)/1.2 var(--sans); font-stretch: 112%; text-transform: uppercase; }
.note { margin-top: 18px; color: var(--muted); font: 400 11px/1.6 var(--mono); }

/* End */
.contact { background: radial-gradient(90% 120% at 85% 110%, rgba(127, 180, 255, .15), transparent 60%); }
.contact h2 { font-size: clamp(46px, 10vw, 148px); letter-spacing: .02em; }
.contact p.sizes-title { margin-top: 70px; color: var(--fg); font: 600 clamp(17px, 2vw, 26px)/1.4 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .08em; }
.sizes { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 34px; }
.sizes li { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.sizes i { display: block; height: calc(var(--size) * 190px); margin-bottom: 16px; border-top: 2px solid var(--fg); background: linear-gradient(rgba(127, 180, 255, .55), rgba(127, 180, 255, .04)); transform-origin: bottom; transition: transform 1.3s cubic-bezier(.2, .75, .2, 1) calc(.4s + var(--order) * .2s); animation: breathe 4s ease-in-out calc(var(--order) * .45s) infinite; }
.js .contact:not(.in) .sizes i { transform: scaleY(0); }
@keyframes breathe { 50% { filter: brightness(1.55); } }
.sizes b { font: 600 clamp(13px, 1.8vw, 22px)/1.3 var(--sans); font-stretch: 118%; text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere; }
.sizes span { color: var(--muted); font: 400 11px/1.6 var(--mono); }
.contact p { color: var(--muted); margin-top: 20px; }
footer { display: flex; justify-content: space-between; gap: 16px; padding-block: 32px; color: var(--muted); }

/* Scroll reveals */
.js .reveal > .wrap { transition: opacity .9s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.js .reveal:not(.in) > .wrap { opacity: 0; transform: translateY(40px); }

@media (max-width: 1250px) {
  .poll { display: flex; flex-wrap: wrap; }
  .poll button { flex: 1 1 280px; }
  .poll .art { width: 100%; max-width: 360px; align-self: center; }
}
@media (max-width: 1000px) {
  .menu { display: block; }
  nav { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 6px var(--gutter) 18px; background: rgba(5, 6, 8, .97); border-bottom: 1px solid var(--line); }
  .bar.open nav { display: flex; }
  nav a { padding-block: 14px; }
}
@media (max-width: 820px) {
  .split, .console, .poll { grid-template-columns: minmax(0, 1fr); }
  .option { min-height: 0; }
  .voted em { margin-left: 0; width: 100%; }
  .poll button { flex-basis: 100%; }
  .split { gap: 0; }
  .map { min-height: 70svh; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .hud { top: auto; bottom: 46px; max-width: calc(100% - 44px); }
  .art { aspect-ratio: 1 / 1; }
  .telemetry { grid-template-columns: 1fr 1fr; }
  .telemetry div:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
  .telemetry div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero-copy { margin-bottom: 0; padding-top: 46svh; }
}
@media (max-width: 480px) {
  .mark { font-size: 14px; }
  .dossier div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .actions .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
