/* OE – GSMO Animation: Scene Card (v1.0.0)
 * Ported from "02 Who is it for?" of oe-gi-capital-projects.html
 * (.oe-gi-tile.oe-gi-aud, .oe-gi-scene, .oe-gi-sc-*, .oe-gi-steps). Rules,
 * values and keyframes are the prototype's, in the same order, scoped under
 * .oe-gsc (oe-gi- → oe-gsc-). --c is the card colour (from the field).
 */

.oe-gsc {
	--oe-gsc-ease: cubic-bezier(.22, 1, .36, 1);
	--oe-gsc-rule: var(--oe-color-secondary-muted, #E8ECF4);
	width: 100%;
	height: 100%;
}
/* The prototype's base reset (margins/padding 0); the theme adds its own. */
.oe-gsc :is(h2, h3, h4, p, ul, li) { margin: 0; padding: 0; }

/* Card (.oe-gi-tile + .oe-gi-aud) */
.oe-gsc .oe-gsc-tile { box-sizing: border-box; height: 100%; background: var(--oe-color-primary-4, #ffffff); border: 1px solid var(--oe-gsc-rule); border-left: 4px solid var(--c); border-radius: var(--oe-border-radius-base, 8px); padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; transition: transform 220ms ease-out, box-shadow .3s ease; }
/* Scroll-in fade (prototype: .js .oe-gi-rv; its transition beats the tile's, as in the prototype). Safety net: shows after 2s if the script never runs. */
.oe-gsc.oe-gsc--reveal .oe-gsc-tile { opacity: 0; transform: translateY(24px); transition: opacity .45s var(--oe-gsc-ease), transform .45s var(--oe-gsc-ease); transition-delay: var(--d, 0s); }
.oe-gsc.oe-gsc--reveal .oe-gsc-tile.in { opacity: 1; transform: none; }
.oe-gsc.oe-gsc--reveal:not(.is-js) .oe-gsc-tile { animation: oe-gsc-failsafe 0s 2s forwards; }
@keyframes oe-gsc-failsafe { to { opacity: 1; transform: none; } }
.oe-gsc.oe-gsc--reveal .oe-gsc-tile.in:hover, .oe-gsc .oe-gsc-tile:hover { transform: translateY(-8px); box-shadow: 0 18px 36px -24px color-mix(in srgb, var(--oe-color-secondary, #003469) 55%, transparent); }
.oe-gsc .oe-gsc-tile p { font-size: .92rem; color: var(--oe-color-cool-grey, #455055); line-height: 1.5; }
.oe-gsc .oe-gsc-aud { padding: 0 30px 26px; overflow: hidden; }
.oe-gsc.oe-gsc--reveal .oe-gsc-aud.in:hover, .oe-gsc .oe-gsc-aud:hover { transform: translateY(-4px); }
.oe-gsc .oe-gsc-aud .oe-gsc-title { font-size: var(--oe-font-size-large, 1.4rem); line-height: 1.3; color: var(--oe-color-secondary, #003469); }
.oe-gsc .oe-gsc-aud .oe-gsc-aud-lead { color: var(--oe-color-secondary, #003469); margin-top: 6px; }

/* Picture (.oe-gi-scene) */
.oe-gsc .oe-gsc-scene { display: block; margin: 0 -30px 8px; height: 150px; background: color-mix(in srgb, var(--c) 7%, var(--oe-color-primary-4, #ffffff)); border-bottom: 1px solid var(--oe-gsc-rule); }
.oe-gsc .oe-gsc-scene svg { display: block; width: 100%; height: 100%; }
.oe-gsc .oe-gsc-scene text { font-family: inherit; font-size: 11px; fill: var(--oe-color-secondary, #003469); }
/* planning map */
.oe-gsc .oe-gsc-sc-block { fill: var(--oe-color-primary-4, #ffffff); stroke: var(--oe-gsc-rule); }
.oe-gsc .oe-gsc-sc-river { fill: none; stroke: var(--oe-color-primary-5, #E8F3FA); stroke-width: 14; stroke-linecap: round; }
.oe-gsc .oe-gsc-sc-site { fill: var(--c); transform-box: fill-box; transform-origin: center; animation: oe-gsc-pulse 1.8s ease-in-out infinite; }
.oe-gsc .oe-gsc-sc-roof { fill: none; stroke: var(--oe-color-primary-4, #ffffff); stroke-width: 2; stroke-linejoin: round; }
.oe-gsc .oe-gsc-sc-ring { fill: none; stroke: var(--c); stroke-width: 1.6; stroke-dasharray: 4 5; transform-box: fill-box; transform-origin: center; animation: oe-gsc-ring 3.6s ease-out infinite; }
.oe-gsc .oe-gsc-sc-ring.r2 { animation-delay: .9s; }
@keyframes oe-gsc-ring { 0% { transform: scale(.55); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1); opacity: .35; } }
.oe-gsc .oe-gsc-sc-pin { fill: var(--p); transform-box: fill-box; transform-origin: bottom; animation: oe-gsc-pin 3.6s ease-in-out infinite; animation-delay: var(--pd, 0s); }
@keyframes oe-gsc-pin { 0%, 15% { transform: translateY(-14px); opacity: 0; } 30%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
/* construction site */
.oe-gsc .oe-gsc-sc-ground { stroke: var(--oe-color-secondary-light-80, #ccd6e1); stroke-width: 2; }
.oe-gsc .oe-gsc-sc-floor { fill: var(--c); transform-box: fill-box; transform-origin: bottom; animation: oe-gsc-floor 6s ease-in-out infinite; animation-delay: var(--fd, 0s); }
@keyframes oe-gsc-floor { 0%, 5% { transform: scaleY(0); opacity: 0; } 15%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.oe-gsc .oe-gsc-sc-win { fill: var(--oe-color-primary-4, #ffffff); opacity: .75; }
.oe-gsc .oe-gsc-sc-crane { fill: none; stroke: var(--oe-color-secondary, #003469); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.oe-gsc .oe-gsc-sc-hook { animation: oe-gsc-hook 6s ease-in-out infinite; }
.oe-gsc .oe-gsc-sc-load { fill: var(--c); stroke: none; }
@keyframes oe-gsc-hook { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-46px); } }
.oe-gsc .oe-gsc-sc-bar { transform-box: fill-box; transform-origin: bottom; animation: oe-gsc-bar 3.6s ease-in-out infinite; animation-delay: var(--bd, 0s); }
@keyframes oe-gsc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes oe-gsc-bar { 0%, 55% { transform: scaleY(.45); } 80%, 100% { transform: scaleY(1); } }

/* Steps (.oe-gi-steps): script.js moves .on along the list and fills the line to it. */
.oe-gsc .oe-gsc-steps { position: relative; list-style: none; flex: 1; display: flex; flex-direction: column; justify-content: space-between; margin-top: 12px; }
.oe-gsc .oe-gsc-steps::before, .oe-gsc .oe-gsc-steps-fill { content: ""; position: absolute; left: 17px; top: var(--t0, 26px); width: 2px; border-radius: 1px; }
.oe-gsc .oe-gsc-steps::before { bottom: var(--t0, 26px); background: var(--oe-gsc-rule); }
.oe-gsc .oe-gsc-steps-fill { height: var(--h, 0px); background: var(--c); transition: height .6s var(--oe-gsc-ease); }
.oe-gsc .oe-gsc-steps li { position: relative; display: flex; gap: 16px; align-items: center; padding: 8px 0; cursor: default; list-style: none; }
.oe-gsc .oe-gsc-stepdot { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--oe-color-primary-4, #ffffff); border: 2px solid var(--oe-gsc-rule); display: grid; place-items: center; transition: background-color .35s ease, border-color .35s ease, transform .35s var(--oe-gsc-ease); }
.oe-gsc .oe-gsc-stepdot svg { width: 18px; height: 18px; fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s ease; }
.oe-gsc .oe-gsc-steps li span { font-size: .95rem; line-height: 1.45; color: var(--oe-color-cool-grey, #455055); transition: color .35s ease; }
.oe-gsc .oe-gsc-steps li.done .oe-gsc-stepdot { border-color: var(--c); }
.oe-gsc .oe-gsc-steps li.on .oe-gsc-stepdot { background: var(--c); border-color: var(--c); transform: scale(1.12); }
.oe-gsc .oe-gsc-steps li.on .oe-gsc-stepdot svg { stroke: var(--oe-color-primary-4, #ffffff); }
.oe-gsc .oe-gsc-steps li.on span { color: var(--oe-color-secondary, #003469); }
.oe-gsc .oe-gsc-steps li.oe-gsc-steps-fill { position: absolute; display: block; padding: 0; z-index: 0; }

/* "Animate" off: still picture (one instant run of each animation, as the prototype's reduced motion). */
.oe-gsc.oe-gsc--still .oe-gsc-scene *, .oe-gsc.oe-gsc--still .oe-gsc-scene *::before, .oe-gsc.oe-gsc--still .oe-gsc-scene *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
/* Paused while out of view (no visible change). */
.oe-gsc.is-paused .oe-gsc-scene * { animation-play-state: paused; }

@media (max-width: 560px) {
	.oe-gsc .oe-gsc-aud { padding: 0 20px 22px; }
	.oe-gsc .oe-gsc-scene { margin: 0 -20px 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.oe-gsc *, .oe-gsc *::before, .oe-gsc *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.oe-gsc.oe-gsc--reveal .oe-gsc-tile { opacity: 1; transform: none; }
}
