/* Birchwood Home Cleaning — concept demo, redesign v2
   Fictional business. No external requests: fonts and images are bundled. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --birch: #f3f2ec;      /* page background: birch-bark white, cooler than cream */
  --paper: #ffffff;
  --mist: #e7eae3;       /* pale sage tint for quiet bands */
  --forest: #1e3a2f;     /* brand base */
  --forest-deep: #142a21;
  --moss: #5f8468;       /* secondary green: rules, numerals, small marks */
  --ink: #1b1f1c;
  --soft: #5a615c;
  --line: #d6d8cf;
  --gold: #d9a94c;       /* focus ring only */
  --error: #a93f33;
  --ok: #2f6b45;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --maxw: 1180px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  color: var(--ink); background: var(--birch); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--forest-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--forest); color: #fff; padding: .6rem 1rem; z-index: 200; text-decoration: none; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* ---------- Type scale (Elements-style, 1.25 ratio with display jumps) ---------- */
h1, h2, h3, .display { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; margin: 0 0 .5em; color: var(--forest-deep); }
h1 { font-size: clamp(2.6rem, 6.2vw, 5.2rem); line-height: .98; font-variation-settings: "opsz" 144; max-width: 14ch; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.08; font-variation-settings: "opsz" 96; max-width: 22ch; }
h3 { font-size: 1.35rem; line-height: 1.25; font-variation-settings: "opsz" 48; }
p { margin: 0 0 1em; max-width: 62ch; }
.lede { font-size: 1.2rem; line-height: 1.5; color: var(--soft); max-width: 50ch; }
.muted { color: var(--soft); } .small { font-size: .9rem; }
em { font-style: italic; }

