/* MARS OS — The Living Section. Hero-scoped; every rule is under .hero--living. */
.hero--living{--ls-open:.36;--ls-line:#ffffff1c}
.hero--living .hero-inner{grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:clamp(20px,3vw,56px);min-height:min(740px,calc(100svh - 142px))}
@media(min-width:981px){.hero--living h1{font-size:clamp(52px,5.4vw,96px)}}
.hero--living .ls{position:relative;z-index:2;min-width:0;padding-block:28px}

/* Stage: fixed geometry from first paint, so WebGL never shifts layout. */
.hero--living .ls-stage{position:relative;width:100%;aspect-ratio:1.5/1;isolation:isolate}
.hero--living .ls-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .7s ease;touch-action:pan-y pinch-zoom;-webkit-tap-highlight-color:transparent}
.hero--living[data-ls-mode=webgl] .ls-canvas{opacity:1}

/* Structural HTML/CSS fallback: Website, eight Modules, MARS OS foundation. No image. */
.hero--living .ls-diagram{position:absolute;inset:7% 9% 5%;display:flex;flex-direction:column;justify-content:center;gap:calc(6px + var(--ls-open)*14px);transform:perspective(1500px) rotateX(16deg);transform-origin:50% 70%;transition:opacity .6s ease,visibility .6s,gap .45s ease}
.hero--living[data-ls-mode=webgl] .ls-diagram{opacity:0;visibility:hidden}
.hero--living .ls-d-surface{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;gap:8px 14px;align-items:center;padding:12px 16px 14px;background:linear-gradient(180deg,#ece8df,#d9d4ca);color:#1a2028;border:1px solid #fff6;box-shadow:0 18px 34px #0008,inset 0 -3px 0 #2c313933;transform:translateY(calc(var(--ls-open)*-10px));transition:transform .45s ease}
.hero--living .ls-d-chrome{display:flex;gap:5px}
.hero--living .ls-d-chrome i{width:7px;height:7px;border-radius:50%;background:#2a2f37}
.hero--living .ls-d-chrome i:first-child{background:#ffad82}
.hero--living .ls-d-name{font-size:11px;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
.hero--living .ls-d-lines{grid-column:1/-1;display:grid;grid-template-columns:3fr 2fr 4fr;gap:8px}
.hero--living .ls-d-lines i{height:7px;background:#2a2f37}
.hero--living .ls-d-lines i:nth-child(2){background:#ffad82}
.hero--living .ls-d-links{display:grid;grid-template-columns:repeat(4,1fr);height:calc(12px + var(--ls-open)*26px);transition:height .45s ease}
.hero--living .ls-d-links i{grid-row:1;width:2px;height:100%;background:#ffad82;box-shadow:0 0 10px #ffad8299;justify-self:center;translate:-14px 0}
.hero--living .ls-d-links i:nth-child(n+5){translate:14px 0}
.hero--living .ls-d-links i:nth-child(1),.hero--living .ls-d-links i:nth-child(5){grid-column:1}
.hero--living .ls-d-links i:nth-child(2),.hero--living .ls-d-links i:nth-child(6){grid-column:2}
.hero--living .ls-d-links i:nth-child(3),.hero--living .ls-d-links i:nth-child(7){grid-column:3}
.hero--living .ls-d-links i:nth-child(4),.hero--living .ls-d-links i:nth-child(8){grid-column:4}
.hero--living .ls-d-links [data-link=crm],.hero--living .ls-d-links [data-link=commerce],.hero--living .ls-d-links [data-link=updates]{background:#ffffff1f;box-shadow:none}
.hero--living .ls-d-modules{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:calc(6px + var(--ls-open)*8px);transition:gap .45s ease}
.hero--living .ls-d-module{position:relative;display:flex;align-items:flex-end;min-height:clamp(38px,5.4vw,62px);padding:8px 9px;background:linear-gradient(180deg,#30353e,#1d2128);border:1px solid #ffffff1a;border-top-color:#ffffff38;box-shadow:0 10px 20px #0007;color:#c0c4ca;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;overflow-wrap:anywhere;transition:border-color .25s,color .25s,transform .25s,box-shadow .25s}
.hero--living .ls-d-module:after{content:"";position:absolute;inset-inline:9px;bottom:3px;height:2px;background:#ffad8240}
.hero--living .ls-d-module[data-ls-tile=crm]:after,.hero--living .ls-d-module[data-ls-tile=commerce]:after{background:#ffad82;box-shadow:0 0 8px #ffad82}
.hero--living .ls-d-module.is-active{border-color:#ffad82;color:#ffd0b8;transform:translateY(-4px);box-shadow:0 14px 26px #000a,0 0 0 1px #ffad8266,0 0 26px #ffad8233}
.hero--living .ls-d-foundation{display:flex;align-items:center;gap:12px;padding:10px 16px;background:linear-gradient(180deg,#262b33,#171b21);border:1px solid #ffffff14;border-top:2px solid #ffad8299;box-shadow:0 24px 40px #000b;color:#ffd0b8;font-size:11px;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
.hero--living .ls-d-mark{flex:none;width:30px;height:30px}

/* Decorative floating label above the focused module (the HTML controls carry the accessible names). */
.hero--living .ls-label{position:absolute;left:0;top:0;z-index:3;pointer-events:none;padding:6px 10px;background:#11151bee;border:1px solid #ffad8299;color:#ffd0b8;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap;opacity:0;transition:opacity .2s ease}
.hero--living[data-ls-mode=webgl] .ls-label[data-visible=true]{opacity:1}

/* Native, accessible controls: a compact inspection index, secondary to the scene and the Hero CTAs.
   Visibility (not display) keeps their space reserved before script runs. */
html:not(.js) .hero--living .ls-controls{visibility:hidden}
.hero--living .ls-controls{display:grid;gap:12px;margin-top:10px}
.hero--living .ls-actions{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
.hero--living .ls-action,.hero--living .ls-chip{font:inherit;cursor:pointer;min-height:44px;-webkit-tap-highlight-color:transparent;transition:background .2s,border-color .2s,color .2s,box-shadow .2s}
.hero--living .ls-action{display:inline-flex;align-items:center;gap:9px;padding:0 14px;color:#cfd3d8;background:none;border:1px solid #ffffff1a;font-size:12px;font-weight:700;letter-spacing:.03em}
.hero--living .ls-action:hover{color:#fff;border-color:#ffffff3d;background:#ffffff08}
.hero--living [data-ls-expand]:before{content:"";width:7px;height:7px;border:1.5px solid currentColor;border-radius:50%;opacity:.8}
.hero--living[data-ls-expanded=true] [data-ls-expand]{color:#ffd0b8;border-color:#ffad8273}
.hero--living[data-ls-expanded=true] [data-ls-expand]:before{background:#ffad82;border-color:#ffad82;box-shadow:0 0 8px #ffad82}
.hero--living .ls-action--quiet{margin-inline-start:auto;border-color:transparent;color:var(--muted);padding-inline:10px}
.hero--living .ls-action--quiet:before{content:"";width:8px;height:9px;border-inline:2.5px solid currentColor;box-sizing:border-box}
.hero--living[data-ls-paused=true] .ls-action--quiet:before{width:0;height:0;border:0;border-block:5px solid transparent;border-inline-start:8px solid currentColor}
.hero--living .ls-modules{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0;padding:0;list-style:none;border-top:1px solid #ffffff14}
.hero--living .ls-modules li{display:flex;border-bottom:1px solid #ffffff0f}
.hero--living .ls-modules li:not(:nth-child(4n+1)){border-inline-start:1px solid #ffffff0f}
.hero--living .ls-chip{position:relative;display:flex;align-items:center;gap:10px;width:100%;padding:0 12px;color:#9aa2ab;background:none;border:0;font-size:11px;font-weight:750;letter-spacing:.13em;text-transform:uppercase;text-align:start;line-height:1.25}
.hero--living .ls-chip:before{content:"";flex:none;width:5px;height:5px;background:#ffffff33;transition:background .2s,box-shadow .2s}
.hero--living .ls-chip:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:#ffad82;transform:scaleX(0);transition:transform .25s ease}
.hero--living .ls-chip:hover{color:#eceef0;background:#ffffff06}
.hero--living .ls-chip:hover:before{background:#ffad8299}
.hero--living .ls-chip[aria-pressed=true]{color:#ffd0b8;background:linear-gradient(180deg,#ffad8200,#ffad8212)}
.hero--living .ls-chip[aria-pressed=true]:before{background:#ffad82;box-shadow:0 0 9px #ffad82}
.hero--living .ls-chip[aria-pressed=true]:after{transform:none}
.hero--living .ls-action:focus-visible,.hero--living .ls-chip:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.hero--living .ls-detail{margin:0;min-height:3.1em;color:#a9b0b8;font-size:13.5px;line-height:1.55;max-width:620px}
.hero--living .ls-detail strong{color:#ffd0b8;font-weight:750;margin-inline-end:4px}
[dir=rtl] .hero--living :is(.ls-chip,.ls-label,.ls-d-module,.ls-d-name,.ls-d-foundation,.ls-action){letter-spacing:0}

@media(max-width:1100px){.hero--living .hero-inner{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.hero--living .ls-stage{aspect-ratio:1.3/1}}
@media(max-width:980px){
.hero--living .hero-inner{display:flex;flex-direction:column;align-items:stretch;gap:0;min-height:0}
.hero--living .ls{width:min(100%,760px);align-self:center;padding-block:4px 30px}
.hero--living .ls-stage{aspect-ratio:1.45/1}
}
/* Phones: the module index becomes a single swipeable rail so the Hero stays compact. */
@media(max-width:600px){
.hero--living .ls{padding-block:0 18px}
.hero--living .ls-stage{aspect-ratio:1.72/1;margin-inline:calc(-1*var(--gutter) + 6px);width:calc(100% + 2*var(--gutter) - 12px)}
.hero--living .ls-controls{gap:10px;margin-top:4px}
.hero--living .ls-modules{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;margin-inline:calc(-1*var(--gutter));padding-inline:var(--gutter);scroll-padding-inline:var(--gutter);border-bottom:1px solid #ffffff14}
.hero--living .ls-modules::-webkit-scrollbar{display:none}
.hero--living .ls-modules li,.hero--living .ls-modules li:not(:nth-child(4n+1)){flex:none;border:0;scroll-snap-align:start}
.hero--living .ls-modules li+li{border-inline-start:1px solid #ffffff0f}
.hero--living .ls-chip{white-space:nowrap;padding:0 14px}
.hero--living .ls-action{padding:0 12px}
.hero--living .ls-action--quiet{width:44px;padding:0;justify-content:center;font-size:0}
.hero--living .ls-detail{min-height:4.65em}
.hero--living .ls-diagram{inset:4% 4% 3%}
.hero--living .ls-d-module{font-size:9px;letter-spacing:.06em;padding:6px}
}
@media(prefers-reduced-motion:reduce){.hero--living :is(.ls-canvas,.ls-diagram,.ls-d-surface,.ls-d-links,.ls-d-modules,.ls-d-module,.ls-label){transition:none}}
@media(forced-colors:active){.hero--living .ls-chip[aria-pressed=true]{outline:2px solid Highlight}}
