/* Terrain Glow: light and earthy (Josh, 2026-11-15). The bold thing: the stand-in backyard on the homepage,
   in layers that pull apart. "Light it" turns the page to dusk and lights the yard. */
:root {
  --lichen: #eceee4;
  --paper: #f7f8f2;
  --oak: #23301f;
  --moss: #3f6b3a;
  --moss-deep: #2f5229;
  --grass: #c9a84f;
  --soil: #6e5a48;
  --rule: #cdd3c0;

  --bg: var(--lichen);
  --ink: var(--oak);
  --quiet: var(--soil);
  --line: var(--rule);
  --link: var(--moss-deep);
  --surface: var(--paper);

  --head: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --body: "Source Serif 4", Georgia, serif;
}

body.lit {
  --bg: #182016;
  --ink: #eef0e6;
  --quiet: #c9c2ac;
  --line: #3a4634;
  --link: #e8c766;
  --surface: #222c1f;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  transition: background-color .8s ease, color .8s ease;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
a:focus-visible, .cta:focus-visible, .ctl:focus-visible, input:focus-visible {
  outline: 3px solid var(--grass);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The top bar (survey pages) */
.topbar {
  padding: .8rem 1.25rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--oak);
  text-decoration: none;
}

/* The column */
.column {
  max-width: 38rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.column--wide { max-width: 46rem; }

h1, h2 { font-family: var(--head); font-weight: 600; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.9rem, 9vw, 4.4rem); letter-spacing: -.01em; margin-top: 2.2rem; }
h2 { font-size: 1.45rem; }
.page-title { font-size: clamp(2.1rem, 6vw, 2.9rem); }

.lead {
  font-size: 1.4rem;
  line-height: 1.4;
  font-weight: 600;
  margin: .6rem 0 1.1rem;
  max-width: 34ch;
  text-wrap: balance;
}

/* The survey invitation: clear, not pushy */
.invite { margin: 2rem 0 2.6rem; }
.invite p { margin: .75rem 0 0; color: var(--quiet); }
.cta {
  display: inline-block;
  padding: .75rem 1.5rem .8rem;
  background: var(--moss);
  color: #fff;
  border-radius: 6px;
  font-family: var(--head);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
  text-decoration: none;
}
.cta:hover { background: var(--moss-deep); color: #fff; }
body.lit .cta { background: #e8c766; color: #182016; }
.time { margin-left: .6rem; color: var(--quiet); font-size: 1rem; white-space: nowrap; }

.note { border-top: 1px solid var(--line); padding: 1.4rem 0 .4rem; }
.note p { margin: .4rem 0 1rem; }

.foot {
  margin-top: 2.5rem;
  padding-bottom: 2.5rem;
  color: var(--quiet);
  font-size: .95rem;
}
.foot p { margin: 0 0 .35rem; }
.foot p:first-child { border-top: 1px solid var(--line); padding-top: 1.2rem; }

/* ---------- Homepage: text beside the layered terrain ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
  gap: 1rem 3.5rem;
  align-items: center;
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}
.hero h1 { margin-top: 0; }
@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 2rem; }
  .hero .invite { margin-bottom: 1rem; }
}

.model { margin: 0; }
.model-view {
  position: relative;
  aspect-ratio: 66 / 46;
  perspective: 1500px;
  perspective-origin: 50% 10%;
}
.stack {
  position: absolute;
  inset: 12% 8% 14%;
  transform-style: preserve-3d;
  transform: rotateX(57deg) rotateZ(-27deg);
  transition: transform .9s cubic-bezier(.3, .7, .2, 1);
}
.model.is-apart .stack { transform: translateY(9%) scale(.84) rotateX(57deg) rotateZ(-27deg); }
.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: translateZ(calc(var(--i) * var(--lift, 6px)));
  transition: transform .9s cubic-bezier(.3, .7, .2, 1) calc(var(--i) * 40ms);
  /* Taller things (--h) cast longer shadows; the sun slider sets the direction and length. */
  filter: drop-shadow(calc(var(--sx, -4px) * var(--h, 1)) calc(var(--sy, 3px) * var(--h, 1)) 2px rgba(35, 48, 31, .32));
}
.model.is-apart { --lift: 30px; }

/* The stand-in yard, by day */
.layer * { transition: fill .8s ease, stroke .8s ease, opacity .8s ease; }
.soil { fill: #c9b38f; }
.house { fill: #8f877a; }
.win { fill: #b8b2a6; }
.fence { fill: none; stroke: #6e5a48; stroke-width: 5; }
.mulch { fill: #8a6c52; }
.lawn { fill: #9db57c; }
.paver { fill: #ddd3c0; }
.joint { fill: none; stroke: #c4b9a3; stroke-width: 1; }
.gravel { fill: none; stroke: #e2d8c3; stroke-width: 16; stroke-linecap: round; }
.seat { fill: #e2d8c3; }
.lamps { fill: #8a8270; }
.halos { fill: #ffd98a; opacity: 0; }
.canopy { fill: #6d8c55; }
.canopy-hi { fill: #86a46a; }
.shrub.a { fill: #5f7f4f; }
.shrub.b { fill: #7d9c66; }
.shrub.c { fill: #93ab78; }

/* The same yard at dusk, with its lights on */
body.lit .layer { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
body.lit .soil { fill: #3a3528; }
body.lit .house { fill: #24221d; }
body.lit .win { fill: #ffd98a; }
body.lit .fence { stroke: #1c1a16; }
body.lit .mulch { fill: #2e261e; }
body.lit .lawn { fill: #2c3a26; }
body.lit .paver { fill: #4c473c; }
body.lit .joint { stroke: #3a362e; }
body.lit .gravel { stroke: #5a5444; }
body.lit .seat { fill: #5a5444; }
body.lit .lamps { fill: #fff1c4; }
body.lit .halos { opacity: .8; }
body.lit .canopy { fill: #22301e; }
body.lit .canopy-hi { fill: #2d3d27; }
body.lit .shrub.a { fill: #1f2a1b; }
body.lit .shrub.b { fill: #283523; }
body.lit .shrub.c { fill: #313f2b; }

.model-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin: .4rem 0 1rem;
  font-family: var(--head);
  font-size: 1rem;
}
.ctl {
  padding: .4rem .9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.ctl:hover { border-color: var(--quiet); }
.ctl[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sun { display: inline-flex; align-items: center; gap: .45rem; color: var(--quiet); }
.sun input { width: 8.5rem; accent-color: var(--grass); }

.panel {
  max-width: 24rem;
  padding: .9rem 1.1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: background-color .8s ease, border-color .8s ease;
}
.panel-title { margin: 0; font-family: var(--head); font-weight: 600; font-size: 1.2rem; }
.panel-note { margin: .1rem 0 .6rem; color: var(--quiet); font-size: .9rem; }
.panel dl { margin: 0; }
.panel dl div {
  display: flex;
  justify-content: space-between;
  padding: .3rem 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.panel dt { margin: 0; }
.panel dd { margin: 0; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  body, .stack, .layer, .layer *, .panel { transition: none; }
}

/* Survey pages */
.form-help { color: var(--quiet); margin: .5rem 0 1.2rem; }
.form-frame {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
}
.form-frame--yard { height: 2100px; }
.form-frame--park { height: 1900px; }
