@charset "UTF-8";

/* ============================================================
   Katy Roofing Company TX — main.css
   Palette: shingle slate, storm blue, copper flashing, limestone.
   All shared layout lives here; each page's content is plain HTML.
   ============================================================ */

:root {
  --ink: #23282d;
  --storm: #2f3f4c;
  --storm-deep: #25323c;
  --copper: #a85e32;
  --copper-deep: #8a4a26;
  --copper-soft: #f3e3d7;
  --limestone: #f6f5f2;
  --paper: #ffffff;
  --line: #dfe0e2;
  --quiet: #5b6670;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Segoe UI", Arial, sans-serif;

  --radius: 6px;
  --shadow: 0 10px 30px rgba(35, 40, 45, 0.12);
  --shadow-lift: 0 16px 40px rgba(35, 40, 45, 0.18);

  --wrap: 1160px;
  --gutter: 24px;
  --section-pad: clamp(64px, 9vw, 104px);
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--storm);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

p { margin: 0 0 1em; max-width: 70ch; }

a {
  color: var(--copper-deep);
  text-decoration-color: rgba(138, 74, 38, 0.4);
  text-underline-offset: 3px;
}

a:hover { color: var(--copper); }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.5em; }

:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--storm);
  color: #fff;
  padding: 10px 18px;
  z-index: 200;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-pad) 0;
}

.section--tint { background: var(--limestone); }
.section--deep { background: var(--storm); color: #e9edf0; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep p { color: #c7d0d8; }

.lede {
  font-size: 1.15rem;
  color: var(--quiet);
  max-width: 65ch;
}

.eyebrow-rule {
  border: none;
  border-top: 3px solid var(--copper);
  width: 56px;
  margin: 0 0 18px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--line), 0 2px 12px rgba(35, 40, 45, 0.06);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark { flex: 0 0 auto; }

.brand__logo {
  flex: 0 0 auto;
  display: block;
  height: 46px;
  width: auto;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  line-height: 1;
  display: block;
}

.brand__sub {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: #b9c4cc;
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
}

.site-nav { display: flex; align-items: center; gap: 6px; }

.site-nav > li { position: relative; list-style: none; }

.site-nav { margin: 0; padding: 0; }

.nav-link,
.nav-phone {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius);
  display: block;
}

.nav-link:hover { background: var(--copper-soft); color: var(--copper-deep); }

.nav-drop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  min-width: 250px;
  padding: 10px;
  display: none;
}

.nav-drop a {
  display: block;
  padding: 9px 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
}

.nav-drop a:hover { background: var(--copper-soft); color: var(--copper-deep); }

.site-nav > li:hover > .nav-drop,
.site-nav > li:focus-within > .nav-drop { display: block; }

.nav-phone {
  background: var(--copper);
  color: #fff;
  white-space: nowrap;
}

.nav-phone:hover { background: var(--copper-deep); color: #fff; }

.nav-phone__label { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--storm);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 2;
}

.hero__copy { color: #fff; }

.hero__copy .kicker {
  color: #d9a06b;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.hero h1 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero__copy p {
  color: #c7d0d8;
  font-size: 1.08rem;
}

.hero__media {
  position: relative;
}

.hero__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.hero--home .hero__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "copy copy"
    "form media";
  gap: 24px 48px;
  padding: 64px 0;
}

.hero--home .hero__copy { grid-area: copy; }

.hero--home .hero__media {
  grid-area: media;
  min-height: 620px;
}

.hero--home .hero__media img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.hero--home .hero__form {
  grid-area: form;
  margin: 0;
  max-width: none;
}

.hero--home .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero--home .field--wide,
.hero--home .form-grid > button,
.hero--home .form-note {
  grid-column: 1 / -1;
}

/* The form card sits above (overlapping) the hero image */
.hero__form {
  position: relative;
  z-index: 5;
  margin: 0 0 -150px -40px;
}

.form-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 26px 26px 20px;
  border-top: 5px solid var(--copper);
}

.form-card h2,
.form-card h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.form-card p {
  font-size: 0.92rem;
  color: var(--quiet);
  margin-bottom: 14px;
}

.hero--stack .hero__grid {
  grid-template-columns: 1fr;
  padding-top: 56px;
}

.hero--stack .hero__form {
  margin: 0 0 -90px 0;
  max-width: 640px;
}

