/* ============================================================
   WAR AND LOVE — Shared Design System (sub-pages)
   Palette: Prussian Blue · Candlelight Gold · Iron Grey · Parchment · Midnight
   Typography: Cormorant Garamond (display) · Cinzel (label) · Lora (body)
   Usage: linked from /world/, /pitch/, /heritage/, /author/ etc.
============================================================ */

/* --- Tokens --- */
:root {
  --midnight:        #07090f;
  --midnight-2:      #0a0d15;
  --prussian:        #0f1e38;
  --prussian-mid:    #16284a;
  --prussian-deep:   #0a1428;
  --atlantic:        #1c3a5e;
  --gold:            #c9a84c;
  --gold-light:      #e8c97a;
  --gold-soft:       #b8954a;
  --gold-dim:        #8a6f2c;
  --iron:            #5a5f6e;
  --iron-light:      #8a909e;
  --parchment:       #f5e6c8;
  --parchment-warm:  #ead9b6;
  --parchment-dim:   #c8b890;
  --blood:           #6e1a1a;
  --ember:           #b45a1c;
  --ff-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --ff-label:   'Cinzel', 'Trajan Pro', serif;
  --ff-body:    'Lora', Georgia, serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--midnight);
  color: var(--parchment);
  font-family: var(--ff-body);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* --- Typography utilities --- */
.label {
  font-family: var(--ff-label);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--gold-soft);
  font-weight: 500;
}
.eyebrow {
  font-family: var(--ff-label);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--gold-dim);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.display {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.05;
}
.body-serif {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--parchment-warm);
}

/* --- Filigree separator --- */
.filigree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 360px;
  margin: 0 auto;
}
.filigree-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.5));
}
.filigree-line.right {
  background: linear-gradient(to left, transparent, rgba(201,168,76,0.5));
}
.filigree-mark {
  width: 8px; height: 8px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
  flex-shrink: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--ff-label);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.4rem;
  cursor: pointer;
  border: none;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease,
              border-color 0.3s ease, box-shadow 0.4s ease;
  font-weight: 600;
}
.btn-primary {
  background: var(--gold);
  color: var(--midnight);
  box-shadow: 0 0 0 1px var(--gold), 0 0 30px -10px rgba(201,168,76,0.5);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--gold-light), 0 8px 30px -8px rgba(201,168,76,0.7);
}
.btn-ghost {
  background: transparent;
  color: var(--parchment);
  border: 1px solid rgba(201,168,76,0.45);
}
.btn-ghost:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}
.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.68rem;
}

