/* =========================================================
   Stringfellow Hawke — Airwolf Fan Site
   Shared stylesheet
   ========================================================= */

:root {
  --bg:            #070b12;
  --bg-2:          #0c121d;
  --surface:       rgba(18, 26, 40, 0.72);
  --surface-solid: #111a28;
  --border:        rgba(120, 160, 210, 0.18);
  --border-strong: rgba(120, 160, 210, 0.35);
  --text:          #e6ecf3;
  --text-dim:      #a7b4c4;
  --text-faint:    #6f7d8e;
  --accent:        #4ea6ff;
  --accent-soft:   #8fc7ff;
  --accent-glow:   rgba(78, 166, 255, 0.35);
  --danger:        #ff5a5a;
  --maxw:          1120px;
  --radius:        14px;
  --shadow:        0 18px 50px rgba(0, 0, 0, 0.55);
  --font-head:     "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body:     system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(78, 166, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(78, 166, 255, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-soft); }

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

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); text-transform: uppercase; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; color: var(--text-dim); }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #00121f;
  padding: 10px 16px;
  z-index: 200;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ============================ Header / Nav ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 18, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand svg { width: 38px; height: 38px; flex: none; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.05rem;
  line-height: 1;
}
.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--accent-soft);
  text-transform: uppercase;
  margin-top: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(78, 166, 255, 0.10); }
.nav-links a[aria-current="page"] {
  color: var(--accent-soft);
  background: rgba(78, 166, 255, 0.12);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

/* ============================ Hero ============================ */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,11,18,0.35), rgba(7,11,18,0.92));
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(64px, 12vw, 132px);
  max-width: 760px;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent-soft);
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero p.lead { font-size: 1.15rem; color: var(--text); max-width: 60ch; }

/* ============================ Buttons ============================ */
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), #2c7fd6);
  color: #00121f;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px var(--accent-glow); }
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(78,166,255,0.10); transform: translateY(-2px); }

/* ============================ Sections ============================ */
.section { padding-block: clamp(48px, 8vw, 86px); }
.section-head { max-width: 70ch; margin-bottom: 34px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-alt { background: rgba(255,255,255,0.015); border-block: 1px solid var(--border); }

.lede { font-size: 1.12rem; color: var(--text); }

/* ============================ Cards / Grid ============================ */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.card h3 { color: var(--text); margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 46px; height: 46px; color: var(--accent); margin-bottom: 14px; }

a.card { text-decoration: none; display: block; }
a.card h3 { display: flex; align-items: center; gap: 8px; }
a.card .more { color: var(--accent-soft); font-size: 0.9rem; font-weight: 600; }

/* Character cards */
.char-card { text-align: center; }
.char-portrait {
  width: 110px; height: 110px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: radial-gradient(circle at 50% 35%, #1b283a, #0b1320);
  display: grid; place-items: center;
}
.char-portrait svg { width: 64px; height: 64px; color: var(--accent-soft); }
.char-card .role {
  font-family: var(--font-head);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--accent-soft);
}
.char-card .actor { color: var(--text-faint); font-size: 0.85rem; font-style: italic; }

/* ============================ Spec list ============================ */
.specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--border); border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; }
.specs li { display: flex; justify-content: space-between; gap: 18px; background: var(--surface-solid); padding: 14px 20px; }
.specs dt, .specs .k { color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }
.specs .v { color: var(--text); font-weight: 600; text-align: right; }

/* ============================ Episodes table ============================ */
.season-block { margin-bottom: 42px; }
.season-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.season-head h3 { margin: 0; color: var(--text); }
.season-head .meta { color: var(--text-faint); font-size: 0.9rem; }

.ep-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.ep-table caption { text-align: left; color: var(--text-faint); padding-bottom: 8px; font-size: 0.85rem; }
.ep-table th, .ep-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ep-table thead th { color: var(--accent-soft); font-family: var(--font-head); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.ep-table tbody tr:hover { background: rgba(78,166,255,0.05); }
.ep-table td:first-child { color: var(--text-faint); white-space: nowrap; }
.ep-table td.ep-title { color: var(--text); font-weight: 600; }
.ep-table td.ep-syn { color: var(--text-dim); }
.ep-table td.ep-tx { white-space: nowrap; }
.ep-table td.ep-tx a { color: var(--accent-soft); text-decoration: none; font-size: 0.85rem; }
.ep-table td.ep-tx a:hover { text-decoration: underline; }

/* Season jump navigation */
.season-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 38px; }
.season-nav a {
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 16px;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.season-nav a:hover { color: var(--accent-soft); background: rgba(78,166,255,0.10); border-color: var(--accent); }
.season-block { scroll-margin-top: 90px; }

/* ============================ Gallery ============================ */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-solid);
}
.gallery-item svg { width: 100%; height: 100%; }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, transparent, rgba(7,11,18,0.9));
  font-size: 0.85rem;
  color: var(--text);
}

