/* Design tokens ------------------------------------------------------- */
/* Light is the default per brief. To ship the navy variant instead,
   comment out the light block below and uncomment the navy block. */

:root {
  --bg: #FAF8F4;
  --ink: #141414;
  --muted: oklch(45% 0.01 60);
  --accent: #1F3A5F;
  --input-border: oklch(75% 0.01 60);
  --input-bg: #FFFFFF;
  --button-text: #FAF8F4;
  --error: oklch(45% 0.15 25);
}

/*
:root {
  --bg: #12253D;
  --ink: #FAF8F4;
  --muted: oklch(75% 0.02 250);
  --accent: oklch(78% 0.06 240);
  --input-border: oklch(50% 0.03 240);
  --input-bg: oklch(28% 0.03 240);
  --button-text: #12253D;
  --error: oklch(72% 0.12 25);
}
*/

/* Base ------------------------------------------------------------------ */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Layout ------------------------------------------------------------------ */

.page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 64px 24px 104px;
}

.wordmark,
.hero,
.sub,
.signup {
  width: 100%;
  max-width: 640px;
}

/* Vertical rhythm. Each step is set explicitly rather than relying on a
   single stack gap, because .hero and .sub carry their own `margin: 0 auto`
   for centring — the clamps let the page breathe on tall viewports and
   tighten up on short ones. */

.page > * + * {
  margin-top: clamp(40px, 6vh, 56px);
}

.page > .hero {
  margin: clamp(44px, 6.5vh, 64px) auto 0;
}

.page > .sub {
  margin: clamp(28px, 4vh, 40px) auto 0;
}

.page > .signup {
  margin-top: clamp(52px, 8vh, 76px);
}

.wordmark {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero {
  text-align: center;
  margin: 0 auto;
  max-width: 19ch;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.sub {
  text-align: center;
  margin: 0 auto;
  max-width: 34ch;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

/* Form ------------------------------------------------------------------ */

.signup {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.signup-row {
  display: flex;
  gap: 8px;
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 2px;
  background: var(--input-bg);
  color: var(--ink);
  outline: none;
}

.signup button[type="submit"] {
  font: inherit;
  font-size: 15px;
  padding: 12px 18px;
  border: none;
  border-radius: 2px;
  background: var(--accent);
  color: var(--button-text);
  cursor: pointer;
  white-space: nowrap;
}

.signup button[type="submit"]:hover {
  opacity: 0.92;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.consent input[type="checkbox"] {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.status {
  min-height: 20px;
  font-size: 13px;
  text-align: left;
  color: var(--muted);
}

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

.status[data-state="success"] {
  color: var(--accent);
}

/* Privacy page ------------------------------------------------------------------ */

.privacy {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 48px 24px;
  text-align: left;
}

.privacy .back {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.privacy .back:hover {
  text-decoration: underline;
}

.privacy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 28px;
  margin: 0;
  color: var(--ink);
}

.privacy p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.privacy p strong {
  color: var(--ink);
}

.privacy p a {
  color: var(--accent);
}

/* Footer ------------------------------------------------------------------ */

.footer {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.footer a {
  color: var(--muted);
}

/* Motion ------------------------------------------------------------------ */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

[data-fade] {
  animation: fade-in 0.9s ease both;
}

@media (prefers-reduced-motion: reduce) {
  [data-fade] {
    animation: none;
  }
}

/* Small screens ------------------------------------------------------------------ */

@media (max-width: 420px) {
  .signup-row {
    flex-direction: column;
  }
}