.hero--stack .hero__media {
  margin-top: 120px;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 4px;
  color: var(--storm);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1.5px solid #b9c0c6;
  border-radius: var(--radius);
  background: #fbfbfa;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--copper);
  outline: none;
  box-shadow: 0 0 0 3px rgba(168, 94, 50, 0.2);
}

.field textarea { resize: vertical; min-height: 84px; }

.field__error {
  display: none;
  color: #a3341f;
  font-size: 0.82rem;
  margin-top: 4px;
  font-weight: 600;
}

.field.is-invalid .field__error { display: block; }
.field.is-invalid input,
.field.is-invalid select { border-color: #a3341f; }

.form-note {
  font-size: 0.78rem;
  color: var(--quiet);
  margin: 10px 0 0;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn--copper { background: var(--copper); color: #fff; }
.btn--copper:hover { background: var(--copper-deep); color: #fff; }

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn--ghost:hover { border-color: #fff; color: #fff; }

.btn--wide { width: 100%; }

.form-success {
  display: none;
  background: #eef6ec;
  border: 1px solid #b7d3ac;
  border-radius: var(--radius);
  padding: 18px;
  font-size: 0.95rem;
}

.form-success.is-visible { display: block; }

/* ---------- Page hero (inner pages, compact) ---------- */

.page-hero {
  background: var(--storm);
  color: #fff;
  padding: 60px 0 96px;
  position: relative;
  overflow: hidden;
}

.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: start;
}

.page-hero__grid--slim {
  grid-template-columns: minmax(0, 1fr);
}

.page-hero__grid--slim > div { max-width: 720px; }

.page-hero h1 { color: #fff; margin-bottom: 10px; }

.page-hero p {
  color: #c7d0d8;
  font-size: 1.05rem;
  max-width: 58ch;
}

.breadcrumbs {
  font-size: 0.82rem;
  margin-bottom: 18px;
  color: #9fb0bd;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.breadcrumbs a { color: #d9a06b; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { color: #9fb0bd; }

/* ---------- Ledger (services list, no card grid) ---------- */

.ledger {
  border-top: 1px solid var(--line);
}

.ledger__row {
  display: grid;
  grid-template-columns: 64px 1fr 2fr auto;
  gap: 22px;
  align-items: start;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
}

.ledger__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--copper);
}

.ledger__body h3 { margin-bottom: 6px; }
.ledger__body p { margin: 0; color: var(--quiet); font-size: 0.98rem; }

.ledger__link {
  font-weight: 700;
  color: var(--copper-deep);
  text-decoration: none;
  white-space: nowrap;
  padding-top: 6px;
}

.ledger__link:hover { color: var(--copper); text-decoration: underline; }

/* ---------- Split content blocks ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.split__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}

.split--media-right .split__media { order: 2; }
.split--media-right .split__content { order: 1; }

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  border-top: 3px solid var(--copper);
  padding-top: 16px;
  margin: 0;
}

.steps li h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--copper);
  display: block;
  margin-bottom: 8px;
}

.steps p { font-size: 0.95rem; color: var(--quiet); margin: 0; }

/* ---------- Areas strip ---------- */

.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.areas-grid li { margin: 0; }

.area-chip {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--copper);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  font-weight: 600;
  color: var(--storm);
}

.area-chip span {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--quiet);
  margin-top: 2px;
}

.area-chip:hover {
  border-color: var(--copper);
  box-shadow: var(--shadow);
}

/* ---------- Map ---------- */

.map-frame {
  position: relative;
  padding-bottom: 52%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--limestone);
}

.map-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width:100%;
  height: 100%;
  border: 0;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--copper);
  color: #fff;
  padding: clamp(48px, 7vw, 72px) 0;
}

.cta-band h2 { color: #fff; margin-bottom: 8px; }

.cta-band p {
  color: #f6e3d5;
  font-size: 1.08rem;
  max-width: 60ch;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
}

.cta-band .btn--ghost { border-color: rgba(255, 255, 255, 0.7); }

.cta-band a.btn--paper,
.btn--paper {
  background: var(--paper);
  color: var(--copper-deep);
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 820px;
  margin: 0;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq-item h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--storm);
  margin-bottom: 8px;
}

.faq-item p { margin: 0; color: var(--quiet); }

/* ---------- Blog cards ---------- */

.post-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-row article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-row img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.post-row .post-body { padding: 20px 22px 26px; }

.post-row h3 { font-size: 1.2rem; margin-bottom: 6px; }

