:root {
  color-scheme: dark;
  --bg: #14120f;
  --bg-deep: #0d0c0a;
  --panel: #191712;
  --panel-solid: #191712;
  --text: #eae4d6;
  --muted: #9d9583;
  --line: #2e2a23;
  --line-strong: #46402f;
  --accent: #e06c8f;
  --accent-dim: #8f4257;
  --ok: #9cab7d;
  --error: #c47a68;
  /* Sequential ramp for commit density: one hue, light to dark, validated for
     monotone lightness and a 2:1 floor against the panel surface. */
  --heat-0: #241f1a;
  --heat-1: #78404e;
  --heat-2: #9d4f65;
  --heat-3: #c15f7b;
  --heat-4: #e06c8f;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Consolas", "SFMono-Regular", Menlo, monospace;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

body.studio-page {
  background: var(--bg-deep);
}

body.studio-page::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(13, 12, 10, 0.72), rgba(13, 12, 10, 0.94)),
    url("images/studio/background.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto, cover;
  filter: saturate(0.45);
}

body.studio-page main,
body.studio-page .site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(13, 12, 10, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo-frame {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--bg-deep);
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.brand-name {
  display: block;
  max-width: 24rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.05;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.7rem, 2.5vw, 1.4rem);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  transition: color 160ms ease;
}

.nav-group {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  transition: color 160ms ease;
}

.nav-trigger:hover,
.nav-trigger:focus-visible,
.nav-trigger[aria-expanded="true"] {
  color: var(--accent);
}

.nav-caret {
  width: 0.4rem;
  height: 0.4rem;
  flex: 0 0 auto;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
  transition: transform 160ms ease;
}

.nav-trigger[aria-expanded="true"] .nav-caret {
  transform: translateY(0.08rem) rotate(-135deg);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 14rem;
  padding: 0.9rem 0.65rem 0.75rem;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.58);
}

.nav-menu[hidden] {
  display: none;
}

.nav-menu-heading {
  margin: 0.9rem 0 0.35rem;
  padding: 0 0.7rem;
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.nav-menu-heading:first-child {
  margin-top: 0;
}

.nav-menu a {
  padding: 0.45rem 0.7rem;
  border-left: 2px solid transparent;
  color: var(--text);
  white-space: nowrap;
}

.site-nav .nav-menu a:hover,
.site-nav .nav-menu a:focus-visible {
  border-left-color: var(--accent);
  background: rgba(224, 108, 143, 0.08);
  color: var(--accent);
}

.site-nav .nav-menu a[aria-current="page"] {
  border-left-color: var(--line-strong);
  color: var(--muted);
}

.social-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 160ms ease, border-color 160ms ease;
}

.social-link svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.social-link:hover,
.social-link:focus-visible {
  border-color: var(--line-strong);
  color: var(--accent);
}

.site-footer .social-link {
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible,
.facts a:hover,
.facts a:focus-visible {
  color: var(--accent);
}

.studio-hero,
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: 7rem clamp(1rem, 6vw, 5rem) 3rem;
  isolation: isolate;
}

.studio-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 2.75rem);
  text-align: center;
}

.studio-logo-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(15rem, 55vw);
  aspect-ratio: 1;
  animation: logo-float 7s ease-in-out infinite;
}

.studio-logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 30deg, var(--accent));
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  animation: logo-spin 12s linear infinite;
}

.studio-logo-stage img {
  width: 72%;
  object-fit: contain;
}

@keyframes logo-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-logo-stage,
  .studio-logo-ring {
    animation: none;
  }
}

.studio-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(44rem, 100%);
}

.studio-hero-copy .hero-actions {
  justify-content: center;
}

.hero {
  display: grid;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  z-index: -3;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(13, 12, 10, 0.16), rgba(13, 12, 10, 0.36) 38%, rgba(13, 12, 10, 0.85) 70%),
    linear-gradient(180deg, rgba(13, 12, 10, 0.28), rgba(13, 12, 10, 0.1) 45%, rgba(13, 12, 10, 0.95));
}

