/* Katy TX Roofers — design system. System fonts only (no third-party requests). */
:root {
  --navy-950: #08131f;
  --navy-900: #0d1e30;
  --navy-800: #13304b;
  --navy-700: #1c4467;
  --slate-600: #475467;
  --slate-500: #667085;
  --slate-300: #d0d5dd;
  --slate-200: #e4e7ec;
  --slate-100: #f2f4f7;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --ember-600: #d9481c;
  --ember-500: #ef5a26;
  --ember-100: #fde8de;
  --amber-400: #f6b545;
  --green-600: #12825a;
  --green-50: #e9f7f0;
  --red-600: #c4320a;
  --red-50: #fef1ec;

  --text: #101828;
  --text-muted: var(--slate-600);
  --bg: var(--white);
  --bg-soft: var(--slate-50);
  --border: var(--slate-200);
  --accent: var(--ember-600);
  --accent-hover: #b93c15;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 8px 24px -8px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 48px -16px rgba(8, 19, 31, .35);
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; display: block; }
a { color: var(--navy-700); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--amber-400); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--navy-950); }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 100; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.muted { color: var(--text-muted); }
.small { font-size: .9rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 1.05rem; padding: 14px 22px; border-radius: 999px; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; line-height: 1.2; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-call { background: var(--accent); color: var(--white); box-shadow: 0 10px 22px -10px rgba(217, 72, 28, .7); }
.btn-call:hover { background: var(--accent-hover); color: var(--white); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }
.btn-outline { background: var(--white); color: var(--navy-900); border-color: var(--slate-300); }
.btn-outline:hover { border-color: var(--navy-900); color: var(--navy-900); }
.btn-lg { font-size: 1.15rem; padding: 17px 28px; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-950); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand small { display: block; font-size: .72rem; font-weight: 600; color: var(--slate-500); letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--navy-900); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.brand span, .header-call .btn { white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--slate-100); color: var(--navy-950); }
.header-call { display: inline-flex; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }
@media (max-width: 1200px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: stretch; background: var(--white); border-bottom: 1px solid var(--border); padding: 10px var(--gutter) 18px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; border-radius: 10px; }
  .menu-toggle { display: inline-flex; }
  .header-call .btn-label { display: none; }
  .header-call .btn { padding: 12px; }
}

