:root {
  --navy: #071827;
  --navy-2: #0d2940;
  --red: #ef3b2d;
  --cream: #fff3d5;
  --mint: #7cf0bc;
  --yellow: #ffd84b;
  --ink: #071827;
  --white: #fffdf7;
  --mx: 0;
  --my: 0;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

* {
  box-sizing: border-box;
}

html {
  background: #030b12;
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #030b12;
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.site-shell {
  position: relative;
  isolation: isolate;
  width: min(100vw, 1920px);
  height: min(100vh, 1080px);
  min-height: 640px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 0 100px #000;
}

.backdrop {
  position: absolute;
  z-index: -6;
  inset: -3%;
  background-image:
    linear-gradient(90deg, rgba(7, 24, 39, .96) 0%, rgba(7, 24, 39, .82) 33%, rgba(7, 24, 39, .18) 64%, rgba(7, 24, 39, .05) 100%),
    linear-gradient(0deg, rgba(7, 24, 39, .30), rgba(7, 24, 39, 0) 45%),
    url("assets/grand-baton-stage.jpg");
  background-size: cover;
  background-position: center;
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -8px), 0) scale(1.035);
  transition: transform 180ms ease-out;
}

.paper-noise {
  position: absolute;
  z-index: 9;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: soft-light;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, transparent 0 1px, rgba(255,255,255,.38) 1px 2px, transparent 2px 4px),
    repeating-linear-gradient(7deg, rgba(255,255,255,.08) 0 1px, transparent 1px 5px);
  background-size: 6px 6px, 13px 13px;
}

.spotlight {
  position: absolute;
  z-index: -4;
  width: 34vw;
  height: 70vh;
  top: -38vh;
  pointer-events: none;
  filter: blur(18px);
  opacity: .26;
  background: linear-gradient(180deg, rgba(255,243,213,.9), transparent);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  transform-origin: top center;
  animation: spotlightSwing 9s ease-in-out infinite alternate;
}

.spotlight-one { left: 7%; }
.spotlight-two { right: 7%; animation-delay: -4.5s; }

.topbar {
  position: relative;
  z-index: 20;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(28px, 4vw, 72px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
  text-transform: uppercase;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.18rem;
  letter-spacing: .065em;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  box-shadow: 4px 4px 0 var(--red);
}

.brand b {
  color: var(--yellow);
  font-family: inherit;
  animation: starPulse 1.8s ease-in-out infinite;
}

.social-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(7,24,39,.54);
  backdrop-filter: blur(14px);
  text-decoration: none;
  font-weight: 800;
  font-size: .94rem;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.nav-link:hover {
  transform: translateY(-3px) rotate(-1deg);
  background: var(--cream);
  color: var(--ink);
  box-shadow: 4px 5px 0 var(--red);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .78rem;
  line-height: 1;
}

.pump-dot {
  position: relative;
  border: 0;
  background: var(--mint);
  box-shadow: inset 0 0 0 6px var(--navy), 0 0 0 2px var(--mint);
}

.hero {
  position: relative;
  z-index: 3;
  height: calc(100% - 176px);
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(520px, 1.05fr);
  align-items: center;
  gap: 10px;
  padding: 0 clamp(28px, 4vw, 72px) 6px;
}

.copy-panel {
  position: relative;
  z-index: 5;
  align-self: center;
  max-width: 790px;
  padding-bottom: 18px;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 11px;
  padding: 9px 14px 8px;
  transform: rotate(-1.4deg);
  color: var(--ink);
  background: var(--mint);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--yellow);
  text-transform: uppercase;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .125em;
}

.eyebrow span { color: var(--red); }

h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 900;
  line-height: .78;
  letter-spacing: -.035em;
  text-transform: uppercase;
  filter: drop-shadow(8px 8px 0 rgba(7,24,39,.65));
}

.title-top,
.title-bottom {
  display: block;
}

.title-top {
  position: relative;
  z-index: 1;
  font-size: clamp(5.2rem, 8.2vw, 9.1rem);
  color: var(--cream);
  -webkit-text-stroke: 2px var(--navy);
}

