/* The vote page in the Flip Board style: a split-flap departure board. Every number is a physical
   flap on a warm black board, and it folds over when it changes. Nothing else moves for no reason. */

@font-face { font-family: "Big Shoulders Display"; src: url(/fonts/BigShouldersDisplay_800ExtraBold.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url(/fonts/InterTight_500Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url(/fonts/InterTight_600SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url(/fonts/InterTight_800ExtraBold.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #0A0F13; --panel: rgba(17,27,33,.74); --slot: #1A262D; --text: #EAF4F7; --soft: #9DB2BB;
  --cream: #E2EFF3; --cream-hi: #F1F9FB; --cream-lo: #CADCE2; --ink: #0A0F13;
  --act: #8CEEFF; --act-deep: #2F8FA3; --bad: #FF9B8A;
  --num: "Big Shoulders Display", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* the cold blue light of the portrait, laid over the whole page: a tiny blurred copy of the
   photo (560 bytes) stretched across the screen, plus two soft cyan glows. Fixed, so it stays
   put while the page scrolls past it, like light in the room behind the cards. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 88% 8%, rgba(140,238,255,.16), rgba(140,238,255,0) 70%),
    radial-gradient(50% 40% at 0% 62%, rgba(90,190,220,.12), rgba(90,190,220,0) 70%),
    linear-gradient(180deg, rgba(10,15,19,.35), rgba(10,15,19,.8)),
    url(/vote-style/img/glow.webp) center / cover no-repeat,
    var(--bg);
}
body { margin: 0; background: var(--bg); color: var(--text); font: 500 17px/1.5 "Inter Tight", "Helvetica Neue", Arial, sans-serif; }
a { color: var(--text); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- a split flap ---------- */
.flaps { display: inline-flex; gap: var(--gap, 4px); perspective: 600px; vertical-align: middle; }
.fl {
  --w: 34px; --h: 48px; --fs: 42px; --d: .15s;
  position: relative; display: block; width: var(--w); height: var(--h); border-radius: 6px;
  transform-style: preserve-3d; box-shadow: 0 8px 14px -6px rgba(0,0,0,.75);
}
.fl i { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; backface-visibility: hidden; font-style: normal; }
.fl i b {
  display: block; height: var(--h); line-height: var(--h); text-align: center;
  font: 800 var(--fs)/var(--h) var(--num); color: var(--ink);
}
.fl .t, .fl .lt { top: 0; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--cream-hi), #DDECF1); transform-origin: 50% 100%; }
.fl .b, .fl .lb { bottom: 0; border-radius: 0 0 6px 6px; background: linear-gradient(180deg, var(--cream-lo), var(--cream)); transform-origin: 50% 0; }
.fl .b b, .fl .lb b { transform: translateY(calc(var(--h) / -2)); }
.fl::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: var(--ink); z-index: 3; }
.fl .lt { transform: rotateX(-90deg); z-index: 2; }
.fl .lb { transform: rotateX(90deg); z-index: 2; }
.fl.go .lt { animation: fold-top var(--d) ease-in both; }
.fl.go .lb { animation: fold-bot var(--d) ease-out var(--d) both; }
@keyframes fold-top { from { transform: rotateX(0); filter: brightness(1); } to { transform: rotateX(-90deg); filter: brightness(.55); } }
@keyframes fold-bot { from { transform: rotateX(90deg); filter: brightness(.6); } to { transform: rotateX(0); filter: brightness(1); } }
/* dark flaps: the board's own slots */
.dark .fl .t, .dark .fl .lt { background: linear-gradient(180deg, #26343C, var(--slot)); }
.dark .fl .b, .dark .fl .lb { background: linear-gradient(180deg, #16222A, var(--slot)); }
.dark .fl i b { color: var(--text); }
.dark .fl::after { background: var(--bg); }
/* a space on the board is an empty slot */
.fl.blank i b { color: transparent; }

/* ---------- page ---------- */
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; max-width: 1080px; margin: 0 auto; position: relative; z-index: 2; }
.mark { font: 800 22px/1 var(--num); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.lang { display: flex; gap: 6px; }
.lang button {
  min-width: 48px; min-height: 44px; border-radius: 9px; border: 0; cursor: pointer;
  background: var(--slot); color: var(--soft); font-weight: 800; box-shadow: 0 4px 0 #04080A;
}
.lang button[aria-pressed="true"] { background: var(--cream); color: var(--ink); box-shadow: 0 4px 0 #8AA6B0; }
main { max-width: 1080px; margin: 0 auto; padding: 0 20px 40px; }
.note { background: var(--cream); color: var(--ink); border-radius: 12px; padding: 14px 18px; font-weight: 800; }

/* hero: the athlete in his own cold blue light, slowly moving, the board on top */
.hero { position: relative; margin: -70px -20px 0; padding: 0 20px; }
.photo { position: relative; height: 420px; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: contrast(1.08) saturate(1.15) brightness(1.08); animation: slow-zoom 22s ease-in-out infinite alternate; }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,15,19,.5) 0%, rgba(10,15,19,0) 30%, rgba(10,15,19,.62) 72%, rgba(10,15,19,.96) 100%); }
@keyframes slow-zoom { from { transform: scale(1.02); } to { transform: scale(1.14) translateX(-2%); } }
.hero-text { position: relative; margin-top: -120px; }
.board { --gap: 4px; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.board .fl { --w: 26px; --h: 38px; --fs: 32px; }
h1 { margin: 0 0 10px; font-weight: 800; font-size: clamp(36px, 9vw, 60px); line-height: .98; letter-spacing: -.02em; }
h2 { margin: 0 0 8px; font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -.01em; }
.hero p { margin: 0; color: var(--soft); max-width: 34em; }

/* the six finalists */
fieldset { border: 0; margin: 28px 0 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 14px; color: var(--soft); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card label { display: block; cursor: pointer; position: relative; }
.card input { position: absolute; opacity: 0; pointer-events: none; }
.shot {
  display: block; border-radius: 16px; overflow: hidden; background: var(--slot);
  box-shadow: 0 0 0 0 var(--cream), 0 16px 30px -16px rgba(0,0,0,.95);
  transition: box-shadow .18s, transform .18s;
}
.card label:hover .shot { transform: translateY(-3px); }
.card input:checked + .shot { box-shadow: 0 0 0 4px var(--cream), 0 22px 36px -16px rgba(0,0,0,.95); transform: translateY(-4px); }
.card input:focus-visible + .shot { outline: 3px solid var(--cream); outline-offset: 5px; }
.cap { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.cap .fl { --w: 28px; --h: 40px; --fs: 34px; }
/* the picked card: its number lights up in the Ey Will cyan, the one thing that says "this one" */
.card input:checked ~ .cap .fl .t, .card input:checked ~ .cap .fl .lt { background: linear-gradient(180deg, #C8F8FF, var(--act)); }
.card input:checked ~ .cap .fl .b, .card input:checked ~ .cap .fl .lb { background: linear-gradient(180deg, #6FD8EC, var(--act)); }
.flip {
  align-self: flex-start; min-height: 44px; padding: 0 14px; border-radius: 9px; border: 0; cursor: pointer;
  background: var(--slot); color: var(--soft); font-size: 15px; font-weight: 600; box-shadow: 0 4px 0 #04080A;
}
.flip:active { transform: translateY(3px); box-shadow: 0 1px 0 #04080A; }

/* cards fold down onto the board as they scroll into view */
.reveal .card { opacity: 0; transform: perspective(900px) rotateX(-28deg) translateY(24px); transform-origin: 50% 0; transition: opacity .5s ease, transform .6s cubic-bezier(.2, .9, .3, 1.15); }
.reveal .card.in { opacity: 1; transform: none; }

/* the act button: chunky, with a real press */
.bar { position: sticky; bottom: 0; z-index: 4; margin: 20px -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 72%, rgba(10,15,19,0)); }
.act {
  width: 100%; min-height: 62px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--act); color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -.01em;
  box-shadow: 0 7px 0 var(--act-deep), 0 18px 30px -12px rgba(140,238,255,.38);
  transition: transform .08s, box-shadow .08s;
}
.act:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--act-deep); }
.act:disabled { background: var(--slot); color: var(--soft); box-shadow: 0 7px 0 #04080A; cursor: default; }
.act.ready { animation: nudge .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nudge { 40% { transform: translateY(-5px); } }
.msg { margin: 10px 0 0; min-height: 1.5em; color: var(--soft); }
.msg.bad { color: var(--bad); }

/* panels */
.panel { background: var(--panel); border-radius: 18px; padding: 24px 20px; margin-top: 26px; }
.panel > p { color: var(--soft); }
.soft { color: var(--soft); }
.small { font-size: 15px; }

/* results: percentages on dark flaps, bars in cream */
.bars { list-style: none; margin: 18px 0 10px; padding: 0; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-weight: 800; }
.bars .flaps .fl { --w: 22px; --h: 32px; --fs: 27px; }
.bars .track { grid-column: 1 / -1; display: block; height: 10px; border-radius: 5px; background: var(--slot); overflow: hidden; }
.bars .fill { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--soft); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.bars li.yours .fill { background: var(--cream); }
.bars .tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--cream); color: var(--ink); font-size: 13px; vertical-align: 2px; }
.total { display: flex; align-items: center; gap: 10px; color: var(--soft); font-weight: 600; }
.total .fl { --w: 22px; --h: 32px; --fs: 27px; }

/* sign-up */
#signup { display: grid; gap: 12px; margin-top: 14px; }
#signup label[for="email"] { font-weight: 800; }
#email { min-height: 56px; padding: 0 16px; border-radius: 10px; border: 2px solid var(--soft); background: var(--bg); color: var(--text); font-size: 18px; }
#email:focus { border-color: var(--cream); outline: none; }
.consent { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.consent input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--act); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* get the app */
.stores { display: grid; gap: 12px; margin-top: 14px; }
.store { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 12px; background: var(--slot); text-decoration: none; box-shadow: 0 5px 0 #04080A; }
.store .os { color: var(--soft); font-size: 14px; font-weight: 600; }
.store b { font-weight: 800; }
.store[href] { background: var(--cream); color: var(--ink); box-shadow: 0 5px 0 #8AA6B0; }
.store[href] .os { color: #3F5660; }
#dm { margin: 18px 0 0; font-weight: 800; }

footer { max-width: 1080px; margin: 0 auto; padding: 20px 20px 40px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--soft); font-size: 15px; }

/* the privacy page uses the same sheet */
.doc { max-width: 760px; }
.doc h1 { font-size: 40px; margin-top: 10px; }
.doc h2 { font-size: 22px; margin-top: 26px; }
.doc p { color: var(--soft); }
.doc b { color: var(--text); }

@media (min-width: 760px) {
  .hero { margin: -76px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; align-items: end; }
  .photo { height: 560px; border-radius: 0 0 22px 22px; }
  .hero-text { margin: 0 0 36px; }
  .board .fl { --w: 34px; --h: 50px; --fs: 42px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
  .bar { position: static; margin: 26px 0 0; padding: 0; background: none; max-width: 440px; }
  .stores { grid-template-columns: 1fr 1fr; }
  .panel { padding: 30px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal .card { opacity: 1; transform: none; }
}
