/* ============================================================================
   Iron Lions: arcade theme, bento edition
   Brand colours from ironlionskarate.ca: brown #2F2200, gold #FED773,
   cream #FFF6DE. The page is a framed board of tiles with thick ink borders and
   hard offset shadows (a neobrutalist grid, per the client's reference), set in
   a pixel display face for the game voice and Rubik for readable body text.
   ========================================================================== */

@font-face { font-family: "Jersey 10"; src: url("assets/fonts/jersey-10.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("assets/fonts/rubik-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("assets/fonts/rubik-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("assets/fonts/rubik-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("assets/fonts/rubik-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  /* brand */
  --ink:   #1C1400;   /* borders, body text: the brand brown, deepened */
  --brown: #2F2200;
  --gold:  #FED773;
  --gold-deep: #E5B744;
  --cream: #FFF6DE;
  --paper: #FFFCF3;
  --soft:  #5A4A22;   /* secondary text on light tiles (AA on cream and paper) */
  --soft-dark: #DCCDA6; /* secondary text on brown tiles */
  --grid:  rgb(47 34 0 / .09);
  --on-gold: #1C1400; /* text on gold, in both themes */
  --light:   #FFF6DE; /* text on brown tiles, in both themes */
  --edge:  var(--ink); /* borders */
  --shc:   var(--ink); /* hard shadows */
  --card:  #FFFFFF;
  --bad:   #FFE4D6;

  --b: 3px;
  --line: var(--b) solid var(--edge);
  --sh: 6px 6px 0 var(--shc);
  --sh-sm: 4px 4px 0 var(--shc);

  /* engine tokens */
  --sc-canvas: #F3E8C9;
  --sc-surface: var(--paper);
  --sc-ink: var(--ink);
  --sc-ink-soft: var(--soft);
  --sc-accent: var(--gold);
  --sc-accent-ink: var(--ink);
  --sc-font-display: "Jersey 10", "Arial Narrow", sans-serif;
  --sc-font-text: "Rubik", system-ui, sans-serif;
  --sc-gutter: clamp(1rem, 3.2vw, 2.5rem);

  /* belt colours for the level path (edit to match the dojo's ranks) */
  --belt-1: #FFFFFF; --belt-2: #F2C531; --belt-3: #3E9B4F; --belt-4: #7A4B21; --belt-5: #15110A;
}

/* ----------------------------------------------------------- dark mode --
   Same board, lights off: tiles go to deep browns, text to cream, gold stays
   gold (with dark text on it). Set by the toggle in the header; first visit
   follows the device setting (see the inline script in <head>). */
:root[data-theme="dark"] {
  --ink:   #FFF6DE;
  --paper: #231A04;
  --cream: #2D2208;
  --brown: #100C00;
  --soft:  #DCCDA6;
  --grid:  rgb(255 246 222 / .06);
  --edge:  #0A0700;
  --shc:   #000000;
  --card:  #2D2208;
  --bad:   #5A2414;
  --sc-canvas: #3A2C0B;
  color-scheme: dark;
}
:root[data-theme="dark"] .board { box-shadow: 10px 10px 0 #000; }
:root[data-theme="dark"] .gold .lede, :root[data-theme="dark"] .gold .body { color: #4A3608; }

html { scroll-padding-top: 5rem; }
body { background: var(--sc-canvas); color: var(--ink); }

/* the whole site sits on one framed board */
.board { width: min(100% - 2 * clamp(.5rem, 2.4vw, 2rem), 84rem); margin: clamp(.5rem, 2.4vw, 2rem) auto; border: var(--line); box-shadow: 10px 10px 0 var(--shc); background: var(--paper); }
@media (max-width: 600px) { .board { box-shadow: 5px 5px 0 var(--shc); } }

/* Jersey 10: an arcade-fighter pixel face, condensed and proportional. Sizes
   on this site were set for a much wider face, so every display-font element
   gets the same font-size-adjust to bring it up to a readable size. */
.px, .btn, .player dt, .steps h4, .steps .tag, .strip .glyph, .burst, .nameplate__init, .slot[data-missing]::after, .talk summary::after {
  font-size-adjust: .9; letter-spacing: .04em; font-weight: 400; }
.px { font-family: var(--sc-font-display); line-height: 1.45; text-transform: uppercase; }
/* (1.45, not tighter: the face is drawn larger than its font-size by
   font-size-adjust, so tighter leading makes wrapped lines collide) */
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
.wrap { padding-inline: var(--sc-gutter); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--gold); color: var(--ink); padding: .75rem 1rem; border: var(--line); }

/* ----------------------------------------------------------------- type -- */
.t-hero { font-size: clamp(1.6rem, 1rem + 2.6vw, 3.1rem); line-height: 1.3; }
.t-xl   { font-size: clamp(1.25rem, .95rem + 1.5vw, 2.2rem); line-height: 1.38; }
.t-lg   { font-size: clamp(1rem, .85rem + .8vw, 1.45rem); line-height: 1.5; }
.t-md   { font-size: clamp(.78rem, .72rem + .3vw, .95rem); line-height: 1.6; }
.t-sm   { font-size: .68rem; line-height: 1.7; }
.lede   { font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem); line-height: 1.55; color: var(--soft); max-width: 50ch; }
.body   { max-width: 62ch; color: var(--soft); }

/* ------------------------------------------------------------- surfaces -- */
.tile { border-bottom: var(--line); position: relative; }
.paper  { background: var(--paper); }
.cream  { background: var(--cream); }
.gridpaper { background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px; }
.gold   { background: var(--gold); }
.brown  { background: var(--brown); color: var(--light); }
.brown .lede, .brown .body { color: var(--soft-dark); }
.brown.gridpaper { background-color: var(--brown); background-image: linear-gradient(rgb(255 246 222 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(255 246 222 / .07) 1px, transparent 1px); }
.gold .lede, .gold .body { color: #4A3608; }

.box { background: var(--paper); border: var(--line); box-shadow: var(--sh); }
.box--gold { background: var(--gold); }
.box--brown { background: var(--brown); color: var(--light); }
.box--brown .body { color: var(--soft-dark); }

.chip { justify-self: start; align-self: start; display: inline-block; padding: .55rem .7rem .45rem; font-size: .62rem; background: var(--brown); color: var(--gold); }
.chip--gold { background: var(--gold); color: var(--ink); border: 2px solid var(--edge); }

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }

/* --------------------------------------------------------------- button -- */
/* Hard-shadow arcade button: presses down into its shadow. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 3.1rem; padding: .95rem 1.25rem .85rem;
  font-family: var(--sc-font-display); font-size: .72rem; line-height: 1.3; letter-spacing: 0; text-transform: uppercase;
  color: var(--ink); background: var(--gold); text-decoration: none; cursor: pointer;
  border: var(--line); box-shadow: var(--sh-sm);
  transition: transform 80ms steps(2), box-shadow 80ms steps(2);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shc); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shc); }
.btn:focus-visible { outline: 3px solid var(--edge); outline-offset: 4px; }
.btn--paper { background: var(--paper); }
.btn--brown { background: var(--brown); color: var(--gold); }
.brown .btn--paper, .brown .btn { box-shadow: 4px 4px 0 #000; }
.btn--sm { min-height: 2.5rem; padding: .65rem .9rem .55rem; font-size: .6rem; }
.arr { font-family: var(--sc-font-text); font-size: 1.6em; line-height: .6; font-weight: 700; text-transform: none; }
.px .arr, .btn .arr, .hud__cta .arr { font-size: 1.9em; }
.btn .blink { animation: blink 1.1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .btn .blink { animation: none; } .btn, .btn:hover { transform: none; } }

.iconbtn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: var(--line); background: var(--paper); box-shadow: 3px 3px 0 var(--shc); }
.iconbtn svg { width: 1.2rem; height: 1.2rem; }
.iconbtn:hover { background: var(--gold); }
.iconbtn:focus-visible { outline: 3px solid var(--edge); outline-offset: 3px; }

/* ------------------------------------------------------------------ HUD --
   Top bar of the board, three tiles: player card (logo, LV, XP bar), stage
   select (the real pages), and the one CTA. The XP bar is the signature move's
   chrome: it fills with page scroll and changes belt colour per stage. */
.hud { position: sticky; top: 0; z-index: 60; display: grid; grid-template-columns: auto 1fr auto; border-bottom: var(--line); background: var(--paper); }
.hud__player { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; background: var(--gold); border-right: var(--line); text-decoration: none; min-width: 0; }
.hud__avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--edge); overflow: hidden; }
.hud__avatar img, .hud__avatar .slot { width: 86%; height: 86%; object-fit: contain; }
.hud__meta { display: grid; gap: .35rem; min-width: 0; }
.hud__name { font-size: .6rem; white-space: nowrap; }
.hud__lvl { font-size: .55rem; }
.xp { position: relative; width: clamp(6rem, 11vw, 10rem); height: 12px; background: var(--paper); border: 2px solid var(--edge); }
.xp__fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--xp, 0)); background: var(--belt, var(--belt-1)); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18); }
.hud__stages { display: flex; justify-content: center; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0 .5rem; height: 100%; }
.hud__stages a { display: block; padding: .8rem .75rem; font-size: .58rem; text-decoration: none; }
.hud__stages a:hover { background: var(--gold); }
.hud__stages a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.hud__stages a:focus-visible, .hud__player:focus-visible { outline: 3px solid var(--edge); outline-offset: -5px; }
.hud__cta { display: flex; align-items: center; gap: .6rem; padding: .5rem 1.25rem; background: var(--brown); color: var(--gold); border-left: var(--line); font-size: .62rem; text-decoration: none; }
.hud__cta:hover { background: var(--ink); }
.hud__cta:focus-visible { outline: 3px solid var(--gold); outline-offset: -6px; }
.hud__menu { display: none; border: 0; border-left: var(--line); background: var(--paper); padding: 0 1rem; font-size: .6rem; cursor: pointer; }
.levelup { position: absolute; left: 1rem; top: calc(100% + .6rem); margin: 0; padding: .65rem .8rem .55rem; font-size: .6rem;
  background: var(--gold); color: var(--ink); border: var(--line); box-shadow: var(--sh-sm); pointer-events: none;
  opacity: 0; transform: translateY(-6px); transition: opacity .12s steps(2), transform .2s steps(3); }
