:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5d6b82;
  --paper: #fffdf8;
  --line: #d8e0ec;
  --fb-blue: #063b79;
  --fb-yellow: #ffd338;
  --red: #d94032;
  --green: #1f9d5a;
  --shadow: 0 18px 50px rgba(20, 32, 54, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 211, 56, 0.16), transparent 34%),
    linear-gradient(180deg, #f7fbff 0%, var(--paper) 46%, #eef7f2 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 211, 56, 0.28), transparent 18%),
    radial-gradient(circle at 18% 18%, rgba(217, 64, 50, 0.3), transparent 28%),
    linear-gradient(135deg, #04152f 0%, #063b79 46%, #0a1728 100%);
  color: white;
  isolation: isolate;
  animation: loaderExit 0.7s ease 3s forwards;
}

.loader::before,
.loader::after {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: -2;
  background:
    repeating-conic-gradient(from 12deg, rgba(255, 255, 255, 0.04) 0 8deg, transparent 8deg 18deg);
  animation: loaderSweep 7s linear infinite;
}

.loader::after {
  inset: auto -10% -42% -10%;
  height: 55%;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 211, 56, 0.24), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent);
  transform: skewY(-4deg);
  animation: floorGlow 1.6s ease-in-out infinite alternate;
}

.loader-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(78vw, 440px);
  height: min(78vw, 440px);
  animation: stageEnter 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.loader-light {
  position: absolute;
  width: 64%;
  height: 64%;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.55;
}

.light-one {
  background: rgba(255, 211, 56, 0.52);
  animation: pulseLight 1.3s ease-in-out infinite alternate;
}

.light-two {
  width: 42%;
  height: 42%;
  background: rgba(255, 255, 255, 0.34);
  animation: pulseLight 0.9s ease-in-out infinite alternate-reverse;
}

.loader-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 250px;
  height: 250px;
  border-radius: 50%;
}

.belt-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 12px solid transparent;
  animation: orbitSpin 1.3s linear infinite;
}

.orbit-blue {
  border-left-color: #ffffff;
  border-top-color: var(--fb-blue);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.16);
}

.orbit-yellow {
  inset: 22px;
  border-width: 10px;
  border-right-color: var(--fb-yellow);
  border-bottom-color: #ffffff;
  animation-direction: reverse;
  animation-duration: 1.05s;
}

.loader-ring {
  position: absolute;
  width: 116px;
  height: 116px;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--fb-yellow);
  border-right-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loader-kick {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, var(--fb-blue) 0 50%, var(--fb-yellow) 50% 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28), inset 0 0 0 3px rgba(255, 255, 255, 0.22);
  animation: emblemPop 1.1s ease-in-out infinite alternate;
}

.loader-kick::before,
.loader-kick::after {
  content: "";
  position: absolute;
  background: white;
  border-radius: 999px;
}

.loader-kick::before {
  left: 24px;
  top: 29px;
  width: 38px;
  height: 12px;
  box-shadow: 19px 23px 0 var(--red), 38px 46px 0 white;
  transform: rotate(-28deg);
}

.loader-kick::after {
  right: 18px;
  bottom: 24px;
  width: 58px;
  height: 13px;
  background: var(--fb-yellow);
  transform: rotate(-18deg);
}

.loader-copy {
  position: absolute;
  left: 50%;
  bottom: clamp(44px, 8vh, 86px);
  width: min(92vw, 780px);
  text-align: center;
  transform: translateX(-50%);
}

.loader-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--fb-yellow);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: textRise 0.65s ease 0.2s both;
}

.loader h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(3rem, 11vw, 7.4rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  animation: titleStrike 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s both;
}

.loader-belt {
  position: relative;
  width: min(520px, 76vw);
  height: 16px;
  margin: 18px auto 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.loader-belt span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--fb-blue) 0 22%, #ffffff 22% 28%, var(--fb-yellow) 28% 72%, #ffffff 72% 78%, var(--red) 78% 100%);
  transform-origin: left center;
  animation: beltLoad 2.3s cubic-bezier(0.3, 0, 0.1, 1) both;
}

.loader p {
  margin: 0;
  color: #dbeafe;
  font-weight: 700;
  animation: textRise 0.65s ease 0.75s both;
}

.loader-spark {
  position: absolute;
  width: 74px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #ffffff, var(--fb-yellow), transparent);
  filter: drop-shadow(0 0 10px rgba(255, 211, 56, 0.7));
}

.spark-one {
  left: 5%;
  top: 38%;
  animation: sparkFly 1.15s ease-in-out infinite;
}

.spark-two {
  right: 7%;
  top: 29%;
  animation: sparkFly 1.35s ease-in-out 0.25s infinite reverse;
}