.title-bottom {
  position: relative;
  left: -.02em;
  width: fit-content;
  margin-top: .04em;
  padding: .04em .12em .1em .08em;
  transform: rotate(-1.6deg);
  font-size: clamp(5.7rem, 9vw, 10rem);
  color: var(--cream);
  background: var(--red);
  border: .035em solid var(--cream);
  box-shadow: .08em .08em 0 var(--navy);
  -webkit-text-stroke: 2px var(--navy);
}

.title-bottom i {
  color: var(--yellow);
  font-style: normal;
  -webkit-text-stroke: 2px var(--navy);
  animation: exclaimBounce 1.25s ease-in-out infinite alternate;
  display: inline-block;
}

.hero-line {
  margin: 19px 0 16px;
  max-width: 670px;
  color: var(--cream);
  font-size: clamp(1.08rem, 1.35vw, 1.48rem);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: .01em;
}

.lore-card {
  position: relative;
  max-width: 675px;
  padding: 16px 20px 15px 22px;
  border: 1px solid rgba(255,255,255,.28);
  border-left: 5px solid var(--mint);
  border-radius: 6px 22px 22px 6px;
  background: rgba(7,24,39,.72);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
}

.lore-label {
  position: absolute;
  top: -13px;
  right: 18px;
  padding: 5px 11px;
  transform: rotate(2deg);
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.lore-card p {
  margin: 0;
  color: #f8f1de;
  font-size: clamp(.9rem, .93vw, 1.03rem);
  line-height: 1.47;
}

.lore-card .code-line {
  margin-top: 7px;
  color: var(--mint);
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.ca-button,
.grand-button {
  position: relative;
  min-height: 56px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  text-transform: uppercase;
  font-weight: 950;
  letter-spacing: .055em;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.ca-button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 208px;
  color: var(--ink);
  background: var(--mint);
  box-shadow: 6px 6px 0 var(--cream);
}

.grand-button {
  color: var(--cream);
  background: var(--red);
  box-shadow: 6px 6px 0 var(--yellow);
}

.grand-button span {
  display: inline-block;
  margin-left: 7px;
}

.ca-button:hover,
.grand-button:hover {
  transform: translate(-2px, -3px) rotate(-1deg);
  filter: saturate(1.15);
}

.ca-button:active,
.grand-button:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--cream);
}

.button-shine {
  position: absolute;
  inset: -20% auto -20% -40%;
  width: 24%;
  transform: skewX(-18deg);
  background: rgba(255,255,255,.55);
  animation: buttonShine 3.8s ease-in-out infinite;
}

