/* Brand tokens mirror brand/source/brand-tokens.css. Update both together. */
:root {
  --alseen-cobalt: #1643D8;
  --alseen-navy: #101D35;
  --alseen-warm-paper: #F7F5EF;
  --alseen-white: #FFFFFF;
  --alseen-muted: #586477;
  --alseen-font: "Public Sans", Arial, sans-serif;
}

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/PublicSans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/PublicSans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/PublicSans-700.woff2") format("woff2");
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--alseen-warm-paper);
  color: var(--alseen-navy);
  font-family: var(--alseen-font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

/* The SVG carries its own clear space; only its rendered width is set here. */
.logo {
  display: block;
  width: clamp(11rem, 24vw, 13.5rem);
  height: auto;
}

.headline {
  margin: 1.75rem 0 0;
  font-size: clamp(1.25rem, 4.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-wrap: balance;
}

.signup {
  width: 100%;
  max-width: 28rem;
  margin-top: 2.5rem;
}

.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;
}

.signup__row {
  display: flex;
}

.signup__input,
.signup__button {
  height: 3rem;
  margin: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: 1rem;
}

.signup__input {
  flex: 1;
  min-width: 0;
  padding: 0 1rem;
  border: 1px solid var(--alseen-muted);
  border-right: 0;
  background: var(--alseen-white);
  color: var(--alseen-navy);
  font-weight: 400;
  -webkit-appearance: none;
  appearance: none;
}

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

/* Errors stay inside the brand palette: the message wording carries the meaning,
   and the field gains a heavier navy border so the state is not color-only. */
.signup__input[aria-invalid="true"] {
  border-color: var(--alseen-navy);
  box-shadow: inset 0 0 0 1px var(--alseen-navy);
}

.signup__button {
  flex: none;
  min-width: 8.5rem; /* Fits "Sending…" so the row does not shift while loading. */
  padding: 0 1.25rem;
  border: 0;
  background: var(--alseen-cobalt);
  color: var(--alseen-white);
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.signup__button:hover { background: var(--alseen-navy); }

.signup__button[aria-disabled="true"] {
  background: var(--alseen-navy);
  cursor: progress;
}

.signup__input:focus-visible,
.signup__button:focus-visible {
  outline: 2px solid var(--alseen-cobalt);
  outline-offset: 3px;
}

/* The field and button touch, so the field's ring sits inside it. */
.signup__input:focus-visible { outline-offset: -3px; }

.signup__status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--alseen-muted);
  font-size: 0.875rem;
}

/* The button already reads "Sending…". Screen readers still hear the status,
   but it is not shown twice. Space is kept so nothing moves. */
.signup__status[data-state="loading"] { opacity: 0; }

.signup__status[data-state="error"],
.signup__status[data-state="success"] {
  color: var(--alseen-navy);
  font-weight: 600;
}

.footer {
  padding: 1.5rem;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--alseen-muted);
  font-size: 0.8125rem;
}

.footer a,
.doc a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer a:hover,
.doc a:hover { color: var(--alseen-cobalt); }

.footer a:focus-visible,
.doc a:focus-visible {
  outline: 2px solid var(--alseen-cobalt);
  outline-offset: 2px;
}

.footer__sep { margin: 0 0.375rem; }

/* Text pages such as /privacy. */
.doc {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.doc a.doc__home { display: inline-block; text-decoration: none; }

.doc__logo {
  display: block;
  width: 8.75rem; /* 140px, the pack's minimum recommended lockup width. */
  height: auto;
}

.doc__title {
  margin: 2.5rem 0 0;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.doc__meta {
  margin: 0.5rem 0 0;
  color: var(--alseen-muted);
  font-size: 0.875rem;
}

.doc h2 {
  margin: 2rem 0 0;
  font-size: 1.0625rem;
  font-weight: 700;
}

.doc p {
  margin: 0.5rem 0 0;
  color: var(--alseen-navy);
}

@media (max-width: 24rem) {
  .signup__row { flex-direction: column; gap: 0.5rem; }
  .signup__input { border-right: 1px solid var(--alseen-muted); }
  /* In a column, flex: 1 would override the fixed height and collapse the field. */
  .signup__input { flex: none; width: 100%; }
  .signup__button { width: 100%; }
}
