/* Matrix Roofing Northwest - black #111, orange #E87500, white */

:root {
  --black: #111111;
  --orange: #E87500;
  --orange-dark: #c46300;
  --white: #ffffff;
  --paper: #f6f6f6;
  --ink: #111111;
  --muted: #5c5c5c;
  --line: #e4e4e4;
  --wa: #128c7e;
  --success: #1f6b4a;
  --error: #b42318;
  --header-h: 92px;
  --promo-h: 34px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Oswald", system-ui, sans-serif;
  --container: 1140px;
  --radius: 4px;
  --shadow: 0 12px 32px rgba(17, 17, 17, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.12rem;
  line-height: 1.65;
  color: #2a2a2a;
  background: var(--white);
}
body.nav-open, body.lightbox-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-dark); }
a:hover { color: var(--orange); }
h1, h2, h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--black);
  margin: 0 0 0.5em;
  line-height: 1.12;
}
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-family: var(--font); text-transform: none; font-size: 1.15rem; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 760px); }
.skip-link { position: absolute; left: 1rem; top: -80px; background: var(--orange); color: #fff; padding: 0.6rem 1rem; z-index: 200; }
.skip-link:focus { top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.25rem; font: 700 1rem var(--font);
  border: 2px solid transparent; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.btn-secondary:hover { background: #fff; color: var(--black); }
.btn-outline { background: transparent; color: var(--black); border-color: var(--black); }
.btn-outline:hover { background: var(--black); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-block { width: 100%; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }

.float-actions { position: fixed; right: 1rem; bottom: 1rem; z-index: 90; display: flex; flex-direction: column; gap: 0.6rem; }
.float-btn { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow); text-decoration: none; }
.float-call { background: var(--black); }
.float-wa { background: var(--wa); }

.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.promo-bar {
  background: var(--orange);
  color: #fff;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: var(--promo-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
}
.promo-bar a {
  color: #fff;
  text-decoration: none;
}
.promo-bar a:hover {
  text-decoration: underline;
}
.header-bar {
  display: flex; justify-content: space-between; gap: 1rem;
  width: min(100% - 2rem, var(--container)); margin-inline: auto;
  padding: 0.4rem 0; font-size: 0.88rem; font-weight: 600; color: #666;
  border-bottom: 1px solid var(--line);
}
.header-bar a { color: var(--orange-dark); text-decoration: none; }
.header-inner {
  width: min(100% - 2rem, var(--container)); margin-inline: auto;
  min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo-img {
  width: auto;
  height: auto;
  max-height: 78px;
  max-width: min(220px, 56vw);
  object-fit: contain;
}
.logo-on-dark {
  background: #fff;
  padding: 0.4rem 0.55rem;
  border-radius: 4px;
}
.site-nav > ul { display: flex; align-items: center; gap: 0.1rem; }
.site-nav a { text-decoration: none; color: var(--black); font-weight: 600; font-size: 0.95rem; padding: 0.5rem 0.65rem; }
.site-nav a:hover, .site-nav a.is-active, .site-nav a[aria-current="page"] { color: var(--orange); }
.nav-cta { background: var(--orange) !important; color: #fff !important; margin-left: 0.35rem; padding: 0.55rem 0.9rem !important; }
.nav-cta:hover { background: var(--orange-dark) !important; color: #fff !important; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--black); }

.has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.sub-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  transform: rotate(45deg) translate(-2px, -2px);
}
.sub-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.4rem 0;
  z-index: 120;
}
.sub-nav a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  white-space: nowrap;
}
.has-sub:hover .sub-nav,
.has-sub:focus-within .sub-nav,
.has-sub.is-open .sub-nav { display: block; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 980px) {
  .header-bar { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: calc(var(--promo-h) + var(--header-h)) 0 0 0; background: #fff;
    padding: 1.2rem; transform: translateX(100%); transition: transform 0.3s var(--ease); overflow: auto;
  }
  .site-nav.is-open { transform: none; }
  .site-nav > ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 0.9rem 1rem; font-size: 1.1rem; }
  .nav-cta { margin: 0.5rem 0 0; text-align: center; }
  .has-sub { flex-wrap: wrap; }
  .has-sub > .nav-link { flex: 1; }
  .sub-toggle { display: inline-flex; }
  .has-sub.is-open .sub-toggle::before { transform: rotate(225deg) translate(-2px, -2px); }
  .sub-nav {
    position: static;
    display: none;
    width: 100%;
    border: 0;
    box-shadow: none;
    background: var(--paper);
    padding: 0.2rem 0 0.4rem;
  }
  .has-sub.is-open .sub-nav { display: block; }
  .sub-nav a { padding: 0.7rem 1rem 0.7rem 1.4rem; white-space: normal; }
}

.hero { position: relative; min-height: min(82vh, 700px); display: flex; align-items: flex-end; color: #fff; background: var(--black); }
.hero-media { position: absolute; inset: 0; background: #111 center / cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,17,17,.25), rgba(17,17,17,.82)); }
.hero-inner { position: relative; z-index: 1; padding: 5.5rem 0 3rem; }
.eyebrow { margin: 0 0 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; font-size: 0.86rem; color: var(--orange); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero-lead { max-width: 38rem; font-size: 1.2rem; color: rgba(255,255,255,.88); }

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-band { background: var(--paper); }
.section-kicker { margin: 0 0 0.4rem; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.kicker-light { color: #ffc27a; }
.section-head { max-width: 640px; margin-bottom: 1.8rem; }
.section-lead { color: var(--muted); }
.section-more { margin-top: 1.6rem; }

.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.service-card { background: #fff; border: 1px solid var(--line); padding: 0 0 1.1rem; display: flex; flex-direction: column; }
.service-card-media { display: block; overflow: hidden; }
.service-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.service-card h2, .service-card h3 { margin: 0.9rem 1rem 0.35rem; }
.service-card h2 a, .service-card h3 a { color: var(--black); text-decoration: none; }
.service-card p { margin: 0 1rem 0.8rem; color: var(--muted); flex: 1; }
.service-link { margin: 0 1rem; font-weight: 700; text-decoration: none; color: var(--orange-dark); }

.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.trust-list { display: grid; gap: 0.9rem; }
.trust-list li { padding-left: 0; }
.trust-list strong { display: block; color: var(--black); }

.emergency-band { background: var(--black); color: #fff; padding: 2.6rem 0; }
.emergency-inner { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; }
.emergency-band h2 { color: #fff; }
.emergency-band p { color: rgba(255,255,255,.8); margin: 0; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.gallery-item[hidden] { display: none !important; }
.gallery-item { position: relative; padding: 0; border: 0; background: var(--black); cursor: pointer; display: block; text-decoration: none; color: #fff; overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.7rem; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-weight: 700; font-size: 0.9rem; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.2rem; }
.filter-btn { border: 1px solid var(--line); background: #fff; padding: 0.45rem 0.75rem; font: 600 0.9rem var(--font); cursor: pointer; }
.filter-btn.is-active, .filter-btn:hover { background: var(--black); color: #fff; border-color: var(--black); }

.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.review-card { margin: 0; background: #fff; border-top: 3px solid var(--orange); padding: 1.2rem; }
.review-card-light { border: 1px solid var(--line); border-top: 3px solid var(--orange); }
.review-card .stars { color: var(--orange); letter-spacing: 0.12em; margin-bottom: 0.65rem; font-size: 1.1rem; line-height: 1; }
.review-empty { background: #fff; border: 1px solid var(--line); padding: 1.4rem; }

.contact-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2rem; align-items: start; }
.contact-phone a, .contact-email a { color: var(--black); text-decoration: none; font-weight: 700; font-size: 1.35rem; }
.contact-phone a { font-size: 1.8rem; color: var(--orange-dark); }
.map-wrap { margin-top: 1.2rem; min-height: 240px; background: var(--paper); }
.map-wrap iframe { width: 100%; height: 240px; border: 0; }

.page-hero { background: var(--black); color: #fff; padding: 3.2rem 0 2.4rem; }
.page-hero h1, .page-hero p { color: #fff; }
.page-hero-photo { background: #111 center / cover no-repeat; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.check-list { margin: 1rem 0 1.3rem; }
.check-list li { position: relative; padding: 0.3rem 0 0.3rem 1.5rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.7rem; width: 0.65rem; height: 0.32rem; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); }

.service-layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 2rem; align-items: start; }
.service-figure { margin: 0 0 1.4rem; }
.service-figure img { width: 100%; }
.service-aside { display: grid; gap: 1rem; }
.aside-card { background: var(--paper); padding: 1.2rem; border-top: 3px solid var(--orange); }
.aside-links { display: grid; gap: 0.4rem; }
.aside-links a { color: var(--black); text-decoration: none; font-weight: 600; }
.aside-links a:hover { color: var(--orange); }
.cta-inline { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.95rem; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; font: inherit; border: 1px solid #ccc; padding: 0.7rem; background: #fff;
}
.form-field textarea { min-height: 140px; }
.form-field small { color: var(--muted); font-size: 0.85rem; }
.checkbox-field { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; }
.hp-field { position: absolute; left: -9999px; }
.form-actions { margin-top: 1.1rem; }
.form-status { margin-top: 0.8rem; padding: 0.75rem; font-weight: 600; }
.form-status.is-pending { background: var(--paper); }
.form-status.is-success { background: #e5f4ec; color: var(--success); }
.form-status.is-error { background: #fdecea; color: var(--error); }

.site-footer { background: var(--black); color: rgba(255,255,255,.75); padding-top: 2.8rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr 1fr; gap: 1.6rem; padding-bottom: 2rem; }
.footer-heading { color: #fff; font-size: 1rem; }
.footer-links, .footer-contact { display: grid; gap: 0.35rem; }
.footer-links a, .footer-contact a, .footer-bottom a { color: rgba(255,255,255,.75); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-size: 0.92rem; }
.legal-content { max-width: 760px; }
.legal-content ul { list-style: disc; padding-left: 1.2rem; margin: 0 0 1rem; }
.legal-content li { margin-bottom: 0.3rem; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(17,17,17,.92); display: flex; align-items: center; justify-content: center; padding: 1.4rem; }
.lightbox[hidden] { display: none; }
.lightbox-inner { max-width: min(960px, 100%); }
.lightbox-inner img { max-height: 78vh; margin-inline: auto; }
.lightbox-caption { color: #ddd; text-align: center; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 2rem; cursor: pointer; }

@media (max-width: 1024px) {
  .services-grid, .gallery-grid, .reviews-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .about-grid, .contact-split, .service-layout, .trust-grid, .emergency-inner { grid-template-columns: 1fr; }
  .emergency-inner { align-items: flex-start; flex-direction: column; }
  .footer-bottom-inner { flex-direction: column; }
}
@media (max-width: 640px) {
  .services-grid, .gallery-grid, .reviews-grid, .form-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .contact-split .btn { width: 100%; }
}
