/* Mobile refinements. Desktop composition continues to use the original styles. */
.hero-copy-mobile, .mobile-section-links, .mobile-projects-link { display: none; }
.service-details > summary { display: none; }

@media (max-width: 1023px) {
  html, body { overflow-x: clip; }
  html { scrollbar-gutter: stable; }
  .site-header { position: sticky; top: 0; transition: box-shadow 180ms ease; }
  .site-header.is-stuck { box-shadow: 0 5px 16px rgba(9, 22, 40, .18); }
  .site-header::before { content: ''; position: absolute; inset: 0 0 auto; height: 8px; background: #091628; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 220ms ease; }
  .site-header.is-stuck::before { opacity: 1; }
  .site-header nav > div > div { height: 56px; }
  .site-header nav a > div { padding: 8px 14px; border-radius: 0 0 12px 12px; transform-origin: top left; transform: translateY(0) scale(1); transition: transform 260ms cubic-bezier(.22, 1, .36, 1); }
  .site-header nav a img { height: 64px; }
  .site-header.is-stuck nav a > div { transform: translateY(8px) scale(.75); }
  /* Menu toggle */
  #mobile-menu-button { min-width: 44px; min-height: 44px; color: #091628; border-radius: 4px; }
  #mobile-menu-button:hover { background: #f4f4f5; color: #091628; }
  #mobile-menu-button:focus { outline: none; box-shadow: none !important; }
  #mobile-menu-button:focus-visible { outline: 2px solid #091628; outline-offset: 2px; }

  /* Keep the logo tab above the open menu, as it sits above the page */
  .site-header nav a:has(img) { position: relative; z-index: 60; }

  /* Simple white drop-down under the header, only as tall as its content */
  #mobile-menu { position: fixed; inset: var(--menu-top, 72px) 0 0; overflow: hidden; background: rgba(9, 22, 40, .2); }
  #mobile-menu:not([hidden]) { animation: menu-fade 200ms ease both; }
  @keyframes menu-fade { from { background-color: transparent; } }
  #mobile-menu > .mobile-menu-panel {
    width: 100%; max-width: none; max-height: 100%; margin: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 36px 20px 24px; background: #fff; border: 0; border-bottom: 1px solid #e4e4e7; border-radius: 0;
    box-shadow: 0 12px 24px rgba(9, 22, 40, .08);
  }
  #mobile-menu .mobile-menu-links { background: transparent; }
  #mobile-menu .mobile-menu-link {
    display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 14px 0;
    border-bottom: 1px solid #e4e4e7; color: #091628; font-size: 18px; font-weight: 500; letter-spacing: -.01em; text-align: left;
  }
  #mobile-menu .mobile-menu-link > svg { flex-shrink: 0; color: #a1a1aa; transition: transform 200ms ease, color 200ms ease; }
  #mobile-menu .mobile-menu-link:hover > svg { transform: translateX(3px); color: #091628; }
  #mobile-menu .mobile-menu-link[aria-current="page"] { color: #45438b; }
  #mobile-menu .mobile-menu-link[aria-current="page"] > svg { color: #45438b; }

  .mobile-menu-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
  #mobile-menu .mobile-menu-contact,
  #mobile-menu .mobile-menu-call {
    display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 12px 14px;
    border-radius: 4px; font-size: 14px; font-weight: 500; white-space: nowrap;
  }
  #mobile-menu .mobile-menu-contact { background: #000; color: #fff; }
  #mobile-menu .mobile-menu-contact:hover { background: #1f1f1f; }
  #mobile-menu .mobile-menu-call { border: 1px solid #e4e4e7; background: #fff; color: #091628; }
  #mobile-menu .mobile-menu-call:hover { background: #f4f4f5; }
  #mobile-menu a:focus-visible { outline: 2px solid #45438b; outline-offset: 3px; }

  @media (prefers-reduced-motion: reduce) {
    #mobile-menu:not([hidden]) { animation: none; }
  }
  main [id] { scroll-margin-top: 72px; }
}

