@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/playfair-display-roman.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/playfair-display-italic.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-sans-500.woff2") format("woff2");
}

:root {
  --ink: #111111;
  --muted: #5c5c5c;
  --line: #8a8a8a;
  --paper: #ffffff;
  --error: #9b1c1c;
  /* Same families as hellosabine.com (Playfair Display + DM Sans), self-hosted here */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(56px, 12vh, 140px) 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.wordmark {
  margin: 0 0 clamp(40px, 7vh, 72px);
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(13px, 1.5vw, 17px);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  /* letter-spacing adds trailing space after the last glyph; pull it back so the line stays centred */
  margin-right: -0.38em;
}

.headline {
  margin: 0;
  max-width: 13.6em;
  font-weight: 400;
  font-size: clamp(38px, 6.2vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.subhead {
  margin: 0.35em 0 0;
  font-style: italic;
  font-size: clamp(26px, 4vw, 52px);
  line-height: 1.15;
}

.rule {
  width: 64px;
  height: 0;
  margin: clamp(36px, 6vh, 56px) auto;
  border: 0;
  border-top: 1px solid var(--ink);
}

.signup {
  width: 100%;
  max-width: 660px;
}

.kicker {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(18px, 2.3vw, 26px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-right: -0.24em;
}

.invite {
  margin: 0.5em 0 0;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
}

.form { margin-top: clamp(28px, 5vh, 44px); }

.field {
  display: flex;
  width: 100%;
}

.input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  appearance: none;
}

.input::placeholder { color: var(--muted); opacity: 1; }

.input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.input[aria-invalid="true"] { border-color: var(--error); }

.button {
  flex: none;
  height: 56px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: 0 8px 8px 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.button:hover { background: #333333; border-color: #333333; }

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.button:disabled { cursor: progress; opacity: 0.7; }

.status {
  min-height: 1.6em;
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.4;
}

.status[data-tone="error"] { color: var(--error); }

.form[data-state="done"] .field,
.form[data-state="done"] + .consent { display: none; }

.form[data-state="done"] .status {
  margin-top: 0;
  font-style: italic;
  font-size: clamp(24px, 3vw, 32px);
}

.consent {
  margin: 18px auto 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.consent a,
.footer a,
.prose a {
  color: inherit;
  text-underline-offset: 3px;
}

.consent a:focus-visible,
.footer a:focus-visible,
.prose a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.footer {
  padding: 24px 20px 32px;
  text-align: center;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

/* Secondary pages (privacy, thanks, error, 404) */
.prose {
  max-width: 640px;
  text-align: left;
  font-size: 19px;
  line-height: 1.6;
}

.prose h1 {
  font-weight: 400;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  margin: 0 0 0.6em;
}

.prose h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 2em 0 0.6em;
}

.center { text-align: center; }

@media (max-width: 600px) {
  .field { flex-direction: column; gap: 12px; }
  .input {
    flex: none;
    width: 100%;
    border-right: 1px solid var(--line);
    border-radius: 8px;
  }
  .button { border-radius: 8px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}

.wordmark-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