.levelup.is-on { opacity: 1; transform: none; }
.levelup:empty { display: none; }

@media (max-width: 1000px) {
  .hud { grid-template-columns: 1fr auto auto; }
  .hud > nav { display: contents; }
  .hud__stages { display: none; }
  .hud__menu { display: block; order: 3; }
  .hud.is-open .hud__stages { display: grid; position: absolute; top: 100%; left: -3px; right: -3px; padding: 0; background: var(--paper); border: var(--line); box-shadow: var(--sh); }
  .hud.is-open .hud__stages a { padding: 1.1rem 1rem; font-size: .72rem; border-bottom: 2px solid var(--edge); }
}
@media (max-width: 520px) {
  .hud__player { padding: .5rem .7rem; gap: .5rem; }
  .hud__name .nm { display: none; }
  .xp { width: 4.5rem; }
  .hud__cta { padding: .5rem .8rem; }
  .hud__cta .long { display: none; }
  .hud__menu { padding: 0 .8rem; }
}
@media (min-width: 521px) { .hud__cta .short { display: none; } }

/* --------------------------------------------------- side label tile --
   The board's section label: a coloured tile beside its content. */
.row { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); border-bottom: var(--line); }
.row__label { display: grid; align-content: center; gap: .9rem; padding: 1.5rem 1.25rem; border-right: var(--line); }
.row__label h2 { font-size: clamp(.8rem, .7rem + .4vw, 1.05rem); }
.row__label .arr { font-size: 1.5rem; line-height: 1; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; } .row__label { border-right: 0; border-bottom: var(--line); grid-auto-flow: column; justify-content: space-between; align-items: center; padding: 1rem var(--sc-gutter); } }

