@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,900&family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --ink: #211019;
  --night: #170b13;
  --paper: #fdf1dd;
  --paper-2: #f9e4c4;
  --card: #fffaf1;
  --soft: #f7e7cf;

  --teal: #15a89a;        /* maiden */
  --teal-deep: #0c6c63;
  --orange: #ec6238;      /* mother */
  --orange-deep: #bd401d;
  --purple: #7a4fd0;      /* crone */
  --purple-deep: #492a8d;
  --gold: #f2b33d;
  --rose: #db3f6e;
  --pink: #ff90c0;
  --green: #82bd58;

  --line: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 18px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(236,98,56,.10), transparent 26%),
    radial-gradient(circle at 94% 8%, rgba(21,168,154,.12), transparent 26%),
    var(--paper);
  line-height: 1.6;
}
/* tactile paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: var(--line);
  background: rgba(253, 241, 221, .92);
  backdrop-filter: blur(10px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -.01em;
}
.brand img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
}
.nav a:hover { background: var(--gold); border-color: var(--ink); }
.nav a[aria-current="page"] { background: var(--rose); color: #fff; border-color: var(--ink); }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .16em;
  color: var(--ink);
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 12px;
  transform: rotate(-1.5deg);
  box-shadow: 3px 3px 0 var(--ink);
}
h1, h2, h3 {
  margin: 0;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.8rem, 6.4vw, 6rem); max-width: 16ch; }
h2 { font-size: clamp(2.1rem, 4.6vw, 4rem); }
h3 { font-size: clamp(1.3rem, 2.1vw, 1.9rem); line-height: 1.12; }
p { margin: 0 0 1rem; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.4rem); max-width: 60ch; }

/* ---------- Buttons ---------- */
.button-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: var(--line);
  padding: 13px 20px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease;
}
.button:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button.primary { background: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(290px, .92fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(44px, 7vw, 92px) clamp(20px, 5vw, 72px) 64px;
  color: #fff;
  border-bottom: 6px solid var(--ink);
  background:
    radial-gradient(circle at 16% 22%, rgba(21,168,154,.55), transparent 30%),
    radial-gradient(circle at 84% 16%, rgba(242,179,61,.50), transparent 32%),
    radial-gradient(circle at 72% 82%, rgba(219,63,110,.50), transparent 36%),
    linear-gradient(135deg, #1d0f1c 0%, #2c1531 54%, #1a1227 100%);
  overflow: hidden;
}
.hero > *:not(.floating-logos) { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--ink); }
.hero h1 { font-size: clamp(3rem, 6.6vw, 6.2rem); color: #fff; }
.hero h1::after {
  content: "";
  display: block;
  width: 220px;
  max-width: 70%;
  height: 12px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--orange), var(--rose), var(--purple));
}
.hero .lead { color: rgba(255,255,255,.88); }

