/* epsilonclose.com — field notebook (paper edition)
   light paper, engineering grid, pencil + fountain-pen ink, hand-drawn marks. */

:root {
  /* paper */
  --paper:    #f5efde;
  --paper-2:  #ede5cf;
  --paper-shadow: rgba(60, 50, 25, 0.06);

  /* grid (engineering paper blue, faint) */
  --grid:       rgba(60, 90, 130, 0.16);
  --grid-major: rgba(60, 90, 130, 0.28);

  /* inks */
  --ink:       #1c2a44;   /* fountain pen navy — body */
  --ink-soft:  #3a4660;   /* secondary */
  --pencil:    #5a564c;   /* graphite — muted text */
  --faint:     #8a8472;
  --red:       #b03a2e;   /* red pencil — emphasis */
  --sepia:     #8a5a2a;   /* old ink */
  --rule:      rgba(28, 42, 68, 0.22);
  --rule-soft: rgba(28, 42, 68, 0.10);

  /* fonts */
  --serif: "Spectral", "EB Garamond", Georgia, "Times New Roman", serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, monospace;
  --hand:  "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --measure: 38rem;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --grid-size: 24px;

  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;

  /* engineering paper: 4-up minor grid + heavier major every 5 cells */
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px),
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size:
    calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
    calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size);
  background-position: 0 0;
  /* grid is part of the paper — it scrolls with the page, not pinned to viewport */
  background-attachment: scroll;
}

/* paper grain — subtle warm noise on top of the grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch' seed='4'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.35  0 0 0 0 0.18  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* paper edge: corners feel slightly aged */
/* document-wide vignette — anchored to the whole page (scrolls with content,
   not pinned to the viewport). Edges of the actual sheet fall into shadow:
   top shadow at page top, bottom at page bottom, sides run the full height. */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background:
    /* top edge */
    linear-gradient(to bottom, rgba(40, 30, 12, 0.05), transparent 180px),
    /* bottom edge */
    linear-gradient(to top,    rgba(40, 30, 12, 0.05), transparent 180px),
    /* left edge (full height) */
    linear-gradient(to right,  rgba(40, 30, 12, 0.035), transparent 130px),
    /* right edge (full height) */
    linear-gradient(to left,   rgba(40, 30, 12, 0.035), transparent 130px);
}

/* ── layout ─────────────────────────────────────────────── */

.page {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

/* red margin line down the left gutter — classic notebook */
@media (min-width: 880px) {
  .page::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--pad-x) + 5.4rem);
    width: 1px;
    background: var(--red);
    opacity: 0.55;
    pointer-events: none;
  }
}

main {
  flex: 1;
  padding-block: clamp(2.5rem, 7vh, 4.5rem) clamp(4rem, 10vh, 6.5rem);
}

.hero { margin-block: 0 clamp(3.5rem, 9vh, 6rem) !important; }

/* ── header ─────────────────────────────────────────────── */

.site-header {
  padding-block: 2rem 1.2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2rem 1.5rem;
  border-bottom: 1.5px solid var(--ink);
  position: relative;
}

.site-header::after {
  /* hand-drawn-feeling secondary rule, just below */
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -5px;
  height: 1px;
  background: var(--ink);
  opacity: 0.35;
}

.mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

/* ── section rule: closes the derivation, opens the ledger ──
   echoes the header/footer ink rule (strong line + faint hand-drawn
   echo) with a short red tick at the left margin. */
.section-rule {
  position: relative;
  height: 0;
  border: 0;
  margin: clamp(2.5rem, 6vh, 4rem) 0 clamp(1.6rem, 4vh, 2.4rem);
  border-top: 1.5px solid var(--ink);
}
.section-rule::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 4px;
  height: 1px;
  background: var(--ink);
  opacity: 0.32;
}
.section-rule::before {
  /* red tick anchoring the rule at the left margin */
  content: "";
  position: absolute;
  left: 0;
  top: -1.5px;
  width: 2.2rem;
  height: 1.5px;
  background: var(--red);
}

/* ── logomark: ϵ approaching the asymptote (never touching) ── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
}

.mark .glyph,
.site-footer .center .glyph {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--red);
  display: inline-block;
  transform-origin: center;
  animation: approachDrift 5.6s ease-in-out infinite;
}

/* the asymptote — a vertical rule the ϵ approaches but never reaches */
.logo .asymptote {
  width: 0.09em;
  height: 1.18em;
  background: var(--ink);
  border-radius: 0.05em;
  flex: none;
  align-self: center;
}