/* ---------------------------------------------------------------- forms -- */
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .4rem; font-weight: 500; font-size: .95rem; }
.form input, .form select, .form textarea { width: 100%; padding: .85rem .95rem; background: var(--paper); color: var(--ink); border: var(--line); border-radius: 0; font-size: 1rem; }
.form textarea { min-height: 6.5rem; resize: vertical; }
.form :is(input, select, textarea):focus { outline: none; background: var(--card); box-shadow: var(--sh-sm); }
.form [aria-invalid="true"] { background: var(--bad); }
.form .two { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.form__note { font-size: .9rem; color: var(--soft); }
.form__status { min-height: 1.5em; font-weight: 700; }

/* --------------------------------------------------------------- footer -- */
.foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.foot > div { padding: 1.75rem 1.4rem; border-right: var(--line); font-size: .95rem; }
.foot > div:last-child { border-right: 0; }
.foot h2 { font-size: .62rem; margin-bottom: .9rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.foot a { text-underline-offset: 3px; }
.foot__logo { width: 64px; height: auto; margin-bottom: .9rem; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; }
.hours dd { margin: 0; }
.footbar { display: grid; grid-template-columns: auto 1fr auto; border-top: var(--line); font-size: .85rem; }
.footbar > * { padding: .9rem 1.2rem; display: flex; align-items: center; gap: .6rem; }
.footbar > :first-child { background: var(--gold); border-right: var(--line); font-size: .58rem; }
.footbar > :nth-child(2) { justify-content: center; text-align: center; }
.footbar > :last-child { border-left: var(--line); }
@media (max-width: 900px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:nth-child(2) { border-right: 0; } .foot > div:nth-child(-n+2) { border-bottom: var(--line); } }
@media (max-width: 560px) { .foot { grid-template-columns: 1fr; } .foot > div { border-right: 0; border-bottom: var(--line); } .foot > div:last-child { border-bottom: 0; } .footbar { grid-template-columns: 1fr; } .footbar > * { border: 0 !important; justify-content: center; } .footbar > :nth-child(2) { border-block: var(--line) !important; } }

/* ------------------------------------------------------- media fallback -- */
.slot { display: block; position: relative; background: repeating-linear-gradient(45deg, #EFE2BD 0 10px, #E8D9AE 10px 20px); overflow: hidden; }
.slot > img, .slot > video { width: 100%; height: 100%; object-fit: cover; }
.slot[data-missing]::after { content: attr(data-missing); position: absolute; inset: auto .6rem .6rem; font: .55rem/1.5 var(--sc-font-display); color: var(--soft); }

/* ----------------------------------------------------------- utilities -- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: var(--gap, 1.25rem); }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.checks li { position: relative; padding-left: 1.7rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .4em; width: .75rem; height: .75rem; background: var(--gold); border: 2px solid var(--edge); }
::selection { background: var(--gold); color: var(--ink); }

/* smallest phones: the level label stays, the XP bar steps aside */
@media (max-width: 370px) { .xp { display: none; } .hud__player { padding: .5rem .6rem; } .hud__cta { padding: .5rem .7rem; font-size: .58rem; } }

/* text that sits on gold stays dark in both themes */
.gold, .box--gold, .chip--gold, .btn, .levelup, .hud__player, .footbar > :first-child, .pass.is-focus,
.strip a:hover, .strip a:focus-visible, .hud__stages a:hover, .iconbtn:hover { color: var(--on-gold); }
.box { color: var(--ink); }
.box--gold { color: var(--on-gold); }
.btn--paper { color: var(--ink); }
.btn--brown { color: var(--gold); }

/* theme toggle: a header tile like the others */
.hud__theme { display: grid; place-items: center; width: 3.4rem; border: 0; border-left: var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.hud__theme:hover { background: var(--gold); color: var(--on-gold); }
.hud__theme:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }
.hud__theme svg { width: 1.35rem; height: 1.35rem; }
.hud__theme .moon { display: none; }
:root[data-theme="dark"] .hud__theme .sun { display: none; }
:root[data-theme="dark"] .hud__theme .moon { display: block; }
.hud { grid-template-columns: auto 1fr auto auto; }
.hud__theme { order: 2; } .hud__cta { order: 3; } .hud__menu { order: 4; }
@media (max-width: 1000px) { .hud { grid-template-columns: 1fr auto auto auto; } }
@media (max-width: 520px) { .hud__theme { width: 2.8rem; } }
@media (max-width: 560px) { .xp { display: none; } .hud__player { padding: .5rem .65rem; } }
@media (max-width: 360px) { .hud__meta { display: none; } }

/* ------------------------------------------------- nav, pass 2 (phones) --
   Phones get three tiles: player card, the CTA, Menu. The theme switch
   moves into the menu. The open menu is a solid panel under the bar. */
.hud__menu-theme { display: none; }
.hud__menu-theme button { width: 100%; text-align: left; padding: 1.1rem 1rem; font: inherit; font-size: .9rem; letter-spacing: .04em; background: var(--cream); color: var(--ink); border: 0; cursor: pointer; }
.hud__menu-theme .moon { display: inline; } .hud__menu-theme .sun { display: none; }
:root[data-theme="dark"] .hud__menu-theme .moon { display: none; }
:root[data-theme="dark"] .hud__menu-theme .sun { display: inline; }
@media (max-width: 1000px) {
  /* phones: player card, theme icon, CTA, Menu. The icon stays in the bar. */
  .hud { grid-template-columns: 1fr auto auto auto; }
  .hud.is-open .hud__stages { display: grid; height: auto; align-items: stretch; justify-content: stretch; position: absolute; top: calc(100% + var(--b)); left: calc(-1 * var(--b)); right: calc(-1 * var(--b)); padding: 0; background: var(--paper); border: var(--line); box-shadow: var(--sh); }
  .hud.is-open .hud__stages li { border-bottom: 2px solid var(--edge); }
  .hud.is-open .hud__stages li:last-child { border-bottom: 0; }
  .hud.is-open .hud__stages a { display: flex; justify-content: space-between; padding: 1.1rem 1rem; font-size: .9rem; border: 0; }
  .hud.is-open .hud__stages a::after { content: "\2192"; font-family: var(--sc-font-text); font-weight: 700; }
  .hud.is-open .hud__menu { background: var(--gold); color: var(--on-gold); }
}

@media (max-width: 1000px) { .hud__theme { display: grid; width: 3rem; } }
@media (max-width: 400px) { .hud__theme { width: 2.6rem; } .hud__cta { padding: .5rem .6rem; gap: .35rem; } .hud__menu { padding: 0 .6rem; } .hud__player { padding: .45rem .5rem; } }

/* footer credit: sits after the copyright, wraps under it on narrow screens */
.footbar__legal { flex-wrap: wrap; column-gap: .5rem; row-gap: .2rem; }
.footbar__credit::before { content: "\00B7"; margin-right: .5rem; }
.footbar__credit a { font-weight: 700; text-underline-offset: 3px; }
@media (max-width: 560px) { .footbar__credit { flex-basis: 100%; } .footbar__credit::before { content: none; } }

/* ============================================================================
   Page layouts (bento board). Theme and shared parts live in game.css.
   ========================================================================== */

/* ----------------------------------------------------------------- hero --
   Left tile: grid paper, the promise, the CTA. Right tile: gold, holding a
   framed scene built from planes (footage, sun, lion, floor) that move at
   different rates with scroll and pointer, plus an overlapping player card. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: var(--line); }
.hero__copy { padding: clamp(2rem, 5vw, 4rem) var(--sc-gutter); display: grid; align-content: center; gap: 1.4rem; border-right: var(--line); }
.hero__copy h1 { font-size: clamp(1.5rem, .9rem + 2.4vw, 2.85rem); line-height: 1.32; }
.hero__connect { display: grid; gap: .7rem; }
.hero__connect p { font-size: .58rem; }
.hero__connect div { display: flex; gap: .7rem; }
.hero__art { position: relative; padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem) clamp(4rem, 8vw, 6rem); display: grid; place-items: center; overflow: hidden; }
.scene { position: relative; width: min(100%, 30rem); aspect-ratio: 4 / 4.4; }
.scene__back { position: absolute; inset: -1.25rem 1.25rem 1.25rem -1.25rem; background: var(--brown); border: var(--line); }
.scene__frame { position: absolute; inset: 0; border: var(--line); background: #3A2A05; overflow: hidden; isolation: isolate; box-shadow: var(--sh); }
.plane { position: absolute; will-change: transform;
  transform: translate3d(calc(var(--mx, 0) * var(--d) * -16px), calc(var(--hp, 0) * var(--d) * -60px + var(--my, 0) * var(--d) * -10px), 0) scale(var(--s, 1)); }
.plane--bg { inset: -6%; --d: .25; --s: 1.05; }
.plane--bg video, .plane--bg .slot { width: 100%; height: 100%; object-fit: cover; }
.plane--bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(47 34 0 / 0), rgb(47 34 0 / .35)); }
.plane--sun { --d: .45; left: 2%; top: 10%; width: 64%; aspect-ratio: 1; border-radius: 50%;
  background: repeating-linear-gradient(180deg, var(--gold) 0 12px, transparent 12px 18px); -webkit-mask: linear-gradient(#000 40%, transparent 95%); mask: linear-gradient(#000 40%, transparent 95%); }
.plane--lion { --d: .9; left: 8%; bottom: 13%; width: 40%; --s: calc(1 + var(--hp, 0) * .1); transform-origin: 50% 100%; }
.plane--lion img, .plane--lion .slot { width: 100%; height: auto; aspect-ratio: 258 / 332; filter: drop-shadow(0 10px 0 rgb(0 0 0 / .35)); }
.plane--floor { --d: 1.3; left: -15%; right: -15%; bottom: -4%; height: 18%; transform-origin: 50% 0;
  background: repeating-linear-gradient(90deg, #8A6420 0 7%, #75541A 7% 14%); border-top: var(--line); }
.player { position: absolute; right: clamp(.5rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 3; width: min(20rem, 72%);
  padding: 1rem 1.1rem; background: var(--brown); color: var(--light); border: var(--line); box-shadow: var(--sh); }
.player p { font-size: .55rem; color: var(--gold); margin-bottom: .7rem; }
.player dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem .9rem; margin: 0; font-size: .92rem; }
.player dt { font: .55rem/1.9 var(--sc-font-display); color: var(--soft-dark); text-transform: uppercase; }
.player dd { margin: 0; font-weight: 700; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__copy { border-right: 0; border-bottom: var(--line); }
  .hero__art { padding-bottom: 8.5rem; }
  .scene { width: min(100%, 22rem); }
  .player { left: 50%; right: auto; translate: -50% 0; width: min(20rem, 86%); }
}
@media (prefers-reduced-motion: reduce) { .plane { transform: none !important; } }

/* --------------------------------------------------------- programs strip */
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.strip a { display: grid; justify-items: center; gap: .5rem; padding: 1.5rem .75rem; text-align: center; text-decoration: none; height: 100%; }
.strip li + li { border-left: 2px solid rgb(47 34 0 / .15); }
.strip a:hover, .strip a:focus-visible { background: var(--gold); outline: none; }
.strip .px { font-size: .72rem; }
.strip small { font-size: .9rem; color: var(--soft); }
.strip .glyph { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: var(--line); background: var(--paper); font: .7rem var(--sc-font-display); box-shadow: 3px 3px 0 var(--shc); }
@media (max-width: 760px) { .strip { grid-template-columns: repeat(2, 1fr); } .strip li + li { border-left: 0; } .strip li { border-bottom: 2px solid rgb(47 34 0 / .15); } .strip li:nth-child(odd) { border-right: 2px solid rgb(47 34 0 / .15); } .strip li:last-child { grid-column: 1 / -1; border-right: 0; } }

/* --------------------------------------------------------- status effects */
.status { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border-bottom: var(--line); }
.status__head { padding: clamp(2rem, 5vw, 3.5rem) var(--sc-gutter); border-right: var(--line); display: grid; align-content: center; gap: 1.2rem; }
.status__list { list-style: none; margin: 0; padding: clamp(2rem, 5vw, 3.5rem) var(--sc-gutter); display: grid; gap: 1.1rem; }
.debuff { padding: 1.1rem 1.25rem; }
.debuff__top { display: flex; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.debuff p { color: var(--soft); }
.hp { flex: none; width: 5.5rem; height: 14px; background: var(--paper); border: 2px solid var(--edge); position: relative; }
.hp > span { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--hp)); background: var(--brown); }
@media (max-width: 860px) { .status { grid-template-columns: 1fr; } .status__head { border-right: 0; border-bottom: var(--line); } }

/* ----------------------------------------------------------------- turn -- */
.turn { padding: clamp(2.5rem, 6vw, 4.5rem) var(--sc-gutter); border-bottom: var(--line); display: grid; gap: 1.5rem; justify-items: start; }
.turn h2 { font-size: clamp(1.15rem, .85rem + 1.6vw, 2.2rem); line-height: 1.4; max-width: 30ch; }
.turn__rule { font-size: .7rem; padding: .8rem 1rem .7rem; background: var(--paper); border: var(--line); box-shadow: var(--sh-sm); }

/* ------------------------------------- character select + class times -- */
.duo { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); border-bottom: var(--line); }
.duo__main { padding: clamp(2rem, 4vw, 3rem) var(--sc-gutter); border-right: var(--line); display: grid; gap: 1.5rem; align-content: start; }
.duo__head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: end; }
.duo__side { padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 2.5vw, 2rem); display: grid; gap: 1.1rem; align-content: start; }
.roster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.fighter { display: grid; text-decoration: none; background: var(--paper); border: var(--line); box-shadow: var(--sh); height: 100%; transition: transform 80ms steps(2), box-shadow 80ms steps(2); }
.fighter__art { display: block; aspect-ratio: 1; border-bottom: var(--line); overflow: hidden; background: var(--gold); position: relative; }
.fighter__art > :not(.fighter__tag) { width: 100%; height: 100%; object-fit: cover; }
.fighter__tag { position: absolute; top: .6rem; left: .6rem; z-index: 2; font-size: .55rem; padding: .4rem .45rem .3rem; background: var(--paper); border: 2px solid var(--edge); }
.fighter__body { padding: 1rem; display: grid; gap: .45rem; }
.fighter__name { font-size: .9rem; }
.fighter__sub { color: var(--soft); font-size: .95rem; }
.fighter__go { font-size: .58rem; margin-top: .35rem; }
.fighter:is(:hover, :focus-visible) { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shc); outline: none; }
.fighter:is(:hover, :focus-visible) .fighter__tag { background: var(--gold); }
.fighter:focus-visible { outline: 3px solid var(--edge); outline-offset: 4px; }
.times { padding: 1rem 1.1rem; display: grid; gap: .5rem; }
.times h3 { font-size: .7rem; }
.times dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; margin: 0; font-size: .95rem; }
.times dt { font-weight: 700; }
.times dd { margin: 0; }
@media (max-width: 1000px) { .duo { grid-template-columns: 1fr; } .duo__main { border-right: 0; border-bottom: var(--line); } .duo__side { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } .duo__side > h2 { grid-column: 1 / -1; } }
@media (max-width: 760px) { .roster { grid-template-columns: 1fr; } .fighter { grid-template-columns: 7rem 1fr; } .fighter__art { aspect-ratio: auto; border-bottom: 0; border-right: var(--line); } }

