/*
 * home.css — the shared system for the two homepage variants (/home-a/, /home-b/).
 *
 * The homepage adopts the Matreas product's own world (matreas repo, DESIGN.md):
 * parchment ground, the product ink #071419, gold as the one accent, Playfair
 * Display for arrival headings, Inter for everything else. The screenshots on
 * the page are that product, so page and product read as one thing.
 * Since 2026-10-13 the /2027/ surfaces use the same world through site.css.
 */

:root {
  --parchment: #FFFCF6;
  --parchment-hi: #FFFEFA;
  --band: #FBF3E0;
  --band-deep: #F4E5C0;
  --ink: #071419;
  --ink-800: #0F2832;
  --ink-700: #173F4D;
  --ink-500: #2B7A95;
  --muted: #64748B;          /* product "sage": 4.6:1 on parchment, text ≥ 1rem only */
  --muted-strong: #475569;   /* small text: 7:1 on parchment */
  --on-ink-muted: #A9BCC4;   /* secondary text on ink, tinted from ink-200 */
  --gold: #F59E0B;           /* marks and fills, never small text on parchment */
  --gold-text: #B45309;      /* gold that carries text on parchment */
  --gold-bright: #FBBF24;    /* gold on ink */
  --line: rgb(7 20 25 / 0.12);
  --line-strong: rgb(7 20 25 / 0.22);
  --line-on-ink: rgb(255 252 246 / 0.16);

  --serif: "Playfair Display", Georgia, Cambria, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 74rem;
  --measure: 40rem;
  --gutter: 1rem;
  --section: 4.5rem;
  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-shot: 0 1px 2px rgb(7 20 25 / 0.06), 0 12px 32px -12px rgb(7 20 25 / 0.22);
}

@media (min-width: 640px) {
  :root { --gutter: 2rem; --section: 6.5rem; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--muted) var(--parchment);
}

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

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  caret-color: var(--gold-text);
}

::selection { background: var(--gold-bright); color: var(--ink); }

img { display: block; max-width: 100%; height: auto; }

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

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; text-wrap: balance; }

.display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.375rem, 1.6rem + 3.4vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.display em, .headline em { font-style: italic; font-weight: 500; }

.headline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.875rem, 1.4rem + 1.9vw, 2.875rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
}

p { margin: 0; text-wrap: pretty; }
.prose > * + * { margin-top: 1.1em; }
.prose { max-width: var(--measure); }

.small { font-size: 0.875rem; line-height: 1.5; color: var(--muted-strong); }

.num { font-variant-numeric: tabular-nums; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--line-strong);
  transition: color 150ms ease, text-decoration-color 150ms ease;
}
a:hover { color: var(--gold-text); text-decoration-color: currentColor; }

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

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

.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--line); }
.section.band, .section.band + .section, .section.ink, .section.ink + .section { border-top: 0; }

.band { background: var(--band); }

.ink {
  background: var(--ink);
  color: var(--parchment);
}
.ink .lede { color: var(--parchment); opacity: 0.86; }
.ink .small { color: var(--on-ink-muted); }
.ink a:hover { color: var(--gold-bright); }
.ink ::selection { background: var(--gold-bright); color: var(--ink); }
.ink :focus-visible { outline-color: var(--gold-bright); }

.section-head { max-width: 46rem; margin-bottom: 3rem; }
.section-head > * + * { margin-top: 1.25rem; }
.section-head.center { margin-inline: auto; text-align: center; }

.stack > * + * { margin-top: var(--stack, 1.5rem); }

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.625rem 1rem;
  background: var(--ink);
  color: var(--parchment);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 150ms ease;
}
.skip:focus { top: 1rem; outline-color: var(--gold-bright); }
.skip:hover { color: var(--gold-bright); }

/* ---------- Site nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(255 252 246 / 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { width: 2rem; height: 2rem; flex: none; color: var(--gold-text); }
.brand:hover { color: var(--ink); }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.site-nav li a:not(.btn) {
  display: inline-block;
  padding-block: 0.625rem;
  text-decoration: none;
  color: var(--ink-700);
}
.site-nav li a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.site-nav .btn { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }

@media (max-width: 760px) {
  .site-nav .nav-optional { display: none; }
}
.site-nav .btn { white-space: nowrap; }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.375rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--parchment);
  font: 600 1rem/1.2 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.btn:hover { background: var(--ink-700); border-color: var(--ink-700); color: var(--parchment); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.125rem; height: 1.125rem; transition: transform 200ms var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-quiet:hover { background: var(--parchment-hi); border-color: var(--ink); color: var(--ink); }

.ink .btn { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--ink); }
.ink .btn:hover { background: var(--parchment); border-color: var(--parchment); color: var(--ink); }
.ink .btn-quiet { background: transparent; color: var(--parchment); border-color: var(--line-on-ink); }
.ink .btn-quiet:hover { border-color: var(--parchment); color: var(--parchment); background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn svg { transition: none; }
  .btn:active, .btn:hover svg { transform: none; }
}

/* ---------- Screenshots ---------- */

/* A shot is a real product screen, framed like the window it came from. */
.shot { margin: 0; }
.shot-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--parchment);
  box-shadow: var(--shadow-shot);
}
.shot-frame img { width: 100%; }
.shot figcaption {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted-strong);
  max-width: 44rem;
}
.ink .shot figcaption { color: var(--on-ink-muted); }
.ink .shot-frame { border-color: var(--line-on-ink); box-shadow: 0 24px 48px -20px rgb(0 0 0 / 0.6); }

/* Numbered markers placed on a shot; each matches a .notes item. */
.marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: -0.625rem 0 0 -0.625rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font: 700 0.6875rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--parchment), 0 1px 4px rgb(7 20 25 / 0.3);
  transition: transform 200ms var(--ease-out), background-color 150ms ease;
}
.marker.is-lit { transform: scale(1.22); background: var(--gold-bright); }