@keyframes approachDrift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(0.16em); }
}

@media (prefers-reduced-motion: reduce) {
  .mark .glyph,
  .site-footer .center .glyph { animation: none; }
}

.notation {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
  margin-left: auto;
}

.notation .sym { color: var(--ink); font-style: italic; }
.notation .red { color: var(--red); font-style: italic; }

.nav {
  display: flex;
  gap: 1.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  justify-self: end;
}

.nav a {
  color: var(--pencil);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: none;
  transition: color 180ms ease;
}

.nav a:hover, .nav a:focus-visible {
  color: var(--ink);
  outline: none;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--red);
  text-underline-offset: 0.35em;
}

/* notation visibility is handled by the fit check in player.js —
   it stays whenever it fits on the header line, hides only when it
   would collide with the wordmark */
.notation.is-hidden { display: none; }

.pagestamp {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--pencil);
  text-transform: lowercase;
  margin: 1rem 0 0;
}

.pagestamp .n { color: var(--ink); font-weight: 500; }
.pagestamp .red { color: var(--red); }

/* ── type ───────────────────────────────────────────────── */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; color: var(--ink); letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; }
h2 { font-size: 1.35rem; line-height: 1.3; }
h3 { font-size: 1.1rem; line-height: 1.35; }

p { margin: 0 0 1.05em; max-width: var(--measure); text-wrap: pretty; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

a:hover, a:focus-visible {
  color: var(--red);
  text-decoration-color: var(--red);
  outline: none;
}

::selection { background: rgba(176, 58, 46, 0.18); color: var(--ink); }

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.3vw, 1.55rem);
  line-height: 1.45;
  color: var(--ink);
  max-width: 34rem;
  margin: 0;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--pencil);
  margin: 0;
}

.stamp {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--pencil);
}

.stamp .sep { color: var(--rule); margin: 0 0.55em; }

/* handwritten margin annotation */
.hand {
  font-family: var(--hand);
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--red);
  letter-spacing: 0.005em;
  transform: rotate(-3.5deg);
  transform-origin: left center;
  display: inline-block;
}

/* figure: graph with a handwritten note superimposed.
   Indented to line its left edge up with the audio-graph waveforms,
   which sit in the session-row's second column (5rem label + 1.6rem gap). */
.figure {
  position: relative;
  display: block;
  max-width: none;
  width: 100%;
}
@media (min-width: 561px) {
  .figure {
    margin-left: calc(5rem + 1.6rem);
    /* fill the rest of the column so the graph matches the session-graph width */
    width: calc(100% - 5rem - 1.6rem);
  }
}
.figure .sketch.signature {
  margin: 1.5rem 0 0;
}
.hand-on-fig {
  position: absolute;
  /* down and to the left — cradled in the hollow above the gentle curve */
  left: 12%;
  top: 50%;
  bottom: auto;
  margin: 0;
  font-size: 1.3rem;
  transform: rotate(-8deg);
  transform-origin: left center;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1.1;
}

/* ── definition / theorem ───────────────────────────────── */

.definition {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 36rem;
  margin: 0;
}

.definition .sym { color: var(--red); font-style: italic; }
.definition .op  { color: var(--pencil); margin: 0 0.15em; font-style: normal; }
.definition .lim { font-family: var(--serif); font-style: italic; color: var(--ink); }

.definition.huge {
  font-size: clamp(1.55rem, 3.4vw, 2.5rem);
  line-height: 1.3;
}

.definition.huge .fx {
  font-style: italic;
  margin-right: 0.05em;
}
.definition.huge .op {
  display: inline-block;
  margin: 0 0.15em;
  color: var(--ink);
  font-style: normal;
}

/* lim x→∞ stacked notation — proper math typesetting */
.lim-stack {
  display: inline-grid;
  grid-template-columns: max-content;
  justify-items: center;
  vertical-align: middle;
  line-height: 1;
  margin-right: 0.12em;
}
.lim-stack .above {
  font-style: italic;
  font-weight: 400;
}
.lim-stack .below {
  font-size: 0.4em;
  font-style: italic;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin-top: 0.25em;
  white-space: nowrap;
}

.theorem {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1.6rem;
  align-items: baseline;
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}

.theorem dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--pencil);
  text-transform: lowercase;
  padding-top: 0.3rem;
}

.theorem dd { margin: 0; font-style: italic; }
.theorem dd .sym { color: var(--red); font-style: italic; }
.theorem dd .op  { color: var(--pencil); margin: 0 0.15em; font-style: normal; }

