/*
 * ============================================================
 *  DOCTOR WHO ARCHIVE — Shared Design System
 *  style.css
 *
 *  Link this sheet from every page in the archive:
 *    <link rel="stylesheet" href="style.css">
 *
 *  Also link the Google Fonts at the top of every <head>:
 *    <link href="https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Rajdhani:wght@400;600;700&family=Share+Tech+Mono&display=swap" rel="stylesheet">
 *
 *  Page-specific styles (timeline layout, card components,
 *  etc.) belong in a <style> block or separate .css file
 *  for that page only.
 * ============================================================
 */


/* ── RESET ──────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }


/* ── DESIGN TOKENS ───────────────────────────────────────
 *
 *  Palette roles:
 *    --bg       Page background (warm parchment)
 *    --surface  Slightly darker surface for cards / panels
 *    --border   Subtle warm border / rule colour
 *    --accent   Primary accent — deep teal blue
 *    --gold     Secondary accent — antique gold
 *    --text     Body text — near-black warm brown
 *    --dim      De-emphasised text — medium warm brown
 *    --muted    Placeholder / metadata text — light warm brown
 *    --line     Timeline / divider line colour (= --border)
 *
 *  Typeface roles:
 *    'Crimson Pro'     Body copy, running text, card prose
 *    'Rajdhani'        Display headings, actor names, h1/h2
 *    'Share Tech Mono' Labels, dates, metadata, UI chrome
 * ──────────────────────────────────────────────────────── */

:root {
  --bg:      #f7f3ec;
  --surface: #ede7da;
  --border:  #c8b898;
  --accent:  #1a5a7a;
  --gold:    #8a6a30;
  --text:    #1c1810;
  --dim:     #5a4a38;
  --muted:   #8a7a68;
  --line:    #c8b898;
}


/* ── BASE ────────────────────────────────────────────────── */

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle parchment noise texture — fixed so it doesn't scroll */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Warm gold vignette at the top of the page */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(180,140,80,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}


/* ── LAYOUT WRAPPER ──────────────────────────────────────── */

/*
 *  Every page content sits inside a .wrapper div.
 *  All content must be position: relative; z-index: 1
 *  or higher to sit above the body texture/vignette layers.
 */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 100px;
}


/* ── HEADER ──────────────────────────────────────────────── */

header {
  text-align: center;
  padding: 68px 0 52px;
  border-bottom: 1px solid rgba(100,70,30,0.2);
  margin-bottom: 16px;
}

/* Small monospace label above the main title */
.eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  opacity: 0.7;
}

/* Main page title — use Rajdhani display weight */
h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 6px;
}

/* Subtitle line beneath h1 */
.title-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(15px, 2.5vw, 22px);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Decorative gold gradient rule — use between title and intro */
.header-rule {
  width: 160px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 22px;
}

/* Italic introductory paragraph below the header rule */
.intro {
  font-size: 17px;
  color: var(--dim);
  max-width: 540px;
  margin: 0 auto;
  font-style: italic;
  line-height: 1.75;
}


/* ── SECTION HEADINGS ────────────────────────────────────── */

h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 18px;
}


/* ── FILTER TABS ─────────────────────────────────────────── */

/*
 *  Generic pill-button tab row.
 *  Usage:
 *    <div class="filter-tabs">
 *      <button class="filter-tab active" onclick="...">All</button>
 *      <button class="filter-tab" onclick="...">Classic</button>
 *    </div>
 */
.filter-tabs,
.era-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 36px 0 20px;
}

.filter-tab,
.era-tab {
  padding: 7px 20px;
  border-radius: 18px;
  border: 1px solid rgba(100,70,30,0.25);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
}

.filter-tab:hover,
.era-tab:hover {
  border-color: rgba(26,90,122,0.45);
  color: var(--accent);
}

.filter-tab.active,
.era-tab.active {
  border-color: var(--accent);
  background: rgba(26,90,122,0.08);
  color: var(--accent);
}


/* ── LEGEND ──────────────────────────────────────────────── */

/*
 *  Colour-keyed legend row.
 *  Usage:
 *    <div class="legend">
 *      <div class="legend-item">
 *        <div class="legend-dot" style="background:#7a6a40;"></div>
 *        Classic Era (1963–1989)
 *      </div>
 *    </div>
 */
.legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 52px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(100,70,30,0.12);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ── SURFACE PANEL ───────────────────────────────────────── */

/*
 *  A bordered, rounded content panel on the surface colour.
 *  Used for the showrunner strip and any other boxed sections.
 *  Usage:
 *    <div class="panel">
 *      <h2>Section Title</h2>
 *      ...
 *    </div>
 */
.panel {
  margin: 52px 0 0;
  padding: 28px 32px;
  border: 1px solid rgba(100,70,30,0.18);
  border-radius: 10px;
  background: rgba(237,231,218,0.7);
}

/*
 *  Keep .showrunner-strip as an alias so the existing
 *  timeline page continues to work without changes.
 */
.showrunner-strip {
  margin: 52px 0 0;
  padding: 28px 32px;
  border: 1px solid rgba(100,70,30,0.18);
  border-radius: 10px;
  background: rgba(237,231,218,0.7);
}

.showrunner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.showrunner-item {
  border-left: 2px solid;
  padding-left: 12px;
}

.showrunner-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.showrunner-years {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--dim);
  margin-bottom: 3px;
}

.showrunner-desc {
  font-size: 13px;
  color: #506070;
  font-style: italic;
  line-height: 1.5;
}


/* ── FOOTER ──────────────────────────────────────────────── */

footer {
  text-align: center;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(100,70,30,0.12);
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  opacity: 0.6;
}

footer a:hover { opacity: 1; }


/* ── UTILITY: HIDDEN ─────────────────────────────────────── */

.hidden { display: none; }


/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .wrapper {
    padding: 0 16px 60px;
  }

  header {
    padding: 44px 0 36px;
  }

  .panel,
  .showrunner-strip {
    padding: 20px 18px;
  }
}