/* ---------- Concept label (discreet) ---------- */
.concept-line { font-size: .8rem; color: var(--soft); background: var(--mist); }
.concept-line .wrap { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.concept-line a { color: inherit; }
@media (max-width: 600px) { .concept-line .wrap span:last-child { display: none; } }

/* ---------- Header and navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--birch) 92%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; }
.brand { font-family: var(--serif); font-size: 1.45rem; font-variation-settings: "opsz" 48; color: var(--forest-deep); text-decoration: none; display: inline-flex; align-items: baseline; gap: .55rem; letter-spacing: -.01em; }
.brand .leaf { width: 14px; height: 22px; align-self: center; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; align-items: center; }
.site-nav a { display: inline-block; padding: .5rem .75rem; text-decoration: none; color: var(--ink); border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--forest); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--moss); color: var(--forest-deep); }
.site-nav .nav-cta a { background: var(--forest); color: #fff; border-radius: 999px; padding: .6rem 1.1rem; margin-left: .6rem; border-bottom: 0; }
.site-nav .nav-cta a:hover { background: var(--forest-deep); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .9rem; font: inherit; color: var(--ink); cursor: pointer; align-items: center; gap: .5rem; }
.nav-toggle .bars { width: 16px; height: 2px; background: currentColor; position: relative; display: block; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; }
.nav-toggle .bars::before { top: -5px; } .nav-toggle .bars::after { top: 5px; }

/* Mobile: full-height panel with large serif links. Only when JS is present;
   without JS the list simply wraps under the brand. */
@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .js .site-nav { display: none; position: fixed; inset: 76px 0 0 0; background: var(--forest); color: #fff; padding: 1.5rem var(--gutter) 2rem; overflow: auto; }
  .js .site-nav.is-open { display: block; animation: panel .28s var(--ease); }
  @keyframes panel { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav a { font-family: var(--serif); font-size: 2rem; line-height: 1.15; color: #fff; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.14); border-radius: 0; }
  .js .site-nav a[aria-current="page"] { color: #d7e3d8; border-bottom-color: rgba(255,255,255,.14); }
  .js .site-nav a[aria-current="page"]::after { content: " \2014 you are here"; font-family: var(--sans); font-size: .85rem; color: #b9c9bc; }
  .js .site-nav .nav-cta a { background: #fff; color: var(--forest-deep); margin: 1.25rem 0 0; text-align: center; padding: .9rem 1rem; font-family: var(--sans); font-size: 1.05rem; font-weight: 600; border-radius: 999px; }
  .js .site-nav .panel-note { color: #b9c9bc; font-size: .9rem; margin-top: 1.5rem; }
  body.nav-open { overflow: hidden; }
}
.panel-note { display: none; }
@media (max-width: 860px) { .js .panel-note { display: block; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.4rem; border-radius: 999px; border: 1px solid var(--forest); background: var(--forest); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; transition: background .18s var(--ease), color .18s var(--ease); }
.btn:hover { background: var(--forest-deep); color: #fff; }
.btn.quiet { background: transparent; color: var(--forest-deep); }
.btn.quiet:hover { background: var(--forest); color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- Sections ---------- */
section { padding: clamp(3rem, 7vw, 6rem) 0; }
section + section { padding-top: 0; }
.band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: clamp(3rem, 7vw, 6rem) !important; }
.band-forest { background: var(--forest); color: #e9efe9; padding-top: clamp(3rem, 7vw, 6rem) !important; }
.band-forest h2, .band-forest h3 { color: #fff; }
.band-forest .muted { color: #b9c9bc; }
.band-forest a { color: #fff; }
.section-head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); max-width: 60ch; }

/* ---------- Hero: headline overlaps a photo that bleeds to the right edge ---------- */
.hero { padding: clamp(2rem, 5vw, 4rem) 0 0; overflow: clip; }
.hero .wrap { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; }
.hero-copy { grid-column: 1 / 8; grid-row: 1; z-index: 2; padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero-photo { grid-column: 6 / 13; grid-row: 1; margin-right: calc(-1 * var(--gutter)); position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px 0 0 4px; }
.hero-photo figcaption { position: absolute; left: 1rem; bottom: 1rem; background: rgba(20,42,33,.78); color: #e9efe9; font-size: .78rem; padding: .3rem .6rem; border-radius: 3px; }
.hero h1 { background: linear-gradient(90deg, var(--birch) 0 70%, transparent); padding-right: 1.5rem; display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-copy .lede { margin-top: 1.25rem; }
@media (max-width: 860px) {
  .hero .wrap { display: block; }
  .hero-photo { margin: 1.5rem calc(-1 * var(--gutter)) 0; }
  .hero-photo img { border-radius: 0; aspect-ratio: 5 / 4; }
  .hero h1 { background: none; padding: 0; display: block; }
}

/* ---------- The checklist as a ruled menu with leaders ---------- */
.menu { list-style: none; margin: 0; padding: 0; max-width: 560px; }
.menu li { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: baseline; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.menu li:first-child { border-top: 1px solid var(--line); }
.menu .n { font-family: var(--serif); font-variation-settings: "opsz" 48; color: var(--moss); font-size: 1.2rem; }
.menu .what { position: relative; }
.menu .where { color: var(--soft); font-size: .9rem; white-space: nowrap; }
.menu li.optional .what, .menu li.optional .where { color: var(--soft); }
.menu li.optional .n { color: var(--line); }
.menu-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .75rem; }
.menu-title h3 { margin: 0; }
.menu-title span { color: var(--soft); font-size: .9rem; }

/* ---------- Editorial splits (5/7, 7/5) ---------- */
.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.split > .text { grid-column: 1 / 6; }
.split > .media { grid-column: 6 / 13; }
.split.flip > .text { grid-column: 8 / 13; grid-row: 1; }
.split.flip > .media { grid-column: 1 / 8; grid-row: 1; }
.split .media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.split .media figcaption { font-size: .78rem; color: var(--soft); margin-top: .5rem; }
.split + .split { margin-top: clamp(3rem, 7vw, 6rem); }
@media (max-width: 860px) {
  .split, .split.flip { display: block; }
  .split + .split { margin-top: 3rem; }
  .split > .media { margin-bottom: 1.25rem; }
}

/* ---------- Three services as a single ruled table, not cards ---------- */
.services-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.services-row > div { padding: 1.75rem 1.5rem 1.75rem 0; border-bottom: 1px solid var(--line); }
.services-row > div + div { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.services-row h3 { margin-top: 0; }
.services-row p { margin-bottom: .75rem; }
.services-row a { font-weight: 600; }
@media (max-width: 860px) {
  .services-row { grid-template-columns: 1fr; }
  .services-row > div + div { border-left: 0; padding-left: 0; }
}

/* ---------- Process (a real sequence, so numerals are earned) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.steps li { counter-increment: s; border-top: 2px solid var(--forest); padding-top: 1rem; }
.steps li::before { content: counter(s); font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--moss); display: block; margin-bottom: .5rem; font-variation-settings: "opsz" 96; }
.steps h3 { margin: 0 0 .35rem; }
.steps p { margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- Definition pairs (about page) ---------- */
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 4rem; }
.pairs h3 { margin-bottom: .35rem; }
@media (max-width: 760px) { .pairs { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- FAQ ---------- */
.faq { max-width: 740px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 0; font-family: var(--serif); font-size: 1.25rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; color: var(--forest-deep); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--moss); font-size: 1.4rem; line-height: 1; font-family: var(--sans); }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 0 1.1rem; color: var(--soft); max-width: 62ch; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Service area ---------- */
.zones { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.zone-map svg { width: 100%; height: auto; }
.zone-list { list-style: none; margin: 0; padding: 0; }
.zone-list li { padding: 1rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.4rem 1fr; gap: .9rem; }
.zone-list li:last-child { border-bottom: 1px solid var(--line); }
.zone-dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; margin-top: .3rem; }
.zone-list h3 { margin: 0 0 .2rem; }
.zone-list p { margin: 0; }
.towns { columns: 2; column-gap: 2.5rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.towns li { break-inside: avoid; padding: .2rem 0; }
@media (max-width: 860px) { .zones { grid-template-columns: 1fr; } }

/* ---------- Quote flow ---------- */
.quote-layout { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 900px) { .quote-layout { grid-template-columns: 1fr; } }
.quote-form { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2rem); }
.quote-step { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.quote-step:first-of-type { border-top: 0; padding-top: 0; }
.quote-step > legend, .quote-step > h2 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 .25rem; padding: 0; color: var(--forest-deep); }
.quote-step .help { color: var(--soft); margin-bottom: .9rem; font-size: .95rem; }
.js .quote-step[hidden] { display: none; }
.step-indicator { font-size: .9rem; color: var(--soft); margin-bottom: 1rem; }
.step-indicator ol { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; gap: .35rem; }
.step-indicator li { flex: 1; height: 4px; background: var(--line); border-radius: 2px; }
.step-indicator li.done { background: var(--moss); }
.step-indicator li[aria-current="step"] { background: var(--forest); }

.choices { display: grid; gap: .6rem; }
.choices.cols-2 { grid-template-columns: 1fr 1fr; }
.choices.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choices.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) { .choices.cols-3, .choices.cols-4 { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: block; border: 1px solid var(--line); border-radius: 6px; padding: .85rem 1rem; cursor: pointer; background: var(--birch); transition: border-color .15s var(--ease), background .15s var(--ease); }
.choice:hover { border-color: var(--moss); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .t { display: block; font-weight: 600; }
.choice .d { display: block; font-size: .9rem; color: var(--soft); }
.choice:has(input:checked) { border-color: var(--forest); background: var(--paper); box-shadow: inset 0 0 0 1px var(--forest); }
.choice:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
/* Fallback for browsers without :has — show the native control */
@supports not selector(:has(input)) { .choice input { position: static; opacity: 1; width: auto; height: auto; margin-right: .5rem; } }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea { width: 100%; font: inherit; padding: .75rem .85rem; border: 1px solid #b9beb3; border-radius: 6px; background: #fff; color: var(--ink); }
.field textarea { min-height: 100px; resize: vertical; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.error-msg { display: none; color: var(--error); font-size: .9rem; margin-top: .4rem; }
.has-error .error-msg, .error-msg.is-visible { display: block; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }
.step-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; align-items: center; }
.form-summary { display: none; border: 1px solid var(--error); background: #fbf1ef; color: var(--error); padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 6px; }
.form-summary.is-visible { display: block; }
.form-summary ul { margin: .4rem 0 0; padding-left: 1.2rem; } .form-summary a { color: inherit; }

.quote-summary { position: sticky; top: 92px; background: var(--forest); color: #e9efe9; border-radius: 6px; padding: 1.5rem 1.6rem; }
.quote-summary h2 { color: #fff; font-size: 1.5rem; margin-bottom: .25rem; }
.quote-summary .demo-tag { color: #b9c9bc; font-size: .85rem; margin-bottom: 1rem; }
.quote-summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .95rem; }
.quote-summary dt { color: #b9c9bc; } .quote-summary dd { margin: 0; }
.quote-summary .estimate { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.18); }
.quote-summary .estimate strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; display: block; color: #fff; }
.quote-summary .estimate span { font-size: .85rem; color: #b9c9bc; }
@media (max-width: 900px) { .quote-summary { position: static; } }
.quote-result { display: none; margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--mist); padding: 1.25rem 1.5rem; }
.quote-result.is-visible { display: block; }
.quote-result .ok { color: var(--ok); font-weight: 600; }
.notice { background: var(--mist); border-left: 3px solid var(--moss); padding: .75rem 1rem; font-size: .95rem; margin-bottom: 1.25rem; }
.notice p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: #c9d5cb; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h3 { color: #fff; font-size: 1.2rem; margin-bottom: .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer a { color: #e9efe9; }
.site-footer p { max-width: 44ch; }
.footer-legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.14); padding-top: 1rem; font-size: .85rem; color: #9fb1a3; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Image placeholders used only if a photo file is missing */
.ph { background: linear-gradient(135deg, var(--mist), #cfd8cf); aspect-ratio: 4 / 3; border-radius: 4px; display: grid; place-items: center; color: var(--soft); font-size: .9rem; }

/* Quote preview list */
.result-list { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 1rem 0 0; }
.result-list dt { font-weight: 600; }
.result-list dd { margin: 0; color: var(--soft); overflow-wrap: anywhere; }

/* Hero: keep the lede and buttons clear of the overlapping photo (only the headline overlaps). */
@media (min-width: 861px) { .hero-copy > :not(h1) { max-width: min(29rem, calc(71.4% - 1rem)); } }

/* Respect step visibility even when controls have explicit display styles. */
[hidden] { display: none !important; }
fieldset.quote-step { border: 0; padding: 0; margin-inline: 0; min-width: 0; }

@media (max-width: 860px) {
 .site-header { backdrop-filter: none; background: var(--birch); }
 .js .site-header .wrap { flex-wrap: nowrap; }
 .brand { font-size: 1.2rem; line-height: 1.15; max-width: 220px; }
 .nav-toggle { flex-shrink: 0; }
}

.band + section, .band-forest + section { padding-top: clamp(3rem, 7vw, 6rem); }

@media (max-width: 860px) { .hero + section { padding-top: 3rem; } }
