:root {
  --ink: #15182a;
  --muted: #65697a;
  --paper: #ffffff;
  --wash: #f4f5f9;
  --navy: #11152b;
  --navy-2: #242b55;
  --coral: #f26d6d;
  --gold: #f5b55b;
  --cyan: #67d7d2;
  --line: #dfe1e8;
  --max: 1120px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; }
a:hover { color: #a63f4b; }
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  color: white;
  background: var(--navy);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: relative;
  z-index: 10;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 104px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--navy);
}
.brand:hover { color: var(--navy); }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--navy);
  border: 3px solid var(--navy);
  box-shadow: 5px 5px 0 var(--coral);
  font: 700 1.05rem/1 var(--sans);
  letter-spacing: -0.08em;
}
.brand-copy { display: grid; line-height: 1; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand-kicker {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-bottom: 2px solid transparent;
  color: #323548;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #a63f4b;
  border-color: var(--coral);
}

.hero {
  min-height: 560px;
  display: grid;
  align-items: center;
  color: white;
  background:
    linear-gradient(90deg, rgba(9,12,31,0.94) 0%, rgba(9,12,31,0.76) 34%, rgba(9,12,31,0.08) 72%),
    url("assets/game-loop-hero.png") center / cover no-repeat;
  border-bottom: 8px solid var(--coral);
}
.hero-inner,
.section-inner,
.article-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}
.hero-copy { width: min(580px, 92%); padding: 5.5rem 0; }
.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 8ch;
  margin: 0;
  font: 700 clamp(4.2rem, 10vw, 8.8rem)/0.82 var(--serif);
  letter-spacing: -0.075em;
}
.hero-subtitle {
  max-width: 26ch;
  margin: 1.7rem 0 0;
  font: 700 clamp(1.25rem, 2.5vw, 2.05rem)/1.2 var(--serif);
}
.hero-note {
  max-width: 47ch;
  margin: 1rem 0 0;
  color: #e8eaf4;
  line-height: 1.7;
}
.button-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  border: 2px solid var(--coral);
  color: var(--navy);
  background: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.button:hover { color: white; background: transparent; }
.button-ghost { color: white; background: transparent; border-color: white; }
.button-ghost:hover { color: var(--navy); background: white; }

