:root {
  color-scheme: light;
  --plaster: #f5f6f2;
  --paper: #ffffff;
  --ink: #1a1e1c;
  --pencil: #555d59;
  --green: #234338;
  --green-deep: #183028;
  --on-green: #f5f6f2;
  --on-green-muted: #c9d3ce;
  --tape: #f0b323;
  --line: rgba(26, 30, 28, 0.16);
  --field-border: #7e8782;
  --error: #b3261e;
  --radius: 4px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }

.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--green); color: var(--on-green); padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px;
  background: var(--green); color: var(--on-green);
  border: 0; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-stretch: 88%; font-size: 1.05rem; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--green-deep); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; white-space: nowrap; }
.btn-quiet { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn-quiet:hover { background: rgba(35, 67, 56, 0.08); }

.text-link {
  font-weight: 600; color: var(--green);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.text-link:hover { text-decoration-color: var(--tape); text-decoration-thickness: 3px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--plaster); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }

.wordmark { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; margin-right: auto; }
.wordmark-name { font-weight: 850; font-stretch: 70%; font-size: 1.6rem; letter-spacing: -0.005em; line-height: 1; color: var(--green); }
.wordmark-llc { font-weight: 600; font-stretch: 90%; font-size: 0.85rem; color: var(--pencil); }

.site-nav { display: flex; gap: 28px; }
.site-nav a { text-decoration: none; font-weight: 550; font-size: 1rem; padding: 6px 0; }
.site-nav a:hover { text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 3px; text-underline-offset: 6px; }

.header-phone {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; color: var(--green); text-decoration: none; white-space: nowrap;
  font-weight: 650; font-stretch: 90%; font-size: 1rem;
}
.header-phone:hover .header-phone-number { text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.phone-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

/* The tape measure: inch, half, quarter and eighth marks */
.tape {
  height: 14px;
  background:
    linear-gradient(90deg, var(--ink) 1.5px, transparent 1.5px) 0 0 / 64px 100% repeat-x,
    linear-gradient(90deg, var(--ink) 1px, transparent 1px) 32px 0 / 64px 62% repeat-x,
    linear-gradient(90deg, var(--ink) 1px, transparent 1px) 16px 0 / 32px 42% repeat-x,
    linear-gradient(90deg, var(--ink) 1px, transparent 1px) 8px 0 / 16px 26% repeat-x,
    var(--tape);
  border-bottom: 1px solid rgba(26, 30, 28, 0.35);
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 104px) clamp(48px, 7vw, 96px); }
.hero-grid {
  display: grid; align-items: center; gap: clamp(32px, 5vw, 72px);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}
.hero h1 {
  font-size: clamp(3rem, 5.6vw + 1rem, 6rem);
  font-weight: 850; font-stretch: 64%;
  line-height: 0.92; letter-spacing: -0.012em;
  color: var(--green);
  max-width: 9ch;
}
.lede { margin-top: 24px; font-size: clamp(1.15rem, 0.6vw + 1rem, 1.3rem); max-width: 34ch; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }

.hero-drawing { margin: 0; }
.hero-drawing svg { width: 100%; height: auto; overflow: visible; }
.hero-drawing .draw { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hero-drawing .lines { stroke: var(--green); stroke-width: 1.8; }
.hero-drawing .backsplash { stroke: var(--green); stroke-width: 1; opacity: 0.45; }
.hero-drawing .dims { stroke: var(--pencil); stroke-width: 1.1; }
.hero-drawing .dim-labels { font-family: var(--font); font-size: 14px; font-weight: 600; font-stretch: 80%; fill: var(--pencil); }

@media (prefers-reduced-motion: no-preference) {
  .hero-drawing .draw > * { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.5s cubic-bezier(0.55, 0.1, 0.25, 1) forwards; }
  .hero-drawing .backsplash > * { animation-delay: 0.9s; }
  .hero-drawing .dims > * { animation-duration: 1.1s; animation-delay: 1.3s; }
  .hero-drawing .dim-labels { opacity: 0; animation: appear 0.5s ease 2.1s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- shared split layout ---------- */
section h2 {
  font-size: clamp(2.2rem, 2.6vw + 1.2rem, 3.4rem);
  font-weight: 800; font-stretch: 68%; letter-spacing: -0.008em; line-height: 0.98;
  color: var(--green);
}
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); }
.split-head p { margin-top: 16px; color: var(--pencil); max-width: 30ch; }

/* ---------- services ---------- */
.services { padding-block: clamp(56px, 7vw, 104px); border-top: 1px solid var(--line); }
.services .split-head { align-self: start; position: sticky; top: 112px; }
.service-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.service-list li { border-top: 1px solid var(--line); }
.service-list a {
  display: grid; grid-template-columns: 36px minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; gap: 8px 24px;
  padding: 22px 16px 22px 12px;
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.service-list a:hover { background: rgba(35, 67, 56, 0.06); box-shadow: inset 4px 0 0 var(--tape); }
.service-list a:hover .service-name { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.icon { width: 32px; height: 32px; fill: none; stroke: var(--green); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service-name { font-size: 1.3rem; font-weight: 750; font-stretch: 82%; line-height: 1.15; color: var(--ink); }
.service-desc { color: var(--pencil); font-size: 1.02rem; line-height: 1.45; }

/* ---------- process ---------- */
.process { padding-block: clamp(56px, 7vw, 104px); background: var(--paper); border-block: 1px solid var(--line); }
.steps {
  list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px);
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 20px; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 18px;
  font-size: 3.6rem; font-weight: 850; font-stretch: 62%; line-height: 0.9; color: var(--tape);
  -webkit-text-stroke: 1.5px var(--ink);
}
.steps h3 { font-size: 1.4rem; font-weight: 750; font-stretch: 82%; line-height: 1.15; }
.steps p { margin-top: 10px; color: var(--pencil); max-width: 36ch; }

/* ---------- about ---------- */
.about { padding-block: clamp(56px, 7vw, 104px); }
.about-body p { font-size: clamp(1.2rem, 0.8vw + 1rem, 1.45rem); line-height: 1.5; max-width: 40ch; }

/* ---------- estimate ---------- */
.estimate { background: var(--green); color: var(--on-green); padding-block: clamp(56px, 7vw, 112px); }
.estimate :focus-visible { outline-color: var(--tape); }
.estimate-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.estimate h2 { color: var(--on-green); }
.estimate-intro p { margin-top: 18px; color: var(--on-green-muted); max-width: 32ch; }
.call-line a { color: var(--on-green); font-weight: 700; text-decoration-color: var(--tape); text-decoration-thickness: 2px; text-underline-offset: 4px; white-space: nowrap; }

.form-panel {
  background: var(--plaster); color: var(--ink);
  border-radius: 6px; padding: clamp(20px, 4vw, 44px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 24px 48px -24px rgba(0, 0, 0, 0.45);
}
.form-panel :focus-visible { outline-color: var(--green); }

.skeleton { display: grid; gap: 18px; }
.skeleton span { display: block; height: 48px; border-radius: var(--radius); background: rgba(26, 30, 28, 0.08); }
.skeleton .tall { height: 120px; }
.skeleton .short { width: 50%; }

.form-note { color: var(--pencil); font-size: 0.95rem; margin-bottom: 20px; }
.step-head { margin-bottom: 20px; }
.step-count { color: var(--pencil); font-size: 0.95rem; }
.step-name { font-size: 1.4rem; font-weight: 750; font-stretch: 82%; margin-top: 2px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field { min-width: 0; grid-column: span 2; }
.field.half { grid-column: span 1; }
.field[hidden] { display: none; }

.field-label, .field legend {
  display: block; padding: 0; margin-bottom: 8px;
  font-weight: 650; font-stretch: 92%; font-size: 1rem; line-height: 1.3;
}
.req { color: var(--error); font-weight: 700; }
.field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.help { color: var(--pencil); font-size: 0.92rem; margin-top: 6px; }

.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%; min-height: 48px;
  padding: 11px 14px;
  font: inherit; font-size: 1rem; line-height: 1.4; color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--field-border); border-radius: var(--radius);
}
.field textarea { min-height: 132px; resize: vertical; }
.field select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23234338' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: 3px solid rgba(35, 67, 56, 0.35); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--error) !important; }
.field input[type="file"] { padding: 10px; }
.other-input { margin-top: 10px; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 14px;
  background: var(--paper); border: 1.5px solid var(--field-border); border-radius: var(--radius);
  font-size: 1rem; line-height: 1.3; cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--green); background: #e8efe9; }
.choice:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 2px; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); }

.field-error { color: var(--error); font-size: 0.92rem; font-weight: 600; margin-top: 6px; }
.field-error:empty { display: none; }
.form-error {
  margin-top: 20px; padding: 12px 14px;
  border-left: 4px solid var(--error); background: #fbeceb; color: var(--error); font-weight: 600;
}
.form-error:empty { display: none; }
.unsupported { color: var(--pencil); font-size: 0.95rem; padding: 12px 14px; border: 1.5px dashed var(--field-border); border-radius: var(--radius); }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.form-actions .btn[type="submit"] { min-width: 240px; }

.success h3 { font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem); font-weight: 800; font-stretch: 70%; color: var(--green); line-height: 1; }
.success p { margin-top: 14px; max-width: 46ch; }
.success .btn { margin-top: 24px; }
.load-error p { color: var(--error); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-deep); color: var(--on-green-muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-block: 28px; font-size: 0.98rem; }
.footer-name { font-weight: 800; font-stretch: 72%; font-size: 1.25rem; color: var(--on-green); margin-right: auto; }
.site-footer a { color: var(--on-green); }
.site-footer :focus-visible { outline-color: var(--tape); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .hero-grid, .split, .estimate-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 11ch; }
  .services .split-head { position: static; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .header-row { gap: 10px; min-height: 60px; }
  .wordmark-name { font-size: 1.3rem; white-space: nowrap; }
  .wordmark-llc { display: none; }
  .header-phone { min-width: 40px; }
  .header-phone-number { display: none; }
  .btn-small { min-height: 38px; padding: 6px 12px; font-size: 0.9rem; }
  .service-list a { grid-template-columns: 32px minmax(0, 1fr); padding: 18px 8px; }
  .service-desc { grid-column: 2; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field.half { grid-column: span 1; }
  .field { grid-column: span 1; }
  .form-actions .btn { width: 100%; }
}
@media (max-width: 360px) {
  .btn-small { display: none; }
}