.copy-status {
  min-height: 1.2em;
  margin: 9px 0 0 4px;
  color: rgba(255,255,255,.66);
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.copy-status.is-success { color: var(--yellow); }

.character-zone {
  position: relative;
  align-self: stretch;
  min-width: 0;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.portrait-button {
  position: relative;
  z-index: 3;
  width: min(41vw, 650px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 48% 52% 45% 55% / 56% 44% 56% 44%;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  animation: characterFloat 5s ease-in-out infinite;
}

.portrait-frame {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border: 9px solid var(--cream);
  border-radius: inherit;
  background: var(--cream);
  box-shadow:
    17px 17px 0 var(--red),
    -12px -12px 0 var(--mint),
    0 35px 90px rgba(0,0,0,.46);
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 180ms ease-out, filter .25s ease;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px rgba(7,24,39,.38);
  pointer-events: none;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.025);
  transition: transform .45s cubic-bezier(.2,.9,.3,1.3), filter .45s ease;
}

.portrait-button:hover .portrait-frame img {
  transform: scale(1.06) rotate(.7deg);
  filter: saturate(1.08) contrast(1.03);
}

.portrait-glare {
  position: absolute;
  inset: -30%;
  transform: translateX(-70%) rotate(22deg);
  background: linear-gradient(90deg, transparent 42%, rgba(255,255,255,.32) 50%, transparent 58%);
  animation: portraitGlare 5.5s ease-in-out infinite;
  pointer-events: none;
}

.tap-note {
  position: absolute;
  right: -16px;
  bottom: 5%;
  z-index: 6;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--mint);
  transform: rotate(-3deg);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.orbit {
  position: absolute;
  z-index: 1;
  width: min(48vw, 770px);
  aspect-ratio: 1.55;
  border: 4px solid var(--mint);
  border-left-color: transparent;
  border-right-color: var(--yellow);
  border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(124,240,188,.7));
  transform: rotate(-18deg);
  animation: orbitSpin 11s linear infinite;
  pointer-events: none;
}

.orbit-b {
  width: min(44vw, 700px);
  border-color: rgba(255,243,213,.65) transparent rgba(239,59,45,.9) transparent;
  transform: rotate(22deg);
  animation-direction: reverse;
  animation-duration: 15s;
}

.mint-swoosh {
  position: absolute;
  z-index: 5;
  width: 62%;
  height: 16%;
  top: 44%;
  right: -5%;
  border: 11px solid var(--mint);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(13deg);
  filter: drop-shadow(0 0 12px rgba(124,240,188,.7));
  opacity: .8;
  pointer-events: none;
  animation: swooshPulse 2.6s ease-in-out infinite;
}

.star {
  position: absolute;
  z-index: 7;
  color: var(--yellow);
  font-size: clamp(1.8rem, 3vw, 4rem);
  text-shadow: 0 0 18px rgba(255,216,75,.65);
  pointer-events: none;
  animation: starPulse 1.7s ease-in-out infinite;
}

.star-a { top: 12%; left: 3%; }
.star-b { top: 8%; right: 7%; color: var(--cream); animation-delay: -.6s; }
.star-c { right: 2%; bottom: 18%; color: var(--mint); animation-delay: -1s; }

.badge {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  text-align: center;
  text-transform: uppercase;
  box-shadow: 7px 7px 0 rgba(7,24,39,.8);
  animation: badgeBob 3.5s ease-in-out infinite;
}

.badge::before,
.badge::after {
  content: "★";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: .75rem;
}

.badge::before { top: 7px; }
.badge::after { bottom: 7px; }

.badge span {
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.badge strong {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.35rem;
  line-height: .85;
}

.badge-top {
  top: 8%;
  left: 4%;
  width: 105px;
  transform: rotate(-11deg);
  background: var(--yellow);
}

.badge-bottom {
  right: 0;
  bottom: 8%;
  width: 126px;
  transform: rotate(9deg);
  background: var(--mint);
  animation-delay: -1.7s;
}

.ticker {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  overflow: hidden;
  color: var(--ink);
  background: var(--yellow);
  border-top: 4px solid var(--ink);
  transform: translateZ(0);
}

.ticker-track {
  width: max-content;
  height: 45px;
  display: flex;
  align-items: center;
  gap: 23px;
  padding-left: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.35rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: tickerMove 21s linear infinite;
}

.ticker-track i {
  color: var(--red);
  font-style: normal;
}

.ticker small {
  display: block;
  padding: 6px 24px 0;
  border-top: 1px solid rgba(7,24,39,.23);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.fx-layer {
  position: absolute;
  z-index: 30;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.spark-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  color: var(--color);
  font-size: var(--size);
  line-height: 1;
  text-shadow: 0 0 8px currentColor;
  animation: sparkBurst 900ms cubic-bezier(.14,.78,.38,1) forwards;
}

.site-shell.is-grand .portrait-button {
  animation: grandBounce .78s cubic-bezier(.16,.9,.32,1.35);
}

.site-shell.is-grand .portrait-frame {
  filter: drop-shadow(0 0 30px var(--yellow)) saturate(1.18);
}

.site-shell.is-grand .backdrop {
  filter: saturate(1.25) brightness(1.08);
}

.site-shell.is-grand .grand-button span {
  animation: orbitSpin .6s linear infinite;
}

:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 4px;
}

@keyframes characterFloat {
  0%, 100% { transform: translate3d(0, -7px, 0) rotate(-.7deg); }
  50% { transform: translate3d(0, 10px, 0) rotate(.7deg); }
}

@keyframes portraitGlare {
  0%, 35% { transform: translateX(-75%) rotate(22deg); opacity: 0; }
  52% { opacity: .9; }
  70%, 100% { transform: translateX(75%) rotate(22deg); opacity: 0; }
}

@keyframes spotlightSwing {
  from { transform: rotate(-8deg); }
  to { transform: rotate(11deg); }
}

@keyframes orbitSpin {
  to { transform: rotate(342deg); }
}

@keyframes starPulse {
  0%, 100% { transform: scale(.8) rotate(-8deg); opacity: .6; }
  50% { transform: scale(1.2) rotate(8deg); opacity: 1; }
}

@keyframes exclaimBounce {
  to { transform: translateY(-.06em) rotate(7deg) scale(1.07); }
}

@keyframes buttonShine {
  0%, 55% { left: -40%; }
  75%, 100% { left: 130%; }
}

@keyframes swooshPulse {
  0%, 100% { opacity: .55; transform: rotate(13deg) scale(.97); }
  50% { opacity: .95; transform: rotate(10deg) scale(1.04); }
}

@keyframes badgeBob {
  0%, 100% { margin-top: -5px; }
  50% { margin-top: 8px; }
}

@keyframes tickerMove {
  to { transform: translateX(-50%); }
}

@keyframes sparkBurst {
  0% { transform: translate3d(0,0,0) scale(.2) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate3d(var(--dx), var(--dy), 0) scale(1.4) rotate(var(--spin)); opacity: 0; }
}

@keyframes grandBounce {
  0% { transform: scale(1) rotate(0); }
  35% { transform: scale(.92) rotate(-4deg); }
  70% { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

@media (max-width: 1200px) {
  .site-shell { min-height: 600px; }
  .topbar { height: 82px; padding-block: 15px; }
  .hero { height: calc(100% - 152px); grid-template-columns: minmax(0, 1fr) minmax(430px, .9fr); }
  .copy-panel { transform: scale(.9); transform-origin: left center; width: 111%; }
  .portrait-button { width: min(45vw, 560px); }
  .badge-top { left: -2%; }
  .badge-bottom { right: -4%; }
  .ticker { height: 70px; }
  .ticker-track { height: 41px; }
}

@media (max-width: 860px) {
  body { overflow: auto; display: block; }
  .site-shell {
    width: 100%;
    height: auto;
    min-height: 100svh;
    overflow: hidden;
  }
  .backdrop {
    position: fixed;
    background-image:
      linear-gradient(180deg, rgba(7,24,39,.9) 0%, rgba(7,24,39,.62) 50%, rgba(7,24,39,.92) 100%),
      url("assets/grand-baton-stage.jpg");
    background-position: 62% center;
  }
  .topbar { height: 82px; padding: 15px 18px; }
  .brand span, .brand b { display: none; }
  .nav-link { min-height: 45px; padding: 0 13px; font-size: .84rem; }
  .hero {
    height: auto;
    min-height: calc(100svh - 82px);
    grid-template-columns: 1fr;
    padding: 28px 20px 126px;
  }
  .copy-panel { order: 2; width: auto; max-width: 720px; transform: none; }
  .character-zone { order: 1; min-height: 420px; }
  .portrait-button { width: min(76vw, 500px); }
  .title-top { font-size: clamp(4.7rem, 22vw, 8rem); }
  .title-bottom { font-size: clamp(5rem, 23vw, 8.5rem); }
  .eyebrow { font-size: .68rem; }
  .lore-card { max-width: none; }
  .orbit { width: min(91vw, 650px); }
  .badge-top { left: 4%; }
  .badge-bottom { right: 2%; }
  .ticker { position: absolute; height: 86px; }
}

@media (max-width: 520px) {
  .social-nav { gap: 7px; }
  .nav-link { padding: 0 10px; }
  .nav-icon { display: none; }
  .character-zone { min-height: 345px; }
  .portrait-button { width: min(82vw, 390px); }
  .portrait-frame { border-width: 6px; box-shadow: 10px 10px 0 var(--red), -8px -8px 0 var(--mint), 0 25px 60px rgba(0,0,0,.45); }
  .badge { display: none; }
  .tap-note { right: -4px; bottom: -3%; font-size: .61rem; }
  .hero { padding-inline: 16px; }
  .title-top { font-size: 21vw; }
  .title-bottom { font-size: 22vw; }
  .hero-line { font-size: 1rem; }
  .lore-card { padding: 18px 16px 14px; }
  .lore-card p { font-size: .9rem; }
  .action-row { flex-direction: column; }
  .ca-button, .grand-button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
