/* groundwork.house page shell: the nav, the footer, buttons, the type scale, the layout widths and the waitlist card,
   shared by the home page, the agents page, the Legal Center and the 404. Load /home/tokens.css first. Colors, type,
   tracking and radii are the app's tokens; nothing here defines a color of its own except the plain white on an
   indigo button.

   Every page uses this nav, first thing in <body>. The two links are a pair: the page you are on gets
   aria-current="page" ("For buyers" on the home page, "For agents" on the agents page; neither elsewhere). The button
   is "Join the waitlist" to "/#join" on every page except the agents page, where it reads "Get early access" and goes
   to that page's own "#join"; the home page's points at "#join". The home and agents pages, whose heroes have their own
   button to the card, add data-cta="reveal" to the <header> so the nav's button waits until that one has scrolled off.

   <a class="skip" href="#main">Skip to content</a>
   <header class="site-nav" id="site-nav">
     <div class="site-nav-in wrap">
       <a class="site-brand" href="/" aria-label="Groundwork home">
         <img src="/brand/logo.svg" alt="" width="24" height="17">
         <span>Groundwork</span>
       </a>
       <nav class="site-links" aria-label="Main">
         <a href="/">For buyers</a>
         <a href="/agents/">For agents</a>
       </nav>
       <a class="btn btn-primary btn-sm site-cta" href="/#join">Join the waitlist</a>
     </div>
   </header>

   and this footer, last thing in <body>:

   <footer class="site-footer">
     <div class="wrap">
       <div class="site-foot-cols">
         <div class="site-foot-brand">
           <a class="site-brand" href="/" aria-label="Groundwork home"><img src="/brand/logo.svg" alt="" width="24" height="17"><span>Groundwork</span></a>
           <p>Colorado homes and their blocks, rebuilt in 3D from public lidar.</p>
         </div>
         <nav aria-label="Product"><h2>Groundwork</h2><ul>
           <li><a href="/">For buyers</a></li><li><a href="/agents/">For agents</a></li><li><a href="/#join">Join the waitlist</a></li>
         </ul></nav>
         <nav aria-label="Legal"><h2>Legal</h2><ul>
           <li><a href="/legal/">Legal Center</a></li><li><a href="/legal/privacy/">Privacy</a></li><li><a href="/legal/terms/">Terms</a></li>
           <li><a href="/legal/disclaimers/">Disclaimers</a></li><li><a href="/legal/fair-housing/">Fair housing</a></li>
           <li><a href="/legal/data-sources/">Data sources</a></li><li><a href="/legal/accessibility/">Accessibility</a></li>
         </ul></nav>
         <div><h2>Contact</h2><ul class="site-foot-contact">
           <li><a href="mailto:hello@groundwork.house"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><rect x="1.5" y="3" width="13" height="10" rx="2.2" fill="none" stroke="currentColor" stroke-width="1.3"/><path d="m2.5 4.5 5.5 4.25 5.5-4.25" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/></svg>hello@groundwork.house</a></li>
           <li><a href="https://x.com/groundworkhouse" rel="me" aria-label="Groundwork on X, @groundworkhouse"><svg viewBox="0 0 24 24" width="13" height="13" aria-hidden="true"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" fill="currentColor"/></svg>@groundworkhouse</a></li>
         </ul></div>
       </div>
       <p class="site-foot-note"><span class="eho"><svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d="M12 2 1.5 10h2.6v12h15.8V10h2.6L12 2Zm-5 10.2h10v1.9H7v-1.9Zm0 3.7h10v1.9H7v-1.9Z" fill="currentColor"/></svg>Equal housing opportunity.</span>
         © 2026 Groundwork. Made in Colorado. Groundwork provides information only. It is not an appraisal, inspection, survey or flood determination, and not legal, tax, insurance or lending advice.</p>
     </div>
   </footer>
*/

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:root { --nav-h: 56px; }
body {
  margin: 0; background: var(--gw-canvas); color: var(--gw-ink);
  font: var(--fw-regular) var(--fs-body) / 1.5 var(--font); letter-spacing: var(--track-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-kerning: normal;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--gw-accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--gw-focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--gw-accent-soft); }