/* ── notebook entry ─────────────────────────────────────── */

.entry {
  display: grid;
  grid-template-columns: 5rem 1fr;
  align-items: baseline;
  column-gap: 1.6rem;
  row-gap: 0.35rem;
  padding-block: 1.3rem;
  border-top: 1px solid var(--rule-soft);
}

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

.entry .label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--pencil);
  text-transform: lowercase;
  align-self: start;
  padding-top: 0.4rem;
}

.entry .body { color: var(--ink); }
.entry .body p { margin: 0; }
.entry .body p + p { margin-top: 0.35rem; }

@media (max-width: 560px) {
  .entry { grid-template-columns: 1fr; gap: 0.3rem; }
  .entry .label { padding-top: 0; }
}

/* void / failed entry — log it, strike it, move on */
.entry.void {
  color: var(--pencil);
  opacity: 0.78;
}
.entry.void .label { color: var(--red); }
.entry.void .body {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.entry.void .title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--pencil);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
}
.entry.void .meta-line {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--red);
  text-transform: uppercase;
}

/* session-row variant — label + body stack with inline waveform.
   Anchors (clickable) and divs (void) share the same shape. */

a.entry.session-row {
  text-decoration: none;
  color: inherit;
  transition: background 220ms ease;
}
a.entry.session-row:hover,
a.entry.session-row:focus-visible {
  outline: none;
  background: rgba(176, 58, 46, 0.04);
}
a.entry.session-row:hover .title,
a.entry.session-row:focus-visible .title {
  color: var(--red);
}
a.entry.session-row .title {
  transition: color 220ms ease;
}

.entry.session-row {
  align-items: start;
}

.entry.session-row .body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.entry.session-row .body .row {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.entry.session-row .title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* title as a link to the full audio on soundgasm */
.entry.session-row a.title-link {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}
.entry.session-row a.title-link:hover,
.entry.session-row a.title-link:focus-visible {
  color: var(--red);
  border-bottom-color: var(--red);
  outline: none;
}

.entry.session-row .meta-line {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--pencil);
}

.entry.session-row .wave-mini {
  display: block;
  width: 100%;
  height: 100px;
  margin-top: 0.1rem;
  color: var(--ink);
}

/* apparatus list — lab-notebook equipment line, between title and waveform */
.entry.session-row .apparatus {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  color: var(--pencil);
  margin: 0;
  text-transform: lowercase;
  line-height: 1.6;
}

.entry.session-row .apparatus .lab {
  color: var(--faint);
  letter-spacing: 0.15em;
  margin-right: 0.7em;
}

.entry.session-row .apparatus .sep {
  color: var(--rule);
  margin: 0 0.4em;
}

/* void session-row: title struck through, label red, no actions */
.entry.session-row.void .title {
  color: var(--pencil);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
}
.entry.session-row.void .label { color: var(--red); }
.entry.session-row.void .meta-line {
  color: var(--red);
  text-transform: uppercase;
}
.entry.session-row.void .wave-mini { opacity: 0.55; }

/* void session: handwritten fault note superimposed on the trace */
.wave-figure {
  position: relative;
  width: 100%;
}
.hand-on-wave {
  position: absolute;
  /* empty band below the flatline, just right of the fault × (~25% across) */
  left: 28%;
  top: 52%;
  margin: 0;
  font-size: 1.1rem;
  transform: rotate(-6deg);
  transform-origin: left center;
  pointer-events: none;
  white-space: nowrap;
}

/* ── waveform player ─────────────────────────────────────── */

.wave-figure.player {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 2px;
  margin-top: 0.1rem;
  transition: background 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.wave-figure.player:hover,
.wave-figure.player:focus-visible {
  outline: none;
  background: rgba(176, 58, 46, 0.035);
  border-color: var(--rule-soft);
}

.wave-figure.player .wave-mini {
  margin-top: 0;
}

/* timecode + transport readout, top-right of the figure — writes directly
   to the paper, no plate behind it */
.wave-figure.player .timecode {
  position: absolute;
  top: 0.1rem;
  right: 0.4rem;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--pencil);
  pointer-events: none;
  white-space: nowrap;
}

.wave-figure.player .timecode .glyph {
  color: var(--red);
  margin-right: 0.5em;
  letter-spacing: 0;
}

.wave-figure.player.playing .timecode {
  color: var(--ink);
}

/* transport state label, sits just below the waveform box
   (left-aligned with the plot area) — only while playing */