.spark-three {
  left: 16%;
  bottom: 25%;
  animation: sparkFly 1.25s ease-in-out 0.45s infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes loaderSweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes floorGlow {
  from {
    opacity: 0.42;
  }
  to {
    opacity: 0.78;
  }
}

@keyframes stageEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.82);
  }
  to {
    opacity: 1;
    transform: translateY(-36px) scale(1);
  }
}

@keyframes pulseLight {
  from {
    transform: scale(0.86);
    opacity: 0.36;
  }
  to {
    transform: scale(1.08);
    opacity: 0.72;
  }
}

@keyframes emblemPop {
  from {
    transform: rotate(-4deg) scale(0.97);
  }
  to {
    transform: rotate(4deg) scale(1.04);
  }
}

@keyframes textRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleStrike {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes beltLoad {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes sparkFly {
  0% {
    opacity: 0;
    transform: translateX(-38px) rotate(-18deg) scaleX(0.35);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(58px) rotate(-18deg) scaleX(1);
  }
}

@keyframes loaderExit {
  to {
    opacity: 0;
    transform: scale(1.04);
    filter: blur(8px);
    visibility: hidden;
    pointer-events: none;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 46px);
  background: rgba(255, 253, 248, 0.88);
  border-bottom: 1px solid rgba(216, 224, 236, 0.84);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--fb-blue) 0 50%, var(--fb-yellow) 50% 100%);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.tab.active {
  background: var(--fb-blue);
  color: white;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 150px);
}

.hero-copy,
.section-head,
.game-info,
.zone-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.83rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.62;
}

.hero-copy p:not(.eyebrow),
.section-head p,
.game-info p,
.zone-text p {
  max-width: 62ch;
  margin-top: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 900;
}

.primary-action {
  background: var(--red);
  color: white;
  box-shadow: 0 10px 24px rgba(217, 64, 50, 0.22);
}

.secondary-action {
  background: white;
  color: var(--fb-blue);
  border-color: var(--line);
}

.dojo-scene {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #cde9ff 0 42%, #f2d99f 42% 43%, #e8f4e7 43% 100%);
  box-shadow: var(--shadow);
}

.dojo-scene img {
  position: absolute;
  left: 50%;
  bottom: 32px;
  width: min(72%, 420px);
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 22px rgba(23, 32, 51, 0.22));
}

.mat-lines {
  position: absolute;
  inset: 43% 0 0;
  background:
    linear-gradient(90deg, transparent 0 11%, rgba(6, 59, 121, 0.15) 11% 11.5%, transparent 11.5%),
    repeating-linear-gradient(0deg, rgba(217, 64, 50, 0.14) 0 3px, transparent 3px 62px);
}

.sun {
  position: absolute;
  right: 12%;
  top: 11%;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--fb-yellow);
  box-shadow: 0 0 0 18px rgba(255, 211, 56, 0.22);
}

.training-zone,
.game-shell {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 36px;
}

.bag-arena,
.canvas-wrap {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #eaf6ff 0 58%, #d7ede0 58%),
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(6, 59, 121, 0.06) 78px 80px);
  box-shadow: var(--shadow);
  touch-action: none;
}

.bag-rope {
  --rope-left: 50%;
  --rope-height: 106px;
  --rope-angle: 0deg;
  position: absolute;
  top: 0;
  left: var(--rope-left);
  z-index: 1;
  width: 8px;
  height: var(--rope-height);
  background:
    repeating-linear-gradient(0deg, #5f4632 0 8px, #8b6a4d 8px 14px);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 0 rgba(23, 32, 51, 0.18);
  transform: translateX(-50%) rotate(var(--rope-angle));
  transform-origin: 50% 0;
}

.punching-bag {
  --bag-angle: 0deg;
  --bag-squash: 1;
  position: absolute;
  z-index: 2;
  left: calc(50% - 58px);
  top: 118px;
  width: 116px;
  height: 210px;
  border: 0;
  border-radius: 48px 48px 40px 40px;
  background:
    radial-gradient(circle at 34% 18%, rgba(255, 255, 255, 0.42), transparent 17%),
    linear-gradient(90deg, #721a16 0%, #d94032 28%, #ef6b58 50%, #b92d26 72%, #651511 100%);
  box-shadow: inset 0 -24px 28px rgba(0, 0, 0, 0.18), 0 20px 24px rgba(23, 32, 51, 0.2);
  cursor: grab;
  touch-action: none;
  transform: rotate(var(--bag-angle)) scaleX(calc(2 - var(--bag-squash))) scaleY(var(--bag-squash));
  transform-origin: 50% -58px;
  transition: box-shadow 0.18s ease, filter 0.18s ease;
}

.punching-bag:active {
  cursor: grabbing;
  filter: brightness(1.04);
  box-shadow: inset 0 -24px 28px rgba(0, 0, 0, 0.18), 0 26px 28px rgba(23, 32, 51, 0.24);
}

.punching-bag span {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 28px;
  height: 14px;
  border-radius: 99px;
  background: rgba(255, 211, 56, 0.88);
  box-shadow: 0 112px 0 rgba(255, 211, 56, 0.88);
}

.punching-bag::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -22px;
  width: 46px;
  height: 28px;
  border: 6px solid #4b3425;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  transform: translateX(-50%);
}

.punching-bag::after {
  content: "";
  position: absolute;
  inset: 18px 18px auto auto;
  width: 16px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.punching-bag.hit {
  animation: bagFlash 0.24s ease;
}

@keyframes bagFlash {
  0% {
    filter: brightness(1);
  }
  45% {
    filter: brightness(1.18) saturate(1.15);
  }
  100% {
    filter: brightness(1);
  }
}

.score-panel,
.game-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}

.score-panel span,
.game-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-weight: 800;
}

