:root {
  --porcelain: #F7F5F2;
  --graphite: #2C3338;
  --cobalt: #1F4E79;
  --copper: #B87333;
  --line: #D5D1CB;
  --white: #FFFFFF;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: "Sora", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--graphite);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}

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

a {
  color: var(--cobalt);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--copper);
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--graphite);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--graphite);
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--graphite);
  text-decoration: none;
  font-size: 0.92rem;
}

.site-nav a:hover {
  color: var(--cobalt);
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-bar [data-auth="guest"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-bar [data-auth="user"] {
  display: none;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
}

body.has-session [data-auth="guest"] {
  display: none;
}

body.has-session [data-auth="user"] {
  display: inline-flex;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--cobalt);
  background: var(--cobalt);
  color: var(--white);
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: #163a5c;
  border-color: #163a5c;
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--cobalt);
}

.btn-ghost:hover {
  background: var(--porcelain);
  color: var(--cobalt);
}

.btn-copper {
  background: var(--copper);
  border-color: var(--copper);
}

.btn-copper:hover {
  background: #9a6129;
  border-color: #9a6129;
}

/* Spec sheet layout */
.page {
  padding: 2.5rem 0 4rem;
}

.page-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.page-head .kicker {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.4rem;
}

.thesis-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: thesis;
}

.thesis-list > li {
  counter-increment: thesis;
  border-top: 1px solid var(--line);
  padding: 1rem 0 1rem 2.5rem;
  position: relative;
}

.thesis-list > li::before {
  content: counter(thesis, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1rem;
  font-family: var(--font-serif);
  color: var(--cobalt);
  font-weight: 600;
  font-size: 0.95rem;
}

.thesis-list > li:last-child {
  border-bottom: 1px solid var(--line);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: end;
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.hero-copy h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  max-width: 14ch;
}

.hero-copy .lead {
  max-width: 38ch;
  color: #4a5258;
}

.hero-media {
  border: 1px solid var(--line);
  background: var(--white);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Game specs */
.section {
  padding: 2.5rem 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
  margin-bottom: 0;
}

.section-title span {
  font-size: 0.8rem;
  color: #6a7278;
  font-family: var(--font-sans);
  font-weight: 400;
}

.spec-table {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spec-row {
  display: grid;
  grid-template-columns: auto 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

.spec-num {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--cobalt);
  font-weight: 600;
  min-width: 2ch;
}

.spec-logo {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  background: var(--white);
  object-fit: cover;
}

.spec-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.spec-body p {
  margin: 0;
  font-size: 0.92rem;
  color: #4a5258;
}

.spec-action {
  white-space: nowrap;
}

/* Story / free block */
.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1.5rem;
}

.story-block img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}

.band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.band-copy {
  padding: 1.75rem;
}

.band img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

/* Legal / content prose */
.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.prose ol {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.55rem;
}

/* Contact */
.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 480px;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  color: #4a5258;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--graphite);
  padding: 0.7rem 0.8rem;
  font: inherit;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9rem;
}

#contact-ok {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  max-width: 480px;
}

#contact-ok.is-visible {
  display: block;
}

.form-error {
  display: none;
  color: #8a2f2f;
  font-size: 0.88rem;
  margin: 0.35rem 0 0;
}

.form-error.is-visible {
  display: block;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: 2.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1rem;
}

.footer-nav a {
  color: var(--graphite);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--cobalt);
}

.footer-note {
  font-size: 0.88rem;
  color: #4a5258;
  max-width: 48ch;
}

.footer-meta {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: #6a7278;
}

/* Modals / overlays */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(44, 51, 56, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.overlay.is-open {
  display: flex;
}

.modal {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.5rem;
  position: relative;
}

.modal h2 {
  font-size: 1.35rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--graphite);
}

.modal .form-grid {
  margin-top: 1rem;
}

.modal-switch {
  margin-top: 1rem;
  font-size: 0.88rem;
}

#age-gate {
  z-index: 100;
}

.age-box,
.cookie-box {
  width: min(440px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

#cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: none;
  justify-content: center;
  pointer-events: none;
}

#cookie-banner.is-open {
  display: flex;
}

#cookie-banner .cookie-box {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  width: min(760px, 100%);
  box-shadow: 0 8px 24px rgba(44, 51, 56, 0.08);
}

#cookie-banner p {
  margin: 0;
  flex: 1 1 280px;
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    gap: 0.65rem;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .auth-bar {
    margin-left: auto;
  }

  .hero,
  .story-block,
  .band,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .spec-row {
    grid-template-columns: auto 64px 1fr;
    grid-template-areas:
      "num logo title"
      "num logo action";
  }

  .spec-num {
    grid-area: num;
  }

  .spec-logo {
    grid-area: logo;
    width: 64px;
    height: 64px;
  }

  .spec-body {
    grid-area: title;
  }

  .spec-action {
    grid-area: action;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .auth-bar .btn {
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
  }

  .brand span {
    font-size: 0.95rem;
  }

  .spec-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "num"
      "logo"
      "title"
      "action";
  }
}
