/* Fermentorship signup page.
   House style ported from src/style/house.typ: QuadCities serif, real small-caps
   headings via the smcp feature, oldstyle figures in prose, indented justified
   paragraphs. Palette from assets/: paper, accent green, ink. */

@font-face {
  font-family: "QuadCities";
  src: url("fonts/QuadCities-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "QuadCities";
  src: url("fonts/QuadCities-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "QuadCities";
  src: url("fonts/QuadCities-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "QuadCities";
  src: url("fonts/QuadCities-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f8f9f5;
  --accent: #1c5f38;
  --accent-dark: #15482a;
  --ink: #191c18;
  --rule: #d7dad0;
  --measure: 34rem; /* ~66 characters at this size */
}

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

html {
  /* 112.5% of the 16px default = 18px, but scales with the user's
     browser font-size preference (WCAG 1.4.4). */
  font-size: 112.5%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "QuadCities", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.35;
  /* Oldstyle proportional figures in running prose, matching print default. */
  font-feature-settings: "onum" 1, "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem 4rem;
}

/* — Masthead ——————————————————————————————————————————————— */

.masthead {
  text-align: center;
  margin-bottom: 2.5rem;
}

.masthead__mark {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display: block;
  margin: 0 auto 1.25rem;
}

.wordmark {
  /* Real small caps via smcp, letterspaced. */
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 400;
  font-feature-settings: "smcp" 1, "onum" 1;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0;
}

.tagline {
  font-style: italic;
  font-size: 1.05rem;
  max-width: 22rem;
  margin: 0.75rem auto 0;
}

/* All-caps initialism: c2sc downshifts the capitals to small caps (smcp alone
   only maps lowercase). The one place c2sc is wanted over the house smcp rule. */
.sc {
  font-feature-settings: "c2sc" 1, "smcp" 1, "onum" 1;
  letter-spacing: 0.04em;
  text-decoration: none;
}

/* — Body prose ————————————————————————————————————————————— */

h2 {
  /* Quiet letterspaced small-caps section heads, regular weight. */
  font-size: 0.95rem;
  font-weight: 400;
  font-feature-settings: "smcp" 1, "onum" 1;
  letter-spacing: 0.07em;
  margin: 2.5rem 0 0.6rem;
}

/* Tufte-style body: space between, no indent, ragged right. Each paragraph is
   self-contained, so the vertical gap (not an indent) marks the boundary. */
p {
  margin: 0 0 1.4rem;
  text-indent: 0;
  text-align: left;
  hyphens: none;
}

.dinkus + p {
  margin-top: 0;
}

em,
i {
  font-style: italic;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Quiet centered separator, mirroring the Typst `dinkus`. */
.dinkus {
  text-align: center;
  font-size: 1.6rem;
  letter-spacing: 0.5em;
  color: var(--accent);
  margin: 2rem 0 1.25rem;
  /* nudge to offset the trailing letter-spacing so the row reads centered */
  padding-left: 0.5em;
}

/* — Subscribe ——————————————————————————————————————————————— */

.subscribe {
  margin: 3rem 0 1rem;
  text-align: center;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--paper);
  font-feature-settings: "smcp" 1;
  letter-spacing: 0.08em;
  font-size: 1.1rem;
  padding: 0.7em 1.8em;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 120ms ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-dark);
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.subscribe__note {
  font-style: italic;
  margin-top: 1rem;
}

/* — Footer ——————————————————————————————————————————————————— */

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.65;
}

footer p {
  text-align: center;
  text-indent: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14160f;
    --ink: #e8e9e1;
    --accent: #5e9e76;
    --accent-dark: #6fae87;
    --rule: #2c2f26;
  }
  .btn {
    color: #14160f;
  }
}
