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

:root {
  --canvas: #e4e6ea;
  --paper: #ffffff;
  --border: #c0c4ca;
  --line: #aab0b8;
  --text: #2a2c30;
  --muted: #6a6e78;
  --ink-blue: #4a70a8;
  --highlight: #f8e880;
}

html, body {
  background: var(--canvas);
  color: var(--text);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hero-title, .frag-title, .block-title, .footer-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.hero-eyebrow, .block-eyebrow, .footer-eyebrow, .frag-no, .data-source {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* HERO --- archive entrance with scattered fragments */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 64px 80px;
  background: var(--canvas);
  overflow: hidden;
}

.hero-mast {
  position: relative;
  z-index: 5;
  max-width: 540px;
}

.hero-eyebrow { margin-bottom: 18px; }

.hero-title {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}
.hero-title .dot { color: var(--ink-blue); }

.hero-tagline {
  margin-top: 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(18px, 2vw, 22px);
  font-style: italic;
  color: var(--muted);
  max-width: 480px;
}

.connection-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.fragment {
  position: absolute;
  z-index: 2;
  width: 220px;
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 16px 18px 18px;
  left: var(--x);
  top: var(--y);
  transform: rotate(var(--rot));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 0 rgba(42, 44, 48, 0.04);
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

.fragment:hover {
  z-index: 4;
  transform: rotate(var(--rot)) perspective(600px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateZ(6px);
  box-shadow: 0 8px 24px rgba(42, 44, 48, 0.10);
}

.frag-no {
  font-family: "Source Sans 3", monospace;
  margin-bottom: 6px;
  color: var(--ink-blue);
}

.frag-title {
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--text);
}

.frag-snip {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.hero-annotation {
  position: absolute;
  z-index: 3;
  font-family: "Indie Flower", cursive;
  font-size: 17px;
  color: var(--ink-blue);
  pointer-events: none;
}
.hero-annotation--1 { left: 30%; top: 14%; transform: rotate(-3deg); }
.hero-annotation--2 { left: 56%; top: 28%; transform: rotate(2deg); }
.hero-annotation--3 { left: 22%; top: 78%; transform: rotate(-2deg); }

/* ARCHIVE --- broken grid reading area */
.archive {
  padding: 120px 80px;
  background: var(--canvas);
}

.archive__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.block {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 28px 32px;
  font-size: 16px;
  line-height: 1.65;
}

.block-eyebrow { margin-bottom: 14px; color: var(--ink-blue); }

.block-title {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.1;
  margin-bottom: 18px;
  color: var(--text);
}

.block-body { margin-bottom: 14px; color: var(--text); }
.block-body:last-child { margin-bottom: 0; }

.hl {
  background: var(--highlight);
  border-radius: 2px;
  padding: 0 4px;
  color: var(--text);
}

/* Citation block */
.block--cite { background: var(--paper); }
.block-cite-author {
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.block-cite-title { color: var(--muted); margin-bottom: 12px; font-size: 15px; }
.block-cite-note {
  font-family: "Indie Flower", cursive;
  color: var(--ink-blue);
  font-size: 16px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* Data block */
.data-figure {
  font-family: "Cormorant Garamond", serif;
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.data-pct { font-size: 36px; color: var(--ink-blue); margin-left: 4px; }
.data-label { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.data-source { margin-top: 14px; }

/* Definition block */
.def-term {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.def-pos { font-style: italic; color: var(--muted); font-size: 14px; }
.def-body { font-size: 14px; color: var(--text); line-height: 1.5; }

/* Note block */
.note-body { font-size: 14px; color: var(--text); line-height: 1.6; }

/* Annotation overlays (handwritten marginalia) */
.annotation {
  position: absolute;
  font-family: "Indie Flower", cursive;
  color: var(--ink-blue);
  font-size: 16px;
  pointer-events: none;
  white-space: nowrap;
}
.annotation--block-major { top: -16px; right: 20px; transform: rotate(-3deg); }
.annotation--block-major-2 { bottom: -10px; left: 32px; transform: rotate(2deg); }
.annotation--block-insight { top: -14px; right: 40px; transform: rotate(-4deg); font-size: 18px; }

/* AURORA STRIP --- the one moment of color */
.aurora-strip {
  grid-column: 1 / -1;
  height: 40px;
  position: relative;
  background: linear-gradient(90deg, #6bc8a8, #88a8e8, #c888d8);
  background-size: 200% 100%;
  animation: aurora-drift 12s linear infinite;
  display: flex;
  align-items: center;
  padding: 0 28px;
}
.aurora-strip__label {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(42, 44, 48, 0.85);
  mix-blend-mode: multiply;
}

@keyframes aurora-drift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.block--insight { border-color: var(--ink-blue); }

/* FOOTER */
.footer {
  padding: 100px 80px 60px;
  background: var(--canvas);
  border-top: 1px solid var(--border);
}
.footer__inner { max-width: 1080px; margin: 0 auto; }
.footer-eyebrow { margin-bottom: 14px; }
.footer-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  color: var(--text);
}
.footer-meta {
  margin-top: 30px;
  font-size: 13px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 900px) {
  .hero { padding: 48px 28px; min-height: auto; }
  .fragment {
    position: static;
    width: 100%;
    transform: none !important;
    margin-top: 18px;
  }
  .connection-lines, .hero-annotation { display: none; }
  .archive { padding: 80px 28px; }
  .archive__grid { grid-template-columns: 1fr; }
  .block {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    padding: 22px 24px;
  }
  .annotation { display: none; }
  .aurora-strip { grid-column: 1 / -1 !important; }
  .footer { padding: 60px 28px 40px; }
}
