:root {
  --navy: #171258;
  --blue: #0f95cf;
  --blue-dark: #0b65a6;
  --orange: #f36a21;
  --accent: #f36a21;
  --ink: #151827;
  --muted: #626a78;
  --line: #d9dee7;
  --soft: #f4f7fb;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(23, 18, 88, 0.12);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1160px, calc(100% - 32px));
  min-height: 128px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: clamp(170px, 18vw, 245px);
  height: 115px;
  object-fit: contain;
}

.header-phone {
  justify-self: end;
  font-weight: 800;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  color: #05070f;
}

.button,
.menu-trigger,
button,
input,
select,
textarea {
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.15rem;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: var(--white);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.button:hover,
.button:focus-visible {
  background: #d95614;
}

.button.secondary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark) 52%, var(--navy));
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: linear-gradient(135deg, #14aee8, var(--blue-dark) 48%, #121056);
}

.button.ghost {
  color: var(--navy);
  background: transparent;
  border: 1px solid rgba(23, 18, 88, 0.3);
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.1);
}

.button.ghost:hover,
.button.ghost:focus-visible {
  color: var(--white);
  background: var(--navy);
}

.menu-wrap {
  position: relative;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 46px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 25px;
  height: 3px;
  background: currentColor;
  border-radius: 99px;
  content: "";
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.mega-menu {
  position: absolute;
  right: 0;
  top: 100%;
  display: none;
  width: min(760px, calc(100vw - 32px));
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid rgba(23, 18, 88, 0.12);
}

.mega-menu.is-open {
  display: grid;
}

@media (hover: hover) and (min-width: 941px) {
  .menu-wrap:hover .mega-menu,
  .menu-wrap:focus-within .mega-menu {
    display: grid;
  }
}

.mega-panel {
  min-height: 282px;
  background: rgba(255, 255, 255, 0.76);
}

.mega-links {
  border-right: 2px solid rgba(23, 18, 88, 0.18);
}

.mega-panel a,
.mega-category {
  min-height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.22);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.mega-panel a:hover,
.mega-panel a:focus-visible,
.mega-category:hover,
.mega-category:focus-visible,
.mega-category.is-active {
  background: var(--accent);
  color: var(--white);
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 650px;
  display: block;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.86), rgba(8, 7, 26, 0.68) 46%, rgba(8, 7, 26, 0.4)),
    url("/assets/images/quality-roofing-experts-home-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.6rem) 0 4.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.55rem, 4.45vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.25;
}

