/* Garage Door Repair Match — one stylesheet, no build step. */

:root {
  --ink: #1d2a33;          /* saguaro night: text, header */
  --ink-2: #4b5963;        /* secondary text */
  --paper: #f6f7f5;        /* page background */
  --white: #ffffff;
  --stucco: #e8e2d6;       /* garage wall */
  --door: #cdbb9f;         /* builder-tan door */
  --door-dark: #a8957a;
  --caution: #f2b705;      /* safety yellow */
  --caution-soft: #fff4cc;
  --sky: #255577;          /* links */
  --line: #d9ddd7;
  --radius-s: 4px;
  --radius-m: 10px;
  --display: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--sky); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--caution); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--caution); color: var(--ink); padding: .5rem 1rem; z-index: 10; }
.skip:focus { top: .75rem; }

.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -.005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
p { margin: 0 0 1em; }
.lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink-2); max-width: 40ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; min-height: 48px; padding: .6rem 1.15rem;
  background: var(--caution); color: var(--ink);
  font: 600 1.05rem/1.2 var(--display); letter-spacing: .01em;
  text-decoration: none; border-radius: var(--radius-s);
  box-shadow: inset 0 -3px 0 rgba(29, 42, 51, .18);
}
.btn:hover { background: #ffc51a; }
.btn-lg { font-size: 1.2rem; min-height: 56px; padding-inline: 1.5rem; }
.btn-call { background: var(--caution); }

/* Header */
.site-header { background: var(--ink); color: var(--white); position: relative; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; font: 700 1.3rem/1 var(--display); }
.mark { width: 30px; height: 30px; flex: none; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav a { color: #dfe6ea; text-decoration: none; font: 500 1.05rem/1 var(--display); padding: .65rem .7rem; border-radius: var(--radius-s); display: block; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--caution); }
.nav-toggle { display: none; }
.btn-header { min-height: 42px; font-size: 1rem; }

@media (max-width: 960px) {
  .header-row { flex-wrap: wrap; padding-block: .6rem; }
  .nav { order: 3; margin-left: auto; }
  .nav-links { display: none !important; }
  .nav-toggle { display: block; }
  .nav-toggle > summary {
    display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; list-style: none;
    border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-s);
  }
  .nav-toggle > summary::-webkit-details-marker { display: none; }
  .burger, .burger::before, .burger::after { width: 20px; height: 2px; background: var(--white); position: relative; display: block; }
  .burger::before, .burger::after { content: ""; position: absolute; left: 0; }
  .burger::before { top: -6px; } .burger::after { top: 6px; }
  .nav-toggle[open] > ul {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ink); padding: .5rem 1rem 1rem; border-top: 1px solid rgba(255,255,255,.12);
  }
  .btn-header { order: 2; margin-left: auto; }
  .brand span { font-size: 1.15rem; }
}
@media (max-width: 520px) {
  .btn-header { display: none; }
}

/* Hero */
.hero { background: var(--white); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-block: clamp(2rem, 5vw, 4.5rem); }
.hero h1 { max-width: 13ch; }
.hero-art { width: 100%; height: auto; border-radius: var(--radius-m); box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(29,42,51,.45); }
.hero-note { font-size: 1rem; color: var(--ink-2); max-width: 44ch; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-height: 280px; }
}