.hero-content {
  align-self: center;
  justify-self: end;
  width: min(43rem, 100%);
  padding-top: 3rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(3.2rem, 10vw, 8.8rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.studio-hero h1 {
  max-width: 18ch;
  margin-inline: auto;
}

.studio-title span:first-child,
.game-title span:first-child,
.title-subtitle {
  display: block;
}

.title-subtitle {
  margin-top: 0.7rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.8vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 38rem;
  color: var(--text);
  font-size: clamp(1rem, 1.9vw, 1.35rem);
}

.hero-actions,
.development-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  padding: 0.8rem 1.2rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-deep);
}

.button-primary:hover,
.button-primary:focus-visible {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg-deep);
}

.button-secondary {
  background: transparent;
  color: var(--text);
}

.button-steam {
  border-color: var(--accent-dim);
  background: transparent;
  color: var(--accent);
}

.button-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-disabled:hover,
.button-disabled:focus-visible {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.status-panel {
  position: absolute;
  left: clamp(1rem, 6vw, 5rem);
  bottom: 3rem;
  width: min(18rem, calc(100% - 2rem));
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  padding: 1rem;
  background: rgba(13, 12, 10, 0.88);
}

.status-panel span,
.status-panel small {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-panel small {
  text-transform: none;
  letter-spacing: 0.02em;
}

.status-panel strong {
  display: block;
  margin: 0.3rem 0;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  text-transform: uppercase;
}

.section,
.feature-grid,
.press-band,
.site-footer {
  width: min(1160px, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.split,
.section-heading,
.development {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(18rem, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.split p:last-child {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.intro-copy p {
  font-size: 1.1rem;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.project-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading > p:last-child {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.project-grid {
  display: grid;
  gap: 1.25rem;
}

.project-panel {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(16rem, 0.7fr);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  transition: border-color 160ms ease;
}

.project-panel:hover,
.project-panel:focus-visible {
  border-color: var(--accent-dim);
}

.project-panel-placeholder {
  opacity: 0.72;
}

.project-media {
  height: clamp(16rem, 32vw, 22rem);
  min-height: 0;
}

.project-media-placeholder {
  display: block;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 14px),
    var(--panel);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-copy {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border-left: 1px solid var(--line);
}

.project-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-copy strong {
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  font-weight: 800;
  line-height: 0.9;
  text-transform: uppercase;
}

.project-copy span:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.compact-grid {
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.feature-card,
.systems-list article {
  border: 1px solid var(--line);
  background: var(--panel);
}

.feature-card {
  min-height: 15rem;
  padding: 1.5rem;
}

.feature-card p,
.systems-list p {
  margin-bottom: 0;
}

.card-number {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 500;
}

.card-number::before {
  content: "/ ";
  color: var(--muted);
}

.systems {
  border-top: 1px solid var(--line);
}

.magazine-section {
  border-top: 1px solid var(--line);
}

.gallery-note {
  max-width: 42rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.magazine-layout {
  max-width: 46rem;
  margin: 0 auto;
}

.magazine-layout::after {
  content: "";
  display: table;
  clear: both;
}

.magazine-copy {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.magazine-copy::after {
  content: "";
  display: table;
  clear: both;
}

.magazine-copy p:first-of-type::first-letter {
  float: left;
  margin: 0.02em 0.08em 0 0;
  color: var(--accent);
  font-size: 3.4em;
  font-weight: 800;
  line-height: 0.78;
}

.magazine-image {
  position: relative;
  float: left;
  width: min(100%, 14rem);
  height: auto;
  margin: 0 clamp(1rem, 3vw, 1.5rem) 0.5rem 0;
  border: 1px solid var(--line-strong);
  object-fit: cover;
  aspect-ratio: 4 / 3;
  shape-outside: inset(0);
}

.magazine-image.is-right {
  float: right;
  margin: 0 0 0.5rem clamp(1rem, 3vw, 1.5rem);
}

.magazine-image.is-featured {
  width: min(100%, 18rem);
}

.magazine-copy .card-number {
  margin-bottom: 0.6rem;
}

.magazine-copy h3 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.magazine-copy p {
  margin-bottom: 0;
  font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.screenshot-gallery {
  max-width: 46rem;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
}

.screenshot-gallery-label {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

.screenshot-gallery-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: clamp(28rem, 70vw, 42rem);
  border: 1px solid var(--line-strong);
  background: var(--bg-deep);
}

.screenshot-gallery-viewport:empty,
.screenshot-gallery-viewport.is-loading {
  min-height: clamp(16rem, 40vw, 28rem);
}

.screenshot-gallery-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(28rem, 70vw, 42rem);
  object-fit: contain;
}

.screenshot-gallery-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid var(--line-strong);
  background: rgba(13, 12, 10, 0.8);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.screenshot-gallery-arrow:hover,
.screenshot-gallery-arrow:focus-visible {
  border-color: var(--accent);
  background: var(--bg-deep);
  color: var(--accent);
}

.screenshot-gallery-prev {
  left: 0.75rem;
}

.screenshot-gallery-next {
  right: 0.75rem;
}

.screenshot-gallery-count {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
}

.systems-list {
  display: grid;
  gap: 0.8rem;
}

.systems-list article {
  display: grid;
  grid-template-columns: minmax(12rem, 0.4fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.press-band {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(20rem, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--panel-solid);
}

.contact-panel,
.contact-form {
  display: grid;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  padding: 0.85rem 0.95rem;
  background: var(--bg-deep);
  color: var(--text);
  color-scheme: dark;
  font: inherit;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: 0;
}

.contact-form select {
  appearance: none;
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) 50%,
    calc(100% - 0.8rem) 50%;
  background-repeat: no-repeat;
  background-size: 0.35rem 0.35rem;
}

.contact-form option {
  background: var(--panel-solid);
  color: var(--text);
}

.contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.contact-honeypot {
  position: absolute;
  left: -100vw;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.contact-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.contact-status.is-success {
  color: var(--ok);
}

.contact-status.is-error {
  color: var(--error);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.facts {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.facts div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.34fr) minmax(0, 1fr);
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.65rem;
}

.facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--text);
}

.development {
  align-items: start;
}

.development .section-heading {
  display: block;
  margin-bottom: 0;
}

.development-panel {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.development-summary {
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.development-summary p {
  margin-bottom: 0.4rem;
}

.commit-status {
  margin-bottom: 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.commit-list {
  display: grid;
  gap: 0.75rem;
  max-height: 42rem;
  margin: 0;
  overflow: auto;
  padding: 0 0.4rem 0 0;
  list-style: none;
}

.commit-item {
  border: 1px solid var(--line);
  padding: 0.9rem;
  background: var(--panel);
}

.commit-title {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}

.commit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.commit-sha {
  color: var(--accent);
  font-weight: 500;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.development {
  display: block;
}

.development .section-heading {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.development-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(19rem, 1fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}

/* Long commit subjects would otherwise set the column's minimum width and push
   the whole section past the viewport on narrow screens. */
.development-layout > *,
.commit-list,
.commit-item {
  min-width: 0;
}

.commit-list {
  grid-template-columns: minmax(0, 1fr);
}

/* Some commit subjects embed a full file path with no spaces; "anywhere" also
   shrinks the min-content width, which "break-word" does not. */
.commit-title {
  overflow-wrap: anywhere;
}

.development-metrics {
  position: relative;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.metrics-status {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.metrics-body {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.metrics-body[hidden] {
  display: none;
}

.metric-hero-value {
  display: block;
  color: var(--text);
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.metric-hero-label {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric-tile {
  padding: 0.85rem 0.9rem;
  background: var(--panel);
}

.metric-tile dt {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.metric-tile dd {
  margin: 0;
}

.metric-value {
  display: block;
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.05;
}

.metric-note {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.4;
}

.metric-note.is-up {
  color: var(--ok);
}

.chart {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.chart-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1rem;
}

.chart-title {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-subtitle {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.heatmap-scroll {
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.heatmap {
  --heat-cell: clamp(9px, 1.05vw, 13px);
  border-collapse: separate;
  border-spacing: 3px;
}

.heatmap th {
  padding: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
}

.heat-weekday {
  padding-right: 0.35rem;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.heat-month {
  position: relative;
  height: 0.95rem;
  text-align: left;
}

.heat-month span {
  position: absolute;
  bottom: 0;
  left: 0;
  white-space: nowrap;
}

.heat-cell {
  width: var(--heat-cell);
  height: var(--heat-cell);
  padding: 0;
  border-radius: 2px;
  background: var(--heat-0);
}

.heat-cell.is-future {
  background: transparent;
}

.heat-cell:hover {
  box-shadow: 0 0 0 1px var(--text);
}

.heat-cell:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.heat-legend {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.heat-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.heat-cell[data-level="0"],
.heat-legend-swatch[data-level="0"] {
  background: var(--heat-0);
}

.heat-cell[data-level="1"],
.heat-legend-swatch[data-level="1"] {
  background: var(--heat-1);
}

.heat-cell[data-level="2"],
.heat-legend-swatch[data-level="2"] {
  background: var(--heat-2);
}

.heat-cell[data-level="3"],
.heat-legend-swatch[data-level="3"] {
  background: var(--heat-3);
}

.heat-cell[data-level="4"],
.heat-legend-swatch[data-level="4"] {
  background: var(--heat-4);
}

.month-chart {
  position: relative;
  padding-left: 2.4rem;
}

.month-grid {
  position: absolute;
  top: 1.25rem;
  right: 0;
  bottom: 1.5rem;
  left: 2.4rem;
}

.month-gridline {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px solid var(--line);
}

.month-gridline.is-base {
  bottom: 0;
  border-top-color: var(--line-strong);
}

.month-gridline.is-top {
  top: 0;
}

.month-gridline i {
  position: absolute;
  top: -0.65em;
  right: calc(100% + 0.5rem);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.month-bars,
.month-axis {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 2px;
}

.month-bars {
  position: relative;
  height: 8.5rem;
  /* Headroom so the peak's direct label never rides out of the plot box. */
  padding-top: 1.25rem;
  align-items: end;
}

.month-col {
  position: relative;
  display: flex;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
}

.month-col:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.month-bar {
  width: 100%;
  max-width: 24px;
  border-radius: 4px 4px 0 0;
  background: var(--heat-4);
  transition: filter 140ms ease;
}

.month-bar.has-value {
  min-height: 3px;
}

.month-col:hover .month-bar,
.month-col:focus-visible .month-bar {
  filter: brightness(1.18);
}

.month-value {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  white-space: nowrap;
}

.month-axis {
  height: 1.5rem;
  align-items: center;
}

.month-axis span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 1vw, 0.68rem);
  text-align: center;
}

.chart-tip {
  position: absolute;
  z-index: 4;
  border: 1px solid var(--line-strong);
  padding: 0.4rem 0.6rem;
  background: rgba(13, 12, 10, 0.96);
  pointer-events: none;
  transform: translate(-50%, -100%);
  white-space: nowrap;
}

.chart-tip[hidden] {
  display: none;
}

.chart-tip strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.2;
}

.chart-tip span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 0.5rem;
    padding-bottom: 0.1rem;
  }

  .nav-menu {
    right: auto;
    left: 0;
  }

  .split,
  .section-heading,
  .press-band,
  .development,
  .development-layout,
  .systems-list article,
  .project-panel {
    grid-template-columns: 1fr;
  }

  .month-bars {
    height: 7rem;
  }

  .project-copy {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .magazine-image,
  .magazine-image.is-right {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }

  .studio-hero {
    min-height: auto;
    padding-top: 9rem;
  }

  .studio-logo-stage {
    width: min(10rem, 50vw);
  }

  .hero {
    min-height: 920px;
    padding-top: 9rem;
  }

  .hero-image {
    object-position: 43% center;
  }

  .hero-content {
    align-self: start;
    justify-self: start;
    padding-top: 1.5rem;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(13, 12, 10, 0.6), rgba(13, 12, 10, 0.12) 45%, rgba(13, 12, 10, 0.95)),
      linear-gradient(90deg, rgba(13, 12, 10, 0.2), rgba(13, 12, 10, 0.42));
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: auto;
  }

  .card-number {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(3.1rem, 18vw, 4.5rem);
  }

  .brand-name {
    max-width: 16rem;
  }

  .hero {
    min-height: 820px;
  }

  .hero-actions .button,
  .development-summary .button {
    width: 100%;
  }

  .status-panel {
    bottom: 1rem;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

}
