/* Shared foundation for the detailed roofing service pages. */
.service-detail-page {
  --service-accent: var(--orange);
  --service-accent-hover: var(--orange-lo);
  --service-accent-soft: rgba(240,82,30,.08);
  --service-accent-border: rgba(240,82,30,.38);
  --service-accent-shadow: rgba(240,82,30,.24);
  --service-alt: var(--bg-deep);
}
.roof-repair-page {
  --service-accent: #56636a;
  --service-accent-hover: #414d53;
  --service-accent-soft: rgba(86,99,106,.08);
  --service-accent-border: rgba(86,99,106,.34);
  --service-accent-shadow: rgba(86,99,106,.24);
}
.roof-repair-page main,
.roof-repair-page .service-mobile-call {
  --orange: var(--service-accent);
  --orange-lo: var(--service-accent-hover);
}
.service-detail-page main { overflow: clip; }
.service-detail-page .nav-service[aria-current="page"],
.service-detail-page .menu-services__inner a[aria-current="page"] { background: var(--nav-soft); }
.service-detail-page .nav-service[aria-current="page"] .nav-service__icon { color: #fff; background: var(--nav-accent); }
@media (min-width: 900px) {
  .service-detail-page .head__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hero */
.service-detail-shell {
  width: min(var(--max), 100%); margin-inline: auto;
  padding: calc(var(--header-h) + 12px) var(--gut) clamp(28px, 3vw, 44px);
}
.service-detail-crumbs { margin: 0 2px 14px; }
.service-detail-crumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font: 400 .72rem/1.4 var(--f-mono); color: var(--ink-40);
}
.service-detail-crumbs li { display: flex; align-items: center; gap: 8px; }
.service-detail-crumbs li + li::before { content: "/"; color: var(--ink-40); }
.service-detail-crumbs a { color: var(--ink-60); text-decoration: none; }
.service-detail-crumbs a:hover { color: var(--service-accent); }
.service-detail-crumbs [aria-current="page"] { color: var(--service-accent); }

.service-detail-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(760px, calc(100svh - var(--header-h) - 54px));
  border-radius: var(--r-l); background: var(--night);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.service-detail-hero__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--hero-x, 50%) var(--hero-y, 50%);
  transform: scale(1.055); animation: heroIn 1.6s var(--ease) forwards;
}
.service-detail-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(10,9,8,.95) 0%, rgba(10,9,8,.7) 46%, rgba(10,9,8,.12) 100%),
    linear-gradient(to right, rgba(10,9,8,.64) 0%, rgba(10,9,8,.06) 72%);
}
.service-detail-hero__copy {
  width: min(1180px, 100%); padding: clamp(34px, 5vw, 68px);
  padding-top: clamp(100px, 16vw, 190px); color: #fff;
  display: grid; gap: clamp(16px, 2vw, 23px);
}
.service-detail-hero__copy > * {
  opacity: 0; transform: translateY(18px); animation: riseIn .9s var(--ease) forwards;
}
.service-detail-hero__copy > *:nth-child(1) { animation-delay: .12s; }
.service-detail-hero__copy > *:nth-child(2) { animation-delay: .23s; }
.service-detail-hero__copy > *:nth-child(3) { animation-delay: .34s; }
.service-detail-hero__copy > *:nth-child(4) { animation-delay: .45s; }
.service-detail-hero__copy > *:nth-child(5) { animation-delay: .56s; }
.service-detail-hero .eyebrow { color: rgba(255,255,255,.84); display: flex; align-items: center; gap: 10px; }
.service-detail-hero__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--service-accent); flex: none; }
.service-detail-hero .h-xl { color: #fff; max-width: none; text-shadow: 0 2px 28px rgba(0,0,0,.38); }
.service-detail-hero__lede { max-width: 58ch; color: rgba(255,255,255,.88); font-size: clamp(1.05rem, 1.4vw, 1.22rem); line-height: 1.55; }
.service-detail-hero__actions { display: flex; flex-wrap: wrap; gap: 11px; }
.service-detail-hero__actions .btn { min-height: 52px; }
.service-detail-hero__actions .btn--glass { border-color: rgba(255,255,255,.38); }
.service-detail-hero__note { font: 400 .76rem/1.5 var(--f-mono); color: rgba(255,255,255,.68); }
.service-detail-hero .strip { animation-delay: .68s; }
@media (min-width: 900px) {
  .service-detail-hero__line { display: block; white-space: nowrap; }
}

/* Shared primary-button treatment */
.service-detail-page main .btn--primary,
.home-page main .btn--primary,
.service-mobile-call .btn--primary {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 52px;
  color: #fff;
  border: 1px solid var(--service-accent);
  background: var(--service-accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 9px 22px var(--service-accent-shadow, rgba(240,82,30,.24));
  transition: transform .22s var(--ease), background-color .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.service-detail-page main .btn--primary:hover,
.home-page main .btn--primary:hover,
.service-mobile-call .btn--primary:hover {
  color: #fff;
  border-color: var(--service-accent-hover, var(--orange-lo));
  background: var(--service-accent-hover, var(--orange-lo));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 13px 28px var(--service-accent-shadow, rgba(240,82,30,.3));
}
.service-detail-page main .btn--primary .btn__ico,
.home-page main .btn--primary .btn__ico,
.service-mobile-call .btn--primary .btn__ico {
  width: 31px; height: 31px; padding: 7px; flex: none; border-radius: 9px;
  color: #fff; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  transform: rotate(-3deg);
  transition: transform .22s var(--ease), background-color .22s var(--ease), border-color .22s var(--ease);
}
.service-detail-page main .btn--primary:hover .btn__ico,
.home-page main .btn--primary:hover .btn__ico {
  background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.3);
  transform: translateY(-2px) rotate(2deg);
}
.service-detail-page main .btn--glass,
.service-detail-page main .btn--ghost {
  min-height: 52px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 7px 18px rgba(20,19,17,.1);
}
.service-detail-page main .btn--glass .btn__ico,
.service-detail-page main .btn--ghost .btn__ico {
  width: 29px; height: 29px; padding: 6px; flex: none; border-radius: 9px;
  border: 1px solid currentColor; opacity: .88;
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.service-detail-page main .btn--glass:hover .btn__ico,
.service-detail-page main .btn--ghost:hover .btn__ico { opacity: 1; transform: translateX(2px); }
.service-detail-page main .btn--ghost { background: rgba(255,255,255,.45); }
.service-detail-page main .btn--ghost:hover { border-color: var(--service-accent); color: var(--service-accent); background: rgba(255,255,255,.72); }
.service-detail-page main .btn:focus-visible { outline-color: var(--service-accent); }
.service-detail-page button.way { width: 100%; text-align: left; }

/* Shared proof credentials */
.service-credentials { background: var(--bg); color: var(--ink); }
.service-credentials .head__rule { background: var(--rule); }
.service-credentials .lede { color: var(--ink-60); }
.service-credentials__grid { display: grid; border-block: 1px solid var(--rule); }
@media (min-width: 620px) { .service-credentials__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .service-credentials__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.service-credential {
  min-width: 0; padding: clamp(26px, 3.2vw, 44px) clamp(18px, 2.6vw, 34px);
  border-bottom: 1px solid var(--rule); transition: background-color .25s var(--ease);
}
.service-credential:hover { background: var(--service-accent-soft); }
@media (min-width: 620px) { .service-credential:nth-child(even) { border-left: 1px solid var(--rule); } }
@media (min-width: 1040px) { .service-credential + .service-credential { border-left: 1px solid var(--rule); } }
.service-credential__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.service-credential__icon {
  width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center;
  color: var(--service-accent); border: 1px solid var(--service-accent-border); background: var(--service-accent-soft);
  transition: background-color .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}
.service-credential:hover .service-credential__icon { background: var(--service-accent); color: #fff; transform: translateY(-2px); }
.service-credential__icon svg { width: 21px; height: 21px; }
.service-credential__k { color: var(--ink-60); font: 400 .64rem/1.3 var(--f-mono); }
.service-credential__metric {
  margin-top: clamp(28px, 3.6vw, 48px); color: var(--ink);
  font: 400 clamp(3.5rem, 6vw, 5.6rem)/.82 "Instrument Serif", Georgia, serif;
  letter-spacing: 0;
}
.service-credential__stars { display: block; margin-top: 12px; color: var(--sun); font-size: .76rem; letter-spacing: 0; }
.service-credential h3 { margin-top: 24px; color: var(--ink); font-size: 1.02rem; line-height: 1.25; letter-spacing: 0; }
.service-credential > p:last-child { margin-top: 8px; color: var(--ink-60); font-size: .87rem; line-height: 1.55; }
.service-credentials__verify {
  padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  color: var(--ink-60); font: 400 .68rem/1.5 var(--f-mono);
}
.service-credentials__verify b { color: var(--ink); font-weight: 500; }

/* Shared mobile conversion bar */
.service-mobile-call { display: none; }
@media (max-width: 899px) {
  .service-detail-page { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .service-detail-hero { min-height: 660px; }
  .service-detail-hero__actions { display: none; }
  .service-detail-hero::after {
    background: linear-gradient(to bottom, rgba(10,9,8,.46) 0%, rgba(10,9,8,.72) 42%, rgba(10,9,8,.95) 78%);
  }
  .service-detail-hero__copy { padding: 64px 24px 30px; }
  .service-detail-hero .h-xl { font-size: clamp(2.6rem, 13vw, 4rem); }
  .service-mobile-call {
    position: fixed; z-index: 90; inset: auto 0 0; display: block;
    padding: 13px var(--gut) calc(11px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(20,19,17,.16); background: #efede8;
    box-shadow: 0 -12px 34px rgba(20,19,17,.12);
  }
  .service-mobile-call__actions {
    width: min(500px, 100%); margin-inline: auto; display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(112px, .8fr); gap: 8px;
  }
  .service-mobile-call .btn {
    position: relative; width: 100%; min-height: 56px; justify-content: center; overflow: visible;
    padding-inline: 14px; border-radius: 11px; font-size: .84rem; letter-spacing: 0;
  }
  .service-mobile-call .btn--primary { color: #fff; border-color: var(--service-accent); background: var(--service-accent); }
  .service-mobile-call .btn--primary .btn__ico {
    width: 34px; height: 34px; margin-left: -4px; padding: 8px; border-radius: 9px;
    color: var(--service-accent); background: #fff; box-shadow: 0 5px 12px rgba(75,30,13,.22);
    transform: translateY(-3px) rotate(-7deg); animation: service-icon-drift 4.2s ease-in-out infinite;
  }
  .service-mobile-call .btn--ghost {
    color: var(--ink); border: 1px solid rgba(20,19,17,.2); background: rgba(255,255,255,.72);
    box-shadow: 0 5px 14px rgba(20,19,17,.08);
  }
  .service-mobile-call .btn--ghost .btn__ico { width: 21px; height: 21px; color: var(--service-accent); }
}
@keyframes service-icon-drift {
  0%, 100% { transform: translateY(-3px) rotate(-7deg); }
  50% { transform: translateY(-5px) rotate(-4deg); }
}
@media (max-width: 619px) {
  .service-credentials__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  .service-credential { display: flex; min-height: 238px; padding: 20px 14px 22px; flex-direction: column; align-items: flex-start; }
  .service-credential:nth-child(even) { border-left: 1px solid var(--rule); }
  .service-credential:nth-last-child(-n + 2) { border-bottom: 0; }
  .service-credential__top { width: 100%; align-items: flex-start; gap: 8px; }
  .service-credential__icon { width: 36px; height: 36px; }
  .service-credential__icon svg { width: 18px; height: 18px; }
  .service-credential__k { max-width: 10ch; padding-top: 3px; text-align: right; font-size: .56rem; }
  .service-credential__metric { margin-top: 22px; font-size: 2.9rem; }
  .service-credential__stars { margin-top: 9px; font-size: .66rem; }
  .service-credential h3 { margin-top: 16px; font-size: .9rem; }
  .service-credential > p:last-child { margin-top: 7px; font-size: .78rem; line-height: 1.45; }
}
@media (max-width: 360px) {
  .service-mobile-call__actions { grid-template-columns: minmax(0, 1fr) 98px; }
  .service-mobile-call .btn { padding-inline: 9px; gap: 6px; font-size: .78rem; }
  .service-mobile-call .btn--primary .btn__ico { width: 29px; height: 29px; padding: 7px; }
  .service-mobile-call__optional { display: none; }
  .service-credential { min-height: 224px; padding: 18px 11px 20px; }
  .service-credential__metric { margin-top: 19px; font-size: 2.55rem; }
  .service-credential h3 { margin-top: 14px; font-size: .84rem; }
  .service-credential > p:last-child { font-size: .73rem; }
}
@media (hover: none) {
  .service-credential:hover { background: transparent; }
  .service-credential:hover .service-credential__icon {
    color: var(--service-accent); background: var(--service-accent-soft); transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .service-detail-hero__img { animation: none !important; transform: none !important; }
  .service-detail-hero__copy > * { opacity: 1 !important; transform: none !important; }
  .service-mobile-call .btn__ico { animation: none !important; }
}

/* Repair-page tuning: the reusable shell wraps its existing signature sections. */
.repair-page { --hero-x: 50%; --hero-y: 45%; }
.repair-page #tracing .split__media img { object-position: 67% center; }
.repair-page #leaks .head { margin-bottom: clamp(34px, 5vw, 62px); }
.repair-page #process .head,
.repair-page #types .head,
.repair-page #deciding > .wrap > .split { margin-bottom: clamp(42px, 6vw, 82px); }
.repair-page .faq__list { max-width: 940px; margin-inline: auto; }
.repair-page .faq > .wrap > .head { max-width: 940px; margin-inline: auto; }
.repair-page .faq__cta { margin-top: clamp(46px, 7vw, 90px); }
@media (max-width: 899px) {
  .repair-page { --hero-x: 56%; --hero-y: 50%; }
}
