/* =========================================================
   The Reader Journal — editorial stylesheet
   Pure HTML/CSS/JS, no frameworks.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --paper: #faf7f2;
  --paper-2: #f3eee5;
  --ink: #1c1b19;
  --ink-soft: #3a362f;
  --muted: #7a6a55;
  --muted-2: #a89a85;
  --accent: #c9a88b;
  --accent-deep: #a07f5e;
  --rule: #e6dfd3;
  --rule-strong: #d6cdbd;

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 11vw, 160px);

  --shadow-1: 0 1px 2px rgba(28, 27, 25, 0.04), 0 8px 24px rgba(28, 27, 25, 0.06);
  --shadow-2: 0 1px 2px rgba(28, 27, 25, 0.05), 0 24px 48px rgba(28, 27, 25, 0.08);

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  font-feature-settings: "ss01", "cv01", "cv11";
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms var(--ease), opacity 200ms var(--ease);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  letter-spacing: inherit;
}

::selection { background: var(--ink); color: var(--paper); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -10000px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
  min-width: 0;
}

.section { padding-block: var(--section-y); position: relative; }
.section + .section { padding-top: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--muted-2);
}

.section-number {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.divider-rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.012em;
  margin: 0;
}

.h-display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(56px, 12vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.h-display em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}

.h-section {
  font-size: clamp(36px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin: 0;
}

.h-section em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}

.h-card {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.005em;
}

.body-prose p {
  font-size: clamp(17px, 1.2vw, 19px);
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 0 1.2em;
}

.body-prose p:last-child { margin-bottom: 0; }

.dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 500;
  float: left;
  font-size: 5.4em;
  line-height: 0.85;
  margin: 0.04em 0.12em 0 -0.04em;
  color: var(--ink);
  font-feature-settings: "lnum";
}

.small-caps {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.pull-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
  max-width: 22ch;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms var(--ease), background 300ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
  background: color-mix(in oklab, var(--paper) 96%, transparent);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-block: 18px;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.wordmark__mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-deep);
}

.site-nav { justify-self: center; display: none; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 36px;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-block: 4px;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a[aria-current="page"]::after,
.site-nav a:hover::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
}

.header-meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  display: none;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  transition: background 200ms var(--ease);
}
.menu-toggle:hover { background: var(--paper-2); }
.menu-toggle svg { width: 16px; height: 16px; }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 60;
  padding: 32px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 320ms var(--ease), opacity 320ms var(--ease);
}
.mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav li { border-bottom: 1px solid var(--rule); }
.mobile-nav a {
  display: block;
  padding: 22px 0;
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.mobile-nav__meta {
  margin-top: auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}

@media (min-width: 880px) {
  .menu-toggle { display: none; }
  .site-nav { display: block; }
  .header-meta { display: inline-block; }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(64px, 9vw, 140px);
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
}

.hero__head {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.hero__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin-top: 8px;
}

.hero__lede {
  max-width: 36ch;
}

.hero__caption {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.hero__art {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  min-width: 0;
}

.hero__art img {
  width: min(100%, 520px);
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  border: 1px solid color-mix(in oklab, var(--rule-strong) 82%, transparent);
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  background: var(--paper-2);
}

.hero__art-mark {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--paper);
  letter-spacing: 0.02em;
  z-index: 1;
  text-shadow: 0 1px 10px rgba(28, 27, 25, 0.45);
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: end;
  }
  .hero__art { justify-content: flex-end; }
}

/* ---------- Essay ---------- */
.essay {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}

.essay__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
}

.essay__intro {
  max-width: 30ch;
  min-width: 0;
}

.essay__body {
  max-width: 60ch;
  min-width: 0;
}

.essay__quote {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  padding-block: clamp(28px, 4vw, 44px);
  margin-block: clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.essay__quote-attribution {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 880px) {
  .essay__grid {
    grid-template-columns: 0.4fr 0.6fr;
  }
}

/* ---------- Editorial image breaks ---------- */
.image-break {
  position: relative;
  height: clamp(220px, 48vw, 640px);
  overflow: hidden;
  background: var(--paper-2);
}

.image-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.image-break::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(250, 247, 242, 0.08), transparent 22%, transparent 78%, rgba(250, 247, 242, 0.12)),
    radial-gradient(circle at 35% 42%, transparent 0 42%, rgba(28, 27, 25, 0.16) 100%);
}

