/*
 * Wigwham, set in the studio's edition: the same paper, ink, green and typefaces as
 * tolmachevfamily.com (its assets/theme.css), so the two read as one press. Titles and labels in
 * EB Garamond with true small caps and old-style figures; reading text in Source Sans 3; IM Fell
 * English italic for the one flourish. Square corners, hairline rules instead of fills, figures
 * as numbered plates. The tent is the mark.
 *
 * The fonts are SIL Open Font License; the licences sit beside them in /fonts.
 */

@font-face {
  font-family: "EB Garamond";
  src: url(/fonts/ebgaramond-roman-latin.woff2) format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url(/fonts/ebgaramond-italic-latin.woff2) format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url(/fonts/sourcesans3-roman-latin.woff2) format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url(/fonts/sourcesans3-italic-latin.woff2) format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url(/fonts/imfellenglish-italic-latin.woff2) format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #1f2428;
  --slate: #5a636a;
  --mute: #8a9298;
  --rule: #c4cacf;
  --hair: #dde1e4;
  --wash: #f3f4f5;
  --accent: #2b6a55;
  --danger: #9b2c2c;
  --serif: "EB Garamond", Garamond, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fell: "IM Fell English", "EB Garamond", Garamond, Georgia, serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --quick: 0.16s;
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in srgb, var(--accent) 22%, var(--paper)); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
a { color: inherit; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.sr, .trap {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Small caps, letterspaced: every label on the page shares this one treatment. */
.label,
.mast__nav a,
.brand span,
.steps__n,
.receipt__rows dt,
.foot {
  font-family: var(--serif);
  font-variant-caps: all-small-caps;
  font-feature-settings: "kern", "smcp", "c2sc", "onum";
  letter-spacing: 0.16em;
  font-weight: 500;
}
.label { font-size: 1.05rem; line-height: 1.3; color: var(--slate); margin-bottom: 1.25rem; }
.label--accent { color: var(--accent); }
.no { color: var(--accent); margin-right: 0.35em; }

/* --- The masthead -------------------------------------------------------- */

.mast { border-bottom: 1px solid var(--hair); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.mast__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand span { font-size: 1.35rem; letter-spacing: 0.12em; color: var(--ink); }
.mast__nav { display: flex; align-items: center; gap: 1.5rem; }
.mast__nav a { font-size: 1rem; color: var(--slate); text-decoration: none; transition: color var(--quick) var(--ease); }
.mast__nav a:hover { color: var(--ink); }
.mast__nav .mast__cta { color: var(--accent); }

/* --- The title page ------------------------------------------------------ */

.title { padding: 6rem 0 5.5rem; border-bottom: 1px solid var(--rule); }
.title h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 1.6rem + 6vw, 6.25rem);
  line-height: 1;
  letter-spacing: -0.015em;
  font-feature-settings: "kern", "liga", "onum";
  max-width: 13ch;
  text-wrap: balance;
}
.title h1 em { font-style: italic; color: var(--accent); }
.lead { margin-top: 2rem; max-width: var(--measure); font-size: 1.3rem; line-height: 1.55; color: var(--slate); }

/* --- The signup ---------------------------------------------------------- */

.signup { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 34rem; }
.signup input[type="email"] {
  flex: 1 1 15rem; min-height: 3.1rem; padding: 0 1rem;
  border: 1px solid var(--rule); border-radius: 0; background: var(--paper);
  color: var(--ink); font: inherit; font-size: 1.05rem;
}
.signup input[type="email"]:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 1px var(--ink); }
.signup input[type="email"]::placeholder { color: var(--mute); }
.signup button {
  min-height: 3.1rem; padding: 0 1.5rem; border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--paper); cursor: pointer;
  font-family: var(--serif); font-variant-caps: all-small-caps; letter-spacing: 0.16em;
  font-size: 1.15rem; font-weight: 500;
  transition: background var(--quick) var(--ease), color var(--quick) var(--ease);
}
.signup button:hover { background: var(--paper); color: var(--ink); }
.signup button[disabled] { opacity: 0.6; cursor: progress; }
.signup__status { flex-basis: 100%; min-height: 1.6em; font-size: 1rem; color: var(--accent); }
.signup__status.is-error { color: var(--danger); }

