:root {
  color-scheme: light;
  --page: #f4f1eb;
  --paper: #fffdf8;
  --ink: #111111;
  --muted: #66635e;
  --line: rgba(17, 17, 17, 0.15);
  --line-strong: rgba(17, 17, 17, 0.28);
  --red: #e52128;
  --red-dark: #b91118;
  --yellow: #ffd83d;
  --white: #ffffff;
  --black: #0b0b0b;
  --shell: min(1180px, calc(100vw - 2rem));
  --radius: 1.15rem;
  --shadow: 0 24px 70px rgba(14, 12, 10, 0.12);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }

.shell { width: var(--shell); margin-inline: auto; }
.narrow { max-width: 760px; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 100;
  transform: translateY(-180%);
  border-radius: 0.5rem;
  background: var(--black);
  color: var(--white);
  padding: 0.65rem 0.9rem;
  font-weight: 750;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(16px);
}
.header-inner {
  display: flex;
  min-height: 4.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-size: 0.96rem;
  font-weight: 860;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.62rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  transform: rotate(-3deg);
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.3rem); }
.site-nav a {
  position: relative;
  font-size: 0.84rem;
  font-weight: 780;
  text-decoration: none;
}
.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.3rem;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--red);
  content: "";
  transition: transform 170ms ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(760px, calc(100svh - 4.75rem));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.hero-grid {
  display: grid;
  min-height: min(760px, calc(100svh - 4.75rem));
  grid-template-columns: minmax(0, 0.9fr) minmax(410px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding-block: clamp(4rem, 9vw, 8rem);
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 {
  margin: 0;
  max-width: 8ch;
  font-size: clamp(4.2rem, 9.5vw, 8.9rem);
  font-weight: 950;
  line-height: 0.79;
  letter-spacing: -0.085em;
}
.hero h1 em { color: var(--red); font-style: normal; }
.hero-intro > p {
  max-width: 27rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 520;
  letter-spacing: -0.018em;
}
.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font-weight: 830;
  text-decoration: none;
  transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { margin-top: 2rem; background: var(--ink); color: var(--white); }
.button-primary:hover { background: var(--red); }

.hero-scene {
  position: relative;
  width: min(100%, 650px);
  aspect-ratio: 1 / 1;
  justify-self: end;
  overflow: hidden;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 40px 100px rgba(229, 33, 40, 0.2);
}
.hero-scene::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0 52%, rgba(255,255,255,0.25) 52% 53%, transparent 53%);
  content: "";
}
.hero-sun {
  position: absolute;
  top: 14%;
  right: 14%;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
}
.hero-city { position: absolute; right: 0; bottom: 29%; left: 0; display: flex; height: 100%; align-items: end; justify-content: center; }
.hero-city i { display: block; background: var(--black); }
.hero-city-back { gap: 2.5%; opacity: 0.22; }
.hero-city-back i:nth-child(1) { width: 12%; height: 20.9%; }
.hero-city-back i:nth-child(2) { width: 16%; height: 29.5%; }
.hero-city-back i:nth-child(3) { width: 9%; height: 39.4%; }
.hero-city-back i:nth-child(4) { width: 18%; height: 24.6%; }
.hero-city-back i:nth-child(5) { width: 11%; height: 33.2%; }
.hero-city-front { gap: 1.6%; }
.hero-city-front i:nth-child(1) { width: 23%; height: 17.2%; clip-path: polygon(0 14%, 74% 14%, 74% 0, 100% 0, 100% 100%, 0 100%); }
.hero-city-front i:nth-child(2) { width: 13%; height: 35.7%; clip-path: polygon(36% 0, 64% 0, 64% 12%, 77% 12%, 77% 26%, 90% 26%, 90% 100%, 10% 100%, 10% 26%, 23% 26%, 23% 12%, 36% 12%); }
.hero-city-front i:nth-child(3) { width: 25%; height: 20.9%; }
.hero-city-front i:nth-child(4) { width: 18%; height: 28.3%; clip-path: polygon(0 10%, 65% 10%, 65% 0, 78% 0, 78% 16%, 100% 16%, 100% 100%, 0 100%); }
.hero-road {
  position: absolute;
  right: 11%;
  bottom: -7%;
  left: 11%;
  height: 40%;
  background: var(--red);
  clip-path: polygon(39% 0, 61% 0, 100% 100%, 0 100%);
}
.hero-road i {
  position: absolute;
  top: 6%;
  bottom: 0;
  left: 49.45%;
  width: 1.1%;
  background: repeating-linear-gradient(180deg, var(--paper) 0 11%, transparent 11% 21%);
  transform: perspective(180px) rotateX(18deg);
}

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-muted { border-top: 1px solid var(--line); background: #e9e5dd; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: clamp(1.7rem, 4vw, 3rem); }
.section-title h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  font-weight: 920;
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.65rem); }
.featured-grid:has(.game-card:only-child) { grid-template-columns: minmax(0, 1fr); }
.featured-grid:has(.game-card:only-child) .game-card-link { grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr); }
.featured-grid:has(.game-card:only-child) .game-cover { aspect-ratio: 16 / 9; }
.game-card { min-width: 0; }
.game-card-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.game-card-link:hover, .game-card-link:focus-visible {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.game-cover { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--black); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.game-card-link:hover .game-cover img { transform: scale(1.025); }
.game-card-copy {
  display: flex;
  min-height: 14rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.game-card h3 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.055em;
}
.game-card p { max-width: 42rem; margin: 0.85rem 0 0; color: var(--muted); font-size: 0.96rem; }
.card-action { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.05em; }
.card-action span { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--ink); color: var(--white); font-size: 1rem; transition: background-color 150ms ease; }
.game-card-link:hover .card-action span { background: var(--red); }

