/* The page's styles: inline in the app (nonced), wrapped.css in the static export. */
/* Anton (SIL Open Font License), self-hosted: the policy loads nothing from anywhere else. */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/wp-content/plugins/stathletes-wrapped-2026/assets/anton-latin.woff2?v=23aab0b269") format("woff2");
}
:root {
  --bg: #0b0a10;
  --surface: #17151f;
  --border: #2c2838;
  --text: #ffffff;
  --muted: #b9b4c7;
  --accent: #f7c548;
  --line: #4a3f6b;
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 30rem at 20% -10%, rgba(168, 60, 220, 0.35), transparent 60%),
    radial-gradient(40rem 24rem at 100% 10%, rgba(40, 150, 230, 0.25), transparent 60%),
    radial-gradient(40rem 40rem at 90% 70%, rgba(110, 50, 200, 0.22), transparent 65%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 560px; margin: 0 auto; padding: 32px 16px 48px; }
.top { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; flex-shrink: 0; height: 32px; width: auto; fill: #fff; shape-rendering: geometricPrecision; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The front page, after Meghan's mockup: masthead, eyebrow, a big condensed headline, the picker. */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 -16px; padding: 0 16px 18px; border-bottom: 1px solid var(--border);
}
.masthead p { margin: 0; }
.masthead-mark { font: italic 24px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap; }
.masthead-mark em, .masthead-slashes { color: var(--accent); }
.masthead-slashes { margin-right: 4px; }
.masthead-year { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 370px) {
  .masthead-year { white-space: normal; text-align: right; }
}
.eyebrow {
  display: flex; align-items: center; gap: 14px; margin: 56px 0 18px;
  color: var(--accent); font-size: 15px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--accent); }
h1 {
  margin: 0 0 24px; font: 400 clamp(56px, 17vw, 92px)/0.95 var(--display);
  text-transform: uppercase; letter-spacing: 0.005em;
}
h1 em { display: block; color: var(--accent); font-style: italic; }
.lede { color: var(--muted); font-size: 19px; line-height: 1.45; margin: 0 0 40px; }
.footer-by { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.footer-by .brand-logo { height: 24px; }
.preview {
  border: 1px dashed var(--accent); color: var(--accent); border-radius: var(--radius);
  padding: 10px 14px; margin: 16px 0 24px; font-size: 14px;
}
.picker-label { display: block; margin-bottom: 12px; font-size: 18px; font-weight: 700; }
.picker-row { display: flex; gap: 8px; }
.picker-links { margin: 16px 0 0; padding-left: 20px; }
.picker-links li { margin: 6px 0; }
.js .picker button[type=submit] { display: none; }
select, button, .button {
  font: inherit; border-radius: var(--radius); padding: 14px 16px; min-height: 52px;
}
.picker-select { position: relative; flex: 1; min-width: 0; display: flex; }
/* Drawn in CSS: the policy allows no data: images for a chevron. */
.picker-select::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; pointer-events: none;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: translateY(-70%) rotate(45deg);
}
select {
  flex: 1; min-width: 0; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  -webkit-appearance: none; appearance: none; padding-right: 52px;
}
/* The script's stand-in for the <select>, which looks the same, plus the list it opens. */
.picker-select .picker-button {
  flex: 1; min-width: 0; display: flex; align-items: center; text-align: left;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); font-weight: 400;
  padding-right: 52px;
}
.picker-button-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; min-width: 260px;
  max-height: min(60vh, 440px); overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px; list-style: none; text-align: left;
  background: #17121f; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.picker-list:focus { outline: none; }
