@font-face {
  font-family: Archivo;
  src: url('/assets/archivo.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url('/assets/fraunces.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --u: calc(var(--viewport-width, 100vw) / 1280);
  --acc: #22f2d6;
  --on-acc: #0a0f12;
  --ink: #0f1d22;
  --bone: #f2efe8;
  --tx-d: #141a1c;
  --tx-l: #eaf0ec;
  --lab: #8a918f;
  --grot: Archivo, 'Helvetica Neue', Arial, sans-serif;
  --serif: Fraunces, Georgia, serif;
  --ease: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: var(--bone); }
html { scrollbar-gutter: stable; }
body { font-family: var(--grot); color: var(--tx-d); -webkit-font-smoothing: antialiased; overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 5px; }
.symbols { position: absolute; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 110; padding: 12px 18px; background: var(--ink); color: var(--tx-l); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

#loader { position: fixed; inset: 0; z-index: 100; pointer-events: none; background: var(--acc); }
#loader.is-started { background: transparent; }
.loader-svg { display: block; width: 100%; height: 100%; }
.loader-mono { opacity: 0; }
.loader-label { position: absolute; left: 0; right: 0; bottom: calc(26 * var(--u)); text-align: center; font-size: calc(9 * var(--u)); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--on-acc); }

.hdr { position: fixed; z-index: 50; top: calc(16 * var(--u)); left: calc(15 * var(--u)); right: calc(15 * var(--u)); display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; --hc: var(--tx-d); }
.hdr > * { pointer-events: auto; }
.hdr-logo { display: flex; flex-direction: column; line-height: .82; color: var(--hc); transform-origin: 0 0; transition: color .3s; }
.hdr-logo-1 { font-family: var(--serif); font-size: calc(33 * var(--u)); font-weight: 300; letter-spacing: -.03em; font-variation-settings: 'opsz' 144; }
.hdr-logo-2 { font-size: calc(30.5 * var(--u)); font-weight: 800; font-stretch: 90%; letter-spacing: -.035em; }
.hdr-mono { position: absolute; left: 50%; top: calc(8 * var(--u)); width: calc(40 * var(--u)); color: var(--hc); transform: translateX(-50%); transition: color .3s; }
.hdr-mono svg { width: 100%; fill: currentColor; }
.hdr-right { display: flex; align-items: flex-start; gap: calc(9 * var(--u)); }
.btn-store { display: flex; align-items: center; justify-content: center; gap: calc(9 * var(--u)); width: calc(104 * var(--u)); height: calc(52 * var(--u)); border-radius: calc(6 * var(--u)); background: var(--acc); color: var(--on-acc); font-size: calc(17 * var(--u)); font-weight: 800; font-stretch: 92%; transition: background .25s, transform .25s; }
.btn-store svg { width: calc(17 * var(--u)); }
.btn-store:hover { background: #5cf5df; }
.btn-store:active { transform: scale(.97); }
.btn-menu { position: relative; width: calc(53 * var(--u)); height: calc(53 * var(--u)); border: 1px solid var(--hc); border-radius: calc(9 * var(--u)); color: var(--hc); transition: color .3s, border-color .3s, background .3s; }
.btn-menu span { position: absolute; right: 30%; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), width .4s; }
.btn-menu span:first-child { width: 16%; top: 42%; }
.btn-menu span:last-child { width: 42%; top: 56%; }
.btn-menu:hover span:first-child { width: 42%; }
body.menu-open .hdr { --hc: var(--tx-l); }
body.menu-open .btn-menu span:first-child { width: 42%; transform: translateY(calc(3.7 * var(--u))) rotate(45deg); }
body.menu-open .btn-menu span:last-child { transform: translateY(calc(-3.7 * var(--u))) rotate(-45deg); }
body.is-loading .hdr, body.is-loading .next-race { opacity: 0; visibility: hidden; transform: translateY(12px); }

.menu { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: center; padding: calc(90 * var(--u)) calc(131 * var(--u)); background-color: var(--ink); background-image: var(--topo-dark); background-size: 100% auto; color: var(--tx-l); clip-path: inset(0 0 100%); visibility: hidden; pointer-events: none; transition: clip-path .7s var(--ease), visibility 0s .7s; }
body.menu-open .menu { clip-path: inset(0); visibility: visible; pointer-events: auto; transition: clip-path .7s var(--ease), visibility 0s; }
.menu-list a, .menu-list button { display: inline-block; font-size: calc(76 * var(--u)); font-weight: 800; font-stretch: 88%; letter-spacing: -.02em; line-height: .95; transition: color .3s; }
.menu-list a:hover, .menu-list button:hover, .menu-list button.is-acc, .menu-list button[aria-current] { color: var(--acc); }
.menu-foot { display: flex; flex-wrap: wrap; gap: calc(24 * var(--u)); max-width: calc(650 * var(--u)); margin-top: calc(40 * var(--u)); font-size: calc(12 * var(--u)); font-weight: 700; line-height: 1.5; }
.menu-foot span { color: var(--lab); }
.store-panel { max-width: calc(800 * var(--u)); }
.store-kicker { margin-bottom: calc(24 * var(--u)); font-size: calc(10 * var(--u)); font-weight: 800; letter-spacing: .05em; color: var(--acc); }
.store-panel h3 { font-size: calc(80 * var(--u)); font-weight: 700; font-stretch: 88%; letter-spacing: -.03em; line-height: .9; }
.store-panel h3 em { font-family: var(--serif); font-style: normal; font-weight: 300; color: var(--acc); }
.store-panel > p:not(.store-kicker) { margin-top: calc(30 * var(--u)); max-width: calc(375 * var(--u)); font-size: calc(15 * var(--u)); line-height: 1.5; }
.overlay-back { display: inline-flex; align-items: center; gap: 25px; margin-top: calc(30 * var(--u)); border-bottom: 1px solid currentColor; padding-bottom: 8px; font-size: calc(11 * var(--u)); font-weight: 700; }
.overlay-back span { font-size: 22px; }

.next-race { position: fixed; z-index: 40; left: calc(15 * var(--u)); bottom: calc(16 * var(--u)); width: calc(88 * var(--u)); color: var(--tx-d); cursor: pointer; }
.nr-tab { display: block; margin-bottom: calc(6 * var(--u)); font-size: calc(7.5 * var(--u)); font-weight: 700; }
.nr-card { position: relative; display: flex; flex-direction: column; align-items: center; height: calc(166 * var(--u)); padding: calc(10 * var(--u)) calc(6 * var(--u)); border: 1px solid #141a1c73; border-radius: calc(5 * var(--u)); clip-path: polygon(0 0,70% 0,82% 5%,100% 5%,100% 100%,0 100%); }
.nr-track { width: calc(52 * var(--u)); height: calc(40 * var(--u)); margin-top: calc(10 * var(--u)); perspective: 200px; }
.nr-track svg { width: 100%; height: 100%; transform-style: preserve-3d; animation: nrspin 7s linear infinite; }
.nr-circuit { fill: none; stroke: var(--tx-d); stroke-width: 2.2px; stroke-linejoin: round; }
@keyframes nrspin { from { transform: rotateX(55deg) rotate(0); } to { transform: rotateX(55deg) rotate(360deg); } }
.nr-name { margin-top: calc(10 * var(--u)); font-size: calc(7.5 * var(--u)); font-weight: 700; letter-spacing: .04em; }
.nr-card hr { width: 88%; margin: calc(6 * var(--u)) 0 calc(9 * var(--u)); border: 0; border-top: 1px solid #141a1c4d; }
.nr-emblem { width: calc(64 * var(--u)); height: calc(42 * var(--u)); flex-shrink: 0; }
.nr-team { margin-top: calc(6 * var(--u)); font-size: calc(7 * var(--u)); font-weight: 700; text-align: center; line-height: 1.05; }

.hero, .hero-stage { position: relative; width: 100%; height: 100vh; height: 100svh; }
.hero-stage { overflow: hidden; background-color: var(--bone); background-image: var(--topo-light); background-size: 100vw auto; }
.hero-inner { position: absolute; top: 0; bottom: 0; width: var(--viewport-width, 100vw); left: 50%; transform: translateX(-50%); }
#hero-gl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; }
body[data-renderer='fallback'] #hero-gl { visibility: hidden; }
.hero-fallback { position: absolute; top: 8.5%; left: 50%; width: auto; max-width: none; height: 99%; transform: translateX(-50%); }
.portrait-control { position: absolute; z-index: 2; right: calc(15 * var(--u)); bottom: calc(16 * var(--u)); min-height: 36px; padding: 9px 12px; border: 1px solid #141a1c73; border-radius: 5px; background: #f2efe8d9; font-size: 10px; font-weight: 700; letter-spacing: .03em; opacity: 0; pointer-events: none; transition: opacity .2s; }
.portrait-control:focus-visible { opacity: 1; pointer-events: auto; }
.portrait-control[aria-pressed='true'] { background: var(--acc); }
body.has-reduced-motion .portrait-control { opacity: 1; pointer-events: auto; }
body.is-loading .portrait-control { visibility: hidden; }
body.is-paused .nr-track svg { animation-play-state: paused; }

@media (width <= 900px) {
  html { scrollbar-gutter: auto; }
  :root { --u: calc(var(--viewport-width, 100vw) / 640); }
  .hdr-mono, .next-race { display: none; }
  .menu { padding: 90px max(24px, calc(50 * var(--u))); }
  .menu-list a, .menu-list button { font-size: clamp(42px, calc(76 * var(--u)), 76px); line-height: 1.06; }
  .menu-foot { margin-top: 28px; font-size: 11px; gap: 8px 20px; }
  .store-panel { max-width: 100%; }
  .store-kicker { font-size: 10px; margin-bottom: 22px; }
  .store-panel h3 { font-size: clamp(46px, calc(80 * var(--u)), 80px); }
  .store-panel > p:not(.store-kicker) { max-width: 320px; margin-top: 25px; font-size: 14px; }
  .overlay-back { font-size: 10px; margin-top: 25px; }
}

@media (hover: none) and (pointer: coarse) {
  .portrait-control { opacity: 1; pointer-events: auto; right: max(12px, env(safe-area-inset-right)); bottom: max(15px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  #loader { display: none; }
  body.is-loading .hdr, body.is-loading .next-race { opacity: 1; visibility: visible; transform: none; }
  .nr-track svg { transform: rotateX(55deg); }
}
