/*
  Shared by the pages that are plain HTML files rather than part of the React app: mailing-list.html (the confirm
  and unsubscribe links in emails), privacy.html and terms.html. They don't use the app's bundle - their colors and type are the app's
  tokens (src/index.css), copied here; keep them in step by eye.
*/

/* The app's two families, from the site itself (the build copies them to /fonts/ - see vite.config.ts), in the weights
   these pages use. Swap: the text shows in Georgia at once rather than waiting for them. */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/cormorant-garamond-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/lora-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/lora-latin-500-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/lora-latin-400-italic.woff2) format('woff2');
}

:root {
  --felt-900: #061710;
  --felt-glow: rgba(30, 86, 60, 0.55);
  --ink-100: #f3faf3;
  --ink-200: #eff7f0;
  --ink-400: #cde2d2;
  --ink-500: #9cb9a6;
  --ink-600: #7fa189;
  --gold: #b68235;
  --gold-lt: #dfb672;
  --gold-tint: rgba(182, 130, 53, 0.14);
  --hair: rgba(214, 240, 221, 0.09);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--felt-glow) 0%, rgba(6, 23, 16, 0) 60%),
    var(--felt-900);
  color: var(--ink-400);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The short, centered page: the confirm / unsubscribe result. */
body.center {
  justify-content: center;
}

main {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

a {
  color: #c79445;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* The lockup, as in the app: the mark stands on the wordmark's baseline, one word space before it. */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--ink-200);
}
a.wordmark:hover {
  text-decoration: none;
}
.logo-mark {
  flex: none;
  color: #c79445;
}

h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 8vw, 56px);
  line-height: 1.06;
  color: var(--ink-100);
}

.lede {
  margin: 0;
  max-width: 440px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-500);
}

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

button,
.button {
  flex: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gold-lt);
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 13px 24px;
  cursor: pointer;
}
button:hover:not(:disabled),
.button:hover {
  background: var(--gold-tint);
  text-decoration: none;
}
button:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--gold-lt);
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.6;
  cursor: default;
}

.fine {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-600);
}

[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  button {
    width: 100%;
  }
}

/* ---------- The confirm / unsubscribe result ---------- */

.result h1 {
  font-size: clamp(30px, 6vw, 42px);
}

/* ---------- Long reading: the privacy policy ---------- */

body.doc {
  align-items: center;
}

.doc-page {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.doc-page header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.doc-page h1 {
  font-size: clamp(34px, 6vw, 46px);
}

.doc-page h2 {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--ink-200);
}

.doc-page p,
.doc-page li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-400);
}

.doc-page p {
  margin: 0;
}

.doc-page ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-page strong {
  font-weight: 500;
  color: var(--ink-200);
}

.doc-page section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
}

.doc-page .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-600);
}
