@font-face {
  font-family: "IKunner CN";
  src: url("assets/ikunner-cn.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 950;
  font-display: swap;
}

:root {
  --ink: #11110f;
  --paper: #f4eddf;
  --red: #ef3b24;
  --yellow: #f3c63f;
  --teal: #16a6a1;
  --white: #fffdf8;
  --line: rgba(17, 17, 15, 0.22);
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "IKunner CN", sans-serif;
  --sans: "IKunner CN", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
a,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--yellow);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 82px;
  padding: 0 4vw;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: inherit;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: var(--yellow);
  font-family: var(--display);
  font-size: 20px;
}

.main-nav {
  display: flex;
  gap: 34px;
}

.main-nav a {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--yellow);
}

.sound-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 4px;
  cursor: pointer;
}

.sound-button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
}

.hero {
  position: relative;
  min-height: 92svh;
  height: 860px;
  max-height: 980px;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.hero-art,
.hero-shade,
.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.94) contrast(1.06);
  transform: scale(1.02);
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}

.hero-shade {
  background: rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 -220px 190px rgba(0, 0, 0, 0.68), inset 340px 0 220px rgba(0, 0, 0, 0.28);
}

.hero-grid {
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent 15%, black 55%, transparent 100%);
}

.hero-content {
  position: absolute;
  z-index: 3;
  left: 5vw;
  bottom: 11%;
  max-width: 980px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow span {
  padding: 7px 9px;
  color: var(--ink);
  background: var(--yellow);
}

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

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 156px;
  font-weight: 900;
  line-height: 0.78;
  text-transform: uppercase;
  text-shadow: 8px 8px 0 rgba(17, 17, 15, 0.82);
}

.hero-subtitle {
  width: fit-content;
  margin: 28px 0 32px;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  font-weight: 900;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-action,
.fortune-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 900;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.primary-action:active,
.fortune-button:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--ink);
}

.text-link {
  color: var(--white);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.hero-stamp {
  position: absolute;
  z-index: 4;
  right: 5vw;
  bottom: 8%;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  color: var(--ink);
  background: var(--yellow);
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 8px 8px 0 var(--red);
  transform: rotate(7deg);
}

.hero-stamp strong {
  font-family: var(--display);
  font-size: 46px;
  line-height: 0.7;
}

.hero-stamp span {
  font-size: 11px;
  font-weight: 900;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  right: 3vw;
  top: 44%;
  display: flex;
  align-items: center;
  gap: 14px;
  writing-mode: vertical-rl;
  font-size: 11px;
  font-weight: 800;
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: 72px;
  background: var(--white);
}

.showtime .hero-art {
  filter: saturate(1.35) contrast(1.1);
  transform: scale(1.07);
}

.showtime .hero-stamp {
  animation: stamp-bump 620ms ease both;
}

@keyframes stamp-bump {
  35% { transform: rotate(-8deg) scale(1.2); }
  100% { transform: rotate(7deg) scale(1); }
}

.ticker {
  overflow: hidden;
  color: var(--ink);
  background: var(--yellow);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 18s linear infinite;
}

.ticker span,
.ticker i {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 24px;
  font-size: 18px;
  font-weight: 950;
  font-style: normal;
}

.ticker i {
  color: var(--red);
}

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

.section-shell {
  width: min(1380px, calc(100% - 10vw));
  margin: 0 auto;
}

.section-index {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
}

.statement {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: end;
  padding-top: 120px;
  padding-bottom: 130px;
}

.statement h2,
.section-heading h2,
.lore h2,
.finale h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 84px;
  line-height: 0.94;
  text-transform: uppercase;
}

.statement h2 em {
  color: var(--red);
  font-style: normal;
}

.statement-note {
  margin: 0;
  padding-left: 22px;
  border-left: 6px solid var(--teal);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.75;
}

.power {
  color: var(--white);
  background: var(--ink);
  border-top: 14px solid var(--red);
}

.power-inner {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(480px, 1.22fr);
  gap: 8vw;
  align-items: center;
  min-height: 790px;
  padding-top: 100px;
  padding-bottom: 100px;
}

.section-heading h2 {
  font-size: 72px;
}

.section-heading .section-index {
  margin-bottom: 66px;
  color: var(--teal);
}

