@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans-variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/barlow-condensed-800-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}
:root {
  --paper: #f8f7f2;
  --ink: #21221f;
  --rule: #cecec5;
  --orange: #e34823;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font: 16px/1.5 "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-padding-top: 5rem;
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
button, input { font: inherit; }
a, button, summary, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2264bd; outline-offset: 3px; }
::selection { background: #f7bf8c; color: var(--ink); }
.masthead, .skip, summary, .github, .play-flight, footer a, .missing a,
.role, .poster .eyebrow, .section-label, .replay, .replay iframe, .car img {
  -webkit-user-select: none;
  user-select: none;
}
[hidden] { display: none !important; }
.shell { width: min(90%, 84rem); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; transform: translateY(-160%); z-index: 10; padding: .65rem; background: white; }
.skip:focus { transform: none; }
.masthead { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav-row, nav, .brand, footer { display: flex; align-items: center; }
.nav-row, footer { justify-content: space-between; }
.nav-row { min-height: 4rem; }
.brand { width: fit-content; gap: .65rem; font-size: 1.18rem; font-weight: 800; letter-spacing: -.055em; text-decoration: none; }
.brand-mark {
  width: 1.65rem; height: 1.25rem; transform: skew(-17deg);
  background: linear-gradient(90deg, var(--orange) 0 35%, transparent 35% 44%, var(--orange) 44% 73%, transparent 73% 82%, var(--orange) 82%);
}
nav { gap: clamp(1rem, 2.7vw, 2.5rem); }
nav a, .games-nav summary, footer a { font-size: .9rem; font-weight: 600; text-decoration: none; }
nav a:hover, footer a:hover, .brand:hover { text-decoration: underline; }
.github, .about .github {
  display: inline-flex; align-items: center; gap: .6em; width: fit-content;
  padding: .42em .48em .42em .95em; border-radius: 2rem;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 650;
}
.github span {
  display: inline-grid; place-items: center; width: 1.6em; aspect-ratio: 1; border-radius: 50%; line-height: 1;
}
.github span { background: #40413b; }
.github:is(:hover, :focus-visible) { text-decoration: none; }
.github:is(:hover, :focus-visible) span { background: #ff8054; color: #1c201d; }
.intro { display: grid; grid-template-columns: auto minmax(13rem, 21rem); justify-content: space-between; align-items: end; gap: 2rem; padding-block: clamp(3rem, 5vw, 6rem) clamp(2.8rem, 4.4vw, 4.75rem); }
.eyebrow, .section-label, .garage figcaption, .replay figcaption {
  font: 600 .71rem/1.35 var(--mono); letter-spacing: .09em; text-transform: uppercase;
}
.role, .poster .eyebrow { display: flex; align-items: center; gap: .7rem; }
.role::before { content: ""; width: 1.8rem; height: 2px; background: var(--orange); }
.intro h1, .missing h1 { font-size: clamp(3.8rem, 7.7vw, 8rem); line-height: 1; letter-spacing: -.07em; font-weight: 650; }
.intro h1 {
  width: fit-content; margin: .65rem 0 0 -.055em;
  clip-path: inset(0 -.05em);
}
@supports (text-box: trim-both cap alphabetic) {
  .intro h1 {
    text-box: trim-both cap alphabetic;
    padding-block: .1em; margin-block: calc(.65rem + .055em) .055em;
  }
}
.type-end, .title-dot { letter-spacing: normal; }
.title-dot { color: var(--orange); }
.intro-copy { color: #494b43; font-size: clamp(.98rem, 1.2vw, 1.14rem); line-height: 1.55; padding-bottom: .2rem; }
.section-label { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; color: #50524b; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.poster { position: relative; isolation: isolate; overflow: hidden; border-radius: .4rem; display: grid; align-items: center; }
.race { grid-template-columns: 35% minmax(0,1fr); min-height: clamp(23rem, 33vw, 31rem); background: #e8e2d3; }
.race-stripes {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 43%, #f5eee2 43% 48%, transparent 48% 49%, #f5eee2 49% 50%, transparent 50% 51%, #f5eee2 51% 71%, transparent 71%),
    linear-gradient(155deg, #eae6da 25%, #ddd5c2 68%, #c6bda8);
}
.poster-copy { padding: clamp(1.5rem, 3.7vw, 3.8rem); padding-right: 0; z-index: 1; }
.poster .eyebrow { margin-bottom: 1rem; }
.flag { width: 1.22rem; height: .84rem; display: inline-block; background: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / .42rem .42rem; transform: skew(-12deg); }
.race h3 { font: italic 800 clamp(4.9rem, 8.5vw, 8.9rem)/.78 "Barlow Condensed", Impact, sans-serif; letter-spacing: -.032em; text-transform: uppercase; margin-left: -.065em; }
/* Draw the selected part behind each italic line, following the angle of the letters. */
.race h3 span { display: inline-block; vertical-align: top; position: relative; isolation: isolate; }
@media (forced-colors: none) {
  .italic-selection::selection, .italic-selection ::selection { background: transparent; }
  .race h3 .ink-selected::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    top: -.085em; bottom: -.025em; left: calc(var(--sel-left) - .035em);
    width: calc(var(--sel-width) + .095em); background: #f7bf8c; transform: skewX(-7deg);
  }
  .race h3 span:last-child::before { top: .025em; bottom: -.085em; }
}
.summary { max-width: 31ch; margin-top: 1.45rem; font-size: clamp(.95rem, 1.14vw, 1.1rem); line-height: 1.5; }
.garage { overflow: clip; align-self: stretch; display: grid; min-width: 0; }
.car { position: relative; display: grid; align-items: center; min-width: 0; }
.car img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 .75rem .45rem #453c3329);
}
.car figcaption { position: absolute; right: clamp(1rem, 2vw, 2rem); bottom: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .scroll-stage.pinned::after { content: ""; display: block; height: 90svh; }
  #asfalto .scroll-stage.pinned::after { height: 102svh; }
  .pinned .poster { position: sticky; top: var(--pin-top); }
  .pinned .car { grid-area: 1 / 1; translate: calc(-100% * var(--slide, 0)) 0; }
  .pinned .car + .car { translate: calc(100% * (1 - var(--slide, 0))) 0; }
  .pinned .car img {
    width: 104%;
    transform: translate(calc(-2% + var(--drift-x, 0px)), var(--drift-y, 0px)) rotate(var(--lean, 0deg));
    transition: transform 220ms ease-out;
  }
  .race-stripes {
    inset: -1.5rem;
    translate: calc(12px * var(--slide, 0) - var(--drift-x, 0px)) 0;
    transition: translate 180ms ease-out;
  }
}
.notes summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 1rem .1rem; font-size: .94rem; font-weight: 650; list-style: none; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: "+" / ""; font: 400 1.35rem/1 var(--mono); }
.notes[open] summary::after { rotate: 45deg; }
.notes dl { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; padding: .5rem .1rem 1.6rem; }
.notes dt { font-weight: 700; margin-bottom: .25rem; }
.notes dd { max-width: 34ch; color: #53544b; font-size: .95rem; }
#retrograde { margin-top: clamp(1.5rem, 3.5vw, 3.5rem); }
.flight {
  --flight-inset: clamp(1.15rem, 2.2vw, 2rem);
  grid-template: "screen title" auto "screen info" 1fr / minmax(0, 73fr) minmax(0, 27fr);
  align-items: stretch; background: #25282a; color: #f5f6f4;
}
.flight-title { grid-area: title; min-width: 0; padding: var(--flight-inset) var(--flight-inset) 0; container-type: inline-size; }
.flight-title .eyebrow { color: #b5c9c6; margin-bottom: .8rem; }
.flight-title h3 { font: 600 21cqw/1.12 "DM Sans", Arial, sans-serif; letter-spacing: -.065em; white-space: nowrap; }
.flight-info {
  grid-area: info; display: flex; flex-direction: column; justify-content: space-between;
  gap: 1.15rem; padding: .9rem var(--flight-inset) var(--flight-inset); color: #d6d9d8;
}
.flight-info p { max-width: 29ch; line-height: 1.5; }
.play-flight {
  display: flex; align-items: center; justify-content: space-between; gap: .7rem;
  padding-block: .85rem .1rem; border-top: 1px solid #565c5e; color: white; text-decoration: none; font-weight: 650;
}
.play-flight span { color: #bfded7; }
.play-flight:is(:hover, :focus-visible) { color: #c8ede5; }
@media (prefers-reduced-motion: no-preference) {
  .play-flight span {
    transform: translate(var(--pull-x, 0px), var(--pull-y, 0px));
    transition: transform 360ms linear(0, .36 12%, .86 26%, 1.07 40%, 1.09 50%, 1.02 72%, .99 86%, 1);
  }
  .play-flight:focus-visible { --pull-x: 2px; --pull-y: -2px; }
  .play-flight:active span { scale: .9; }
}
@media (prefers-reduced-motion: no-preference) {
  .github { transition: transform 240ms cubic-bezier(.2,.85,.25,1.35); }
  .github:active { transform: scale(.95); }
  .github span { transition: color 140ms, background-color 160ms, transform 240ms cubic-bezier(.2,.85,.25,1.35); }
  .github:is(:hover, :focus-visible) span { transform: translate(1px,-1px) rotate(8deg); }
}
.action { display: inline-flex; gap: .9rem; align-items: center; background: #e4e4ff; color: #222338; border-radius: 2rem; padding: .65rem 1.05rem; text-decoration: none; font-size: .9rem; font-weight: 700; margin-top: 1.4rem; }
.action:hover { background: white; }
.replay { grid-area: screen; min-width: 0; align-self: center; background: #080808; }
.replay iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; pointer-events: none; }
.replay figcaption {
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  padding: .75rem 1rem; color: #e2e7e5; background: #181a1b;
}
.scroll-hint { display: none; }
.pinned .scroll-hint { display: inline; text-transform: none; letter-spacing: normal; font-weight: 400; color: #bcc5c3; }
@media (max-width: 850px) and (orientation: portrait), (max-width: 640px) {
  .flight { grid-template: "title" auto "screen" auto "info" auto / 1fr; }
  .flight-title { padding-bottom: 1rem; }
  .flight-title h3 { font-size: clamp(2.5rem, 8.5vw, 3.5rem); }
  .flight-title .eyebrow { margin-bottom: .35rem; }
  .flight-info { flex-direction: row; align-items: center; flex-wrap: wrap; gap: .9rem 1.4rem; }
  .play-flight { padding-block: .25rem; border: 0; }
}
@media (max-height: 500px) and (min-width: 641px) {
  .replay iframe { width: min(100%, calc((100svh - 7.6rem) * 16 / 9)); margin-inline: auto; }
  .flight-title h3 { font-size: 20cqw; }
  .flight-info p { font-size: .9rem; }
}
.about { scroll-margin-top: calc(1px - 1rem); min-height: calc(100dvh - 4rem - 1px); align-content: center; display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; padding-block: clamp(3.5rem, 7.5vw, 8rem); }
.about h2 { padding-top: .45em; }
.about p { font-size: clamp(1.4rem, 2.35vw, 2.2rem); line-height: 1.28; letter-spacing: -.015em; max-width: 37ch; }
.about a { display: inline-block; margin-top: 1.3rem; }
footer { gap: 1rem; padding-block: 1.25rem; border-top: 1px solid var(--rule); font-size: .85rem; }
.missing { padding-block: clamp(4rem, 12vw, 12rem); }
.missing h1 { margin-block: 1rem; }
.missing .action { margin-right: 1rem; background: var(--ink); color: var(--paper); }
@media (max-width: 780px) {
  .intro { grid-template-columns: 1fr; gap: 1rem; }
  .intro-copy { max-width: 43ch; }
  .race { min-height: 20rem; }
  .garage figcaption { bottom: 1rem; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 2rem); }
  .brand { font-size: 1.05rem; gap: .45rem; }
  .brand-mark { width: 1.25rem; height: 1rem; }
  nav { gap: .95rem; }
  nav a, .games-nav summary { font-size: .83rem; }
  nav .github { gap: .35em; padding-left: .7em; }
  .intro { padding-block: 2.65rem 2.1rem; }
  .intro h1 { font-size: clamp(2.95rem, 11.45vw, 4.6rem); }
  .race, .about, .notes dl { grid-template-columns: 1fr; }
  .poster-copy { padding: 1.45rem 1.35rem 0; }
  .race .eyebrow { min-height: 2rem; }
  .race h3 { font-size: clamp(3.7rem, 13.3vw, 5.3rem); }
  .summary { max-width: 34ch; margin-top: .95rem; }
  .garage { margin-top: -.35rem; padding-bottom: 1.35rem; }
  .pinned .car img { width: 100%; }
  .garage figcaption { bottom: .85rem; right: 1.25rem; }
  .notes dl, .about { gap: 1.2rem; }
}
@media (max-width: 385px) {
  .race .eyebrow { font-size: .61rem; gap: .45rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .brand-mark, .action, .action span, .notes summary::after {
    transition: transform 240ms cubic-bezier(.2,.85,.25,1.35), rotate 240ms ease-out;
  }
  .brand:is(:hover, :focus-visible) .brand-mark { transform: skew(-25deg) scaleX(1.12); }
  .action:is(:hover, :focus-visible) span { transform: translate(3px, -3px); }
  .action:active { transform: scale(.96); }
  .notes summary:is(:hover, :focus-visible)::after { transform: scale(1.18); }
  @supports (interpolate-size: allow-keywords) and selector(details::details-content) {
    .notes { interpolate-size: allow-keywords; }
    .notes::details-content {
      height: 0; opacity: 0; overflow: clip;
      transition: height 280ms cubic-bezier(.2,.8,.2,1), opacity 200ms ease, content-visibility 280ms allow-discrete;
    }
    .notes[open]::details-content { height: auto; opacity: 1; }
  }
}

.games-nav { position: relative; }
.games-nav summary { display: flex; gap: .35em; align-items: center; cursor: pointer; list-style: none; padding-block: .4rem; }
.games-nav summary::-webkit-details-marker { display: none; }
.games-nav summary::after { content: ""; width: .34em; height: .34em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.1em) rotate(45deg); }
.games-nav[open] summary::after { transform: translateY(.1em) rotate(225deg); }
.game-links { position: absolute; top: 100%; left: -.65rem; width: max-content; padding: .3rem; border: 1px solid var(--rule); border-radius: .45rem; background: var(--paper); box-shadow: 0 .4rem 1rem #21221f18; }
.game-links a { display: block; padding: .65rem .85rem; border-radius: .2rem; }
.game-links a:is(:hover, :focus-visible) { background: #e9e8e0; text-decoration: none; }

@media (max-width: 360px) {
  .nav-row { width: calc(100% - 1rem); }
  nav { gap: .5rem; }
  nav .github { gap: .25em; padding-inline: .6em .35em; }
}

html.link-travel { overflow-anchor: none; }
.link-travel .scroll-stage.pinned::after { display: none; }
.link-travel .pinned .poster { position: relative; top: auto; }
