/* Wrenfield lead funnel. Colors and type are tokens on :root; both themes are defined below. */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout: one calm column with three stops (costs, planning, talk). Each stop is a full-width band
   with a 68rem inner wrapper. Only the estimate summary and the request form are framed objects. */
:root {
  --bg: #EDF1EF;            /* morning mist */
  --band: #E3EAE7;          /* alternate band */
  --surface: #F9FBFA;       /* framed objects, inputs */
  --ink: #1C2A27;           /* spruce-black text */
  --ink-soft: #4A5C58;
  --line: #C8D4D0;
  --primary: #27544B;       /* spruce */
  --on-primary: #F4F8F6;
  --heather: #73527A;       /* half-mourning mauve, used sparingly */
  --heather-wash: #ECE4EE;
  --error: #9A2F2F;

  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-lg: 1.3125rem;
  --t-xl: 1.75rem;
  --t-2xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);

  --r-sm: 6px;
  --r-md: 10px;
  --header-h: 4rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121A19; --band: #172220; --surface: #1C2826; --ink: #E4ECE9; --ink-soft: #A3B4AF;
    --line: #33443F; --primary: #9CCFC0; --on-primary: #10201C; --heather: #CFB2D1;
    --heather-wash: #2D2530; --error: #F0A3A3; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121A19; --band: #172220; --surface: #1C2826; --ink: #E4ECE9; --ink-soft: #A3B4AF;
  --line: #33443F; --primary: #9CCFC0; --on-primary: #10201C; --heather: #CFB2D1;
  --heather-wash: #2D2530; --error: #F0A3A3; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--t-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--bg);
}
h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--t-2xl); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem); }
h3 { font-size: var(--t-lg); line-height: 1.25; }
a { color: var(--primary); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }

.wrap {
  max-width: 68rem; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eyebrow { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--heather); }
.lede { color: var(--ink-soft); max-width: 62ch; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; user-select: all; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 var(--t-sm)/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  padding: 0.8rem 1.25rem; border-radius: var(--r-sm);
  background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary);
}
.btn:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; color: var(--primary); border-color: var(--line); }
.btn-wide { width: 100%; padding-block: 0.95rem; font-size: var(--t-base); }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: baseline; gap: 0.625rem; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand-name { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.01em; }
.brand-sub { font-size: var(--t-xs); color: var(--ink-soft); white-space: nowrap; }
.demo-pill {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--heather); background: var(--heather-wash); padding: 0.2rem 0.5rem; border-radius: 99px; white-space: nowrap;
}
.site-nav { display: flex; gap: 1.5rem; font-size: var(--t-sm); }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.header-phone { font-size: var(--t-sm); }
.site-header .btn { padding: 0.6rem 1rem; white-space: nowrap; }

/* Bands */
.band { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.band-alt { background: var(--band); }
.band-head { display: grid; gap: 0.875rem; margin-bottom: 2.5rem; }
section[id] { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(2.5rem, 2rem + 2vw, 4rem); }
.hero-copy { display: grid; gap: 1.25rem; max-width: 46rem; }
.hero-copy .lede { font-size: var(--t-lg); line-height: 1.5; }
.paths-label { margin-top: 3rem; margin-bottom: 0.75rem; }
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.path {
  display: grid; grid-template-rows: auto 1fr auto; gap: 0.5rem; padding: 1.25rem 1.5rem 1.5rem 0;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line);
}
.path + .path { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.path p { color: var(--ink-soft); font-size: var(--t-sm); }
.path .go { font-size: var(--t-sm); font-weight: 600; color: var(--primary); margin-top: 0.5rem; }
.path:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hero-foot { margin-top: 1.5rem; color: var(--ink-soft); font-size: var(--t-sm); }

/* Estimator */
.estimator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 3rem; align-items: start; }
.est-choices { display: grid; gap: 2.5rem; min-width: 0; }
.step-title { font-family: var(--font-body); font-size: var(--t-sm); font-weight: 600; letter-spacing: 0; margin-bottom: 0.875rem; color: var(--ink); }

