/* === Eterna Femme — Research Library Page === */
/* Dark copper/charcoal treatment. Research cards are restrained and readable. */
/* Design tokens aligned with klow-science.css and quiz.css. */

:root {
  --ev-bg: #140F0A;
  --ev-surface: #1E1814;
  --ev-surface-alt: #1A1410;
  --ev-copper: #B87333;
  --ev-copper-light: #C9A96E;
  --ev-copper-muted: rgba(184, 115, 51, 0.12);
  --ev-text: #FAF7F4;
  --ev-text-secondary: rgba(250, 247, 244, 0.60);
  --ev-text-tertiary: rgba(250, 247, 244, 0.38);
  --ev-border: rgba(184, 115, 51, 0.18);
  --ev-border-hover: rgba(184, 115, 51, 0.38);
  --ev-section-pad: clamp(60px, 8vw, 100px);
}

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

/* ─── Base ─── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--ev-bg);
  color: var(--ev-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav (override main.css) ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(20, 15, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 115, 51, 0.15);
  padding: 0 clamp(20px, 5vw, 60px);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem; color: #FAF7F4; letter-spacing: 0.03em;
  text-decoration: none;
}
.nav-links { display: flex; align-items: center; list-style: none; gap: 2rem; }
.nav-links a {
  font-size: 0.82rem; font-weight: 500; color: rgba(250, 247, 244, 0.65);
  text-decoration: none; letter-spacing: 0.02em; transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.nav-active { color: var(--ev-copper-light); }
.nav-cta {
  background: var(--ev-copper) !important; color: #fff !important;
  padding: 9px 18px; border-radius: 4px; font-size: 0.82rem !important;
  font-weight: 600 !important; transition: background 0.2s;
}
.nav-cta:hover { background: #9A6028 !important; color: #fff !important; }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); background: rgba(20, 15, 10, 0.97);
  border: 1px solid var(--ev-border); border-radius: 8px;
  padding: 12px 0; min-width: 200px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li a {
  display: block; padding: 8px 20px; font-size: 0.82rem; font-weight: 400;
  color: rgba(250, 247, 244, 0.72); white-space: nowrap;
}
.nav-dropdown-menu li a:hover { color: var(--ev-copper-light); background: rgba(184,115,51,0.08); }

/* ─── Hero ─── */
.ev-hero {
  min-height: 60vh; display: flex; align-items: center;
  padding: 120px clamp(20px, 5vw, 80px) var(--ev-section-pad);
  position: relative; overflow: hidden;
}
.ev-hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://pub-629428d185ca4960a0a73c850d32294b.r2.dev/generated-images/company_168027/88644e21-0082-46c9-82fb-4bf215709969.jpg');
  background-size: cover; background-position: center; z-index: 0;
  filter: brightness(0.48) contrast(1.1);
}
.ev-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(20,14,10,0.94) 0%, rgba(20,14,10,0.80) 45%, rgba(20,14,10,0.38) 75%, transparent 100%);
  z-index: 1; pointer-events: none;
}
.ev-hero-inner { position: relative; z-index: 2; max-width: 760px; }
.ev-hero-eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ev-copper); margin-bottom: 1.2rem;
}
.ev-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 500; line-height: 1.18;
  color: var(--ev-text); margin-bottom: 1.4rem;
}
.ev-hero-sub {
  font-size: 1.05rem; color: rgba(250, 247, 244, 0.72);
  max-width: 680px; line-height: 1.7;
}
.ev-hero-sub-secondary { margin-top: 1rem; color: rgba(250, 247, 244, 0.60); }

