/* Mobile styles loaded after the shared and home styles. */
@media screen and (max-width:840px) {
  html { scroll-padding-top:88px; -webkit-text-size-adjust:100%; }
  body { font-family:Arial,"Helvetica Neue",sans-serif; font-size:1rem; line-height:1.65; }
  .header-inner { width:calc(100% - 24px); min-height:76px; gap:8px; }
  .header-inner .brand { flex:1; min-width:0; }
  .header-inner .brand img { width:clamp(110px,34vw,180px); height:auto; }
  .nav-tools { gap:6px; }
  .language-switch { padding:2px; }
  .language-switch a,.language-switch span { min-width:34px; min-height:44px; font-size:.875rem; }
  .menu-toggle { flex:none; width:44px; height:44px; }
  .desktop-nav { top:76px; max-height:calc(100dvh - 76px); padding:12px 16px 88px; }
  .desktop-nav>a { white-space:normal; line-height:1.4; min-height:48px; }
  .section-inner,.quality-hero-copy { width:calc(100% - 32px); }
  main :is(.split,.hero-grid,.quote-layout,.sector-grid,.card-grid,.certificate-grid,.news-grid,.process-grid) { grid-template-columns:minmax(0,1fr); gap:24px; }
  main :is(.split,.hero-grid,.quote-layout)>* { min-width:0; }
  main .section { padding-block:44px; }
  main h1,main .quality-hero-copy h1,main .sector-hero .quality-hero-copy h1,
  main .showcase-hero .quality-hero-copy h1 {
    font-size:clamp(1.875rem,6.5vw,2.75rem) !important; line-height:1.18 !important;
    letter-spacing:-.025em; white-space:normal; overflow-wrap:break-word; max-width:100%;
  }
  main h2,main .section h2,main h2.selected-title-sparkle {
    font-size:clamp(1.625rem,5.8vw,2.25rem) !important; line-height:1.22 !important; letter-spacing:-.02em; overflow-wrap:break-word;
  }
  main h3 { line-height:1.3; overflow-wrap:break-word; }
  main p,main .section-lead,main .hero-lead,main .quality-hero-copy>p:not(.eyebrow) {
    font-size:1rem; line-height:1.7; max-width:100%;
  }
  main :is(.eyebrow,.kicker),body[data-page="home"] main>.section .kicker,
  main :is(.eyebrow,.kicker).selected-title-sparkle {
    font-family:Arial,"Helvetica Neue",sans-serif !important;
    font-size:.875rem !important; line-height:1.5; letter-spacing:.08em;
  }
  main .selected-title-sparkle,body[data-page="home"] :is(.home-hero .eyebrow,main>.section .kicker),
  main .product-name {
    animation:none !important; background-image:none !important;
    -webkit-text-fill-color:currentColor !important; text-shadow:none !important;
  }
  .hero-actions { flex-direction:column; align-items:stretch; gap:12px; }
  .hero-actions .button,.cta .button { width:100%; min-height:52px; padding:14px 18px; font-size:1rem; line-height:1.4; text-align:center; white-space:normal; }
  .cta { gap:24px; }
  .metrics>div { grid-template-columns:1fr; gap:4px; padding-block:18px; }
  .metrics strong { font-size:1.75rem; line-height:1.2; white-space:normal; }
  .metrics span { font-size:1rem; line-height:1.5; }
  .privacy-hero .quality-hero-copy h1,.privacy-hero .quality-hero-copy>p:not(.eyebrow) { max-width:100%; }
  .history-image-scroll { overscroll-behavior-x:contain; touch-action:pan-x pan-y; }
  .history-caption p { font-size:1rem; }
  .footer-grid { grid-template-columns:minmax(0,1fr); gap:28px; }
  footer a,footer p { overflow-wrap:break-word; }
  footer small,.footer-bottom { font-size:.875rem; line-height:1.6; }
  .quick-contact a { font-size:1rem; }
  /* Keep distracting text/logo glints quiet; the backdrop remains animated. */
  .floating-sector-icon,.floating-sector-label {
    animation:none !important;
  }
  .floating-sector-icon { transform:none !important; will-change:auto; }
  .an-background-spark,.an-halo,.an-arrival-light,.an-shine,.an-star,.an-replay { display:none !important; }
  .an-scene-texture { filter:none; }
  .site-header,.site-header.scrolled,.site-header.menu-visible,.materials-photo .material-list span { backdrop-filter:none; }
  .floating-sector-label { text-shadow:none; }

  /* Landscape photographs first: unfiltered images, then readable copy. */
  body[data-page] main .quality-hero {
    --mobile-hero-bg:#081b35; --mobile-hero-ink:#fff;
    --mobile-hero-muted:#e3edf9; --mobile-hero-label:#b9e1ff;
    position:relative; display:grid; grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto; align-items:stretch;
    min-height:0; height:auto; padding:0; margin-top:76px;
    background:var(--mobile-hero-bg); color:var(--mobile-hero-ink);
  }
  body[data-page] main .quality-hero>.quality-hero-image {
    position:relative; inset:auto; order:0; grid-area:1/1;
    display:block; width:100%; height:auto; min-height:0; max-height:none;
    aspect-ratio:auto; object-fit:contain; object-position:center;
    margin:0; background:#fff;
    filter:none; opacity:1; mix-blend-mode:normal;
    -webkit-mask-image:none; mask-image:none;
  }
  body[data-page] main .quality-hero>.quality-hero-shade {
    display:none; background:none; opacity:0;
  }
  body[data-page] main .quality-hero>.quality-hero-copy {
    position:relative; inset:auto; order:0; grid-area:2/1;
    width:calc(100% - 32px); min-width:0; margin:0 auto;
    padding:24px 0 32px; transform:none; z-index:2;
    background:transparent; text-shadow:none;
  }
  body[data-page] main .quality-hero>.quality-hero-copy h1 {
    max-width:100%; color:var(--mobile-hero-ink); margin:12px 0 16px;
  }
  body[data-page] main .quality-hero>.quality-hero-copy>p:not(.eyebrow) {
    max-width:100%; color:var(--mobile-hero-muted); margin:0 0 20px;
  }
  body[data-page] main .quality-hero>.quality-hero-copy>:last-child { margin-bottom:0; }
  body[data-page] main .quality-hero .selected-title-sparkle {
    --title-ink:var(--mobile-hero-label); color:var(--mobile-hero-label);
  }
  body[data-page] main .quality-hero>.quality-image-credit {
    position:relative; inset:auto; grid-area:3/1; width:calc(100% - 32px);
    margin:0 auto; padding:0 0 20px; font-size:.875rem; line-height:1.5;
    color:var(--mobile-hero-muted);
  }
  body[data-page="quality"] main .quality-hero {
    --mobile-hero-bg:#f4f7fa; --mobile-hero-ink:#143957;
    --mobile-hero-muted:#29465f; --mobile-hero-label:#0868c2;
  }
  /* These two photographs have empty side space: enlarge their actual subject. */
  body[data-page="quality"] main .quality-hero>.quality-hero-image,
  body[data-page="news"] main .quality-hero>.quality-hero-image {
    aspect-ratio:3/2; height:auto; object-fit:cover;
  }
  body[data-page="quality"] main .quality-hero>.quality-hero-image { object-position:right center; }
  body[data-page="news"] main .quality-hero>.quality-hero-image { object-position:25% center; }

  /* Expertise uses the complete photograph, with the headings and lead in flow. */
  body[data-page="expertise"] main .expertise-intro-hero { margin-top:76px; padding-top:0; }
  body[data-page="expertise"] .expertise-visual { display:flex; flex-direction:column; }
  body[data-page="expertise"] .expertise-visual .expertise-full-photo {
    order:0; display:block; width:100%; height:auto; min-height:0;
    object-fit:contain; aspect-ratio:auto;
    filter:none; opacity:1; mix-blend-mode:normal;
    -webkit-mask-image:none; mask-image:none;
  }
  body[data-page="expertise"] .expertise-visual .expertise-heading {
    position:relative; inset:auto; order:1; transform:none; width:calc(100% - 32px);
    margin:0 auto; padding:24px 0 16px;
  }
  body[data-page="expertise"] .expertise-visual .expertise-heading h1 { margin:12px 0 0; }
  body[data-page="expertise"] .expertise-caption-band {
    order:2; min-height:0; margin:0; padding:0 0 28px;
  }
  body[data-page="expertise"] .expertise-photo-lead { min-height:0; padding:0; }

  /* The responsive picture uses lossless alpha cutouts on mobile. */
  .product-gallery-band .product-stage .product-photo-base {
    opacity:1; background:transparent; mix-blend-mode:normal; filter:none;
    -webkit-mask-image:none; mask-image:none;
  }
  .product-gallery-band .product-stage .product-foreground {
    display:none;
  }

  /* Home: the logo, title, proof points and actions now follow document flow. */
  body[data-page="home"] .home-hero-cinema.home-animation-trial {
    display:flex; flex-direction:column; min-height:0; padding:16px 0;
    margin-top:76px; gap:16px;
  }
  body[data-page="home"] .home-animation-trial .home-hero-media {
    position:relative; inset:auto; order:0; width:100%; height:auto; margin:0;
    background:transparent; overflow:visible;
  }
  body[data-page="home"] .home-animation-trial .animation-scene {
    position:relative; inset:auto; display:block; width:100%; height:auto; padding:0 16px;
  }
  body[data-page="home"] .home-animation-trial .animation-scene .an-logo-wrap {
    width:min(90%,480px); aspect-ratio:auto; margin:auto; opacity:1;
    transform:none; animation:none; will-change:auto;
  }
  body[data-page="home"] .home-animation-trial .an-logo {
    width:100%; height:auto; background:transparent; filter:none;
  }
  body[data-page="home"] .home-animation-trial .home-logo-caption {
    position:static; width:100%; margin:16px 0 0; text-align:center;
  }
  body[data-page="home"] .home-animation-trial .home-logo-caption h1 {
    font-size:clamp(1.875rem,6.5vw,2.75rem); line-height:1.2;
    white-space:normal; overflow-wrap:break-word; letter-spacing:-.025em; text-shadow:none;
  }
  body[data-page="home"] .home-animation-trial>.home-proof-position {
    position:relative; inset:auto; order:1; display:flex; flex-direction:column;
    align-items:stretch; width:calc(100% - 32px); margin:0 auto; gap:16px;
  }
  body[data-page="home"] .home-animation-trial .home-proof-position .hero-proof {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px;
    width:100%; margin:0; padding:12px 0 0; border-top:1px solid #ffffff40;
  }
  body[data-page="home"] .home-animation-trial .hero-proof li { min-width:0; gap:4px; padding:0; border:0; }
  body[data-page="home"] .home-animation-trial .hero-proof li:first-child { grid-column:1/-1; width:auto; }
  body[data-page="home"] .home-animation-trial .hero-proof strong { font-size:1.5rem; line-height:1.3; white-space:normal; }
  body[data-page="home"] .home-animation-trial .hero-proof span { font-size:1rem; line-height:1.5; max-width:100%; }
  body[data-page="home"] .home-animation-trial .home-proof-position .home-hero-details {
    position:static; inset:auto; width:100%; max-width:none; transform:none; margin:0;
  }
  body[data-page="home"] .home-animation-trial .home-proof-position .hero-actions {
    display:flex; flex-direction:column; align-items:stretch; gap:12px; margin:0;
  }
}

@media screen and (max-width:840px) {
  body[data-page="home"] .home-proof-position .motion-toggle {
    position:static; align-self:flex-end; margin:0; flex:none;
  }
}

@media(max-width:840px) {
 body[data-page="home"] .home-hero-cinema.home-animation-trial { padding:10px 0 14px; gap:12px; }
 body[data-page="home"] .home-animation-trial .home-logo-caption { margin-top:12px; }
 body[data-page="home"] .home-animation-trial .home-logo-caption h1 { font-size:clamp(1.35rem,5.3vw,2.2rem); line-height:1.2; text-wrap:balance; }
 body[data-page="home"] .home-animation-trial>.home-proof-position { gap:12px; }
}