/* ------------------------------------------------------- the peak: climb --
   Pinned. Left: label tile. Middle: the three steps as a timeline whose active
   dot follows scroll. Right: five belt platforms; game.js sets --step and the
   lion hops platform to platform. */
.climb__stage { height: 100svh; display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1.15fr) minmax(0, 1fr); background: var(--paper); border-bottom: var(--line); }
.climb__label { border-right: var(--line); }
.climb__line { position: relative; padding: clamp(5rem, 12vh, 7rem) var(--sc-gutter) 2rem; display: grid; align-content: center; gap: 1.5rem; border-right: var(--line); }
.climb__line h3 { font-size: .62rem; color: var(--soft); }
.steps { list-style: none; margin: 0; padding: 0 0 0 2rem; display: grid; gap: clamp(1rem, 3vh, 1.75rem); position: relative; }
.steps::before { content: ""; position: absolute; left: .55rem; top: .6rem; bottom: .6rem; width: 3px; background: var(--ink); }
.steps li { position: relative; display: grid; gap: .4rem; opacity: .5; transition: opacity .2s steps(2); }
.steps li::before { content: ""; position: absolute; left: -1.95rem; top: .2rem; width: 1rem; height: 1rem; background: var(--paper); border: var(--line); }
.steps li.is-on { opacity: 1; }
.steps li.is-on::before { background: var(--gold); }
.steps h4 { margin: 0; font: .82rem/1.5 var(--sc-font-display); text-transform: uppercase; }
.steps p { color: var(--soft); max-width: 46ch; }
.steps .tag { font: .55rem/1.6 var(--sc-font-display); }
.climb__map { position: relative; margin: clamp(5rem, 12vh, 7rem) 1.5rem 2.5rem; background: var(--brown); border: var(--line); box-shadow: var(--sh); overflow: hidden; }
.climb__map.gridpaper { background-color: var(--brown); }
.plat { position: absolute; bottom: calc(6% + var(--i) * 16%); left: calc(4% + var(--i) * 18.5%); width: 20%; height: 7%; background: var(--c); border: var(--line); box-shadow: 4px 4px 0 #000; }
.plat::after { content: ""; position: absolute; top: 100%; left: 10%; right: 10%; height: calc(var(--i) * 228% + 100%); background: repeating-linear-gradient(180deg, rgb(255 246 222 / .1) 0 6px, transparent 6px 12px); }
.climb__lion { position: absolute; width: 15%; aspect-ratio: 258 / 332; z-index: 2;
  left: calc(6.5% + var(--step, 0) * 18.5%); bottom: calc(13% + var(--step, 0) * 16%);
  transition: left .28s steps(4), bottom .28s cubic-bezier(.3, 1.6, .6, 1); }
.climb__lion img, .climb__lion .slot { width: 100%; height: 100%; object-fit: contain; display: block; }
.climb__lion.is-hop img { animation: hop .32s steps(4); }
@keyframes hop { 50% { transform: translateY(-18%); } }
.climb__burst { position: absolute; left: 1rem; top: 1rem; font-size: clamp(.8rem, 1.6vw, 1.2rem); padding: .6rem .7rem .5rem; background: var(--gold); color: var(--ink); border: var(--line);
  opacity: 0; transform: scale(.7); transition: opacity .15s steps(2), transform .25s steps(3); }
.climb__belt { position: absolute; right: 1rem; top: 1rem; font-size: .55rem; color: var(--light); }
[data-climb].is-max .climb__burst { opacity: 1; transform: none; }
@media (max-width: 1000px) {
  .climb__stage { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; padding-top: 4rem; }
  .climb__label { border-right: 0; border-bottom: var(--line); }
  .climb__line { border-right: 0; padding: 1.25rem var(--sc-gutter); order: 3; align-content: start; }
  .climb__line h3 { display: none; }
  .steps li { display: none; } .steps li.is-on { display: grid; }
  .steps::before { display: none; }
  .climb__map { margin: 1rem var(--sc-gutter); height: min(38vh, 18rem); }
}
@media (prefers-reduced-motion: reduce) { .climb__lion { transition: none; } .climb__lion.is-hop img { animation: none; } }

/* ------------------------------------------------------ power-up items -- */
.perks { padding: clamp(2.5rem, 5vw, 4rem) var(--sc-gutter); border-bottom: var(--line); }
.perks__head { max-width: 48rem; margin-bottom: 2rem; }
.items { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1rem, 3vw, 2.5rem); align-items: start; }
.items__list { display: grid; gap: .5rem; }
.items__list button { display: flex; gap: .8rem; align-items: center; text-align: left; padding: .9rem 1rem; background: var(--paper); border: var(--line); cursor: pointer; color: var(--ink); font-weight: 500; font-size: 1.02rem; }
.items__list button .px { font-size: .6rem; visibility: hidden; }
.items__list button[aria-selected="true"] { background: var(--gold); box-shadow: var(--sh-sm); }
.items__list button[aria-selected="true"] .px { visibility: visible; }
.items__list button:hover { background: var(--cream); }
.items__list button[aria-selected="true"]:hover { background: var(--gold); }
.items__list button:focus-visible { outline: 3px solid var(--edge); outline-offset: 3px; }
.items__panel { padding: clamp(1.5rem, 3vw, 2.25rem); display: grid; gap: 1rem; align-content: start; min-height: 15rem; position: sticky; top: 6rem; }
.items__panel[hidden] { display: none; }
.items__panel .tag { font-size: .58rem; color: var(--gold); }
@media (max-width: 860px) { .items { grid-template-columns: 1fr; } .items__panel { position: static; min-height: 0; } }

