/*
  Refinement layer for the approved direction.
  The original homepage markup, video, content, sections, imagery, and social links
  stay in place; this file only adjusts hierarchy, spacing, and responsive behavior.
*/

:root {
  --proa-gold: #d4af37;
  --proa-ink: #111;
  --proa-stone: #f4f2ee;
}

/* Keep the existing navigation, with a quiet solid scrolled state. */
#navbar {
  transition:
    padding 280ms ease,
    background-color 280ms ease,
    box-shadow 280ms ease,
    border-color 280ms ease;
}

/* Internal-page inline styles disable pointer events on the nav shell.
   Restore them only on the visible desktop controls. */
#navbar .nav-links-desktop,
#navbar .nav-cta {
  pointer-events: auto !important;
}

/* Keep the overlay animation, but remove the long stagger that made it feel heavy. */
.menu-overlay {
  transition: opacity 320ms ease, visibility 320ms ease !important;
}

.menu-links li,
.menu-extras {
  transition-duration: 320ms !important;
}

.delay-1 { transition-delay: 20ms !important; }
.delay-2 { transition-delay: 40ms !important; }
.delay-3 { transition-delay: 60ms !important; }
.delay-4 { transition-delay: 80ms !important; }
.delay-5 { transition-delay: 100ms !important; }
.delay-6 { transition-delay: 120ms !important; }
.delay-7 { transition-delay: 140ms !important; }

body:not(.menu-open) #navbar.scrolled {
  background: rgba(250, 249, 247, 0.985) !important;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.055);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:not(.menu-open) #navbar.scrolled .hamburger .line {
  background-color: #111 !important;
  box-shadow: none !important;
}

/* Language controls follow the actual header background in both nav states. */
body:not(.thank-you-page):not(.menu-open) #navbar:not(.scrolled) .lang-desktop a {
  color: #fff !important;
}

body:not(.thank-you-page):not(.menu-open) #navbar:not(.scrolled) .lang-divider {
  color: rgba(255, 255, 255, 0.58) !important;
}

body:not(.menu-open) #navbar.scrolled .lang-desktop a {
  color: #111 !important;
}

body:not(.menu-open) #navbar.scrolled .lang-divider {
  color: rgba(17, 17, 17, 0.34) !important;
}

/* Existing video, now carrying the company's real slogan in a restrained sans. */
.hero .overlay {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.04) 29%),
    linear-gradient(to top, rgba(0, 0, 0, 0.22) 0%, transparent 42%);
}

.hero-content-refined {
  width: min(920px, 92vw);
  text-shadow: none;
  animation: heroRefinedIn 900ms ease-out both;
}

.hero-content-refined .hero-brand {
  margin: 0 0 14px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.hero-content-refined h1 {
  margin: 0 0 34px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.15rem, 4.5vw, 4.65rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.025em;
  text-transform: none;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.52);
}

.hero-content-refined .btn {
  padding: 16px 38px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.13);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.hero-content-refined .btn:hover {
  background: var(--proa-gold);
  border-color: var(--proa-gold);
  color: #111;
  transform: translateY(-2px);
}

/* Preserve the three real trust points and make them more compact. */
.trust-strip {
  padding: 17px 20px;
  gap: clamp(26px, 5vw, 70px);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.2);
}

.trust-item {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.055em;
}

/* Tighter rhythm only; existing SEO copy and service cards are untouched. */
.seo-section {
  padding-top: 52px;
  padding-bottom: 58px;
}

.services-preview {
  margin-top: 0;
}

.seo-title,
.service-box h3,
.reviews-title,
.faq-teaser-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* A compact, factual Google proof block without introducing fake reviews. */
.reviews-section {
  padding: 46px 20px;
}

.reviews-header {
  margin-bottom: 18px;
}

.reviews-title {
  margin-bottom: 14px;
  font-size: 2.1rem;
}

.google-rating-summary {
  padding: 9px 19px;
  gap: 9px;
  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.06);
}

.reviews-grid-live {
  display: none;
}

.google-review-btn {
  padding: 11px 25px;
  font-size: 0.74rem;
}

/* Keep the current FAQ teaser while giving certification marks proper presence. */
.faq-teaser {
  padding: 52px 20px;
}

.faq-pill {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  cursor: pointer;
}

.faq-pill[aria-expanded="true"] {
  border-color: var(--proa-gold);
  color: #111;
}

.faq-pill-icon {
  display: inline-block;
  transition: transform 180ms ease;
}

.faq-pill[aria-expanded="true"] .faq-pill-icon {
  transform: rotate(45deg);
}