.intro { padding: 5.5rem 0 4.5rem; }
.intro-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6.5rem);
  align-items: start;
}
.display-heading {
  margin: 0;
  font: 700 clamp(2.6rem, 6vw, 5rem)/0.98 var(--serif);
  letter-spacing: -0.055em;
}
.display-heading span { color: var(--coral); }
.lead { margin-top: 0; font-size: 1.15rem; line-height: 1.85; }
.text-link { color: #a63f4b; font-weight: 800; }

.stage-band { padding: 4.7rem 0; color: white; background: var(--navy); }
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.25rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.section-label::after { content: ""; width: 72px; height: 2px; background: currentColor; }
.stage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #404663; }
.stage-card { min-height: 265px; padding: 2rem; background: var(--navy); }
.stage-number { color: var(--cyan); font: 700 0.85rem/1 var(--sans); letter-spacing: 0.15em; }
.stage-card h3 { margin: 1.2rem 0 0.75rem; font: 700 2.1rem/1 var(--serif); }
.stage-card p { margin: 0; color: #cfd2df; }
.stage-card a { display: inline-block; margin-top: 1rem; color: var(--gold); font-weight: 800; }

.latest { padding: 5rem 0 6rem; background: var(--wash); }
.section-heading { margin: 0 0 2.2rem; font: 700 clamp(2.35rem, 5vw, 4.2rem)/1 var(--serif); letter-spacing: -0.045em; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }
.article-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: 1.6rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.article-card:hover { color: var(--ink); transform: translateY(-4px); box-shadow: 8px 8px 0 var(--coral); }
.card-art {
  min-height: 118px;
  margin: -1.6rem -1.6rem 1.4rem;
  background:
    linear-gradient(135deg, rgba(17,21,43,.7), rgba(242,109,109,.18)),
    url("assets/game-loop-hero.png") center 65% / cover;
  border-bottom: 4px solid var(--coral);
}
.card-art.alt { background-position: 62% 48%; filter: hue-rotate(16deg); }
.card-art.third { background-position: 90% 38%; filter: hue-rotate(-15deg); }
.card-kicker { color: #a63f4b; font-size: 0.75rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.article-card h3 { margin: 0.8rem 0 0.7rem; font: 700 1.65rem/1.12 var(--serif); }
.article-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.card-arrow { margin-top: auto; padding-top: 1.2rem; color: #a63f4b; font-weight: 900; }

.page-hero { padding: 5rem 0 4.6rem; color: white; background: var(--navy); border-bottom: 8px solid var(--coral); }
.page-hero .eyebrow { color: var(--cyan); }
.page-hero h1 { max-width: 16ch; margin: 0; font: 700 clamp(3.2rem, 8vw, 6.7rem)/0.95 var(--serif); letter-spacing: -0.065em; }
.page-hero p { max-width: 650px; margin: 1.2rem 0 0; color: #d9dce8; font-size: 1.15rem; }
.meta { margin-top: 1.5rem; color: #aeb4ca; font-size: 0.84rem; }

.article-shell { display: grid; grid-template-columns: minmax(0, 760px) 250px; gap: 5rem; padding-block: 4.7rem 6rem; }
.article-body h2 { margin: 3.2rem 0 0.8rem; font: 700 2.35rem/1.1 var(--serif); letter-spacing: -0.035em; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 2.15rem 0 0.45rem; font: 700 1.5rem/1.2 var(--serif); }
.article-body p, .article-body li { color: #3f4253; }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li + li { margin-top: 0.75rem; }
.callout {
  margin: 2.4rem 0;
  padding: 1.5rem 1.7rem;
  background: #eef9f8;
  border-left: 5px solid var(--cyan);
}
.callout strong { color: var(--navy); }
.side-nav { position: sticky; top: 2rem; align-self: start; padding-left: 1.3rem; border-left: 2px solid var(--line); }
.side-nav h2 { margin: 0 0 0.8rem; font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; }
.side-nav ul { margin: 0; padding: 0; list-style: none; }
.side-nav li + li { margin-top: 0.5rem; }
.side-nav a { color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.side-nav a:hover { color: #a63f4b; }

.roadmap-list { list-style: none; counter-reset: road; padding: 0 !important; }
.roadmap-list > li { counter-increment: road; position: relative; padding: 0 0 2.5rem 4.7rem; }
.roadmap-list > li::before {
  content: counter(road, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.roadmap-list > li::after { content: ""; position: absolute; left: 1rem; top: 1.7rem; bottom: 0.35rem; width: 1px; background: var(--line); }
.roadmap-list h2 { margin-top: 0; }

.resource-group { padding: 0 0 2.4rem; border-bottom: 1px solid var(--line); }
.resource-group + .resource-group { padding-top: 1rem; }
.resource-list { list-style: none; padding: 0 !important; }
.resource-list li { display: grid; grid-template-columns: 190px 1fr; gap: 1.5rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.resource-list strong a { color: var(--ink); }
.resource-list p { margin: 0; }

.studio-list { display: grid; gap: 1rem; margin: 2rem 0; }
.studio-card { padding: 1.5rem; border: 1px solid var(--line); }
.studio-card.featured { border-left: 6px solid var(--coral); background: #fffafa; }
.studio-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.studio-card h3 { margin: 0; }
.studio-tag { color: #a63f4b; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.studio-card p { margin-bottom: 0; }
.fit-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0 !important; list-style: none; }
.fit-list li { margin: 0 !important; padding: 0.25rem 0.65rem; color: var(--navy); background: var(--wash); font-size: 0.78rem; font-weight: 700; }

.contact-panel { margin-top: 3rem; padding: 2.2rem; color: white; background: var(--navy); }
.contact-panel h2 { margin-top: 0; }
.contact-panel a { color: var(--gold); }

.site-footer { color: #d6d9e5; background: #0a0d1c; }
.footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 3rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}
.footer-title { margin: 0; color: white; font: 700 2rem/1 var(--serif); }
.footer-copy { max-width: 540px; margin: 0.8rem 0 0; color: #aeb4ca; font-size: 0.92rem; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { color: white; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.copyright { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid #2d3144; color: #8f95aa; font-size: 0.78rem; }

@media (max-width: 860px) {
  .header-inner { padding: 1.15rem 0; align-items: flex-start; flex-direction: column; gap: 0.8rem; }
  .site-nav { width: 100%; overflow-x: auto; }
  .site-nav ul { justify-content: flex-start; }
  .site-nav a { padding-left: 0; margin-right: 1rem; white-space: nowrap; }
  .hero { min-height: 520px; background-position: 63% center; }
  .intro-grid, .article-shell { grid-template-columns: 1fr; }
  .intro-grid { gap: 1.7rem; }
  .article-shell { gap: 1.5rem; }
  .side-nav { position: static; order: -1; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .stage-grid { grid-template-columns: 1fr; }
  .stage-card { min-height: auto; }
}

@media (max-width: 580px) {
  .brand-kicker { display: none; }
  .hero { min-height: 500px; background-position: 68% center; }
  .hero-copy { padding: 4rem 0; }
  .hero h1 { font-size: clamp(3.8rem, 21vw, 5.7rem); }
  .intro, .latest { padding-block: 4rem; }
  .card-grid { grid-template-columns: 1fr; }
  .page-hero { padding-block: 3.5rem; }
  .resource-list li { grid-template-columns: 1fr; gap: 0.35rem; }
  .studio-card-top { display: block; }
  .studio-tag { display: inline-block; margin-top: 0.45rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

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