/* -------------------------------------------------------------- footage -- */
.footage [data-sc-stage] { height: 100svh; overflow: hidden; border-bottom: var(--line); background: var(--brown); }
.footage .sc-stage__poster, .footage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.footage__copy { position: absolute; z-index: 5; left: var(--sc-gutter); bottom: clamp(1.5rem, 6vh, 4rem); max-width: min(40rem, calc(100% - 2 * var(--sc-gutter))); display: grid; gap: 1.1rem; justify-items: start; padding: clamp(1.25rem, 3vw, 2rem); }

/* ------------------------------------------------------------------ FAQ -- */
.faq { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); border-bottom: var(--line); }
.faq__body { padding: clamp(2rem, 4vw, 3rem) var(--sc-gutter); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.faq__list { display: grid; gap: .9rem; }
.talk { background: var(--paper); border: var(--line); box-shadow: var(--sh-sm); }
.talk summary { display: flex; gap: .9rem; padding: 1rem 1.15rem; cursor: pointer; font-weight: 500; font-size: 1.03rem; list-style: none; }
.talk summary::-webkit-details-marker { display: none; }
.talk summary::after { content: "+"; margin-left: auto; font-family: var(--sc-font-display); }
.talk[open] { background: var(--cream); }
.talk[open] summary::after { content: "\2212"; }
.talk summary:focus-visible { outline: 3px solid var(--edge); outline-offset: -7px; }
.talk p { display: flex; gap: .9rem; padding: 0 1.15rem 1.15rem; color: var(--soft); }
.talk .px { padding-top: .3rem; font-size: .6rem; }
@media (max-width: 1000px) { .faq { grid-template-columns: 1fr; } .faq__body { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- trial -- */
.trial { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border-bottom: var(--line); }
.trial__pitch { position: relative; padding: clamp(2.5rem, 5vw, 4rem) var(--sc-gutter); border-right: var(--line); display: grid; align-content: start; gap: 1.4rem; overflow: hidden; min-height: 26rem; }
.trial__pitch h2 { font-size: clamp(1.2rem, .9rem + 1.4vw, 2.1rem); line-height: 1.38; color: var(--gold); }
.burst { position: absolute; right: -2.5rem; bottom: -2.5rem; width: clamp(10rem, 18vw, 14rem); aspect-ratio: 1; display: grid; place-items: center; text-align: center;
  background: var(--gold); color: var(--ink); font: .62rem/1.6 var(--sc-font-display); text-transform: uppercase; padding: 2.5rem 3.2rem 3.4rem 2.5rem;
  clip-path: polygon(50% 0, 61% 18%, 82% 8%, 80% 30%, 100% 36%, 86% 52%, 100% 68%, 79% 72%, 82% 94%, 61% 84%, 50% 100%, 39% 84%, 18% 94%, 21% 72%, 0 68%, 14% 52%, 0 36%, 20% 30%, 18% 8%, 39% 18%); }
.trial__lion { width: clamp(5rem, 9vw, 7.5rem); }
.trial__lion img, .trial__lion .slot { width: 100%; height: auto; aspect-ratio: 258 / 332; }
.trial__form { padding: clamp(2rem, 4vw, 3rem) var(--sc-gutter); }
.trial__form h3 { font-size: .75rem; margin-bottom: .25rem; }
@media (max-width: 860px) { .trial { grid-template-columns: 1fr; } .trial__pitch { border-right: 0; border-bottom: var(--line); min-height: 0; padding-bottom: 9rem; } .trial__lion { display: none; } }

/* ------------------------------------------------------------- affiliates */
.allies { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; padding: 1.25rem var(--sc-gutter); }
.allies h2 { font-size: .6rem; margin-right: auto; }
.allies__logo { height: 64px; width: auto; }
.allies__logo.slot { width: 64px; height: 64px; }

/* ============================================================ inner pages */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: var(--line); }
.split > * { padding: clamp(2rem, 5vw, 4rem) var(--sc-gutter); }
.split > :first-child { border-right: var(--line); }
.split--flip > :first-child { order: 2; border-right: 0; border-left: var(--line); }
.split__copy { display: grid; align-content: center; gap: 1.3rem; }
.split__art { display: grid; place-items: center; }
.frame { position: relative; width: min(100%, 34rem); aspect-ratio: 4 / 3; }
.frame::before { content: ""; position: absolute; inset: -1rem 1rem 1rem -1rem; background: var(--brown); border: var(--line); }
.frame > * { position: relative; width: 100%; height: 100%; object-fit: cover; border: var(--line); box-shadow: var(--sh); display: block; }
.frame--tall { aspect-ratio: 4 / 5; width: min(100%, 24rem); }
.frame--gold::before { background: var(--gold); }
/* sized to the real media: never wider than its column, never taller than
   ~72% of the screen, always the media's own proportions */
.frame--fit { aspect-ratio: var(--ar); width: min(100%, 36rem, calc(72svh * var(--ar))); }
.frame img { object-position: 50% 30%; }
.frame video { object-fit: cover; background: var(--ink); }
.fighter__art img { object-position: 50% 35%; }
.plane--bg video, .dojo video { object-fit: cover; }
@media (max-width: 860px) { .frame--fit { width: min(100% - 1rem, calc(62svh * var(--ar))); } .frame::before { inset: -.6rem .6rem .6rem -.6rem; } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > :first-child, .split--flip > :first-child { border: 0; border-bottom: var(--line); order: 0; } .split__art { order: -1; } }

.timesbox { padding: 1rem 1.15rem; display: grid; gap: .55rem; max-width: 26rem; }
.timesbox dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1.1rem; margin: 0; }
.timesbox dt { font-weight: 700; }
.timesbox dd { margin: 0; }
.moves { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.moves li { display: flex; gap: .9rem; align-items: baseline; padding: 1rem 1.15rem; font-weight: 500; font-size: 1.03rem; }
.moves .px { font-size: .62rem; }
.call { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); border-bottom: var(--line); }
.call__word { display: grid; place-items: center; padding: 2rem; border-right: var(--line); font-size: clamp(2.4rem, 7vw, 6rem); line-height: 1; }
.call__video { padding: clamp(1.5rem, 4vw, 3rem) var(--sc-gutter); display: grid; place-items: center; }
.call__video .frame { aspect-ratio: 16 / 9; width: min(100%, 44rem); }
@media (max-width: 760px) { .call { grid-template-columns: 1fr; } .call__word { border-right: 0; border-bottom: var(--line); } }
.pricing { padding: clamp(2.5rem, 5vw, 4rem) var(--sc-gutter); border-bottom: var(--line); }
.pricing__head { max-width: 46rem; margin-bottom: 2rem; }
.passes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); }
.pass { padding: 1.4rem; display: grid; gap: .8rem; align-content: start; position: relative; }
.pass.is-focus { background: var(--gold); }
.pass__flag { position: absolute; top: -.85rem; right: 1rem; font-size: .52rem; padding: .4rem .5rem .3rem; background: var(--brown); color: var(--gold); border: 2px solid var(--edge); }
.pass__for { color: var(--soft); font-size: .95rem; }
.pass.is-focus .pass__for { color: #4A3608; }
.pass__price { font-size: 1.45rem; }
.pass .btn { justify-self: start; margin-top: .4rem; }
.pass.is-focus .checks li::before { background: var(--paper); }

.lineage { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; font-size: .56rem; }
.lineage li { padding: .6rem .7rem .5rem; background: var(--paper); border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--shc); }
.lineage li + li::before { content: "\25B6"; margin-right: .6rem; }
.quests { list-style: none; margin: 0; padding: clamp(2rem, 5vw, 3.5rem) var(--sc-gutter); display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); border-bottom: var(--line); }
.quest { padding: 1.3rem; display: grid; gap: .7rem; align-content: start; }
.quest .px { font-size: .6rem; }
.register__frame { background: #fff; border: var(--line); box-shadow: var(--sh); min-height: 60rem; }
.register__frame iframe { width: 100%; min-height: 60rem; border: 0; display: block; }
.over { padding: clamp(2rem, 5vw, 3.5rem) var(--sc-gutter); border-bottom: var(--line); display: grid; gap: 1rem; }

/* ============================================================ pixel art
   Stand-ins for photography, drawn as SVG (see src/pixel.mjs). */
.sprite { display: block; width: 100%; height: auto; overflow: visible; }
.scene-art { display: block; width: 100%; height: 100%; }
.ph { display: contents; }
.dojo video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame .scene-art, .frame .nameplate, .frame > .ph > img, .frame > .ph > video { border: var(--line); box-shadow: var(--sh); position: relative; background: var(--brown); }
.fighter__art .scene-art { width: 100%; height: 100%; }
.hud__avatar .sprite { width: 88%; }
.foot__logo.sprite { width: 64px; }
.plane--lion .sprite { filter: drop-shadow(0 8px 0 rgb(0 0 0 / .3)); }
.climb__lion, .trial__lion .sprite { aspect-ratio: 22 / 24; }
.climb__lion { width: 17%; }
.climb__lion .sprite { height: 100%; }
.trial__lion { width: clamp(6rem, 11vw, 9rem); }

.nameplate { position: relative; height: 100%; overflow: hidden; }
.nameplate svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nameplate__init { position: absolute; left: 50%; top: 52%; translate: -50% -50%; font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--gold); text-shadow: 4px 4px 0 var(--shc); }
.nameplate__rank { position: absolute; left: 50%; bottom: 9%; translate: -50% 0; font-size: .6rem; color: var(--light); white-space: nowrap; }