.faq-teaser-answers {
  width: min(680px, 100%);
  margin: 0 auto;
}

.faq-pill-answer {
  margin: -8px 0 30px;
  padding: 18px 22px;
  border: 1px solid rgba(17, 17, 17, 0.09);
  border-radius: 8px;
  background: #faf9f7;
  text-align: left;
  animation: faqAnswerIn 180ms ease-out both;
}

.faq-pill-answer[hidden] {
  display: none;
}

.faq-pill-answer p {
  margin: 0;
  color: #3f3f3f;
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
}

@keyframes faqAnswerIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-teaser-logos {
  max-width: 720px;
  gap: clamp(26px, 5vw, 58px);
  padding-top: 30px;
  margin-bottom: 30px;
}

.faq-teaser-logos .cert-logo,
.faq-teaser-logos .acq-logo,
.faq-teaser-logos .iicrc-logo {
  width: auto;
  height: 48px;
  max-width: 150px;
  object-fit: contain;
  opacity: 0.92;
}

.faq-teaser-logos .acq-logo {
  height: 66px;
  transform: scale(1.75);
  transform-origin: center;
}

.faq-teaser-logos .iicrc-logo {
  height: 82px !important;
}

/* One consistent footer system for every internal English and French page. */
body:not(.homepage-mode) .trust-bar {
  width: 100%;
  padding: 24px 48px 16px !important;
  background: #090909;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body:not(.homepage-mode) .trust-content {
  width: 100% !important;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between !important;
  gap: 28px;
}

body:not(.homepage-mode) .footer-right {
  gap: 22px;
}

body:not(.homepage-mode) .cert-logos {
  gap: 20px;
}

body:not(.homepage-mode) .cert-logo {
  height: 28px;
}

body:not(.homepage-mode) .cert-logo.acq-logo {
  height: 38px;
  transform: scale(1.9);
  transform-origin: center;
}

body:not(.homepage-mode) .copyright-line {
  width: 100%;
  max-width: 1320px;
  margin: 16px auto 0 !important;
  padding: 12px 0 0 !important;
  color: #8c8c8c;
}

/* The final IICRC mark is portrait-oriented and needs more visual scale. */
.cert-logos img[src*="iicrc-logo"] {
  height: 54px !important;
  max-width: 64px;
  object-fit: contain;
}

body.homepage-mode .faq-section {
  position: relative;
  z-index: 10;
}

.faq-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* The mobile overlay now uses the same restrained sans-serif voice as the site. */
.menu-links a {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  letter-spacing: 0.015em;
}

/*
  Internal pages use the same typographic voice as the approved homepage.
  This changes presentation only; wording and document structure remain intact.
*/
body:not(.homepage-mode) {
  font-family: "Montserrat", sans-serif;
}

body:not(.homepage-mode) h1,
body:not(.homepage-mode) h2,
body:not(.homepage-mode) h3,
body:not(.homepage-mode) .page-hero h1,
body:not(.homepage-mode) .cat-title,
body:not(.homepage-mode) .col-title,
body:not(.homepage-mode) .process-title,
body:not(.homepage-mode) .values-title,
body:not(.homepage-mode) .cta-title,
body:not(.homepage-mode) .step-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

body:not(.homepage-mode) p,
body:not(.homepage-mode) .rbq-text,
body:not(.homepage-mode) .copyright-line,
body:not(.homepage-mode) .step-desc,
body:not(.homepage-mode) .review-text,
body:not(.homepage-mode) .cta-text {
  font-family: "Montserrat", sans-serif;
}

body.services-page .cta-banner h2 {
  font-family: "Montserrat", sans-serif !important;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Preview helper: uses the video's own poster only when ?static=1 is supplied. */
body.static-preview .hero {
  background: #111 url("posters/desktop-poster.jpg") center / cover no-repeat;
}

body.static-preview .hero video {
  display: none !important;
}

body.proof-preview .hero,
body.proof-preview .trust-strip,
body.proof-preview .seo-section,
body.proof-preview .trust-bar {
  display: none !important;
}

body.proof-preview .reviews-section {
  padding-top: 150px;
}

body.proof-preview {
  background: #fff;
}

body.proof-preview #navbar {
  background: rgba(255, 255, 255, 0.96);
}

body.proof-preview #navbar .logo-top {
  opacity: 0;
}

body.proof-preview #navbar .logo-base {
  opacity: 1;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12));
}

body.proof-preview #navbar .nav-links-desktop a,
body.proof-preview #navbar .lang-desktop a {
  color: #111;
}

@keyframes heroRefinedIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Collapse the full desktop navigation before labels begin to overlap. */
@media (max-width: 1279px) {
  .nav-links-desktop,
  .nav-cta {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }
}