/* small figures that line up in a column; never on a large figure, where tabular digits open gaps */
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: var(--r-pill); background: var(--gw-bg-cell); box-shadow: var(--sh-md); color: var(--gw-ink); }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout widths and the section rhythm ---------- */
:root { --gutter: clamp(16px, 4vw, 40px); --section-y: clamp(64px, 8vw, 112px); }
.wrap { width: 100%; max-width: calc(1100px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: calc(760px + 2 * var(--gutter)); }
.section { padding-block: var(--section-y); }

/* ---------- type scale (headings semibold, never heavier; tracking from the tokens, by size) ---------- */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold); color: var(--gw-ink); text-wrap: balance; }
.t-hero { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.06; letter-spacing: var(--track-hero); }
.t-section { font-size: clamp(28px, 3.3vw, 38px); line-height: 1.14; letter-spacing: var(--track-section); }
.t-title { font-size: var(--fs-title2); line-height: var(--lh-title2); letter-spacing: var(--track-title); }
.t-lede { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.5; color: var(--gw-mute); letter-spacing: var(--track-body); text-wrap: pretty; }
.t-body { font-size: var(--fs-body); line-height: 1.5; color: var(--gw-ink-2); letter-spacing: var(--track-body); }
.t-fine { font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--gw-mute); letter-spacing: var(--track-footnote); }
p { margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px;
  border: 0; border-radius: var(--r-pill); font: var(--fw-semibold) var(--fs-callout) / 1 var(--font); letter-spacing: var(--track-callout);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-fast) ease, transform 160ms var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gw-accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--gw-accent-hover); }
.btn-quiet { background: var(--gw-accent-tint); color: var(--gw-accent-text); }
.btn-quiet:hover { background: color-mix(in srgb, var(--gw-accent-tint) 88%, var(--gw-accent)); }
.btn-plain { height: auto; padding: 0; background: none; color: var(--gw-accent-text); font-weight: var(--fw-medium); }
.btn-plain:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-sm { height: 34px; padding: 0 16px; font-size: var(--fs-subhead); }
.btn-wide { width: 100%; }

/* ---------- nav: the brand, the buyers/agents pair (a segmented control, as the app draws one), the one action ---------- */
/* The material is the app's chrome, blurred a little less than the app's sheets (20 px, as apple.com's nav): the blur is
   redrawn every frame the page moves under it, and its cost grows with the radius. It is only on once the page has
   moved under the nav (shell.js), so the first screen composites nothing extra. */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: transparent; box-shadow: 0 0.5px 0 transparent;
  transition: background-color var(--t-med) ease, box-shadow var(--t-med) ease;
}
.site-nav.is-scrolled {
  background: var(--mat-chrome); box-shadow: 0 0.5px 0 var(--gw-hair);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
@media (prefers-reduced-transparency: reduce) { .site-nav.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; } }
.site-nav-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; height: var(--nav-h); }
.site-brand { display: inline-flex; align-items: baseline; gap: 6px; justify-self: start; color: var(--gw-ink); font: var(--fw-semibold) var(--fs-subhead) / 1 var(--font); letter-spacing: var(--track-callout); }
.site-brand:hover { text-decoration: none; }
/* The layers mark stands on its own, no tile: 24 x 17 px beside the 15 px word, sitting on the word's baseline and
   dropped 2 px. That puts its box 1 px above the middle of the capitals, on purpose: the dark lower rim carries the
   mark's weight, so pixel-centered (3 px) reads low. */
.site-brand img { flex: none; width: 24px; height: 17px; position: relative; top: 2px; }
.site-links { display: flex; gap: 2px; padding: 2px; border-radius: var(--r-pill); background: var(--gw-fill-3); }
.site-links a {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: var(--r-pill);
  color: var(--gw-ink-2); font-size: var(--fs-footnote); font-weight: var(--fw-medium); letter-spacing: var(--track-footnote); white-space: nowrap;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.site-links a:hover { color: var(--gw-ink); background: var(--gw-fill-4); text-decoration: none; }
.site-links a[aria-current="page"] { color: var(--gw-ink); font-weight: var(--fw-semibold); background: var(--gw-cell-flat); box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.1); }
.site-cta { justify-self: end; }
/* On a page whose hero has its own waitlist button (the home and agents pages mark their nav data-cta="reveal"), the
   nav's button stays out of the way while that one is on screen and comes in once it has scrolled off (shell.js
   watches it with an IntersectionObserver and sets .cta-in). It keeps its grid cell while hidden, so the brand and the
   pair never move. The hidden state only applies where scripts run, so without them the button is simply there; the
   transitions only start once shell.js has made its first call (.cta-live), so a page restored mid-scroll doesn't
   animate on load. Coming in: the app's "snappy" spring (response 0.32 s, damping 0.82; plan/motion.js) on a short
   drop, scale and unblur. Going out: quicker, all together, mostly in the first frames. It uses translate and scale,
   not transform, so the button's own press still works. */