/* class page: sprite loops its three poses on the training backdrop */
.loop { position: relative; width: 100%; height: 100%; }
.frame .loop { border: var(--line); box-shadow: var(--sh); overflow: hidden; }
.loop .scene-art { position: absolute; inset: 0; }
.loop__lion { position: absolute; left: 50%; bottom: 8%; width: 26%; translate: -50% 0; aspect-ratio: 22 / 24; }
.loop__f { position: absolute; inset: 0; opacity: 0; animation: frames 1.5s steps(1) infinite; }
.loop__f:nth-child(2) { animation-delay: .5s; }
.loop__f:nth-child(3) { animation-delay: 1s; }
@keyframes frames { 0% { opacity: 1; } 33.34% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .loop__f { animation: none; } .loop__f:nth-child(2) { opacity: 1; } }

/* home training ground: the lion crosses the dojo as you scroll, changing
   pose every few steps (game.js sets --x and the pose class) */
.dojo { position: absolute; inset: 0; background: var(--cream); }
.dojo .scene-art { position: absolute; inset: 0; }
.dojo__lion { position: absolute; bottom: 9%; left: 0; width: clamp(7rem, 16vw, 13rem); aspect-ratio: 22 / 24; transform: translateX(var(--x, 5vw)); }
.dojo__f { position: absolute; inset: 0; opacity: 0; }
[data-pose="idle"] .dojo__f--idle, [data-pose="punch"] .dojo__f--punch, [data-pose="kick"] .dojo__f--kick { opacity: 1; }
.footage .footage__copy { right: auto; }
@media (min-width: 900px) { .footage .footage__copy { left: auto; right: var(--sc-gutter); bottom: auto; top: 18%; } }

/* Last, so it wins over the `font:` shorthands above (which reset it). */
.px, .btn, .player dt, .steps h4, .steps .tag, .strip .glyph, .burst, .nameplate__init, .slot[data-missing]::after, .talk summary::after {
  font-size-adjust: .9; letter-spacing: .04em; }

/* after .call__video .frame, so a real clip's own shape wins over 16:9 */
.call__video .frame--fit { aspect-ratio: var(--ar); width: min(100%, 46rem, calc(72svh * var(--ar))); }
@media (max-width: 860px) { .call__video .frame--fit { width: min(100% - 1rem, calc(62svh * var(--ar))); } }

/* ------------------------------------------------------------- terms --
   Annual / 6 Months / 3 Months: a three-way arcade switch. The selected term
   is the pressed (gold) key; every card shows that term's price. */