/* ---------- Anatomy ---------- */
.anatomy__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: start;
}

.anatomy__art {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 56px);
  position: relative;
  min-width: 0;
}

.anatomy__diagram {
  position: relative;
  padding-bottom: clamp(72px, 10vw, 112px);
}

.anatomy__art svg {
  width: 100%;
  height: auto;
  color: var(--ink);
  display: block;
}

.anatomy__inset {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(34%, 180px);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border: 1px solid color-mix(in oklab, var(--rule-strong) 82%, transparent);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  background: var(--paper);
}

.anatomy__art-caption {
  margin-top: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.anatomy__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
}

.anatomy__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding-block: 22px;
  border-top: 1px solid var(--rule);
}
.anatomy__item:last-child { border-bottom: 1px solid var(--rule); }

.anatomy__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--muted);
  line-height: 1;
  padding-top: 4px;
}
.anatomy__item h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 6px;
}
.anatomy__item p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
}

@media (min-width: 960px) {
  .anatomy__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

/* ---------- Magnification ---------- */
.magnification__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 880px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.mag-table-wrap {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
}

.mag-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.mag-table caption {
  text-align: left;
  padding: 24px clamp(20px, 3vw, 32px);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}

.mag-table th,
.mag-table td {
  padding: 18px clamp(16px, 2.4vw, 28px);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.mag-table tr:last-child th,
.mag-table tr:last-child td { border-bottom: 0; }

.mag-table thead th {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-2);
}

.mag-table tbody th {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  width: 22%;
  white-space: nowrap;
}

.mag-table tbody td { color: var(--ink-soft); }

.mag-disclaimer {
  margin-top: clamp(28px, 4vw, 48px);
  padding: clamp(22px, 3vw, 32px);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-md);
  background: transparent;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 780px;
}

.mag-disclaimer__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.mag-disclaimer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

/* ---------- Frame shapes ---------- */
.shapes {
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
}

.shapes__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 880px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.shapes__grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.shape-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 400ms var(--ease), box-shadow 400ms var(--ease), border-color 400ms var(--ease);
}

.shape-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-1);
  border-color: var(--rule-strong);
}

.shape-card__art {
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
  border-radius: var(--radius-md);
  color: var(--ink);
}

.shape-card__art svg {
  width: 70%;
  height: auto;
  max-height: 100%;
}

.shape-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.shape-card__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

.shape-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.01em;
  margin: 0;
}

.shape-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.shape-card__era {
  margin-top: auto;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 720px) {
  .shapes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .shapes__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Materials ---------- */
.materials__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 880px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.materials__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.material {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-block: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--rule);
  align-items: start;
  min-width: 0;
}

.material:last-child { border-bottom: 1px solid var(--rule); }

.material__index {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.material__media {
  margin: 0;
  width: min(100%, 520px);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: var(--shadow-1);
  min-width: 0;
}

.material__copy { min-width: 0; }

.material__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.012em;
  margin: 0 0 16px;
}

.material p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
  max-width: 60ch;
}

.material__props {
  margin-top: 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material__prop {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 6px 12px;
}

@media (min-width: 880px) {
  .material {
    grid-template-columns: 64px minmax(240px, 360px) 1fr;
    gap: clamp(24px, 4vw, 44px);
  }

  .material__media { width: 100%; }
}

/* ---------- Style notes ---------- */
.notes {
  background: var(--ink);
  color: var(--paper);
  padding-top: 0;
}

.notes :is(.eyebrow, .small-caps) { color: var(--muted-2); }
.notes :is(.eyebrow)::before { background: var(--muted-2); }

.notes__mood {
  position: relative;
  min-height: clamp(360px, 58vw, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  margin-bottom: clamp(44px, 7vw, 88px);
  isolation: isolate;
}

.notes__mood img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.notes__mood::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(28, 27, 25, 0.88), rgba(28, 27, 25, 0.42) 58%, rgba(28, 27, 25, 0.76)),
    linear-gradient(180deg, rgba(28, 27, 25, 0.08), rgba(28, 27, 25, 0.72));
}

.notes__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 880px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.notes__mood .notes__head {
  max-width: var(--container);
  margin-bottom: 0;
  padding-block: clamp(72px, 11vw, 140px) clamp(44px, 7vw, 88px);
}

