/* Home only. Reuse the first existing layer so route-loaded CSS keeps the same priority. */
@layer mobile-navigation {
  .home-claim-token { display: contents; }
  .hero-touch-hint { display: none; }
  body[data-page-type="home"] #hero.mobile-face-cached .face-video { opacity: 0 !important; transition: none !important; }
  body[data-page-type="home"] #hero.mobile-face-resuming .face-video { opacity: var(--mobile-face-resume-opacity, 1) !important; transition: none !important; }
  body[data-page-type="home"] #hero .face-pose-cache { position: absolute; top: 0; height: 100%; z-index: 2; pointer-events: none; transition: opacity .18s var(--ease-out); }
  @media (max-width: 767px) {
    body[data-page-type="home"] { --home-mobile-unit: calc(100vw / 32); --home-mobile-inset: calc(var(--home-mobile-unit) * 1.5); }

    body[data-page-type="home"] #hero { touch-action: pan-y pinch-zoom; --hero-figma-unit: min(calc(100vw / 402), calc(100svh / 874)); }
    body[data-page-type="home"] #hero .hero-content {
      display: block !important;
      text-align: center !important;
      padding: 0 !important;
    }
    body[data-page-type="home"] #hero .hero-content::after { content: none; }
    body[data-page-type="home"] #hero .hero-profile-kicker {
      position: absolute !important;
      top: 12.58581% !important;
      left: 0; right: 0;
      display: flex; align-items: center; justify-content: center;
      width: max-content;
      gap: calc(var(--hero-figma-unit) * 10) !important;
      font-size: calc(var(--hero-figma-unit) * 12) !important;
      font-weight: 500 !important;
      letter-spacing: -.01em !important;
      margin: 0 auto !important;
      white-space: nowrap !important;
      line-height: calc(var(--hero-figma-unit) * 16) !important;
    }
    body[data-page-type="home"] #hero .hero-profile-kicker > span:not(.kicker-separator) { opacity: .8; }
    body[data-page-type="home"] #hero .kicker-separator { margin: 0 !important; font-size: 0 !important; display: block; width: calc(var(--hero-figma-unit) * 5); height: calc(var(--hero-figma-unit) * 8.66016); background: url('/assets/icons/hero-disciplines-separator.svg?__lange_release=a9ca366203d099ce7b110a8b') center / contain no-repeat; transform: scaleY(-1); }
    body[data-page-type="home"] #hero .hero-title {
      position: absolute !important;
      top: 16.933638% !important;
      left: 0; right: 0;
      width: 100% !important;
      max-width: none !important;
      margin: 0 !important;
      font-size: calc(var(--hero-figma-unit) * 48) !important;
      font-weight: 500 !important;
      line-height: calc(var(--hero-figma-unit) * 40) !important;
      text-align: center !important;
      align-items: center !important;
      letter-spacing: -.01em !important;
      word-spacing: 0 !important;
    }
    body[data-page-type="home"] #hero .claim-line { width: 100% !important; white-space: nowrap !important; }
    body[data-page-type="home"] #hero .home-claim-token { display: inline-block !important; margin-right: .2em !important; }
    body[data-page-type="home"] #hero .home-claim-token:not(:first-child) { margin-right: 0 !important; }
    body[data-page-type="home"] #hero .home-claim-token:last-child { display: block !important; margin: calc(var(--hero-figma-unit) * 6) 0 0 !important; }
    body[data-page-type="home"] #hero .home-claim-space { display: none !important; }
    body[data-page-type="home"] #hero .claim-word { text-align: center !important; height: calc(var(--hero-figma-unit) * 40) !important; margin: calc(var(--hero-figma-unit) * 5) auto 0 !important; }
    body[data-page-type="home"] #hero .claim-word-face { left: 50% !important; text-align: center !important; letter-spacing: -.01em !important; }
    body[data-page-type="home"] #hero .claim-word-front { transform: translate(-50%, 0) !important; }
    body[data-page-type="home"] #hero .claim-word-back { transform: translate(-50%, .16em) !important; }
    body[data-page-type="home"] #hero.is-cta-hover .claim-word-front { transform: translate(-50%, -.16em) !important; }
    body[data-page-type="home"] #hero.is-cta-hover .claim-word-back { transform: translate(-50%, 0) !important; }
    body[data-page-type="home"] #hero :is(.hero-title, .hero-profile-kicker) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
    body[data-page-type="home"] #hero .hero-cta { position: absolute !important; top: calc(93.592678% - .78rem) !important; left: 0; right: 0; width: max-content !important; margin: 0 auto !important; }
    body[data-page-type="home"] #hero .hero-touch-hint { display: block; position: absolute; z-index: 8; top: 80.892448%; left: calc(50% - var(--hero-figma-unit) * 59); right: auto; margin: 0 !important; width: max-content; font-family: 'PP Eiko', serif; font-weight: 300; font-style: italic; font-size: calc(var(--hero-figma-unit) * 20); line-height: calc(var(--hero-figma-unit) * 27); letter-spacing: -.01em; color: var(--ink); pointer-events: auto; user-select: none; -webkit-touch-callout: none; opacity: var(--hero-content-opacity, 1); }
    body[data-page-type="home"] #hero .video-stage {
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
      opacity: var(--hero-entry-opacity, 1) !important;
      top: 58.724256% !important;
      width: calc(var(--hero-figma-unit) * 808) !important;
      height: auto !important;
      max-width: none !important;
      max-height: none !important;
      aspect-ratio: 16 / 9 !important;
      box-shadow: none !important;
    }
    body[data-page-type="home"] #hero .hero-video { object-fit: cover !important; object-position: 50% 50% !important; transform: none !important; }
    body[data-page-type="home"] #hero.face-active:not(.face-entering):not(.face-returning) #heroVideo { opacity: 0 !important; transition: none !important; }
    body[data-page-type="home"] #hero :is(#heroVideo, .face-video) { transition: opacity .18s var(--ease-out) !important; }
    body[data-page-type="home"] #hero.face-returning #heroVideo { opacity: 1 !important; transition: none !important; }
    body[data-page-type="home"] #hero .video-stage::before, body[data-page-type="home"] #hero .video-stage::after { opacity: 0 !important; }

    /* HERO 3 composition only; the paragraph and About button keep their type. */
    body[data-page-type="home"] #hero .video-stage {
      top: calc(58.724256% + (var(--hero-figma-unit) * 209.25 - 58.724256%) * var(--vision-stage-progress, 0) + (50% - var(--hero-figma-unit) * 209.25) * var(--vision-band-stage-progress, 0)) !important;
    }
    body[data-page-type="home"] .intro-scroll-panel {
      align-items: flex-start !important;
      padding: calc(100svh * 380 / 874) calc(100vw * 23 / 402) 48px calc(100vw * 47 / 402) !important;
    }
    body[data-page-type="home"] .intro-scroll-copy {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) !important;
      grid-template-rows: auto auto !important;
      gap: 24px !important;
      width: 100% !important;
      max-width: none !important;
    }
    body[data-page-type="home"] :is(.intro-scroll-eyebrow, .intro-scroll-main, .intro-seo-copy) { grid-column: 1 !important; grid-row: auto !important; }
    body[data-page-type="home"] .intro-scroll-eyebrow { padding: 0 !important; font-size: min(calc(var(--home-mobile-unit) * 1.125), 14px) !important; }
    body[data-page-type="home"] .intro-scroll-text { margin: 0 !important; font-size: min(calc(var(--home-mobile-unit) * 2.4), 32px) !important; line-height: 1.15 !important; }
    body[data-page-type="home"] .intro-about-link { margin-top: 24px !important; margin-left: 0 !important; }
    body[data-page-type="home"] .intro-seo-copy {
      display: none !important;
      width: 100% !important;
      max-width: none !important;
      margin: 0 !important;
      padding: 0 !important;
      transform: none !important;
      font-size: min(calc(var(--home-mobile-unit) * 1.25), 16px) !important;
      line-height: 1.5 !important;
    }
    body[data-page-type="home"] .intro-seo-copy strong { margin-bottom: 12px !important; }
    body[data-page-type="home"] :is(.intro-scroll-text, .intro-about-link) { text-shadow: none; }
    body[data-page-type="home"] #hero .vision-marquee {
      position: absolute !important;
      left: 0 !important;
      right: 0 !important;
      z-index: 15;
      pointer-events: none;
      display: block !important;
      top: 52% !important;
      bottom: auto !important;
      height: min(calc(var(--home-mobile-unit) * 10), 160px) !important;
      opacity: var(--vision-marquee-opacity, 0) !important;
      transform: translateY(-50%) !important;
      overflow: hidden !important;
    }
    body[data-page-type="home"] #hero .vision-marquee-track {
      position: absolute !important;
      top: 50% !important;
      left: 50% !important;
      display: flex !important;
      width: max-content !important;
      align-items: center;
      animation: visionMarqueeLoop 29s linear infinite;
      animation-play-state: paused !important;
    }
    body[data-page-type="home"] #hero .vision-marquee.is-running .vision-marquee-track { animation-play-state: running !important; }
    body[data-page-type="home"] #hero .vision-marquee.is-reset .vision-marquee-track { animation: none; transform: translate3d(-25%, -50%, 0); }
    body[data-page-type="home"] #hero:not(.hero-entry-done) .vision-marquee-track { animation-play-state: paused !important; }
    body[data-page-type="home"] :is(#hero, .vision-target-line) .vision-line-group {
      display: flex !important;
      flex: 0 0 auto;
      align-items: center;
      white-space: nowrap;
      font-family: 'PP Eiko', 'Satoshi', serif !important;
      font-size: min(calc(var(--home-mobile-unit) * 6.4), 104px) !important;
      line-height: 1 !important;
      gap: 20px !important;
      padding-right: 20px !important;
      text-transform: lowercase;
    }
    body[data-page-type="home"] :is(#hero, .vision-target-line) .vision-line-separator { font-family: 'Satoshi', sans-serif; font-size: .34em; }

    @media (prefers-reduced-motion: no-preference) {
      /* Restore the original 190vh assembly and 45vh hold after the unchanged
         mobile media runway (335vh at 761–767px, 292vh below that). */
      body[data-page-type="home"] .hero-scroll-wrap { height: 570vh !important; min-height: calc(1780px + 235vh) !important; }
      body[data-page-type="home"] #hero .intro-scroll-word:not(.vision-keyword) {
        opacity: var(--vision-word-opacity, 1) !important;
        filter: blur(var(--vision-word-blur, 0px)) !important;
        transform: translate3d(0, var(--vision-word-y, 0px), 0) !important;
      }
      body[data-page-type="home"] #hero .vision-keyword {
        position: relative !important; z-index: 4; transform-origin: 50% 50%;
        transform: var(--vision-keyword-transform, none) !important;
        filter: var(--vision-keyword-filter, none) !important;
        opacity: var(--vision-keyword-opacity, 1) !important;
      }
      body[data-page-type="home"] #hero .vision-keyword::after { content: none !important; display: none !important; }
      body[data-page-type="home"] #hero .vision-keyword-source { opacity: calc(1 - var(--keyword-case, 0)) !important; }
      body[data-page-type="home"] #hero .vision-keyword-final {
        display: inline-block !important; position: absolute; top: 50%; left: 50%;
        white-space: nowrap; opacity: var(--keyword-case, 0); transform: translate(-50%, -50%);
      }
      body[data-page-type="home"] #hero .intro-scroll-eyebrow { opacity: calc(var(--scroll-panel-opacity, 0) * var(--vision-meta-opacity, 1)) !important; }
      body[data-page-type="home"] #hero .intro-about-link { opacity: calc(var(--about-link-opacity, 0) * var(--vision-meta-opacity, 1)) !important; }
      body[data-page-type="home"] #hero.vision-meta-hidden .intro-about-link { pointer-events: none !important; }
      body[data-page-type="home"] #hero .vision-assembly-layer {
        display: block !important; position: absolute; inset: 0; z-index: 15; overflow: hidden; pointer-events: none;
      }
      body[data-page-type="home"] #hero .vision-assembly-separator {
        position: absolute; display: block; color: #fff; font-family: 'Satoshi', sans-serif;
        font-size: calc(var(--home-mobile-unit) * 6.4 * .34); line-height: 1; opacity: 0;
        transform: translate3d(-50%, -50%, 0) scale(.82);
      }
      body[data-page-type="home"] .vision-target-line {
        display: block !important; position: fixed; top: 52%; left: 50%; z-index: -1;
        width: max-content; visibility: hidden; pointer-events: none; transform: translate(-50%, -50%);
      }
      body[data-page-type="home"] .vision-target-line > .vision-line-group { padding-right: 0 !important; }
      body[data-page-type="home"] #hero.vision-measuring .intro-scroll-panel { opacity: 1 !important; transform: none !important; }
      body[data-page-type="home"] #hero.vision-measuring .vision-keyword { opacity: 1 !important; filter: none !important; transform: none !important; }
      body[data-page-type="home"] #hero.vision-measuring .vision-keyword-source { opacity: 1 !important; }
      body[data-page-type="home"] #hero.vision-measuring .vision-keyword-final { opacity: 0 !important; }
      @media (max-width: 760px) {
        body[data-page-type="home"] .hero-scroll-wrap { height: 527vh !important; min-height: calc(1560px + 235vh) !important; }
      }
    }

    /* Trionn's mobile Work composition: centred intro, full-width cards and
       ordinary vertical page scrolling, with captions and CTA below the image. */
    body[data-page-type="home"] .work-sticky { padding-top: calc(var(--home-mobile-unit) * 10) !important; padding-bottom: 0 !important; }
    body[data-page-type="home"] .work-layout { padding-inline: var(--home-mobile-inset) !important; }
    body[data-page-type="home"] .work-left { margin-bottom: calc(var(--home-mobile-unit) * 5) !important; }
    body[data-page-type="home"] .work-left h2 { font-size: min(calc(var(--home-mobile-unit) * 2.5), 36px) !important; line-height: 1.12 !important; max-width: 14ch !important; text-align: center !important; margin-inline: auto !important; }
    body[data-page-type="home"] .work-viewport {
      width: 100% !important;
      overflow: visible !important;
      padding: 0 !important;
      scroll-snap-type: none !important;
      overscroll-behavior-x: auto;
      touch-action: pan-y pinch-zoom;
    }
    body[data-page-type="home"] .work-track {
      display: flex !important; flex-direction: column; align-items: stretch;
      width: 100% !important; gap: 0 !important; padding: 0 !important;
      scroll-snap-type: none !important;
    }
    body[data-page-type="home"] .project-card {
      flex: none !important; width: 100% !important; max-width: none !important;
      padding-block: calc(var(--home-mobile-unit) * 5) !important;
      border-bottom: 1px solid rgba(var(--black-rgb), .1);
      scroll-snap-align: none;
    }
    body[data-page-type="home"] .project-card::before { content: none !important; }
    body[data-page-type="home"] .project-thumb { aspect-ratio: 67 / 46 !important; }
    body[data-page-type="home"] .project-copy {
      display: flex !important; flex-direction: column; align-items: flex-start !important;
      gap: calc(var(--home-mobile-unit) * 3) !important; padding-top: var(--home-mobile-inset) !important;
    }
    body[data-page-type="home"] .project-copy > div { width: 100%; }
    body[data-page-type="home"] .project-copy .project-link { margin-left: 0 !important; margin-right: auto !important; align-self: flex-start !important; }
    body[data-page-type="home"] .project-copy h3 { font-size: min(calc(var(--home-mobile-unit) * 1.75), 24px) !important; line-height: 1.15 !important; }
    body[data-page-type="home"] .project-copy p { font-size: min(calc(var(--home-mobile-unit) * 1.25), 16px) !important; line-height: 1.45 !important; }
    /* Include the rail's former bottom space in the invitation so the title
       and button are centred in the whole remaining light surface. */
    body[data-page-type="home"] .work-end-panel { flex: none !important; width: 100% !important; padding: calc(var(--home-mobile-unit) * 10) 0 !important; min-height: 0 !important; height: auto !important; align-self: stretch; justify-content: center !important; align-items: center !important; text-align: center !important; }
    body[data-page-type="home"] .work-end-panel h2 { font-size: min(calc(var(--home-mobile-unit) * 2.25), 30px) !important; line-height: 1.15 !important; margin-inline: auto !important; }
    body[data-page-type="home"] .work-end-panel .work-end-cta { width: max-content !important; align-self: center !important; margin-inline: auto !important; }

    @media (prefers-reduced-motion: no-preference) {
      /* Same six-row shutter, with a shorter mobile entry before the cards. */
      body[data-page-type="home"] .work-section {
        z-index: 90 !important; margin-top: -100svh !important; padding-top: 40svh !important;
        background: transparent !important; isolation: isolate !important;
      }
      body[data-page-type="home"] .work-section::before,
      body[data-page-type="home"] .work-section::after { content: none !important; display: none !important; }
      body[data-page-type="home"] .work-bg-wipe {
        display: block !important; position: absolute !important; inset: 0 !important;
        z-index: 0 !important; width: 100% !important; height: 100% !important;
        overflow: hidden !important; pointer-events: none !important;
      }
      body[data-page-type="home"] .is-work-entering .work-bg-wipe { position: fixed !important; height: 100svh !important; }
      body[data-page-type="home"] .work-bg-band {
        position: absolute !important; left: 0 !important; display: block !important;
        width: 100% !important; height: calc(100% / 6 + 1px) !important; overflow: hidden !important;
      }
      body[data-page-type="home"] .work-bg-band::before {
        content: '' !important; position: absolute !important; inset: -1px 0 !important;
        transform: translate3d(0, calc((1 - var(--band-progress, 0)) * 110%), 0) !important;
      }
      body[data-page-type="home"] .work-bg-band:nth-child(1) { top: 0; --band-progress: var(--work-band-0, 0); }
      body[data-page-type="home"] .work-bg-band:nth-child(2) { top: calc(100% / 6); --band-progress: var(--work-band-1, 0); }
      body[data-page-type="home"] .work-bg-band:nth-child(3) { top: calc(200% / 6); --band-progress: var(--work-band-2, 0); }
      body[data-page-type="home"] .work-bg-band:nth-child(4) { top: 50%; --band-progress: var(--work-band-3, 0); }
      body[data-page-type="home"] .work-bg-band:nth-child(5) { top: calc(400% / 6); --band-progress: var(--work-band-4, 0); }
      body[data-page-type="home"] .work-bg-band:nth-child(6) { top: calc(500% / 6); --band-progress: var(--work-band-5, 0); }
      body[data-page-type="home"] .work-bg-wipe::after {
        content: '' !important; position: absolute !important; inset: 0 !important;
        background: var(--projects-paper) !important; opacity: var(--work-solid-bg, 0) !important;
      }
      body[data-page-type="home"] .work-layout { opacity: var(--work-content-opacity, 0) !important; }
      html.services-enhanced body[data-page-type="home"] .immersive-services__sticky { height: 100svh !important; min-height: 0 !important; }
      body[data-page-type="home"] .immersive-services.is-work-handoff { overflow: visible !important; background: transparent !important; }
      body[data-page-type="home"] .immersive-services.is-work-handoff .immersive-services__sticky {
        position: fixed !important; top: 0 !important; left: 0 !important;
        background: #000000 !important;
      }
    }

    body[data-page-type="home"] .immersive-services { --services-copy-inset: calc(var(--home-mobile-unit) * 2.5) !important; }
    body[data-page-type="home"] .immersive-services__media-stage {
      top: 50% !important;
      width: 100% !important;
      height: calc(100vw * .86) !important;
      max-width: none !important;
      max-height: 48svh !important;
      aspect-ratio: auto !important;
    }
    /* Shared camera across all four seams; the long third morph needs the right edge. */
    body[data-page-type="home"] .immersive-services__video { object-fit: cover !important; object-position: 52% 50% !important; }
    body[data-page-type="home"] .immersive-services__intro-title {
      top: 50% !important;
      left: 50% !important;
      width: calc(100% - var(--services-copy-inset) * 2) !important;
      font-size: min(calc(var(--home-mobile-unit) * 2.5), 36px) !important;
      line-height: 1.1 !important;
      text-align: center !important;
      transform: translate3d(-50%, calc(-50% + var(--services-title-y, 34px)), 0) !important;
    }
    body[data-page-type="home"] .immersive-services__copy {
      top: 50% !important;
      left: 50% !important;
      right: auto !important;
      width: calc(100% - var(--services-copy-inset) * 2) !important;
      padding: 16px 18px !important;
      background: rgba(0, 0, 0, .30) !important;
      /* Bounded lateral arc; the hold still centres the complete text block. */
      transform: translate3d(calc(-50% + var(--services-copy-x, 0px)), calc(-50% + var(--services-copy-y, 0px)), 0) !important;
    }
    body[data-page-type="home"] .immersive-services__copy h3 { font-size: min(calc(var(--home-mobile-unit) * 2.25), 30px) !important; line-height: 1.12 !important; }
    body[data-page-type="home"] .immersive-services__copy > p { margin-top: 16px !important; font-size: min(calc(var(--home-mobile-unit) * 1.25), 16px) !important; line-height: 1.45 !important; }
  }
  @media (max-width: 767px) and (max-height: 650px) {
    body[data-page-type="home"] .intro-scroll-panel { align-items: flex-start !important; overflow-y: auto !important; pointer-events: auto !important; }
  }
  @media (max-width: 767px) and (prefers-reduced-motion: reduce) {
    body[data-page-type="home"] #hero .vision-marquee-track { animation: none !important; transform: translateY(-50%); }
  }
}
@media (max-width: 767px) {
  /* Same loop and duplicated graphic line as the original marquee. */
  @keyframes visionMarqueeLoop {
    from { transform: translate3d(-25%, -50%, 0); }
    to { transform: translate3d(-75%, -50%, 0); }
  }
}

