/* FCW V39 — targeted mobile corrections, draggable logo rails, and project showcase.
   Layered over V38; all approved desktop page designs remain intact. */
*, *::before, *::after {box-sizing:border-box;}

/* Client + school logos: auto-scrolling remains, but rail uses actual native scroll position. */
body.v15-body .v15-logo-area .marquee-viewport {
  overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;
  scrollbar-width:none;-ms-overflow-style:none;
  touch-action:pan-x pan-y;scroll-behavior:auto;
  cursor:grab;outline-offset:3px;
}
body.v15-body .v15-logo-area .marquee-viewport::-webkit-scrollbar{display:none;}
body.v15-body .v15-logo-area .marquee-viewport.is-dragging{cursor:grabbing;user-select:none;}
body.v15-body .v15-logo-area .marquee-viewport .marquee-mover{animation:none!important;transform:none!important;will-change:auto;}
body.v15-body .v15-logo-head{display:flex;justify-content:space-between;align-items:center;gap:14px;}
.fcw39-rail-hint{font-size:.62rem;letter-spacing:.12em;color:#56c3ff;font-weight:850;white-space:nowrap;}

/* Multi-project hero presentation — genuine completed project photos, never mockups. */
body[data-page="home"] .v18-intro-photo.fcw39-showcase{position:relative;isolation:isolate;overflow:visible;}
body[data-page="home"] .fcw39-slides{width:100%;height:100%;position:relative;overflow:hidden;border-radius:17px;background:#060d17;}
body[data-page="home"] .fcw39-slide{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity 850ms ease,visibility 850ms ease;display:flex;flex-direction:column;align-items:center;justify-content:center;}
body[data-page="home"] .fcw39-slide.is-active{opacity:1;visibility:visible;z-index:1;}
body[data-page="home"] .fcw39-slide img,
body[data-page="home"] .v18-intro-photo.fcw39-showcase .fcw39-slide img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;transform:none!important;filter:saturate(1.06) contrast(1.045);background:#091423;}
.fcw39-project-label{position:absolute;bottom:12px;left:12px;right:12px;width:max-content;max-width:calc(100% - 24px);z-index:2;font-size:.66rem;letter-spacing:.1em;font-weight:900;padding:8px 11px;color:#fff;background:rgba(3,16,31,.84);border:1px solid rgba(127,210,255,.34);border-radius:9px;backdrop-filter:blur(8px);pointer-events:none;}
.fcw39-project-label b{font-size:.61rem;color:#5acaff;font-weight:900;margin-left:8px;}
.fcw39-slider-controls{position:absolute;z-index:4;bottom:-46px;left:0;right:0;display:flex;align-items:center;justify-content:center;gap:15px;}
.fcw39-slide-arrow{appearance:none;border:1px solid rgba(102,198,255,.65);background:#081d32;color:#d9f6ff;width:32px;height:32px;border-radius:50%;font-size:23px;line-height:1;display:grid;place-items:center;cursor:pointer;}
.fcw39-slide-arrow:hover,.fcw39-slide-arrow:focus-visible{background:#1277b4;color:#fff;}
.fcw39-slider-dots{display:flex;align-items:center;gap:8px;}
.fcw39-slider-dots button{appearance:none;padding:0;border:1px solid #589dc9;background:#214058;border-radius:100px;width:9px;height:9px;cursor:pointer;transition:width .24s ease,background .24s ease;}
.fcw39-slider-dots button.is-active{width:28px;background:#38baff;border-color:#9bdeff;}
body[data-page="home"] .v15-intro{padding-bottom:90px;}

/* Facility photo: preserve the entire installed West Herr wall, no crop. */
.fcw39-west-facility{background:#091927;isolation:isolate;}
.fcw39-west-facility::before{content:"";position:absolute;inset:-16px;background:url('assets/portfolio/west-herr-chevy-skyline-wall.webp') center/cover no-repeat;filter:blur(18px) brightness(.44);z-index:0;pointer-events:none;}
.fcw39-west-facility>img{position:relative;z-index:1;object-fit:contain!important;object-position:center!important;}
.fcw39-west-facility>.tag{z-index:2;}

/* Desktop client case studies remain a grid, with swipe navigation only on small screens. */
.fcw39-gallery-controls{display:none;}

@media(max-width:860px){
  /* The nth-child(even) desktop rule previously kept an almost-half-width image on mobile. */
  body.fcw36-services-body .fcw36-service-story,
  body.fcw36-services-body .fcw36-service-story:nth-child(even){grid-template-columns:minmax(0,1fr)!important;}
  body.fcw36-services-body .fcw36-service-story .fcw36-story-photo,
  body.fcw36-services-body .fcw36-service-story:nth-child(even) .fcw36-story-photo{order:0;width:100%;min-width:0;}
  body.fcw36-services-body .fcw36-service-story .fcw36-story-copy{order:1;min-width:0;}
}
@media(max-width:760px){
  /* Image-led layout for Work, Commercial and Services. Caption moves below photo. */
  body.fcw36-work-body .fcw36-work-visual,
  body.fcw36-commercial-body .fcw36-commercial-visual,
  body.fcw36-services-body .fcw36-services-visual{display:grid;grid-template-columns:minmax(0,1fr);width:100%;min-width:0;gap:16px;}
  body.fcw36-work-body .fcw36-work-visual .stack,
  body.fcw36-commercial-body .fcw36-commercial-visual .side,
  body.fcw36-services-body .fcw36-services-visual .stack{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;gap:16px;}
  body.fcw36-work-body .fcw36-work-visual .fcw36-frame,
  body.fcw36-commercial-body .fcw36-commercial-visual .fcw36-frame,
  body.fcw36-services-body .fcw36-services-visual .fcw36-frame{
    height:auto!important;min-height:0!important;width:100%;display:flex;flex-direction:column;
    overflow:hidden;transform:none!important;background:#091b2c;
  }
  body.fcw36-work-body .fcw36-work-visual .fcw36-frame img,
  body.fcw36-commercial-body .fcw36-commercial-visual .fcw36-frame img,
  body.fcw36-services-body .fcw36-services-visual .fcw36-frame img{
    position:relative;width:100%;height:auto!important;aspect-ratio:1.53;object-fit:contain!important;object-position:center!important;background:#081726;
  }
  body.fcw36-work-body .fcw36-work-visual .fcw36-frame .tag,
  body.fcw36-commercial-body .fcw36-commercial-visual .fcw36-frame .tag,
  body.fcw36-services-body .fcw36-services-visual .fcw36-frame .tag{
    position:relative;inset:auto!important;left:auto!important;bottom:auto!important;right:auto!important;
    width:auto;max-width:100%;margin:0;padding:12px 15px;border-radius:0;
    background:linear-gradient(110deg,#0b223a,#0a192b);backdrop-filter:none;border:0;border-top:1px solid rgba(95,195,255,.2);
  }
  body.fcw36-work-body .fcw36-work-visual .fcw36-frame .tag strong,
  body.fcw36-commercial-body .fcw36-commercial-visual .fcw36-frame .tag strong,
  body.fcw36-services-body .fcw36-services-visual .fcw36-frame .tag strong{font-size:.91rem;line-height:1.25;}
  body.fcw36-services-body .fcw36-service-story{display:grid;width:100%;padding:12px;gap:18px;}
  body.fcw36-services-body .fcw36-story-photo{height:auto!important;min-height:0!important;width:100%;display:flex;flex-direction:column;}
  body.fcw36-services-body .fcw36-story-photo img{width:100%;height:auto;aspect-ratio:1.48;object-fit:contain;object-position:center;background:#101f30;}
  body.fcw36-services-body .fcw36-story-photo .label{position:relative;inset:auto;left:auto;bottom:auto;margin:0;border:0;border-radius:0;padding:10px 12px;background:#0c2032;backdrop-filter:none;}
  body.fcw36-services-body .fcw36-story-copy{padding:2px 8px 12px;}
  body.fcw36-services-body .fcw36-story-actions a{max-width:100%;}
  /* The West Herr photo above the service desk has a 1:1 natural aspect; keep it fully visible. */
  .fcw39-west-facility>img{aspect-ratio:1.1!important;object-fit:contain!important;}
  /* Prevent the four Our Work chips spilling beyond the dark section. */
  body.fcw36-work-body .fcw36-work-brandbar{padding:20px 0 28px;background:#071b30;overflow:hidden;}
  body.fcw36-work-body .fcw36-work-brandbar .fcw36-shell{width:min(100% - 34px,640px);max-width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px;margin:0 auto;}
  body.fcw36-work-body .fcw36-brand-chip{width:100%;min-width:0;min-height:110px;padding:16px 14px;font-size:clamp(.70rem,2.7vw,.89rem);line-height:1.42;overflow-wrap:break-word;hyphens:auto;border-radius:18px;}
  /* Photo thumbnails turn into an actual one-at-a-time swipe gallery with controls. */
  .fcw39-gallery-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;}
  .fcw39-gallery-controls button{appearance:none;border:1px solid #4aa3d9;background:#0b304f;color:#fff;border-radius:50%;width:44px;height:44px;font-size:23px;display:grid;place-items:center;touch-action:manipulation;cursor:pointer;}
  .fcw39-gallery-controls button:disabled{opacity:.35;cursor:default;}
  .fcw39-gallery-status{font-size:.83rem;font-weight:800;letter-spacing:.14em;color:#c3e7ff;}
  .v26-case-gallery .v24-thumbgrid{position:relative;display:flex!important;flex-wrap:nowrap;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:5%;overscroll-behavior-x:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch;padding:3px 2% 12px;}
  .v26-case-gallery .v24-thumbgrid .v24-thumb{flex:0 0 91%;max-width:91%;min-width:0;scroll-snap-align:center;scroll-snap-stop:always;border-radius:18px;background:#091b2e;transform:none!important;}
  .v26-case-gallery .v24-thumbgrid .v24-thumb img{height:310px;max-height:58vw;min-height:245px;object-fit:contain;background:#0c2033;}
  .v26-case-gallery .v24-thumbgrid .v24-thumb span{min-height:56px;padding:12px 15px;font-size:12px;}
  .v26-case-hero .v14-case-hero-content{max-width:100%;}
  .fcw39-rail-hint{font-size:.57rem;letter-spacing:.06em;white-space:normal;text-align:right;}
  body[data-page="home"] .v15-intro{padding-bottom:98px;}
  body[data-page="home"] .v18-intro-photo.fcw39-showcase{width:100%;height:clamp(280px,75vw,400px);}
  body[data-page="home"] .fcw39-slide img{object-fit:contain;height:calc(100% - 36px)!important;align-self:start;}
  body[data-page="home"] .fcw39-project-label{bottom:0;left:0;right:0;max-width:100%;width:100%;border-radius:0;border-left:0;border-right:0;border-bottom:0;background:#071727;padding:10px 12px;}
}
@media(max-width:420px){
  body.fcw36-work-body .fcw36-brand-chip{padding:14px 10px;font-size:.69rem;min-height:106px;}
  .v26-case-gallery .v24-thumbgrid .v24-thumb img{height:255px;min-height:205px;max-height:none;}
  .fcw39-project-label{font-size:.57rem;padding:7px;}
  .fcw39-project-label b{font-size:.54rem;margin-left:4px;}
}
@media(prefers-reduced-motion:reduce){
  body[data-page="home"] .fcw39-slide,.fcw39-slider-dots button{transition:none;}
  .v26-case-gallery .v24-thumbgrid{scroll-behavior:auto;}
}
