/* ============================================================
   Granular — coming-soon page
   Tokens first: tweak --accent / --accent-2 below to restyle
   the button, focus rings, and the top keyline in one place.
   ============================================================ */

:root {
  --bg: #FAFAF8;
  --ink: #0A0A0B;
  --ink-70: rgba(10, 10, 11, 0.72);   /* subhead */
  --ink-55: rgba(10, 10, 11, 0.55);   /* muted labels, footer */
  --ink-45: rgba(10, 10, 11, 0.45);   /* placeholder */
  --hairline: rgba(10, 10, 11, 0.10);

  /* The one accent: deep ledger emerald — money and assurance, not startup purple */
  --accent: #0B7A5E;
  --accent-strong: #08624B;               /* hover */
  --accent-2: #23A583;                    /* second stop of the single gradient */
  --accent-ring: rgba(11, 122, 94, 0.16); /* soft focus halo */

  --error: #B3261E;

  --radius: 12px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---- Reset (minimal) ---- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--bg); }

/* The hidden attribute must beat class display rules (e.g. .signup { display: flex }) */
[hidden] { display: none !important; }

/* ---- Background layers ----
   canvas (0) < vignette (1) < page content (2) < topline (3) */
#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Soft wash behind the hero so text stays crisp over the field */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 92% 72% at 50% 42%,
    rgba(250, 250, 248, 0.94) 0%,
    rgba(250, 250, 248, 0.62) 40%,
    rgba(250, 250, 248, 0) 78%
  );
}

/* ---- Page frame: header / hero / footer in one viewport ---- */
.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ---- Header ---- */
.site-header {
  padding: clamp(20px, 3vw, 32px) clamp(20px, 4vw, 40px);
}

/* Lowercase, tight, confident — Stripe-style wordmark */
.wordmark {
  display: inline-block;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  user-select: none;
}

/* ---- Hero ---- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.pill {
  margin: 0 0 clamp(20px, 4vh, 34px);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-55);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.55);
}

h1 {
  margin: 0 0 clamp(16px, 2.5vh, 22px);
  font-size: clamp(2.375rem, 1.4rem + 5vw, 4.375rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.033em;
  max-width: 22ch;
  text-wrap: balance;
}

.subhead {
  margin: 0 0 clamp(28px, 5vh, 44px);
  font-size: clamp(1rem, 0.94rem + 0.35vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink-70);
  max-width: 36rem;
  text-wrap: pretty;
}

/* ---- Email capture ---- */
.signup-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
}

.signup {
  display: flex;
  gap: 8px;
  width: min(100%, 27rem);
  padding: 6px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(10, 10, 11, 0.04), 0 12px 32px rgba(10, 10, 11, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.signup:focus-within {
  border-color: rgba(11, 122, 94, 0.45);
  box-shadow: 0 1px 2px rgba(10, 10, 11, 0.04), 0 0 0 4px var(--accent-ring);
}

.signup.invalid { border-color: rgba(179, 38, 30, 0.5); }
.signup.invalid:focus-within {
  box-shadow: 0 1px 2px rgba(10, 10, 11, 0.04), 0 0 0 4px rgba(179, 38, 30, 0.12);
}

#email {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem; /* 16px floor stops iOS zooming the page on focus */
  color: var(--ink);
  padding: 10px 12px;
}

#email::placeholder { color: var(--ink-45); }

.signup button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  padding: 10px 18px;
  border-radius: calc(var(--radius) - 5px);
  transition: background-color 0.15s ease;
  white-space: nowrap;
}

.signup button:hover,
.signup button:active { background: var(--accent-strong); }

.signup button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-ring);
}

/* Validation / follow-up line (height reserved so nothing shifts) */
.form-note {
  margin: 12px 0 0;
  min-height: 1.35em;
  font-size: 0.845rem;
  color: var(--ink-55);
}

.form-note.error { color: var(--error); }

/* Success state, swapped in for the form on valid submit */
.success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  font-size: 1.0625rem;
  font-weight: 500;
}

.success svg { flex: none; color: var(--accent); }

/* ---- Footer ---- */
.site-footer {
  padding: clamp(18px, 3vw, 28px);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ink-55);
}

.site-footer p { margin: 0; }

.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(10, 10, 11, 0.25);
  transition: color 0.15s ease;
}

.site-footer a:hover { color: var(--ink); }

.site-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Entrance (killed under reduced motion below) ---- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.hero > * { animation: rise 0.65s cubic-bezier(0.2, 0.7, 0.25, 1) backwards; }
.hero > :nth-child(1) { animation-delay: 0.05s; }
.hero > :nth-child(2) { animation-delay: 0.12s; }
.hero > :nth-child(3) { animation-delay: 0.19s; }
.hero > :nth-child(4) { animation-delay: 0.26s; }

/* ---- Utilities ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ---- Small screens ---- */
@media (max-width: 480px) {
  .hero { padding: 20px; }

  .signup {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }

  .signup button {
    width: 100%;
    padding: 12px 18px;
  }
}

/* ---- Reduced motion: no transitions/entrances; canvas freezes in script.js ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
