/* A mobile reading path: reel, proof, swipeable selection, then the full library. */
.mobile-carousel-controls{display:none}
@media(max-width:700px){
  :root{--gutter:18px;scroll-padding-top:76px}
  .site-header{height:62px;padding-inline:var(--gutter);gap:12px}
  .site-header .wordmark{font-size:32px;flex:none}
  .site-header .wordmark>span{font-size:25px}
  .header-actions{gap:0;flex:none}
  .header-actions :is([data-theme-toggle],[data-motion-toggle],.lang-toggle){width:44px;min-width:44px;height:44px;min-height:44px;flex:none}
  body[data-view="home"] .hero{padding-top:16px}
  body[data-view="home"] .hero-eyebrow{max-width:100%;font-size:8px;line-height:1.5}
  body[data-view="home"] .hero h1{font-size:clamp(44px,12.8vw,82px);line-height:.98;padding:19px 0 23px}
  html[lang="es"] body[data-view="home"] .hero h1{font-size:clamp(40px,11.8vw,76px)}
  body[data-view="home"] .hero-asterisk{font-size:105px;right:0;top:2px}
  body[data-view="home"] .hero-layout{gap:15px}
  body[data-view="home"] .hero-reel{margin-inline:-6px;aspect-ratio:16/9;border-radius:6px}
  body[data-view="home"] .hero-note>p{font-size:13px;line-height:1.6;margin-bottom:13px;max-width:440px}
  body[data-view="home"] .hero-note .button{min-height:44px;padding:12px 17px;font-size:11px}
  body[data-view="home"] .reel-expand{min-height:44px;bottom:4px;left:12px}
  body[data-view="home"] .pause-control{width:44px;height:44px;right:9px;bottom:9px}
  body[data-view="home"] .proof-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 12px;padding-block:21px 13px;margin-top:22px}
  body[data-view="home"] .proof-strip strong{font-size:clamp(29px,8.5vw,42px)}
  body[data-view="home"] .proof-strip>div{gap:7px;min-width:0}
  body[data-view="home"] .proof-strip>div>span{font-size:9px;line-height:1.5;max-width:120px}
  body[data-view="home"] .proof-note{grid-column:1/-1;width:100%;max-width:none;min-height:44px;padding:9px 0 0;border-top:1px solid var(--line);font-size:10px}
  body[data-view="home"] .section-pad{padding-block:42px}
  body[data-view="home"] .work-section{min-width:0}
  body[data-view="home"] .section-top{margin-bottom:17px}
  body[data-view="home"] .section-heading{margin-bottom:22px}
  body[data-view="home"] .section-heading h2{font-size:clamp(35px,10vw,48px)}
  body[data-view="home"] .section-heading>p{font-size:12px;line-height:1.6;margin-top:13px;max-width:320px}

  /* Native scrolling owns the gesture. There is no drag handler or wheel interception. */
  body[data-view="home"] .featured-grid{
    display:flex;align-items:flex-start;gap:12px;
    margin-inline:calc(-1 * var(--gutter));padding:0 var(--gutter) 8px;
    overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
    scroll-padding-inline:var(--gutter);scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  body[data-view="home"] .featured-grid::-webkit-scrollbar{display:none}
  body[data-view="home"] .featured-grid::after{content:"";flex:0 0 12px;align-self:stretch}
  body[data-view="home"] .featured-grid>.project-card{flex:0 0 calc(100% - 24px);min-width:0;scroll-snap-align:start;scroll-snap-stop:normal}
  body[data-view="home"] .featured-grid .project-visual{aspect-ratio:16/10}
  body[data-view="home"] .featured-grid .project-visual.reel-triptych{aspect-ratio:27/16}
  body[data-view="home"] .featured-grid .project-visual.portrait{aspect-ratio:9/16;max-height:64svh;max-width:36svh;margin-inline:auto}
  body[data-view="home"] .featured-grid .project-caption{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;margin-top:15px}
  body[data-view="home"] .featured-grid .project-caption h3{font-size:22px;line-height:1.2}
  body[data-view="home"] .featured-grid .project-caption p{font-size:10px;line-height:1.5}
  body[data-view="home"] .featured-grid .project-tagline{font-size:12px!important;line-height:1.5!important}
  body[data-view="home"] .featured-grid .project-stat{font-size:26px;line-height:1.1}
  body[data-view="home"] .featured-grid .project-stat small{font-size:8px;max-width:91px;line-height:1.5}
  body[data-view="home"] .featured-grid .project-open{width:36px;height:36px}
  .mobile-carousel-controls{display:block;margin-top:12px}
  .mobile-carousel-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px}
  .mobile-carousel-hint{font-size:10px;line-height:1.4;color:var(--muted)}
  .mobile-carousel-navigation{display:flex;align-items:center;gap:7px;flex:none}
  .mobile-carousel-position{font:10px/1 ui-monospace,monospace;font-variant-numeric:tabular-nums;margin-right:4px;white-space:nowrap}
  .mobile-carousel-button{display:grid;place-items:center;width:44px;height:44px;min-width:44px;padding:0;background:transparent;color:var(--ink);border:1px solid var(--line);border-radius:50%;font-size:19px;line-height:1}
  .mobile-carousel-button:hover:not(:disabled){background:var(--theme-control-hover,#e1e5fa);color:var(--blue)}
  .mobile-carousel-button:disabled{opacity:.32;cursor:default}
  .mobile-carousel-all{display:flex;justify-content:space-between;align-items:center;gap:15px;min-height:48px;margin-top:15px;padding-block:11px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:12px}
  .mobile-carousel-all>span:last-child{font-size:18px}
  .mobile-carousel-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  body[data-view="home"] .work-index{margin-top:29px;padding-top:0;border-top:0;scroll-margin-top:83px}
  body[data-view="home"] .index-heading{margin-bottom:20px}
  body[data-view="home"] .index-heading h3{font-size:24px}
  body[data-view="home"] .filter-list{gap:7px;margin-bottom:17px}
  body[data-view="home"] .filter-list button{min-height:44px;font-size:10px;padding:10px 13px}
  body[data-view="home"] .index-project{min-height:77px;gap:14px}
  body[data-view="home"] .index-project>img{width:82px;height:56px}
  body[data-view="home"] .index-project h4{font-size:13px}
  body[data-view="home"] .index-project p{font-size:10px}
  body[data-view="home"] .services-intro h2,
  body[data-view="home"] .process-copy h2{font-size:clamp(33px,9.5vw,44px)}
  body[data-view="home"] .service-row summary{padding-block:20px;min-height:74px}
  body[data-view="home"] .service-row h3{font-size:clamp(24px,6.8vw,34px)}
  body[data-view="home"] .service-body{margin-left:28px}
  body[data-view="home"] .service-body>a{display:inline-flex;align-items:center;min-height:44px;font-size:11px}
  body[data-view="home"] .process-section{gap:25px}
  body[data-view="home"] .comparison-caption button{width:44px;height:44px;flex:none}
  body[data-view="home"] .about-section{gap:25px}
  body[data-view="home"] .about-copy h2{font-size:33px}
  body[data-view="home"] .contact-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  body[data-view="home"] .contact-actions .button{padding:13px 14px;min-height:48px;gap:14px}
  body[data-view="home"] .contact-email{grid-column:1/-1;min-height:44px;width:max-content;max-width:100%;overflow-wrap:anywhere}

  /* This component's explicit chapter state takes priority over the shared desktop observer. */
  :root .mobile-nav[data-mobile-nav] a[data-mobile-active][data-section]{position:relative;background:transparent;color:var(--muted);min-height:48px;font-size:10px;gap:5px}
  :root .mobile-nav[data-mobile-nav] a[data-mobile-active="true"][data-section]{background:var(--theme-control-hover,#e1e5fa);color:var(--blue)}
  .mobile-nav[data-mobile-nav] a:after{content:"";position:absolute;top:0;left:calc(50% - 8px);width:16px;height:2px;background:currentColor;opacity:0;transform:translateY(-2px)}
  .mobile-nav[data-mobile-nav] a[data-mobile-active="true"]:after{opacity:1}
  .mobile-nav[data-mobile-nav] svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
  .mobile-nav[data-mobile-nav] a>span:first-child{font-size:10px;line-height:1}
  :root .mobile-nav[data-mobile-nav] a[data-section="contact"]{color:var(--blue)}
  .site-footer{padding-bottom:calc(97px + env(safe-area-inset-bottom))}
  .motion-paused .featured-grid{scroll-behavior:auto}
}
@media(max-width:360px){
  :root{--gutter:16px}
  .site-header{gap:8px}
  .site-header .wordmark{font-size:30px}
  body[data-view="home"] .featured-grid .project-caption{gap:8px}
  body[data-view="home"] .featured-grid .project-caption h3{font-size:20px}
  body[data-view="home"] .featured-grid .project-stat{font-size:23px}
  body[data-view="home"] .featured-grid .project-stat small{max-width:79px}
  .mobile-carousel-toolbar{gap:8px}
  .mobile-carousel-navigation{gap:5px}
  .mobile-carousel-hint{font-size:9px;max-width:120px}
}
@media(max-width:700px) and (prefers-reduced-motion:reduce){.featured-grid{scroll-behavior:auto}}