/* ─── Topic index ─── */
.ev-topic-index {
  padding: var(--ev-section-pad) clamp(20px, 5vw, 80px) 0;
}
.ev-topic-index-inner {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--ev-surface-alt);
  border: 1px solid var(--ev-border);
}
.ev-topic-index-header { max-width: 680px; margin-bottom: 2rem; }
.ev-topic-index-eyebrow,
.ev-reading-note-label,
.ev-limits-note-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ev-copper); margin-bottom: 0.75rem;
}
.ev-topic-index h2,
.ev-reading-note h2,
.ev-limits-note h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500;
  line-height: 1.22; color: var(--ev-text); margin-bottom: 0.8rem;
}
.ev-topic-index-header p:last-child,
.ev-reading-note > p:not(.ev-reading-note-label),
.ev-limits-note > p:last-child {
  color: var(--ev-text-secondary); font-size: 0.96rem; line-height: 1.7;
}
.ev-topic-links {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem;
}
.ev-topic-link {
  display: flex; flex-direction: column; gap: 0.65rem;
  min-height: 96px; padding: 1rem;
  border: 1px solid var(--ev-border); border-left: 2px solid var(--ev-copper);
  color: var(--ev-text); text-decoration: none; font-size: 0.92rem;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.ev-topic-link span {
  color: var(--ev-copper); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
}
.ev-topic-link:hover {
  background: var(--ev-copper-muted); border-color: var(--ev-border-hover);
  color: var(--ev-copper-light);
}

/* ─── Reading note and evidence key ─── */
.ev-reading-note {
  max-width: 1200px; margin: var(--ev-section-pad) auto 0;
  padding: 0 clamp(20px, 5vw, 80px);
}
.ev-reading-note > p:not(.ev-reading-note-label) { max-width: 760px; }
.ev-evidence-key {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
  margin-top: 1.75rem;
}
.ev-evidence-key-item {
  display: flex; flex-direction: column; gap: 0.65rem;
  padding: 1rem; background: rgba(184,115,51,0.06);
  border-top: 1px solid var(--ev-border);
}
.ev-evidence-key-item > span:last-child {
  color: var(--ev-text-tertiary); font-size: 0.79rem; line-height: 1.55;
}

/* ─── Section dividers ─── */
.ev-section-divider {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 clamp(20px, 5vw, 80px);
  margin: var(--ev-section-pad) 0 0;
}
.ev-section-divider-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ev-copper); white-space: nowrap;
}
.ev-section-divider-line { flex: 1; height: 1px; background: var(--ev-border); }

/* ─── Topic sections ─── */
.ev-topic-section {
  max-width: 1200px; margin: 0 auto;
  padding: var(--ev-section-pad) clamp(20px, 5vw, 80px);
  border-bottom: 1px solid rgba(184,115,51,0.10);
  scroll-margin-top: 84px;
}
.ev-topic-intro { max-width: 760px; margin-bottom: 3rem; }
.ev-topic-eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ev-copper); margin-bottom: 0.8rem;
}
.ev-topic-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500;
  color: var(--ev-text); line-height: 1.22; margin-bottom: 0.8rem;
}
.ev-topic-desc { font-size: 0.98rem; color: rgba(250,247,244,0.65); line-height: 1.7; }
.ev-context-link { margin-top: 1rem; font-size: 0.83rem; color: var(--ev-text-tertiary); }
.ev-context-link a { color: var(--ev-copper-light); text-underline-offset: 3px; }
.ev-context-link a:hover { color: var(--ev-text); }

