@font-face {
  font-family: "Young Serif";
  src: url("fonts/young-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #9fbfdc;
  --ink: #1f2e17;
  --dim: #33452a;
  --green: #2f5a1e;
  --green-dark: #23461a;
  --err: #8f1f12;
  --display: "Young Serif", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  height: 100svh;
  display: flex;
  align-items: flex-start;
  padding: clamp(20px, 6vh, 64px) clamp(20px, 6vw, 88px);
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* Shown before the first frame, and as the whole scene without WebGL. */
  background: linear-gradient(#86aed8 0%, #f6c3a8 38%, #ffd99a 55%, #a9bd70 56%, #67913f 100%);
}

/* No box: the words sit on the sky. A soft light halo keeps them readable
   where the sky behind them is bright. */
.card {
  position: relative;
  width: min(100%, 30rem);
  text-shadow: 0 0 18px rgba(255, 244, 225, 0.7), 0 0 4px rgba(255, 244, 225, 0.5);
}

.kicker {
  margin: 0 0 0.6em;
  font-size: 0.85rem;
  color: var(--dim);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 7.4vh, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.lede {
  margin: 0.7em 0 0;
  font-size: clamp(1.05rem, 2.4vh, 1.25rem);
  font-weight: 600;
  color: var(--green);
}

.body {
  margin: 0.6em 0 0;
  max-width: 26rem;
  font-size: clamp(0.92rem, 2vh, 1.02rem);
  line-height: 1.5;
  color: var(--dim);
}

form {
  margin-top: clamp(16px, 3vh, 28px);
  text-shadow: none;
}

form > label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5em;
  text-shadow: 0 0 12px rgba(255, 244, 225, 0.8);
}

/* The field and the button are one piece. */
.row {
  display: flex;
  max-width: 26rem;
  background: #fff;
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 2px 0 rgba(31, 46, 23, 0.18), 0 8px 24px rgba(31, 46, 23, 0.16);
  transition: box-shadow 0.2s;
}

.row:focus-within { box-shadow: 0 0 0 3px rgba(47, 90, 30, 0.35), 0 8px 24px rgba(31, 46, 23, 0.16); }

input[type="email"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming the page */
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0.6em 0.9em;
  outline: none;
}

input[type="email"]::placeholder { color: #8a9482; }

.row:has(input[aria-invalid="true"]) { box-shadow: 0 0 0 2px var(--err); }

button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 999px;
  padding: 0 1.3em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, opacity 0.2s;
}

button:hover { background: var(--green-dark); }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: progress; }

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

.status {
  min-height: 1.3em;
  margin: 0.6em 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
  text-shadow: 0 0 12px rgba(255, 244, 225, 0.9);
}

.status.error { color: var(--err); }

/* Short screens: drop the long paragraph before anything scrolls. */
@media (max-height: 640px) {
  .body { display: none; }
}

@media (max-width: 420px) {
  .row { flex-direction: column; border-radius: 16px; gap: 4px; }
  button { padding: 0.75em 1em; border-radius: 12px; }
}

.lede a { color: inherit; }
