/*
  Roof Repairs Houston — design direction
  Palette: storm ink #15212b, slate #2c3e4c, clay tile #a8401b (accent), deep clay #8a3415,
           sand #f7f2ea (page), paper #fffdf9 (panels), peach #f2c79f (accent on dark), muted #5b6670.
  Type: headings in a bookish old-style serif stack (Iowan / Palatino / Georgia) for a steady,
        trustworthy voice; body in the system sans stack for legibility. No web fonts.
  Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 72 px (--s1 … --s8), fluid via clamp() at section level.
  Shape language: roof pitch. Angled section edges (clip-path), a ridge chevron above headings,
                  square-cornered cards with a single clay "flashing" rule on one edge.
*/

:root {
  --ink: #15212b;
  --slate: #2c3e4c;
  --clay: #a8401b;
  --clay-dark: #8a3415;
  --sand: #f7f2ea;
  --paper: #fffdf9;
  --peach: #f2c79f;
  --muted: #5b6670;
  --line: #ded3c2;
  --teal: #1d5c63;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --wrap: 1180px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--clay-dark); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); margin: 0 0 var(--s4); font-weight: 700; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2.1rem); margin-top: var(--s7); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem); margin-top: var(--s6); }
p, ul, ol { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: var(--s2); }

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

.skip {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: var(--s3) var(--s4);
}
.skip:focus { top: var(--s4); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: #fff;
  border-bottom: 3px solid var(--clay);
}
.site-header__row { display: flex; align-items: center; gap: var(--s4); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.brand:hover { color: var(--peach); }
.brand__mark {
  width: 34px; height: 22px; flex: none; position: relative;
  background: var(--peach);
  clip-path: polygon(50% 0, 100% 78%, 86% 78%, 86% 100%, 14% 100%, 14% 78%, 0 78%);
}
.brand__small { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--peach); }

.nav { margin-left: auto; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s1); }
.nav__list li { margin: 0; }
.nav__list a { display: block; padding: var(--s3) var(--s3); color: #fff; text-decoration: none; font-weight: 500; min-height: 44px; }
.nav__list a:hover, .nav__list a[aria-current="page"] { color: var(--peach); text-decoration: underline; }
.nav-toggle {
  display: none; margin-left: auto; background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.5); border-radius: var(--radius);
  min-width: 44px; min-height: 44px; padding: 0 var(--s3); font: inherit; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--peach); color: var(--peach); }
.header-call { white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: var(--s3) var(--s5);
  background: var(--clay); color: #fff; border: 2px solid var(--clay);
  border-radius: var(--radius); font-weight: 700; text-decoration: none; line-height: 1.2;
  font-size: 1.05rem;
}
.btn:hover { background: var(--clay-dark); border-color: var(--clay-dark); color: #fff; text-decoration: none; }
.btn--big { min-height: 60px; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); padding: var(--s4) var(--s6); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn--ghost:hover { background: transparent; border-color: var(--peach); color: var(--peach); }
.btn--light { background: var(--peach); border-color: var(--peach); color: var(--ink); }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn__label { font-weight: 400; font-size: 0.85em; opacity: 0.95; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #fff; position: relative; padding-block: clamp(32px, 5vw, 72px) clamp(56px, 8vw, 110px); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 50% 100%, 0 calc(100% - 40px)); }
.hero__grid { display: grid; gap: var(--s6); align-items: center; }
.hero h1 { color: #fff; }
.hero__lede { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: #f1ece4; max-width: 60ch; }
.hero__facts { list-style: none; padding: 0; margin: var(--s5) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--peach); font-size: 0.95rem; }
.hero__facts li { margin: 0; padding-left: 18px; position: relative; }
.hero__facts li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; border-top: 2px solid var(--peach); border-left: 2px solid var(--peach); transform: rotate(45deg); }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%, 0 12%); }
.hero .breadcrumbs, .hero .breadcrumbs a { color: #e6ddd0; }

.page-head { background: var(--ink); color: #fff; padding-block: var(--s6) var(--s8); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), 0 100%); }
.page-head h1 { color: #fff; margin-bottom: var(--s3); }
.page-head p { color: #f1ece4; max-width: 62ch; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.9rem; margin-bottom: var(--s4); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; margin: 0; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--s2); opacity: 0.7; }

/* ---------- Content ---------- */
.main { padding-block: var(--s6) var(--s8); }
.layout { display: grid; gap: var(--s7); }
.layout > *, .split > *, .hero__grid > * { min-width: 0; }
.prose { max-width: 72ch; }
.prose h2::before {
  content: ""; display: block; width: 44px; height: 12px; margin-bottom: var(--s3);
  background: linear-gradient(to top right, transparent 46%, var(--clay) 47%, var(--clay) 60%, transparent 61%) left / 50% 100% no-repeat,
              linear-gradient(to top left, transparent 46%, var(--clay) 47%, var(--clay) 60%, transparent 61%) right / 50% 100% no-repeat;
}
.answer {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); line-height: 1.6;
  background: var(--paper); border-left: 5px solid var(--clay);
  padding: var(--s5); margin: 0 0 var(--s6);
}
.figure { margin: var(--s6) 0; }
.figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: var(--s2); }

.callout { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--teal); padding: var(--s5); margin: var(--s6) 0; }
.callout h3 { margin-top: 0; }
.callout--warn { border-top-color: var(--clay); }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: var(--s5); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--ink); color: var(--peach); font-family: var(--serif); font-weight: 700;
}