/* ─── Citation grid and cards ─── */
.ev-citation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 1.5rem;
}
.ev-citation-card {
  background: var(--ev-surface);
  border: 1px solid var(--ev-border);
  border-radius: 10px; padding: 1.75rem 2rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.ev-citation-card:hover {
  border-color: var(--ev-border-hover);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.ev-citation-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.9rem;
}
.ev-evidence-label {
  display: inline-flex; align-items: center; width: fit-content;
  padding: 0.32rem 0.55rem; border: 1px solid currentColor;
  border-radius: 3px; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.04em; line-height: 1.2;
}
.ev-evidence-human { color: #D4A574; }
.ev-evidence-observational { color: var(--ev-copper-light); }
.ev-evidence-preclinical { color: #B9A89A; }
.ev-evidence-emerging { color: #D08B67; }
.ev-citation-year {
  flex: 0 0 auto; font-size: 0.78rem; font-weight: 600;
  color: var(--ev-copper); letter-spacing: 0.04em; padding-top: 0.35rem;
}
.ev-citation-meta { margin-bottom: 0.75rem; }
.ev-citation-journal {
  font-size: 0.78rem; color: var(--ev-text-tertiary);
  font-style: italic; line-height: 1.45;
}
.ev-citation-title {
  font-size: 0.95rem; font-weight: 600; color: var(--ev-text);
  line-height: 1.45; margin-bottom: 0.75rem;
}
.ev-citation-authors {
  font-size: 0.80rem; color: var(--ev-text-tertiary);
  margin-bottom: 1rem; line-height: 1.5;
}
.ev-citation-authors strong { color: rgba(250,247,244,0.58); font-weight: 600; }
.ev-citation-details { border-top: 1px solid rgba(184,115,51,0.12); }
.ev-citation-detail {
  display: grid; grid-template-columns: 92px 1fr; gap: 0.75rem;
  padding: 0.85rem 0; border-bottom: 1px solid rgba(184,115,51,0.12);
}
.ev-citation-detail dt {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ev-copper);
}
.ev-citation-detail dd {
  color: rgba(250,247,244,0.64); font-size: 0.84rem; line-height: 1.6;
}
.ev-citation-pubmed {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1rem; font-size: 0.80rem; font-weight: 500;
  color: var(--ev-copper); text-decoration: none; letter-spacing: 0.02em;
  transition: color 0.2s;
}
.ev-citation-pubmed:hover { color: var(--ev-copper-light); }
.ev-citation-pubmed svg { flex-shrink: 0; }

/* ─── Educational scope note ─── */
.ev-limits-note {
  max-width: 900px; margin: var(--ev-section-pad) auto;
  padding: 2rem clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(184,115,51,0.07);
  border: 1px solid rgba(184,115,51,0.25);
  text-align: center;
}
.ev-limits-note h2 { margin-bottom: 1rem; }
.ev-limits-note > p:last-child { max-width: 720px; margin: 0 auto; }

/* ─── Footer (override main.css) ─── */
footer {
  background: #0E0A07; border-top: 1px solid rgba(184,115,51,0.12);
  padding: 48px clamp(20px, 5vw, 60px);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand { font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem; color: #FAF7F4; margin-bottom: 0.6rem; }
.footer-tagline { font-size: 0.85rem; color: rgba(250,247,244,0.45); line-height: 1.55; max-width: 280px; }
footer h4 { font-size: 0.78rem; font-weight: 600; color: var(--ev-copper); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 0.55rem; }
footer ul li a { font-size: 0.85rem; color: rgba(250,247,244,0.55); text-decoration: none; transition: color 0.2s; }
footer ul li a:hover { color: var(--ev-copper-light); }

/* ─── Mobile ─── */
@media (max-width: 768px) {
  .nav-links { gap: 1rem; }
  .nav-links li:not(.nav-dropdown) { display: none; }
  .nav-links li.nav-cta-mobile { display: list-item; }
  .ev-hero { min-height: 50vh; }
  .ev-topic-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-evidence-key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-citation-grid { grid-template-columns: 1fr; }
  .ev-citation-card { padding: 1.5rem; }
  .ev-limits-note { margin-left: clamp(20px, 5vw, 80px); margin-right: clamp(20px, 5vw, 80px); }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-tagline { max-width: none; }
}

@media (max-width: 430px) {
  .ev-hero h1 { font-size: 2rem; }
  .ev-hero-sub { font-size: 0.96rem; }
  .ev-topic-index-inner { padding: 1.25rem; }
  .ev-topic-link { min-height: 88px; padding: 0.85rem 0.75rem; font-size: 0.82rem; }
  .ev-evidence-key { grid-template-columns: 1fr; }
  .ev-citation-head { align-items: flex-start; }
  .ev-citation-detail { grid-template-columns: 1fr; gap: 0.25rem; }
  .ev-citation-detail dt { margin-bottom: 0.1rem; }
}
