/* Kirby's Home Improvement
   Palette: the job site. Tape-measure yellow, carpenter's slate, chalk-line blue,
   on a cool primed-wall white.
   Type: Barlow Condensed (truck-door lettering) for display, Public Sans for reading.
   Layout idea: the estimate ticket. The quote form is a job ticket, and a tape
   measure runs under the hero as the one bold move. */

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --paper: #f5f7f6;
  --surface: #ffffff;
  --ink: #15202b;
  --muted: #4b5966;
  --line: #d5dcdc;
  --tape: #f4c20d;
  --tape-deep: #c99d00;
  --chalk: #1d5ea8;
  --slate: #1a2631;
  --slate-2: #223241;
  --slate-ink: #e8edf0;
  --slate-muted: #a6b4bf;
  --ok: #1f6b45;
  --bad: #b3261e;

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-lg: 1.1875rem;
  --t-xl: 1.625rem;
  --t-2xl: clamp(2rem, 4.5vw, 3rem);
  --t-hero: clamp(2.6rem, 7.2vw, 5rem);

  --s1: 0.5rem;
  --s2: 0.75rem;
  --s3: 1rem;
  --s4: 1.5rem;
  --s5: 2.5rem;
  --s6: 4rem;
  --s7: 6rem;

  --radius: 6px;
  --wrap: 1140px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--chalk); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.1; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.005em; }
h3 { font-size: var(--t-lg); font-weight: 700; }
p { max-width: 68ch; }
:focus-visible { outline: 3px solid var(--chalk); outline-offset: 3px; border-radius: 2px; }
section[id], [id="quote"] { scroll-margin-top: calc(var(--header-h) + 12px); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

.skip {
  position: absolute; left: var(--s3); top: -100px; z-index: 300;
  background: var(--ink); color: #fff; padding: var(--s2) var(--s3);
  font-weight: 700; border-radius: var(--radius);
}
.skip:focus { top: var(--s3); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--s2);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 0 var(--s4);
  font: 700 var(--t-base)/1 var(--font-body);
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; padding: 0 var(--s4); font-size: var(--t-lg); }
.btn-block { width: 100%; }
.btn-tape { background: var(--tape); color: var(--ink); border-color: var(--tape); }
.btn-tape:hover { background: #ffd43a; border-color: #ffd43a; }
.btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ink:hover { background: var(--slate-2); border-color: var(--slate-2); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-line-ink { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line-ink:hover { background: var(--ink); color: var(--tape); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 200;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: var(--s3); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; min-width: 0; color: var(--ink); text-decoration: none; margin-right: auto; }
.mark {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  background: var(--tape); color: var(--ink); border-radius: 4px;
  font: 700 1.6rem/1 var(--font-display);
  box-shadow: inset 0 -5px 0 rgba(21, 32, 43, .14);
}
.word { display: flex; flex-direction: column; font: 700 1.5rem/0.95 var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; }
.word small { font: 600 0.75rem/1.3 var(--font-body); letter-spacing: 0.08em; color: var(--muted); white-space: nowrap; }
.nav { display: none; }
.nav ul { display: flex; gap: var(--s4); list-style: none; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: var(--s1) 0; }
.nav a:hover { box-shadow: inset 0 -3px 0 var(--tape); }
.call { min-height: 44px; padding: 0 var(--s3); font-size: 0.95rem; }
.call-num { display: none; }
.menu-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: transparent; border: 2px solid var(--line); border-radius: var(--radius); color: var(--ink); cursor: pointer;
}
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu { border-top: 1px solid var(--line); background: var(--paper); }
.menu nav { display: flex; flex-direction: column; padding: var(--s2) 20px var(--s4); }
.menu nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; padding: var(--s2) 0; border-bottom: 1px solid var(--line); min-height: 44px; display: flex; align-items: center; }
.menu .btn { margin-top: var(--s3); }
@media (min-width: 560px) { .call-num { display: inline; } .call-short { display: none; } }
@media (min-width: 980px) {
  .nav { display: block; }
  .menu-btn, .menu { display: none !important; }
}

/* Hero */
.hero { padding: var(--s5) 0 var(--s6); }
.hero-grid { display: grid; gap: var(--s5); align-items: start; }
.hero h1 { font-size: var(--t-hero); text-transform: uppercase; line-height: 0.98; margin-bottom: var(--s4); }
.lead { font-size: var(--t-lg); color: var(--muted); margin-bottom: var(--s4); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.facts { list-style: none; padding: 0; margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); color: var(--muted); font-size: var(--t-sm); }
.facts li { display: flex; align-items: center; gap: var(--s1); }
.facts li::before { content: ""; width: 10px; height: 10px; background: var(--tape); border: 2px solid var(--ink); border-radius: 2px; flex: none; }
.facts strong { color: var(--ink); }
@media (min-width: 960px) {
  .hero { padding: var(--s6) 0 var(--s7); }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--s6); }
}