.segmented { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 3px; gap: 3px; }
.segmented label { cursor: pointer; }
.segmented span { display: block; padding: 0.6rem 1.75rem; border-radius: 4px; font-weight: 600; font-size: var(--t-sm); text-align: center; color: var(--ink-soft); }
.segmented input:checked + span { background: var(--primary); color: var(--on-primary); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 3px; }

.pkg-list { display: grid; gap: 0.75rem; }
.pkg { display: block; cursor: pointer; border: 1px solid var(--line); border-radius: var(--r-md); background: transparent; }
.pkg:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--surface); }
.pkg:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 3px; }
.pkg-body { display: grid; gap: 0.5rem; padding: 1.125rem 1.25rem 1.25rem; }
.pkg-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1.5rem; }
.pkg-price { font-family: var(--font-display); font-size: var(--t-lg); }
.pkg-desc { color: var(--ink-soft); font-size: var(--t-sm); max-width: 58ch; }
.pkg-incl { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 1.5rem; font-size: var(--t-sm); margin-top: 0.375rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.pkg:has(input:checked) .pkg-incl { display: grid; }
.pkg-incl li { padding-left: 1.125rem; position: relative; }
.pkg-incl li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; height: 1px; background: var(--heather); }

.addon-list { display: grid; border-top: 1px solid var(--line); }
.addon { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.25rem 0.875rem; align-items: baseline; padding: 0.75rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.addon input { width: 1.125rem; height: 1.125rem; accent-color: var(--primary); translate: 0 0.15rem; }
.addon small { display: block; color: var(--ink-soft); font-size: var(--t-xs); }
.addon .num { font-size: var(--t-sm); color: var(--ink-soft); }

.summary {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1.25rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.5rem; display: grid; gap: 1rem;
}
.sum-total { font-family: var(--font-display); font-size: var(--t-xl); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sum-lines { display: grid; gap: 0.5rem; font-size: var(--t-sm); padding-block: 1rem; border-block: 1px solid var(--line); }
.sum-lines li { display: flex; justify-content: space-between; gap: 1rem; }
.sum-lines li span:first-child { min-width: 0; }
.fine { font-size: var(--t-xs); color: var(--ink-soft); line-height: 1.5; }
.no-contact { display: flex; gap: 0.5rem; align-items: baseline; font-size: var(--t-sm); color: var(--ink-soft); margin-top: 0.75rem; }

/* Planning */
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 3.5rem; }
.timeline li { border-top: 1px solid var(--ink); padding: 1rem 1.5rem 0 0; position: relative; display: grid; gap: 0.375rem; align-content: start; }
.timeline li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--heather); }
.timeline .when { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--heather); }
.timeline p { font-size: var(--t-sm); color: var(--ink-soft); }

.planning-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; align-items: start; }
.decisions { display: grid; gap: 1.5rem; }
.decisions > h3 { margin-bottom: 0.25rem; }
.decisions dt { font-weight: 600; }
.decisions dd { color: var(--ink-soft); font-size: var(--t-sm); }
.reassure { font-family: var(--font-display); font-style: italic; font-size: var(--t-lg); line-height: 1.4; color: var(--ink); padding-top: 1.25rem; border-top: 1px solid var(--line); }

.guides { border-top: 1px solid var(--ink); }
.guides details { border-bottom: 1px solid var(--line); }
.guides summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-family: var(--font-display); font-size: var(--t-lg); list-style: none; position: relative; }
.guides summary::-webkit-details-marker { display: none; }
.guides summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.9rem; font-family: var(--font-body); color: var(--ink-soft); }
.guides details[open] summary::after { content: "\2212"; }
.guide-body { padding: 0 0 1.5rem; display: grid; gap: 0.75rem; font-size: var(--t-sm); max-width: 62ch; }
.guide-body ul { display: grid; gap: 0.5rem; }
.guide-body li { padding-left: 1.125rem; position: relative; }
.guide-body li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; height: 1px; background: var(--heather); }
.guide-body p { color: var(--ink-soft); }