@media (max-width: 900px) {
  .sticky-call-btn {
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 100001;
    min-width: 112px;
    min-height: 44px;
    padding: 10px 15px;
    gap: 7px;
    font-size: 0.68rem;
    letter-spacing: 0.075em;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
    transition:
      bottom 260ms ease,
      opacity 220ms ease,
      transform 220ms ease,
      visibility 220ms ease;
  }

  body.homepage-mode #navbar:not(.scrolled) ~ .sticky-call-btn {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }

  body.homepage-mode #navbar.scrolled ~ .sticky-call-btn {
    top: 11px;
    right: 68px;
    bottom: auto;
  }

  .sticky-call-btn.is-footer-visible {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
  }
}

@media (min-width: 1280px) {
  .hamburger {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body.homepage-mode .hero {
    height: calc(100svh - 78px) !important;
    min-height: 620px !important;
    padding-bottom: 0 !important;
  }

  body.homepage-mode .hero .video-mobile {
    height: 100% !important;
    object-position: center center;
  }

  .hero-content-refined {
    padding-top: 54px;
  }

  .hero-content-refined .hero-brand {
    margin-bottom: 11px;
    font-size: 0.62rem;
    letter-spacing: 0.29em;
  }

  .hero-content-refined h1 {
    margin-bottom: 24px;
    font-size: clamp(2rem, 9.5vw, 2.75rem);
    line-height: 1.08;
  }

  .hero-content-refined .btn {
    padding: 14px 29px;
    font-size: 0.7rem;
  }

  .trust-strip {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 !important;
    padding: 13px 6px;
  }

  .trust-item {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 54px;
    padding: 0 7px;
    font-size: 0.58rem;
    line-height: 1.35;
    letter-spacing: 0.015em;
    border-right: 1px solid rgba(255, 255, 255, 0.13);
  }

  .trust-item:last-child {
    border-right: 0;
  }

  .trust-item i {
    margin: 0 0 6px;
    font-size: 0.88rem;
  }

  .seo-section {
    padding: 42px 16px 46px;
  }

  .seo-desc {
    margin-bottom: 34px;
  }

  .reviews-section {
    padding: 38px 15px;
  }

  .reviews-title {
    font-size: 1.72rem;
  }

  .google-rating-summary {
    gap: 7px;
    padding: 9px 14px;
  }

  .faq-teaser {
    padding: 44px 15px;
  }

  .faq-pill-answer {
    margin-top: -6px;
    padding: 16px 17px;
    text-align: center;
  }

  .faq-pill-answer p {
    font-size: 0.82rem;
    line-height: 1.65;
  }

  .faq-teaser-logos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 30px;
    max-width: 340px;
  }

  .faq-teaser-logos .cert-logo,
  .faq-teaser-logos .acq-logo,
  .faq-teaser-logos .iicrc-logo {
    justify-self: center;
    height: 45px;
    max-width: 125px;
  }

  .faq-teaser-logos .acq-logo {
    height: 59px;
  }

  .faq-teaser-logos .iicrc-logo {
    height: 72px !important;
  }

  body.static-preview .hero {
    background-image: url("posters/mobile-poster.jpg");
  }

  body.homepage-mode .reviews-section {
    order: 4 !important;
  }

  body.homepage-mode .faq-section,
  body.homepage-mode .faq-teaser {
    order: 5 !important;
  }

  body.homepage-mode .trust-bar {
    order: 6 !important;
  }

  body:not(.homepage-mode) .trust-bar {
    padding: 28px 20px 18px !important;
  }

  body:not(.homepage-mode) .trust-content {
    flex-direction: column !important;
    gap: 18px;
    text-align: center;
  }

  body:not(.homepage-mode) .contact-left,
  body:not(.homepage-mode) .footer-right {
    flex-direction: column;
    gap: 12px;
  }

  body:not(.homepage-mode) .footer-socials {
    margin: 2px 0 0;
    padding: 0;
    border-left: 0;
  }

  body:not(.homepage-mode) .cert-logos {
    gap: 22px;
    transform: none;
  }

  body:not(.homepage-mode) .copyright-line {
    margin-top: 18px !important;
  }

  body.proof-preview .reviews-section {
    padding-top: 112px;
  }
}

@media (max-width: 390px) {
  body.homepage-mode .hero {
    min-height: 570px !important;
  }

  .trust-item {
    padding-inline: 4px;
    font-size: 0.53rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content-refined {
    animation: none;
  }

  #navbar,
  .hero-content-refined .btn {
    transition: none;
  }
}