/* ============================================================
   NAV  (always-solid on sub-pages — no scroll transition)
============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(7,9,15,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.18);
}
.nav-logo {
  font-family: var(--ff-label);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--parchment);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.nav-logo .amp {
  color: var(--gold);
  font-style: italic;
  font-family: var(--ff-display);
  font-weight: 400;
  letter-spacing: 0;
}
.nav-logo-mark {
  width: 22px; height: 22px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  position: relative;
  flex-shrink: 0;
}
.nav-logo-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--gold);
  opacity: 0.5;
}
.nav-links {
  display: flex;
  gap: 2.4rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-family: var(--ff-label);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  color: var(--parchment-dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover  { color: var(--gold-light); }
.nav-links a.active { color: var(--gold); }
.nav-cta a {
  color: var(--gold) !important;
  border: 1px solid rgba(201,168,76,0.45);
  padding: 0.55rem 1.1rem;
}
.nav-cta a:hover {
  background: var(--gold);
  color: var(--midnight) !important;
}

/* ============================================================
   PAGE HERO  (sub-page header — not full-screen)
============================================================ */
.page-hero {
  padding: 9rem 2.4rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(15,30,56,0.65) 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(7,9,15,0.97) 0%, rgba(7,9,15,0.5) 100%);
  pointer-events: none;
}
.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.page-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.015em;
  margin: 0.8rem 0 0.4rem;
}
.page-hero h1 .amp {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}
.page-hero .hero-subtitle {
  font-family: var(--ff-body);
  font-size: 1.05rem;
  color: var(--parchment-warm);
  line-height: 1.75;
  margin: 1.2rem 0 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.page-hero .hero-years {
  font-family: var(--ff-label);
  font-size: 0.78rem;
  letter-spacing: 0.38em;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 1.2rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-family: var(--ff-label);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--iron-light);
  margin-bottom: 1.2rem;
}
.breadcrumb a {
  color: var(--iron-light);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { margin: 0 0.6em; color: var(--gold-dim); }

/* ============================================================
   ARC SUB-NAV  (within /world/arc-N/ pages)
============================================================ */
.arc-subnav {
  background: var(--midnight-2);
  border-bottom: 1px solid rgba(201,168,76,0.14);
  position: sticky;
  top: 70px;
  z-index: 80;
}
.arc-subnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.4rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.arc-subnav-inner::-webkit-scrollbar { display: none; }
.arc-subnav-inner a {
  font-family: var(--ff-label);
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--iron-light);
  text-decoration: none;
  padding: 1rem 1.4rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.arc-subnav-inner a:hover  { color: var(--gold-light); }
.arc-subnav-inner a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ============================================================
   SECTION WRAPPER
============================================================ */
.section {
  padding: 5rem 2.4rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-sm {
  padding: 3.5rem 2.4rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.section-subtitle {
  font-family: var(--ff-body);
  font-size: 0.97rem;
  color: var(--parchment-warm);
  margin-bottom: 2.5rem;
  max-width: 680px;
}

/* --- Divider bands --- */
.band { background: rgba(10,13,21,0.6); border-top: 1px solid rgba(201,168,76,0.08); }
.band-raised { background: rgba(15,30,56,0.3); border-top: 1px solid rgba(201,168,76,0.1); }

/* ============================================================
   CONTENT CARDS  (generic card grid)
============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.15);
  margin-top: 2rem;
}
.card {
  background: var(--midnight-2);
  padding: 2rem 1.8rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.3s;
  display: block;
  position: relative;
}
.card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.card:hover { background: var(--prussian-deep); }
.card:hover::after { transform: scaleX(1); }
.card-label {
  font-family: var(--ff-label);
  font-size: 0.58rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.6rem;
}
.card-title {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: 0.3rem;
  line-height: 1.2;
}
.card-subtitle {
  font-family: var(--ff-label);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.card-body {
  font-family: var(--ff-body);
  font-size: 0.87rem;
  color: var(--iron-light);
  line-height: 1.7;
}
.card-arrow {
  margin-top: 1rem;
  font-family: var(--ff-label);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* --- Entry list (people, settings in detail) --- */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.entry {
  padding: 2.2rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.1);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.entry:last-child { border-bottom: none; }
.entry-label-col {
  padding-top: 0.15rem;
}
.entry-name {
  font-family: var(--ff-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: 0.25rem;
  line-height: 1.1;
}
.entry-tag {
  font-family: var(--ff-label);
  font-size: 0.58rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.entry-body {
  font-family: var(--ff-body);
  font-size: 0.94rem;
  color: var(--parchment-warm);
  line-height: 1.85;
}
.entry-body p + p { margin-top: 0.8rem; }
.entry-note {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--iron-light);
}

/* --- Section category header --- */
.cat-header {
  padding: 1.5rem 0 0.8rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  margin-top: 3rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.cat-header:first-of-type { margin-top: 0; }
.cat-header h3 {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 700;
}
.cat-header .cat-count {
  font-family: var(--ff-label);
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  color: var(--gold-dim);
  text-transform: uppercase;
}

/* --- Coming-soon notice --- */
.coming-notice {
  padding: 4rem 2rem;
  text-align: center;
  border: 1px solid rgba(201,168,76,0.12);
  background: rgba(10,13,21,0.5);
  margin: 2rem 0;
}
.coming-notice .icon { font-size: 2rem; margin-bottom: 1rem; }
.coming-notice h3 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.coming-notice p {
  font-family: var(--ff-body);
  font-size: 0.9rem;
  color: var(--iron-light);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   FOOTER
============================================================ */
footer {
  border-top: 1px solid rgba(201,168,76,0.12);
  padding: 2rem 2.4rem;
  text-align: center;
}
.footer-text {
  font-family: var(--ff-label);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--iron);
  text-transform: uppercase;
}
.footer-text a {
  color: var(--iron-light);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-text a:hover { color: var(--gold); }

/* ============================================================
   SPOILER SYSTEM
   Blood-red accent distinguishes spoiler UI from gold design language.
   Controlled by JS: localStorage key "wl-spoilers" = "on" | "off"
============================================================ */

/* Global toggle bar — sits above entry lists on reader pages */
.spoiler-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.2rem;
  background: rgba(110,26,26,0.12);
  border: 1px solid rgba(110,26,26,0.25);
  border-left: 3px solid var(--blood);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.spoiler-toggle-info {
  font-family: var(--ff-label);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--iron-light);
}
.spoiler-toggle-info strong {
  color: var(--parchment-dim);
  font-weight: 500;
}
.spoiler-global-btn {
  font-family: var(--ff-label);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: transparent;
  color: var(--iron-light);
  border: 1px solid rgba(110,26,26,0.4);
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: all 0.22s;
  white-space: nowrap;
  flex-shrink: 0;
}
.spoiler-global-btn:hover          { background: rgba(110,26,26,0.18); color: var(--parchment); }
.spoiler-global-btn.spoilers-on    { background: rgba(110,26,26,0.28); color: var(--parchment); border-color: var(--blood); }

/* Spoiler section within an entry */
.entry-spoiler-section {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(110,26,26,0.2);
}
.spoiler-label-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.spoiler-badge {
  font-family: var(--ff-label);
  font-size: 0.54rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: #c07070;
  background: rgba(110,26,26,0.18);
  border: 1px solid rgba(110,26,26,0.35);
  padding: 0.22rem 0.65rem;
  flex-shrink: 0;
}
.spoiler-hint {
  font-family: var(--ff-body);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--iron);
}

/* The hidden content block */
.spoiler-content {
  /* shown/hidden by JS */
}
.spoiler-content[hidden] { display: none !important; }
.spoiler-content p,
.spoiler-content blockquote {
  font-family: var(--ff-body);
  font-size: 0.94rem;
  color: var(--parchment-warm);
  line-height: 1.85;
  margin-bottom: 0.85rem;
}
.spoiler-content p.entry-note {
  font-size: 0.84rem;
  font-style: italic;
  color: var(--iron-light);
}
.spoiler-content .pull-quote {
  border-left: 2px solid rgba(110,26,26,0.6);
  padding-left: 1.1rem;
  margin: 0.8rem 0 1rem;
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--parchment);
  line-height: 1.5;
}
.spoiler-content .pull-quote cite {
  display: block;
  font-family: var(--ff-label);
  font-size: 0.56rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--iron);
  margin-top: 0.45rem;
  font-style: normal;
}

/* Per-entry reveal button (appears when spoilers globally off) */
.spoiler-reveal-btn {
  font-family: var(--ff-label);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: transparent;
  color: var(--iron);
  border: 1px solid rgba(110,26,26,0.28);
  padding: 0.38rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.spoiler-reveal-btn:hover {
  color: var(--parchment-dim);
  border-color: rgba(110,26,26,0.55);
  background: rgba(110,26,26,0.1);
}
/* hide per-entry button when global spoilers are on */
body.spoilers-enabled .spoiler-reveal-btn { display: none; }

/* ============================================================
   MOBILE
============================================================ */
@media (max-width: 768px) {
  nav { padding: 1rem 1.4rem; }
  .nav-links li:not(.nav-cta) { display: none; }
  .page-hero { padding: 7.5rem 1.4rem 3.5rem; }
  .section { padding: 3rem 1.4rem; }
  .section-sm { padding: 2.5rem 1.4rem; }
  .arc-subnav-inner { padding: 0 1.4rem; }
  .entry {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}