/* floating rainbow spirals */
.floating-logos { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.floating-logo {
  position: absolute;
  width: clamp(140px, 20vw, 300px);
  aspect-ratio: 1;
  background: conic-gradient(from 0deg, var(--teal), var(--gold), var(--orange), var(--rose), var(--purple), var(--teal));
  -webkit-mask: radial-gradient(circle, transparent 0 17%, #000 18% 25%, transparent 26% 34%, #000 35% 43%, transparent 44% 52%, #000 53% 61%, transparent 62%);
  mask: radial-gradient(circle, transparent 0 17%, #000 18% 25%, transparent 26% 34%, #000 35% 43%, transparent 44% 52%, #000 53% 61%, transparent 62%);
  opacity: .55;
}
.logo-a { left: 6%; top: 12%; animation: floatA 19s ease-in-out infinite alternate, spin 40s linear infinite; }
.logo-b { right: 9%; top: 24%; width: clamp(200px, 27vw, 380px); opacity: .42; animation: floatB 23s ease-in-out infinite alternate, spin 60s linear infinite reverse; }
.logo-c { left: 47%; bottom: 6%; width: clamp(120px, 17vw, 230px); opacity: .38; animation: floatC 21s ease-in-out infinite alternate, spin 50s linear infinite; }
@keyframes floatA { from { transform: translate3d(-16px, 10px, 0); } to { transform: translate3d(54px, 70px, 0); } }
@keyframes floatB { from { transform: translate3d(28px, -16px, 0); } to { transform: translate3d(-70px, 60px, 0); } }
@keyframes floatC { from { transform: translate3d(-30px, 38px, 0); } to { transform: translate3d(64px, -54px, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-panel { display: grid; gap: 16px; }
.oracle-card {
  background: var(--card);
  color: var(--ink);
  border: var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
}
.oracle-card:nth-child(2) { transform: rotate(1.4deg); background: var(--pink); }
.oracle-card strong { color: var(--ink); }
.stat-big {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: .95;
  color: var(--orange-deep);
}
.oracle-card:nth-child(2) .stat-big { color: var(--purple-deep); }

/* ---------- Ticker ---------- */
.ticker {
  border-bottom: var(--line);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.ticker-track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker-track span {
  padding: 12px 26px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}
.ticker-track span::after { content: "✦"; margin-left: 26px; color: var(--gold); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Bands ---------- */
.band { padding: clamp(52px, 8vw, 92px) clamp(20px, 5vw, 72px); }
.band > * { max-width: var(--max); margin-inline: auto; }
.band.soft { background: var(--paper-2); }
.band.dark { background: var(--night); color: var(--paper); }
.band.teal { background: var(--teal); color: #fff; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}
.section-head p { max-width: 60ch; margin: 0; }
.band:not(.dark) .section-head p { color: rgba(33,16,25,.78); }
.dark .section-head p { color: rgba(253,241,221,.78); }

/* ---------- Triad ---------- */
.triad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.aspect {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border: var(--line);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.aspect::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255,255,255,.5), transparent, rgba(255,255,255,.5));
  -webkit-mask: radial-gradient(circle, transparent 0 30%, #000 31% 44%, transparent 45% 60%, #000 61% 74%, transparent 75%);
  mask: radial-gradient(circle, transparent 0 30%, #000 31% 44%, transparent 45% 60%, #000 61% 74%, transparent 75%);
  opacity: .5;
}
.aspect .eyebrow { background: #fff; color: var(--ink); }
.aspect.maiden { background: var(--teal); }
.aspect.mother { background: var(--orange); }
.aspect.crone { background: var(--purple); }
.aspect ul { margin: 18px 0 0; padding-left: 20px; line-height: 1.75; font-weight: 500; }

/* ---------- Stat grid ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card, .resource-card, .myth-card, .timeline-item, .graphic-panel {
  background: var(--card);
  border: var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.stat-card { border-top: 12px solid var(--teal); }
.stat-card:nth-child(3n+2) { border-top-color: var(--orange); }
.stat-card:nth-child(3n+3) { border-top-color: var(--purple); }
.stat-card .stat-big { color: var(--ink); }
.stat-card:nth-child(3n+1) .stat-big { color: var(--teal-deep); }
.stat-card:nth-child(3n+2) .stat-big { color: var(--orange-deep); }
.stat-card:nth-child(3n+3) .stat-big { color: var(--purple-deep); }
.stat-card a, .resource-card a, .timeline-item a, .myth-card a {
  color: var(--purple-deep);
  font-weight: 700;
  text-underline-offset: 3px;
}
.source { font-size: .85rem; color: rgba(33,16,25,.66); }
.dark .source { color: rgba(253,241,221,.66); }
/* source captions inside light cards stay dark even within dark bands */
.graphic-panel .source, .stat-card .source, .timeline-item .source, .myth-card .source, .resource-card .source { color: rgba(33,16,25,.66); }

/* ---------- Infographic ---------- */
.infographic { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.graphic-panel { color: var(--ink); }
.bar-row { display: grid; grid-template-columns: 92px 1fr 58px; gap: 12px; align-items: center; margin: 16px 0; font-weight: 700; }
.bar { height: 20px; border: var(--line); border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar span { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--orange) 0 10px, var(--rose) 10px 20px); }
.bar-row:nth-child(3) .bar span { background: repeating-linear-gradient(45deg, var(--teal) 0 10px, var(--purple) 10px 20px); }
.spiral-mark {
  min-height: 320px;
  background: conic-gradient(from 90deg, var(--teal), var(--gold), var(--orange), var(--rose), var(--purple), var(--teal));
  -webkit-mask: radial-gradient(circle, transparent 0 16%, #000 17% 25%, transparent 26% 34%, #000 35% 43%, transparent 44% 52%, #000 53% 61%, transparent 62%);
  mask: radial-gradient(circle, transparent 0 16%, #000 17% 25%, transparent 26% 34%, #000 35% 43%, transparent 44% 52%, #000 53% 61%, transparent 62%);
  animation: spin 36s linear infinite;
}

/* ---------- Archive controls ---------- */
.timeline-controls, .filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 22px; }
.archive-search { display: block; max-width: 720px; margin: 20px 0; font-weight: 700; }
.archive-search input { margin-top: 10px; }
.chip {
  border: var(--line);
  border-radius: 999px;
  background: var(--card);
  padding: 9px 15px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.chip:hover { transform: translate(1px,1px); box-shadow: 2px 2px 0 var(--ink); }
.chip.active { background: var(--rose); color: #fff; }

/* ---------- Timeline ---------- */
.timeline { display: grid; gap: 16px; }
.timeline-item {
  display: grid;
  grid-template-columns: 110px 200px 1fr;
  gap: 18px;
  align-items: start;
}
.timeline-item > h3:first-child {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--orange-deep);
}
.badge {
  display: inline-block;
  width: max-content;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--ink);
}
.badge.accomplishment { background: var(--green); color: var(--ink); }
.badge.setback { background: var(--orange); color: #fff; }
.badge.issue { margin-top: 10px; background: var(--purple); color: #fff; text-transform: none; }

/* ---------- Resource + Myth ---------- */
.resource-grid, .myth-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.resource-card:nth-child(4n+1) { border-top: 12px solid var(--teal); }
.resource-card:nth-child(4n+2) { border-top: 12px solid var(--orange); }
.resource-card:nth-child(4n+3) { border-top: 12px solid var(--gold); }
.resource-card:nth-child(4n+4) { border-top: 12px solid var(--purple); }
.resource-card a { display: inline-block; margin-top: 6px; }
.resource-card a::after { content: " \2192"; }
.myth-card .eyebrow { background: var(--rose); color: #fff; margin-bottom: 10px; }
.myth-card ul { padding-left: 20px; line-height: 1.7; }
.myth-card { border-top: 12px solid var(--rose); }

/* ---------- Callout ---------- */
.callout {
  padding: 34px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--purple);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  box-shadow: var(--shadow);
}
.callout .eyebrow { background: var(--gold); color: var(--ink); }

/* ---------- Forms ---------- */
form { display: grid; gap: 14px; }
label { font-weight: 700; display: grid; gap: 6px; }
input, textarea, select {
  width: 100%;
  border: var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .92rem; color: var(--purple-deep); font-weight: 700; }

/* ---------- Footer ---------- */
.footer {
  padding: 40px clamp(20px, 5vw, 72px);
  background: var(--night);
  color: rgba(253,241,221,.8);
  border-top: 6px solid var(--gold);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .site-header { position: static; flex-direction: column; align-items: flex-start; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .triad, .stat-grid, .resource-grid, .myth-grid, .infographic { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head p { margin-top: 12px; }
  .timeline-item { grid-template-columns: 1fr; }
  .callout { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-logo, .spiral-mark, .ticker-track { animation: none; }
}
