/* ============================================================
   docent stealth landing — design tokens from design-guide v3
   ============================================================ */

:root {
  /* Brand palette */
  --color-peat: #262220;
  --color-ember: #3D3835;
  --color-dusk: #5E5753;
  --color-wool: #9F9486;
  --color-linen: #BBB1A3;
  --color-cotton: #D5CEC3;
  --color-canvas: #F3EEE9;
  --color-white: #FFFFFF;
  --color-slate: #3B5B6E;
  --color-clay: #A84833;

  /* Semantic */
  --surface-default: var(--color-canvas);
  --surface-card: var(--color-white);
  --text-primary: var(--color-peat);
  --text-secondary: var(--color-dusk);
  --text-meta: var(--color-wool);
  --text-warning: var(--color-clay);
  --button-primary: var(--color-peat);
  --border-strong: var(--color-linen);
  --focus-ring: var(--color-slate);

  /* Spacing (8px grid) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 40px;
  --space-2xl: 48px;

  /* Radius */
  --radius-button: 10px;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;

  /* Motion */
  --motion-base: 250ms;
  --easing-standard: cubic-bezier(0, 0, 0.2, 1);
}

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

/* `display: flex` on .signup outranks the UA `[hidden]` rule, so JS's
   `form.hidden = true` quietly fails. Force hidden across all elements. */
[hidden] {
  display: none !important;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  background: var(--surface-default);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 460px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  display: flex;
  flex-direction: column;
}

/* ---------- Brand ---------- */

.brand {
  text-align: center;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.status {
  margin-bottom: var(--space-md);
  font-size: 12px;
  /* Dusk instead of Wool (--text-meta) — Wool fails AA on Canvas (~2.57:1).
     Logged as finding #15. */
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wordmark {
  font-size: clamp(72px, 16vw, 120px);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  /* Letter-spacing tightens with size, per wordmark spec */
  letter-spacing: -0.025em;
  line-height: 0.95;
}

.tagline {
  margin-top: var(--space-md);
  font-size: clamp(16px, 4.2vw, 18px);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Lead capture ---------- */

.lead {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg) 0;
}

.card {
  background: var(--surface-card);
  border: 0.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
}

.invitation {
  margin-bottom: var(--space-md);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.signup {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.field label {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
}

.field input:not([type="checkbox"]) {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-button);
  padding: 13px 14px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--text-primary);
  width: 100%;
  min-height: 48px;
  transition: border-color var(--motion-base) var(--easing-standard);
  -webkit-appearance: none;
  appearance: none;
}

.field input:not([type="checkbox"]):focus {
  outline: none;
  border: 2px solid var(--focus-ring);
  /* Compensate for 1px border becoming 2px so layout doesn't shift */
  padding: 12px 13px;
}

.field input.has-error,
.field input.has-error:focus {
  border: 2px solid var(--color-clay);
  padding: 12px 13px;
}

.btn {
  margin-top: var(--space-sm);
  background: var(--button-primary);
  color: var(--surface-default);
  border: none;
  border-radius: var(--radius-button);
  padding: 14px 18px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  min-height: 48px;
  transition: background-color var(--motion-base) var(--easing-standard),
              transform var(--motion-base) var(--easing-standard),
              opacity var(--motion-base) var(--easing-standard);
}

@media (hover: hover) {
  .btn:hover {
    background: var(--color-ember);
  }
}

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

.btn:active {
  transform: scale(0.94);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.error {
  font-size: 13px;
  color: var(--text-warning);
}

/* Honeypot field: visually hidden, accessible-tree hidden, but a bot
   parsing the DOM will still find and fill it. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  margin-top: 2px;
  flex: 0 0 auto;
}

/* ---------- Confirmation ---------- */

.confirmation {
  text-align: center;
  font-size: 16px;
  color: var(--text-secondary);
  padding: var(--space-2xl) 0;
}

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

.footer {
  text-align: center;
  font-size: 12px;
  /* Dusk instead of Wool — same AA reasoning as .status */
  color: var(--text-secondary);
  margin-top: var(--space-2xl);
}
