@font-face {
  font-family: "Lilita One";
  src: url("/fonts/lilita-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Gochi Hand";
  src: url("/fonts/gochi-hand-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}

:root {
  --red: #dd261b;
  --red-deep: #b81d14;
  --red-ink: #8f150e;
  --ink: #1e1513;
  --ink-2: #3a2e2b;
  --muted: #64524d;
  --paper: #fff6ec;
  --paper-2: #f8eadb;
  --white: #fff;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Gochi Hand", "Comic Sans MS", cursive;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 76px;
  --gap: clamp(80px, 9vw, 128px);
  /* hero sheet geometry: css px from the hero top to the first ruled line, and the row pitch */
  --rule0: 100.5px;
  --row: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .community :focus-visible, .nav :focus-visible, .menu :focus-visible, .foot :focus-visible, .lot :focus-visible { outline-color: var(--white); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }

.h2 {
  font-family: var(--display);
  font-size: clamp(44px, 6.2vw, 80px);
  line-height: .95;
  letter-spacing: .005em;
}
.lede { font-size: clamp(20px, 2.1vw, 24px); line-height: 1.45; font-weight: 500; text-wrap: balance; }
.nw { white-space: nowrap; }
.note { font-family: var(--hand); line-height: 1; }
.link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { color: var(--red); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 19px;
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, color .15s, transform .12s;
}
.btn:active { transform: translateY(2px); }
.btn-big { min-height: 58px; padding: 16px 26px; font-size: 21px; border-radius: 16px; }
.btn-white { background: var(--white); color: var(--red); }
.btn-white:hover { background: var(--paper); color: var(--red-deep); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #000; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-line { box-shadow: inset 0 0 0 2.5px currentColor; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); box-shadow: none; }
.ico { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* nav */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color .25s, box-shadow .25s;
}
.nav-in {
  height: var(--nav-h);
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo { margin-right: auto; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s, transform .25s, visibility .25s; }
.nav-logo img { height: 42px; width: auto; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--white); text-decoration: none; font-weight: 650; font-size: 17px; }
.nav-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-cta { min-height: 44px; padding: 10px 18px; font-size: 18px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.nav.is-solid .nav-cta { opacity: 1; visibility: visible; }
.nav.is-solid { background: var(--red); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.nav.is-solid .nav-logo { opacity: 1; visibility: visible; transform: none; }
.nav-burger { display: none; width: 48px; height: 48px; margin-right: -8px; position: relative; }
.nav-burger i, .menu-close i { position: absolute; left: 11px; right: 11px; height: 3px; border-radius: 3px; background: var(--white); }
.nav-burger i:nth-of-type(1) { top: 15px; }
.nav-burger i:nth-of-type(2) { top: 22.5px; }
.nav-burger i:nth-of-type(3) { top: 30px; }

/* full-screen phone menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--red);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu-top { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; flex: none; }
.menu-logo { height: 42px; width: auto; }
.menu-close { width: 48px; height: 48px; margin-right: -8px; position: relative; }
.menu-close i { top: 22.5px; }
.menu-close i:nth-of-type(1) { transform: rotate(45deg); }
.menu-close i:nth-of-type(2) { transform: rotate(-45deg); }
.menu-links { display: flex; flex-direction: column; padding: 28px 0; }
.menu-links a { font-family: var(--display); font-size: 46px; line-height: 1.12; padding: 6px 0; color: var(--white); text-decoration: none; }
.menu-bottom { margin-top: auto; display: grid; gap: 16px; }
.menu-bottom p { font-size: 18px; font-weight: 500; }
.menu-bottom .btn { width: 100%; }
body.menu-open { overflow: hidden; }

/* hero */
.hero {
  position: relative;
  background: var(--red);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero-lines {
  position: absolute;
  inset: 0;
  height: 100%;
  height: calc(round(down, 100% - var(--rule0), var(--row)) + var(--rule0));
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.lines {
  position: absolute;
  top: 30px;
  left: 0;
  width: 2600px;
  height: auto;
  max-width: none;
  font-family: var(--hand);
  fill: rgba(255, 255, 255, .25);
}
.lines .rules path { fill: none; stroke: rgba(255, 255, 255, .11); stroke-width: 1.5; }
.lines .strike { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
/* the write-on repaints the whole sheet every frame, so it only runs on desktop-sized screens */
@media (min-width: 861px) {
  .js .lines > g { animation: write .9s cubic-bezier(.35, .15, .3, 1) both; animation-delay: calc(var(--i) * 40ms + 100ms); }
  .js .lines.is-written > g { animation: none; }
}
@keyframes write {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.hero-in {
  min-height: min(100svh, 1100px);
  padding-top: calc(var(--nav-h) + 36px);
  padding-bottom: clamp(56px, 7vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-logo img { width: clamp(280px, 58vw, 840px); height: auto; margin-left: -1%; }
.hero-lede {
  margin: clamp(20px, 3vw, 34px) 0 clamp(24px, 3vw, 34px);
  max-width: 30ch;
  font-size: clamp(21px, 2.3vw, 27px);
  line-height: 1.38;
  font-weight: 550;
  text-wrap: balance;
}
/* kit-ok: without js the rows can't move out from behind the copy, so a background-red halo erases them instead */
html:not(.js) .hero-lede { text-shadow: 0 0 4px var(--red), 0 0 10px var(--red), 0 0 16px var(--red), 0 0 22px var(--red); }

/* games */
.games { padding-top: var(--gap); }
.games > .wrap > .h2 { margin-bottom: clamp(32px, 4.5vw, 56px); }
.game {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.game-art { display: block; border-radius: 22px; overflow: hidden; background: var(--paper-2); }
.game-art img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s cubic-bezier(.3, .7, .4, 1); }
.game-art:hover img { transform: scale(1.025); }
.game-name { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.game-icon { width: 76px; height: 76px; border-radius: 18px; flex: none; }
.game-name h3 { font-family: var(--display); font-size: clamp(38px, 4.2vw, 54px); line-height: .95; }
.game-lede { font-size: clamp(21px, 2vw, 24px); line-height: 1.35; font-weight: 650; margin-bottom: 12px; text-wrap: balance; }
.game-info > p { color: var(--ink-2); }
.game-live { margin-top: 14px; font-weight: 700; color: var(--red-deep) !important; }
.game-info .actions { margin-top: 26px; }

/* find your car */
.lot {
  position: relative;
  margin-top: var(--gap);
  height: clamp(540px, 74vh, 760px);
  background: #3a3a3a;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.lot-stage { position: absolute; inset: 0; }
.lot-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lot-lens { cursor: none; touch-action: pan-y; }
.lot-lens:focus-visible { outline-offset: -6px; }
.lot-fallback { width: 100%; height: 100%; object-fit: cover; }
.lot-head, .lot-foot { position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none; padding-inline: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); }
.lot-head {
  top: 0;
  padding-top: clamp(28px, 4vw, 52px);
  padding-bottom: 70px;
  background: linear-gradient(rgba(24, 16, 14, .92), rgba(24, 16, 14, .8) 60%, rgba(24, 16, 14, 0)); /* kit-ok: scrim so the heading reads over the lot */
}
.lot-head p { max-width: 34ch; margin-top: 12px; font-size: clamp(17px, 1.6vw, 20px); font-weight: 500; }
.lot-foot {
  bottom: 0;
  padding-top: 70px;
  padding-bottom: clamp(22px, 3vw, 36px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(rgba(24, 16, 14, 0), rgba(24, 16, 14, .7)); /* kit-ok: scrim so the counter reads over the lot */
}
.lot-count { font-size: 18px; font-weight: 600; }
.lot-count b { font-family: var(--display); font-weight: 400; font-size: 34px; margin-right: 4px; }
.lot-giveup { pointer-events: auto; font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; padding: 10px 0; }
.lot-giveup:hover { color: #ffd9d4; }
.lot-found {
  position: absolute;
  z-index: 3;
  bottom: clamp(20px, 3vw, 36px);
  left: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter)));
  right: auto;
}
.lot-found.on-left { left: auto; right: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); }
.lot-found.at-top { top: 20px; bottom: auto; }
.lot-found[hidden] { display: none; }
.lot-card {
  width: min(420px, calc(100vw - 2 * var(--gutter)));
  background: var(--white);
  color: var(--ink);
  border-radius: 20px;
  padding: 24px 24px 22px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
  animation: pop .35s cubic-bezier(.3, 1.4, .5, 1) both;
}
.lot-card-title { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--red); margin-bottom: 8px; }
.lot-card p:not(.lot-card-title) { font-size: 17px; color: var(--ink-2); text-wrap: balance; }
.lot-card .actions { margin-top: 18px; }
@keyframes pop { from { transform: translateY(16px) scale(.96); opacity: 0; } }
.only-coarse { display: none; }
@media (pointer: coarse) {
  .only-fine { display: none; }
  .only-coarse { display: inline; }
  .lot-lens { cursor: pointer; }
}

/* josh */
.josh { padding-top: var(--gap); }
.josh-in {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
}
.josh-pic {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 380px;
  container-type: inline-size;
  display: grid;
  justify-items: center;
}
.josh-pic img { position: relative; z-index: 1; width: 64cqi; height: auto; transform: rotate(-3deg); transform-origin: bottom center; margin-bottom: -22cqi; }
.plate {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 22px 20px 16px;
  border-radius: 24px;
  background: var(--red);
  color: var(--white);
  text-align: center;
}
.plate-name { font-family: var(--display); font-size: clamp(30px, 3vw, 38px); line-height: 1; }
.plate-role { font-size: 16px; font-weight: 600; }
.plate .icons { margin: 10px 0 0; }
.plate .icons a { color: var(--white); }
.plate .icons a:hover { background: var(--white); color: var(--red); }
.josh-copy .h2 { margin-bottom: 20px; }
.josh-copy .lede { max-width: 36ch; }
.icons { display: flex; gap: 2px; }
.icons a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); transition: background-color .15s, color .15s; }
.icons a:hover { background: var(--ink); color: var(--white); }
.icons .ico { width: 21px; height: 21px; }
.hire { margin-top: clamp(40px, 5vw, 56px); padding-top: clamp(28px, 3.5vw, 36px); border-top: 2px solid rgba(30, 21, 19, .1); max-width: 54ch; }
.hire h3 { font-family: var(--display); font-size: 30px; margin-bottom: 8px; }
.hire p { color: var(--ink-2); }
.hire a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hire a:hover { color: var(--red); }

/* community */
.community { padding-top: var(--gap); }
.doors { margin-top: clamp(24px, 3vw, 36px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.door {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 24px;
  color: var(--white);
  text-decoration: none;
  transition: transform .25s cubic-bezier(.3, .7, .4, 1);
}
.door:hover { transform: translateY(-4px); }
.door-group { background: var(--red); }
.door-discord { background: var(--ink); }
.door-ico { width: 44px; height: 44px; fill: currentColor; margin-bottom: 6px; }
.door-title { font-family: var(--display); font-size: clamp(30px, 3vw, 40px); line-height: 1; }
.door-text { font-size: 18px; line-height: 1.5; max-width: 36ch; color: var(--white); }
.door-text b { font-family: var(--display); font-weight: 400; font-size: 1.2em; line-height: 1; color: var(--white); }
.door .btn { margin-top: auto; }
.door-text { margin-bottom: 18px; }
.door-group .btn { color: var(--red); }
.door-discord .btn { color: var(--ink); }
.door:hover .btn { background: var(--paper); }

/* contact */
.contact { padding-block: var(--gap); }
.contact-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 40px; align-items: start; }
.contact-in .mail { margin-top: 6px; }
.mail { margin-top: clamp(22px, 3vw, 32px); display: grid; gap: 22px; }
.mail li { display: grid; gap: 2px; }
.mail a { font-family: var(--display); font-size: clamp(26px, 3vw, 38px); line-height: 1.1; text-decoration: none; overflow-wrap: anywhere; justify-self: start; }
.mail a:hover { color: var(--red); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.mail span { color: var(--ink-2); text-wrap: balance; }

/* footer */
.foot { background: var(--ink); color: var(--white); padding-block: clamp(64px, 8vw, 104px) 36px; overflow: hidden; }
.foot-line { width: min(100%, 1060px); height: auto; font-family: var(--hand); fill: rgba(255, 255, 255, .92); margin-bottom: clamp(36px, 5vw, 64px); }
.foot-row { display: flex; align-items: center; flex-wrap: wrap; gap: 24px 40px; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .16); }
.foot-logo { width: 150px; height: auto; margin-right: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot-links a { text-decoration: none; font-weight: 600; color: rgba(255, 255, 255, .85); }
.foot-links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 5px; }
.foot-social { display: flex; gap: 6px; }
.foot-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: rgba(255, 255, 255, .85); }
.foot-social a:hover { background: rgba(255, 255, 255, .1); color: var(--white); }
.foot-social .ico { width: 20px; height: 20px; }
.foot-small { margin-top: 28px; font-size: 14px; color: rgba(255, 255, 255, .55); text-wrap: balance; }

/* tablet */
@media (max-width: 1080px) {
  .game { grid-template-columns: minmax(0, 1fr); }
  .josh-in { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
}

/* phone */
@media (max-width: 860px) {
  :root { --nav-h: 64px; --rule0: 82.2px; --row: 38.2px; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; margin-left: auto; }
  .nav-logo img { height: 34px; }
  .hero-in { min-height: min(86svh, 720px); padding-top: calc(var(--nav-h) + 28px); }
  .hero-logo img { width: 100%; max-width: 560px; }
  .hero-lede { max-width: 26ch; }
  .hero .actions .btn, .game-info .actions .btn, .lot-card .btn { flex: 1 1 200px; }
  .door { width: 100%; }
  .door .btn { align-self: stretch; }
  .menu-logo { height: 34px; }
  .contact-in { grid-template-columns: minmax(0, 1fr); }
  .lines { width: 1910px; }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .josh-in { grid-template-columns: minmax(0, 1fr); }
  .josh-pic { width: min(340px, 86vw); justify-self: center; }
  .lot { height: min(640px, 92svh); }
  .lot-head { padding-bottom: 48px; }
  .lot-foot { padding-top: 48px; }
  .foot-row { flex-direction: column; align-items: flex-start; }
  .foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 32px; }
}

@media (max-width: 420px) {
  body { font-size: 17px; }
  .btn-big { font-size: 20px; padding-inline: 20px; }
  .menu-links a { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .lines > g { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 404 */
.lost { min-height: 100svh; display: grid; align-items: center; }
.lost-in { padding-block: 48px; }
.lost-logo img { width: 170px; height: auto; margin-bottom: clamp(32px, 6vh, 64px); }
.lost-title { font-family: var(--display); font-size: clamp(96px, 16vw, 200px); line-height: .85; }
.lost .hero-lede { margin-top: 18px; }