.hero p {
  max-width: 690px;
  margin: 1.3rem 0 0;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.split > div:first-child h2 {
  max-width: 660px;
  font-size: clamp(1.85rem, 2.55vw, 2.55rem);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.section {
  padding: clamp(3.8rem, 7vw, 6.5rem) 0;
}

.section.soft {
  background: var(--soft);
}

.section.dark {
  background: var(--navy);
  color: var(--white);
}

.section.dark h2,
.section.dark h3 {
  color: var(--white);
}

.section.dark .muted {
  color: rgba(255, 255, 255, 0.78);
}

.section.dark .card {
  color: var(--ink);
}

.section.dark .card h3 {
  color: var(--navy);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-head p,
.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  min-height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.card.featured {
  border-top: 5px solid var(--orange);
}

.card p {
  color: var(--muted);
}

.card .placeholder-image + h3 {
  margin-top: 1.15rem;
}

.card-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
}

.card-image + h3 {
  margin-top: 0;
  padding-top: 0.9rem;
}

.card-link {
  display: inline-flex;
  margin-top: 0.3rem;
  color: var(--accent);
  font-weight: 900;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}

.area-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 900;
}

.area-pin {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 3px solid var(--accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.area-pin::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.area-card span:last-child {
  min-width: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.placeholder-image {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 1.3rem;
  border: 1px dashed rgba(23, 18, 88, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 149, 207, 0.16), rgba(243, 106, 33, 0.14)),
    var(--soft);
  color: var(--navy);
  font-weight: 900;
  text-align: center;
}

.feature-image {
  display: block;
  width: 100%;
  min-height: 360px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.grid.four .placeholder-image {
  min-height: 0;
  aspect-ratio: 4 / 3;
  width: 100%;
}

.map-placeholder {
  position: relative;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  line-height: 0;
}

.map-placeholder::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(243, 106, 33, 0.14);
}

.map-placeholder span {
  position: absolute;
  inset: auto 1.5rem 1.5rem;
}

.map-placeholder:has(iframe)::before,
.map-placeholder:has(iframe) span {
  display: none;
}

.map-placeholder iframe {
  display: block;
  width: 100%;
  height: 450px;
  min-height: 0;
  border: 0;
}

.check-list {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.7rem;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.08rem;
  width: 1.1rem;
  height: 1.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  content: "✓";
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
}

.process {
  counter-reset: step;
}

.process .card {
  position: relative;
  padding-top: 4.25rem;
}

.process .card::before {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  counter-increment: step;
  content: counter(step);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 900;
}

.page-hero {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background:
    linear-gradient(90deg, rgba(23, 18, 88, 0.96), rgba(23, 18, 88, 0.78)),
    linear-gradient(135deg, var(--navy), var(--blue-dark));
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.roof-replacement-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-roof-replacement-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.residential-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-residential-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.shingle-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-shingle-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.tile-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-tile-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.metal-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-metal-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.roof-repair-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-roof-repair-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.wood-shake-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-wood-shake-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.gutters-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-gutters-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.siding-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-siding-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.windows-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-windows-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.solar-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-solar-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.commercial-hero {
  background:
    linear-gradient(90deg, rgba(8, 7, 26, 0.84), rgba(8, 7, 26, 0.66) 48%, rgba(8, 7, 26, 0.36)),
    url("/assets/images/quality-roofing-experts-commercial-hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.page-hero h1 {
  max-width: 890px;
}

.page-hero p {
  max-width: 760px;
  font-size: 1.18rem;
}

.page-hero .eyebrow,
.page-hero h1 {
  color: var(--white);
}

.cta-band {
  padding: clamp(2.4rem, 5vw, 4rem) 0;
  background: var(--accent);
  color: var(--white);
}

.cta-band .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.cta-band .eyebrow,
.cta-band h2 {
  margin: 0;
}

.cta-band .eyebrow {
  color: var(--white);
}

.cta-band .container > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta-band h2 {
  color: var(--white);
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1rem 1.1rem;
}

.faq details + details {
  margin-top: 0.75rem;
}

.faq summary {
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 2rem;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.lead-form-card {
  padding: 1rem;
}

.lead-form-embed {
  width: 100%;
  height: 666px;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--navy);
  font-weight: 900;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.8rem;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.notice {
  border-left: 5px solid var(--orange);
  background: #fff8f3;
  padding: 1rem;
  color: #513323;
}

.notice-link {
  display: block;
  text-decoration: none;
}

.notice-link:hover,
.notice-link:focus-visible {
  color: var(--navy);
  background: #fff1e8;
}

.site-footer {
  background: #08071a;
  color: var(--white);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  width: 100px;
  margin: 0 0 1rem;
}

.site-footer h2,
.site-footer h3 {
  color: var(--white);
}

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer h3 + ul {
  padding-top: 10px;
}

.site-footer li + li {
  margin-top: 0.4rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #ffb084;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

@media (max-width: 940px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: 78px;
  }

  .header-phone,
  .header-cta {
    display: none;
  }

  .mega-menu {
    position: fixed;
    inset: 78px 16px auto 16px;
    width: auto;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    min-height: 620px;
  }

  .section-head,
  .split,
  .contact-panel,
  .cta-band .container {
    grid-template-columns: 1fr;
  }

  .grid,
  .grid.four,
  .grid.two,
  .area-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .brand img {
    width: 165px;
    height: 58px;
  }

  .mega-menu.is-open {
    display: block;
    max-height: calc(100vh - 98px);
    overflow: auto;
  }

  .mega-panel {
    min-height: 0;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    min-height: auto;
    margin: 2rem auto 3rem;
  }

  .grid,
  .grid.four,
  .grid.two,
  .area-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
