/* The app's opening screen on the web (`OnboardingView.swift`, FirstLaunchView):
   the range light at dusk behind the name, the line in Fraunces,
   the white pill. One committed dark look, as the app's opening screen is. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #17452a;
  --ground-deep: #091c11;
  /* The smoke's top and bottom edge (`smoke.js`), and theme-color: what
     Safari paints behind its bars, so they continue the page. */
  --edge: #0f2b1a;
  --glow: rgba(255, 196, 120, 0.16);
  --mist: rgba(198, 232, 210, 0.08);
  --ink: #f4f8f2;
  --ink-2: rgba(244, 248, 242, 0.78);
  --ink-3: rgba(244, 248, 242, 0.58);
  --rule: rgba(244, 248, 242, 0.16);
  --track: rgba(255, 255, 255, 0.08);
  --racing: #1a4d2e;
  --leaf: #8fd6a8;
  --warn: #ffb4a8;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --chrome: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* The green smoke (`smoke.js`), fixed behind everything; the gradient on
   html stays under it for browsers without WebGL. */
.smoke {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
}

/* The light over the whole page, however long: on the root, never fixed,
   which iOS Safari ignores and which seams below the first screen. */
html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  background:
    radial-gradient(120% 70% at 85% -10%, var(--glow), transparent 60%),
    radial-gradient(90% 60% at 0% 110%, var(--mist), transparent 70%),
    linear-gradient(180deg, var(--ground) 0%, var(--ground-deep) 100%);
  background-color: var(--edge);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  color: var(--ink);
  font-family: var(--chrome);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--leaf); }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 48px;
}

/* The name, on the privacy note. No logo until one is chosen (owner,
   21 October 2026: "we've also not settled for that logo"). */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.name { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }

/* The home page: the name, one line, the sign-up, one link; centred on
   the light, nothing else (owner, 21 October 2026). */
.solo {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  text-align: center;
}
.solo .hero {
  align-self: center;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.solo .foot { justify-content: center; }

/* The name is the biggest thing on the screen (owner, 21 October 2026),
   with no mark beside it: the logo is not settled. The line under it. */
.title {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(52px, 13vw, 120px);
  line-height: 1;
  letter-spacing: -0.025em;
}

.tagline {
  margin: 18px 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.2;
  color: var(--ink-2);
  text-wrap: balance;
}

/* The invitation over the field (owner, 22 October 2026). */
.invite {
  margin: 40px 0 0;
  font-family: var(--chrome);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}
.invite + .join { margin-top: 14px; }

/* The sign-up: the app's white pill, on the track its answers sit on. */
.join { margin-top: 40px; width: 100%; max-width: 480px; display: flex; flex-direction: column; align-items: center; }
.join-row {
  width: 100%;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--track);
  border: 1px solid var(--rule);
}
.join-row:focus-within { border-color: rgba(244, 248, 242, 0.5); }
.join input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.join input::placeholder { color: var(--ink-3); }
.join input:focus { outline: none; }
.join button {
  flex: none;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--racing);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s ease, background 0.2s ease;
}
.join button:hover { background: #ffffff; }
.join button:active { transform: scale(0.97); }
.join button:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.join button[disabled] { opacity: 0.6; cursor: default; }

.join-status { margin: 12px 0 0; font-size: 15px; font-weight: 600; }
.join-status:empty { display: none; }
.join-status.is-error { color: var(--warn); }
.join-status.is-done { color: var(--leaf); }
.cf-turnstile { margin-top: 10px; }
.cf-turnstile:empty { margin-top: 0; }
.join-note {
  margin-top: 16px;
  padding: 10px 6px;
  font-size: 14px;
  color: var(--ink-3);
}
.join-note:hover { color: var(--ink); }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
  color: var(--ink-3);
}
.foot a { color: var(--ink-3); }

/* The privacy note: plain reading on the same ground. */
.doc { max-width: 680px; }
.doc h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.doc h2 { margin: 36px 0 8px; font-family: var(--display); font-weight: 600; font-size: 22px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.2em; }
.doc .updated { color: var(--ink-3); font-size: 14px; }

@media (max-width: 760px) {
  .page { gap: 40px; }
}

/* On a phone the field is its own line and the button its own below it,
   each a full-width pill (owner, 21 October 2026). */
@media (max-width: 560px) {
  .join-row { flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; border-radius: 0; }
  .join input {
    flex: none;
    width: 100%;
    height: 52px;
    background: var(--track);
    border: 1px solid var(--rule);
    padding: 0 20px;
    text-align: center;
  }
  .join input:focus { border-color: rgba(244, 248, 242, 0.5); }
  .join button { width: 100%; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .join button { transition: none; }
}
