/*
  isocline.app

  Colors, type families, radii and line weights come from /tokens/isocline.css,
  which is generated from docs/design/tokens/isocline.tokens.json. Nothing here
  sets a palette color of its own; the page follows the system's light or dark
  appearance through those tokens.
*/

/* ── Fonts: the app's own files, served from this origin ─────────────────── */

@font-face { font-family: 'IBM Plex Serif'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/IBMPlexSerif-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Serif'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/IBMPlexSerif-Bold.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/IBMPlexMono-Regular.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/IBMPlexMono-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/AtkinsonHyperlegibleNext-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/AtkinsonHyperlegibleNext-Bold.ttf') format('truetype'); }

/* ── Local roles built on the tokens ─────────────────────────────────────── */

:root {
  --gutter: clamp(22px, 5.5vw, 80px);
  /* The filled pill: accent on day paper is too light for small text, so day uses the deeper level tone. */
  --pill: var(--level-low);
  --on-pill: var(--on-accent);
  /* The cut-out wordmark: a shadow under the top edge, a light catch on the bottom edge, a rim all round. */
  --cut-shade: var(--ink);
  --cut-shade-opacity: 0.6;
  --cut-rim: var(--ink);
  --cut-rim-opacity: 0.26;
  --cut-lite: var(--emboss-light);
  --cut-lite-opacity: 0.95;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pill: var(--accent);
    --on-pill: var(--paper);
    --cut-shade: black;                 /* a shadow, not a palette color */
    --cut-shade-opacity: 0.95;
    --cut-rim-opacity: 0.5;
    --cut-lite: var(--ink);
    --cut-lite-opacity: 0.9;
  }
}

/* ── Base ────────────────────────────────────────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

h1, h2, p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 10; background: var(--card); border: var(--line-hairline) solid var(--line); border-radius: var(--radius-control); padding: 8px 14px; }
.skip:focus { left: 12px; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

.mono, .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow { font-size: 11px; color: var(--muted); }

/* ── The plates (assets/plates.js draws into this) ───────────────────────── */

.plates { position: absolute; inset: 0; overflow: hidden; background: var(--paper); }
.plates svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plates__slot { opacity: 0; transform-origin: 720px 450px; }
.plates__slot path { stroke-linecap: round; stroke-linejoin: round; }
.plates__low { stop-color: var(--level-low); }
.plates__high { stop-color: var(--level-high); }

/* ── The lockup: cut-out wordmark with the page links under it ───────────── */

.lockup { position: relative; margin: 0; font: inherit; }
.lockup__mark { display: block; }
.lockup__mark svg { display: block; width: 100%; height: auto; overflow: visible; }
.lockup__word { fill: var(--paper); filter: url(#cut); }
.cut-shade { flood-color: var(--cut-shade); flood-opacity: var(--cut-shade-opacity); }
.cut-rim { flood-color: var(--cut-rim); flood-opacity: var(--cut-rim-opacity); }
.cut-lite { flood-color: var(--cut-lite); flood-opacity: var(--cut-lite-opacity); }

.lockup__nav { position: absolute; right: 0; top: 100%; margin-top: 8px; display: flex; gap: clamp(22px, 2.2vw, 32px); }
.lockup__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  /* A tight paper glow so the words hold over a busy plate. */
  text-shadow: 0 0 2px var(--paper), 0 0 6px var(--paper), 0 0 10px var(--paper);
}
.lockup__nav a[aria-current="page"] { font-weight: 500; text-decoration-thickness: 2px; }

/* ── Home ────────────────────────────────────────────────────────────────── */

.home { position: relative; min-height: max(100vh, 620px); min-height: max(100svh, 620px); overflow: hidden; display: flex; flex-direction: column; }
.home__center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.home__center .lockup { width: clamp(250px, 47vw, 680px); pointer-events: auto; }

.home__foot {
  position: relative;
  margin-top: auto;
  padding: 120px var(--gutter) max(44px, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  background: linear-gradient(180deg, transparent 0%, var(--paper) 70%);
}

.tagline { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 2.8vw, 40px); line-height: 1.1; letter-spacing: -0.01em; }

.notify { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.notify__form { margin: 0; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input {
  width: 290px;
  max-width: 100%;
  height: 44px;
  padding: 0 14px;
  border: var(--line-hairline) solid var(--faint);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
}
.notify__status { flex-basis: 100%; min-height: 1.4em; text-align: right; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.notify__status:empty { display: none; }

/* A field people never see; an address that arrives with it filled is dropped. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--action-pill-min-height);
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--pill);
  color: var(--on-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.pill:disabled { opacity: 0.6; cursor: default; }
.pill:focus-visible { border-radius: 999px; }

@media (max-width: 640px) {
  .home__foot { flex-direction: column; align-items: stretch; padding-top: 90px; gap: 16px; background: linear-gradient(180deg, transparent 0%, var(--paper) 45%); }
  .notify { margin-left: 0; align-items: stretch; gap: 16px; }
  .notify__form { flex-direction: column; align-items: stretch; }
  .field input { width: 100%; }
  .notify__status { text-align: left; }
  .pill { font-size: 15px; }
}

/* ── Every other page ────────────────────────────────────────────────────── */

.site-header { position: relative; height: clamp(300px, 190px + 28vw, 400px); overflow: hidden; border-bottom: var(--line-hairline) solid var(--line); }
.site-header__inner { position: absolute; inset: 0; display: flex; align-items: center; }
.site-header .lockup { width: clamp(240px, 42vw, 600px); }

.page { padding-top: clamp(40px, 5vw, 64px); }
.prose { max-width: 680px; display: flex; flex-direction: column; gap: 36px; }
.prose__intro { display: flex; flex-direction: column; gap: 14px; }
.prose h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; letter-spacing: -0.01em; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.3; }
.prose section { display: flex; flex-direction: column; gap: 10px; }
.lede { margin-top: 6px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; }

/* What you can act on sits in a card, one hairline deep. */
.card {
  background: var(--card);
  border: var(--line-hairline) solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.card__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card__value { font-family: var(--font-mono); font-weight: 500; font-size: 18px; overflow-wrap: anywhere; }

/* What simply is sits flush on the paper, separated by hairlines. */
.rows { display: flex; flex-direction: column; border-bottom: var(--line-hairline) solid var(--line); }
.rows > div { border-top: var(--line-hairline) solid var(--line); padding: 22px 0; display: flex; flex-direction: column; gap: 8px; }
.rows h2 { font-size: 19px; line-height: 1.35; }

.note { display: flex; flex-direction: column; gap: 8px; }

.site-footer { margin-top: 80px; }
.site-footer__inner {
  border-top: var(--line-hairline) solid var(--line);
  padding: 28px 0 max(64px, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.notfound { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.notfound .page { flex-grow: 1; }
.notfound .prose { gap: 14px; align-items: flex-start; }
.notfound .pill { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
