/* Waystation landing — palette drawn from the app icon:
   forest ground, monarch gold, pale cream, sage. Terracotta appears once. */

:root {
  --forest-deep: #0e2c1c;
  --forest: #17402a;
  --forest-soft: #1e4f34;
  --leaf: #388c54;
  --sage: #8ca97a;
  --gold: #c9973b;
  --gold-pale: #dfc170;
  --cream: #f3ecd7;
  --cream-dim: #e6dbbc;
  --terracotta: #c0603c;
  --ink: #20301f;

  --font-display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Public Sans", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--cream);
  background: var(--forest);
}

img { max-width: 100%; display: block; }

/* author `display` rules outrank the UA's [hidden] rule; restore it */
[hidden] { display: none !important; }

::selection { background: var(--gold); color: var(--forest-deep); }

/* ---------- nav ---------- */

.nav { position: absolute; inset: 0 0 auto 0; z-index: 10; }

.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--cream); text-decoration: none;
  font-family: var(--font-display); font-size: 1.35rem;
}

.brand img { border-radius: 50%; }

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(1100px 520px at 78% -10%, var(--forest-soft), transparent 65%),
    var(--forest);
  padding: 120px 28px 0;
  overflow: hidden;
}

.hero-inner {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 56px; align-items: start;
}

.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-pale); margin-bottom: 22px;
}

h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08; letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.lede {
  font-size: 1.1rem; color: var(--cream-dim);
  max-width: 34em; margin-bottom: 34px;
}

.hero-points { list-style: none; margin-bottom: 34px; }

.hero-points li {
  display: flex; gap: 16px; align-items: baseline;
  padding: 11px 0; max-width: 36em;
  border-top: 1px solid rgba(223, 193, 112, 0.18);
  color: var(--cream-dim); font-size: 0.98rem;
}

.hero-points li:last-child { border-bottom: 1px solid rgba(223, 193, 112, 0.18); }

.pt {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  color: var(--gold); flex: 0 0 auto;
}

.hero-facts { max-width: 34em; padding-bottom: 72px; }

.hero-facts p {
  font-size: 0.95rem; color: var(--sage);
  padding: 4px 0;
}

.hero-facts strong { color: var(--gold-pale); font-weight: 600; }

.cite {
  font-family: var(--font-mono); font-size: 0.65em;
  vertical-align: super; margin-left: 3px;
  color: var(--gold); text-decoration: none;
}

.cite:hover, .cite:focus-visible { color: var(--gold-pale); text-decoration: underline; }

/* ---------- the lawn sign (signature) ---------- */

.sign-wrap {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 8px;
}

.sign-foliage {
  position: absolute; top: -58px; left: 50%;
  transform: translateX(-50%);
  width: min(660px, 140%);
  pointer-events: none; z-index: 1;
}

.sign {
  width: min(400px, 100%);
  background: var(--cream);
  color: var(--ink);
  border: 3px solid var(--forest-deep);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 3px var(--cream),
    inset 0 0 0 5px var(--gold),
    0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 26px 28px 20px;
  position: relative; z-index: 2;
}

.sign-header {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-align: center; color: var(--terracotta);
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--cream-dim);
}

.sign-number {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 2rem; text-align: center; color: var(--forest);
  letter-spacing: 0.06em; margin-bottom: 18px;
}

.sign-number.claimed { color: var(--terracotta); }

.field { display: block; margin-bottom: 14px; }

.field > span, .field legend {
  display: block;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--forest-soft); margin-bottom: 5px;
}

.field input[type="text"], .field input[type="email"] {
  width: 100%; padding: 10px 12px;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: #fbf7ea;
  border: 1.5px solid var(--cream-dim); border-radius: 6px;
}

.field input:focus-visible, .seg input:focus-visible + span {
  outline: 2px solid var(--leaf); outline-offset: 1px;
}

fieldset.field { border: 0; }

.seg { display: flex; gap: 8px; }

.seg label { flex: 1; cursor: pointer; }

.seg input { position: absolute; opacity: 0; }