/* ---------- Call band ---------- */
.call-band {
  background: var(--slate); color: #fff; padding: var(--s5) var(--s5);
  display: grid; gap: var(--s4); align-items: center; margin: var(--s7) 0;
  border-left: 6px solid var(--peach);
}
.call-band p { margin: 0; color: #f1ece4; }
.call-band strong { color: #fff; font-family: var(--serif); font-size: 1.25rem; display: block; margin-bottom: var(--s1); }
.call-band--top { margin-top: 0; }

/* ---------- Cards and lists ---------- */
.section { padding-block: clamp(40px, 6vw, 80px); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: #f1ece4; }
.section__head { max-width: 70ch; margin-bottom: var(--s6); }
.section__head h2 { margin-top: 0; }

.cards { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); list-style: none; padding: 0; margin: 0; }
.card { margin: 0; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--clay); padding: var(--s4) var(--s5); }
.card h3 { margin: 0 0 var(--s2); font-size: 1.15rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--clay-dark); text-decoration: underline; }
.card p { margin: 0; font-size: 0.95rem; color: var(--slate); }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips li { margin: 0; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: var(--s2) var(--s4); background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.chips a:hover { border-color: var(--clay); color: var(--clay-dark); }
.section--ink .chips a { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.section--ink .chips a:hover { border-color: var(--peach); color: var(--peach); }

.split { display: grid; gap: var(--s6); align-items: center; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.related { background: var(--paper); border: 1px solid var(--line); padding: var(--s5); }
.related h2 { font-size: 1.2rem; margin-top: 0; }
.related h2::before { display: none; }
.related ul { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.related li { margin: 0; border-top: 1px solid var(--line); }
.related li a { display: block; padding: var(--s3) 0; min-height: 44px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: var(--s5) 0 var(--s6); border: 1px solid var(--line); background: var(--paper); }
.table-wrap:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.95rem; }
caption { caption-side: top; text-align: left; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; padding: var(--s3) var(--s4); background: var(--sand); border-bottom: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
thead th { background: var(--ink); color: #fff; font-weight: 600; }
tbody th { font-weight: 600; background: #fbf7f1; }

/* ---------- FAQ ---------- */
.faq { margin: var(--s5) 0; }
.faq details { background: var(--paper); border: 1px solid var(--line); margin-bottom: var(--s2); }
.faq summary { cursor: pointer; padding: var(--s4) var(--s5); font-family: var(--serif); font-weight: 700; font-size: 1.08rem; list-style: none; position: relative; padding-right: 48px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: var(--s5); top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 1.4rem; color: var(--clay); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--clay-dark); }
.faq .faq__a { padding: 0 var(--s5) var(--s4); }
.faq .faq__a p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e6ddd0; padding-block: var(--s7) calc(var(--s7) + 72px); font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--peach); }
.footer-grid { display: grid; gap: var(--s6); }
.site-footer h2 { color: #fff; font-size: 1.1rem; margin: 0 0 var(--s3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-block; padding: var(--s2) 0; min-height: 44px; }
.footer-disclosure { border-top: 1px solid rgba(255,255,255,0.18); margin-top: var(--s6); padding-top: var(--s5); }
.footer-disclosure p { max-width: 95ch; }
.disclaimer { font-size: 0.88rem; color: #d9cfc1; }

/* ---------- Mobile call bar ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; background: var(--clay); border-top: 2px solid var(--peach);
  padding: var(--s2) var(--s3) calc(var(--s2) + env(safe-area-inset-bottom));
}
.callbar a { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 52px; color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.callbar a:hover { color: #fff; text-decoration: underline; }

/* ---------- Call dialog ---------- */
.call-dialog { border: 0; padding: 0; max-width: 440px; width: calc(100% - 32px); background: var(--paper); color: var(--ink); border-top: 6px solid var(--clay); }
.call-dialog::backdrop { background: rgba(21, 33, 43, 0.6); }
.call-dialog__body { padding: var(--s6) var(--s6) var(--s5); }
.call-dialog h2 { margin-top: 0; font-size: 1.5rem; }
.call-dialog__close { position: absolute; top: var(--s2); right: var(--s2); width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); }
.call-dialog__close:hover { color: var(--clay-dark); }

/* ---------- 404 ---------- */
.notfound { padding-block: var(--s8); }

/* ---------- Responsive ---------- */
@media (min-width: 760px) {
  .call-band { grid-template-columns: 1fr auto; padding: var(--s5) var(--s6); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .split--flip > :first-child { order: 2; }
}
@media (min-width: 980px) {
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .layout__aside { position: sticky; top: 96px; align-self: start; }
}
@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-bottom: 3px solid var(--clay); margin: 0; display: none; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; padding: var(--s2) var(--s5) var(--s4); }
  .nav__list a { padding: var(--s3) 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .site-header__row { position: relative; }
  .header-call { display: none; }
  .callbar { display: block; }
}
@media (max-width: 420px) {
  .brand__small { display: none; }
  .btn--big { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .callbar, .call-dialog, .call-band { display: none !important; }
  .hero, .page-head { clip-path: none; }
}
.call-dialog .disclaimer { color: var(--muted); font-size: 0.85rem; }