@media (scripting: enabled) {
  .site-nav[data-cta="reveal"]:not(.cta-in) .site-cta { opacity: 0; translate: 0 -6px; scale: 0.9; filter: blur(4px); visibility: hidden; pointer-events: none; }
}
.site-nav.cta-live .site-cta {
  transition: background-color var(--t-fast) ease, transform 160ms var(--ease-out),
    opacity 200ms cubic-bezier(0.2, 0.7, 0.4, 1), translate 200ms cubic-bezier(0.2, 0.7, 0.4, 1), scale 200ms cubic-bezier(0.2, 0.7, 0.4, 1),
    filter 180ms cubic-bezier(0.2, 0.7, 0.4, 1), visibility 0s linear 200ms;
}
.site-nav.cta-live.cta-in .site-cta {
  --cta-spring: cubic-bezier(0.22, 1, 0.36, 1);
  transition: background-color var(--t-fast) ease, transform 160ms var(--ease-out),
    opacity 240ms var(--ease-out), translate 440ms var(--cta-spring), scale 440ms var(--cta-spring), filter 280ms var(--ease-out), visibility 0s;
}
@supports (transition-timing-function: linear(0, 1)) {
  .site-nav.cta-live.cta-in .site-cta {
    --cta-spring: linear(0, 0.0336, 0.115, 0.2217, 0.3377, 0.4523, 0.5588, 0.6537, 0.7353, 0.8033, 0.8586, 0.9024, 0.9361, 0.9614, 0.9798, 0.9927, 1.0013, 1.0067, 1.0096, 1.0109, 1.011, 1.0104, 1.0094, 1.0082, 1.0069, 1.0056, 1.0045, 1.0035, 1.0026, 1.0019, 1.0014, 1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav[data-cta="reveal"]:not(.cta-in) .site-cta { translate: none; scale: none; filter: none; }
  .site-nav.cta-live .site-cta { transition: background-color var(--t-fast) ease, opacity 150ms ease, visibility 0s linear 150ms; }
  .site-nav.cta-live.cta-in .site-cta { transition: background-color var(--t-fast) ease, opacity 150ms ease, visibility 0s; }
}
@media (max-width: 600px) {
  .site-nav-in { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
  .site-brand span { display: none; }
}
@media (max-width: 440px) {
  .site-nav-in { grid-template-columns: auto minmax(0, 1fr); }
  .site-links { justify-self: end; }
  .site-cta { display: none; }
}

/* ---------- cards ---------- */
.card { background: var(--gw-bg-cell); border-radius: var(--r-sheet); box-shadow: var(--sh-sm); }

/* ---------- the waitlist card (the home page's "#join", and the agents page's) ---------- */
.join { padding-block: var(--section-y); scroll-margin-top: var(--nav-h); }
.join-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 64px); padding: clamp(28px, 4.5vw, 56px); }
.join-copy { display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px; }
.join-copy .t-lede { max-width: 30rem; }
/* what joining leads to, in a few plain lines, filling the column above the side note */
.join-next { align-self: start; max-width: 30rem; margin-top: 18px; }
.join-next h3 { margin-bottom: 2px; font: var(--fw-semibold) var(--fs-subhead) / 1.3 var(--font); color: var(--gw-ink); letter-spacing: var(--track-callout); }
.join-next ol { margin: 0; padding: 0; list-style: none; }
.join-next li { padding-block: 11px; font-size: var(--fs-subhead); line-height: 1.45; color: var(--gw-ink-2); letter-spacing: var(--track-callout); }
.join-next li + li { border-top: 0.5px solid var(--gw-hair); }
/* (a side note sits at the foot of the copy column, level with the form's last line) */
.join-aside { align-self: end; max-width: 30rem; padding-top: 16px; border-top: 0.5px solid var(--gw-hair); }
@media (max-width: 860px) { .join-card { grid-template-columns: 1fr; } }

.form { display: flex; flex-direction: column; gap: 18px; }
.form[hidden], .thanks[hidden] { display: none; }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-label { padding: 0; font-size: var(--fs-subhead); font-weight: var(--fw-semibold); color: var(--gw-ink); letter-spacing: var(--track-callout); }
.field-opt { font-weight: var(--fw-regular); color: var(--gw-mute); }
.field input[type="email"], .field input[type="text"] {
  width: 100%; height: 48px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-field);
  background: var(--gw-fill-3); color: var(--gw-ink); font: var(--fw-regular) var(--fs-body) / 1 var(--font); letter-spacing: var(--track-body);
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.field input::placeholder { color: var(--label-3); }
.field input:hover { background: var(--gw-fill-2); }
.field input:focus-visible { outline: none; border-color: var(--gw-focus); background: var(--gw-bg-cell); box-shadow: 0 0 0 4px var(--gw-accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--gw-bad-fill); }

/* the role: a segmented control, as the app draws one */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 11px; background: var(--gw-fill-3); }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 4px 8px; border-radius: 9px;
  color: var(--gw-ink); font-size: var(--fs-subhead); font-weight: var(--fw-medium); letter-spacing: var(--track-callout); text-align: center;
  transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.seg label:hover span { background: var(--gw-fill-4, var(--fill-4)); }