/* Illustration colours */
.d-wall { fill: var(--stucco); }
.d-ceiling { fill: #d9d2c4; }
.d-floor { fill: #cfc8ba; }
.d-spill { fill: var(--caution); opacity: .22; }
.d-frame { fill: #b9ad97; }
.d-panel { fill: var(--door); }
.d-inset { fill: none; stroke: var(--door-dark); stroke-width: 2; }
.d-seam { stroke: #8f7d63; stroke-width: 2; }
.d-glow { fill: var(--caution); }
.d-track { fill: none; stroke: #6f7a80; stroke-width: 7; stroke-linecap: round; }
.d-rail { fill: #6f7a80; }
.d-motor { fill: var(--ink); }
.d-lens { fill: #f9e7a6; }
.d-shaft { stroke: #5b666c; stroke-width: 5; stroke-linecap: round; }
.d-bracket, .d-drum { fill: #5b666c; }
.d-spring { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.d-snap path { stroke: #d83b1e; stroke-width: 3.5; stroke-linecap: round; }

/* Partner status box */
.partner-box { border-left: 6px solid var(--caution); background: var(--caution-soft); padding: 1rem 1.25rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; max-width: 52ch; margin: 1.5rem 0; }
.partner-box p { margin: 0; }
.partner-box p + p { margin-top: .4rem; font-size: 1rem; color: var(--ink-2); }
.partner-status { font: 600 1.15rem/1.3 var(--display); display: flex; align-items: center; gap: .55rem; }
.dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--caution); box-shadow: 0 0 0 3px rgba(242,183,5,.3); flex: none; }
.partner-box.live { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

/* Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-head { max-width: var(--measure); margin-bottom: 1.75rem; }
.section-head p { color: var(--ink-2); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--door-dark); }

/* Symptom finder: rows read left to right, like a diagnosis chart */
.symptoms { border-top: 2px solid var(--ink); }
.symptom {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--line); align-items: start;
}
.symptom h3 { margin: 0; font-size: 1.45rem; }
.symptom .cause { font: 600 1.15rem/1.35 var(--display); color: var(--ink); margin: 0; }
.symptom .cause span { display: block; font: 400 .95rem/1.4 var(--body); color: var(--ink-2); margin-bottom: .15rem; }
.symptom .todo { margin: 0; color: var(--ink-2); }
.symptom .todo a { font-weight: 600; }
.symptoms-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem; padding: .6rem 0; font-size: .95rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .symptoms-head { display: none; }
  .symptom { grid-template-columns: 1fr; gap: .5rem; }
}

/* Safety list with caution stripe */
.safety { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; max-width: var(--measure); }
.safety li { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--caution); padding: .85rem 1rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.safety strong { display: block; font: 600 1.2rem/1.3 var(--display); }

/* Steps (a real sequence) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: .75rem;
  border-radius: 50%; background: var(--ink); color: var(--white); font: 700 1.2rem/1 var(--display);
}
.steps h3 { margin-bottom: .3rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 1.25rem; } }

/* Areas */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.area { display: block; padding: 1.4rem 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; }
.area:hover { border-color: var(--ink); }
.area h3 { margin-bottom: .25rem; font-size: 1.6rem; }
.area p { margin: 0; color: var(--ink-2); font-size: 1rem; }
@media (max-width: 640px) { .areas { grid-template-columns: 1fr; } }

/* Page intro (inner pages) */
.page-intro { background: var(--white); border-bottom: 1px solid var(--line); padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-intro h1 { max-width: 20ch; }
.page-intro .lede { max-width: 58ch; }
.crumbs { font-size: .95rem; color: var(--ink-2); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-2); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.aside-box { position: sticky; top: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem 1.4rem; font-size: 1rem; }
.aside-box h2 { font-size: 1.35rem; }
.aside-box ul { padding-left: 1.1em; margin: 0; }
.aside-box li { margin-bottom: .4em; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .aside-box { position: static; } }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 1.05rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 600 1.05rem/1.2 var(--display); border-bottom: 2px solid var(--ink); }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.note { font-size: .98rem; color: var(--ink-2); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font: 600 1.25rem/1.3 var(--display); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .85rem; font-size: 1.5rem; color: var(--door-dark); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 1rem; max-width: var(--measure); }

/* Footer */
.site-footer { background: var(--ink); color: #c9d2d8; padding-block: 3rem 2rem; margin-top: 0; font-size: 1rem; }
.site-footer a { color: #e6ecef; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 2rem; }
.site-footer h2 { font-size: 1.1rem; color: var(--white); margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.brand-footer { color: var(--white); margin-bottom: 1rem; }
.disclosure { font-size: .95rem; line-height: 1.55; max-width: 46ch; }
.copyright { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-about { grid-column: 1 / -1; } }

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