/* ===== Design tokens ===== */
:root {
  --ink: #170D26;
  --ink-soft: #1F1330;
  --purple: #3D2461;
  --purple-soft: #4E3178;
  --gold: #C9A24B;
  --gold-bright: #E4C273;
  --crimson: #8C2F39;
  --crimson-bright: #B14552;
  --parchment: #F3EDE1;
  --mist: #B7A9CC;
  --mist-dim: #8779A3;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 10px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.5em;
  line-height: 1.15;
}

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(23, 13, 38, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(201, 162, 75, 0.18);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--parchment);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.logo span { color: var(--gold-bright); }

.site-nav {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--mist);
  transition: color 0.15s ease;
}

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

.nav-toggle { display: none; }

@media (max-width: 720px) {
  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    background: var(--ink);
    flex-direction: column;
    padding: 28px 24px;
    gap: 20px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-16px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }
  .site-nav.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--mist-dim);
    color: var(--parchment);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: var(--font-mono);
  }
}

/* ===== Hero ===== */
.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(ellipse at top right, rgba(201, 162, 75, 0.14), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(140, 47, 57, 0.16), transparent 55%);
  border-bottom: 1px solid rgba(201, 162, 75, 0.12);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 14ch;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--mist);
  max-width: 56ch;
}

/* ===== House doorways ===== */
.houses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
}

@media (max-width: 720px) {
  .houses { grid-template-columns: 1fr; }
}

.house-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(243, 237, 225, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.house-card:hover { transform: translateY(-3px); }

.house-card.gold {
  background: linear-gradient(160deg, rgba(201, 162, 75, 0.14), transparent);
}
.house-card.gold:hover { border-color: var(--gold); }

.house-card.crimson {
  background: linear-gradient(160deg, rgba(140, 47, 57, 0.18), transparent);
}
.house-card.crimson:hover { border-color: var(--crimson-bright); }

.house-card .eyebrow { margin-bottom: 6px; }
.house-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.house-card p { color: var(--mist); margin-bottom: 0; font-size: 0.95rem; }

/* ===== Section headers ===== */
.section {
  padding: 64px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-head h2 { font-size: 1.7rem; margin: 0; }

.section-head .link-more {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold-bright);
  text-decoration: none;
}

/* ===== Show grid / cards ===== */
.show-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .show-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .show-grid { grid-template-columns: 1fr; }
}

.show-card {
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-soft);
  border: 1px solid rgba(243, 237, 225, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.show-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 75, 0.4);
}

.show-card .cover {
  aspect-ratio: 1 / 1;
  background: var(--purple) center/cover no-repeat;
  position: relative;
}

.show-card .status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(23, 13, 38, 0.82);
  border: 1px solid rgba(243, 237, 225, 0.25);
  border-radius: 100px;
  padding: 3px 10px;
}

.show-card .card-body { padding: 16px 18px 20px; }
.show-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.show-card .subtitle {
  font-size: 0.82rem;
  color: var(--mist);
  margin-bottom: 10px;
}
.show-card .blurb {
  font-size: 0.86rem;
  color: var(--mist);
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Session log (signature element) ===== */
.session-log {
  background: var(--ink-soft);
  border-top: 1px solid rgba(201, 162, 75, 0.15);
  border-bottom: 1px solid rgba(201, 162, 75, 0.15);
  padding: 40px 0;
}

.session-log .eyebrow { margin-bottom: 14px; }

.session-log ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--mist);
}

.session-log li {
  padding: 8px 0;
  border-top: 1px dashed rgba(183, 169, 204, 0.2);
}
.session-log li:first-child { border-top: none; }

.session-log li::before {
  content: "> ";
  color: var(--gold-bright);
}

.session-log .cta {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

/* ===== Show detail page ===== */
.show-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(243, 237, 225, 0.1);
}

.show-hero .eyebrow { margin-bottom: 10px; }
.show-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.show-hero .meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--mist);
  margin-top: 8px;
}

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 100px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
  margin-top: 20px;
  transition: background 0.15s ease;
}
.button:hover { background: var(--gold-bright); }