.opens-up .picker-list { top: auto; bottom: calc(100% + 6px); }
.picker-list [role=option] {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px;
  cursor: pointer; font-size: 17px; font-weight: 600; color: var(--text);
}
.picker-list img, .picker-list-spacer { width: 42px; height: 28px; flex-shrink: 0; }
.picker-list .is-active { background: rgba(247, 197, 72, 0.14); }
.picker-list [aria-selected=true] { color: var(--accent); }
.is-open .picker-button { border-color: var(--accent); }
.is-open::after { transform: translateY(-30%) rotate(225deg); }
.is-home select, .is-home .picker-select .picker-button {
  min-height: 72px; padding: 0 56px 0 22px; border-radius: 16px; border: 1.5px solid var(--line);
  background: rgba(28, 22, 44, 0.8); font-size: 20px; font-weight: 700;
}
.is-home .picker-select.is-open .picker-button { border-color: var(--accent); }
/* The chosen team's logo, inside the box to the left of its name (the logos are 3:2, padded). */
.picker-logo { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 54px; height: 36px; pointer-events: none; z-index: 1; }
.picker-select.has-logo select, .picker-select.has-logo .picker-button { padding-left: 76px; }
button { background: var(--accent); color: #111; border: 0; font-weight: 800; cursor: pointer; }
select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.team-head { margin: 32px 0 16px; }
.team-head h2 { margin: 0; font-size: 22px; }
a { color: var(--accent); }
.slides { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.slides img {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.hint, footer { color: var(--muted); font-size: 14px; }
footer { margin-top: 32px; }

/* Story mode, switched on by the script below (body.is-stage, .is-story). The slide is the
   largest 4:5 box the screen holds, over a blurred copy of itself, with the picker above and
   the controls below. Without the script the page stays the plain list above. */
body.is-stage { height: 100vh; height: 100dvh; overflow: hidden; }
body.is-stage main {
  max-width: none; height: 100%; display: flex; flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 0 max(10px, env(safe-area-inset-bottom));
}
body.is-stage .top { padding: 0 16px 10px; position: relative; z-index: 5; }
body.is-stage .top form { flex: 1; min-width: 0; max-width: 360px; margin-left: auto; }
body.is-stage .top select, body.is-stage .top .picker-select .picker-button { min-height: 40px; padding: 8px 40px 8px 12px; background: rgba(23, 21, 31, 0.75); }
body.is-stage .top .picker-list { left: auto; width: 100%; max-height: min(70vh, 480px); }
body.is-stage .top .picker-select::after { right: 16px; width: 7px; height: 7px; border-width: 2px; }
body.is-stage .top .picker-logo { left: 6px; width: 36px; height: 24px; }
body.is-stage .top .picker-select.has-logo select, body.is-stage .top .picker-select.has-logo .picker-button { padding-left: 46px; }
body.is-stage .top button[type=submit] { display: none; }
body.is-stage .preview { margin: 0 16px 10px; padding: 6px 12px; position: relative; z-index: 5; }
body.is-stage .team-head, body.is-stage .hint, body.is-stage footer { display: none; }

.story { position: relative; }
.story.is-story {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  container-type: size; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.story-backdrop {
  position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none;
  filter: blur(40px) brightness(0.5) saturate(1.2); transform: scale(1.2); transition: opacity 0.4s;
}
.story-frame { position: relative; }
.story.is-story .story-frame {
  z-index: 1; width: min(100cqw, 80cqh); aspect-ratio: 4 / 5;
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
@container (max-width: 600px) {
  /* A phone: edge to edge, as a story is. */
  .story.is-story .story-frame { border-radius: 0; box-shadow: none; }
}
.story.is-story .slides { display: grid; gap: 0; height: 100%; }
.story.is-story .slides li { grid-area: 1 / 1; visibility: hidden; }
.story.is-story .slides li.is-active { visibility: visible; z-index: 2; }
.story.is-story .slides li.is-under { visibility: visible; z-index: 1; }
.story.is-story .slides img { width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 0; -webkit-user-drag: none; }
.story-progress { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 4; }
.story-progress span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); overflow: hidden; }
.story-progress i { display: block; height: 100%; width: 0; background: #fff; }
.story-progress .is-seen i { width: 100%; }
.story-progress .is-current i { width: 100%; animation: wr-fill 0.5s ease-out; }
.story-tap { position: absolute; top: 0; bottom: 0; z-index: 3; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: 0; min-height: 0; }
.story-tap-back { left: 0; width: 30%; }
.story-tap-next { right: 0; width: 70%; }
.story-tap:focus-visible { outline-offset: -3px; }
.story-controls {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 16px 0; position: relative; z-index: 5;
}
.story-controls button, .story-controls .button {
  min-height: 44px; padding: 10px 16px; min-width: 88px; text-align: center; text-decoration: none;
  background: rgba(23, 21, 31, 0.75); color: var(--text); border: 1px solid var(--border); font-weight: 700;
}
@media (max-width: 360px) {
  /* The smallest phones: Back, the counter, Save and Next must still fit across. */
  .story-controls { gap: 8px; }
  .story-controls button, .story-controls .button { min-width: 0; padding: 10px 14px; }
}
.story-controls [data-story-next] { background: var(--accent); color: #111; border-color: var(--accent); }
.story-controls button:disabled { opacity: 0.4; cursor: default; }
.story-counter { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 48px; text-align: center; }

/* A different entrance each time (the script picks one, never the last one twice). */
.slides li[data-anim] { animation-duration: 0.6s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
.slides li[data-anim="slide"] { animation-name: wr-slide; }
.slides li[data-anim="back"] { animation-name: wr-back; }
.slides li[data-anim="zoom"] { animation-name: wr-zoom; }
.slides li[data-anim="flip"] { animation-name: wr-flip; }
.slides li[data-anim="circle"] { animation-name: wr-circle; animation-duration: 0.7s; }
.slides li[data-anim="blur"] { animation-name: wr-blur; }
.slides li[data-anim="drop"] { animation-name: wr-drop; animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
.slides li[data-anim="wipe"] { animation-name: wr-wipe; }
.slides li[data-anim="spin"] { animation-name: wr-spin; animation-timing-function: cubic-bezier(0.34, 1.4, 0.64, 1); }
.slides li[data-anim="fade"] { animation-name: wr-fade; animation-duration: 0.3s; }
@keyframes wr-slide { from { transform: translateX(100%); } }
@keyframes wr-back { from { transform: translateX(-100%); } }
@keyframes wr-zoom { from { transform: scale(1.3); opacity: 0; } }
@keyframes wr-flip { from { transform: perspective(1200px) rotateY(80deg); opacity: 0; } }
@keyframes wr-circle { from { clip-path: circle(0% at 70% 50%); } to { clip-path: circle(150% at 70% 50%); } }
@keyframes wr-blur { from { filter: blur(18px); transform: scale(0.92); opacity: 0; } }
@keyframes wr-drop { from { transform: translateY(-30%) rotate(-5deg); opacity: 0; } }
@keyframes wr-wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes wr-spin { from { transform: rotate(-12deg) scale(0.6); opacity: 0; } }
@keyframes wr-fade { from { opacity: 0; } }
@keyframes wr-fill { from { width: 0; } }
@media (prefers-reduced-motion: reduce) {
  .story-progress .is-current i { animation: none; }
}
