/* =============================================================
   ISRAEL PRISM — prism.css
   Shared styles for all pages. Include on every page.
   ============================================================= */

/* =====================
   CSS CUSTOM PROPERTIES
   ===================== */
:root {
  --navy:        #0c1d38;
  --navy-2:      #152a4a;
  --navy-3:      #1e3a60;
  --blue:        #2563a8;
  --blue-mid:    #3a7bc8;
  --blue-light:  #5a9de0;
  --crystal:     #a8d4f0;
  --silver:      #b8cce0;
  --white:       #f0f5fb;
  --gold:        #c4952a;
  --gold-light:  #ddb84a;
  --text-body:   #c8daf0;
  --text-muted:  #7a9bbf;
  --border:      rgba(74,144,217,0.18);
  --border-gold: rgba(196,149,42,0.35);
  --surface:     rgba(255,255,255,0.04);
  --surface-2:   rgba(255,255,255,0.07);

  /* Topic accent colors */
  --c-history:    #3a7bc8;
  --c-identity:   #2e9e7a;
  --c-refugees:   #c47a2a;
  --c-conflict:   #b84040;
  --c-media:      #7a5cb8;
  --c-democracy:  #2e8a9e;
  --c-law:        #4a7a4a;
  --c-antisem:    #9e4a7a;
  --c-christians: #8a6a2e;
  --c-sources:    #4a4a7a;
}

/* =====================
   RESET + BASE
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--navy);
  color: var(--text-body);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =====================
   BACKGROUND ATMOSPHERE
   ===================== */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 50% at 50% -10%, rgba(37,99,168,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 90%, rgba(12,29,56,0.8) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 10% 70%, rgba(20,38,72,0.6) 0%, transparent 50%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(74,144,217,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,144,217,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* =====================
   LAYOUT WRAPPERS
   ===================== */
.site-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 600px) { .container { padding: 0 24px; } }
@media (min-width: 900px) { .container { padding: 0 40px; } }

/* =====================
   HEADER / NAV
   ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,29,56,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-star { width: 30px; height: 30px; }

.logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}

.logo-text span { font-weight: 300; color: var(--crystal); }

/* Desktop nav */
.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
  list-style: none;
}

@media (min-width: 900px) { .nav-links { display: flex; } }

.nav-links a {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--white); background: var(--surface-2); }
.nav-links a.active { color: var(--crystal); }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--silver);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (min-width: 900px) { .hamburger { display: none; } }

/* Mobile menu */
.mobile-menu {
  display: none;
  background: rgba(12,29,56,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.mobile-menu.open { display: block; }

.mobile-menu-inner { padding: 12px 0 20px; }

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--silver);
  text-decoration: none;
  border-bottom: 1px solid rgba(74,144,217,0.08);
  transition: background 0.2s, color 0.2s;
}

.mobile-menu a:hover { background: var(--surface); color: var(--white); }

.mobile-menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* =====================
   BUTTONS
   ===================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.2s;
  cursor: pointer;
}

.btn-primary:hover { background: var(--blue-mid); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--silver);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 3px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: rgba(74,144,217,0.4);
  color: var(--white);
  background: var(--surface);
}

/* =====================
   SECTION LABELS
   ===================== */
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =====================
   SHARE BUTTON
   ===================== */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
}

.share-btn:hover {
  color: var(--crystal);
  border-color: rgba(74,144,217,0.35);
  background: var(--surface-2);
}

/* =====================
   TOAST NOTIFICATION
   ===================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(21,42,74,0.97);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 20px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--crystal);
  z-index: 999;
  backdrop-filter: blur(12px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* =====================
   FOOTER
   ===================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  margin-top: 80px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 700px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

.footer-brand { display: flex; flex-direction: column; gap: 8px; }

.footer-logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
}

.footer-tagline {
  font-family: 'Barlow', sans-serif;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; }

.footer-links a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--silver); }

.footer-copy {
  font-family: 'Barlow', sans-serif;
  font-size: 0.72rem;
  color: rgba(122,155,191,0.4);
  text-align: center;
  margin-top: 16px;
}

/* =====================
   ENTRANCE ANIMATIONS
   ===================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================
   UTILITIES
   ===================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

hr.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* =============================================================
   TOPIC PAGE COMPONENTS
   Styles used by topic pages (history, refugees, etc.)
   ============================================================= */

