/* Big Air MX. The page wears the rider's gear, as the game's menu does: --field is the panel words go on, --ink reads on it,
   --pick and --pickink are for what's chosen. site.js sets them from the gear (the game's own colours). */
@font-face { font-family: Display; src: url(fonts/ArchivoDisplay.ttf); font-display: swap; }
@font-face { font-family: Bold; src: url(fonts/ArchivoBold.ttf); font-display: swap; }
@font-face { font-family: Body; src: url(fonts/ArchivoText.ttf); font-display: swap; }
:root { --field: #D81E2C; --ink: #fff; --pick: #F4F4F2; --pickink: #0B0B0D; --print: url(img/print-factory.webp); --rake: 14deg; --gap: clamp(1.1rem, 4vw, 4.5rem); }
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font: 1.0625rem/1.55 Body, system-ui, sans-serif; background: var(--field); color: var(--ink); transition: background-color .35s, color .35s; }
a { color: inherit; text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, video:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2 { font-family: Display, Impact, sans-serif; font-weight: 400; letter-spacing: -.02em; line-height: .92; text-wrap: balance; }

/* ---- the front: the menu's home screen ---- */
.front { position: relative; min-height: min(100svh, 56rem); display: grid; grid-template-rows: auto 1fr auto; padding: 1.4rem var(--gap) 1.6rem; overflow: hidden; isolation: isolate; }
.front::before { content: ""; position: absolute; inset: 0; z-index: -3; background: var(--print) 60% 50% / cover; }
.front::after { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--field); clip-path: polygon(0 0, 58% 0, 41% 100%, 0 100%); transition: background-color .35s; }
.front .edge { position: absolute; inset: 0; z-index: -2; background: var(--pick); clip-path: polygon(58% 0, 59.4% 0, 42.4% 100%, 41% 100%); transition: background-color .35s; }
.bar { display: flex; gap: 1.6rem; align-items: baseline; font-family: Bold; }
.bar a { text-decoration: none; } .bar a:hover { text-decoration: underline; }
.name { align-self: center; max-width: 46%; }
.name h1 { font-size: clamp(3.2rem, 8.6vw, 8.6rem); }
.name h1 span { display: inline-block; position: relative; padding: .02em .2em .05em .18em; margin-left: -.08em; color: var(--pickink); isolation: isolate; }
.name h1 span::before { content: ""; position: absolute; inset: 0; background: var(--pick); transform: skewX(calc(-1 * var(--rake))); z-index: -1; transition: background-color .35s; }
.name p { font: 1.3rem/1.35 Bold; margin: 1.5rem 0 1.6rem; max-width: 24ch; }
.rider { position: absolute; z-index: -1; width: min(58vw, 62rem); right: -1vw; top: 50%; translate: 0 -48%; filter: drop-shadow(.4rem 1.1rem .9rem rgb(0 0 0 / .4)); pointer-events: none; }
.slab { display: inline-block; position: relative; isolation: isolate; font: 1.15rem/1 Bold; padding: .95em 1.5em; text-decoration: none; color: var(--pickink); border: 0; cursor: pointer; }
.slab::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pick); transform: skewX(calc(-1 * var(--rake))); transition: inset .15s; }
.slab:hover::before { inset: -.2rem -.35rem; }
.slab.quiet { color: var(--ink); } .slab.quiet::before { background: none; border: 2px solid currentColor; }

/* ---- the garage: whose gear the page wears ---- */
.garage { display: grid; grid-template-columns: repeat(5, max-content); gap: .7rem .75rem; max-width: 50%; }
.garage p { font-family: Bold; grid-column: 1 / -1; }
.garage button { width: 3.6rem; height: 2.5rem; border: 0; padding: 0; cursor: pointer; background: none; transform: skewX(calc(-1 * var(--rake))); overflow: hidden; box-shadow: 0 0 0 2px var(--field), 0 0 0 3px color-mix(in srgb, var(--ink) 45%, transparent); }
.garage button i { display: block; width: 140%; height: 100%; margin-left: -20%; transform: skewX(var(--rake)); background-size: cover; background-position: 70% 50%; }
.garage button[aria-pressed=true] { box-shadow: 0 0 0 3px var(--field), 0 0 0 6px var(--ink); }

/* ---- how it goes: the five lines ---- */
.how { padding: clamp(3rem, 9vw, 8rem) 0 clamp(1rem, 4vw, 3rem); }
.line { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: var(--gap); padding-left: var(--gap); margin-bottom: clamp(1.4rem, 4vw, 3.5rem); }
.line h2 { font-size: clamp(2.1rem, 4.9vw, 4.9rem); margin-bottom: .35em; }
.line p { max-width: 34ch; }
.line figure { overflow: hidden; clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%); }
.line figure img { width: 100%; aspect-ratio: 16 / 8.4; object-fit: cover; }

/* ---- the trailer, and the rest ---- */
.film { padding: clamp(2rem, 6vw, 5rem) var(--gap); }
.film video { width: 100%; max-width: 76rem; margin: 0 auto; display: block; background: #000; }
.rest { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.4rem var(--gap); padding: clamp(1rem, 4vw, 3rem) var(--gap) clamp(3rem, 7vw, 6rem); }
.rest h2 { font-size: 1.9rem; margin-bottom: .6rem; } .rest p + p { margin-top: .8rem; }
footer { padding: 1.6rem var(--gap) 2.2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.8rem; background: rgb(0 0 0 / .22); font-size: .95rem; }

/* ---- pages of words ---- */
.words { max-width: 44rem; padding: 1.4rem var(--gap) 4rem; } .words h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 2.6rem 0 1.4rem; }
.words h2 { font: 1.25rem/1.3 Bold; letter-spacing: 0; margin: 2rem 0 .5rem; } .words ul { padding-left: 1.2rem; } .words li { margin: .4rem 0; } .words p + p { margin-top: .9rem; }

@media (max-width: 52rem) {
  .front { min-height: 100svh; } 
  .front::after { clip-path: polygon(0 0, 100% 0, 100% 34%, 0 58%); } .front .edge { clip-path: polygon(0 58%, 100% 34%, 100% 35.6%, 0 59.6%); }
  .name { align-self: start; max-width: none; padding-top: 1.6rem; } .name h1 { font-size: clamp(3.2rem, 17vw, 6rem); } .name p { font-size: 1.1rem; margin: 1rem 0 1.2rem; max-width: 22ch; }
  .rider { width: 108vw; right: -12vw; top: auto; bottom: 7.5rem; translate: none; }
  .garage { max-width: none; } .garage p { display: none; } .garage button { width: 3.1rem; height: 2rem; }
  .line { grid-template-columns: 1fr; gap: .9rem; padding: 0; margin-bottom: 3rem; } .line div { padding: 0 var(--gap); order: 2; } .line figure { clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
