/* Shared craftsman/editorial refinement. Loaded after the existing site layers. */
:root {
  --polish-rule: rgba(38, 78, 59, 0.2);
  --polish-shadow: 0 10px 24px rgba(58, 52, 53, 0.07);
  --polish-radius: 10px;
}

.site-header {
  box-shadow: 0 2px 0 rgba(201, 183, 164, 0.22);
}

.site-header__inner { gap: 0.75rem 1rem; }

.menu-toggle {
  display: none;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  color: var(--color-deep-teal);
  background: var(--color-paper);
  border: 1px solid var(--color-deep-teal);
  border-radius: var(--polish-radius);
  font: 800 0.92rem/1 var(--font-heading);
  cursor: pointer;
}

.nav-list { gap: 0.15rem; }
.nav-list a { border-radius: 6px; }

.button {
  border-radius: var(--polish-radius);
  box-shadow: none;
}

.button--primary { background: #be382f; border-color: #a92d26; }
.button--secondary { border-color: #1e4031; }
.mobile-sticky-cta a:first-child { background: #a92d26; }

@media (hover: hover) and (pointer: fine) {
  .mobile-sticky-cta a:first-child:hover { background: #90251f; }
}

.button:focus-visible,
.menu-toggle:focus-visible,
.nav-list a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .button, .menu-toggle, .nav-list a, .service-fit-card, .conversion-steps__list li { transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease; }
  .button:hover, .menu-toggle:hover { transform: translateY(-1px); box-shadow: 0 6px 13px rgba(58, 52, 53, 0.12); }
  .button:active, .menu-toggle:active { transform: translateY(0); box-shadow: none; }
}

body.home-redesign .home-hero {
  background: var(--color-paper);
  border-left-width: 4px;
  box-shadow: 0 12px 25px rgba(58, 52, 53, 0.07);
}

body.home-redesign .home-hero::after,
body.home-redesign .home-hero::before { display: none; }
body.home-redesign .home-hero .eyebrow,
body.home-redesign .home-work-board__kicker { border-radius: 4px; }
body.home-redesign .home-hero__actions .button { box-shadow: none; }

body.home-redesign .home-work-board {
  background: var(--color-deep-teal);
  box-shadow: 0 12px 28px rgba(38, 78, 59, 0.16);
}

body.home-redesign .home-work-board::before,
body.home-redesign .home-work-board::after,
body.home-redesign .work-photo::before { display: none; }
body.home-redesign .work-photo { box-shadow: none; border-radius: 6px; }

.page-section { border-radius: 0; }
body.home-redesign .service-fit-card,
body.home-redesign .conversion-steps__list li {
  border-color: var(--polish-rule);
  border-radius: var(--polish-radius);
  box-shadow: none;
}

body.home-redesign .service-fit-card > span {
  display: block;
  width: auto;
  padding: 0;
  color: var(--color-deep-teal);
  background: transparent;
  border: 0;
  border-radius: 0;
  font: 800 0.77rem/1.2 var(--font-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (min-width: 761px) {
  body.home-redesign .service-fit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Overrides the legacy AP-TASK0029 utility's `grid-column: auto !important`. */
  body.home-redesign .service-fit-grid > .service-fit-card:last-child { grid-column: 1 / -1 !important; }
}

.conversion-steps__list { counter-reset: polish-step; gap: 1rem; }
.conversion-steps__list li { position: relative; padding: 1.15rem 1.15rem 1.15rem 4.25rem; }
.conversion-steps__list strong::before {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  border-radius: 4px;
  background: var(--color-deep-teal);
  content: "0" counter(polish-step);
  counter-increment: polish-step;
}

.conversion-faq__grid { gap: 0.65rem; }
.conversion-faq details {
  background: var(--color-paper);
  border: 1px solid var(--polish-rule);
  border-radius: var(--polish-radius);
}
.conversion-faq summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: var(--color-graphite);
  font-family: var(--font-heading);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.conversion-faq summary::-webkit-details-marker { display: none; }
.conversion-faq summary::after { color: var(--color-deep-teal); content: "+"; font-size: 1.4rem; line-height: 1; }
.conversion-faq details[open] summary { border-bottom: 1px solid var(--polish-rule); }
.conversion-faq details[open] summary::after { content: "−"; }
.conversion-faq details p { margin: 0; padding: 0.25rem 1rem 1rem; }

.final-cta, .guide-contact-cta { border: 1px solid var(--polish-rule); box-shadow: var(--polish-shadow); }

@media (max-width: 760px) {
  .site-header__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .nav-enhanced .menu-toggle { display: inline-flex; }
  .header-actions { grid-column: 1 / -1; }
  .primary-nav { grid-column: 1 / -1; }
  .nav-enhanced .primary-nav[hidden] { display: none; }
  .nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem; padding-top: 0.25rem; }
  .nav-list a { justify-content: center; padding-inline: 0.35rem; text-align: center; }
  .conversion-steps__list li { padding-left: 4rem; }
}

@media (min-width: 761px) { .primary-nav[hidden] { display: block; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .button:hover, .button:active, .menu-toggle:hover, .menu-toggle:active { transform: none; }
}

/* Homepage component composition — a site-owned interpretation of the selected 21st patterns. */
body.home-redesign .home-hero {
  grid-template-columns: minmax(0, 0.86fr) minmax(27rem, 1.14fr);
  min-height: min(40rem, 66vh);
  padding: clamp(1.25rem, 3vw, 3.25rem);
  border: 0;
  border-top: 7px solid var(--color-deep-teal);
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(118deg, #fffdf8 0%, #f8efe4 62%, #f0e1d0 100%);
}

body.home-redesign .home-hero__content { align-content: center; }
body.home-redesign .home-hero h1 {
  max-width: 14ch;
  color: var(--color-deep-teal);
  font-size: clamp(3.25rem, 4vw, 3.72rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
body.home-redesign .home-hero__lead { max-width: 47ch; font-size: clamp(1rem, 1.25vw, 1.16rem); }
body.home-redesign .home-hero__phone { border-bottom-color: var(--color-coral); }
body.home-redesign .home-hero__actions { display: flex; max-width: 32rem; margin-top: 1.3rem; }
body.home-redesign .home-hero__actions .button { min-height: 52px; }

body.home-redesign .home-work-board {
  display: grid;
  grid-template-rows: auto minmax(20rem, 1fr) auto;
  gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 1.25rem;
  background: #173e2e;
  box-shadow: 0 24px 50px rgba(24, 51, 39, 0.22);
}
body.home-redesign .home-work-board__header { padding: 0; }
body.home-redesign .home-work-board__header h2 { font-size: clamp(1.55rem, 2vw, 2.1rem); }
body.home-redesign .home-work-board__grid {
  display: flex !important;
  min-height: 21rem;
  height: auto;
  gap: 0.45rem !important;
  overflow: hidden;
}
body.home-redesign .home-work-board .work-photo {
  position: relative;
  display: block;
  flex: 0.72 1 0;
  min-width: 0 !important;
  min-height: 21rem;
  height: auto !important;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0.75rem;
  cursor: pointer;
}
body.home-redesign[data-page="home"] [data-project-gallery] .work-photo {
  flex: 0.72 1 0 !important;
  max-width: none !important;
  min-height: 21rem !important;
  aspect-ratio: auto !important;
  transition: flex-grow 360ms cubic-bezier(.2,.72,.2,1), opacity 220ms ease !important;
}
body.home-redesign .home-work-board .work-photo:first-child { flex-grow: 3.8; }
html.project-gallery-enhanced body.home-redesign[data-page="home"] [data-project-gallery] .work-photo[data-project-active="true"] { flex: 3.8 1 0 !important; }
html.project-gallery-enhanced body.home-redesign[data-page="home"] [data-project-gallery] .work-photo[data-project-active="false"] { flex: 0.72 1 0 !important; }
body.home-redesign .home-work-board .work-photo img,
body.home-redesign .home-work-board .work-photo picture { width: 100%; height: 100%; }
body.home-redesign .home-work-board .work-photo img { display: block; object-fit: cover; }
body.home-redesign .home-work-board .work-photo::after {
  position: absolute;
  inset: 45% 0 0;
  z-index: 1;
  background: linear-gradient(transparent, rgba(10, 28, 20, 0.8));
  content: "";
  pointer-events: none;
}
body.home-redesign .home-work-board figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  min-height: 48px;
  align-items: end;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.6rem;
  color: #fffdf8;
  font: 800 0.78rem/1.05 var(--font-heading);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
body.home-redesign[data-page="home"] [data-project-gallery] .work-photo figcaption {
  display: flex !important;
  color: #fffdf8 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body.home-redesign[data-page="home"] [data-project-gallery] .work-photo figcaption span {
  color: #fffdf8 !important;
  border: 0 !important;
}
body.home-redesign .home-work-board .work-photo:first-child figcaption {
  padding: 0.85rem;
  font-size: 0.93rem;
  writing-mode: horizontal-tb;
  transform: none;
}
html.project-gallery-enhanced body.home-redesign .home-work-board .work-photo[data-project-active="true"] figcaption {
  padding: 0.85rem !important;
  font-size: 0.93rem !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
}
html.project-gallery-enhanced body.home-redesign .home-work-board .work-photo[data-project-active="false"] figcaption {
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: auto !important;
  max-width: none !important;
  padding: 0.6rem !important;
  writing-mode: vertical-rl !important;
  transform: rotate(180deg) !important;
}
body.home-redesign .home-work-board figcaption span { font-size: 1.15rem; }
.project-gallery__controls { display: none; }

.service-tabs { position: relative; margin-top: 1.75rem; }
.service-tabs__list {
  display: none;
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  overflow: hidden;
  border: 1px solid rgba(38, 78, 59, 0.22);
  border-radius: 0.9rem;
  background: #edf1ea;
}
html.service-tabs-enhanced .service-tabs__list { display: grid; }
.service-tabs__list button {
  position: relative;
  z-index: 1;
  min-height: 50px;
  padding: 0.65rem 0.55rem;
  color: var(--color-deep-teal);
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  font: 800 clamp(0.8rem, 1.05vw, 0.9rem)/1.15 var(--font-heading);
  cursor: pointer;
}
.service-tabs__list button[aria-selected="true"] { color: #fffdf8; }
.service-tabs__indicator {
  position: absolute;
  z-index: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0.35rem;
  width: calc(25% - 0.4375rem);
  border-radius: 0.65rem;
  background: var(--color-deep-teal);
}
.service-tabs .service-fit-grid { margin-top: 0.85rem; }
html.service-tabs-enhanced .service-tabs .service-fit-card[hidden] { display: none; }
html.service-tabs-enhanced .service-tabs .service-fit-grid { display: block; }
html.service-tabs-enhanced .service-tabs .service-fit-card { min-height: 18rem; }
html.service-tabs-enhanced .service-tabs .service-fit-card--more { display: block; margin-top: 0.85rem; }
.service-tabs [role="tab"]:focus-visible,
.project-gallery__controls button:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

@media (max-width: 979px) {
  body.home-redesign .home-hero { grid-template-columns: 1fr; min-height: 0; }
  body.home-redesign .home-work-board { max-width: 48rem; }
}

@media (max-width: 760px) {
  body.home-redesign .home-hero {
    gap: 1.1rem;
    padding: 1.25rem 1rem 1rem;
    border-top-width: 5px;
  }
  body.home-redesign .home-hero h1 {
    max-width: 11.5ch;
    font-size: clamp(2.28rem, 10.2vw, 2.55rem);
    line-height: 1.01;
  }
  body.home-redesign .home-hero__lead { margin-block: 0.65rem; }
  body.home-redesign .home-hero__phone,
  body.home-redesign .home-hero__area { min-height: 0; margin-block: 0.3rem; padding-block: 0.2rem; font-size: 0.9rem; }
  body.home-redesign .home-hero__actions { display: grid; width: 100%; max-width: none; gap: 0.55rem; }
  body.home-redesign .home-hero__actions .button { width: 100%; min-height: 50px; }
  body.home-redesign .home-work-board { gap: 0.75rem; padding: 0.75rem; border-radius: 0.85rem; }
  body.home-redesign .home-work-board__header p:not(.home-work-board__kicker) { font-size: 0.87rem; }
  body.home-redesign .home-work-board__grid { min-height: 17.5rem; height: 17.5rem; }
  html.project-gallery-enhanced body.home-redesign .home-work-board .work-photo {
    display: none;
    flex: 1 1 auto;
    min-height: 17.5rem;
    border-radius: 0.55rem;
  }
  html.project-gallery-enhanced body.home-redesign .home-work-board .work-photo:first-child { display: block; }
  body.home-redesign .home-work-board .work-photo:first-child figcaption { font-size: 0.86rem; }
  html.project-gallery-enhanced .project-gallery__controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .project-gallery__controls button {
    min-height: 44px;
    padding: 0.45rem;
    color: #fffdf8;
    border: 1px solid rgba(255, 253, 248, 0.34);
    border-radius: 0.45rem;
    background: transparent;
    font: 800 0.86rem/1.1 var(--font-heading);
    cursor: pointer;
  }
  .project-gallery__controls button[aria-pressed="true"] { color: var(--color-deep-teal); border-color: #fffdf8; background: #fffdf8; }
  html.project-gallery-enhanced body.home-redesign .home-work-board .work-photo[data-project-active="true"] { display: block; }
  html.project-gallery-enhanced body.home-redesign .home-work-board .work-photo[data-project-active="true"] {
    width: 100% !important;
    min-height: 17.5rem !important;
    flex: 1 1 100% !important;
  }
  html.project-gallery-enhanced body.home-redesign .home-work-board .work-photo[data-project-active="false"] { display: none; }
  .service-tabs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-tabs__indicator {
    bottom: auto;
    width: calc(50% - 0.525rem);
    height: calc(50% - 0.525rem);
  }
  .service-tabs__list button[aria-selected="true"] { background: var(--color-deep-teal); }
  html.service-tabs-enhanced .service-tabs .service-fit-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body.home-redesign[data-page="home"] [data-project-gallery] .work-photo { transition: none !important; }
  body.gallery-redesign [data-project-gallery][data-gallery-variant="work"] .work-photo { transition: none !important; }
}

/* Reviews hero: this card inherits the display treatment for numeric proof scores.
   A text-only title needs a bounded measure instead, so it remains readable beside
   the photo at every desktop width and keeps the profile links above the fold. */
body.reviews-redesign .review-proof-score--hero {
  grid-template-rows: auto minmax(11rem, 15rem) auto auto auto;
  min-width: 0;
}

body.reviews-redesign .review-proof-score--hero .review-hero-photo {
  height: clamp(11rem, 20vw, 15rem);
  min-height: 0;
  aspect-ratio: auto;
}

body.reviews-redesign .review-proof-score--hero.local-proof-hero > strong {
  display: block;
  max-inline-size: 13ch;
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.reviews-redesign .review-proof-score--hero .review-receipt-card__rows,
body.reviews-redesign .review-proof-score--hero .review-receipt-card__rows p,
body.reviews-redesign .review-proof-score--hero .local-proof-hero__links {
  min-width: 0;
}

body.reviews-redesign .review-proof-score--hero .review-receipt-card__rows p {
  display: block;
  min-height: 0;
  padding: 0.7rem 0.8rem;
  font-size: 0.98rem;
  line-height: 1.45;
}

body.reviews-redesign .review-proof-score--hero .local-proof-hero__links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

body.reviews-redesign .review-proof-score--hero .local-proof-hero__links a {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.65rem;
  color: #264E3B;
  background: #C9B7A4;
  border-radius: 0.5rem;
  font: 800 0.86rem/1.2 var(--font-heading);
  text-align: center;
  text-decoration: none;
}

body.reviews-redesign .review-proof-score--hero .local-proof-hero__links a:hover,
body.reviews-redesign .review-proof-score--hero .local-proof-hero__links a:focus-visible {
  color: #FFFAF4;
  background: #3A3435;
}

@media (max-width: 760px) {
  body.reviews-redesign .review-proof-score--hero {
    grid-template-rows: auto minmax(10.5rem, 13rem) auto auto auto;
  }

  body.reviews-redesign .review-proof-score--hero .review-hero-photo {
    height: clamp(10.5rem, 55vw, 13rem);
  }

  body.reviews-redesign .review-proof-score--hero.local-proof-hero > strong {
    max-inline-size: none;
    font-size: clamp(1.4rem, 8.5vw, 2rem);
  }

  body.reviews-redesign .review-proof-score--hero .local-proof-hero__links {
    grid-template-columns: 1fr;
  }
}

/* Work gallery: the same selected-photo pattern is useful beyond the home page. */
body.gallery-redesign [data-project-gallery][data-gallery-variant="work"] {
  display: flex;
  min-height: 27rem;
  gap: 0.45rem;
}
body.gallery-redesign [data-project-gallery][data-gallery-variant="work"] .work-photo {
  position: relative;
  display: block;
  min-width: 0;
  flex: 0.8 1 0;
  margin: 0;
  overflow: hidden;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: flex 280ms cubic-bezier(0.2, 0.72, 0.2, 1);
}
body.gallery-redesign [data-project-gallery][data-gallery-variant="work"] .work-photo[data-project-active="true"] { flex: 3.4 1 0; }
body.gallery-redesign [data-project-gallery][data-gallery-variant="work"] .work-photo img { width: 100%; height: 100%; object-fit: cover; }
body.gallery-redesign [data-project-gallery][data-gallery-variant="work"] figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.8rem;
  color: #fffdf8;
  background: linear-gradient(transparent, rgba(10, 28, 20, 0.82));
  font: 800 0.9rem/1.2 var(--font-heading);
}
.work-gallery__controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.work-gallery__controls button {
  min-height: 44px;
  padding: 0.5rem;
  color: #fffdf8;
  border: 1px solid rgba(255, 253, 248, 0.42);
  border-radius: 0.45rem;
  background: transparent;
  font: 800 0.78rem/1.1 var(--font-heading);
  cursor: pointer;
}
.work-gallery__controls button[aria-pressed="true"] { color: var(--color-deep-teal); background: #fffdf8; }
.guide-faq-enhanced { display: grid; gap: 0.6rem; }
.guide-faq-disclosure {
  border: 1px solid var(--polish-rule);
  border-radius: var(--polish-radius);
  background: var(--color-paper);
}
.guide-faq-disclosure summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  color: var(--color-graphite);
  font: 800 1rem/1.25 var(--font-heading);
  cursor: pointer;
  list-style: none;
}
.guide-faq-disclosure summary::-webkit-details-marker { display: none; }
.guide-faq-disclosure summary::after { content: '+'; color: var(--color-deep-teal); font-size: 1.45rem; }
.guide-faq-disclosure[open] summary { border-bottom: 1px solid var(--polish-rule); }
.guide-faq-disclosure[open] summary::after { content: '−'; }
.guide-faq-disclosure p { margin: 0; padding: 0.25rem 1rem 1rem; }

@media (max-width: 760px) {
  body.gallery-redesign [data-project-gallery][data-gallery-variant="work"] { min-height: 20rem; }
  html.project-gallery-enhanced body.gallery-redesign .gallery-proof-board [data-project-gallery][data-gallery-variant="work"] .work-photo { display: none !important; flex: 1 1 100%; min-height: 20rem; }
  html.project-gallery-enhanced body.gallery-redesign .gallery-proof-board [data-project-gallery][data-gallery-variant="work"] .work-photo[data-project-active="true"] { display: block !important; }
  .work-gallery__controls { grid-template-columns: 1fr; }
}
