/* Anime Lab — hub chrome.
   Only the landing and franchise pages use this. Each scene keeps its own
   styling entirely; the hub deliberately does not try to unify thirteen
   different art directions, it just frames them.

   Dark and restrained on purpose: every scene behind these cards is loud, so
   the shell around them should not compete. Colour arrives only through
   --accent, set per franchise. */

:root {
  --bg: #0a0a0c;
  --bg-raised: #131317;
  --line: #24242c;
  --text: #f2f2f4;
  --text-dim: #a0a0ad;
  --accent: #7a63c9;
  --radius: 14px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* ---------- hero ---------- */

.ah-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 24px 56px;
  text-align: center;
}

.ah-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.ah-eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.ah-eyebrow a {
  text-decoration: none;
}

.ah-eyebrow a:hover {
  color: var(--text);
}

.ah-tagline {
  margin: 0 auto 20px;
  max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  color: var(--text-dim);
}

.ah-meta {
  margin: 6px 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.ah-meta a {
  color: var(--text);
  text-decoration-color: color-mix(in srgb, var(--text) 40%, transparent);
  text-underline-offset: 3px;
}

.ah-hero-sub {
  padding: 72px 24px 40px;
  border-bottom: 1px solid var(--line);
}

.ah-hero-sub h1 {
  color: var(--accent);
}

/* ---------- franchise sections ---------- */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.ah-franchise {
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.ah-franchise:first-child {
  border-top: 0;
}

.ah-franchise-head h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  /* The one place the franchise colour carries meaning rather than decoration. */
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.ah-franchise-head p {
  margin: 0 0 26px 16px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ---------- cards ---------- */

.ah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 20px;
}

.ah-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.ah-card:hover,
.ah-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.ah-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ah-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.ah-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Dimmed at rest so the card grid reads as a set rather than thirteen
     competing posters; full colour on hover rewards the intent to click. */
  filter: saturate(0.82) brightness(0.78);
  transition: filter 0.25s ease, transform 0.4s ease;
}

.ah-card:hover .ah-card-media img,
.ah-card:focus-visible .ah-card-media img {
  filter: none;
  transform: scale(1.04);
}

.ah-card-body {
  display: block;
  padding: 14px 16px 16px;
}

.ah-card-title {
  display: block;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.ah-card-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.86rem;
  color: var(--accent);
  font-weight: 600;
}

.ah-card-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ---------- footer ---------- */

.ah-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 24px 64px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.84rem;
  text-align: center;
}

.ah-footer p {
  margin: 6px 0;
}

@media (prefers-reduced-motion: reduce) {
  .ah-card,
  .ah-card-media img {
    transition: none;
  }
  .ah-card:hover,
  .ah-card:focus-visible {
    transform: none;
  }
  .ah-card:hover .ah-card-media img {
    transform: none;
  }
}

@media (max-width: 560px) {
  .ah-hero {
    padding: 64px 20px 40px;
  }
  .ah-grid {
    grid-template-columns: 1fr;
  }
}
