@font-face { font-family: "Migra"; src: url("/assets/fonts/migra-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Migra"; src: url("/assets/fonts/migra-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Migra"; src: url("/assets/fonts/migra-extrabold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Migra"; src: url("/assets/fonts/migra-extrabold-italic.woff2") format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Iosevka"; src: url("/assets/fonts/iosevka-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Iosevka"; src: url("/assets/fonts/iosevka-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* Strlng — site.css. Tokens first; every rule below reads from them. */

/* Three themes. A theme only redefines colour tokens; every component reads tokens,
   so any element can switch theme. --ink is always "the text colour". */
:root,
.theme-paper {
  --bg: #f0eeea;
  --ink: #211922;
  --mid: #444440;
  --muted: #6b665f;
  --ghost: #a09b94;
  /* Both rules are one tint of the ink colour: the horizontal a step above the
     vertical (0.10 / 0.07), so a section break leads without shouting. Every
     theme uses the same pair of steps against its own ground. */
  --rule: rgba(33, 25, 34, .10);
  --grid-line: rgba(33, 25, 34, .07);
  --accent: #e85a3c;
  --hover: #e85a3c;
  --focus: #e85a3c;
  --code-bg: #211922;
  --code-fg: #e9e6df;
  --code-dim: #9a948b;
  --btn-bg: #211922;
  --btn-fg: #f0eeea;
  --btn-hover-bg: #e85a3c;
  --btn-hover-fg: #211922;
}

/* On coral only ink passes AA, so every text token is ink. Off-white appears only as the
   T1 accent (large text) and as hover. */
.theme-coral {
  --bg: #e85a3c;
  --ink: #211922;
  --mid: #211922;
  --muted: #211922;
  --ghost: rgba(33, 25, 34, .45);
  --rule: rgba(33, 25, 34, .17);
  --grid-line: rgba(33, 25, 34, .12);
  --accent: #f0eeea;
  --hover: #f0eeea;
  --focus: #211922;
  --code-bg: #211922;
  --code-fg: #e9e6df;
  --code-dim: #9a948b;
  --btn-bg: #211922;
  --btn-fg: #f0eeea;
  --btn-hover-bg: #f0eeea;
  --btn-hover-fg: #211922;
}

.theme-ink {
  --bg: #211922;
  --ink: #f0eeea;
  --mid: #c9c4bb;
  --muted: #a8a39b;
  --ghost: rgba(240, 238, 234, .3);
  --rule: rgba(240, 238, 234, .10);
  --grid-line: rgba(240, 238, 234, .07);
  --accent: #e85a3c;
  --hover: #e85a3c;
  --focus: #e85a3c;
  --code-bg: #2e2630;
  --code-fg: #e9e6df;
  --code-dim: #a39d94;
  --btn-bg: #f0eeea;
  --btn-fg: #211922;
  --btn-hover-bg: #e85a3c;
  --btn-hover-fg: #211922;
}

:root {
  --c-paper: #f0eeea;
  --c-ink: #211922;
  --c-coral: #e85a3c;

  --serif: "Migra", Georgia, "Times New Roman", serif;
  --mono: "Iosevka", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 6%;

  /* The vertical rules and every two-column break read from these. --split-frac is
     the fraction of the text column where content divides (7/12); the rule sits
     exactly where the right-hand column starts, so the grid is visible, not implied. */
  --split-frac: .5833;
  --col-gap: 4%;
  --rule-x1: var(--gutter);
  --rule-x2: calc(var(--gutter) + (100% - 2 * var(--gutter)) * var(--split-frac));
  --rule-x3: calc(100% - var(--gutter));
  --section-space: clamp(56px, 8vw, 96px);
}

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

/* Past the ends of a framed page (overscroll, or a page shorter than the window),
   show the frame colour rather than the paper body. */
html.frame-coral { background: var(--c-coral); }
html.frame-ink { background: var(--c-ink); }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Paper grain. Fixed, above content, ignores the pointer. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; }

.frame { padding-inline: var(--gutter); }

.grid-lines { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.grid-lines i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid-line); }
.grid-lines i:nth-child(1) { left: var(--rule-x1); }
.grid-lines i:nth-child(2) { left: var(--rule-x2); }
.grid-lines i:nth-child(3) { left: var(--rule-x3); }

.theme-paper, .theme-coral, .theme-ink {
  background-color: var(--bg);
  color: var(--ink);
  background-image:
    linear-gradient(var(--grid-line), var(--grid-line)),
    linear-gradient(var(--grid-line), var(--grid-line)),
    linear-gradient(var(--grid-line), var(--grid-line));
  background-size: 1px 100%;
  background-position: var(--rule-x1) 0, var(--rule-x2) 0, var(--rule-x3) 0;
  background-repeat: no-repeat;
}

/* ---------- Type tiers: Migra for what we believe, Iosevka for how it works ---------- */

.t1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(56px, 10vw, 128px);
  line-height: .92;
  letter-spacing: -.028em;
}
.t1 em { font-style: italic; color: var(--accent); }

.t2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.9vw, 36px);
  line-height: 1.2;
  letter-spacing: -.012em;
  max-width: 28ch;
  color: var(--ink);
}
.t2 em { font-style: italic; }

.t3 { font-family: var(--mono); font-size: 15px; line-height: 1.7; color: var(--mid); max-width: 72ch; }

.t3-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

code { font-family: var(--mono); font-size: .93em; }

/* ---------- Layout primitives ---------- */