/* ============================ Forms ============================ */
.form { display: grid; gap: 16px; max-width: 560px; }
.form label { font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint); display: block; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form textarea { min-height: 140px; resize: vertical; }

/* ============================ Callout ============================ */
.callout {
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 10px;
  padding: 20px 24px;
}
.callout p:last-child { margin-bottom: 0; }

/* ============================ Breadcrumb ============================ */
.breadcrumb { padding-top: 18px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; font-size: 0.85rem; color: var(--text-faint); }
.breadcrumb li::after { content: "›"; margin-left: 8px; color: var(--text-faint); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-soft); }

/* ============================ Footer ============================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 13, 0.7);
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-block: 48px 28px;
}
.footer-grid h4 { color: var(--text); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent-soft); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 20px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.disclaimer { font-size: 0.82rem; color: var(--text-faint); max-width: 46ch; }

/* ============================ Utilities ============================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--text-faint); }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
  border: 1px solid var(--border-strong);
  padding: 3px 10px;
  border-radius: 999px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ============================ Responsive ============================ */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .brand { min-width: 0; gap: 10px; }
  .brand svg { width: 32px; height: 32px; }
  .brand-name { font-size: 0.92rem; letter-spacing: 0.06em; }
  .brand-sub { letter-spacing: 0.16em; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 8px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .specs li { flex-direction: column; gap: 2px; }
  .specs .v { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ============================ Episode title / season links ============================ */
.ep-table td.ep-title a { color: var(--text); text-decoration: none; }
.ep-table td.ep-title a:hover { color: var(--accent-soft); text-decoration: underline; }
.season-head h2 a { color: inherit; text-decoration: none; }
.season-head h2 a:hover { color: var(--accent-soft); }
.char-card h3 a { color: var(--text); text-decoration: none; }
.char-card h3 a:hover { color: var(--accent-soft); }
.character .specs .v a, .specs .v a { color: var(--accent-soft); }

/* ============================ Episode tools: search + watchlist ============================ */
.ep-tools {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  align-items: end;
  margin-bottom: 28px;
}
.ep-search input[type="search"] {
  width: 100%;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
}
.ep-search input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.ep-search-status { font-size: 0.85rem; color: var(--text-faint); margin: 8px 0 0; min-height: 1em; }

.watch-progress { align-self: end; }
.watch-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  overflow: hidden;
}
.watch-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width .25s ease;
}
.watch-text { font-size: 0.88rem; color: var(--text-dim); margin: 8px 0 0; }
.watch-reset {
  background: none; border: 0; color: var(--accent-soft);
  cursor: pointer; font: inherit; padding: 0; text-decoration: underline;
}

/* Watchlist checkbox column */
.ep-seen-col { width: 34px; text-align: center; }
.ep-table .ep-seen { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.ep-table tr.is-watched td.ep-title a { color: var(--text-faint); }
.ep-table tr.is-watched td.ep-title a::after { content: " ✓"; color: var(--accent); }

.ep-noresults { color: var(--text-dim); font-style: italic; padding: 10px 0; }

/* ============================ Episode pager (prev / next) ============================ */
.ep-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 44px;
}
.ep-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.ep-pager-link:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.ep-pager-link.next { text-align: right; }
.ep-pager-dir { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-soft); }
.ep-pager-title { color: var(--text); font-weight: 600; }

.ep-watch-toggle[aria-pressed="true"] {
  background: rgba(78,166,255,0.16);
  border-color: var(--accent);
  color: var(--accent-soft);
}

/* ============================ Form notices + honeypot ============================ */
.notice { border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; border: 1px solid var(--border-strong); }
.notice ul { margin: 0; padding-left: 20px; }
.notice-ok { border-color: rgba(78,200,120,0.5); background: rgba(78,200,120,0.10); color: #b9f0cf; }
.notice-bad { border-color: rgba(255,90,90,0.5); background: rgba(255,90,90,0.10); color: #ffc9c9; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 760px) {
  .ep-tools { grid-template-columns: 1fr; }
  .ep-pager { grid-template-columns: 1fr; }
  .ep-pager-link.next { text-align: left; }
}
