/* Shared compact header and right-hand navigation drawer. */
.mobile-call,.mobile-menu-toggle { display: none; }
.mobile-menu { border: 0; padding: 0; }
.mobile-menu:not([open]) { display: none; }
@media (max-width: 850px) {
  body { overflow-x: clip; }
  .home-hero .hero-image { min-height: 0; height: auto; aspect-ratio: 1.55; }
  .topbar,.topbar.is-scrolled { border: 0; }
  .topbar .topbar-inner,.topbar.is-scrolled .topbar-inner { display: grid; grid-template-columns: 48px 1fr 48px; min-height: 80px; padding: 6px 16px; gap: 8px; }
  .topbar .brand { grid-column: 2; grid-row: 1; justify-self: center; }
  .topbar .brand img,.topbar.is-scrolled .brand img { width: 116px; max-height: 70px; object-fit: contain; }
  .topbar .header-phone,.topbar .nav { display: none; }
  .mobile-call { display: grid; grid-column: 1; grid-row: 1; place-items: center; width: 44px; height: 44px; color: #666; }
  .mobile-call svg { width: 30px; height: 30px; fill: currentColor; }
  .mobile-menu-toggle { display: flex; grid-column: 3; grid-row: 1; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; border: 0; background: transparent; padding: 10px; cursor: pointer; }
  .mobile-menu-toggle span { display: block; width: 24px; height: 1px; background: #666; }
  .mobile-menu-open { overflow: hidden; }
  .mobile-menu[open] { position: fixed; inset: 0 0 0 auto; margin: 0; width: 80vw; max-width: none; height: 100dvh; max-height: none; box-sizing: border-box; display: flex; flex-direction: column; padding: 92px 22px 52px; background: var(--cream); color: #080808; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; font-family: Spartan, 'League Spartan', Arial, sans-serif; }
  .mobile-menu.is-open { transform: translateX(0); }
  .mobile-menu::backdrop { background: #0006; }
  .mobile-menu-close { position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border: 0; background: transparent; color: #666; font: 300 40px/1 Arial,sans-serif; cursor: pointer; }
  .mobile-menu nav { display: grid; gap: 22px; }
  .mobile-menu nav>a,.mobile-services button { width: fit-content; font-size: 22px; line-height: 1.35; font-weight: 700; text-decoration: none; }
  .mobile-menu a { color: inherit; }
  .mobile-menu a[aria-current=page] { text-decoration: underline; text-underline-offset: 9px; }
  .mobile-services button { cursor: pointer; border: 0; background: transparent; color: inherit; padding: 0; font-family: inherit; text-align: left; display: flex; align-items: center; gap: 24px; }
  .mobile-services button::-webkit-details-marker { display: none; }
  .mobile-services button span { width: 9px; height: 9px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg) translateY(-3px); }
  .mobile-services button[aria-expanded=true] span { transform: rotate(225deg); }
  .mobile-services>div[hidden] { display: none; }
  .mobile-services>div { display: grid; gap: 13px; padding: 20px 0 0 13px; }
  .mobile-services a { color: #909090; font-size: 19px; line-height: 1.25; font-weight: 400; text-decoration: none; }
  .mobile-menu-contact { display: grid; gap: 12px; margin-top: auto; padding-top: 65px; font-size: 19px; line-height: 1.4; font-weight: 700; }
  .mobile-menu-email { font-size: clamp(12px, 3.2vw, 17px); overflow-wrap: anywhere; text-decoration: none; }
}
@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; }
  .home-hero .hero-image { min-height: 0; height: auto; aspect-ratio: 1.55; }
  .hero .hero-copy { padding: 40px 16px 58px; }
  .hero .hero-copy .actions { display: flex; flex-direction: column; gap: 20px; width: 100%; }
  .hero .hero-copy .actions .button { width: 100%; flex: none; min-height: 44px; }
  .quick-links { grid-template-columns: 1fr; }
  .quick-links a,.quick-links a:nth-child(odd) { min-height: 66px; border-right: 0; border-bottom: 4px solid var(--charcoal); }
  .quick-links a:last-child { border-bottom: 0; }
  .services-showcase { padding-right: 16px; padding-left: 16px; }
  .services-showcase .container { width: 100%; }
  .services-showcase .service-grid { grid-template-columns: 1fr; gap: 16px; }
  .services-showcase .service-card { border: 0; box-shadow: 0 5px 10px #0003; }
  .services-showcase .service-card img { aspect-ratio: 1; height: auto; border-radius: 8px; }
  .services-showcase .service-card span { min-height: 66px; padding: 18px 12px; font-size: 17px; }
  .home-page .process-inner { grid-template-columns: 1fr; gap: 46px; }
  .home-page .process-photos { width: 100%; max-width: none; grid-template-columns: 1fr; gap: 38px; margin: 0; }
  .home-page .process-photos img { width: 100%; height: auto; aspect-ratio: 1.5; object-fit: cover; box-shadow: 0 5px 12px #0003; }
}
@media (prefers-reduced-motion: reduce) { .mobile-menu[open] { transition: none; } }


/* Mobile presentation: text entrances are opt-in; photos remain stationary.
   Keep the approved homepage effects and all desktop motion unchanged. */
@media (max-width: 850px) {
  .social-band .social-inner { text-align: center; }
  .social-band .social-icons { justify-content: center; }

  /* Override desktop group entrances, including image-containing groups. */
  body.service-motion-page .service-motion,
  body.service-motion-page .service-motion.motion-visible {
    visibility: visible;
    animation: none;
    transform: none;
    opacity: 1;
  }

  /* Match the homepage hero's distance, easing, duration and stagger. */
  body.service-motion-page .hero .hero-copy h1,
  body.service-motion-page .hero .hero-copy .location,
  body.service-motion-page .hero .hero-copy .coverage {
    animation: final-hero-slide-in 1.55s cubic-bezier(.2,.7,.25,1) both;
  }
  body.service-motion-page .hero .hero-copy .location { animation-delay: .16s; }
  body.service-motion-page .hero .hero-copy .coverage { animation-delay: .32s; }

  /* Only the existing text sections opt into the homepage's subtle reveal. */
  body.service-motion-page .hardwood-feature-copy.service-motion > :is(h2, p, span),
  body.service-motion-page .craft-copy.service-motion > :is(h2, p, span),
  body.service-motion-page .hardwood-solid.service-motion .hardwood-feature-copy > :is(h2, p, span) {
    opacity: 0;
    transform: translateX(84px);
    transition: opacity 1.6s ease, transform 1.6s cubic-bezier(.2,.7,.25,1);
  }
  body.service-motion-page .hardwood-feature-copy.service-motion.motion-visible > :is(h2, p, span),
  body.service-motion-page .craft-copy.service-motion.motion-visible > :is(h2, p, span),
  body.service-motion-page .hardwood-solid.service-motion.motion-visible .hardwood-feature-copy > :is(h2, p, span) {
    opacity: 1;
    transform: none;
  }

  /* Photo targets and photo containers must never inherit desktop entrances. */
  body.service-motion-page .hardwood-feature-image,
  body.service-motion-page .craft-process-images,
  body.service-motion-page .lvp-alternative-image {
    visibility: visible;
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .button { white-space: nowrap; }
  .hardwood-schedule .actions .button {
    flex: 1 0 auto;
    min-width: max-content;
  }
  .serving-card .button { min-width: 0; max-width: 100%; }
}
@media (max-width: 600px) {
  /* The homepage uses stacked, full-width buttons on phones. */
  body.service-motion-page .hero .hero-copy .actions {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    gap: 20px;
  }
  body.service-motion-page .hero .hero-copy .actions .button {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    min-height: 44px;
    padding: 12px 22px;
    font-size: 15px;
  }
  .hardwood-schedule .actions .button { padding-inline: 12px; }
}
@media (max-width: 850px) and (prefers-reduced-motion: reduce) {
  body.service-motion-page .hero .hero-copy h1,
  body.service-motion-page .hero .hero-copy .location,
  body.service-motion-page .hero .hero-copy .coverage,
  body.service-motion-page .hardwood-feature-copy.service-motion > :is(h2, p, span),
  body.service-motion-page .craft-copy.service-motion > :is(h2, p, span),
  body.service-motion-page .hardwood-solid.service-motion .hardwood-feature-copy > :is(h2, p, span) {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* Keep service hero background photos visible above the mobile title panels. */
@media (max-width: 600px) {
  .hero.carpet-hero .hero-image,
  .hero.lvp-hero .hero-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1.55;
    background-size: cover;
    background-position: center;
  }
  .hero.carpet-hero .hero-copy .actions .button,
  .hero.lvp-hero .hero-copy .actions .button { max-width: none; flex: none; width: 100%; }
}
