:root {
  --nav-top: 126px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-soft: 0 12px 35px rgba(21, 23, 25, .08);
  --shadow-strong: 0 24px 65px rgba(21, 23, 25, .16);
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header__inner {
  position: relative;
}

.mobile-nav-quote {
  display: none;
}

.nav-toggle {
  position: relative;
  z-index: 120;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s ease;
}

.nav-toggle:hover {
  background: var(--soft);
}

.nav-toggle > span:not(.screen-reader-text) {
  transform-origin: center;
  transition: transform .22s ease, opacity .18s ease;
}

.nav-toggle[aria-expanded="true"] > span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] > span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] > span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.text-link--light {
  color: #fff;
}

.section-action {
  margin-top: 36px;
}

.button-row--center {
  justify-content: center;
}

.service-card--image {
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: #16191c;
}

.service-card--image::before,
.service-card--image::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
}

.service-card--image::before {
  background: var(--card-image) center / cover no-repeat;
  transition: transform .35s ease;
}

.service-card--image::after {
  z-index: -1;
  background: linear-gradient(180deg, rgba(12, 14, 16, .3), rgba(12, 14, 16, .95));
}

.service-card--image:hover::before {
  transform: scale(1.035);
}

.service-card--image p,
.service-card--image .text-link {
  color: #fff;
}

.before-after-grid,
.winter-grid,
.contact-layout,
.quote-layout {
  display: grid;
  gap: clamp(35px, 6vw, 82px);
  align-items: center;
}

.before-after-grid {
  grid-template-columns: .75fr 1.25fr;
}

.before-after-copy p:not(.eyebrow) {
  color: var(--muted);
}

.before-after-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.before-after-pair figure,
.winter-photo,
.service-project-photo {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius);
  background: #ddd;
  box-shadow: var(--shadow-soft);
}

.before-after-pair img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.before-after-pair figcaption {
  position: absolute;
  left: 13px;
  bottom: 13px;
  padding: 7px 12px;
  border-radius: 6px;
  background: rgba(15, 16, 18, .9);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.page-hero--media {
  position: relative;
  isolation: isolate;
  min-height: 480px;
  display: flex;
  align-items: center;
  background: var(--page-image) center / cover no-repeat;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 12, 14, .94), rgba(10, 12, 14, .7) 65%, rgba(10, 12, 14, .35));
}

.page-hero .button-row {
  margin-top: 26px;
}

.service-project-photo {
  margin-top: 48px;
}

.service-project-photo img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.service-project-photo figcaption {
  padding: 13px 17px;
  background: var(--ink);
  color: #fff;
  font-size: .84rem;
}

.quote-card hr {
  margin: 25px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.related-grid,
.services-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-grid > a,
.hub-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 7px 22px rgba(20, 20, 20, .045);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.related-grid > a {
  padding: 28px;
}

.related-grid > a:hover,
.hub-card:hover {
  transform: translateY(-4px);
  border-color: #c5c1bb;
  box-shadow: var(--shadow-soft);
}

.related-grid span,
.hub-card__kicker {
  color: var(--red);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.related-grid h3,
.hub-card h3 {
  margin-top: 12px;
}

.related-grid p,
.hub-card p {
  color: var(--muted);
  font-size: .94rem;
}

.related-grid strong {
  color: var(--red);
}

.related-actions {
  margin-top: 34px;
}

.hub-card__image {
  display: block;
  overflow: hidden;
  background: #ddd;
}

.hub-card__image img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform .35s ease;
}

.hub-card:hover .hub-card__image img {
  transform: scale(1.03);
}

.hub-card__body {
  display: block;
  padding: 26px;
}

.services-hub-grid--featured .hub-card:first-child {
  grid-column: span 2;
}

.services-hub-grid--featured .hub-card:first-child .hub-card__image img {
  height: 300px;
}

.winter-grid {
  grid-template-columns: 1fr .9fr;
}

.winter-grid > div > p:not(.eyebrow) {
  color: #c9ccce;
}

.winter-photo img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.contact-layout {
  grid-template-columns: .85fr 1.15fr;
  align-items: start;
}

.contact-action-list {
  display: grid;
  gap: 11px;
  margin: 34px 0;
}

.contact-action-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}

.contact-action-list a:hover {
  border-color: var(--ink);
  background: var(--soft);
}

.contact-action-list span {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
}

.contact-action-list strong {
  text-align: right;
}

