/* ==========================================================================
   Giant Vision — M4.17: The Living Services (homepage, services section).
   The stage under the statement, and the one motion grammar every scene uses.
   Colours: the theme's own ink and the brand orange only.
   ========================================================================== */
.ls-stage {
	--ls-ink: rgba(244, 236, 224, .62); --ls-ink2: rgba(244, 236, 224, .25); --ls-fill: rgba(244, 236, 224, .045);
	--ls-bg: var(--gv-band, #0C0B0A); --ls-oa: rgba(232, 117, 26, .24); --ls-ease: cubic-bezier(.22, .7, .18, 1);
	position: relative; inline-size: 100%; max-inline-size: 360px; margin-block-start: 30px;
}
html[data-theme="light"] .ls-stage { --ls-ink: rgba(52, 36, 20, .68); --ls-ink2: rgba(52, 36, 20, .27); --ls-fill: rgba(52, 36, 20, .05); --ls-oa: rgba(217, 104, 16, .22); }
.ls-defs { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.ls-g0 { stop-color: var(--brand); stop-opacity: .34; }
.ls-g1 { stop-color: var(--brand); stop-opacity: .1; }
.ls-g2 { stop-color: var(--brand); stop-opacity: 0; }
html[data-theme="light"] .ls-g0 { stop-opacity: .3; }

/* the projection: a quiet frame with viewfinder corners, lit from the lens above */
.ls-frame {
	position: relative; aspect-ratio: 16 / 10; border-radius: var(--gv-radius-sm, 10px); overflow: hidden;
	border: 1px solid var(--border);
	background: radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 70%);
}
.ls-frame::before {
	content: ""; position: absolute; inset: 9px; z-index: 2; pointer-events: none; border: 1px solid var(--ls-ink2);
	-webkit-mask: conic-gradient(at 12px 12px, #0000 75%, #000 0) 0 0 / calc(100% - 12px) calc(100% - 12px);
	        mask: conic-gradient(at 12px 12px, #0000 75%, #000 0) 0 0 / calc(100% - 12px) calc(100% - 12px);
}
.ls-view, .ls-slot { position: absolute; inset: 0; }
.ls-slot svg { display: block; inline-size: 100%; block-size: 100%; overflow: visible; }
.ls-iris { animation: lsIris .8s var(--ls-ease) both; }
.ls-fade { animation: lsFade .35s ease both; }
.ls-out { opacity: 0; transition: opacity .42s ease; }
@keyframes lsIris { from { clip-path: circle(0% at var(--ox, 50%) var(--oy, 50%)); } to { clip-path: circle(120% at var(--ox, 50%) var(--oy, 50%)); } }
@keyframes lsFade { from { opacity: 0; } }

/* caption and the focus scale */
.ls-meta { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; row-gap: 2px; margin-block-start: 12px; min-block-size: 1.5em; font-size: .85rem; line-height: 1.5; }
.ls-idx { font-weight: 700; font-size: .74rem; letter-spacing: .14em; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.ls-ttl { color: var(--fg); font-weight: 600; }
.ls-hint { color: var(--fg-muted); font-size: .8rem; inline-size: 100%; }
.ls-hint:empty { display: none; }
.ls-scale { display: flex; gap: 6px; margin-block-start: 10px; }
.ls-scale i { flex: 1; block-size: 2px; border-radius: 1px; background: var(--ls-ink2); transition: background-color .35s ease, transform .5s var(--ls-ease); transform-origin: center; }
.ls-scale i.on { background: var(--brand); transform: scaleY(2); }

/* ---- paint ---- */
.ls-scene * { stroke-linecap: round; stroke-linejoin: round; }
.ls-scene .a  { fill: none; stroke: var(--ls-ink); stroke-width: 1.3; }
.ls-scene .b  { fill: none; stroke: var(--ls-ink2); stroke-width: 1; }
.ls-scene .c  { fill: var(--ls-fill); stroke: var(--ls-ink2); stroke-width: 1; }
.ls-scene .w  { fill: var(--ls-bg); stroke: var(--ls-ink); stroke-width: 1.2; }
.ls-scene .n  { fill: var(--ls-ink2); stroke: none; }
.ls-scene .o  { fill: none; stroke: var(--brand); stroke-width: 1.6; }
.ls-scene .of { fill: var(--brand); stroke: none; }
.ls-scene .oa { fill: var(--ls-oa); stroke: none; }   /* a plain rgba: color-mix() does not interpolate reliably in keyframes */
.ls-scene .g  { fill: url(#lsGlow); stroke: none; }
.ls-scene .ck { fill: none; stroke: var(--ls-bg); stroke-width: 1.8; }
.ls-scene circle.ck { fill: var(--ls-bg); stroke: none; }
.ls-scene .bd  { fill: none; stroke: var(--ls-ink2); stroke-width: 6.5; }
.ls-scene .bdo { fill: none; stroke: var(--brand); stroke-width: 6.5; }
.ls-scene .sea { fill: var(--ls-bg); stroke: none; }
.ls-scene .gl { fill: none; stroke: var(--ls-ink); stroke-width: 1.5; }
.ls-scene .gl .o { stroke-width: 1.9; }
.ls-scene [style*="--a:"]:not(.x) { opacity: var(--a); }
html[dir="rtl"] .ls-scene.ls-flip .ls-art { transform: scaleX(-1); transform-origin: 160px 100px; }

/* ---- the motion grammar: authored at the last frame, each element arrives there once ---- */
.ls-scene .d, .ls-scene .tr { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.ls-scene .tr { fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-dasharray: .14 2; opacity: 0; }
.ls-scene :is(.m, .s, .sx, .sy, .p, .xd, .dn, .u) { transform-box: fill-box; transform-origin: center; }
.ls-scene .sx { transform-origin: left center; }
.ls-scene .sy { transform-origin: center bottom; }
.ls-scene .x { opacity: 0; }
.ls-scene .xd { opacity: 0; }

.ls-play :is(.d, .f, .u, .dn, .s, .m, .sx, .sy, .x, .xd, .L, .LF, .p, .tr) {
	animation-duration: var(--d, .8s); animation-delay: calc(var(--t, 0) * 1s); animation-timing-function: var(--ls-ease); animation-fill-mode: both;
}
.ls-play .d  { animation-name: lsDraw; }
.ls-play .f  { animation-name: lsF; }
.ls-play .u  { animation-name: lsU; }
.ls-play .dn { animation-name: lsDn; }
.ls-play .s  { animation-name: lsS; animation-timing-function: cubic-bezier(.3, 1.4, .5, 1); }
.ls-play .m  { animation-name: lsM; animation-timing-function: cubic-bezier(.45, 0, .2, 1); }
.ls-play .sx { animation-name: lsSx; }
.ls-play .sy { animation-name: lsSy; }
.ls-play .x  { animation-name: lsX; }
.ls-play .xd { animation-name: lsXd; animation-timing-function: cubic-bezier(.5, 0, .8, .4); }
.ls-play .L  { animation-name: lsL; --d: .7s; }
.ls-play .LF { animation-name: lsLF; --d: .7s; }
.ls-play .p  { animation-name: lsP; --d: .5s; }
.ls-play .tr { animation-name: lsTr; animation-timing-function: cubic-bezier(.42, 0, .25, 1); }
.ls-play .d.L { animation-name: lsDraw, lsL; }
@keyframes lsDraw { from { stroke-dashoffset: 1; } }
@keyframes lsF   { from { opacity: 0; } }
@keyframes lsU   { from { opacity: 0; transform: translateY(8px); } }
@keyframes lsDn  { from { opacity: 0; transform: translateY(-14px); } }
@keyframes lsS   { from { opacity: 0; transform: scale(.35); } }
@keyframes lsM   { from { transform: translate(var(--x, 0px), var(--y, 0px)) rotate(var(--r, 0deg)); } }
@keyframes lsSx  { from { transform: scaleX(var(--k, .3)); } }
@keyframes lsSy  { from { transform: scaleY(0); opacity: 0; } }
@keyframes lsX   { from { opacity: var(--a, 1); } }
@keyframes lsXd  { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(46px); } }
@keyframes lsL   { from { stroke: var(--lc, var(--ls-ink)); } }
@keyframes lsLF  { from { fill: var(--lf, var(--ls-fill)); } }
@keyframes lsP   { 50% { transform: scale(1.12); } }
@keyframes lsTr  { 0% { stroke-dashoffset: .14; opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }

/* lighter: the resolved frame, a cross-fade only · still: the resolved frame, nothing moves */
.ls-lite .ls-scene *, .ls-still .ls-scene * { animation: none !important; }
.ls-still :is(.ls-iris, .ls-fade) { animation: none; }
.ls-still .ls-out { transition: none; }
.ls-still .ls-scale i { transition: none; }
/* off screen or in a hidden tab, nothing advances */
.services.gv-off .ls-stage *, .ls-stage.ls-paused * { animation-play-state: paused !important; }

/* the row the stage is showing (touch and keyboard make it visible; hover already does) */
html[data-theme] .services .scard.ls-on .scard-num { color: var(--brand-text); }
html[data-theme] .services .scard.ls-on::before { transform: scaleX(1); width: 100%; }

/* ---- placement ---- */
@media (min-width: 721px) and (max-width: 1100px) {   /* tablet: statement and stage stay beside the list */
	html[data-theme] .services.ls-on-page .panel.active { align-items: start; }
	html[data-theme] .services.ls-on-page .panel-hd { position: sticky; inset-block-start: calc(var(--nav-h) + 20px); }
	.ls-stage { margin-block-start: 22px; }
}
@media (max-width: 720px) {   /* phones: the stage rides above the list while its rows pass under it */
	.panel > .ls-stage {
		position: sticky; inset-block-start: calc(var(--nav-h) + 6px); z-index: 3; max-inline-size: none;
		margin: 0 0 14px; padding-block: 10px; background: var(--gv-band);
		display: grid; grid-template-columns: min(60%, 240px) minmax(0, 1fr); column-gap: 14px; align-items: center;
		box-shadow: 0 10px 14px -12px rgba(0, 0, 0, .35);
	}
	.panel > .ls-stage .ls-meta { margin: 0; flex-direction: column; align-items: flex-start; font-size: .82rem; }
	.panel > .ls-stage .ls-scale { grid-column: 1 / -1; margin-block-start: 10px; }
	html[data-theme] .services.ls-on-page .scard { scroll-margin-block-start: calc(var(--nav-h) + min(37vw, 150px) + 48px); }
}
@media (max-width: 720px) and (max-height: 560px) { .panel > .ls-stage { position: relative; inset-block-start: auto; } }