@media (max-width: 420px) {
  .header-row { gap: 8px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand svg { width: 32px; height: 32px; }
  .brand small { display: none; }
  .header-call .btn { padding: 11px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--white); background:
  radial-gradient(1200px 500px at 85% -10%, rgba(239, 90, 38, .28), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(28, 68, 103, .9), transparent 60%),
  linear-gradient(160deg, var(--navy-900), var(--navy-950)); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 140px; background: url("roofline.svg") repeat-x bottom / 520px auto; opacity: .09; pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero h1, .hero h2, .hero h3 { color: var(--white); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero-grid > *, .grid > *, .layout > * { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: rgba(255, 255, 255, .86); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255, 255, 255, .9); margin: 0; }
.hero-points svg { width: 22px; height: 22px; flex: none; color: var(--amber-400); margin-top: 2px; }
.page-hero .hero-grid { grid-template-columns: 1fr; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(44px, 6vw, 80px); }
.page-hero .hero-lead { max-width: 70ch; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- ZIP checker card ---------- */
.zip-card { background: var(--white); color: var(--text); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow-lg); }
.zip-card h2 { font-size: 1.35rem; color: var(--navy-950); margin-bottom: 6px; }
.zip-form { display: flex; gap: 10px; margin: 16px 0 12px; }
.zip-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.zip-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; padding: 14px 16px; border: 2px solid var(--slate-300); border-radius: 12px; letter-spacing: .08em; }
.zip-form input:focus { border-color: var(--navy-700); outline: none; box-shadow: 0 0 0 4px rgba(28, 68, 103, .15); }
.zip-form button { font: inherit; font-weight: 700; padding: 0 20px; border-radius: 12px; border: 0; background: var(--navy-900); color: var(--white); cursor: pointer; }
.zip-form button:hover { background: var(--navy-700); }
.zip-result { display: none; border-radius: 12px; padding: 14px 16px; font-weight: 600; margin-bottom: 12px; }
.zip-result.ok { display: block; background: var(--green-50); color: #0b5b3f; border: 1px solid #b6e3cd; }
.zip-result.no { display: block; background: var(--red-50); color: #8a2306; border: 1px solid #f7c8b4; }
.zip-result a { color: inherit; }
.zip-note { font-size: .82rem; color: var(--slate-500); margin: 10px 0 0; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { background: var(--navy-950); color: rgba(255, 255, 255, .88); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { color: var(--text-muted); font-size: 1.08rem; }
.section-dark .section-head p { color: rgba(255, 255, 255, .75); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--slate-300); color: inherit; }
.card-link .more { margin-top: auto; padding-top: 14px; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.icon { width: 48px; height: 48px; border-radius: 12px; background: var(--ember-100); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 26px; height: 26px; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; }
.steps li { counter-increment: step; position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px 24px; margin: 0; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy-900); color: var(--white); font-weight: 800; margin-bottom: 14px; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--text-muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 12px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--green-50) url("check.svg") center / 14px no-repeat; border: 1px solid #b6e3cd; }
.warnlist li::before { background: var(--red-50) url("alert.svg") center / 14px no-repeat; border-color: #f7c8b4; }

.callout { border-left: 4px solid var(--accent); background: var(--ember-100); padding: 18px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 1.5em; }
.callout p:last-child { margin: 0; }
.callout-info { border-left-color: var(--navy-700); background: #eef4fa; }
.quick-answer { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-top: -40px; position: relative; z-index: 2; }
.quick-answer h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 8px; }
.quick-answer p:last-child { margin: 0; }

.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact { border-radius: var(--radius); padding: 22px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.fact strong { display: block; font-size: 1.5rem; color: var(--white); line-height: 1.2; margin-bottom: 6px; }
.fact p { margin: 0 0 8px; color: rgba(255, 255, 255, .78); font-size: .95rem; }
.fact a { color: var(--amber-400); font-size: .85rem; }
@media (max-width: 860px) { .fact-grid { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1em; }
.chips li { margin: 0; background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .92rem; }
.chips li span { color: var(--slate-500); font-weight: 500; }

.area-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.area-table th, .area-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.area-table th { background: var(--slate-100); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-600); }
.area-table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------- article layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child, .prose .card h3 { margin-top: 0; }
.prose h3 { margin-top: 1.3em; }
.sidebar { position: sticky; top: 96px; display: grid; gap: 16px; }
.side-cta { background: var(--navy-950); color: rgba(255, 255, 255, .85); border-radius: var(--radius-lg); padding: 24px; }
.side-cta h2 { color: var(--white); font-size: 1.25rem; }
.side-cta p { font-size: .95rem; }
.toc { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.toc h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; color: var(--slate-500); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.1em; font-size: .95rem; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } .sidebar { position: static; } }

.breadcrumb { font-size: .88rem; margin-bottom: 18px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { margin: 0; color: rgba(255, 255, 255, .7); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: rgba(255, 255, 255, .45); }
.breadcrumb a { color: rgba(255, 255, 255, .85); }

/* ---------- photos, credits, map ---------- */
.photo { margin: 0 0 1.8em; }
.grid + .photo, .card + .photo { margin-top: 24px; }
.photo img { width: 100%; height: auto; border-radius: var(--radius); background: var(--slate-100); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }
.photo figcaption, .map-figure figcaption { font-size: .85rem; color: var(--slate-500); margin-top: 8px; }
.photo .credit { white-space: nowrap; }
.card-photo { padding-top: 0; overflow: hidden; }
.card-photo .card-media { display: block; width: calc(100% + 48px); max-width: none; margin: 0 -24px 0; height: 150px; object-fit: cover; background: var(--slate-100); }
.card-photo .icon { margin-top: -24px; position: relative; border: 3px solid var(--white); }
.credits-h { font-size: .95rem; margin: 1.2em 0 .4em; color: var(--slate-600); }
.credits { padding-left: 1.2em; font-size: .85rem; }
.map-figure { margin: 0 0 1.6em; }
.area-map { width: 100%; height: auto; display: block; }
.area-map .m-bg { fill: #eef4fa; stroke: var(--border); }
.area-map .m-grid line { stroke: #dde7f1; stroke-width: 1; }
.area-map .m-dot { fill: var(--navy-700); stroke: var(--white); stroke-width: 2; }
.area-map .m-katy { fill: var(--accent); stroke: var(--white); stroke-width: 2.5; }
.area-map .m-label { font: 600 15px var(--font); fill: var(--navy-900); paint-order: stroke; stroke: #eef4fa; stroke-width: 4px; }
.area-map .m-label-katy { font-size: 20px; font-weight: 800; fill: var(--accent); }
.area-map .m-scale line { stroke: var(--navy-900); stroke-width: 2; }
.area-map .m-scale text, .area-map .m-north text { font: 600 12px var(--font); fill: var(--navy-900); }
.area-map .m-north path { fill: var(--navy-900); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; padding: 18px 32px 18px 0; position: relative; color: var(--navy-950); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 18px; color: var(--text-muted); }
.faq details > div p:last-child { margin: 0; }

.sources { font-size: .9rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 2.5em; padding-top: 1.2em; }
.sources h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); }
.sources ol { padding-left: 1.2em; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--ember-600), #b93c15); color: var(--white); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: var(--white); margin: 0 0 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .9); }
.cta-band .btn-call { background: var(--white); color: var(--ember-600); box-shadow: none; }
.cta-band .btn-call:hover { background: var(--navy-950); color: var(--white); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .72); padding: 56px 0 32px; font-size: .95rem; }
.site-footer a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.site-footer a:hover { color: var(--amber-400); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .55); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand { color: var(--white); font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; display: block; }
.disclosure { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 22px; font-size: .85rem; color: rgba(255, 255, 255, .6); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- mobile sticky call bar ---------- */
.call-bar { display: none; }
@media (max-width: 760px) {
  .call-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(8, 19, 31, .96); gap: 10px; box-shadow: 0 -8px 24px rgba(0, 0, 0, .25); }
  .call-bar .btn { flex: 1; padding: 15px 16px; }
  body { padding-bottom: 84px; }
}

.lead-disclosure { font-size: .85rem; color: rgba(255, 255, 255, .7); margin-top: 14px; }
.lead-disclosure a { color: rgba(255, 255, 255, .9); }
.updated { font-size: .85rem; color: rgba(255, 255, 255, .7); margin-top: 8px; }
