/* Compact, normal-flow scenes. No sticky scroll runway. */
.engine { height:auto!important; min-height:0!important; padding:0!important; }
.engine .engine-stage { position:relative!important; top:auto!important; height:clamp(430px,76svh,720px)!important; min-height:0!important; overflow:hidden; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.engine .engine-image { position:absolute; inset:0; background-image:url('media/tunnel-forward-poster.webp'); }
.engine .scene-video { position:absolute; width:100%;height:100%;object-fit:cover; }
.engine h2 { position:relative; z-index:2; display:flex; flex-direction:column; gap:14px; text-align:center; font-size:clamp(28px,4vw,60px); }
.engine .engine-arrow { display:none; }
.engine .scene-kicker { position:absolute; top:35px; z-index:2; }
.engine .engine-copy { position:absolute; bottom:25px; left:24px; right:24px; margin:0 auto; max-width:640px; z-index:2; font-size:14px; }
.tunnel-playing h2 { opacity:0; }
.engine .engine-stage > .tunnel-words { display:none; position:absolute; inset:0; pointer-events:none; z-index:3; }
.engine.tunnel-playing .engine-stage > .tunnel-words { display:block; }
.tunnel-words span { position:absolute; top:46%;left:50%;width:max-content;max-width:80%;text-align:center; font-family:Outfit,sans-serif;font-weight:300;font-size:clamp(28px,4.8vw,68px);line-height:1.08; opacity:0; }
.gallery.gallery-once { height:auto!important; min-height:0!important; padding:0!important; overflow:hidden; }
.gallery-once .gallery-stage { position:relative!important; top:auto!important; height:clamp(520px,82svh,780px)!important; min-height:0!important; padding:45px 24px 25px; display:flex;flex-direction:column;justify-content:center;align-items:center; }
.gallery-once .gallery-strip { display:block;position:relative;width:100%;height:clamp(280px,42svh,430px);min-height:0;perspective:1100px;overflow:visible;transform-style:preserve-3d;padding:0; }
.gallery-once .gallery-strip figure { position:absolute;left:50%;top:50%;width:min(12vw,170px);height:clamp(210px,29svh,310px);transform-origin:center;backface-visibility:visible;will-change:transform; }
.gallery-once .gallery-strip figcaption { opacity:var(--caption-opacity,0); }
.gallery-once.animation-complete figure { will-change:auto; }
.gallery-once h2 { font-size:clamp(38px,4.6vw,64px);margin:15px 0; }
.gallery-once .gallery-note { margin:15px auto 0; }
.services,.start,.meeting { min-height:0; padding-top:75px;padding-bottom:75px; }
.services-extra { max-width:620px; margin:25px 0; color:#525a60; }
.meeting-marquee { display:none; }
@media(max-width:700px){
 .engine .engine-copy { font-size:12px; }
 .gallery-once .gallery-stage { height:auto!important;min-height:640px;padding:44px 20px 36px; }
 .gallery-once .gallery-strip { height:390px;min-height:390px;flex:none; }
 .gallery-once .gallery-strip figure { width:25vw;height:calc(100vw / 3); }
 .gallery-once .gallery-strip figcaption { font-size:9px;padding:20px 3px 7px; }
 .gallery-once .gallery-note { font-size:11px; }
 .services,.start,.meeting { padding-top:48px;padding-bottom:48px; }
}
@media(prefers-reduced-motion:reduce){.gallery-once .gallery-strip figure{will-change:auto}}

/* ===== Ivory v2 ===== */
.engine h2{flex-direction:column;gap:.35em}
.engine h2 .engine-word{display:block;white-space:normal}
.tunnel-words span{max-width:86vw;white-space:normal!important;text-align:center}

/* Work areas */
.services .section-heading{margin-bottom:34px}
.work-areas{display:grid;gap:0;border-top:1px solid #dcd9d0}
.work-area{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:clamp(24px,6vw,96px);align-items:center;padding:38px 0;border-bottom:1px solid #dcd9d0}
.work-text h3{font:300 clamp(30px,3.4vw,50px)/1.05 Outfit,sans-serif;letter-spacing:-.045em;margin:0 0 14px;color:#171816}
.work-text p{max-width:44ch;font-size:17px;line-height:1.65;color:#51575b;margin:0}
.demo{background:#f4f2ec;border-radius:14px;padding:20px 22px;color:#171816;min-width:0}
.demo-tag{display:inline-block;margin:0 0 12px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#6a6e70}
.demo h4{margin:0 0 6px;font:400 18px Outfit,sans-serif;letter-spacing:-.01em}
.demo-list,.demo-dl{list-style:none;margin:0;padding:0}
.demo-list li,.demo-dl>div{display:flex;justify-content:space-between;gap:6px 18px;flex-wrap:wrap;padding:11px 0;border-top:1px solid #dedbd2;font-size:14px;line-height:1.45}
.demo-list b,.demo-dl dt{font-weight:500;color:#171816}
.demo-list span,.demo-dl dd{margin:0;color:#5d6366}
.demo-tasks li::before{content:'';flex:none;width:14px;height:14px;margin-top:3px;border:1.5px solid #8b8f8d;border-radius:4px}
.demo-tasks li{flex-wrap:nowrap}.demo-tasks b{flex:1}
.services-extra{font-size:19px;color:#2b2d2a;max-width:640px;margin:36px 0 10px}
.services-aside{font-size:14px;color:#6a6e70;max-width:560px;margin:0}
@media(max-width:800px){.work-area{grid-template-columns:1fr;gap:20px;padding:30px 0}.work-text p{font-size:16px}.demo-list li,.demo-dl>div{font-size:15px}}

/* Closing */
.closing{position:relative;isolation:isolate;overflow:hidden;padding:84px var(--edge) 88px;background:#fcfbf8}
.closing-dots{position:absolute;z-index:-1;right:-6%;top:50%;width:46%;height:130%;transform:translateY(-50%);background:url('assets/hero-halftone.png') right center/auto 100% no-repeat;mix-blend-mode:multiply;opacity:.22;filter:grayscale(1);pointer-events:none;-webkit-mask-image:linear-gradient(to right,transparent,#000 50%);mask-image:linear-gradient(to right,transparent,#000 50%)}
.closing-inner{max-width:640px}
.closing h2{font:300 clamp(40px,5vw,72px)/1 Outfit,sans-serif;letter-spacing:-.055em;margin:0 0 20px;color:#171816}
.closing p{font-size:18px;line-height:1.65;color:#51575b;margin:0 0 30px;max-width:54ch}
.closing-actions{display:flex;flex-wrap:wrap;align-items:center;gap:18px 32px}
.closing .pill-dark{background:#20211e;color:#fcfbf8;min-height:60px;padding:0 30px;gap:20px;font-size:17px}
.closing .inline-link{color:#171816}
@media(max-width:700px){.closing{padding:56px 24px 60px}.closing-dots{width:80%;opacity:.14}.closing p{font-size:17px}}

/* Footer */
.footer,.small-footer{background:#f0eee8!important;color:#3b3e3b!important;align-items:center}
.foot-brand{display:flex;align-items:baseline;gap:6px 16px;flex-wrap:wrap}
.foot-brand em{font-style:normal;font-family:Outfit,sans-serif;font-weight:300;font-size:15px;color:#626566}
.footer a,.small-footer a{color:inherit}
@media(max-width:700px){.footer,.small-footer{display:flex!important;flex-direction:column;align-items:flex-start;gap:12px}.footer span,.small-footer span{margin:0!important;display:inline-block}.foot-brand{display:flex!important}}

/* Gallery: baseline readable final cards (no JS / not running / reduced motion) */
.gallery-once:not(.gallery-running) .gallery-stage{height:clamp(520px,82svh,780px)!important;padding:45px 24px 25px}
.gallery-once:not(.gallery-running) .gallery-strip{display:flex!important;position:relative!important;height:clamp(280px,42svh,430px)!important;width:100%;justify-content:center;align-items:center;gap:clamp(12px,1.8vw,24px);perspective:none;transform-style:flat;overflow:visible}
.gallery-once:not(.gallery-running) .gallery-strip figure{position:relative!important;left:auto!important;top:auto!important;width:min(12vw,170px)!important;height:auto!important;flex:0 0 auto;min-width:0;overflow:visible!important;background:none!important;border-radius:0;box-shadow:none;margin:0;will-change:auto;--shift:0px;transform:none!important}
.gallery-once:not(.gallery-running) .gallery-strip img{display:block;width:100%;height:clamp(210px,29svh,310px);object-fit:cover;border-radius:12px}
.gallery-once:not(.gallery-running) .gallery-strip figcaption,.gallery-once:not(.gallery-running) .gallery-strip figure:nth-child(4) figcaption{position:static;opacity:1!important;background:none;text-shadow:none;color:#171816;padding:10px 2px 0;font:300 clamp(15px,1.4vw,19px)/1.25 Outfit,sans-serif;letter-spacing:-.01em;text-align:left}
@media(max-width:700px){
 .gallery-once:not(.gallery-running) .gallery-stage{height:auto!important;padding:44px 20px 36px}
 .gallery-once:not(.gallery-running) .gallery-strip{display:grid!important;height:auto!important;grid-template-columns:repeat(6,1fr);gap:18px 12px}
 .gallery-once:not(.gallery-running) .gallery-strip figure{grid-column:span 2;width:auto!important;max-width:none;transform:none!important}
 .gallery-once:not(.gallery-running) .gallery-strip img{height:auto;aspect-ratio:3/4}
 .gallery-once:not(.gallery-running) .gallery-strip figure:nth-child(4){grid-column:2/4}
 .gallery-once:not(.gallery-running) .gallery-strip figure:nth-child(5){grid-column:4/6}
 .gallery-once:not(.gallery-running) .gallery-strip figcaption{font-size:14px;overflow-wrap:anywhere}
 .gallery-once.gallery-running .gallery-strip figcaption{font-size:12px}
}
@media(min-width:701px){
 .gallery-once:not(.gallery-running) .gallery-strip figure{transform:translateY(var(--finish-lift)) rotate(var(--finish-tilt))!important;transform-origin:center calc(clamp(210px,29svh,310px) / 2)}
 .gallery-once .gallery-strip figure:nth-child(1){--finish-lift:25px;--finish-tilt:-7deg}
 .gallery-once .gallery-strip figure:nth-child(2){--finish-lift:-20px;--finish-tilt:4deg}
 .gallery-once .gallery-strip figure:nth-child(3){--finish-lift:12px;--finish-tilt:-3deg}
 .gallery-once .gallery-strip figure:nth-child(4){--finish-lift:-16px;--finish-tilt:4deg}
 .gallery-once .gallery-strip figure:nth-child(5){--finish-lift:30px;--finish-tilt:-7deg}
}
.gallery-once.gallery-running .gallery-strip figure{overflow:visible}
.gallery-once.gallery-running .gallery-strip img{border-radius:12px}
.gallery-once.gallery-running .gallery-strip figcaption,
.gallery-once.gallery-running .gallery-strip figure:nth-child(4) figcaption{top:100%;bottom:auto;left:0;right:0;padding:10px 2px 0;font:300 clamp(15px,1.4vw,19px)/1.25 Outfit,sans-serif;color:#171816;background:none;box-shadow:none;text-shadow:none;text-align:left}
@media(max-width:700px){.gallery-once.gallery-running .gallery-strip figcaption{font-size:12px;overflow-wrap:anywhere;text-align:center}}
@media(prefers-reduced-motion:reduce){.gallery-once .gallery-strip figure{transition:none}}

/* Blue from the original subpages, used only as a homepage accent. */
body:has(.static-hero) { --eucom-blue:#496cbd; }
body:has(.static-hero) .gallery h2 span,
body:has(.static-hero) .closing h2,
body:has(.static-hero) .foot-brand em { color:var(--eucom-blue); }
body:has(.static-hero) .work-text h3 { color:#314b7f; }
body:has(.static-hero) .demo { background:#f0f3fa; }
body:has(.static-hero) .demo-tag { color:#395a9b; }
body:has(.static-hero) .demo-list li,
body:has(.static-hero) .demo-dl>div { border-color:#d8e1f1; }
body:has(.static-hero) .demo-tasks li::before { border-color:#7b96cb; }
body:has(.static-hero) .static-hero-foot a { color:#395a9b; }

/* Reserve the complete tilted-card/caption envelope before animation starts.
   The same geometry stays in place during and after the one-orbit sequence. */
.gallery.gallery-once .gallery-stage {
 height:auto!important;
 min-height:clamp(520px,82svh,780px)!important;
}
.gallery.gallery-once .gallery-strip {
 height:calc(clamp(210px,29svh,310px) + 180px)!important;
 flex:0 0 auto;
}
.gallery.gallery-once .gallery-note { flex:0 0 auto;margin-top:32px; }
@media(max-width:700px) {
 .gallery.gallery-once .gallery-stage { min-height:640px!important; }
 .gallery.gallery-once .gallery-strip {
  height:max(390px,calc(200vw / 3 + 150px))!important;
 }
}
