/* ==========================================================================
   Landing stylesheet — written from zero for this project.

   THE IDEA. The product has no screens to show off: its whole interface is a
   sentence you say out loud. So the page is built as a piece of writing — a
   book page with margin notes — rather than a stack of product sections. Warm
   paper, a reading serif, marginalia in italic, and one clay accent that is
   never decorative: it marks a figure that has been measured and confirmed.

   EDITORIAL-JOURNAL PASS (owner-approved direction 3 of 3 sketches). Adds a
   ledger register on top of the book-page idea above: a hairline masthead
   rule, small-caps-weight monospace eyebrows/labels, a dotted-rule ledger
   table, and roman-numeral entries for the three tracked domains. The paper
   ground, reading serif, margin notes and clay accent all carry over
   unchanged — this is a register shift, not a rewrite of the foundation.
   ========================================================================== */

/* ------------------------------------------------------------------ fonts */
/* Self-hosted, subset to Latin + Cyrillic. Zero external requests anywhere
   on this page — no CDN, no font service, no analytics, no script. */

@font-face {
  font-family: 'Literata';
  src: url('assets/fonts/literata.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Literata';
  src: url('assets/fonts/literata-italic.woff2') format('woff2-variations');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Golos Text';
  src: url('assets/fonts/golos.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------- foundation */

:root {
  /* fields */
  --paper:        #f6f1e7;   /* the ground: warm bone, not white   */
  --paper-raised: #fffcf6;   /* anything lifted off the ground     */
  --linen:        #ece3d3;   /* the second field, one shade deeper */
  --petrol:       #23474a;   /* the one dark field, used once      */
  --petrol-deep:  #1b393c;

  /* ink */
  --ink:    #221f1b;
  --ink-2:  #554d43;
  --ink-3:  #8b8172;
  --on-petrol:    #ece6d8;
  --on-petrol-2:  #a9bcbb;

  /* the accent means one thing: measured and confirmed */
  --clay:      #a6431f;
  --clay-lift: #f2ded1;

  --edge:       rgba(34, 31, 27, 0.13);
  --edge-soft:  rgba(34, 31, 27, 0.07);

  --radius:   22px;
  --radius-s: 13px;

  --measure: 62ch;

  /* the ledger register: system stack only, no font to license or host for
     a handful of eyebrows and one table */
  --mono: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.09rem);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: 'Literata', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

strong { font-weight: 600; }

::selection { background: var(--clay-lift); color: var(--ink); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper-raised);
  color: var(--ink);
  padding: 0.75rem 1.1rem;
  border-radius: 0 0 var(--radius-s) 0;
  z-index: 20;
}
.skip:focus { left: 0; }

/* --------------------------------------------------------------- skeleton */
/* Two columns for the whole page: a narrow margin for notes, a wide column
   for the text. Below 56rem the margin note simply precedes its section. */

.frame {
  width: min(100% - 2.25rem, 1140px);
  margin-inline: auto;
}

.spread {
  display: grid;
  grid-template-columns: minmax(0, 13.5rem) minmax(0, 1fr);
  gap: clamp(1rem, 1vw + 0.6rem, 1.5rem) clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.column { min-width: 0; }

/* Margin notes: the book device of this page. Italic serif, quiet, never a
   graphic element — there is no divider or tick motif anywhere on the page. */
.note {
  font-family: 'Literata', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 30ch;
  margin: 0;
  padding-top: 0.4rem;
}
.note + .note { margin-top: 0.8rem; }

/* Fields. Colour, not lines, is what separates one part from the next. */
.field { padding: clamp(3rem, 7vw, 6rem) 0; }
.field--linen  { background: var(--linen); }
.field--petrol {
  background: var(--petrol);
  color: var(--on-petrol);
}
.field--petrol h2 { color: #fff; }
.field--petrol .note { color: var(--on-petrol-2); }

h2 { font-size: clamp(1.6rem, 1.1rem + 2.1vw, 2.5rem); }
h2 + p, h2 + .body { margin-top: 1.1rem; }
h3 {
  font-size: clamp(1.15rem, 1.02rem + 0.55vw, 1.35rem);
  font-weight: 600;
}

.label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.005em;
}

/* The ledger register's eyebrow: a small monospace uppercase tag, the one
   place on the page that looks typed rather than set. Used for the masthead
   rule, table captions and the roman-numeral entry kickers. */
.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.lede {
  font-size: clamp(1.09rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
}

/* ----------------------------------------------------------------- header */

.masthead {
  padding: 1.1rem 0 0.9rem;
  border-bottom: 1px solid var(--edge);
}
.masthead .frame {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: 'Literata', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}
.wordmark .qualifier {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Language switch: two soft pills. Rounded everywhere is deliberate — the
   sibling project's landing is squared off, this one is not. */
.langs {
  display: flex;
  gap: 0.3rem;
  background: rgba(34, 31, 27, 0.05);
  padding: 0.22rem;
  border-radius: 999px;
}
.langs a {
  display: block;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--ink-2);
}
.langs a:hover { color: var(--ink); }
.langs a[aria-current='true'] {
  background: var(--paper-raised);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(34, 31, 27, 0.12);
}

/* ------------------------------------------------------------------- hero */

.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

h1 {
  font-size: clamp(2.3rem, 1.35rem + 4.2vw, 4.05rem);
  line-height: 1.04;
  letter-spacing: -0.021em;
  max-width: 15ch;
}

.hero .lede { margin-top: 1.5rem; }

/* The one quoted sentence in the hero — the product in a single line. */
.utterance {
  font-family: 'Literata', Georgia, serif;
  font-style: italic;
  word-spacing: 0.06em;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  line-height: 1.45;
  color: var(--clay);
  margin: 1.4rem 0 0;
  max-width: 34ch;
}

/* Status, stated as fact — not a call to action, because there is nothing
   to sign up for. It is a link to the section that explains itself. */
.standing {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.7rem;
  margin-top: 2rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: var(--paper-raised);
  border: 1px solid var(--edge);
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.standing:hover { border-color: rgba(166, 67, 31, 0.4); }
.standing b {
  font-weight: 600;
  color: var(--ink);
}
.standing .sep { color: var(--ink-3); }

/* ------------------------------------------------- the exchange (transcript) */
/* Typographic, never a screenshot: there is no released app to photograph and
   a mocked-up phone would imply a surface that does not exist yet. */

.exchange {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.said {
  justify-self: start;
  word-spacing: 0.05em;
  max-width: 32rem;
  background: var(--clay-lift);
  color: #4a2413;
  padding: 1rem 1.25rem;
  border-radius: var(--radius) var(--radius) var(--radius) 7px;
  font-family: 'Literata', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.45;
}
.said .who {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a5230;
  margin-bottom: 0.4rem;
}

.answer {
  min-width: 0;
  background: var(--paper-raised);
  border: 1px solid var(--edge);
  border-radius: 7px var(--radius) var(--radius) var(--radius);
  padding: clamp(0.9rem, 2.5vw, 1.3rem);
  box-shadow: 0 20px 40px -34px rgba(34, 31, 27, 0.55);
}
.answer .who {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.8rem;
}

/* The day's figures. A real table with tabular numerals, set in the ledger
   register: dotted rules instead of zebra fill, mono numerals — a page from
   an actual ledger rather than a chat-bubble card. Never ASCII art in a
   monospace block, which is what forces a phone into horizontal scroll. */
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: clamp(0.78rem, 0.72rem + 0.28vw, 0.88rem);
  line-height: 1.35;
}
.ledger th,
.ledger td {
  padding: 0.48rem 0.3rem;
  text-align: right;
  vertical-align: baseline;
  border-bottom: 1px dotted var(--edge);
}
.ledger th:first-child,
.ledger td:first-child {
  text-align: left;
  padding-left: 0;
  width: 46%;
  font-family: 'Golos Text', sans-serif;
}
.ledger td:last-child,
.ledger th:last-child { padding-right: 0; }
.ledger thead th {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--ink);
}
.ledger tbody td { font-variant-numeric: tabular-nums lining-nums; }
.ledger .item { color: var(--ink); }
.ledger .grams {
  display: block;
  font-family: 'Golos Text', sans-serif;
  font-size: 0.85em;
  color: var(--ink-3);
}
.ledger tfoot td {
  padding-top: 0.7rem;
  font-weight: 600;
  border-bottom: none;
  font-variant-numeric: tabular-nums lining-nums;
}
.ledger tfoot td:first-child { font-family: 'Golos Text', sans-serif; }
.ledger tfoot .kcal { color: var(--clay); }

/* The single line the accent exists for: what is left of the day's target. */
.remaining {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.remaining .figure {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--clay);
  font-variant-numeric: tabular-nums lining-nums;
}

.origin {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-3);
  line-height: 1.45;
}

/* the correction beat, shown as a second exchange */
.beat { margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.beat .shift {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.5rem;
  margin-top: 0.2rem;
}
.shift-item {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.shift-item .was,
.shift-item .now {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums lining-nums;
}
.shift-item .was {
  color: var(--ink-3);
  text-decoration: line-through;
}
.shift-item .now {
  font-weight: 600;
  color: var(--clay);
}

/* ---------------------------------------------------------------- entries */
/* The three domains as three written entries, stacked, each with its own
   mechanic spelled out. Not icon cards. */

.entries {
  counter-reset: entry;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  margin-top: 2rem;
}
.entry {
  counter-increment: entry;
  background: var(--paper-raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  min-width: 0;
}
.field--linen .entry { border-color: rgba(34, 31, 27, 0.1); }
.entry h3 { margin-bottom: 0.6rem; }
/* The three domains, numbered I/II/III in the ladder's own device (a quiet
   serif ordinal), not an icon. Purely a ::before on the heading text, so it
   costs nothing in either language's markup. */
.entry h3::before {
  content: counter(entry, upper-roman) '.';
  margin-right: 0.5rem;
  color: var(--ink-3);
  font-weight: 400;
}

/* On a wide screen an entry repeats the page's own gesture: the name sits in
   its own narrow column, the substance in the wide one. */
@media (min-width: 64rem) {
  .entry {
    display: grid;
    grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
    gap: 0 2.25rem;
    align-items: start;
  }
  .entry h3 { margin-bottom: 0; padding-top: 0.15rem; }
  .entry > :not(h3) { grid-column: 2; }
}
.entry p { color: var(--ink-2); }

/* a set of lines, the way a workout is actually logged */
.setlog {
  margin: 1rem 0 0;
  padding: 0.9rem 1.1rem;
  background: rgba(34, 31, 27, 0.04);
  border-radius: var(--radius-s);
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.45rem 1.25rem;
  align-items: baseline;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums lining-nums;
}
.setlog span { color: var(--ink-2); }
.setlog .reply { color: var(--ink-3); font-size: 0.86rem; }

/* schedules, as plain named rows */
.schedules {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.schedules li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  align-items: baseline;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.schedules b {
  font-weight: 600;
  color: var(--ink);
  min-width: 8.5rem;
}

/* ------------------------------------------------------------- the ladder */
/* Where a number comes from: four steps, numbered in the serif. */

.ladder {
  list-style: none;
  counter-reset: step;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: clamp(1.1rem, 2.5vw, 1.75rem);
}
.ladder li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0 1rem;
  align-items: baseline;
}
.ladder li::before {
  content: counter(step);
  font-family: 'Literata', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--clay);
  line-height: 1;
}
.ladder h3 { margin-bottom: 0.35rem; }
.ladder p { color: var(--ink-2); }

/* ----------------------------------------------------------------- nevers */

.nevers {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.nevers li { min-width: 0; }
.nevers .head {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.5rem;
}
.nevers p {
  color: var(--on-petrol-2);
  font-size: 0.97rem;
  max-width: 34ch;
}

/* ----------------------------------------------------------------- status */

.facts {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
  max-width: 52rem;
}
.facts li {
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
  gap: 0.2rem 1.25rem;
  align-items: baseline;
}
.facts .key {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.facts .val { color: var(--ink-2); }

@media (max-width: 34rem) {
  .facts li { grid-template-columns: minmax(0, 1fr); }
}

/* ----------------------------------------------------------------- footer */

.colophon {
  background: var(--petrol-deep);
  color: var(--on-petrol-2);
  padding: clamp(2rem, 4vw, 3rem) 0;
  font-size: 0.92rem;
}
.colophon .frame {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.colophon .wordmark { color: #fff; }
.colophon .wordmark .qualifier { color: var(--on-petrol-2); }
.colophon a { color: var(--on-petrol); }
.colophon .langs { background: rgba(255, 255, 255, 0.08); }
.colophon .langs a { color: var(--on-petrol-2); }
.colophon .langs a[aria-current='true'] {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: none;
}

.ledger caption {
  /* .eyebrow sets display:block for its other (non-table) uses, which
     overrides the UA default of display:table-caption here and breaks
     caption-side positioning — the caption then lays out as a plain block
     between thead and tbody instead of above the table. Restore the real
     table-caption box type explicitly. */
  display: table-caption;
  caption-side: top;
  text-align: left;
  padding-bottom: 0.5rem;
}

/* a closing line under a section, quieter than body text */
.coda {
  margin-top: 1.75rem;
  max-width: 52ch;
  font-size: 0.9rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.colophon p { margin: 0; max-width: none; }

/* ------------------------------------------------------------ narrow view */

@media (max-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  h1 { max-width: 18ch; }
}

@media (max-width: 56rem) {
  .spread { grid-template-columns: minmax(0, 1fr); }
  .note { max-width: var(--measure); }
  .ladder li { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .ladder li::before { font-size: 1.4rem; }
}

@media (max-width: 30rem) {
  .standing .sep { display: none; }
  .standing { gap: 0.15rem 0.85rem; border-radius: var(--radius); }
}

@media (max-width: 26rem) {
  .ledger th:first-child,
  .ledger td:first-child { width: 40%; }
  .ledger th,
  .ledger td { padding-inline: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .langs, .skip { display: none; }
  body { background: #fff; }
}
