.gallery-page-body{background:#fff;color:#111;--gutter:clamp(20px,4vw,64px)}
.gallery-page-body .site-footer{background:#080808;border-top:1px solid #232323}
.gallery-page{max-width:1568px;margin:auto;padding:66px var(--gutter) 64px}
.gallery-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:40px}
.gallery-heading h1{font-size:clamp(52px,6.5vw,92px);line-height:1;letter-spacing:-.065em;margin:0}
.gallery-heading>p{font-size:15px;color:#626262;margin:0 0 6px}
.project-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:36px 28px;position:relative;scroll-margin-top:120px;overflow-anchor:none}
.gallery-slot{min-width:0;scroll-margin-top:120px}
.gallery-panel{height:100%;width:100%;position:relative;display:flex;flex-direction:column;border-radius:22px;background:#141414;overflow:hidden;transform-origin:0 0;box-shadow:0 24px 48px -12px #00000047,0 8px 18px -6px #0000002e,0 2px 5px #0000001f,inset 0 0 0 1px #ffffff12;transition:box-shadow .28s ease}
.gallery-media{aspect-ratio:var(--preview-aspect,16/9);flex:none;min-height:0;width:100%;position:relative;overflow:hidden;container-type:size;background:#101010}
.gallery-info{min-height:126px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:22px 150px 22px 24px}
.gallery-category{margin:0 0 5px;color:#8f8f8f;font-size:11px;font-weight:400;letter-spacing:.035em;line-height:1.3}
.gallery-info h2{font-size:clamp(20px,1.8vw,26px);line-height:1.3;letter-spacing:-.035em;margin:0;color:#f5f5f5}
.gallery-number{font-size:11px;align-self:center;color:#666;font-variant-numeric:tabular-nums}
.gallery-caption{display:block;color:#aaa;font-size:13px;line-height:1.55;margin:8px 0 0}
.gallery-open{display:none;position:absolute;inset:0;background:transparent;border:0;width:100%;height:100%;border-radius:inherit;cursor:pointer}
[data-gallery][data-ready=true] .gallery-open{display:block}
.gallery-open span{position:absolute;right:24px;bottom:35px;display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border:1px solid #ffffff35;border-radius:999px;color:#f5f5f5;font:500 12px Sora,sans-serif;transition:background .18s,border-color .18s}
.gallery-open:is(:hover,:focus-visible) span{background:#fff;color:#111;border-color:#fff}
.gallery-slot:has(.project-art) .gallery-info{padding-right:24px}
.gallery-open:focus-visible{outline:2px solid #fff;outline-offset:-4px;box-shadow:inset 0 0 0 6px #111}
.gallery-detail{display:none}
.gallery-return{position:sticky;top:0;z-index:1;flex-shrink:0;background:#141414;box-shadow:0 -28px 0 #141414;padding-bottom:14px;margin-bottom:18px}
.gallery-close{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;border:1px solid #ffffff30;border-radius:999px;background:#1c1c1c;color:#e4e4e4;padding:10px 16px;min-height:44px;font:500 12px Sora,sans-serif;cursor:pointer;margin:0}
.gallery-close:hover{background:#292929;border-color:#ffffff60;color:#fff}
.gallery-close:focus-visible,.gallery-step:focus-visible{outline:2px solid #fff;outline-offset:3px}
.gallery-backdrop{position:fixed;inset:0;background:#000b;backdrop-filter:blur(5px);z-index:110;cursor:pointer}
.gallery-backdrop[hidden]{display:none}
.gallery-panel.is-expanded{position:fixed;inset:auto;left:var(--panel-left);top:var(--panel-top);width:var(--panel-width);height:var(--panel-height);z-index:120;display:grid;grid-template-columns:minmax(245px,30%) minmax(0,1fr);gap:28px;padding:28px;border-radius:28px;background:#141414;box-shadow:0 24px 100px #000b,0 0 0 1px #ffffff12}
.gallery-panel.is-expanded .gallery-open,.gallery-panel.is-expanded .gallery-info{display:none}
.gallery-panel.is-expanded .gallery-detail{display:flex;flex-direction:column;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#555 transparent}
.gallery-detail .gallery-category{font-size:10px;line-height:1.5;letter-spacing:.09em;text-transform:uppercase;color:#aaa;margin:0 0 9px}
.gallery-detail h3{font-size:28px;font-weight:600;letter-spacing:-.045em;line-height:1.15;margin:0;color:#fff}
.gallery-purpose{font-size:13px;color:#b8b8b8;line-height:1.65;margin:14px 0 28px}
.gallery-steps{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.gallery-step{display:grid;grid-template-columns:28px minmax(0,1fr);gap:12px;align-items:start;min-height:56px;width:100%;text-align:left;color:#b0b0b0;border:0;background:transparent;border-radius:16px;padding:14px 12px;font-family:inherit;cursor:pointer;transition:background .25s,color .25s}
.gallery-step-number{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#262626;color:#b8b8b8;font-size:10px;font-weight:500;font-variant-numeric:tabular-nums}
.gallery-step strong{display:block;font-size:14px;line-height:1.45;font-weight:500;padding-top:3px}
.gallery-step-description{display:none;color:#c7c7c7;font-size:12px;line-height:1.65;margin-top:8px}
.gallery-step[data-state=current]{background:#252525;color:#fff}
.gallery-step[data-state=current] .gallery-step-number{background:#be1820;color:#fff}
.gallery-step[data-state=current] strong{font-weight:600}
.gallery-step[data-state=current] .gallery-step-description{display:block}
.gallery-step[data-state=done]{color:#bdbdbd}
.gallery-step:hover{background:#202020;color:#fff}
.gallery-step[data-state=current]:hover{background:#2b2b2b}
.gallery-panel.is-expanded .gallery-media{aspect-ratio:auto;height:100%;min-width:0;border-radius:20px;background:#101010}
.gallery-bottom{font-size:13px;color:#737373;text-align:center;margin:38px 0 0}

/* Keep the native frame and clock. Gallery covers; the expanded viewer fits. */
.gallery-media>section{width:100%;height:100%;background:transparent!important;container-type:normal!important}
.gallery-media :is(.fa-content,.fa-grid,.fa-screen,.fa-panel,.fd-content,.fd-grid,.fd-screen,.fd-panel){display:contents!important}
.gallery-media :is(.fa-steps,.fa-caption,.fa-screen-label,.fa-static-steps,.fd-heading,.fd-provenance,.fd-steps,.fd-caption,.fd-progress,.fd-static,.fd-controls){display:none!important}
.gallery-media :is(.fa-crop,.fd-crop){position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%);width:min(100cqw,calc(100cqh * var(--aspect)));max-width:100%;height:auto!important;border:0!important;border-radius:0!important}
.gallery-panel:not(.is-expanded) .gallery-media :is(.fa-crop,.fd-crop){width:max(100cqw,calc(100cqh * var(--mobile-aspect,var(--aspect))));max-width:none}
.gallery-media .fa-pointer{width:clamp(12px,2cqw,26px)!important}
.gallery-media .fa-press{width:24px!important;height:24px!important;margin:-12px 0 0 -12px!important}
.gallery-media [data-gallery-player][data-playing=true][data-guided=true] .fa-crop{cursor:pointer!important}
.gallery-panel.is-expanded .fd-controls{display:flex!important;position:absolute;bottom:8px;right:8px;z-index:4;padding:0!important;background:transparent!important}
.gallery-media .fd-control:is([data-replay],[data-read]){display:none!important}
.gallery-panel.is-expanded .fd-control[data-play]{min-height:44px!important;border-radius:999px!important;font-size:12px!important}

.project-art{width:100%;height:100%;position:relative;display:grid;place-items:center;overflow:hidden;background:#1d1c1c}
.art-label{position:absolute;top:18px;left:20px;z-index:1;font-size:9px;letter-spacing:.12em;color:#aaa}
.art-window{width:62%;aspect-ratio:1.55;background:#343130;border:1px solid #ffffff16;border-radius:8px;transform:rotate(-7deg);box-shadow:0 24px 60px #0004}
.art-window-top{height:17%;border-bottom:1px solid #ffffff10;display:flex;align-items:center;gap:4px;padding-left:9px}
.art-window-top i{width:3px;height:3px;border-radius:50%;background:#817570}
.art-window-body{padding:12% 12%;display:grid;gap:8px;grid-template-columns:1.2fr .8fr}
.art-window-body span{height:14px;background:#aba4a0;border-radius:2px;grid-column:1}
.art-window-body b{height:29px;background:#5a413d;border-radius:3px;grid-row:1/4;grid-column:2}
.art-window-body em{width:45%;height:7px;background:#ba181c;border-radius:2px}
.project-art--software{background:#1b1d1e}
.art-console{width:70%;aspect-ratio:1.62;border:1px solid #ffffff1c;background:#2c2f30;border-radius:9px;display:flex;gap:10%;padding:9% 6%;transform:rotate(5deg);box-shadow:0 24px 60px #0003}
.art-sidebar{width:15%;border-right:1px solid #ffffff17}
.art-dashboard{display:grid;grid-template-columns:repeat(3,1fr);width:75%;gap:8%}
.art-dashboard i{display:block;background:#55595a;border-radius:3px;height:18px}
.art-dashboard b{grid-column:1/4;height:5px;background:#424647;border-radius:2px}
.project-art--automation{background:#231719}
.art-flow{display:flex;width:70%;align-items:center;transform:rotate(-9deg)}
.art-flow i{display:block;width:24%;aspect-ratio:1;border:1px solid #f1c8cc22;border-radius:12px;background:#3d2529;box-shadow:0 12px 24px #0002}
.art-flow i:nth-of-type(2){background:#6f252d;border-color:#dc687644}
.art-flow span{flex:1;height:1px;background:#ac505e55}
.is-expanded .project-art{font-size:1.5em}
.is-expanded .art-window,.is-expanded .art-console{max-width:600px}
.is-expanded .art-flow{max-width:630px}
.is-expanded .art-label{left:28px;top:24px;font-size:11px}

@media(min-width:901px) and (max-height:800px){.gallery-page{padding-top:30px}.gallery-heading{margin-bottom:26px}.gallery-heading h1{font-size:60px}}
@media(max-width:900px){.project-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.gallery-heading{margin-bottom:28px}.gallery-info{min-height:142px;padding:20px 20px 65px}.gallery-open span{right:auto;left:20px;bottom:16px;min-height:36px}.gallery-slot:has(.project-art) .gallery-info{padding-bottom:20px}.gallery-info h2{font-size:18px}.gallery-page{padding-top:44px}}
@media(max-width:600px){.project-gallery{grid-template-columns:1fr;gap:20px}.gallery-page{padding-top:35px;padding-bottom:38px}.gallery-heading{align-items:flex-start;flex-direction:column;gap:15px;margin-bottom:28px}.gallery-heading>p{font-size:13px;margin:0}.gallery-heading h1{font-size:57px}.gallery-info{min-height:153px;padding:20px 20px 70px}.gallery-open span{min-height:44px}.gallery-info h2{font-size:20px}.gallery-slot--discovery{--mobile-aspect:calc(358 / 720)}.gallery-slot--discovery .fd-crop{width:min(100cqw,calc(100cqh * var(--mobile-aspect)))}}
@media(prefers-reduced-motion:reduce){.gallery-panel{scroll-behavior:auto}}

@media(max-width:760px){
 .gallery-panel.is-expanded{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(0,1.15fr);gap:18px;padding:20px;border-radius:24px}
 .gallery-panel.is-expanded .gallery-detail{grid-row:1}
 .gallery-panel.is-expanded .gallery-media{grid-row:2;border-radius:16px}
 .gallery-detail h3{font-size:25px}.gallery-return{margin-bottom:8px}.gallery-purpose{margin:10px 0 18px}
 .gallery-steps{gap:4px}.gallery-step{padding:10px;gap:10px}
}
@media(min-width:600px) and (max-width:900px) and (max-height:500px){
 .gallery-panel.is-expanded{grid-template-columns:210px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:16px;padding:16px}
 .gallery-panel.is-expanded .gallery-detail,.gallery-panel.is-expanded .gallery-media{grid-row:1}
}
@media(prefers-reduced-motion:reduce){.gallery-step{transition:none}}

/* Fit the viewer to the complete screen; keep breathing room in the explanation column. */
@media(min-width:761px), (min-width:600px) and (max-height:500px){
 .gallery-panel.is-expanded{--screen-aspect:var(--mobile-aspect,var(--aspect));--detail-width:clamp(245px,calc(var(--panel-width) * .25),320px);--screen-width:min(calc(var(--panel-width) - var(--detail-width)),calc(var(--panel-height) * var(--screen-aspect)));left:calc(var(--panel-left) + (var(--panel-width) - var(--detail-width) - var(--screen-width)) / 2);width:calc(var(--detail-width) + var(--screen-width));height:calc(var(--screen-width) / var(--screen-aspect));grid-template-columns:var(--detail-width) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:0;padding:0}
 .gallery-panel.is-expanded .gallery-detail{padding:28px;grid-row:1}
 .gallery-panel.is-expanded .gallery-media{grid-row:1;border-radius:0}
 .gallery-panel.is-expanded .gallery-media :is(.fa-crop,.fd-crop){border-radius:0!important}
}
@media(min-width:600px) and (max-width:900px) and (max-height:500px){
 .gallery-panel.is-expanded{--detail-width:210px}
 .gallery-panel.is-expanded .gallery-detail{padding:16px}
}

/* Shadow elevation leaves the full desktop previews and FLIP geometry steady. */
.gallery-panel:not(.is-expanded):has(.gallery-open:focus-visible){box-shadow:0 34px 64px -12px #00000059,0 12px 24px -6px #00000033,0 3px 7px #00000024,inset 0 0 0 1px #ffffff20}
@media(hover:hover) and (pointer:fine){
 .gallery-panel:not(.is-expanded):has(.gallery-open:hover){box-shadow:0 34px 64px -12px #00000059,0 12px 24px -6px #00000033,0 3px 7px #00000024,inset 0 0 0 1px #ffffff20}
}
@keyframes gallery-soft-in{from{opacity:0}to{opacity:1}}
.gallery-backdrop:not([hidden]){animation:gallery-soft-in .24s ease-out}
.gallery-step[data-state=current] .gallery-step-description{animation:gallery-soft-in .24s ease-out}
[data-gallery][data-motion=off] :is(.gallery-panel,.gallery-backdrop,.gallery-step-description){animation:none;transition:none}
@media(prefers-reduced-motion:reduce){
 .gallery-panel,.gallery-backdrop,.gallery-step-description,.gallery-open span{animation:none!important;transition:none!important}
}

/* The entire screen is the named, keyboard-accessible viewing control. */
.gallery-info,.gallery-open span{display:none}
.art-label::after{content:" / Project placeholder"}

/* Only real phone footage uses the portrait standard; desktop footage stays landscape. */
@media(max-width:600px){.gallery-slot--discovery{--preview-aspect:9/16}}