.contact-social {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.contact-social h3 {
  font-size: 1.15rem;
}

.contact-social p {
  margin-bottom: .55em;
}

.contact-social a {
  color: var(--red);
  font-weight: 800;
}

.form-panel {
  padding: clamp(28px, 5vw, 50px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--soft);
  box-shadow: var(--shadow-soft);
}

.form-panel h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.form-panel a {
  color: var(--red);
  font-weight: 800;
}

.quote-layout {
  grid-template-columns: 1.2fr .8fr;
  align-items: start;
}

.quote-expectations {
  position: sticky;
  top: 118px;
}

.expectation-list {
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.expectation-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
  margin-bottom: 22px;
}

.expectation-list li > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

.expectation-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.quote-help {
  padding: 25px;
  border-radius: var(--radius);
  background: var(--soft);
}

.quote-help p {
  margin: 4px 0 16px;
}

.gallery-card__open:focus-visible,
.gallery-filter button:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.gallery-lightbox__close {
  display: grid;
  place-items: center;
  line-height: 1;
}

.site-footer a,
.topbar a {
  transition: color .2s ease;
}

@media (max-width: 980px) {
  body.nav-open::before {
    position: fixed;
    inset: var(--nav-top) 0 calc(64px + env(safe-area-inset-bottom));
    z-index: 98;
    background: rgba(9, 11, 13, .58);
    content: "";
    backdrop-filter: blur(2px);
  }

  .site-nav {
    position: fixed;
    inset: var(--nav-top) 0 calc(64px + env(safe-area-inset-bottom)) auto;
    z-index: 110;
    width: min(88vw, 420px);
    overflow-y: auto;
    padding: 20px 22px 28px;
    background: #fff;
    box-shadow: -18px 20px 45px rgba(0, 0, 0, .2);
    transform: translateX(110%);
    visibility: hidden;
    transition: transform .24s ease, visibility 0s linear .24s;
    overscroll-behavior: contain;
  }

  .site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .site-nav__list {
    margin-bottom: 18px;
  }

  .site-nav a {
    min-height: 50px;
    display: flex;
    align-items: center;
  }

  .mobile-nav-quote {
    display: flex;
    width: 100%;
    color: #fff !important;
  }

  .before-after-grid,
  .winter-grid,
  .contact-layout,
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .related-grid,
  .services-hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote-expectations {
    position: static;
  }
}

@media (max-width: 680px) {
  .hero__actions .btn {
    width: 100%;
  }

  .page-hero--media {
    min-height: 430px;
    background-position: 60% center;
  }

  .page-hero__overlay {
    background: linear-gradient(90deg, rgba(10, 12, 14, .94), rgba(10, 12, 14, .67));
  }

  .before-after-pair {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .before-after-pair img {
    height: 260px;
  }

  .related-grid,
  .services-hub-grid {
    grid-template-columns: 1fr;
  }

  .services-hub-grid--featured .hub-card:first-child {
    grid-column: auto;
  }

  .services-hub-grid--featured .hub-card:first-child .hub-card__image img,
  .hub-card__image img,
  .winter-photo img {
    height: 260px;
  }

  .contact-action-list a {
    display: block;
  }

  .contact-action-list strong {
    display: block;
    margin-top: 3px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .form-panel {
    margin-inline: -4px;
    border-radius: var(--radius);
  }

  .related-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .nav-toggle > span:not(.screen-reader-text) {
    transition: none !important;
  }
}

/* Services hub: targeted premium refinement */
.services-hub {
  --service-accent: #17324a;
  position: relative;
}

.services-hub--roofing {
  background: linear-gradient(180deg, #fff 0%, #f7f9fb 100%);
}

.services-hub--exterior {
  --service-accent: #244d63;
  background: #f0f4f7;
}

.services-hub--foundation {
  --service-accent: #315b50;
  border-block: 1px solid #dfe6ea;
  background: linear-gradient(135deg, #fafcfd 0%, #f1f5f4 100%);
}

.services-hub .section-heading h2 {
  color: #132b40;
}

.services-hub .section-heading > p {
  max-width: 570px;
}

.services-hub-grid {
  align-items: stretch;
  gap: 22px;
}

.services-hub .hub-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  border-color: #d7dfe4;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(19, 43, 64, .065);
}

.services-hub .hub-card:hover {
  border-color: #9babb7;
  box-shadow: 0 18px 40px rgba(19, 43, 64, .12);
}

.services-hub .hub-card:focus-visible {
  border-color: var(--service-accent);
}

.services-hub .hub-card__image {
  aspect-ratio: 16 / 10;
  background: #e7edf1;
}

.services-hub .hub-card__image img,
.services-hub-grid--featured .hub-card:first-child .hub-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services-hub .hub-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px;
}

.services-hub .hub-card__kicker {
  color: var(--service-accent);
}

.services-hub .hub-card h3 {
  color: #132b40;
  font-size: 1.42rem;
}

.services-hub .hub-card p {
  flex: 1;
  line-height: 1.58;
}

.services-hub .hub-card .text-link {
  align-self: flex-start;
  margin-top: 8px;
  color: var(--service-accent);
}

.services-hub .hub-card--no-media .hub-card__body {
  position: relative;
  min-height: 278px;
  justify-content: flex-start;
  padding-top: 66px;
}

.services-hub .hub-card--no-media .hub-card__body::before {
  position: absolute;
  top: 30px;
  left: 28px;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--service-accent);
  content: "";
}

.winter-services {
  border-top: 4px solid #17324a;
}

@media (max-width: 680px) {
  .services-hub-grid {
    gap: 16px;
  }

  .services-hub .hub-card__body {
    padding: 24px;
  }

  .services-hub .hub-card--no-media .hub-card__body {
    min-height: 225px;
    padding-top: 58px;
  }

  .services-hub .hub-card--no-media .hub-card__body::before {
    top: 26px;
    left: 24px;
  }
}