.button.secondary {
  background: transparent;
  border: 1px solid var(--mist-dim);
  color: var(--parchment);
  margin-left: 10px;
}
.button.secondary:hover { border-color: var(--gold); }

.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.platform-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mist);
  text-decoration: none;
  border: 1px solid rgba(183, 169, 204, 0.3);
  border-radius: 100px;
  padding: 6px 14px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.platform-link:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
}

.player-sticky-wrap {
  position: sticky;
  top: 72px;
  z-index: 15;
  background: var(--ink);
  padding: 16px 0;
  margin: 20px 0 4px;
  border-bottom: 1px solid rgba(201, 162, 75, 0.15);
}

/* ===== House theming for show pages =====
   Gold = Dumbgeons & Dragons, Crimson = Facing Fate. Applies only within
   an individual show page (wrapped by .show-theme-gold / .show-theme-crimson
   in show.html) — site-wide chrome (nav, footer, homepage) stays neutral
   gold as the default brand accent regardless of which show you're on. */

.show-theme-crimson .button {
  background: var(--crimson-bright);
  color: var(--parchment);
}
.show-theme-crimson .button:hover {
  background: var(--crimson);
}
.show-theme-crimson .button.secondary:hover {
  border-color: var(--crimson-bright);
}
.show-theme-crimson .platform-link:hover {
  color: var(--crimson-bright);
  border-color: var(--crimson-bright);
}
.show-theme-crimson .character-card .token {
  border-color: rgba(177, 69, 82, 0.4);
}
.show-theme-crimson .player-sticky-wrap {
  border-bottom-color: rgba(177, 69, 82, 0.2);
}
.show-theme-crimson .credits a {
  color: var(--crimson-bright);
}

.show-body {
  padding: 48px 0;
  max-width: 68ch;
}
.show-body p { color: var(--mist); }

.credits {
  font-size: 0.85rem;
  color: var(--mist-dim);
  margin-top: 24px;
}
.credits a { color: var(--mist); }

/* ===== Character grid ===== */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  padding-bottom: 64px;
}

.character-card { text-align: left; }

.character-card .token {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 100px;
  background: var(--purple) center/cover no-repeat;
  border: 2px solid rgba(201, 162, 75, 0.3);
  margin-bottom: 14px;
}

.character-card h4 { font-size: 1.05rem; margin-bottom: 2px; }
.character-card .player {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-bright);
  margin-bottom: 8px;
  display: block;
}
.character-card .bio {
  font-size: 0.85rem;
  color: var(--mist);
}
.character-card .goal {
  font-size: 0.8rem;
  color: var(--mist-dim);
  font-style: italic;
  margin-top: 8px;
}

/* ===== Fan art gallery ===== */
.fanart-grid {
  columns: 3 260px;
  column-gap: 20px;
}

@media (max-width: 700px) {
  .fanart-grid { columns: 2 160px; }
}

.fanart-item {
  break-inside: avoid;
  margin-bottom: 20px;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-soft);
  border: 1px solid rgba(243, 237, 225, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.fanart-item:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 162, 75, 0.4);
}

.fanart-item img {
  width: 100%;
  display: block;
}

.fanart-credit {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mist);
}

.fanart-credit a {
  color: var(--gold-bright);
  text-decoration: none;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(23, 13, 38, 0.94);
  z-index: 100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  cursor: default;
}

.lightbox-credit {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--parchment);
  cursor: default;
}

.lightbox-credit a { color: var(--gold-bright); }

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--parchment);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid rgba(243, 237, 225, 0.1);
  padding: 48px 0;
  font-size: 0.85rem;
  color: var(--mist-dim);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a { text-decoration: none; color: var(--mist-dim); }
.footer-links a:hover { color: var(--gold-bright); }

.footer-note {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--mist-dim);
  opacity: 0.7;
}

/* ===== Utility ===== */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
