/* Keptridge contractors site. Mobile first, no external assets. */
:root {
  --paper: #f6f3ec;
  --sand: #ece7db;
  --ink: #1f2529;
  --muted: #4d5760;
  --line: #d8d2c5;
  --line-strong: #b4ab9a;
  --amber: #f0a81d;
  --amber-hover: #f6b63a;
  --amber-deep: #8f4600;
  --amber-wash: #fbefd6;
  --navy: #1a2430;
  --navy-2: #243040;
  --navy-text: #c3cbd3;
  --navy-border: #8d96a0;
  --amber-bright: #f5b544;
  --focus: #8f4600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 1.0625rem; line-height: 1.6; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.125rem, 5vw + 0.75rem, 3.75rem); max-width: 16ch; }
h2 { font-size: clamp(1.625rem, 2.5vw + 0.75rem, 2.375rem); margin-bottom: 28px; }
h3 { font-size: 1.25rem; }
p { margin: 0; overflow-wrap: anywhere; }
a { color: var(--amber-deep); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
svg { display: block; max-width: 100%; height: auto; }
section, div.band { scroll-margin-top: 20px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.band-dark :focus-visible { outline-color: var(--amber); }

.skip { position: absolute; left: 12px; top: -120px; z-index: 100; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 3px; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header { background: var(--paper); border-top: 6px solid var(--amber); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 12px 0; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; margin-right: auto; }
.site-nav { width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 6px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9375rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--amber); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; background: var(--amber); color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.3; text-align: center; text-decoration: none; border: 2px solid var(--amber); border-radius: 3px; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.button:hover { background: var(--amber-hover); border-color: var(--amber-hover); }
.button.small { min-height: 44px; padding: 8px 14px; font-size: 0.9375rem; }
.button.secondary { background: transparent; color: inherit; border-color: var(--line-strong); }
.button.secondary:hover { background: rgba(0, 0, 0, 0.06); border-color: var(--line-strong); }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; gap: 32px; }
.kicker { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: 18px; }
.kicker::before { content: ""; flex: none; width: 28px; height: 3px; background: var(--amber); }
.lead { font-size: 1.125rem; line-height: 1.65; max-width: 38rem; margin-top: 22px; color: var(--muted); }
.hero-actions { margin-top: 28px; display: grid; gap: 14px; max-width: 38rem; justify-items: start; }
.hero-note { font-size: 0.9375rem; color: var(--muted); }
.hero-art { display: none; }
.hero-art svg { width: 100%; max-width: 420px; margin-inline: auto; }

/* Bands and shared layout */
.band { padding: 56px 0; }
.band-sand { background: var(--sand); }
.band-rule { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-dark { background: var(--navy); color: #fff; }
.band-dark h2, .band-dark h3 { color: #fff; }
.section-head { display: grid; gap: 12px; margin-bottom: 24px; max-width: 46rem; }
.section-head h2 { margin-bottom: 0; }
.section-head p { color: var(--muted); }
.two-col { display: grid; gap: 40px; }

/* Why it costs you */
.cost-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.cost-list li { padding: 18px 18px 18px 20px; background: var(--paper); border-left: 4px solid var(--amber); border-radius: 0 3px 3px 0; }

/* What we do */
.service-grid { display: grid; gap: 28px; }
.service { border-top: 3px solid var(--ink); padding-top: 18px; }
.service h3 { font-size: 1.375rem; margin-bottom: 10px; }

/* How we start */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 6px 16px; align-items: start; align-content: start; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; }
.step-number { grid-row: 1 / 3; width: 48px; height: 48px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; font-size: 1.25rem; border-radius: 3px; }
.steps h3 { font-size: 1.25rem; align-self: center; }
.steps p { color: var(--muted); }
.steps-cta { margin-top: 28px; }

/* Boundaries */
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.plain-list li { padding-left: 22px; position: relative; }
.plain-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 10px; height: 10px; background: var(--amber); border-radius: 1px; }

/* Sample */
.sample-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.9375rem; color: var(--muted); margin-bottom: 22px; }
.chip { display: inline-block; padding: 5px 10px; background: var(--amber-wash); border: 1px solid var(--amber); color: var(--ink); font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 2px; }
.project-grid { display: grid; gap: 16px; margin-bottom: 24px; }
.project-card { background: var(--paper); border: 1px solid var(--line); border-radius: 3px; padding: 20px; }
.project-card h3 { font-size: 1.1875rem; margin-bottom: 14px; }
.fict { font-weight: 500; color: var(--muted); font-size: 0.9375rem; }
.project-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.project-facts div { min-width: 0; }
.project-facts dt { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.project-facts dd { margin: 4px 0 0; font-weight: 600; }

.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: 3px; }
.exceptions { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.exceptions caption { text-align: left; padding: 14px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.exceptions th, .exceptions td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.exceptions th { font-size: 0.8125rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--sand); }
.exceptions th:nth-child(5) { width: 1%; }
.exceptions tbody tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 4px 9px; border-radius: 2px; font-size: 0.8125rem; font-weight: 700; white-space: nowrap; border: 1px solid var(--ink); color: var(--ink); }
.status-resolved { background: var(--ink); color: #fff; }
.status-chased { background: var(--amber); border-color: var(--amber); }
.status-requested { background: transparent; }

/* Questions */
.faq { display: grid; gap: 22px; }
.faq-item { border-top: 1px solid var(--line); padding-top: 18px; }
.faq-item h3 { font-size: 1.125rem; margin-bottom: 8px; }
.faq-item p { color: var(--muted); }

/* Contact */
.contact-grid { display: grid; gap: 36px; }
.contact-intro p { color: var(--navy-text); margin-top: 14px; max-width: 34rem; }
/* Inline address links keep their text flow but get a 44px-tall hit area. */
.contact-address { display: inline-block; padding: 10px 0; margin: -10px 0; color: var(--amber-bright); font-weight: 700; overflow-wrap: anywhere; }
.check-form { display: grid; gap: 18px; min-width: 0; align-content: start; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--navy-text); }
.field input, .field textarea { width: 100%; min-width: 0; min-height: 48px; padding: 11px 12px; color: #fff; background: var(--navy-2); border: 1px solid var(--navy-border); border-radius: 3px; }
.field textarea { resize: vertical; }
.field-row { display: grid; gap: 18px; }
.form-note { font-size: 0.9375rem; color: var(--navy-text); }
.form-error { padding: 12px 14px; background: var(--amber-wash); color: var(--ink); border-left: 4px solid var(--amber); border-radius: 0 3px 3px 0; font-size: 0.9375rem; }
.check-form .button { width: 100%; }
.prepared { margin-top: 8px; padding: 20px; background: var(--navy-2); border: 1px solid var(--navy-border); border-radius: 3px; }
.prepared > * + * { margin-top: 14px; }
.prepared h3 { font-size: 1.125rem; }
.prepared-to { color: var(--navy-text); font-size: 0.9375rem; }
.prepared pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 0.9375rem; line-height: 1.6; background: var(--navy); padding: 14px; border-radius: 3px; }
.prepared-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.prepared-actions .button { flex: 1 1 200px; width: auto; }
.band-dark .button.secondary { color: #fff; border-color: var(--navy-border); }
.band-dark .button.secondary:hover { background: rgba(255, 255, 255, 0.08); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 0.9375rem; color: var(--muted); }
.site-footer p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.site-footer .sep { display: none; }
.wordmark-small { font-weight: 800; color: var(--ink); }
.site-footer a { color: var(--amber-deep); font-weight: 600; overflow-wrap: anywhere; }

/* Stacked exceptions table on phones and tablets */
@media (max-width: 63.99em) {
  .exceptions thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .exceptions thead tr, .exceptions thead th { display: block; width: 1px; height: 1px; overflow: hidden; padding: 0; border: 0; }
  .exceptions tr { display: block; }
  .exceptions tbody tr { border-bottom: 6px solid var(--sand); }
  .exceptions tbody tr:last-child { border-bottom: 0; }
  .exceptions td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 8px; padding: 10px 14px; }
  .exceptions tbody tr:last-child td { border-bottom: 1px solid var(--line); }
  .exceptions tbody tr:last-child td:last-child { border-bottom: 0; }
  .exceptions td > .status { justify-self: start; }
  .exceptions td::before { content: attr(data-label); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
}

@media (min-width: 30em) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .check-form .button { width: auto; justify-self: start; }
}

@media (min-width: 48em) {
  .wrap { width: min(1120px, 100% - 64px); }
  .band { padding: 80px 0; }
  .hero { padding: 72px 0 72px; }
  .header-row { padding: 14px 0; }
  .site-nav ul { gap: 0 10px; }
  .cost-list { grid-template-columns: 1fr 1fr; gap: 20px; }
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .steps li { grid-template-columns: 1fr; gap: 10px; padding: 24px; }
  .step-number { grid-row: auto; margin-bottom: 8px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 48px; }
  .project-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .site-footer .sep { display: inline; }
}

@media (min-width: 64em) {
  .hero { padding: 88px 0 80px; }
  .header-row { flex-wrap: nowrap; gap: 24px; }
  .wordmark { margin-right: 0; }
  .site-nav { width: auto; margin-left: auto; }
  .header-cta { order: 3; }
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 48px; }
  .hero-art { display: block; }
  .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 64px; }
  .two-col { grid-template-columns: 1fr 1.6fr; gap: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