.pricing__head { display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; justify-content: space-between; align-items: end; max-width: none; }
.pricing__head .stack { max-width: 40rem; }
.terms { display: inline-grid; grid-template-columns: repeat(3, auto); padding: 0; }
.terms__btn { white-space: nowrap; padding: .85rem 1.15rem .75rem; font-size: 1rem; background: var(--paper); color: var(--ink); border: 0; cursor: pointer; min-height: 3rem; }
.terms__btn + .terms__btn { border-left: var(--line); }
.terms__btn:hover { background: var(--cream); }
.terms__btn[aria-checked="true"] { background: var(--gold); box-shadow: inset 0 -4px 0 var(--gold-deep); }
.terms__btn:focus-visible { outline: 3px solid var(--edge); outline-offset: -6px; }
.pass__prices { display: grid; gap: .6rem; }
.pass__price { display: grid; gap: .35rem; }
.pass__amt { font-size: 1.6rem; line-height: 1; }
.pass__amt--ask { font-size: 1.2rem; }
.pass__term { font-size: .9rem; font-weight: 500; color: var(--soft); }
.pass.is-focus .pass__term { color: #4A3608; }
.js-terms .pass__price { display: none; }
.js-terms .pass__price.is-on { display: grid; }
.pricing__note { margin-top: 1.75rem; color: var(--soft); }
@media (max-width: 560px) { .terms { width: 100%; grid-template-columns: repeat(3, 1fr); } .terms__btn { padding-inline: .35rem; font-size: .8rem; } }
.pass__price { font-size: inherit; }
@media (max-width: 360px) { .terms__btn { min-width: 0; font-size: .7rem; padding-inline: .2rem; letter-spacing: .02em; } }
.pass__amt small { font-size: .55em; letter-spacing: .02em; }

/* pass cards: every row lines up across the set (title, description, price,
   perks, button), and the buttons share one baseline at the bottom */
.passes { align-items: stretch; }
.pass { display: flex; flex-direction: column; }
.pass > .btn { margin-top: auto; align-self: flex-start; }
.pass .checks { margin-bottom: 1.25rem; }
@supports (grid-template-rows: subgrid) {
  .passes { row-gap: 1.25rem; }
  .pass { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: .8rem; align-content: stretch; }
  .pass > .btn { margin-top: 0; align-self: end; justify-self: start; }
  .pass .checks { margin-bottom: .5rem; }
}
.pass .checks { align-content: start; }
.pass__term { white-space: normal; overflow-wrap: anywhere; }
.passes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .passes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .passes { grid-template-columns: 1fr; } .pass__term { white-space: normal; } }