.wave-figure.player::after {
  content: none;
}
.wave-figure.player.playing::after {
  content: "playing";
  position: absolute;
  left: 5%;
  top: calc(100% + 4px);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  color: var(--red);
  pointer-events: none;
}

/* mode indicator — SAMPLE or FULL — sits on the graph in the upper-left,
   tells the listener what's playing (or about to play) */
.wave-figure.player .mode-label {
  position: absolute;
  top: 0.1rem;
  left: 5%;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  color: var(--red);
  pointer-events: none;
}

/* "continue" affordance — appears after the preview finishes naturally,
   unlocks the full recording. fades in. clicking it starts the full. */
.wave-figure.player .continue-link {
  position: absolute;
  left: 5%;
  top: calc(100% + 4px);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px dotted var(--red);
  cursor: pointer;
  opacity: 0;
  transition: opacity 600ms ease;
}
.wave-figure.player .continue-link.visible {
  opacity: 1;
}
.wave-figure.player .continue-link:hover,
.wave-figure.player .continue-link:focus-visible {
  outline: none;
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.entry.session-line .body {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding-right: 2rem;
}

.entry.session-line .title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color 220ms ease;
}

.entry.session-line .meta-line {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--pencil);
}

.entry.session-line .arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(-6px, -50%);
  font-family: var(--mono);
  color: var(--red);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

.entry.session-line:hover,
.entry.session-line:focus-visible {
  outline: none;
  background: rgba(176, 58, 46, 0.04);
}

.entry.session-line:hover .title,
.entry.session-line:focus-visible .title { color: var(--red); }

.entry.session-line:hover .arrow,
.entry.session-line:focus-visible .arrow {
  opacity: 1;
  transform: translate(0, -50%);
}

@media (max-width: 560px) {
  .entry.session-line .arrow { display: none; }
}

/* ── bare link list ─────────────────────────────────────── */

.linklist { list-style: none; margin: 0; padding: 0; }
.linklist.bare li { border-bottom: none; padding: 0; }
.linklist.bare a {
  display: inline-block;
  padding: 0.45rem 0;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-soft);
  text-underline-offset: 0.28em;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}
.linklist.bare a:hover, .linklist.bare a:focus-visible {
  color: var(--red);
  text-decoration-color: var(--red);
}

/* ── session detail ─────────────────────────────────────── */

.session-header { margin-bottom: 2.4rem; }
.session-header h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.note {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--pencil);
  text-transform: lowercase;
  margin: 0.4rem 0 0;
}
.note::before { content: ""; }

/* ── CTAs ───────────────────────────────────────────────── */

.cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem 0.9rem; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  background: transparent;
  border-radius: 1px;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.cta:hover, .cta:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
}

.cta.primary {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
}

.cta.primary:hover, .cta.primary:focus-visible {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.cta .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

/* ── sketch SVGs ────────────────────────────────────────── */

.sketch {
  display: block;
  color: var(--ink);
}

.sketch.signature {
  width: 100%;
  max-width: none;
  height: auto;
  margin: 1.5rem 0 0;
}

.sketch-wave {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 320;
  color: var(--ink);
}

/* labels INSIDE sketches */
.sketch text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  fill: var(--ink);
}
.sketch text.red { fill: var(--red); }
.sketch text.mono {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  fill: var(--pencil);
  letter-spacing: 0.05em;
}

/* ── footer ─────────────────────────────────────────────── */

.site-footer {
  padding-block: 2rem 2.4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 1.2rem;
  border-top: 1.5px solid var(--ink);
  position: relative;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--pencil);
  text-transform: lowercase;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -5px;
  height: 1px;
  background: var(--ink);
  opacity: 0.35;
}

.site-footer .center {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--red);
}

.site-footer .center .glyph {
  font-size: 1.6rem;
}

.site-footer .center .asymptote {
  height: 1.18em;
}

.site-footer .right { text-align: right; }

@media (max-width: 560px) {
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer .center { grid-column: 1 / -1; grid-row: 1; text-align: center; }
}

/* ── sections / motion ──────────────────────────────────── */

section {
  margin-block: clamp(2.5rem, 7vh, 4.5rem);
  animation: rise 900ms ease both;
}
section + section { margin-top: clamp(3rem, 8vh, 5rem); }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  section { animation: none; }
}

/* ── utility ────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 1px;
}

@media (max-width: 560px) {
  html, body { font-size: 17px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta { justify-content: center; }
}