/* --- Sections ------------------------------------------------------------ */

.section { padding: 5.5rem 0; border-bottom: 1px solid var(--rule); }
.section h2,
.final h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-feature-settings: "kern", "liga", "onum";
  max-width: 20ch;
  text-wrap: balance;
}

.steps { list-style: none; padding: 0; margin: 3.5rem 0 0; display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.steps li { border-top: 1px solid var(--ink); padding-top: 1.1rem; }
.steps__n { font-size: 1.05rem; color: var(--accent); }
.steps h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; line-height: 1.2; margin: 0.35rem 0 0.6rem; }
.steps p { color: var(--slate); }

.verdict { margin: 4.5rem 0 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--accent); max-width: 42rem; }
.verdict p { font-family: var(--fell); font-style: italic; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.3; }

.how { display: grid; gap: 4rem; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; }
.features { list-style: none; padding: 0; margin: 2.75rem 0 0; display: grid; gap: 1.75rem; }
.features li { border-top: 1px solid var(--hair); padding-top: 1.1rem; }
.features h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.25; }
.features p { color: var(--slate); margin-top: 0.3rem; }

/* --- Plate 1: a receipt, printed ----------------------------------------- */

.plate { margin: 0; position: sticky; top: 6rem; }
.receipt { border: 1px solid var(--ink); padding: 1.5rem; background: var(--paper); }
.receipt__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--ink); padding-bottom: 0.75rem; }
.receipt__head .label { margin: 0; color: var(--accent); }
.receipt__id { font-family: var(--serif); font-feature-settings: "onum"; color: var(--slate); }
.receipt__title { font-family: var(--serif); font-weight: 500; font-size: 1.75rem; line-height: 1.2; margin-top: 1rem; }
.receipt__rows { margin: 1rem 0 0; }
.receipt__rows div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--hair); font-size: 1rem; }
.receipt__rows dt { font-size: 0.95rem; color: var(--slate); }
.receipt__rows dd { margin: 0; }
.receipt__rows .is-flag dt { color: var(--accent); }
.receipt__rows .is-flag dt::before { content: "⚑ "; font-variant-caps: normal; letter-spacing: 0; }
.receipt__rows .is-flag dd { font-style: italic; }
.receipt__foot { margin-top: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--ink); display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; justify-content: space-between; font-size: 0.95rem; color: var(--slate); }
.receipt__state { color: var(--accent); font-style: italic; }
.plate figcaption { margin-top: 0.85rem; font-size: 0.98rem; color: var(--slate); }
.plate figcaption .label { margin: 0 0.3em 0 0; font-size: 0.98rem; }

.two { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.prose { max-width: var(--measure); padding-top: 2.6rem; }
.prose p { color: var(--slate); }
.prose p + p { margin-top: 1rem; }

/* --- The waitlist -------------------------------------------------------- */

.final { padding: 6rem 0; background: var(--wash); }
.final__lead { margin-top: 1.25rem; font-size: 1.2rem; color: var(--slate); }
.fine { margin-top: 0.25rem; font-size: 0.95rem; color: var(--slate); max-width: 34rem; }

.foot { border-top: 1px solid var(--rule); font-size: 1rem; color: var(--slate); }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; padding: 1.75rem 0; }
.foot .brand--small span { font-size: 1.05rem; }
.foot a { text-decoration: none; margin-left: auto; font-family: var(--sans); font-variant-caps: normal; letter-spacing: 0; }
.foot a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

@media (max-width: 880px) {
  .title { padding: 4rem 0; }
  .section, .final { padding: 4rem 0; }
  .how, .two { grid-template-columns: 1fr; gap: 2.5rem; }
  .plate { position: static; }
  .prose { padding-top: 0; }
  .mast__nav a:not(.mast__cta) { display: none; }
}
@media (max-width: 480px) {
  .receipt { padding: 1.1rem; }
  .receipt__rows div { grid-template-columns: 1fr; gap: 0.15rem; }
  .foot a { margin-left: 0; }
}
