/* ==== Motion showcase (Oct 2026) ====
   In-house motion work: homepage reel (#motion), the motion.html page and the shared video lightbox.
   Builds on style.css tokens: --violet, --lime, --ink, --line, --gutter. Load after style.css. */

/* ---------- Shared: motion cards (extend .work-card from style.css) ---------- */
.motion-card{position:relative;cursor:pointer}
.motion-thumb{background:#111216}
.work-thumb.portrait{aspect-ratio:9/16}
.work-thumb.landscape{aspect-ratio:16/9}
.motion-thumb video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;background:#111216;transition:transform .5s ease}
.work-card:hover .motion-thumb video{transform:scale(1.04)}
.motion-thumb:after{content:'';position:absolute;inset:auto 0 0 0;height:38%;background:linear-gradient(0deg,#0d0e12a8,transparent);pointer-events:none}
.motion-thumb .work-play{z-index:2;transition:transform .25s ease,background .25s ease}
.motion-card:hover .work-play{transform:scale(1.08);background:white}
.motion-badges{position:absolute;z-index:2;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;gap:8px;pointer-events:none}
.motion-badges span{font-size:11px;font-weight:700;letter-spacing:.06em;line-height:1;padding:6px 8px;border-radius:6px;background:#191b20b8;color:white;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.motion-badges span:first-child{background:var(--lime);color:var(--ink)}
.motion-card:focus-visible{outline:3px solid var(--violet);outline-offset:4px}

/* ---------- Homepage: in-house motion reel ---------- */
.motion-home{max-width:none;background:var(--ink);color:white;padding-left:var(--gutter);padding-right:var(--gutter);overflow:hidden}
.motion-home .pill{background:#ffffff10;border-color:#ffffff2e;color:var(--lime)}
.motion-home h2{color:white}
.lime-text{color:var(--lime)}
.motion-home .section-heading>p{color:#b9bcc5;max-width:380px}
.motion-home .text-link{border-bottom-color:var(--lime);color:white}
.motion-home .text-link:hover{color:var(--lime)}
.motion-reel{--h:clamp(300px,26vw,420px);display:flex;align-items:flex-start;gap:16px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:var(--gutter);margin-inline:calc(-1 * var(--gutter));padding:4px var(--gutter) 22px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.motion-reel::-webkit-scrollbar{display:none}
.motion-reel .motion-card{flex:0 0 auto;width:calc(var(--h) * var(--ar));scroll-snap-align:start;background:#22242b;border-color:#ffffff14}
.motion-reel .motion-thumb{height:var(--h);aspect-ratio:auto}
.motion-reel .work-body{padding:14px 16px 16px}
.motion-reel .work-kind{color:var(--lime)}
.motion-reel .work-title{color:white;font-size:16px}
.motion-reel .motion-card:hover .work-title{color:var(--lime)}
.motion-reel .work-meta{color:#a3a7b1}
.motion-reel-foot{display:flex;align-items:center;justify-content:space-between;gap:24px;border-top:1px solid #ffffff26;padding-top:24px;margin-top:8px}
.motion-formats{display:flex;flex-wrap:wrap;gap:10px 28px;font-size:12px;letter-spacing:.06em;font-weight:600;color:#c9ccd4}
.motion-formats span{display:inline-flex;align-items:center;gap:9px}
.motion-formats span:before{content:'';width:6px;height:6px;border-radius:50%;background:var(--lime)}
.motion-reel-nav{display:flex;gap:10px;flex:none}
.motion-reel-nav button{width:48px;height:48px;border-radius:50%;border:1.5px solid #ffffff4d;background:transparent;color:white;display:grid;place-items:center;transition:background .2s,color .2s,border-color .2s,opacity .2s}
.motion-reel-nav button:hover{background:var(--lime);color:var(--ink);border-color:var(--lime)}
.motion-reel-nav button:disabled{opacity:.35;pointer-events:none}
.motion-reel-nav svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.motion-home a:focus-visible,.motion-home button:focus-visible{outline-color:var(--lime)}

/* ---------- Motion page ---------- */
.motion-page .service-hero{padding-bottom:60px}
.motion-feature{background:var(--ink);color:white;padding:90px var(--gutter);position:relative;overflow:hidden}
.motion-feature:before{content:'';position:absolute;width:620px;height:620px;right:calc(var(--gutter) - 120px);top:50%;transform:translateY(-50%);border-radius:50%;background:radial-gradient(circle,#6243d5 0%,#6243d540 45%,transparent 70%);opacity:.55;pointer-events:none}
.motion-feature-grid{position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:8%;align-items:center;max-width:1800px;margin:auto}
.motion-feature .eyebrow{color:var(--lime);margin-bottom:28px}
.motion-feature h2{font-size:clamp(3.4rem,6.4vw,7rem);font-weight:800;line-height:.95;margin-bottom:30px}
.motion-feature h2 em{font-style:normal;color:var(--lime)}
.motion-feature .lead{color:white;margin-bottom:16px}
.motion-feature-copy>p:not(.lead){color:#b9bcc5;max-width:480px}
.motion-facts{list-style:none;margin:30px 0 36px;padding:0;display:grid;grid-template-columns:repeat(3,auto);justify-content:start;gap:12px 40px;font-size:15px;font-weight:600}
.motion-facts li span{display:block;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#8f93a0;font-weight:700;margin-bottom:4px}
.motion-feature-media{position:relative;display:block;justify-self:center;width:min(390px,100%);aspect-ratio:9/16;border-radius:22px;overflow:hidden;background:#111216;border:1px solid #ffffff1f;box-shadow:0 30px 80px #0008;transform:rotate(2deg);transition:transform .4s ease}
.motion-feature-media:hover{transform:rotate(0) translateY(-6px)}
.motion-feature-media video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.motion-feature-media .work-play{left:22px;bottom:22px;width:58px;height:58px;z-index:2}
.motion-feature-media .work-play svg{width:20px;height:20px}
.motion-feature a:focus-visible{outline-color:var(--lime)}
.motion-library .section-heading{margin-bottom:10px}
.motion-library .work-sub{font-family:'Manrope',Arial,sans-serif;font-weight:800;scroll-margin-top:120px}
.motion-grid{display:grid;gap:22px}
.motion-grid.portrait-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.motion-grid.landscape-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.motion-grid .work-title{font-size:16px}
.motion-note{color:#5d626a;max-width:720px;margin:-6px 0 22px}

/* ---------- Lightbox ---------- */
.motion-lightbox{width:min(1180px,94vw);max-width:none;max-height:94vh;max-height:94dvh;padding:0;border:0;border-radius:18px;background:#121318;color:white;overflow:hidden;box-shadow:0 40px 120px #000a}
.motion-lightbox::backdrop{background:#0b0c10e0;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.motion-lightbox[open]{animation:mlb-in .35s cubic-bezier(.2,.7,.3,1)}
@keyframes mlb-in{from{opacity:0;transform:translateY(18px) scale(.98)}to{opacity:1;transform:none}}
.mlb-inner{display:grid;grid-template-columns:auto minmax(280px,1fr);max-height:inherit}
.mlb-stage{background:#000;display:grid;place-items:center;min-width:0}
.mlb-stage video{display:block;background:#000;width:auto;height:min(86vh,860px);height:min(86dvh,860px);aspect-ratio:var(--ar,9/16);max-width:100%}
.motion-lightbox.is-landscape .mlb-inner{grid-template-columns:1fr}
.motion-lightbox.is-landscape .mlb-stage video{width:100%;height:auto;max-height:calc(94vh - 250px);max-height:calc(94dvh - 250px)}
.mlb-info{position:relative;display:flex;flex-direction:column;padding:34px 34px 30px;overflow-y:auto;min-width:0}
.motion-lightbox.is-landscape .mlb-info{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:0 40px;padding:26px 34px 28px}
.motion-lightbox.is-landscape .mlb-info>*{grid-column:1}
.motion-lightbox.is-landscape .mlb-meta,.motion-lightbox.is-landscape .mlb-actions{grid-column:2}
.motion-lightbox.is-landscape .mlb-meta{grid-row:1/span 3;margin:0 0 18px;align-self:end;grid-template-columns:repeat(3,auto);justify-content:start;gap:4px 34px;border-top:0}
.motion-lightbox.is-landscape .mlb-meta div{display:block;padding:0;border:0}
.motion-lightbox.is-landscape .mlb-meta div:last-child{display:none}
.motion-lightbox.is-landscape .mlb-meta dd{text-align:left;margin-top:4px}
.motion-lightbox.is-landscape .mlb-actions{grid-row:4/span 2;align-self:end}
.motion-lightbox.is-landscape .mlb-count{margin-bottom:12px}
.motion-lightbox.is-landscape .mlb-info h3{margin:6px 0 10px}
.mlb-count{font-size:12px;font-weight:700;letter-spacing:.12em;color:var(--lime);margin-bottom:22px}
.mlb-info .work-kind{color:#b3a4ff}
.mlb-info h3{font-size:clamp(1.9rem,3vw,2.6rem);margin:8px 0 16px;color:white}
.mlb-desc{color:#b9bcc5;font-size:15px;max-width:440px}
.mlb-meta{margin:6px 0 28px;padding:0;display:grid;gap:0;border-top:1px solid #ffffff1f}
.mlb-meta div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #ffffff1f;font-size:14px}
.mlb-meta dt{color:#8f93a0;font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:700}
.mlb-meta dd{margin:0;text-align:right;font-weight:600}
.mlb-actions{margin-top:auto;display:flex;flex-direction:column;gap:14px}
.mlb-nav{display:flex;gap:10px}
.mlb-nav button{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border-radius:8px;border:1.5px solid #ffffff38;background:transparent;color:white;font-size:14px;font-weight:700;transition:background .2s,color .2s,border-color .2s}
.mlb-nav button:hover{background:white;color:var(--ink);border-color:white}
.mlb-nav svg,.mlb-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.mlb-actions .button{width:100%}
.mlb-close{position:absolute;z-index:3;top:14px;right:14px;width:44px;height:44px;border-radius:50%;border:1px solid #ffffff2e;background:#191b20cc;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:white;display:grid;place-items:center;transition:background .2s,color .2s}
.mlb-close:hover{background:var(--lime);color:var(--ink)}
.motion-lightbox button:focus-visible,.motion-lightbox a:focus-visible{outline:3px solid var(--lime);outline-offset:3px}
body.mlb-open{overflow:hidden}

/* ---------- Responsive ---------- */
@media(max-width:1050px){
.motion-grid.portrait-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.motion-grid.landscape-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.motion-feature-grid{gap:6%}
.motion-facts{grid-template-columns:repeat(2,auto)}
}
@media(max-width:900px){
.motion-reel-foot{flex-direction:column;align-items:flex-start}
.motion-feature{padding:70px 6%}
.motion-feature-grid{grid-template-columns:1fr;gap:44px}
.motion-feature-media{width:min(340px,82%);transform:none}
.motion-feature:before{width:460px;height:460px;top:auto;bottom:-80px;transform:none;right:-140px}
/* Library: swipeable rows, like the portfolio on phones */
.motion-grid.portrait-grid,.motion-grid.landscape-grid{grid-template-columns:none;grid-auto-flow:column;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:6vw;margin-inline:-6vw;padding:2px 6vw 14px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.motion-grid.portrait-grid{grid-auto-columns:44%}
.motion-grid.landscape-grid{grid-auto-columns:80%}
.motion-grid::-webkit-scrollbar{display:none}
.motion-grid .motion-card{scroll-snap-align:start}
/* Lightbox becomes a full-screen player */
.motion-lightbox{width:100vw;height:100vh;height:100dvh;max-height:none;border-radius:0}
.mlb-inner,.motion-lightbox.is-landscape .mlb-inner{grid-template-columns:1fr;grid-template-rows:auto 1fr;height:100%}
.mlb-stage video,.motion-lightbox.is-landscape .mlb-stage video{width:100%;height:auto;max-height:62vh;max-height:62dvh}
.mlb-info,.motion-lightbox.is-landscape .mlb-info{display:flex;padding:22px 6vw 26px}
.mlb-count{margin-bottom:12px}
.mlb-info h3{margin:6px 0 10px}
.motion-lightbox.is-landscape .mlb-meta{margin:6px 0 24px;align-self:stretch;grid-template-columns:1fr;gap:0;border-top:1px solid #ffffff1f}
.motion-lightbox.is-landscape .mlb-meta div{display:flex;padding:12px 0;border-bottom:1px solid #ffffff1f}
.motion-lightbox.is-landscape .mlb-meta div:last-child{display:flex}
.motion-lightbox.is-landscape .mlb-meta dd{text-align:right;margin:0}
.motion-lightbox.is-landscape .mlb-actions{align-self:stretch}
}
@media(max-width:760px){
.motion-reel{--h:min(420px,108vw)}
.motion-reel .motion-card{width:calc(min(var(--h),72vw / var(--ar)) * var(--ar))}
.motion-reel .motion-thumb{height:min(var(--h),72vw / var(--ar))}
.motion-reel-nav{display:none}
.motion-formats{gap:10px 20px;font-size:11px}
.motion-facts{grid-template-columns:repeat(2,auto);gap:12px 28px}
.motion-grid.portrait-grid{grid-auto-columns:62%}
.motion-grid.landscape-grid{grid-auto-columns:86%}
}
@media(prefers-reduced-motion:reduce){
.motion-thumb video,.motion-feature-media,.motion-reel-nav button,.mlb-nav button{transition:none}
.work-card:hover .motion-thumb video{transform:none}
.motion-feature-media,.motion-feature-media:hover{transform:none}
.motion-lightbox[open]{animation:none}
}