/* dark mode: page-level details */
:root[data-theme="dark"] .register__frame { background: #fff; }
:root[data-theme="dark"] .terms__btn[aria-checked="true"], :root[data-theme="dark"] .items__list button[aria-selected="true"], :root[data-theme="dark"] .fighter:is(:hover, :focus-visible) .fighter__tag { color: var(--on-gold); }
:root[data-theme="dark"] .climb__burst, :root[data-theme="dark"] .burst { color: var(--on-gold); }
:root[data-theme="dark"] .pass.is-focus .pass__for, :root[data-theme="dark"] .pass.is-focus .pass__term { color: #4A3608; }
:root[data-theme="dark"] .pass.is-focus .checks li::before { background: var(--gold); }
:root[data-theme="dark"] .fighter__tag { background: var(--paper); }
:root[data-theme="dark"] .steps::before { background: var(--ink); }


/* -------------------------------------------- training ground, layered --
   Back: pixel dojo + walking mascot (game.js moves it from scroll).
   Front: the real clip, whole and uncropped, beside the copy. The front
   layer stops above the floor so the mascot is never covered. */
.footage .dojo { z-index: 1; }
.footage__layout { position: absolute; z-index: 3; inset: 4.75rem var(--sc-gutter) 34%; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.footage__layout .footage__copy { position: static; inset: auto; translate: none; width: auto; max-width: 32rem; justify-self: end; }
/* the media cell is a size container, so the clip can be the largest box of
   its own shape that fits the cell: never cropped, never spilling over */
.footage__media { height: 100%; min-height: 0; display: grid; place-items: center; container-type: size; }
.footage__media video { display: block; width: min(100cqw, calc(100cqh * var(--vr, 1.778))); height: auto; aspect-ratio: var(--vr, 16 / 9); object-fit: contain; background: var(--ink); border: var(--line); box-shadow: var(--sh); }
.footage__layout:not(:has(video)) { grid-template-columns: 1fr; }
.footage__layout:not(:has(video)) .footage__media { display: none; }
@media (max-width: 899px) {
  .footage__layout { inset: 4.5rem var(--sc-gutter) 27%; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 1rem; }
  .footage__layout .footage__copy { justify-self: stretch; max-width: none; padding: 1.1rem; gap: .8rem; }
  .footage__layout:not(:has(video)) { grid-template-rows: auto; align-content: start; }
  .dojo__lion { width: clamp(5.5rem, 24vw, 7rem); bottom: 6%; }
}

/* hero footer row: contact icons and the affiliate logos side by side */
.hero__foot { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; align-items: end; }
.hero__allies[hidden] { display: none; }
.hero__allies div { align-items: center; }
.hero__allies .allies__logo { height: 2.75rem; width: auto; }

/* ------------------------------------------------ fighter hover: mascot --
   Each class card shows the real class photo. Hover (or keyboard focus)
   swaps in that class's lion, in its belt colour, looping ready, punch,
   kick, like a character-select screen. */
.fighter__art { isolation: isolate; }
.fighter__mascot { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity .12s steps(2); background: var(--cream); }
.fighter__mascot .scene-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.fighter__lion { position: absolute; left: 50%; bottom: 7%; width: 46%; aspect-ratio: 22 / 24; translate: -50% 12%; transition: translate .25s cubic-bezier(.3, 1.6, .6, 1); }
.fighter__f { position: absolute; inset: 0; opacity: 0; }
.fighter__f:first-child { opacity: 1; }
.fighter__ready { position: absolute; right: .6rem; top: .6rem; font-size: .8rem; padding: .35rem .5rem .25rem; background: var(--gold); color: var(--on-gold); border: 2px solid var(--edge); }
.fighter:is(:hover, :focus-visible) .fighter__mascot { opacity: 1; }
.fighter:is(:hover, :focus-visible) .fighter__lion { translate: -50% 0; }
.fighter:is(:hover, :focus-visible) .fighter__f { animation: frames 1.2s steps(1) infinite; }
.fighter:is(:hover, :focus-visible) .fighter__f:nth-child(2) { animation-delay: .4s; }
.fighter:is(:hover, :focus-visible) .fighter__f:nth-child(3) { animation-delay: .8s; }
.fighter__tag { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .fighter:is(:hover, :focus-visible) .fighter__f { animation: none; }
  .fighter:is(:hover, :focus-visible) .fighter__f:nth-child(2) { opacity: 1; }
  .fighter__lion { transition: none; }
}

/* ============================================================ fixes, pass 2 */
/* contrast: these sit on their own surface, not the section's */
.box--brown, .box--brown h3 { color: var(--light); }
.turn__rule { color: var(--ink); }

/* cards: a photo never sets a card's size. The art box has its own fixed
   shape and the photo fills it, so every card in a row matches. */
.fighter__art > img, .fighter__art > .ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.roster > li { display: flex; }
/* quest cards: label above text, equal heights in a row */
.quests { align-items: stretch; }
.quest { display: flex; flex-direction: column; gap: .7rem; }
.roster > li > .fighter { width: 100%; }
@media (max-width: 760px) {
  .fighter { grid-template-columns: 7.5rem 1fr; grid-template-rows: none; align-items: stretch; min-height: 8.5rem; }
  .fighter__art { aspect-ratio: auto; height: 100%; min-height: 8.5rem; }
  .fighter__body { align-content: center; }
}

/* "1st class free" starburst: fully on screen on phones */
@media (max-width: 860px) { .burst { right: 1rem; bottom: 1rem; width: 9rem; padding: 2rem 2.4rem 2.5rem 2rem; } .trial__pitch { padding-bottom: 11.5rem; } }

/* register: copy + the Jotform. Desktop splits 2:3, tablet and phone stack
   with the form full width (a form squeezed into half a tablet is unusable). */
.split--register { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.split--register .split__copy { align-content: start; }
.register__wrap { padding: clamp(1rem, 3vw, 2.5rem); }
.register__frame { width: 100%; min-height: 0; }
.register__frame iframe { width: 100%; height: 75svh; min-height: 40rem; }
@media (max-width: 1024px) {
  .split--register { grid-template-columns: 1fr; }
  .split--register > :first-child { border-right: 0; border-bottom: var(--line); }
}
@media (max-width: 600px) {
  .register__wrap { padding: .75rem; }
  .register__frame { box-shadow: var(--sh-sm); }
  .register__frame iframe { height: 85svh; min-height: 34rem; }
}

/* sensei portraits: always the whole photo, never cropped (heads included) */
.split .frame--tall img { object-fit: contain; object-position: 50% 0; background: var(--cream); }
.frame img { object-position: 50% 20%; }
.quests--row { border-bottom: 0; }
.frame--wide { aspect-ratio: auto; width: min(100%, 60rem); }

/* a portrait that needs cropping (e.g. a phone screenshot with system bars):
   fixed 4:5 frame, photo covers it, centred where the live site centres it */
.split .frame--crop { aspect-ratio: 9 / 10; width: min(100%, 26rem); }
.split .frame--crop img { object-fit: cover; object-position: var(--crop-pos, 50% 30%); background: none; }
@media (max-width: 860px) { .split .frame--crop { width: min(100% - 1rem, 20rem); } }

/* ------------------------------------------------------------ Ask the Lion --
   Floating chat. Gold launcher with the lion head; the panel is a board tile.
   Phones: the panel becomes a sheet across the bottom of the screen. */
.chat { position: fixed; z-index: 60; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); font-family: var(--sc-font-text); }
.chat__open { display: flex; align-items: center; gap: .5rem; min-height: 3.25rem; padding: .35rem 1rem .35rem .4rem; background: var(--gold); color: var(--on-gold); border: var(--line); border-color: #1C1400; box-shadow: var(--sh-sm); cursor: pointer; font: inherit; }
.chat__open:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shc); }
.chat__open:active { transform: translate(3px, 3px); box-shadow: none; }
.chat__open svg { width: 2.6rem; height: 2.6rem; flex: none; image-rendering: pixelated; }
.chat__open .px { font-size: 1.35rem; line-height: 1.45; }
.chat.is-open .chat__open { display: none; }

.chat__panel { width: min(24rem, calc(100vw - 2rem)); height: min(36rem, calc(100vh - 2rem)); height: min(36rem, calc(100dvh - 2rem)); display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border: var(--line); box-shadow: var(--sh); }
.chat__panel[hidden] { display: none; }
.chat__head { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem .55rem .75rem; background: var(--gold); color: var(--on-gold); border-bottom: var(--line); }
.chat__head svg { width: 2.2rem; height: 2.2rem; flex: none; image-rendering: pixelated; }
.chat__head h2 { flex: 1; margin: 0; font-size: 1.35rem; line-height: 1.45; }
.chat__head small { display: block; font: 500 .78rem/1.3 var(--sc-font-text); text-transform: none; letter-spacing: 0; }
.chat__close { min-width: 2.75rem; min-height: 2.75rem; background: var(--paper); color: var(--ink); border: 2px solid #1C1400; font: 700 .9rem var(--sc-font-text); cursor: pointer; }

.chat__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .9rem .8rem; display: flex; flex-direction: column; gap: .6rem; }
.chat__msg { max-width: 88%; padding: .6rem .8rem; font-size: .95rem; line-height: 1.5; border: 2px solid var(--edge); overflow-wrap: anywhere; }
.chat__msg--bot { align-self: flex-start; background: var(--card); }
.chat__msg--me { align-self: flex-end; background: var(--brown); color: var(--light); border-color: var(--brown); }
.chat__msg a { color: inherit; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.chat__msg ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.chat__msg p { margin: 0; }
.chat__msg p + p { margin-top: .4rem; }
.chat__msg--form { align-self: stretch; max-width: none; background: var(--cream); }
.chat__msg--form form { display: grid; gap: .55rem; }
.chat__formtitle { font: 700 1rem var(--sc-font-text); }
.chat__msg--form label { display: grid; gap: .2rem; font-size: .85rem; font-weight: 600; }
.chat__msg--form input, .chat__msg--form textarea { width: 100%; min-height: 2.6rem; padding: .45rem .6rem; font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink); background: var(--paper); border: 2px solid var(--edge); border-radius: 0; }
.chat__msg--form textarea { resize: vertical; }
.chat__msg--form [aria-invalid="true"] { border-color: #B3261E; box-shadow: 0 0 0 2px #B3261E; }
.chat__msg--form .btn { justify-self: start; }
.chat__status:empty { display: none; }
.chat__hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

.chat__chips { display: flex; gap: .4rem; padding: .55rem .7rem; overflow-x: auto; border-top: 2px solid var(--grid); scrollbar-width: thin; }
.chat__chips button { flex: none; min-height: 2.4rem; padding: .3rem .75rem; font: 600 .85rem var(--sc-font-text); color: var(--ink); background: var(--cream); border: 2px solid var(--edge); cursor: pointer; white-space: nowrap; }
.chat__chips button:hover { background: var(--gold); color: var(--on-gold); }
.chat__form { display: flex; gap: .4rem; padding: .6rem .7rem .7rem; border-top: var(--line); background: var(--paper); }
.chat__form input { flex: 1; min-width: 0; min-height: 2.75rem; padding: .45rem .7rem; font: 400 1rem var(--sc-font-text); color: var(--ink); background: var(--card); border: 2px solid var(--edge); border-radius: 0; }
.chat__form button { min-height: 2.75rem; padding: .3rem .9rem; font: 700 .95rem var(--sc-font-text); background: var(--brown); color: var(--light); border: 2px solid var(--brown); cursor: pointer; }
:root[data-theme="dark"] .chat__form button { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.chat :focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }

@media (max-width: 560px) {
  .chat { right: .75rem; bottom: .75rem; }
  .chat.is-open { inset: auto 0 0 0; }
  .chat__panel { width: 100%; height: min(85vh, 40rem); height: min(85dvh, 40rem); border-left: 0; border-right: 0; border-bottom: 0; box-shadow: 0 -6px 0 rgb(0 0 0 / .25); }
  .chat__open .px { font-size: 1.15rem; }
  .chat__open { min-height: 3rem; padding-right: .8rem; }
  .chat__open svg { width: 2.2rem; height: 2.2rem; }
}
@media print { .chat { display: none; } }
@media (prefers-reduced-motion: reduce) { .chat__open:hover, .chat__open:active { transform: none; } }
/* keep the last lines of the page clear of the chat button on phones */
@media (max-width: 560px) { body { padding-bottom: 4.5rem; } }
.chat .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the header, question chips and input never shrink; only the conversation scrolls */
.chat__head, .chat__chips, .chat__form { flex: none; }
.chat__short { display: none; }
@media (max-width: 560px) {
  .chat__long { display: none; }
  .chat__short { display: inline; }
  .chat__open { min-height: 2.9rem; gap: .35rem; padding: .25rem .7rem .25rem .3rem; }
}