.section { padding-block: var(--section-space); border-top: 1px solid var(--rule); }
.section-label { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.section-label::after { content: ""; width: 32px; height: 1px; background: var(--ghost); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 6%; align-items: start; }
.stack > * + * { margin-top: 16px; }

.hero { padding-block: clamp(48px, 8vw, 88px) clamp(40px, 6vw, 64px); }
.hero .t1 { max-width: 11ch; }
.hero .t2 { margin-top: 36px; }
.hero .t3 { margin-top: 24px; }

.button {
  display: inline-block;
  font: 600 13px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 14px 20px;
  text-decoration: none;
}
.button:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); }

/* ---------- Header ---------- */

.site-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 16px 24px; padding-block: 28px; }
.wordmark { font-family: var(--serif); font-size: 26px; line-height: 1; text-decoration: none; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; font-size: 13px; }
.site-header nav a { color: var(--mid); text-decoration: none; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); padding-block: var(--section-space) 32px; }
.site-footer .t2 { margin-bottom: 24px; }
.footer-email a { font-size: 18px; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.footer-email a:hover { text-decoration-color: var(--hover); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: var(--section-space); padding-top: 16px; border-top: 1px solid var(--rule); }

/* ---------- Narrow screens ---------- */

@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-lines i:nth-child(2) { display: none; }
  .theme-paper, .theme-coral, .theme-ink { background-position: var(--rule-x1) 0, -10px 0, var(--rule-x3) 0; }
}

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

/* ---------- Banners ---------- */

@keyframes band-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.band { overflow: hidden; padding-block: 18px; }
.band__strip { width: 106%; margin-left: -3%; padding-block: 15px; background: var(--c-coral); transform: rotate(-1deg); }
.band--ink .band__strip { background: var(--c-ink); }
.band--reverse .band__strip { transform: rotate(.8deg); }
.band + .band { margin-top: -18px; }
.band__track { display: flex; width: max-content; animation: band-scroll 30s linear infinite; }
.band--reverse .band__track { animation-direction: reverse; }
.band:hover .band__track { animation-play-state: paused; }
.band__set { display: flex; }
.band__set span {
  font: 600 13px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-paper);
  white-space: nowrap;
  padding-inline: 22px;
}
.band__set span::after { content: "\2022"; margin-left: 44px; opacity: .5; }
.band--pop .band__set span { color: var(--c-ink); }

/* ---------- Reveal: hidden only after reveal.js marks <html class="js"> ---------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.16, 1, .3, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .band__track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media print { .js .reveal { opacity: 1; transform: none; } .band { display: none; } }

/* ---------- Facts strip ---------- */

.facts { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 28px; }
.facts dd { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }

/* ---------- Call to action ---------- */

.cta .t3 { margin-top: 20px; }
.cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }

/* ---------- Terminal excerpts: real text, never images ---------- */

.terminal {
  font: 13.5px/1.75 var(--mono);
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 20px 22px;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.terminal .t-prompt { color: var(--code-dim); }
.terminal .t-dim { color: var(--code-dim); }
.terminal .t-add { color: #9fc79a; }
.terminal .t-mod { color: #e5c07b; }
.terminal .t-del { color: #f08a72; }

/* ---------- Home ---------- */

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

.hero__products { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; }

.tools { display: grid; grid-template-columns: 1fr 1fr; }
.tool { border-top: 1px solid var(--rule); padding: 24px 6% 0 0; }
.tool + .tool { border-left: 1px solid var(--rule); padding-left: 6%; }
.tool__name { font-size: clamp(48px, 6vw, 72px); }
.tool__name a { text-decoration: none; }
.tool__name a:hover { color: var(--hover); }
.tool .t2 { margin-top: 16px; }
.tool .t3 { margin-top: 16px; }
.tool__more { display: inline-block; margin-top: 20px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); }
.tool__more:hover { border-color: var(--hover); }

.principle-lines { list-style: none; margin-bottom: 32px; }
.principle-lines li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: baseline; padding-block: 18px; border-top: 1px solid var(--rule); }
.principle-lines li:last-child { border-bottom: 1px solid var(--rule); }
.principle-line { max-width: none; }

@media (max-width: 760px) {
  .tools { grid-template-columns: 1fr; }
  .tool + .tool { border-left: 0; padding-left: 0; margin-top: 48px; }
  .principle-lines li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Product pages ---------- */

.hero .facts { margin-top: 36px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 4%; margin-block: 40px; }
.steps li { border-top: 1px solid var(--rule); padding-top: 18px; }
.steps h3 { font: 600 18px var(--mono); margin-block: 8px; color: var(--ink); }
.steps h3 code { font-size: inherit; }

.table-wrap { overflow-x: auto; margin-top: 40px; }
.faces { width: 100%; border-collapse: collapse; font-size: 14px; }
.faces th, .faces td { text-align: left; padding: 14px 16px 14px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.faces thead th { font-family: var(--serif); font-weight: 400; font-size: 22px; border-top: 1px solid var(--rule); }
.faces tbody th { font-weight: 400; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); width: 22%; }
.faces td { color: var(--mid); }

.not-list { list-style: none; margin-top: 32px; max-width: 72ch; }
.not-list li { padding-block: 14px; border-top: 1px solid var(--rule); color: var(--mid); }
.not-list strong { font-weight: 600; color: var(--ink); }

/* ---------- Principles ---------- */

.principles { list-style: none; }
.principle { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 16px 24px; align-items: baseline; padding-block: 32px; border-top: 1px solid var(--rule); }
.principle:last-child { border-bottom: 1px solid var(--rule); }

@media (max-width: 760px) {
  .principle { grid-template-columns: 1fr; gap: 8px; }
}