.seg input:checked + span { background: var(--gw-cell-flat); box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.04), 0 3px 8px rgba(0, 0, 0, 0.12); font-weight: var(--fw-semibold); }
.seg input:focus-visible + span { outline: 3px solid var(--gw-focus); outline-offset: 1px; }
/* (in dark, the app's selected segment is a lighter warm grey; the flat cell alone barely shows against the track) */
@media screen and (prefers-color-scheme: dark) {
  .seg input:checked + span, .site-links a[aria-current="page"] { background: #565453; }
}
.seg.invalid { box-shadow: 0 0 0 1px var(--gw-bad-fill); }
@media (max-width: 420px) { .seg { grid-template-columns: 1fr; } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile:empty { display: none; }
/* (Turnstile's invisible widget is an empty box; take back the gap it adds, so City and the consent line sit as the
   other fields do. The form is a flex column, where a negative margin can do that; a challenge, when one is shown,
   keeps the gap below it.) */
.form .cf-turnstile { margin-top: -18px; }
.form-error { color: var(--gw-bad); font-size: var(--fs-subhead); }
.consent a, .privacy a, .thanks a { color: var(--gw-accent-text); }
.form .consent { margin-top: 2px; }
.thanks { display: grid; align-content: start; justify-items: start; gap: 12px; }
.check { width: 48px; height: 48px; fill: none; stroke: var(--gw-good-fill); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- footer ---------- */
.site-footer { margin-top: var(--section-y); padding-block: 48px 36px; border-top: 0.5px solid var(--gw-hair); font-size: var(--fs-footnote); line-height: 1.5; letter-spacing: var(--track-footnote); }
.join + .site-footer, main:has(> .join:last-child) + .site-footer { margin-top: 0; }
.site-foot-cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.site-foot-brand p { margin-top: 12px; max-width: 26ch; color: var(--gw-mute); }
.site-footer h2 { margin-bottom: 10px; font: var(--fw-semibold) var(--fs-footnote) / var(--lh-footnote) var(--font); color: var(--gw-ink); letter-spacing: var(--track-footnote); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.site-footer ul a { color: var(--gw-mute); }
.site-footer ul a:hover { color: var(--gw-ink); text-decoration: none; }
.site-foot-contact a { display: inline-flex; align-items: center; gap: 8px; }
.site-foot-contact svg { flex: none; }
.site-foot-note { margin-top: 40px; padding-top: 20px; border-top: 0.5px solid var(--gw-hair); color: var(--gw-mute); font-size: var(--fs-caption1); line-height: var(--lh-caption1); letter-spacing: var(--track-caption); }
.site-foot-note .eho { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--gw-ink-2); }
.site-foot-note .eho svg { display: inline-block; }
@media (max-width: 860px) { .site-foot-cols { grid-template-columns: 1fr 1fr; } .site-foot-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .site-foot-cols { grid-template-columns: 1fr; } }

/* ---------- entrances: a short rise and fade the first time a block comes into view (shell.js adds .in) ---------- */
/* (opacity and transform only, so the compositor runs them; the class comes off-screen-first from an observer, never
   from a scroll listener) */
.has-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease var(--d, 0ms), transform 700ms var(--ease-out) var(--d, 0ms); }
.has-reveal .reveal.in { opacity: 1; transform: none; }