.score-panel strong,
.game-stats strong {
  margin-left: 6px;
  color: var(--ink);
  font-size: 1.25rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.info-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.section-head {
  min-height: 240px;
  padding: 26px 0;
}

.section-head h1,
.game-info h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
}

.belt-road {
  display: grid;
  gap: 12px;
}

.belt-road article {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.belt-road span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 2px solid rgba(23, 32, 51, 0.16);
  border-radius: 7px;
  background: var(--belt);
  color: var(--text);
  font-weight: 900;
}

.podcast-head h1 {
  max-width: 12ch;
}

.podcast-layout {
  display: grid;
  margin-top: 18px;
}

.podcast-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.podcast-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(6, 59, 121, 0.95), rgba(23, 32, 51, 0.98)),
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 255, 255, 0.08) 18px 21px);
  isolation: isolate;
}

.podcast-art::before {
  content: "";
  position: absolute;
  inset: auto -12% -20% -12%;
  height: 42%;
  background:
    linear-gradient(90deg, transparent, rgba(255, 211, 56, 0.38), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent);
  transform: skewY(-7deg);
}

.podcast-art strong {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--fb-blue) 0 50%, var(--fb-yellow) 50% 100%);
  color: white;
  font-size: 2.6rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.34);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.24);
}

.podcast-ring,
.podcast-belt,
.podcast-wave {
  position: absolute;
  border-radius: 999px;
}

.podcast-ring {
  width: 230px;
  height: 230px;
  border: 12px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--fb-yellow);
  border-right-color: white;
  animation: spin 8s linear infinite;
}

.podcast-belt {
  z-index: 2;
  width: 78%;
  height: 18px;
  background:
    linear-gradient(90deg, var(--fb-yellow) 0 43%, white 43% 48%, #111827 48% 55%, white 55% 60%, var(--red) 60% 100%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  transform: rotate(-13deg);
}

.podcast-wave {
  width: 78px;
  height: 78px;
  border: 4px solid rgba(255, 255, 255, 0.18);
  opacity: 0.9;
}

.wave-one {
  left: 11%;
  top: 18%;
}

.wave-two {
  right: 12%;
  bottom: 18%;
  border-color: rgba(255, 211, 56, 0.32);
}

.podcast-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 56px);
}

.episode-label {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  background: rgba(31, 157, 90, 0.12);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.podcast-content h2 {
  margin-top: 18px;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 0.98;
}

.podcast-content p {
  max-width: 54ch;
  margin-top: 14px;
}

.podcast-content audio {
  width: 100%;
  margin-top: 24px;
  accent-color: var(--red);
}

.canvas-wrap {
  display: grid;
  place-items: center;
  min-height: 470px;
  background: #eff8ff;
}

canvas {
  display: block;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 15 / 7;
}

@media (max-width: 820px) {
  .site-header,
  .hero,
  .training-zone,
  .game-shell,
  .info-grid,
  .belt-road article {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .tab {
    padding: 0 8px;
  }

  .hero {
    min-height: auto;
  }

  .dojo-scene {
    min-height: 420px;
  }

  .podcast-card {
    grid-template-columns: 1fr;
  }

  .podcast-art {
    min-height: 280px;
  }

  h1 {
    font-size: clamp(2.55rem, 16vw, 4.7rem);
  }

  .loader-stage {
    width: min(92vw, 350px);
    height: min(92vw, 350px);
  }

  .loader-emblem {
    width: 210px;
    height: 210px;
  }

  .loader-kick {
    width: 92px;
    height: 92px;
    border-radius: 20px;
  }

  .loader-copy {
    bottom: 42px;
  }

  .loader h1 {
    font-size: clamp(2.8rem, 15vw, 5rem);
  }
}

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

  .loader {
    animation-delay: 0.2s;
  }

  .loader-stage {
    transform: translateY(-24px);
  }
}