.post-row p { font-size: 0.95rem; color: var(--quiet); margin: 0 0 12px; }

.post-row a { font-weight: 700; text-decoration: none; }

.post-meta {
  font-size: 0.8rem;
  color: var(--quiet);
  margin-bottom: 8px;
}

/* ---------- Legal pages ---------- */

.legal-body { max-width: 760px; }

.legal-body h2 {
  font-size: 1.35rem;
  margin: 34px 0 10px;
}

.legal-body h2:first-child { margin-top: 0; }

.legal-body p { color: var(--quiet); }

.legal-body a { color: var(--copper-deep); font-weight: 600; }

.section-note {
  font-size: 0.95rem;
  color: var(--quiet);
  max-width: 72ch;
  margin-top: 14px;
}

/* ---------- Plain (non-link) chips for card-style lists ---------- */

.area-chip--plain {
  cursor: default;
  display: block;
  background: var(--paper);
  color: var(--storm);
  font-weight: 700;
  text-decoration: none;
  padding: 18px 20px;
}

.area-chip--plain:hover { border-color: var(--line); background: var(--paper); }

.area-chip--plain span {
  display: block;
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--quiet);
  margin-top: 4px;
}

.area-chip__num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--copper);
  letter-spacing: 0.06em;
  margin-right: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--storm-deep);
  color: #b9c4cc;
  padding: clamp(56px, 8vw, 80px) 0 32px;
  border-top: 5px solid var(--copper);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}

.site-footer h2,
.site-footer h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 16px;
}

.footer-brand p { max-width: 40ch; }

.footer-brand .brand__logo {
  height: 44px;
  background: #fff;
  padding: 6px 9px;
  border-radius: 8px;
  box-sizing: content-box;
  margin-bottom: 4px;
}

.footer-contact { list-style: none; padding: 0; margin: 16px 0 0; }
.footer-contact li { margin-bottom: 10px; }

.footer-contact a,
.footer-links a {
  color: #d5dce2;
  text-decoration: none;
}

.footer-contact a:hover,
.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d5dce2;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.social-row a:hover { border-color: var(--copper); color: #fff; }

.social-row svg { width: 15px; height: 15px; fill: currentColor; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: #8fa0ac;
}

.footer-bottom p { margin: 0; max-width: none; }

/* ---------- Utility ---------- */

.text-center { text-align: center; }

.muted { color: var(--quiet); }

.stack-sm > * + * { margin-top: 0.75em; }

/* ---------- Motion ---------- */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero__copy,
.hero__form {
  animation: riseIn 0.5s ease-out both;
}

.hero__form { animation-delay: 0.12s; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero__grid,
  .page-hero__grid,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero--home .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "media"
      "form";
    gap: 24px;
    padding: 40px 0 56px;
  }

  .hero--home .hero__copy { align-self: auto; }
  .hero.hero--home .hero__media { min-height: 0; margin-top: 0; }
  .hero--home .hero__media img {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 10;
  }
  .hero--home .hero__form { margin: 0; max-width: none; }

  .hero__form { margin: 0 0 -80px 0; max-width: 560px; }
  .hero__media { margin-top: 110px; }

  /* Preserve stack layout at mobile */
  .hero--stack .hero__grid {
    padding-top: 40px;
  }
  .hero--stack .hero__form {
    margin: 0 0 -80px 0;
    max-width: 560px;
  }
  .hero--stack .hero__media {
    margin-top: 100px;
  }

  .split--media-right .split__media { order: 0; }

  .split__media { order: 0; }
  .split__content { order: 1; }

  .nav-toggle { display: inline-block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--storm-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gutter) 20px;
    gap: 2px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  }

  .site-nav.is-open { display: flex; }

  .site-nav .nav-link { color: #fff; }
  .site-nav .nav-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

  .nav-drop {
    position: static;
    display: block;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 18px;
    min-width: 0;
  }

  .nav-drop a { color: #c7d0d8; padding: 8px 10px; }

  .nav-phone { text-align: center; margin-top: 8px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .hero--home .form-grid { grid-template-columns: 1fr; }
  .hero--home .field--wide,
  .hero--home .form-grid > button,
  .hero--home .form-note { grid-column: auto; }

  .ledger__row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 4px;
  }

  .ledger__num { font-size: 1.25rem; }

  .map-frame { padding-bottom: 70%; }

  .cta-band__actions .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