.power-result {
  margin: 38px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.power-result strong {
  color: var(--yellow);
}

.mixer {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.mix-row {
  display: grid;
  grid-template-columns: 50px 120px minmax(150px, 1fr) 58px;
  gap: 16px;
  align-items: center;
  min-height: 116px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.mix-number {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.mix-name {
  font-family: var(--display);
  font-size: 42px;
}

.mix-row output {
  color: var(--yellow);
  font-family: var(--display);
  font-size: 32px;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  height: 42px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
  appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: #454541;
  border: 1px solid #73736e;
}

input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 42px;
  margin-top: -18px;
  background: var(--red);
  border: 3px solid var(--white);
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--teal);
  appearance: none;
}

input[type="range"]::-moz-range-track {
  height: 8px;
  background: #454541;
  border: 1px solid #73736e;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 42px;
  background: var(--red);
  border: 3px solid var(--white);
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--teal);
}

.meme {
  position: relative;
  overflow: hidden;
  background: var(--teal);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.meme::before {
  content: "KUN";
  position: absolute;
  top: -92px;
  right: -34px;
  color: rgba(244, 237, 223, 0.16);
  font-family: var(--display);
  font-size: 380px;
  line-height: 1;
  pointer-events: none;
}

.meme-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: 7vw;
  align-items: center;
  min-height: 760px;
  padding-top: 100px;
  padding-bottom: 100px;
}

.fortune-stage {
  min-height: 430px;
  padding: 46px;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 4px;
  box-shadow: 16px 16px 0 var(--red);
}

.fortune-meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 900;
}

.fortune-stage blockquote {
  min-height: 188px;
  margin: 45px 0 32px;
  font-family: var(--display);
  font-size: 48px;
  line-height: 1.05;
}

.fortune-stage.is-changing blockquote {
  animation: fortune-change 380ms ease both;
}

@keyframes fortune-change {
  0% { opacity: 1; transform: translateY(0); }
  48% { opacity: 0; transform: translateY(-14px); }
  52% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

.basketball {
  position: absolute;
  right: -86px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  padding: 0;
  overflow: hidden;
  background: #ed5b25;
  border: 9px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 180ms ease;
}

.basketball::before,
.basketball::after,
.basketball span::before,
.basketball span::after {
  content: "";
  position: absolute;
  display: block;
}

.basketball::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--ink);
  transform: translateY(-50%) rotate(-13deg);
}

.basketball::after {
  top: 0;
  left: 50%;
  width: 8px;
  height: 100%;
  background: var(--ink);
  transform: translateX(-50%) rotate(13deg);
}

.basketball span::before,
.basketball span::after {
  top: 8%;
  width: 62%;
  height: 84%;
  border: 8px solid var(--ink);
  border-radius: 50%;
}

.basketball span::before { left: -35%; }
.basketball span::after { right: -35%; }

.basketball.bounce {
  animation: ball-bounce 440ms ease;
}

@keyframes ball-bounce {
  45% { transform: translateY(-58px) rotate(22deg); }
}

.ball-count {
  position: absolute;
  right: 100px;
  bottom: 28px;
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.lore {
  padding: 130px 0 150px;
  background: var(--paper);
}

.lore-heading {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 36px;
  margin-bottom: 90px;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 3px solid var(--ink);
}

.timeline li {
  display: grid;
  grid-template-columns: 150px 220px 1fr;
  gap: 36px;
  align-items: center;
  min-height: 112px;
  border-bottom: 1px solid var(--line);
  transition: color 180ms ease, background 180ms ease, padding 180ms ease;
}

.timeline li:hover {
  padding: 0 20px;
  color: var(--white);
  background: var(--red);
}

.timeline time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
}

.timeline strong {
  font-family: var(--display);
  font-size: 38px;
}

.timeline span {
  font-weight: 650;
}

.finale {
  min-height: 680px;
  padding: 110px 5vw 90px;
  color: var(--white);
  background: var(--red);
  border-top: 3px solid var(--ink);
}

.finale p {
  margin: 0 0 28px;
  font-weight: 900;
}

.finale h2 {
  max-width: 1200px;
  font-size: 112px;
}

.finale a {
  display: inline-flex;
  gap: 12px;
  margin-top: 62px;
  padding-bottom: 7px;
  color: var(--white);
  border-bottom: 3px solid var(--yellow);
  font-weight: 900;
  text-decoration: none;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 88px;
  padding: 0 5vw;
  color: var(--white);
  background: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 24px;
  min-width: 210px;
  padding: 14px 18px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--red);
  font-weight: 900;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confetti {
  position: fixed;
  z-index: 50;
  top: -20px;
  width: 10px;
  height: 18px;
  pointer-events: none;
  animation: confetti-fall 1.5s cubic-bezier(0.25, 0.8, 0.4, 1) forwards;
}