/* Topic page hero */
.topic-hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.topic-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 800px) {
  .topic-hero-inner { grid-template-columns: 1fr auto; align-items: start; }
}

.topic-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.topic-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.topic-eyebrow-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topic-eyebrow-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(122,155,191,0.4);
  margin-left: auto;
}

.topic-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.topic-intro {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.75;
  color: var(--silver);
  max-width: 640px;
  opacity: 0.85;
}

.topic-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: start;
}

@media (min-width: 800px) {
  .topic-nav-pills { flex-direction: column; align-items: flex-end; }
}

.topic-pill {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.topic-pill:hover {
  color: var(--crystal);
  border-color: rgba(74,144,217,0.3);
  background: var(--surface-2);
}

/* Argument card */
.arg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px 28px;
  position: relative;
  transition: border-color 0.2s;
}

.arg-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent, var(--blue));
  border-radius: 6px 0 0 6px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.arg-card:hover { border-color: rgba(74,144,217,0.28); }
.arg-card:hover::before { opacity: 1; }

.arg-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  opacity: 0.6;
}

.arg-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 16px;
}

.arg-body {
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-body);
}

.arg-body p { margin-bottom: 14px; }
.arg-body p:last-child { margin-bottom: 0; }

.arg-body strong {
  font-weight: 500;
  color: var(--silver);
}

.arg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.arg-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(74,144,217,0.06);
  border: 1px solid rgba(74,144,217,0.12);
  padding: 3px 8px;
  border-radius: 3px;
}

/* Stat callout — inline large number */
.stat-callout {
  background: linear-gradient(135deg, rgba(21,42,74,0.9) 0%, rgba(30,58,96,0.6) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 24px 28px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.stat-callout-num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
  color: var(--white);
}

.stat-callout-num span { color: var(--gold); font-style: italic; }

.stat-callout-label {
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--silver);
  line-height: 1.5;
  flex: 1;
  min-width: 180px;
}

.stat-callout-source {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(122,155,191,0.5);
  display: block;
  margin-top: 4px;
}

/* Timeline connector — for history page */
.arg-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-section {
  position: relative;
  padding-left: 28px;
}

.timeline-section::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 48px;
  bottom: -16px;
  width: 1px;
  background: var(--border);
}

.timeline-section:last-child::before { display: none; }

.timeline-dot {
  position: absolute;
  left: 0;
  top: 36px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--navy-2);
  border: 2px solid var(--accent, var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent, var(--blue));
}

/* Key quote pullout */
.pullquote {
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(196,149,42,0.05);
  border-radius: 0 4px 4px 0;
}

.pullquote-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--silver);
}

.pullquote-attribution {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 10px;
}

/* Death toll comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem;
}

.comparison-table th {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.comparison-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(74,144,217,0.08);
  color: var(--text-body);
  font-weight: 300;
}

.comparison-table tr:last-child td { border-bottom: none; }

.comparison-table tr.highlight td {
  color: var(--white);
  background: rgba(58,123,200,0.08);
}

.comparison-table .bar-cell { min-width: 120px; }

.bar-track {
  height: 6px;
  background: rgba(74,144,217,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--bar-color, var(--blue));
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-top: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--silver); }

.breadcrumb-sep { opacity: 0.4; }

/* Topic prev/next navigation */
.topic-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.topic-nav-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.topic-nav-link:hover {
  background: var(--surface-2);
  border-color: rgba(74,144,217,0.3);
}

.topic-nav-link.next { text-align: right; }

.topic-nav-dir {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.topic-nav-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--white);
}
