/* ---------------------------------------------------------------
   The stranger card page, First Touch v1.0.
   One document, one stylesheet, one preloaded font, zero JavaScript.
   Five colours, one typeface, flat colour only. Nothing decorative.
   --------------------------------------------------------------- */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-400-v1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback, so the card paints immediately in Georgia and swaps
   to Newsreader without the line moving. The four numbers are computed, not
   guessed: Newsreader's metrics parsed out of the font file itself (unitsPerEm
   2000, ascender 1470, descender -530, avgCharWidth 1131) against Georgia's
   published metrics (2048 / 1878 / 449 / 1096). Georgia only — it is present on
   iOS, macOS and Windows; anywhere it is absent this face simply does not load
   and the stack falls through to the plain serif. */
@font-face {
  font-family: "Newsreader fallback";
  src: local("Georgia");
  size-adjust: 105.67%;
  ascent-override: 69.56%;
  descent-override: 25.08%;
  line-gap-override: 0%;
}

:root {
  --paper: #fbf6ee;
  --ink: #221e1a;
  --soft: #57514a;
  --clay: #8c4432;

  --hair: rgba(34, 30, 26, 0.08);
  --gutter: clamp(1.5rem, 6vw, 5rem);
  --serif: "Newsreader", "Newsreader fallback", Georgia, serif;

  /* the two grounds. same four sections, same words, same order. */
  --ground: var(--paper);
  --type: var(--ink);
  --quietype: var(--soft);
  --rule: var(--hair);

  color-scheme: light dark;
}

/* the dark lock-screen variant: Pre-dawn ground, Paper type.
   Reached by the device's own setting, not by anything on the page. */
@media (prefers-color-scheme: dark) {
  :root {
    --predawn: #1c2230;

    --ground: var(--predawn);
    --type: var(--paper);
    --quietype: rgba(251, 246, 238, 0.72); /* 7.7:1 on Pre-dawn */
    --rule: rgba(251, 246, 238, 0.12);
  }
}

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

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--type);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.1875rem);
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
p {
  margin: 0;
}

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

/* 1. the card ------------------------------------------------- */

.card {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}

.cardline {
  font-weight: 400;
  font-size: clamp(2.05rem, 1rem + 6.6vw, 5.25rem);
  line-height: 1.35;
  letter-spacing: -0.005em;
  text-align: center;
  text-wrap: balance;
  max-width: 21ch;
  hyphens: none;
}

/* 2. the calm ------------------------------------------------- */

.calm {
  height: 100svh;
}

/* 3. the offer ------------------------------------------------ */

.offer {
  padding: 0 var(--gutter) clamp(5rem, 14vh, 9rem);
  display: grid;
  justify-items: start;
  gap: clamp(2rem, 5vw, 2.75rem);
  max-width: 42rem;
  margin-inline: auto;
}

.offerline {
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.6rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.field {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.25rem 1.5rem;
  width: 100%;
}

.email {
  flex: 1 1 15rem;
  min-width: 0;
  font-family: inherit;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--type);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--type);
  border-radius: 0;
  padding: 0.5rem 0;
  opacity: 1;
}

.email:disabled {
  color: var(--type);
  opacity: 1;
  -webkit-text-fill-color: var(--type);
}

.email:focus-visible {
  outline: 0;
  border-bottom-color: var(--clay);
}

.send {
  font-family: inherit;
  font-size: 1.0625rem;
  line-height: 1;
  color: var(--paper);
  background: var(--clay);
  border: 1px solid var(--clay);
  border-radius: 0;
  padding: 0.95rem 1.75rem;
  cursor: pointer;
  opacity: 1;
}

.send:disabled {
  color: var(--paper);
  background: var(--clay);
  opacity: 1;
  cursor: default;
}

.never {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--quietype);
}

/* 4. the quiet footer ----------------------------------------- */

.quiet {
  border-top: 1px solid var(--rule);
  padding: clamp(2.5rem, 7vh, 3.5rem) var(--gutter) clamp(3rem, 9vh, 4.5rem);
  max-width: 42rem;
  margin-inline: auto;
  display: grid;
  gap: 0.55rem;
  color: var(--quietype);
  font-size: 1rem;
}
