/* ==========================================================================
   Famous Bipolar People — site stylesheet
   Design: "The Gallery of Two Poles"
   Palette
     --ink     #242B3E  deep ink navy (text, header, footer)
     --paper   #FBFAF7  paper white (cards, plates)
     --wall    #F0EEE8  gallery wall (page background)
     --zenith  #C2922F  gold — the manic pole
     --nadir   #56688A  slate blue — the depressive pole
     --muted   #6C6960  secondary text
   Type
     Display: Libre Caslon Display   Body: Source Serif 4   Labels: Archivo
   Signature: the "pole rule" — a hairline that runs gold to slate,
   the two poles of the disorder, used under headings and the masthead.
   ========================================================================== */

:root {
  --ink: #242B3E;
  --ink-soft: #3A415A;
  --paper: #FBFAF7;
  --wall: #F0EEE8;
  --zenith: #C2922F;
  --nadir: #56688A;
  --muted: #6C6960;
  --line: #DDD9CF;
  --display: "Libre Caslon Display", "Georgia", serif;
  --body: "Source Serif 4", "Georgia", serif;
  --label: "Archivo", "Helvetica Neue", sans-serif;
  --measure: 68ch;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--wall);
}

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

a { color: var(--nadir); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--zenith); outline-offset: 2px; }

/* ---- Signature: the pole rule ---- */
.pole-rule {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--zenith), var(--nadir));
}
.pole-rule--short { width: 72px; margin: 0.75rem 0 0; }

/* ---- Layout ---- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

/* ---- Header ---- */
.site-header { background: var(--ink); color: var(--paper); }
.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem;
  padding: 1.4rem 0 1.1rem;
}
.site-title {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  color: var(--paper);
  text-decoration: none;
}
.site-title:hover { color: #fff; }
.site-tag {
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #A9B0C6;
}
.site-header .pole-rule { opacity: 0.9; }

.site-nav { padding: 0.65rem 0 0.9rem; }
.site-nav ul {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 0.1rem 1.4rem;
}
.site-nav a {
  font-family: var(--label);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C9CEDD;
  text-decoration: none;
  padding: 0.25rem 0;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; border-bottom: 2px solid var(--zenith); }

/* ---- Hero (homepage) ---- */
.hero { padding: 3.5rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; color: var(--nadir); }
.hero h1 .hi { color: var(--zenith); font-style: normal; }
.hero .lede { margin-top: 1.25rem; font-size: 1.15rem; color: var(--ink-soft); max-width: 54ch; }
.hero .lede + .lede { margin-top: 0.8rem; }

/* ---- Portrait plates ---- */
.plate {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(36,43,62,0.06), 0 10px 24px -18px rgba(36,43,62,0.35);
  padding: 0.6rem;
}
.plate img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.plate-label {
  font-family: var(--label);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0.55rem 0 0.2rem;
}
.plate-label strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1rem; letter-spacing: 0.02em; text-transform: none; color: var(--ink); margin-bottom: 0.15rem; }

/* Monogram fallback plate (until sketch is wired in) */
.plate-mono {
  width: 100%; aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #F6F4EE 0 10px, #F1EFE8 10px 20px);
  font-family: var(--display);
  font-size: 2.6rem;
  color: var(--nadir);
}

.plate-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.plate-row .plate:nth-child(2) { transform: translateY(1.5rem); }

/* ---- Section headings ---- */
.section { padding: 2.75rem 0; }
.section-head { margin-bottom: 1.6rem; }
.eyebrow {
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--zenith);
}
.section-head h2, .article-body h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.25;
  margin-top: 0.35rem;
}

