/* Self-hosted fonts (SIL Open Font License, see assets/fonts) */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* Big Guava Handyman. Layout: one left-aligned 72rem column; the work-order ticket is the one bold object. */
:root {
  --bg: #F6EFE6;
  --surface: #FFFDF9;
  --ink: #26221E;
  --muted: #645B52;
  --line: #E2D7C8;
  --palm: #1F4D3A;
  --palm-soft: #E3ECE5;
  --guava: #C23B52;
  --guava-ink: #FFFFFF;
  --guava-soft: #F7DFE2;
  --focus: #1F4D3A;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: clamp(1.9rem, 4vw, 2.4rem);
  --step-4: clamp(2.4rem, 6vw, 3.6rem);
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131D18; --surface: #1A2822; --ink: #EFE9E1; --muted: #A9B1AA; --line: #2E4037;
    --palm: #9CCBB1; --palm-soft: #22362C; --guava: #EE7D90; --guava-ink: #2A0E14; --guava-soft: #3A2026;
    --focus: #9CCBB1; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131D18; --surface: #1A2822; --ink: #EFE9E1; --muted: #A9B1AA; --line: #2E4037;
  --palm: #9CCBB1; --palm-soft: #22362C; --guava: #EE7D90; --guava-ink: #2A0E14; --guava-soft: #3A2026;
  --focus: #9CCBB1; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--palm); text-underline-offset: 3px; }
a:hover { color: var(--guava); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; max-width: 65ch; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: max(16px, 4vw); }
main { display: block; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.stack { display: grid; gap: 1rem; }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; line-height: 1; }
.brand svg { width: 2.5rem; height: 2.7rem; flex: none; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav a { text-decoration: none; color: var(--ink); padding: .5rem .7rem; border-radius: 6px; font-weight: 600; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--palm-soft); color: var(--palm); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.cart-link { display: inline-flex; align-items: center; gap: .4rem; }
.count { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding-inline: .3rem; border-radius: 999px; background: var(--guava); color: var(--guava-ink); font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.count[data-n="0"] { background: var(--line); color: var(--muted); }
@media (max-width: 52rem) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem max(16px, 4vw) 1rem; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .5rem; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 700; text-decoration: none; border-radius: 8px; padding: .8rem 1.25rem; border: 2px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--guava); color: var(--guava-ink); }
.btn-primary:hover { filter: brightness(1.08); color: var(--guava-ink); }
.btn-quiet { background: transparent; color: var(--palm); border-color: var(--palm); }
.btn-quiet:hover { background: var(--palm-soft); color: var(--palm); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero h1 { color: var(--palm); max-width: 13ch; }
.hero .stack { gap: 1.5rem; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--muted); font-size: .98rem; }
.facts li::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--guava); margin-right: .5rem; vertical-align: .1em; }
@media (max-width: 52rem) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Work-order ticket: the signature object */
.ticket { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; padding: 1.5rem 1.5rem 1.75rem; box-shadow: 0 18px 40px -24px rgba(31, 77, 58, .45); transform: rotate(-1.2deg); }
.ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: radial-gradient(circle at 10px 0, transparent 7px, var(--surface) 7.5px) 0 0 / 20px 10px repeat-x; }
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px dashed var(--line); padding-bottom: .75rem; margin-bottom: .75rem; }
.ticket-head strong { font-family: var(--font-display); font-size: 1.15rem; }
.ticket-head span { font-size: .85rem; color: var(--muted); }
.ticket ul { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .55rem; }
.ticket li { display: flex; justify-content: space-between; gap: 1rem; font-size: .98rem; }
.ticket li span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.ticket .total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--palm); font-variant-numeric: tabular-nums; }
.ticket .total small { font-family: var(--font-body); font-weight: 500; font-size: .85rem; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .hero .ticket { animation: settle .7s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes settle { from { transform: rotate(-4deg) translateY(12px); } to { transform: rotate(-1.2deg); } }
}

/* Range bar */
.range { display: grid; gap: .35rem; }
.range-track { position: relative; height: .7rem; border-radius: 999px; background: var(--palm-soft); overflow: hidden; }
.range-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--guava); transition: left .3s, width .3s; }
.range-scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .range-fill { transition: none; } }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; display: grid; gap: .5rem; align-content: start; }
.steps li::before { content: counter(step); font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; color: var(--guava); line-height: 1; }
@media (max-width: 46rem) { .steps { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

/* Service list */
.service-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
.service-list li { border-top: 1px solid var(--line); }
.service-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1rem; padding: 1.1rem 0; text-decoration: none; color: var(--ink); }
.service-list a:hover h3 { color: var(--guava); }
.service-list h3 { font-size: 1.2rem; }
.service-list p { grid-column: 1 / -1; color: var(--muted); font-size: .98rem; }
.service-list .from { font-variant-numeric: tabular-nums; color: var(--palm); font-weight: 700; white-space: nowrap; }
@media (max-width: 46rem) { .service-list { grid-template-columns: minmax(0, 1fr); } }

/* Split sections */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 52rem) { .split { grid-template-columns: minmax(0, 1fr); } }
.checklist, .nolist { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.checklist li, .nolist li { padding-left: 1.75rem; position: relative; }
.checklist li::before { content: ""; position: absolute; left: .2rem; top: .45em; width: .9rem; height: .5rem; border-left: 3px solid var(--palm); border-bottom: 3px solid var(--palm); transform: rotate(-45deg); }
.nolist li::before { content: ""; position: absolute; left: .25rem; top: .75em; width: .9rem; height: 3px; background: var(--guava); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }

/* Areas */
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem 2rem; margin-top: 2rem; }
.areas h3 { font-size: 1.05rem; color: var(--palm); margin-bottom: .4rem; }
.areas ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .2rem; }

