/* ==========================================================
   Texas Reliable Roofing — main stylesheet
   Brand colors live in :root so they're easy to change.
   ========================================================== */
:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --red: #c8102e;
  --red-dark: #a00d25;
  --cream: #f7f4ee;
  --white: #ffffff;
  --ink: #1b1f27;
  --muted: #5b6474;
  --line: #e3e0d8;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(11, 37, 69, 0.12);
  --max: 1180px;
  --font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--red); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.container { width: min(var(--max), 92%); margin-inline: auto; }
.section { padding: 88px 0; }
.section--cream { background: var(--cream); }
.section--navy { background: var(--navy); color: #dfe6f0; }
.section--navy h2, .section--navy h3 { color: var(--white); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.85rem; color: var(--red);
  margin-bottom: 10px;
}
.eyebrow::before { content: "★"; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-inline: auto; }
.lead { font-size: 1.15rem; color: var(--muted); }
.section--navy .lead { color: #b9c6d8; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 6px; border: 2px solid transparent;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .15s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); }
.btn--outline { border-color: var(--white); color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--navy); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-2); }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--red); color: var(--white); font-size: 0.9rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.topbar a { color: var(--white); text-decoration: none; font-weight: 600; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); box-shadow: 0 2px 14px rgba(0,0,0,.25);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.logo svg { width: 46px; height: 46px; flex: none; }
.logo-text { font-family: var(--font-head); text-transform: uppercase; line-height: 1; }
.logo-text strong { display: block; font-size: 1.3rem; letter-spacing: 0.04em; }
.logo-text span { font-size: 0.78rem; letter-spacing: 0.32em; color: #ff8a9b; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--white); text-decoration: none; font-family: var(--font-head);
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.98rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { border-bottom-color: var(--red); }
.nav .btn { padding: 10px 18px; border-bottom: 0; }
.nav-toggle {
  display: none; background: none; border: 0; color: var(--white);
  width: 44px; height: 44px; cursor: pointer;
}
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--white); overflow: hidden;
  background:
    linear-gradient(105deg, rgba(11,37,69,.96) 0%, rgba(11,37,69,.86) 45%, rgba(11,37,69,.55) 100%),
    var(--hero-img, none) center/cover no-repeat,
    linear-gradient(160deg, #1d3e6e, #0b2545);
}
.hero::after { /* subtle shingle pattern */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .035;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 26px, #fff 26px 28px),
    repeating-linear-gradient(90deg, transparent 0 58px, #fff 58px 60px);
}
.hero .container { position: relative; z-index: 1; padding: 110px 0 120px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.hero h1 { color: var(--white); }
.hero h1 em { font-style: normal; color: #ff5a73; }
.hero p { font-size: 1.2rem; color: #d3dceb; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-badges { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 36px; font-size: .95rem; color: #c3cee0; }
.hero-badges span::before { content: "✓ "; color: #ff5a73; font-weight: 700; }

.page-hero { background: linear-gradient(100deg, rgba(11,37,69,.95) 0%, rgba(11,37,69,.82) 55%, rgba(11,37,69,.6) 100%), var(--hero-img, none) center/cover no-repeat, linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--white); padding: 80px 0 70px; position: relative; overflow: hidden; }
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.page-hero p { color: #c3cee0; font-size: 1.15rem; max-width: 640px; margin: 0; }
.page-hero::after { content: "★"; position: absolute; right: 5%; top: 50%; transform: translateY(-50%); font-size: 260px; color: rgba(255,255,255,.05); line-height: 1; }

/* ---------- Quote card ---------- */
.quote-card { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); border-top: 6px solid var(--red); }
.quote-card h3 { margin-bottom: 6px; }
.quote-card p { color: var(--muted); font-size: .95rem; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 1rem; background: #fbfaf7; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); background: var(--white); }
.field textarea { min-height: 120px; resize: vertical; }
.full { grid-column: 1 / -1; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.form-success { display: none; background: #e8f5ec; border: 1px solid #9dd3ad; color: #1e5b31; padding: 14px 16px; border-radius: 6px; margin-top: 12px; }
.form-success.show { display: block; }

/* ---------- Trust strip ---------- */
.trust { background: var(--cream); border-bottom: 1px solid var(--line); }
.trust .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 34px 0; }
.trust-item { display: flex; gap: 14px; align-items: center; }
.trust-item .icon { width: 50px; height: 50px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; flex: none; }
.trust-item .icon svg { width: 24px; height: 24px; }
.trust-item strong { display: block; font-family: var(--font-head); text-transform: uppercase; color: var(--navy); letter-spacing: .03em; }
.trust-item small { color: var(--muted); }

/* ---------- Cards ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

.card {
  background: var(--white); border-radius: var(--radius); padding: 32px 28px;
  box-shadow: 0 4px 18px rgba(11,37,69,.07); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.card:hover::before { transform: scaleX(1); }
.card .icon { width: 58px; height: 58px; border-radius: 10px; background: #fbe7ea; color: var(--red); display: grid; place-items: center; margin-bottom: 18px; }
.card .icon svg { width: 30px; height: 30px; }
.card p { color: var(--muted); font-size: .98rem; }
.card .more { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; font-size: .9rem; }

.photo-card { padding: 0; }
.photo-card .photo { aspect-ratio: 16 / 10; background-size: cover; background-position: center; background-color: var(--navy-2); }
.photo-card .body { padding: 0 28px 30px; position: relative; }
.photo-card .icon { margin-top: -29px; position: relative; background: var(--red); color: var(--white); box-shadow: 0 6px 16px rgba(200,16,46,.35); }
.also { text-align: center; margin: 36px 0 0; color: var(--muted); }
.also a { font-weight: 700; }

/* ---------- Map ---------- */
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--line); }
.map iframe, .map-full iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-full { height: 380px; background: var(--line); }
.areas li { background: var(--white) !important; }

/* ---------- Feature / checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 24px; }
.checklist li { padding-left: 34px; position: relative; margin-bottom: 12px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--red); color: var(--white); font-size: .8rem; font-weight: 700; display: grid; place-items: center;
}
.section--navy .checklist li { color: #dfe6f0; }

.visual {
  aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden;
  background: linear-gradient(160deg, #24497d, #0b2545);
  background-size: cover; background-position: center;
}
.visual .tag {
  position: absolute; left: 20px; bottom: 20px; background: var(--red); color: var(--white);
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 16px; border-radius: 6px;
}
.visual svg.house { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding: 28px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-head); font-size: 2.6rem; color: #ff5a73; display: block; line-height: 1; margin-bottom: 12px;
}
.step p { color: #b9c6d8; margin: 0; font-size: .97rem; }

/* ---------- Service detail rows ---------- */
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 64px 0; border-bottom: 1px solid var(--line); }
.service-row:last-child { border-bottom: 0; }
.service-row:nth-child(even) .visual { order: 2; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.pill-list li { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; color: var(--navy); font-weight: 600; }

/* ---------- Gallery ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.filters button {
  border: 2px solid var(--navy); background: transparent; color: var(--navy); padding: 9px 18px; border-radius: 999px;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; font-size: .9rem;
}
.filters button.active, .filters button:hover { background: var(--navy); color: var(--white); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { margin: 0; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; position: relative; background: linear-gradient(150deg, #2a5084, #0b2545); }
.gallery-item.hidden { display: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.35); }
.gallery-item .placeholder svg { width: 70px; height: 70px; }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: var(--white);
  background: linear-gradient(transparent, rgba(11,37,69,.92));
}
.gallery-item figcaption strong { display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; }
.gallery-item figcaption small { color: #c3cee0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--red); color: var(--white); padding: 64px 0; position: relative; overflow: hidden; }
.cta-band::before { content: "★"; position: absolute; left: -30px; top: -70px; font-size: 300px; color: rgba(255,255,255,.07); line-height: 1; }
.cta-band .container { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; position: relative; }
.cta-band h2 { color: var(--white); margin: 0 0 6px; }
.cta-band p { margin: 0; color: #ffe0e5; font-size: 1.1rem; }
.cta-band .btn--outline:hover { color: var(--red); }

/* ---------- Values / stats ---------- */
.value { text-align: center; padding: 30px 20px; }
.value .icon { margin: 0 auto 16px; width: 70px; height: 70px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; }
.value .icon svg { width: 32px; height: 32px; }
.value p { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 20px 24px; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.contact-info .item { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-info .icon { width: 50px; height: 50px; border-radius: 10px; background: var(--navy); color: var(--white); display: grid; place-items: center; flex: none; }
.contact-info .icon svg { width: 24px; height: 24px; }
.contact-info strong { display: block; font-family: var(--font-head); text-transform: uppercase; color: var(--navy); letter-spacing: .04em; }
.contact-info a { text-decoration: none; }
.emergency { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 24px; margin-top: 10px; border-left: 6px solid var(--red); }
.emergency h3 { color: var(--white); margin-bottom: 6px; }
.emergency p { color: #c3cee0; margin: 0 0 12px; }

/* ---------- Footer ---------- */
.footer { background: #071a33; color: #9fb0c8; padding: 70px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer h4 { color: var(--white); font-size: 1.05rem; margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { color: #c3cee0; text-decoration: none; }
.footer a:hover { color: var(--white); }
.footer .logo { margin-bottom: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 50px; padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

/* Sticky mobile call button */
.mobile-call {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  background: var(--red); color: var(--white); text-decoration: none; text-align: center;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  padding: 15px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4, .trust .container { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    position: fixed; inset: 78px 0 auto 0; background: var(--navy); flex-direction: column; align-items: stretch;
    gap: 0; padding: 10px 4% 24px; transform: translateY(-120%); transition: transform .3s; box-shadow: 0 10px 20px rgba(0,0,0,.3);
  }
  .nav.open { transform: none; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav .btn { margin-top: 14px; }
  .hero .container, .grid-2, .grid-3, .service-row, .contact-grid { grid-template-columns: 1fr; }
  .service-row:nth-child(even) .visual { order: 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .hero .container { padding: 70px 0 80px; }
  .mobile-call { display: block; }
  body { padding-bottom: 70px; }
  .topbar .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .grid-4, .trust .container, .gallery, .footer-grid, .form-grid.two { grid-template-columns: 1fr; }
  .logo-text strong { font-size: 1.1rem; }
}