/* ---- Directory (homepage index of people) ---- */
.directory { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dir-group { padding: 1.9rem 0; border-bottom: 1px solid var(--line); }
.dir-group:last-child { border-bottom: 0; }
.dir-grid { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
.dir-cat h3 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.dir-cat .count { font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.dir-cat a { text-decoration: none; color: var(--ink); }
.dir-cat a:hover { color: var(--nadir); }
.dir-people { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.35rem 1.5rem; }
.dir-people a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid transparent; }
.dir-people a:hover { color: var(--ink); border-bottom-color: var(--zenith); }

/* ---- Featured cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  padding: 0.6rem 0.6rem 0.9rem; text-decoration: none; color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: block;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgba(36,43,62,0.4); color: var(--ink); }
.card .plate-mono, .card img { margin-bottom: 0.7rem; }
.card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.card h3 { font-family: var(--display); font-weight: 400; font-size: 1.15rem; padding: 0 0.3rem; }
.card p { font-size: 0.9rem; color: var(--muted); padding: 0.25rem 0.3rem 0; }

/* ---- Support note ---- */
.support {
  background: var(--ink); color: #E8EAF2;
  padding: 2.5rem 0;
}
.support .inner { max-width: 62ch; }
.support h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: #fff; }
.support p { margin-top: 0.9rem; color: #C9CEDD; }
.support strong { color: var(--zenith); }

/* ---- Article layout ---- */
.breadcrumb { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 1.4rem 0 0; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }

.article-header { padding: 1.2rem 0 0.5rem; }
.article-header h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.15;
  max-width: 22ch;
}
.article-meta { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.8rem; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; padding: 2rem 0 3rem; }

.article-body > p, .article-body > ul, .article-body > ol, .article-body > blockquote { max-width: var(--measure); }
.article-body > p + p { margin-top: 1.1rem; }
.article-body h2 { margin: 2.4rem 0 0.9rem; max-width: 30ch; }
.article-body h2 + p { margin-top: 0; }
.article-body ul, .article-body ol { margin: 1rem 0 1rem 1.4rem; }
.article-body li + li { margin-top: 0.4rem; }
.article-body blockquote {
  margin: 1.6rem 0; padding: 0.4rem 0 0.4rem 1.4rem;
  border-left: 3px solid var(--zenith);
  font-style: italic; font-size: 1.15rem; color: var(--ink-soft);
}
.article-body blockquote cite { display: block; margin-top: 0.5rem; font-style: normal; font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.article-body figure { margin: 2rem 0; }
.article-body figcaption { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 0.6rem; }

/* Quick facts */
.quickfacts {
  background: var(--paper); border: 1px solid var(--line);
  padding: 1.4rem 1.5rem; margin: 1.5rem 0 0;
}
.quickfacts h2 { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--zenith); margin: 0 0 0.8rem; }
.quickfacts dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.2rem; font-size: 0.95rem; }
.quickfacts dt { font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 0.15rem; }
.quickfacts dd { color: var(--ink-soft); }

/* Sidebar */
.sidebar > * + * { margin-top: 2rem; }
.toc { background: var(--paper); border: 1px solid var(--line); padding: 1.2rem 1.3rem; }
.toc h2, .sidebox h2 { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.toc ol { list-style: none; }
.toc li + li { margin-top: 0.45rem; }
.toc a { text-decoration: none; color: var(--ink-soft); font-size: 0.95rem; }
.toc a:hover { color: var(--nadir); }

.sidebox { background: var(--paper); border: 1px solid var(--line); padding: 1.2rem 1.3rem; }
.sidebox ul { list-style: none; }
.sidebox li + li { margin-top: 0.5rem; }
.sidebox a { font-size: 0.95rem; }

/* Recommended reading / affiliate block */
.reading { border-top: 2px solid var(--ink); background: var(--paper); padding: 1.4rem 1.3rem; }
.reading h2 { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--zenith); margin-bottom: 0.9rem; }
.reading-item + .reading-item { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.reading-item h3 { font-family: var(--display); font-weight: 400; font-size: 1.05rem; line-height: 1.35; }
.reading-item p { font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem; }
.reading-item .buy {
  display: inline-block; margin-top: 0.6rem;
  font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper); background: var(--ink);
  padding: 0.5rem 0.9rem; text-decoration: none;
}
.reading-item .buy:hover { background: var(--nadir); color: #fff; }
.affiliate-note { font-size: 0.78rem; color: var(--muted); margin-top: 1.1rem; }

/* FAQ */
.faq details { background: var(--paper); border: 1px solid var(--line); padding: 0.9rem 1.2rem; max-width: var(--measure); }
.faq details + details { margin-top: 0.6rem; }
.faq summary { font-family: var(--display); font-size: 1.05rem; cursor: pointer; }
.faq details p { margin-top: 0.7rem; color: var(--ink-soft); }

/* Sources */
.sources { font-size: 0.88rem; color: var(--muted); max-width: var(--measure); margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.sources h2 { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.6rem; color: var(--muted); }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: #A9B0C6; margin-top: 3rem; }
.site-footer .pole-rule { height: 3px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding: 2rem 0 0.5rem; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; }
.footer-nav a { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: #A9B0C6; text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-note { padding: 1rem 0 2rem; font-size: 0.85rem; }
.footer-note a { color: #C9CEDD; }
.footer-note .disclaimer { font-size: 0.78rem; margin-top: 0.7rem; max-width: 78ch; color: #8790A8; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .plate-row { max-width: 420px; }
  .article-layout { grid-template-columns: 1fr; gap: 2rem; }
  .dir-grid { grid-template-columns: 1fr; gap: 0.8rem; }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .plate-row { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .plate-row .plate:nth-child(2) { transform: translateY(1rem); }
  .quickfacts dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .quickfacts dt { margin-top: 0.6rem; }
}

/* ---- Crisis / support callout inside articles ---- */
.crisis-note {
  background: var(--paper);
  border-left: 3px solid var(--nadir);
  padding: 1rem 1.2rem;
  margin-top: 1.6rem;
  font-size: 0.98rem;
  max-width: var(--measure);
}
.crisis-note strong { color: var(--ink); }