@keyframes confetti-fall {
  to { transform: translate3d(var(--drift), 105vh, 0) rotate(720deg); }
}

@media (max-width: 1050px) {
  .hero h1 { font-size: 112px; }
  .hero-stamp { width: 112px; height: 112px; }
  .statement { grid-template-columns: 100px 1fr; }
  .statement-note { grid-column: 2; max-width: 520px; }
  .statement h2, .lore h2 { font-size: 68px; }
  .power-inner { gap: 5vw; }
  .section-heading h2 { font-size: 60px; }
  .meme-shell { grid-template-columns: 0.65fr 1.35fr; gap: 5vw; }
  .fortune-stage blockquote { font-size: 40px; }
  .finale h2 { font-size: 86px; }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    height: 68px;
    padding: 0 18px;
  }

  .main-nav { display: none; }
  .sound-button { min-height: 38px; padding: 0 12px; }

  .hero {
    min-height: 90svh;
    height: 760px;
    max-height: 840px;
  }

  .hero-art { object-position: 58% 30%; }
  .hero-shade { box-shadow: inset 0 -330px 210px rgba(0, 0, 0, 0.82); }
  .hero-grid { background-size: 48px 48px; }
  .hero-content { left: 20px; right: 20px; bottom: 9%; }
  .hero h1 { font-size: 68px; line-height: 0.82; text-shadow: 5px 5px 0 rgba(17, 17, 15, 0.88); }
  .hero-subtitle { max-width: 100%; font-size: 13px; white-space: normal; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .hero-stamp { right: 18px; top: 104px; bottom: auto; width: 92px; height: 92px; border-width: 3px; }
  .hero-stamp strong { font-size: 34px; }
  .hero-stamp span { font-size: 9px; }
  .scroll-cue { display: none; }

  .ticker span, .ticker i { height: 46px; padding: 0 18px; font-size: 15px; }
  .section-shell { width: calc(100% - 40px); }

  .statement {
    display: block;
    padding-top: 82px;
    padding-bottom: 86px;
  }

  .statement-copy { margin-top: 52px; }
  .statement h2, .lore h2 { font-size: 52px; }
  .statement-note { margin-top: 48px; }

  .power-inner {
    display: block;
    min-height: 0;
    padding-top: 78px;
    padding-bottom: 84px;
  }

  .section-heading .section-index { margin-bottom: 46px; }
  .section-heading h2 { font-size: 52px; }
  .mixer { margin-top: 64px; }
  .mix-row { grid-template-columns: 28px 74px 1fr 40px; gap: 8px; min-height: 92px; }
  .mix-name { font-size: 30px; }
  .mix-row output { font-size: 25px; }

  .meme-shell {
    display: block;
    min-height: 860px;
    padding-top: 78px;
    padding-bottom: 120px;
  }

  .meme::before { top: 70px; right: -20px; font-size: 210px; }
  .fortune-stage { min-height: 390px; margin-top: 58px; padding: 28px 24px; box-shadow: 10px 10px 0 var(--red); }
  .fortune-stage blockquote { min-height: 180px; margin: 36px 0 26px; font-size: 34px; }
  .basketball { right: -74px; bottom: -78px; width: 210px; height: 210px; }
  .ball-count { right: 82px; bottom: 24px; }

  .lore { padding: 88px 0 100px; }
  .lore-heading { display: block; margin-bottom: 62px; }
  .lore-heading h2 { margin-top: 48px; }
  .timeline li { grid-template-columns: 82px 1fr; gap: 14px; min-height: 126px; padding: 20px 0; }
  .timeline strong { font-size: 32px; }
  .timeline span { grid-column: 2; }
  .timeline li:hover { padding: 20px 12px; }

  .finale { min-height: 590px; padding: 90px 20px 70px; }
  .finale h2 { font-size: 58px; }
  footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 28px 20px; }
}

@media (max-width: 390px) {
  .brand > span:last-child { display: none; }
  .hero h1 { font-size: 56px; }
  .hero-subtitle { font-size: 12px; }
  .statement h2, .section-heading h2, .lore h2 { font-size: 44px; }
  .mix-row { grid-template-columns: 24px 60px 1fr 36px; }
  .mix-name { font-size: 26px; }
  .fortune-stage blockquote { font-size: 30px; }
  .finale h2 { font-size: 48px; }
}

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