.notes__mood .h-section {
  max-width: 10ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.42);
}

.notes__head .h-section { color: var(--paper); }
.notes__head .h-section em { color: var(--accent); }

.notes__lede {
  margin: 0 0 clamp(40px, 5vw, 64px);
  max-width: 64ch;
  color: rgba(250, 247, 242, 0.78);
  font-style: normal;
}

.notes__grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: clamp(32px, 4vw, 56px);
}

.note {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid rgba(250, 247, 242, 0.12);
}

.note__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

.note h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.012em;
  color: var(--paper);
  margin: 0;
}

.note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(250, 247, 242, 0.78);
  max-width: 38ch;
}

@media (min-width: 720px) {
  .notes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .notes__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Compliance pages ---------- */
.page {
  padding-block: clamp(64px, 9vw, 140px);
}

.page__header {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin: 0;
}

.page__title em { font-style: italic; color: var(--muted); font-weight: 400; }

.page__lede { max-width: 60ch; }

.prose { max-width: 68ch; }

.prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.012em;
  margin: 2.4em 0 0.6em;
}
.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin: 1.8em 0 0.4em;
}

.prose p {
  margin: 0 0 1.1em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.prose ul, .prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.2em;
  color: var(--ink-soft);
}

.prose li { margin-bottom: 0.4em; line-height: 1.7; }

.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 200ms var(--ease);
}
.prose a:hover { border-bottom-color: var(--ink); }

.prose strong { color: var(--ink); font-weight: 600; }

.prose__updated {
  display: inline-block;
  margin-bottom: 1.6em;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-card {
  margin-top: 2em;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}

.contact-card h3 { margin: 0 0 8px; }
.contact-card p { margin: 0; color: var(--ink-soft); }
.contact-card a { font-family: var(--serif); font-style: italic; font-size: 22px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding-block: clamp(64px, 7vw, 96px);
  margin-top: clamp(40px, 6vw, 80px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 5vw, 64px);
  margin-bottom: clamp(48px, 6vw, 72px);
}

.footer__brand .wordmark { font-size: 13px; }

.footer__tag {
  margin-top: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  max-width: 30ch;
}

.footer__col h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col a {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.footer__col a:hover { color: var(--accent-deep); }

.footer__bottom {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer__bottom p { margin: 0; line-height: 1.7; }

.footer__notice {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
  .footer__bottom {
    grid-template-columns: 1fr auto;
  }
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  box-shadow: var(--shadow-2);
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 380ms var(--ease), opacity 380ms var(--ease);
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--paper);
  letter-spacing: -0.01em;
}

.cookie-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(250, 247, 242, 0.78);
}

.cookie-banner a {
  color: var(--paper);
  border-bottom: 1px solid rgba(250, 247, 242, 0.4);
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid currentColor;
  transition: background 200ms var(--ease), color 200ms var(--ease);
  cursor: pointer;
}

.btn--primary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(250, 247, 242, 0.32);
}
.btn--ghost:hover { border-color: var(--paper); }

@media (min-width: 720px) {
  .cookie-banner {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 26px 28px;
    left: auto;
    right: 24px;
    bottom: 24px;
    max-width: 720px;
  }
}

/* ---------- Reveal animations (no-JS fallback shows everything) ---------- */
.reveal {
  opacity: 1;
  transform: none;
  will-change: opacity, transform;
}

.js-anim .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1000ms var(--ease), transform 1000ms var(--ease);
}

.js-anim .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js-anim .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

.js-anim .reveal-stagger.is-in > * {
  opacity: 1;
  transform: none;
}

.js-anim .reveal-stagger.is-in > *:nth-child(1)  { transition-delay: 60ms; }
.js-anim .reveal-stagger.is-in > *:nth-child(2)  { transition-delay: 120ms; }
.js-anim .reveal-stagger.is-in > *:nth-child(3)  { transition-delay: 180ms; }
.js-anim .reveal-stagger.is-in > *:nth-child(4)  { transition-delay: 240ms; }
.js-anim .reveal-stagger.is-in > *:nth-child(5)  { transition-delay: 300ms; }
.js-anim .reveal-stagger.is-in > *:nth-child(6)  { transition-delay: 360ms; }
.js-anim .reveal-stagger.is-in > *:nth-child(7)  { transition-delay: 420ms; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal,
  .js-anim .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Focus styles ---------- */
:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