/* Estimate ticket (form card) */
.ticket {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  margin-right: 5px;
}
@media (min-width: 720px) { .ticket { box-shadow: 8px 8px 0 var(--ink); margin-right: 8px; } }
.ticket-head { background: var(--tape); border-bottom: 2px dashed var(--ink); padding: var(--s4) var(--s4) var(--s3); }
.ticket-head h2 { font-size: var(--t-xl); text-transform: uppercase; }
.ticket-head p { font-size: var(--t-sm); margin-top: 4px; }
.qform { padding: var(--s4); display: grid; gap: var(--s3); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--ink);
  background: var(--paper); border: 1.5px solid #9aa6ae; border-radius: 4px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--chalk); outline-offset: 1px; border-color: var(--chalk); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.err { color: var(--bad); font-size: var(--t-sm); font-weight: 600; }
.status { font-weight: 700; font-size: 0.95rem; }
.status:empty { display: none; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.fine { font-size: 0.8125rem; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.row2 { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }

/* Tape measure band (the bold move) */
.tape {
  --tick: var(--ink);
  background-color: var(--tape);
  background-image:
    repeating-linear-gradient(90deg, var(--tick) 0 2px, transparent 2px 96px),
    repeating-linear-gradient(90deg, var(--tick) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(90deg, var(--tick) 0 1.5px, transparent 1.5px 12px);
  background-size: 100% 26px, 100% 16px, 100% 9px;
  background-repeat: no-repeat;
  background-position: 0 0;
  border-block: 2px solid var(--ink);
  overflow: hidden;
}
.tape-inner {
  padding: 30px 20px 10px;
  font: 700 clamp(1.05rem, 2.4vw, 1.4rem)/1.2 var(--font-display);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink);
  text-align: center;
}

/* Sections */
.section { padding: var(--s6) 0; }
@media (min-width: 960px) { .section { padding: var(--s7) 0; } }
.head { margin-bottom: var(--s5); max-width: 720px; }
.head h2, .about h2, .area h2, .contact-info h2 { font-size: var(--t-2xl); text-transform: uppercase; margin-bottom: var(--s3); }
.head p { color: var(--muted); font-size: var(--t-lg); }

/* Services ledger */
.ledger { list-style: none; padding: 0; display: grid; border-top: 2px solid var(--ink); }
.ledger li { display: grid; grid-template-columns: 48px 1fr; gap: var(--s3); padding: var(--s4) 0; border-bottom: 1px solid var(--line); align-items: start; }
.ledger h3 { margin-bottom: 4px; }
.ledger p { color: var(--muted); }
.ico { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--ink); border-radius: 4px; background: var(--surface); }
.ico svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ledger-ask .ico { background: var(--tape); }
@media (min-width: 760px) {
  .ledger { grid-template-columns: 1fr 1fr; column-gap: var(--s6); }
}

/* About */
.about { background: var(--slate); color: var(--slate-ink); }
.about .eyebrow { color: var(--tape); }
.about p { color: var(--slate-muted); margin-bottom: var(--s3); }
.about-grid { display: grid; gap: var(--s5); align-items: center; }
.about-art { background: var(--slate-2); border-radius: var(--radius); padding: var(--s4); max-width: 460px; }
.about-art svg { width: 100%; height: auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.a-ground { stroke: var(--slate-muted); stroke-width: 3; }
.a-house, .a-roof { stroke: var(--slate-ink); stroke-width: 4; }
.a-door, .a-win { stroke: var(--slate-ink); stroke-width: 3; }
.a-wet { fill: var(--tape); stroke: none; opacity: .9; }
.a-ladder { stroke: var(--tape); stroke-width: 4; }
.a-roller { stroke: var(--tape); stroke-width: 4; }
.a-handle { fill: var(--tape); stroke: none; }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s4); }
.chips div { border: 1px solid #3a4c5c; border-radius: var(--radius); padding: var(--s3); }
.chips dt { font: 700 1.9rem/1 var(--font-display); color: var(--tape); }
.chips dd { font-size: var(--t-sm); color: var(--slate-muted); margin-top: 4px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 0.85fr 1.15fr; gap: var(--s6); } }