/* Price table */
.table-wrap { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table caption { text-align: left; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; padding-bottom: .5rem; }
.price-table th, .price-table td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table td:last-child, .price-table th:last-child { text-align: right; white-space: nowrap; }
.price-table thead th { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Breadcrumb */
.crumbs { font-size: .9rem; color: var(--muted); padding-top: 1.5rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }

/* FAQ */
.faq { display: grid; gap: 0; margin-top: 1.5rem; max-width: 50rem; }
.faq details { border-top: 1px solid var(--line); padding-block: 1rem; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); color: var(--guava); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: .6rem; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--palm); color: var(--bg); }
.cta-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: clamp(2rem, 5vw, 3rem); }
.cta-band h2 { color: inherit; }
.cta-band p { color: inherit; opacity: .9; }
:root[data-theme="dark"] .cta-band, .cta-band { --band-ink: var(--bg); }

/* Footer */
.site-footer { padding-block: 2.5rem 3rem; font-size: .95rem; color: var(--muted); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; }
.site-footer h2 { font-size: 1rem; color: var(--ink); margin-bottom: .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.site-footer .fine { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .85rem; }

/* ===== Estimate builder ===== */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; padding-block: 1.5rem 4rem; }
@media (max-width: 60rem) { .builder { grid-template-columns: minmax(0, 1fr); } }
.menu { display: grid; gap: 0; border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc-head { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem; text-align: left; background: none; border: 0; padding: 1.1rem .25rem; font: inherit; color: var(--ink); cursor: pointer; }
.svc-head strong { font-family: var(--font-display); font-size: 1.2rem; }
.svc-head .from { color: var(--palm); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.svc-head .sub { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; }
.svc-head[aria-expanded="true"] strong { color: var(--guava); }
.svc-body { padding: 0 .25rem 1.5rem; display: grid; gap: 1.25rem; }
.svc-body fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; min-width: 0; }
.svc-body legend { font-weight: 700; margin-bottom: .4rem; font-size: .98rem; }
.opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.opt:has(input:checked) { border-color: var(--palm); box-shadow: inset 0 0 0 1px var(--palm); }
.opt input { width: 1.15rem; height: 1.15rem; accent-color: var(--palm); margin: 0; }
.opt .price { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.opt .each { font-size: .8rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.stepper button { width: 2.5rem; height: 2.5rem; border: 0; background: none; font: inherit; font-size: 1.2rem; color: var(--palm); cursor: pointer; }
.stepper output { min-width: 2rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.svc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .5rem; }
.svc-foot .line-range { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.cart { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 5.5rem); }
.cart h2 { font-size: 1.4rem; }
.cart-items { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .75rem; }
.cart-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .75rem; padding-bottom: .75rem; border-bottom: 1px dashed var(--line); }
.cart-items .name { font-weight: 700; }
.cart-items .detail { grid-column: 1 / 2; font-size: .88rem; color: var(--muted); }
.cart-items .amt { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.cart-items .row-actions { grid-column: 1 / -1; display: flex; gap: 1rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--palm); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--guava); }
.cart-total { display: grid; gap: .5rem; padding-top: .5rem; }
.cart-total .big { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--palm); font-variant-numeric: tabular-nums; line-height: 1.1; }
.empty { color: var(--muted); padding-block: 1rem; }
.note { font-size: .88rem; color: var(--muted); }
.warn { background: var(--guava-soft); border-radius: 8px; padding: .75rem 1rem; font-size: .92rem; }

.mobile-bar { display: none; }
@media (max-width: 60rem) {
  .cart { position: static; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem max(16px, 4vw) calc(.75rem + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(0,0,0,.4); }
  .mobile-bar .big { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--palm); font-variant-numeric: tabular-nums; }
  body.has-bar { padding-bottom: 5rem; }
}

/* Form */
.form { display: grid; gap: 1rem; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 36rem) { .form .row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: .3rem; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; }
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--palm); }
.field .hint { font-size: .85rem; color: var(--muted); }
.field [aria-invalid="true"] { border-color: var(--guava); }
.err { color: var(--guava); font-size: .88rem; font-weight: 600; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 1rem; border-radius: 8px; font-weight: 600; }
.status.ok { background: var(--palm-soft); color: var(--palm); }
.status.bad { background: var(--guava-soft); color: var(--ink); }
.sent { display: grid; gap: 1rem; padding: 2rem 0; }

/* Utilities (no inline styles: the Content Security Policy blocks them) */
.spaced { margin-top: 1rem; }
.spaced-lg { margin-top: 2.5rem; }
.small-h { font-size: var(--step-1); margin-top: .75rem; }
.intro-tight { padding-bottom: 0; }
.range-demo { left: 57.7%; width: 19%; }
h1 + .lede, h2 + .lede, h1 + p, h2 + p { margin-top: .75rem; }
/* Who-supplies sub-choice under an option */
.svc-body .supply { margin: -.1rem 0 .3rem 2.25rem; padding-left: .75rem; border-left: 2px solid var(--line); display: grid; gap: .35rem; }
.supply legend { font-weight: 600; color: var(--muted); margin-bottom: .2rem; }
.supply .opt { padding: .45rem .65rem; font-size: .95rem; }
.price-table tr.sub td:first-child { padding-left: 1.5rem; color: var(--muted); font-size: .92rem; }
.price-table tr.sub td:last-child { color: var(--muted); font-size: .92rem; }
[hidden] { display: none !important; }