.seg span {
  display: block; text-align: center; padding: 9px 0;
  font-size: 0.95rem; font-weight: 500;
  border: 1.5px solid var(--cream-dim); border-radius: 6px;
  background: #fbf7ea; color: var(--forest-soft);
}

.seg input:checked + span {
  background: var(--forest); border-color: var(--forest);
  color: var(--cream);
}

.hp { position: absolute; left: -9999px; height: 0; opacity: 0; }

#sign-submit {
  width: 100%; margin-top: 6px; padding: 13px 0;
  font-family: var(--font-body); font-size: 1.02rem; font-weight: 600;
  color: var(--forest-deep);
  background: var(--gold); border: 0; border-radius: 6px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

#sign-submit:hover { background: var(--gold-pale); }
#sign-submit:active { transform: translateY(1px); }
#sign-submit:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
#sign-submit[disabled] { opacity: 0.6; cursor: default; }

.sign-error {
  margin-top: 10px; font-size: 0.88rem; color: var(--terracotta); text-align: center;
}

.sign-reveal {
  position: relative; z-index: 2;
  width: min(440px, 100%);
  text-align: center;
}

.sign-reveal img {
  width: 100%; border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

@keyframes reveal-in {
  0% { transform: scale(1.35); opacity: 0; }
  70% { transform: scale(0.98); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.sign-reveal img { animation: reveal-in 480ms cubic-bezier(0.2, 0.7, 0.3, 1.15) both; }

.reveal-line {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--cream);
  margin: 18px 0 8px;
}

.reveal-sub { font-size: 0.92rem; color: var(--cream-dim); }

#sign-save {
  margin-top: 16px; padding: 12px 26px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  color: var(--forest-deep); background: var(--gold);
  border: 0; border-radius: 6px; cursor: pointer;
}

#sign-save:hover { background: var(--gold-pale); }
#sign-save:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

.sign-foot {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--cream-dim);
  font-size: 0.78rem; text-align: center; color: var(--sage);
}

.sign-stake {
  width: 26px; height: 150px;
  background: linear-gradient(90deg, #6d4f2a, #8a6637 45%, #6d4f2a);
  border: 2px solid var(--forest-deep); border-top: 0;
  z-index: 1; margin-top: -4px;
}

.sign-ground {
  width: 240px; height: 14px; margin-top: -7px;
  background: var(--forest-deep);
  border-radius: 50%;
  opacity: 0.8;
}

/* stamp-in animation when a number is claimed */
@keyframes stamp {
  0% { transform: scale(1.7); opacity: 0; }
  60% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.sign-number.claimed #number-slot {
  display: inline-block;
  animation: stamp 420ms cubic-bezier(0.2, 0.7, 0.3, 1.2) both;
}

/* ---------- footer ---------- */

.foot { background: var(--forest-deep); }

.foot-inner {
  max-width: 1120px; margin: 0 auto; padding: 40px 28px 48px;
  text-align: center;
}

.foot p:first-child {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--gold-pale); margin-bottom: 14px;
}

.foot-fine {
  font-size: 0.78rem; color: var(--sage);
  max-width: 46em; margin: 0 auto; line-height: 1.7;
}

.foot-sources {
  max-width: 46em; margin: 18px auto 0; padding-left: 1.4em;
  text-align: left; font-size: 0.74rem; line-height: 1.7;
  color: var(--sage);
}

.foot-sources li { margin-bottom: 6px; }

.foot-sources a { color: var(--gold-pale); text-decoration-color: rgba(223, 193, 112, 0.4); }

.foot-sources a:hover, .foot-sources a:focus-visible { color: var(--cream); }

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero { padding-top: 104px; }
  .hero-inner { grid-template-columns: 1fr; gap: 12px; }
  .hero-facts { padding-bottom: 40px; }
  .sign-wrap { padding-bottom: 0; }
  .sign-stake { height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sign-number.claimed #number-slot { animation: none; }
  .sign-reveal img { animation: none; }
  #sign-submit { transition: none; }
}