/* Steps (a real sequence, so they're numbered) */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: var(--s4); }
.steps li { counter-increment: step; position: relative; padding-top: var(--s5); border-top: 2px solid var(--ink); }
.steps li::before {
  content: counter(step);
  position: absolute; top: -20px; left: 0;
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--tape); border: 2px solid var(--ink); border-radius: 50%;
  font: 700 1.3rem/1 var(--font-display);
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; column-gap: var(--s5); row-gap: var(--s6); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); column-gap: var(--s4); } }

/* Area */
.area { background: var(--surface); border-block: 1px solid var(--line); }
.area-grid { display: grid; gap: var(--s4); align-items: center; }
.area p { color: var(--muted); }
.towns { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.towns li { border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 0.95rem; background: var(--paper); }
.towns li:last-child { border-style: dashed; font-weight: 600; }
@media (min-width: 900px) { .area-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); } }

/* Call band */
.band { background: var(--tape); border-block: 2px solid var(--ink); padding: var(--s5) 0; }
.band-row { display: grid; gap: var(--s4); align-items: center; }
.band h2 { font-size: var(--t-2xl); text-transform: uppercase; }
.band p { font-size: var(--t-lg); }
@media (min-width: 900px) { .band-row { grid-template-columns: 1fr auto; } }

/* Contact */
.contact-grid { display: grid; gap: var(--s5); align-items: start; }
.contact-info > p { color: var(--muted); font-size: var(--t-lg); }
.info { display: grid; gap: var(--s3); margin-top: var(--s4); }
.info div { border-left: 4px solid var(--tape); padding-left: var(--s3); }
.info dt { font-size: var(--t-sm); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.info dd { font-weight: 700; font-size: var(--t-lg); overflow-wrap: anywhere; }
.info a { color: var(--ink); display: inline-flex; align-items: center; min-height: 44px; }
.info dd { line-height: 1.3; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: var(--s6); } }

/* Footer */
.foot { background: var(--slate); color: var(--slate-muted); padding: var(--s6) 0 var(--s4); font-size: 0.95rem; }
.foot a { color: var(--slate-ink); }
.brand-light { color: var(--slate-ink); margin-bottom: var(--s3); }
.brand-light .word small { color: var(--slate-muted); }
.foot-grid { display: grid; gap: var(--s5); padding-bottom: var(--s5); border-bottom: 1px solid #34465a; }
.foot h2 { font: 700 1.15rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-ink); margin-bottom: var(--s2); }
.foot ul { list-style: none; padding: 0; display: grid; gap: 0; }
.foot li { min-height: 44px; display: flex; align-items: center; }
.foot li a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.foot-base { padding-top: var(--s4); font-size: var(--t-sm); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s4); }
.credit a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--slate-muted); text-decoration: none; }
.credit a::before { content: ""; width: 8px; height: 8px; background: var(--tape); border-radius: 2px; }
.credit strong { color: var(--slate-ink); font-weight: 700; }
.credit a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 600px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } .foot-grid > :first-child { grid-column: auto; } }

/* Simple pages (legal, thank-you, 404) */
.doc { padding: var(--s6) 0 var(--s7); }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: var(--t-2xl); text-transform: uppercase; margin-bottom: var(--s2); }
.doc h2 { font-size: var(--t-xl); text-transform: uppercase; margin: var(--s5) 0 var(--s2); }
.doc p, .doc li { margin-bottom: var(--s3); }
.doc ul { padding-left: 1.25rem; }
.doc .updated { color: var(--muted); font-size: var(--t-sm); margin-bottom: var(--s5); }
.doc .actions { margin-top: var(--s4); }

a[href^="tel:"] { white-space: nowrap; }

/* Small phones (iPhone SE, older Androids) */
@media (max-width: 379px) {
  .top-row { gap: var(--s1); }
  .mark { width: 36px; height: 36px; font-size: 1.45rem; }
  .word { font-size: 1.35rem; }
  .word small { font-size: 0.7rem; letter-spacing: 0.06em; }
  .call { padding: 0 12px; }
  .call-short { display: none; }
  .ticket-head, .qform { padding-inline: var(--s3); }
  .hero h1 { font-size: 2.35rem; }
}
