/* amnes.io — paper and iron-gall ink. Self-hosted fonts only. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f1efe9;
  --paper-2: #e9e6dd;
  --ink: #18203a;        /* iron-gall blue-black */
  --ink-2: #2e3d7d;      /* fresh ink, accents */
  --muted: #525866;
  --sepia: #8a6747;      /* oxidised ink, the faded line */
  --rule: #d3cec2;
  --focus: #2e3d7d;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 56px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 380;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--ink-2); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px; font: 14px/1 var(--mono);
  text-decoration: none; border-radius: 3px;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }

/* ------------------------------------------------------------ header */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  font: 13px/1 var(--mono); letter-spacing: .02em;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; padding: 6px 0; }
.brand-mark { width: 22px; height: 22px; }
.brand-mark path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.brand-mark circle { fill: var(--ink-2); }
.top ul { list-style: none; display: flex; gap: clamp(14px, 3vw, 32px); margin: 0; padding: 0; }
.top nav a { color: var(--muted); text-decoration: none; display: inline-block; padding: 8px 0; }
.top nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .35em; }
@media (max-width: 420px) { .top nav li:not(:last-child) { display: none; } }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 96px var(--gutter) 150px;
  background:
    radial-gradient(120% 80% at 50% 45%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%),
    var(--paper);
}
@media (min-height: 1000px) { .hero { min-height: 900px; } }
.ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.hero-core { position: relative; z-index: 2; text-align: center; pointer-events: none; }
.hero-core a { pointer-events: auto; }
.etym {
  margin: 0 0 .9em; font: 12.5px/1.5 var(--mono); color: var(--muted); letter-spacing: .02em;
}
.etym i { font-family: var(--serif); font-size: 1.12em; color: var(--ink); }
.wordmark {
  margin: 0;
  font-weight: 300;
  font-size: clamp(5.5rem, 25vw, 14.5rem);
  line-height: .86;
  letter-spacing: -.045em;
  font-variation-settings: "opsz" 144;
  color: var(--ink);
  padding-right: .04em;
}
.tagline {
  margin: .55em 0 0;
  font-style: italic; font-weight: 340;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.35;
  color: var(--ink);
}

.fragments { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.frag {
  position: absolute; left: 0; top: 0;
  pointer-events: auto;
  appearance: none; background: none; border: 0; margin: 0;
  padding: 10px 8px;
  min-height: 44px;
  font: italic 360 clamp(15px, .55vw + 11px, 19px)/1.25 var(--serif);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  will-change: transform;
}
.frag .t { display: inline-block; will-change: opacity, filter; }
.frag.wrapok { white-space: normal; }
.frag[hidden] { display: none; }
.frag:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; text-decoration-color: var(--rule); }

.instrument {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  padding: 0 var(--gutter) 26px;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 32px;
}
.hint { margin: 0; max-width: 34rem; font-size: .98rem; line-height: 1.5; color: var(--muted); }
.hint strong { font-weight: 500; color: var(--ink); }
.readout { margin: 0; font: 12px/1.6 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.readout { max-width: 100%; }
.readout-last { display: block; color: var(--ink-2); min-height: 1.6em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: min(34rem, calc(100vw - 2 * var(--gutter))); }

/* ------------------------------------------------------------ blocks */
.block { padding: clamp(80px, 12vw, 160px) 0; border-top: 1px solid var(--rule); }
.block.name, .block.ideas { background: var(--paper-2); }
.kicker { margin: 0 0 1.4rem; font: 12.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
h2 {
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  font-weight: 340;
  font-size: clamp(2.05rem, 4.6vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  max-width: 17ch;
  text-wrap: balance;
}
.prose { max-width: 37rem; margin-left: auto; font-size: clamp(1.06rem, .4vw + .95rem, 1.2rem); }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose em, .prose i { font-style: italic; }
.eq { font-family: var(--serif); font-style: italic; white-space: nowrap; }
.eq sup { font-size: .7em; }

/* the name */
.roots {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 24px;
  margin: 0 0 clamp(3rem, 7vw, 5rem);
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.root { margin: 0; }
.word {
  margin: 0; font-weight: 300; font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1;
  letter-spacing: -.025em; font-variation-settings: "opsz" 144;
}
.word .pre { font-style: italic; color: var(--ink-2); }
.gloss { margin: 1.1rem 0 .4rem; font: 13px/1.5 var(--mono); color: var(--muted); }
.gloss b { font-weight: 400; color: var(--ink); }
.root figcaption { font-style: italic; font-size: 1.12rem; color: var(--ink); }
.bridge { align-self: center; width: clamp(48px, 7vw, 80px); padding-top: .2rem; }
.bridge svg { width: 100%; height: auto; display: block; }
.bridge path { fill: none; stroke: var(--sepia); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 720px) {
  .roots { grid-template-columns: 1fr; gap: 18px; }
  .bridge { width: 44px; transform: rotate(90deg); margin: 4px 0 4px 8px; }
}

/* the curve */
.chart { margin: clamp(3rem, 7vw, 5rem) 0 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--rule); stroke-width: 1; shape-rendering: crispEdges; }
.chart .grid line.base { stroke: #a9a395; }
.chart text { font: 12px var(--mono); fill: var(--muted); }
.chart text.lbl { font: italic 15px var(--serif); fill: var(--ink); }
.chart text.lbl.alone { fill: var(--sepia); }
.c-alone { fill: none; stroke: var(--sepia); stroke-width: 1.6; stroke-dasharray: 5 5; }
.c-spaced { fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linejoin: round; }
.marks circle { fill: var(--paper); stroke: var(--ink-2); stroke-width: 2; }
.chart figcaption { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .95rem; color: var(--muted); }
.key { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-style: italic; }
.sw { display: inline-block; width: 28px; height: 0; border-top: 2.2px solid var(--ink-2); }
.sw-alone { border-top: 1.6px dashed var(--sepia); }
.note { flex-basis: 100%; max-width: 46rem; font-size: .92rem; line-height: 1.55; }

/* three ideas */
.triad { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.triad li { border-top: 1px solid var(--ink); padding-top: 22px; }
.triad h3 { margin: 0 0 .8rem; font-weight: 400; font-size: clamp(1.45rem, 2vw, 1.75rem); line-height: 1.15; letter-spacing: -.01em; }
.triad .n { display: block; margin-bottom: 14px; font: 12.5px/1 var(--mono); letter-spacing: .08em; color: var(--ink-2); }
.triad p { margin: 0; color: #2b3142; }
@media (max-width: 820px) { .triad { grid-template-columns: 1fr; } }

/* contact */
.contact { text-align: left; }
.closing {
  font-weight: 300; font-size: clamp(2.3rem, 6.2vw, 5rem); line-height: 1.04; max-width: 14ch; letter-spacing: -.03em;
  font-variation-settings: "opsz" 144;
}
.mail { margin: 0; font-size: clamp(1.15rem, 1vw + .9rem, 1.45rem); }
.mail a { white-space: nowrap; }

/* footer */
.foot { border-top: 1px solid var(--rule); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 26px 34px; font: 12.5px/1.5 var(--mono); color: var(--muted); }
.foot p { margin: 0; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
  .hero { padding-bottom: 170px; }
  .hint { font-size: .9rem; }
  .etym span { display: block; }
  .etym .sep { display: none; }
}