.site-footer { border-top: 1px solid rgba(255,255,255,0.15); background: var(--black); color: rgba(255,255,255,0.72); padding: 3rem 0 max(3rem, env(safe-area-inset-bottom)); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem 3rem; align-items: start; }
.footer-brand { color: var(--white); font-weight: 850; text-decoration: none; }
.footer-inner nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.65rem 1.25rem; }
.footer-inner nav a { color: rgba(255,255,255,0.78); font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.footer-link-button { border: 0; background: transparent; color: rgba(255,255,255,0.78); padding: 0; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.footer-inner nav a:hover, .footer-link-button:hover { color: var(--white); }
.footer-link-button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.footer-inner p { grid-column: 1 / -1; margin: 0; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,0.13); font-size: 0.76rem; }


.content-page { min-height: 70vh; padding: clamp(4.5rem, 9vw, 8.5rem) 0; background: var(--paper); }
.page-kicker { margin: 0 0 1.2rem; color: var(--red); font-size: 0.76rem; font-weight: 860; text-transform: uppercase; letter-spacing: 0.1em; }
.content-page h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 930;
  line-height: 0.93;
  letter-spacing: -0.07em;
}
.content-page .lead { margin: 2.2rem 0; color: var(--ink); font-size: clamp(1.15rem, 2.4vw, 1.45rem); font-weight: 620; letter-spacing: -0.025em; }
.content-page h2 { margin: 3rem 0 0.6rem; font-size: clamp(1.45rem, 3vw, 2.05rem); line-height: 1.1; letter-spacing: -0.04em; }
.content-page p { color: var(--muted); }
.content-page a { color: var(--red-dark); font-weight: 680; }
.content-page code { border-radius: 0.28rem; background: #ece7dd; padding: 0.12rem 0.3rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; }
.callout { margin-top: 3rem; border-left: 4px solid var(--red); background: #f0ebe2; padding: 1.2rem 1.35rem; color: var(--muted); }
.callout strong { color: var(--ink); }
.document-date { margin-top: 3rem !important; font-size: 0.8rem; }

.not-found { display: grid; min-height: 70vh; place-items: center; padding: 5rem 0; background: var(--paper); text-align: center; }
.not-found h1 { margin: 0; font-size: clamp(3rem, 8vw, 6rem); line-height: 0.95; letter-spacing: -0.07em; }
.not-found .button { margin-top: 2rem; }
.error-code { display: block; margin-bottom: 1rem; color: var(--red); font-size: clamp(5rem, 16vw, 11rem); font-weight: 950; line-height: 0.8; letter-spacing: -0.09em; opacity: 0.16; }

@media (max-width: 920px) {
  .hero-grid {
    grid-template-areas: "intro" "scene" "action";
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-copy { display: contents; }
  .hero-intro { grid-area: intro; }
  .hero-copy > .button {
    grid-area: action;
    justify-self: center;
    margin-top: 0;
  }
  .hero { min-height: auto; }
  .hero-scene { grid-area: scene; width: min(82vw, 570px); justify-self: center; }
  .featured-grid:has(.game-card:only-child) .game-card-link { grid-template-columns: 1fr; }
  .featured-grid:has(.game-card:only-child) .game-cover { aspect-ratio: 16 / 10; }
}

@media (max-width: 720px) {
  :root { --shell: min(100% - 1.2rem, 1180px); }
  .header-inner { min-height: 4.25rem; }
  .brand { font-size: 0.88rem; }
  .brand-mark { width: 2.05rem; height: 2.05rem; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: 0.79rem; }
  .hero-grid { padding-block: 4.5rem 3rem; gap: 3.2rem; }
  .hero h1 { font-size: clamp(4rem, 19vw, 6.4rem); }
  .hero-intro > p { margin-top: 1.5rem; }
  .hero-scene { width: min(91vw, 520px); }
  .section { padding-block: 4.5rem; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card-copy { min-height: 12.5rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner nav { justify-content: flex-start; }
  .footer-inner p { grid-column: 1; }
}

@media (max-width: 430px) {
  .brand span:last-child { max-width: 7rem; line-height: 1; }
  .hero h1 { letter-spacing: -0.075em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