/* Notes: the reading of a screenshot, numbered to its markers. */
.notes { list-style: none; margin: 0; padding: 0; counter-reset: note; }
.notes li {
  counter-increment: note;
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0 0.875rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  transition: background-color 150ms ease;
}
.notes li:last-child { border-bottom: 1px solid var(--line); }
.notes li::before {
  content: counter(note);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--band-deep);
  color: var(--ink);
  font: 700 0.8125rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  transition: background-color 150ms ease;
}
.notes li.is-lit::before, .notes li:hover::before { background: var(--gold); }
.notes strong { font-weight: 600; }
.ink .notes li { border-color: var(--line-on-ink); }
.ink .notes li::before { background: var(--ink-700); color: var(--parchment); }
.ink .notes li.is-lit::before, .ink .notes li:hover::before { background: var(--gold-bright); color: var(--ink); }

/* ---------- Feature: words beside a screen ---------- */

.feature {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.feature + .feature { margin-top: var(--section); }
@media (min-width: 960px) {
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; }
  .feature.flip > :first-child { order: 2; }
  .feature.wide { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .feature.tall { align-items: start; }
}
.feature-copy > * + * { margin-top: 1.25rem; }

/* A screen that wants the full width, copy above it. */
.showcase > .shot { margin-top: 3rem; }
.showcase-head { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 960px) {
  .showcase-head { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; }
}

/* Two screens side by side (the question and its saved report). */
.pair {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 900px) {
  .pair { grid-template-columns: minmax(0, 4fr) minmax(0, 9fr); }
}

/* ---------- Ruled lists ---------- */

.ruled { list-style: none; margin: 0; padding: 0; }
.ruled > li { padding: 1.125rem 0; border-top: 1px solid var(--line); }
.ruled > li:last-child { border-bottom: 1px solid var(--line); }
.ink .ruled > li { border-color: var(--line-on-ink); }

/* Columns of short lists (capability). */
.columns {
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.columns h3 { padding-bottom: 0.75rem; border-bottom: 2px solid var(--ink); margin-bottom: 0.25rem; }
.columns ul { list-style: none; margin: 0; padding: 0; }
.columns li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }

/* ---------- Status labels (shipped / planned) ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted-strong);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  border: 1.5px solid currentColor;
}
.status.planned { color: var(--gold-text); }
.ink .status.planned { color: var(--gold-bright); }

/* Roadmap rows: what, why, status. */
.roadmap > li {
  display: grid;
  gap: 0.375rem 2rem;
}
@media (min-width: 760px) {
  .roadmap > li { grid-template-columns: 16rem 1fr auto; align-items: baseline; }
}

/* ---------- Pull quote / scripture ---------- */

.verse {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  line-height: 1.35;
  margin: 0;
}
.verse cite { display: block; margin-top: 0.75rem; font: 500 0.9375rem/1.4 var(--sans); font-style: normal; color: var(--muted-strong); }
.ink .verse cite { color: var(--on-ink-muted); }

/* ---------- Email signup ---------- */

.signup { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: 30rem; }
.signup label { flex-basis: 100%; font-weight: 600; font-size: 0.9375rem; }
.signup input[type="email"] {
  flex: 1 1 14rem;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--parchment-hi);
  color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
}
.signup input[type="email"]::placeholder { color: var(--muted-strong); }
.signup input[type="email"]:focus { border-color: var(--ink); outline: 2px solid var(--gold); outline-offset: 2px; }
.ink .signup input[type="email"] { background: var(--ink-800); border-color: var(--line-on-ink); color: var(--parchment); }
.ink .signup input[type="email"]::placeholder { color: var(--on-ink-muted); }
.ink .signup input[type="email"]:focus { border-color: var(--parchment); outline-color: var(--gold-bright); }

/* The beta ask: email, one gold button, one line on what happens next.
   home.js submits it in place and swaps in .join-done; without JS it posts to the provider. */
.join .btn { flex: none; }
@media (max-width: 480px) {
  .join .btn { flex: 1 1 100%; }
}
.join-note { flex-basis: 100%; margin-top: 0.25rem; }
.ink .join-note { color: var(--on-ink-muted); }
.join-done { max-width: 30rem; font-weight: 600; }
.join-done span { display: block; margin-top: 0.25rem; font-weight: 400; color: var(--muted-strong); font-size: 0.9375rem; }
.ink .join-done span { color: var(--on-ink-muted); }

.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--ink); }
.ink .btn-gold { background: var(--gold-bright); border-color: var(--gold-bright); }
.ink .btn-gold:hover { background: var(--parchment); border-color: var(--parchment); }

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

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

.site-foot { padding-block: 3rem 3.5rem; border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-foot p, .site-foot a { font-size: 0.875rem; color: var(--muted-strong); }

/* ---------- Motion: screens arrive once ---------- */

/* Visible by default. home.js adds .reveal-ready only when it can animate. */
.reveal-ready .shot-frame {
  clip-path: inset(0 0 14% 0 round var(--radius));
  opacity: 0;
  transform: translateY(18px);
  transition: clip-path 900ms var(--ease-out), opacity 600ms ease, transform 900ms var(--ease-out);
}
.reveal-ready .shot-frame.is-in {
  clip-path: inset(0 0 0 0 round var(--radius));
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .shot-frame { clip-path: none; opacity: 1; transform: none; transition: none; }
  .marker { transition: none; }
}

/* ---------- Print ---------- */

@media print {
  .site-nav, .skip, .signup, .actions { display: none; }
  .ink, .band { background: none; color: #000; }
  .shot-frame { box-shadow: none; }
}
