/* Parched site: what these pages add to the MEK design system (design/), linked after it and unlayered, so it wins.
   MEK's Figma, on MEK's own two colours (a pale cyan ground, an olive-black ink, steps of the one into the other), Parched for display and Dosage Humanist for text. A cover, then
   four sections, each a Parched heading over a lede (see CLAUDE.md "Deviations" for the raw values). */

/* ---------- The fonts: the site's preview copies (restricted, marked: tools/font.py) ---------- */
@font-face { font-family: "Parched"; src: url("../assets/fonts/Parched-Preview.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Parched Frame"; src: url("../assets/fonts/Parched-Frame-Preview.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Parched Letter"; src: url("../assets/fonts/Parched-Letter-Preview.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Parched Fill"; src: url("../assets/fonts/Parched-Fill-Preview.woff2") format("woff2"); font-display: block; }

/* ---------- The theme: MEK's pale cyan ground and olive-black ink, on Light's ramp (2026-11-21) ---------- */
.parched {
  /* MEK's two colours: the ground #e5ffff and the ink #333319; every step between is the ink over the ground, mixed to a
     solid colour (never opacity on text), so the system's tokens (lines, soft and muted text, fills) follow them */
  --ground: #e5ffff; --ink: #333319;
  --100: var(--ground);
  --200: color-mix(in srgb, var(--ink) 5%, var(--ground));
  --400: color-mix(in srgb, var(--ink) 15%, var(--ground));
  --500: color-mix(in srgb, var(--ink) 25%, var(--ground));
  --600: color-mix(in srgb, var(--ink) 40%, var(--ground));
  --700: color-mix(in srgb, var(--ink) 65%, var(--ground));   /* the weaker foreground: --text-muted, 4.2:1 on the ground */
  --800: color-mix(in srgb, var(--ink) 80%, var(--ground));
  --900: color-mix(in srgb, var(--ink) 92%, var(--ground));
  --1000: var(--ink);
  --accent: var(--ink); --500-accent: var(--600);   /* no colour accent (MEK's ask) */
}
body { background: var(--bg); }

/* ---------- Page dials ---------- */
:root {
  --site-max: 1600px;               /* the widest the site gets (MEK's ask) */
  --gap-section: 56px;               /* between a page's parts (MEK's Figma) */
  --gap-sections: 200px;             /* between the landing's sections, and from the cover to the first (MEK's ask) */
  --parched-n: 4;                    /* the tester's size: a multiple of Parched's 17px grid (68 on a desktop) */
  --lift: var(--bg);                 /* a lit ground under the letters (Lit ground in the tester) */
}
.parched { --lift: #fff; }
.crisp { -webkit-font-smoothing: none; }

/* ---------- Parched set in layers: two inks (frames in gilt, letters in rubric), one ink, or on a lit ground ----------
   Shown only where they're the point: the tester's modes and the specimen's two-ink row. Each layer font is drawn on the same grid cell; the page shows the ones its mode wants. */
.ink-two { display: inline-grid; }
.ink-two > .layer { grid-area: 1 / 1; white-space: pre; font-synthesis: none; }
.layer.frame { font-family: "Parched Frame"; color: var(--gilt); }
.layer.letter { font-family: "Parched Letter"; color: var(--rubric); }
.layer.whole { font-family: "Parched"; color: var(--text-strong); }
.layer.fill { font-family: "Parched Fill"; color: var(--lift); }

/* ---------- The cover: the first screen, as MEK's Figma frame (1200 × 800) ----------
   The mark top left, the links top right, the claim in the middle, its three facts at the foot. The claim is 14 cells a row,
   filling the width; spaces pad its rows, so the space tiles square the block. */
.cover { min-height: 100svh; max-width: var(--site-max); margin-inline: auto; box-sizing: border-box; padding: 32px; display: grid;
  grid-template-rows: 1fr auto 1fr; container-type: inline-size;
  font-family: var(--font-dosage); color: var(--text-strong); }
/* the claim in the middle row, the two halves equal, so it sits at the screen's middle (MEK's ask); on a short screen
   both halves grow to the taller one's content, so the cover grows and the claim stays in its middle */
.cover-top { min-height: 0; }
.cover-bottom { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 0; }
.cover-acts { margin-top: var(--gap-section); justify-content: center; font-family: var(--font-ui); }   /* under the claim, centred */

.cover-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 16px 32px; }
.cover-mark { width: min(360px, 100%); display: grid; gap: 16px; }
.cover-mark p { margin: 0; }
.cover-lede { font-size: 24px; line-height: 32px; }
.initial { font: 25px / 0 "Parched"; -webkit-font-smoothing: none; }
.cover-nav { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; font-size: 18px; line-height: 23px; white-space: nowrap; }
.cover-nav a { display: inline-flex; align-items: center; gap: 4px; }
/* The nav stays put at the top right as the page scrolls (MEK's ask); what passes under it fades out through a 2×2
   ordered dither in the ground, denser towards the nav, in four rings (25, 50, 75, 100%), so no gradient and no blur. */
.cover-nav { position: fixed; z-index: var(--z-sticky); top: 32px; right: max(32px, calc((100vw - var(--site-max)) / 2 + 32px)); }
.nav-veil { position: absolute; inset: -40px -64px; z-index: -1; pointer-events: none; background-size: 2px 2px;
  background-image: conic-gradient(var(--bg) 0 25%, transparent 0); -webkit-mask: radial-gradient(farthest-side, #000 99%, transparent 100%); mask: radial-gradient(farthest-side, #000 99%, transparent 100%); }
.nav-veil i { position: absolute; inset: 0; background-size: 2px 2px; }
.nav-veil i:nth-child(1) { background-image: conic-gradient(var(--bg) 0 25%, transparent 0 50%, var(--bg) 0 75%, transparent 0);
  -webkit-mask: radial-gradient(farthest-side, #000 80%, transparent 80%); mask: radial-gradient(farthest-side, #000 80%, transparent 80%); }
.nav-veil i:nth-child(2) { background-image: conic-gradient(var(--bg) 0 75%, transparent 0);
  -webkit-mask: radial-gradient(farthest-side, #000 62%, transparent 62%); mask: radial-gradient(farthest-side, #000 62%, transparent 62%); }
.nav-veil i:nth-child(3) { background: var(--bg);
  -webkit-mask: radial-gradient(farthest-side, #000 45%, transparent 45%); mask: radial-gradient(farthest-side, #000 45%, transparent 45%); }
.cover-nav .num { font: 25px / 23px "Parched"; -webkit-font-smoothing: none; }
.cover-nav .muted { color: var(--text-muted); }
/* the claim fills the width: 14 cells of 16 font pixels across, 18 down a row (MEK's ask, 2026-11-21) */
.cover-title { margin: 0; font-family: "Parched"; font-size: calc(100cqi * 17 / 224); line-height: calc(100cqi * 18 / 224); display: grid; justify-content: start; }
.cover-title .rows { display: grid; }
.cover-title .rows.narrow { display: none; }
.cover-title .row { white-space: pre; }
.cover-facts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; font-size: 18px; line-height: 24px; }   /* each fact framed; four across where they fit, else two by two (MEK's ask) */
.cover-facts > .px-box { padding: var(--space-6); }   /* roomier than the system's largest pad (16) */
.cover-facts .more { color: var(--text-muted); }   /* the follow-up in the nav price's grey */
@media (max-width: 1099px) { .cover-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A phone (MEK's Figma, frame 2): one column, the links first, the claim 7 cells a row filling the width */
@media (max-width: 735px)  {
  .cover { height: auto; min-height: 0; padding: 16px; display: flex; flex-direction: column; gap: var(--gap-section); }
  .cover-top, .cover-bottom { display: flex; flex-direction: column; gap: var(--gap-section); }
  .cover-acts { margin-top: 0; }   /* (the column's 56 is the distance already) */
  .cover-bar { flex-direction: column-reverse; gap: var(--gap-section); }
  .cover-nav { top: 16px; left: 16px; right: auto; }
  .cover-mark { margin-top: calc(23px + var(--gap-section)); }   /* (room for the fixed nav above it) */
  .cover-mark { width: 100%; }
  .cover-lede { max-width: 360px; }
  .cover-title { font-size: calc(100cqi * 17 / 112); line-height: calc(100cqi * 18 / 112); }
  .cover-title .rows.wide { display: none; }
  .cover-title .rows.narrow { display: grid; }
  .cover-facts { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- The sections: the cover's language below it (the Design Master's plan, 2026-11-21) ----------
   Each opens on a lede in the cover's sentence form (its heading kept for screen readers only, MEK's ask), then its
   content, on the same grey, 32px under it; 200px between sections (104 on a phone). */
.wrap { max-width: var(--site-max); margin-inline: auto; padding-inline: 32px; box-sizing: border-box; }
.landing.wrap { display: grid; gap: var(--gap-sections); padding-block: calc(var(--gap-sections) - 32px) var(--gap-sections); }   /* (the cover's 32px foot counts towards the first gap) */
.sec { display: grid; gap: var(--space-8); min-width: 0; }
.sec-top { display: grid; gap: var(--space-4); }
.sec-head { margin: 0; font: 51px / 54px "Parched"; color: var(--text-strong); font-weight: normal; }
.sec-lede { margin: 0; max-width: 40ch; font: 24px / 32px var(--font-dosage); color: var(--text-strong); }
.sec-lede .link, .cover-nav .link, .cover-lede .link, .site-foot .link { font: inherit; }   /* the system's link, at its text's size */
.cover-nav .link { --ink: var(--text-strong); --ink-to: var(--text-strong); }   /* but the nav's, in black (MEK's ask) */
.more { color: var(--text-muted); }

/* Test type: one card, the bar over the sample */
.tester { display: grid; gap: var(--space-6); padding: var(--space-6); }
.tbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); }
.tbar .field { flex: 1 1 260px; min-width: 0; }
.sample { margin: 0; min-height: calc(18px * var(--parched-n)); overflow-wrap: break-word; white-space: break-spaces;
  font-size: calc(17px * var(--parched-n)); line-height: calc(18px * var(--parched-n)); }
.sample .layer { white-space: break-spaces; }   /* (a space at a line's end wraps too: Parched draws it, so it mustn't hang past the card) */

/* Glyphs: every glyph in order, bare on the ground, no frames (MEK's ask) */
.glyph-grid { display: grid; grid-template-columns: repeat(var(--cols, 12), minmax(0, 1fr)); gap: 0; --tile-min: 104px; }   /* every glyph, at 68, in a table of plain cells (MEK's ask) */
/* The table: each cell's line on its right and foot, the grid's on its top and left, so neighbours share one 1px line */
.glyph-grid:has(> .tile:not(.px-box)) { border-top: var(--stroke) solid var(--line); border-left: var(--stroke) solid var(--line); }
.tile { aspect-ratio: 16 / 18; display: grid; place-items: center; width: 100%; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 0;
  font: 68px / 72px "Parched"; color: var(--text); -webkit-font-smoothing: none;
  --ink: var(--text); --ink-to: var(--text-strong); --edge-to: var(--line-hover); }
.tile.rolling { --ink: var(--text-muted); --ink-to: var(--text-muted); }
/* Unframed (the Glyphs list): at rest in the weaker grey; hovered or focused, the glyph in black comes in over it
   through the system's dither (mek-dither-in: 25, 50, 75%, solid, a frame each), and goes at once (MEK's ask). */
.glyph-grid .tile:not(.px-box) { position: relative; color: var(--text-muted); border-right: var(--stroke) solid var(--line); border-bottom: var(--stroke) solid var(--line);; padding: 0 0 calc(1em / 17) calc(1em / 17); }
/* (each tile's ink is 15 × 17 of its 16 × 18 cell, an empty column at its right and an empty row on top: a pixel of
   padding on the left and foot centres the ink, not the cell, in the box) */
.glyph-grid .tile:not(.px-box)::after { content: attr(data-glyph); position: absolute; inset: 0; display: grid; place-items: center; padding: inherit;
  color: var(--text-strong); visibility: hidden; -webkit-mask-size: 4px 4px; mask-size: 4px 4px; }
.glyph-grid .tile:not(.px-box):is(:hover, :focus-visible)::after { visibility: visible; animation: mek-dither-in var(--dur-bar) step-end both; }
@media (prefers-reduced-motion: reduce) { .glyph-grid .tile:not(.px-box):is(:hover, :focus-visible)::after { animation: none; } }

/* The loupe: a Parched glyph is 16 × 18 cells; its layers are the styles to switch between */
.loupe { --loupe-cell: 18px; width: min(920px, calc(100% - 32px)); }   /* bigger, on the page's own ground, the four layers in a row (MEK's ask) */
.loupe-styles .sq { font-family: "Parched"; font-size: 68px; line-height: 72px; -webkit-font-smoothing: none; }
.loupe[open] { animation: none; }   /* (it grows out of the glyph instead, as mektxt.com's flyout: js/parched-site.js) */
@media (max-width: 735px) { .loupe { --loupe-cell: 14px; } .loupe-styles .sq { font-size: 34px; line-height: 36px; } }

/* Buy font: the questions, and the facts in a card */
.buy-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.faq-list { max-width: none; }
.facts-card { padding: var(--space-6); }

/* The foot: © left, the links right, as the cover's nav */
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-8);
  font: 18px / 24px var(--font-dosage); color: var(--text-muted); }
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-8); }

@media (max-width: 1099px) {
  .buy-cols { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- Specimen and License: the cover's bar on top, the foot below ---------- */
.page-top { padding-block: 32px; font-family: var(--font-dosage); color: var(--text-strong); }
.sheet { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); padding-block: var(--gap-section) calc(2 * var(--gap-section)); }
.sheet-title { margin: 0; font: 85px / 90px "Parched"; color: var(--text-strong); font-weight: normal; }
.sheet-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
.sheet-card { display: grid; gap: var(--space-4); align-content: start; padding: var(--space-6); min-width: 0; }
.sheet-label { margin: 0; font: 18px / 24px var(--font-dosage); color: var(--text-muted); font-weight: normal; }
.set { margin: 0; font: 34px / 36px "Parched"; color: var(--text-strong); white-space: pre-wrap; overflow-wrap: anywhere; -webkit-font-smoothing: none; }
.tui-box { margin: 0; font: 34px / 36px "Parched"; color: var(--text-strong); white-space: pre; overflow-x: auto; -webkit-font-smoothing: none; }
.fall { display: grid; gap: var(--space-2); }
.fall p { margin: 0; display: flex; gap: var(--space-4); align-items: baseline; min-width: 0; }
.fall span:first-child { width: 48px; flex: none; font: 18px / 24px var(--font-dosage); color: var(--text-muted); }
.fall span:last-child { min-width: 0; font-family: "Parched"; color: var(--text-strong); white-space: nowrap; overflow: hidden; -webkit-font-smoothing: none; }
.two { margin: 0; font-size: 51px; line-height: 54px; }
.sheet-note { margin: 0; font: 18px / 24px var(--font-dosage); color: var(--text-muted); }
.page-text { display: grid; gap: var(--space-4); justify-items: start; padding-block: var(--gap-section) calc(2 * var(--gap-section));
  font: 18px / 24px var(--font-dosage); color: var(--text-strong); }
.page-text p { margin: 0; max-width: 64ch; }
.page-text .link { font: inherit; }
.page-lede { font-size: 24px; line-height: 32px; }
.page-text .btn { justify-self: start; }
@media (max-width: 1099px) { .sheet-row { grid-template-columns: minmax(0, 1fr); } }
@media print { .sheet-card.px-box::before, .sheet-card.px-box::after { display: none; } .page-top, .site-foot { display: none; } }

/* ---------- A phone ---------- */
@media (max-width: 735px) {
  .wrap { padding-inline: 16px; }
  .landing.wrap { --gap-sections: 104px; padding-block: calc(var(--gap-sections) - 16px) var(--gap-sections); }
  .sec-head { font-size: 34px; line-height: 36px; }
  .sec-lede { font-size: 18px; line-height: 24px; }
  .tile { font-size: 51px; line-height: 54px; }
  .glyph-grid { --tile-min: 76px; }
  .page-top { padding-block: 16px; }
  .page-top .cover-bar { gap: var(--space-6); }
  .page-top .cover-mark { margin-top: calc(23px + var(--space-6)); }
  .sheet-title { font-size: 34px; line-height: 36px; }
  .set, .tui-box { font-size: 17px; line-height: 18px; }
  .two { font-size: 34px; line-height: 36px; }
  .page-lede { font-size: 18px; line-height: 24px; }
  .sample { --parched-n: 2; overflow-wrap: anywhere; }   /* (a long word breaks rather than push the page sideways) */
  .sample .layer { overflow-wrap: anywhere; }
}