/* Talk */
.talk { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; align-items: start; }
.talk-copy { display: grid; gap: 1.25rem; }
.next-list { display: grid; gap: 1rem; margin-top: 0.75rem; }
.next-list li { display: grid; gap: 0.125rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.next-list strong { font-weight: 600; }
.next-list span { color: var(--ink-soft); font-size: var(--t-sm); }
.call-now { display: grid; gap: 0.125rem; }
.call-now .phone { font-family: var(--font-display); font-weight: 400; font-size: var(--t-xl); }
.call-now small { color: var(--ink-soft); font-size: var(--t-sm); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); }
.form { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.375rem; }
.field label, .group-label { font-size: var(--t-sm); font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg); width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.75rem 0.875rem;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-soft); opacity: 0.7; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.err { color: var(--error); font-size: var(--t-xs); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.chip { cursor: pointer; }
.chip span { display: block; padding: 0.5rem 0.875rem; border: 1px solid var(--line); border-radius: 99px; font-size: var(--t-sm); background: var(--bg); }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 3px; }
.attach { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 0.75rem; align-items: baseline; padding: 0.875rem 1rem; background: var(--heather-wash); border-radius: var(--r-sm); font-size: var(--t-sm); cursor: pointer; }
.attach input { width: 1.125rem; height: 1.125rem; accent-color: var(--primary); translate: 0 0.15rem; }
.attach small { display: block; color: var(--ink-soft); font-size: var(--t-xs); }

.confirm { display: grid; gap: 1.25rem; }
.confirm:focus { outline: none; }
.confirm > p { color: var(--ink-soft); }
.demo-note { font-size: var(--t-sm); padding: 0.75rem 1rem; background: var(--heather-wash); border-radius: var(--r-sm); color: var(--ink); }
.lead { border: 1px dashed var(--heather); border-radius: var(--r-sm); padding: 1.125rem 1.25rem; display: grid; gap: 0.875rem; }
.lead dl { display: grid; grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr); gap: 0.5rem 1.25rem; font-size: var(--t-sm); }
.lead dt { color: var(--ink-soft); }
.lead dd { overflow-wrap: anywhere; }
.lead dd.urgent { font-weight: 600; color: var(--heather); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: var(--t-sm); color: var(--ink-soft); }
.site-footer .wrap { display: grid; gap: 1.5rem; }
.owner { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); }
.owner summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 600; }
.owner ol { display: grid; gap: 0.875rem; padding: 0 1.25rem 1.25rem; counter-reset: stage; max-width: 70ch; }
.owner li { counter-increment: stage; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); }
.owner li::before { content: counter(stage); font-family: var(--font-display); font-size: var(--t-lg); line-height: 1.2; color: var(--heather); }
.owner li span { color: var(--ink-soft); }
.owner li strong { color: var(--ink); font-weight: 600; }

@media (max-width: 60rem) {
  .site-nav, .header-phone { display: none; }
  .estimator, .planning-grid, .talk { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .summary { position: static; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
}
@media (max-width: 40rem) {
  .brand-sub { display: none; }
  .paths { grid-template-columns: minmax(0, 1fr); }
  .path, .path + .path { padding: 1.125rem 0 1.25rem; border-left: 0; }
  .timeline { grid-template-columns: minmax(0, 1fr); row-gap: 0; border-left: 1px solid var(--ink); margin-left: 4px; }
  .timeline li { border-top: 0; padding: 0 0 1.75rem 1.25rem; }
  .timeline li::before { top: 0.4rem; left: -5px; }
  .pkg-incl { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .segmented { display: grid; }
}

/* Standalone-site additions */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn[disabled] { opacity: 0.65; cursor: progress; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; color: var(--ink); }
.form-card { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1rem); }