@media (max-width: 767px) {
  main .container[class*="py-"] { padding-top: 40px; padding-bottom: 40px; }
  main > div:first-child > section > .container { padding-top: 36px; padding-bottom: 32px; }
  main h1, .page-home #use-cases h2 { font-size: clamp(2rem, 1.5rem + 2.5vw, 2.375rem); line-height: 1.15; letter-spacing: -.06rem; }
  main .container > div[class*="mb-12"], main .container > div[class*="mb-16"] { margin-bottom: 28px; }
  .mobile-section-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
  .mobile-section-links a { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid #d4d4d8; border-radius: 4px; font-size: 14px; line-height: 1.35; color: #091628; background: white; }
  .page-services .mobile-section-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-section-links a:hover { background: #f4f4f5; }
  .mobile-section-links a:focus-visible, .mobile-projects-link a:focus-visible, .project-set a:focus-visible { outline: 2px solid #45438b; outline-offset: 3px; }

  .home-hero-frame { min-height: 0 !important; }
  .home-hero-content { padding: 80px 20px 24px !important; }
  .home-hero-content h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 2.5rem); line-height: 1.12; letter-spacing: -.07rem; }
  .home-hero-content > div > span, .home-hero-content > span { margin-bottom: 16px; }
  .hero-copy-desktop { display: none; }
  .hero-copy-mobile { display: inline; }
  .home-hero-content p { font-size: 16px; line-height: 1.6; }
  .home-hero-content .hero-dots { margin-top: 12px; gap: 6px; }
  .home-hero-content .hero-dots:has(button) { gap: 0; }
  .home-hero-content .hero-dots button { width: 44px !important; height: 44px; background: transparent !important; }
  .home-hero-content .hero-dots button::after { inset: 20px 8px; border-radius: 2px; background: rgba(255,255,255,.45); }
  .home-hero-content .hero-dots button.is-active::after { background: white; }
  #customers .container { padding-top: 28px; padding-bottom: 28px; }
  #customers h2 { font-size: 16px; line-height: 1.5; margin-bottom: 20px; }
  #customers .logo-container { gap: 2rem; padding-inline: 1rem; }
  #customers .logo-track { width: max-content; animation-duration: 40s; animation-play-state: running; }
  #use-cases > div > div:first-child { padding: 32px 20px; }
  #use-cases > div > div:last-child { padding: 16px 20px 32px; gap: 0; }
  #use-cases button[aria-controls] { padding-block: 20px; min-height: 64px; gap: 16px; }
  #use-cases button[aria-controls] > span { font-size: 21px; line-height: 1.3; }
  #use-cases button[aria-controls] svg { flex-shrink: 0; }
  #use-cases [id^="office-fit-out-"] { padding-block: 20px; }
  #use-cases [id^="office-fit-out-"] p { font-size: 16px; line-height: 1.6; }
  #use-cases a button { min-height: 44px; }
  .home-projects .container > div:first-child { padding: 32px 20px 16px; }
  .home-projects { scroll-margin-top: 72px; }
  .home-projects a button { min-height: 44px; }
  .home-projects .project-marquee { overflow-x: auto; scroll-behavior: auto; padding: 12px 0 20px; }
  .home-projects .project-track { animation: none; transform: none; will-change: auto; }
  .home-projects .project-set { padding-inline: 20px; gap: 12px; }
  .home-projects .project-set > a { width: min(78vw, 300px); }
  .mobile-projects-link { display: block; padding: 0 20px 28px; text-align: center; }
  .mobile-projects-link a { display: inline-flex; gap: 12px; align-items: center; min-height: 44px; color: #45438b; font-weight: 600; }
  .home-projects .container > .bg-card > .grid > div:first-child { padding: 20px; }
  .home-projects p.text-2xl { font-size: 20px; line-height: 1.5; }
  #faq-section .container { padding-block: 36px; }

  .page-services section[id] .grid > div[class*="p-8"] { padding: 28px 20px; }
  .page-services section[id] .grid > div.h-64 { height: 210px; }
  .page-services section[id] h2 { font-size: 28px; line-height: 1.2; margin-bottom: 20px; }
  .service-details { margin-bottom: 24px; }
  .service-details > summary { display: list-item; min-height: 44px; padding-block: 12px; color: #45438b; font-weight: 600; cursor: pointer; }
  .service-details[open] > summary { margin-bottom: 12px; }
  .service-details > p { margin-bottom: 20px; }
  .service-details > ul { margin-bottom: 0; }
  .specialist-services .grid > div { padding: 0; }
  .specialist-services .group { padding: 24px 0; }
  .specialist-services .group > .flex { flex-direction: row; gap: 14px; }
  .specialist-services .group > .flex > div:first-child { width: 44px; height: 44px; }
  .specialist-services .group > .flex > div:last-child { min-width: 0; flex: 1; }
  .specialist-services .group .service-details { margin-bottom: 0; }
  .specialist-services .container > div:first-child > p:last-child { font-size: 16px; }
  .specialist-services h2 { font-size: 32px; }
  .specialist-services .container > div:first-child { margin-bottom: 28px; }

  .page-about .about-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .about-stats > div > div:first-child { font-size: 28px; }
  .about-stats > div > div:last-child { font-size: 12px; line-height: 1.4; }
  .page-about .grid > a.group { flex-direction: row; gap: 14px; padding: 20px; }
  .page-about .grid { gap: 24px; }
  .page-about .about-values > div { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px 14px; text-align: left; }
  .page-about .about-values > div > div:first-child { grid-row: 1 / 3; width: 44px; height: 44px; margin: 0; }
  .page-about .about-values svg { width: 24px; height: 24px; }
  .page-about .about-values h3 { margin: 0; }
  .page-about .about-values p { font-size: 14px; line-height: 1.6; }
  #contact-form form { padding: 20px; }
  #contact-form button[type="submit"] { width: 100%; min-height: 48px; }
  .page-project-detail main > main > div:first-child h1 { font-size: 32px; }
  .page-project-detail main > main > div:first-child .grid { gap: 24px; }
  .page-projects main > main > div:first-child p { font-size: 16px; }
  .page-legal .mobile-section-links { margin-bottom: 0; }
  .page-404 main h1 { font-size: 38px; }
}
