/* Serial Box Games — see PROJECT-STANDARD.txt */
:root {
  --bg: #000000;
  --red: #cc0000;
  --red-hover: #e60000;
  --white: #ffffff;
  --muted: #b3b3b3;
  --max-width: 1200px;
  --pad: clamp(1rem, 4vw, 2.5rem);
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --radius: 6px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--white);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--red-hover);
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
.site-logo {
  color: var(--red);
  line-height: 1.2;
  margin: 0 0 var(--space-md);
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
}

p {
  margin: 0 0 var(--space-md);
  max-width: 65ch;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Header */
.site-header {
  border-bottom: 1px solid #222;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
}

.site-logo {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  text-decoration: none;
  margin: 0;
  white-space: nowrap;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--red-hover);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--red);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  align-items: center;
}

.main-nav a {
  font-weight: 600;
  padding: 0.35rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.main-nav a[aria-current="page"] {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .main-nav.is-open {
    display: block;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: var(--space-sm);
  }
}

/* Main */
main {
  flex: 1;
}

.section {
  padding: var(--space-xl) 0;
}

.section--tight {
  padding: var(--space-lg) 0;
}

.section-label {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
}

/* Hero */
.hero {
  padding: var(--space-xl) 0;
  text-align: center;
}

.hero p {
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-lg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--red-hover);
  color: var(--white);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red);
}

.btn--outline:hover {
  background: var(--red);
  color: var(--white);
}

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--space-md);
  align-items: stretch;
}

.card {
  border: 1px solid #222;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0a0a0a;
}

.card-image {
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  object-fit: cover;
  width: 100%;
}

.card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body p {
  color: var(--muted);
  flex: 1;
}

.card-body .btn {
  align-self: flex-start;
  margin-top: var(--space-sm);
}

/* Contact — white text only, no red links */
.contact-details,
.contact-details a,
.contact-details p,
.contact-details li {
  color: var(--white);
}

.contact-details a {
  text-decoration: underline;
}

.contact-details a:hover {
  color: var(--white);
  opacity: 0.85;
}

/* Footer */
.site-footer {
  border-top: 1px solid #222;
  padding: var(--space-lg) 0;
  margin-top: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0 auto;
  max-width: none;
}

/* Game detail */
.game-hero-image {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--space-lg);
  background: #1a1a1a;
}

.prose ul {
  padding-left: 1.25rem;
  margin: 0 0 var(--space-md);
}

.prose li {
  margin-bottom: var(--space-sm);
}
