/* ==========================================================================
   SPIM — 3D moving banner + showcase rows (video | text)
   Loaded AFTER theme.css. Uses the logo palette: indigo / violet / magenta.
   ========================================================================== */

/* ---------- A. Hero "one world" (high-rise + villas + plots) ---------- */
html body .h-hero--world { min-height: min(100vh, 860px); display: flex; align-items: center; padding: 120px 0 64px; }
html body .h-hero--world::after { display: none; }
.h-hero--world .h-hero__inner { position: relative; z-index: 3; pointer-events: none; width: 100%; }
.h-hero--world .h-hero__copy { pointer-events: auto; max-width: 560px; }
html body .h-hero--world h1 { font-size: clamp(2.3rem, 3.9vw, 3.8rem); text-shadow: 0 2px 30px rgba(14,10,40,.85); }
html body .h-hero--world .h-hero__lead { font-size: clamp(1rem, 1.25vw, 1.18rem); text-shadow: 0 1px 18px rgba(14,10,40,.9); }
.h-hero--world::before { z-index: 0; }

.w3d { position: absolute; inset: 0; z-index: 1; overflow: hidden; }

.w3d::before {            /* readability veil behind the headline + dusk horizon glow */
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(12,9,34,.82) 0%, rgba(12,9,34,.55) 30%, rgba(12,9,34,0) 52%),
        radial-gradient(60% 50% at 66% 62%, rgba(232,108,240,.16), transparent 70%),
        radial-gradient(50% 40% at 70% 30%, rgba(108,92,231,.22), transparent 70%);
}
.w3d::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--bg, #0b0820)); }
.w3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; opacity: 0; transition: opacity .6s ease; }
.w3d.is-ready canvas { opacity: 1; }
.w3d.is-drag canvas { cursor: grabbing; }
.w3d__pins { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.w3d__hint { position: absolute; right: 24px; bottom: 22px; z-index: 5; font-size: .76rem; color: #cbbcff; display: flex; gap: 8px; align-items: center; letter-spacing: .04em; opacity: .85; pointer-events: none; }
.w3d__hint i { color: #e86cf0; }

/* pins projected from 3D */
.w3d-pin { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; text-decoration: none; color: #fff; will-change: transform; transition: opacity .35s; }
.w3d-pin::after { content: ""; position: absolute; left: -.5px; bottom: 0; width: 1px; height: var(--stem, 30px); background: linear-gradient(to top, rgba(255,255,255,.9), rgba(155,92,246,.1)); transform: translateY(0); transform-origin: bottom; }
.w3d-pin::before { content: ""; position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(155,92,246,.45), 0 0 18px 4px rgba(232,108,240,.7); z-index: 1; }
.w3d-pin__card { position: absolute; left: 0; bottom: var(--stem, 30px); transform: translate(-50%, 0); pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; font-size: .84rem; line-height: 1.2; background: rgba(22,16,56,.78); border: 1px solid rgba(155,140,255,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(8,5,30,.55); transition: transform .3s, background .3s, border-color .3s, box-shadow .3s; flex-wrap: wrap; width: max-content; max-width: 260px; }
.w3d-pin__card i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; background: linear-gradient(135deg, #6C5CE7, #E86CF0); flex: none; }
.w3d-pin__card b { font-weight: 700; white-space: nowrap; }
.w3d-pin__card small { display: none; flex-basis: 100%; font-size: .72rem; color: #d8ccff; font-weight: 400; padding-left: 34px; margin-top: -2px; }
.w3d-pin--prod { z-index: 2; }
.w3d-pin--prod.is-on { z-index: 4; }
.w3d-pin--prod.is-on .w3d-pin__card, .w3d-pin--prod:hover .w3d-pin__card { background: linear-gradient(135deg, rgba(108,92,231,.92), rgba(190,80,225,.9)); border-color: rgba(255,255,255,.55); transform: translate(-50%, -3px); box-shadow: 0 12px 38px rgba(108,92,231,.55); border-radius: 18px; }
.w3d-pin--prod.is-on .w3d-pin__card i, .w3d-pin--prod:hover .w3d-pin__card i { background: rgba(255,255,255,.2); }
.w3d-pin--prod.is-on .w3d-pin__card small, .w3d-pin--prod:hover .w3d-pin__card small { display: block; }
.w3d-pin__ping { position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #e86cf0; animation: w3dPing 1.8s ease-out infinite; }
@keyframes w3dPing { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.w3d-pin--tag .w3d-pin__card { padding: 5px 11px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); pointer-events: none; }
.w3d-pin--tag::before { width: 5px; height: 5px; left: -2.5px; top: -2.5px; box-shadow: 0 0 10px 2px rgba(255,255,255,.6); }
.w3d-pin--tag::after { display: none; }
.w3d-pin--poi .w3d-pin__card { padding: 4px 10px 4px 5px; font-size: .7rem; background: rgba(12,9,34,.7); border-color: color-mix(in srgb, var(--c, #6C5CE7) 60%, transparent); pointer-events: none; }
.w3d-pin--poi .w3d-pin__card i { width: 20px; height: 20px; font-size: .62rem; background: var(--c, #6C5CE7); color: #12102a; }
.w3d-pin--poi::after, .w3d-pin--poi::before { display: none; }
.w3d.is-compact .w3d-pin--poi, .w3d.is-compact .w3d-pin--tag { display: none; }
.w3d.is-compact .w3d-pin__card { padding: 6px 11px 6px 7px; font-size: .74rem; }
.w3d.is-compact .w3d-pin--prod:not(.is-on) .w3d-pin__card b { display: none; }
.w3d.is-compact .w3d-pin--prod:not(.is-on) .w3d-pin__card { padding: 5px; }
.w3d.is-compact .w3d-pin__card small { display: none !important; }
.w3d.is-compact .w3d__hint { display: none; }

@media (max-width: 900px) {
    html body .h-hero--world { display: block; min-height: 0; padding: 108px 0 0; }
    .h-hero--world .h-hero__inner { pointer-events: auto; }
    .h-hero--world .h-hero__cta .btn { flex: 1 1 100%; }
    .w3d { position: relative; inset: auto; height: clamp(380px, 112vw, 600px); margin-top: 12px; }
    .w3d::before { background: radial-gradient(60% 50% at 60% 60%, rgba(232,108,240,.14), transparent 70%); }
}
@media (prefers-reduced-motion: reduce) { .w3d-pin__ping { animation: none; } }

/* ---------- B. Showcase rows ---------- */
.sc { padding: clamp(56px, 8vw, 112px) 0; }
.sc .section-head { margin-bottom: clamp(40px, 6vw, 80px); }
.sc-rows { display: flex; flex-direction: column; gap: clamp(64px, 9vw, 128px); }

.sc-row { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: clamp(32px, 5.5vw, 88px); align-items: center; }
.sc-row.rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); }
.sc-row.rev .sc-media { order: 2; }
.sc-copy { max-width: 480px; }
.sc-copy .eyebrow { margin-bottom: 18px; }
.sc-copy h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; color: #fff; }
.sc-copy h3 span { background: var(--spim-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sc-copy > p { margin-top: 16px; font-size: 1.04rem; line-height: 1.7; color: #c3badf; }
.sc-list { margin: 22px 0 28px; display: grid; gap: 12px; padding: 0; list-style: none; }
.sc-list li { display: flex; gap: 12px; align-items: flex-start; color: #e4dcff; font-size: .98rem; line-height: 1.5; }
.sc-list li i { flex: none; margin-top: 3px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: .6rem; color: #fff; background: var(--spim-grad-soft); border: 1px solid rgba(169, 138, 255, .4); }
.sc-copy .btn { margin-top: 2px; }

/* the video card: deep indigo plate with a soft violet glow, like the reference */
.sc-media { position: relative; }
.sc-media::before { content: ""; position: absolute; inset: -8% -6%; z-index: -1; background: radial-gradient(60% 60% at 50% 50%, rgba(155, 92, 246, .42), transparent 70%); filter: blur(30px); }
.sc-plate {
    padding: clamp(10px, 1.6vw, 18px); border-radius: 28px;
    background: linear-gradient(160deg, #1a1146 0%, #0f0a2c 55%, #170b3a 100%);
    border: 1px solid rgba(169, 138, 255, .28);
    box-shadow: 0 30px 80px rgba(6, 3, 24, .65), 0 0 0 1px rgba(255, 255, 255, .03) inset;
}
.sc-frame { position: relative; aspect-ratio: 16 / 10.4; border-radius: 18px; overflow: hidden; background: #0c0820; isolation: isolate; }
.sc-frame > .sc-scene, .sc-frame > video { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-frame > video { object-fit: cover; opacity: 0; transition: opacity .6s; z-index: 2; background: #0c0820; }
.sc-frame.has-video > video { opacity: 1; }
.sc-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sc-live { position: absolute; z-index: 5; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgba(12, 8, 32, .7); border: 1px solid rgba(201, 181, 255, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sc-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #e86cf0; box-shadow: 0 0 10px #e86cf0; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* reveal */
.sc-row { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.sc-row.in { opacity: 1; transform: none; }

/* ----- WebVerse scene ----- */
.wv { position: absolute; inset: 0; padding: 14% 5% 5%; display: flex; flex-direction: column; gap: 3.5%; background: radial-gradient(80% 70% at 70% 0%, rgba(108, 92, 231, .35), transparent 70%), #0c0820; font-size: clamp(.55rem, 1.15vw, .8rem); }
.wv-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wv-chip { padding: .35em .95em; border-radius: 999px; color: #cfc4f5; border: 1px solid rgba(169, 138, 255, .3); background: rgba(255, 255, 255, .03); font-weight: 600; }
.wv-chip.on { background: var(--spim-grad); color: #fff; border-color: transparent; }
.wv-legend { margin-left: auto; color: #a99fd0; display: flex; align-items: center; gap: .5em; }
.wv-legend b { width: .8em; height: .8em; border-radius: 3px; display: inline-block; margin-left: .6em; }
.wv-body { flex: 1; display: grid; grid-template-columns: 1.7fr 1fr; gap: 4%; min-height: 0; }
.wv-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; align-content: stretch; }
.wv-grid i, .wv-legend b { border-radius: 5px; }
.av { background: linear-gradient(135deg, #6c5ce7, #9b5cf6); box-shadow: 0 0 12px rgba(155, 92, 246, .45); }
.hd { background: rgba(232, 108, 240, .55); }
.sd { background: rgba(255, 255, 255, .08); }
.wv-grid i { transition: background .6s, box-shadow .6s; animation: cellin .6s both; animation-delay: var(--d); }
@keyframes cellin { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.wv-card { align-self: center; display: flex; flex-direction: column; gap: .5em; padding: 1.1em; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(169, 138, 255, .35); color: #d6ccf7; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: floaty 5s ease-in-out infinite alternate; }
.wv-card small { color: #9a8fc6; } .wv-card strong { color: #fff; font-size: 1.5em; line-height: 1; }
.wv-card em { font-style: normal; color: #e86cf0; font-weight: 700; display: flex; gap: .5em; align-items: center; } .wv-card em i { font-size: .55em; }
.wv-btn { margin-top: .4em; text-align: center; padding: .6em; border-radius: 999px; background: var(--spim-grad); color: #fff; font-weight: 700; }
@keyframes floaty { to { transform: translateY(-8px); } }

/* ----- map scenes ----- */
.sc-pin { animation: drop 4.2s cubic-bezier(.3, 1.4, .5, 1) infinite; animation-delay: var(--d); transform-box: view-box; }
.sc-pin.site { animation: none; }
@keyframes drop { 0% { opacity: 0; transform: translateY(-40px); } 10%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.zq-route { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 4.2s ease-in-out infinite; animation-delay: var(--d); }
@keyframes draw { 0% { stroke-dashoffset: 100; opacity: 1; } 35%, 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.zq-pulse { transform-origin: 400px 262px; transform-box: view-box; animation: pulse 2.6s ease-out infinite; }
.zq-pulse.p2 { animation-delay: 1.3s; }
@keyframes pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(4.4); opacity: 0; } }
.zq-zone { animation: zone 3.6s ease-in-out infinite alternate; }
.zq-zone.z2 { animation-delay: 1.4s; }
@keyframes zone { from { opacity: .35; } to { opacity: 1; } }
.zq-scan { animation: scan 5.5s linear infinite; }
@keyframes scan { from { transform: translateX(0); } to { transform: translateX(960px); } }
.sc-tag { position: absolute; z-index: 4; padding: 7px 12px; border-radius: 999px; font-size: clamp(.55rem, 1.1vw, .76rem); font-weight: 600; color: #fff; background: rgba(12, 8, 32, .78); border: 1px solid rgba(201, 181, 255, .4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: inline-flex; gap: 7px; align-items: center; animation: floaty 4.5s ease-in-out infinite alternate; }
.sc-tag i { color: #e86cf0; }
.sc-tag.t1 { right: 4%; top: 6%; } .sc-tag.t2 { left: 5%; bottom: 8%; animation-delay: .8s; } .sc-tag.t3 { right: 5%; bottom: 10%; animation-delay: 1.6s; }

.np-bar { position: absolute; z-index: 4; left: 4%; right: 4%; top: 15%; display: flex; gap: 8px; flex-wrap: wrap; }
.np-chip { border: 1px solid rgba(169, 138, 255, .35); background: rgba(12, 8, 32, .78); color: #d9ccff; border-radius: 999px; padding: .5em 1em; font-size: clamp(.58rem, 1.15vw, .8rem); font-weight: 600; display: inline-flex; gap: .55em; align-items: center; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .25s, color .25s; }
.np-chip.on { background: var(--spim-grad); color: #fff; border-color: transparent; }
.np-list { position: absolute; z-index: 4; left: 4%; bottom: 6%; width: min(46%, 270px); padding: 12px 14px; border-radius: 14px; background: rgba(12, 8, 32, .84); border: 1px solid rgba(201, 181, 255, .35); color: #e4dcff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: clamp(.58rem, 1.15vw, .82rem); }
.np-list small { color: #9a8fc6; text-transform: uppercase; letter-spacing: .1em; font-size: .85em; }
.np-rows { margin-top: 8px; display: grid; gap: 8px; }
.np-rows div { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; animation: slidein .5s both; }
.np-rows span { font-weight: 700; color: #fff; } .np-rows b { grid-column: 2; color: #b7aae0; font-weight: 500; }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } }
.np { transition: opacity .4s; } .np.dim { opacity: .22; }
.np-route { stroke-dasharray: 7 7; } .np-route.draw { animation: dash 1.1s linear; }
@keyframes dash { from { stroke-dashoffset: 120; opacity: 0; } 20% { opacity: 1; } to { stroke-dashoffset: 0; } }
.np .sc-pin { animation: none; }

/* ----- tour scene ----- */
.tr-view { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.tr-view.on { opacity: 1; }
.tr-int .pan { position: absolute; inset: 0 -22% 0 -22%; animation: pan 14s ease-in-out infinite alternate; }
@keyframes pan { from { transform: translateX(-7%); } to { transform: translateX(7%); } }
.orbit { offset-path: path('M80 300 A320 84 0 1 0 720 300 A320 84 0 1 0 80 300'); animation: orb 9s linear infinite; }
@keyframes orb { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.win { animation: win 4s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes win { to { opacity: .8; } }
.hot { animation: hot 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hot.h2 { animation-delay: .5s; } .hot.h3 { animation-delay: 1s; }
@keyframes hot { 50% { opacity: .35; } }
.tr-toggle { position: absolute; z-index: 5; left: 50%; bottom: 6%; transform: translateX(-50%); display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(12, 8, 32, .82); border: 1px solid rgba(201, 181, 255, .4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tr-toggle button { border: 0; background: transparent; color: #d9ccff; padding: .55em 1.1em; border-radius: 999px; font-size: clamp(.6rem, 1.2vw, .82rem); font-weight: 700; display: inline-flex; gap: .55em; align-items: center; cursor: pointer; transition: background .25s; }
.tr-toggle button.on { background: var(--spim-grad); color: #fff; }
.tr-badge { position: absolute; z-index: 5; right: 4%; top: 6%; padding: 6px 12px; border-radius: 999px; background: rgba(12, 8, 32, .78); border: 1px solid rgba(201, 181, 255, .4); color: #fff; font-weight: 800; font-size: clamp(.6rem, 1.1vw, .8rem); display: inline-flex; gap: 7px; align-items: center; }
.tr-badge i { color: #e86cf0; }
.tr-rooms { position: absolute; z-index: 5; left: 4%; top: 15%; display: none; gap: 6px; }
.is-int .tr-rooms { display: flex; }
.tr-rooms span { padding: 5px 11px; border-radius: 999px; font-size: clamp(.56rem, 1.05vw, .76rem); color: #cfc4f5; background: rgba(12, 8, 32, .7); border: 1px solid rgba(169, 138, 255, .3); }
.tr-rooms span.on { background: var(--spim-grad); color: #fff; border-color: transparent; }
.tr-hint { position: absolute; z-index: 5; right: 4%; bottom: 7%; font-size: clamp(.56rem, 1.05vw, .75rem); color: #cfc4f5; display: none; gap: 6px; align-items: center; }
@media (min-width: 640px) { .tr-hint { display: inline-flex; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .sc-row, .sc-row.rev { grid-template-columns: 1fr; gap: 28px; }
    .sc-row.rev .sc-media { order: 0; }
    .sc-copy { max-width: none; }
    .wv-body { grid-template-columns: 1fr; } .wv-card { display: none; }
}
@media (max-width: 560px) {
    .sc-plate { border-radius: 20px; padding: 8px; } .sc-frame { border-radius: 14px; aspect-ratio: 4 / 3.4; }
    .np-list { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sc-row { opacity: 1; transform: none; transition: none; }
    .sc-pin, .zq-route, .zq-pulse, .zq-zone, .zq-scan, .orbit, .win, .hot, .wv-card, .sc-tag, .tr-int .pan, .hero-scroll::after { animation: none !important; }
    .sc-pin, .zq-route { opacity: 1; stroke-dashoffset: 0; }
}

/* ---------- C. Real-video players (WebVerse, Tours) + button bar ---------- */
.sc-frame--real { background: #0c0820; aspect-ratio: 16 / 9; cursor: pointer; }
.sc-frame--real > video { opacity: 1; z-index: 1; transition: opacity .6s; object-fit: cover; }
.sc-frame--real > video:not(.on):not(:only-of-type) { opacity: 0; pointer-events: none; }
.sc-frame--real.no-video > video { display: none; }
.sc-frame--real .sc-live { top: auto; bottom: 12px; left: 12px; z-index: 5; }
.sc-frame--real .sc-live::before { display: none; }
.sc-frame--real .sc-live b { font-weight: 700; }

.sc-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 6px 4px; }
.sc-brand { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--spim-grad-soft); border: 1px solid rgba(169, 138, 255, .4); color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sc-brand i { width: 7px; height: 7px; border-radius: 50%; background: #e86cf0; box-shadow: 0 0 10px #e86cf0; animation: blink 1.6s infinite; }
.sc-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-steps[hidden] { display: none; }
.sc-steps button, .sc-seg button {
    position: relative; overflow: hidden; border: 1px solid rgba(169, 138, 255, .32); background: rgba(255, 255, 255, .04);
    color: #d9ccff; border-radius: 999px; padding: 8px 15px; font: 600 .8rem/1 Inter, system-ui, sans-serif;
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.sc-steps button i, .sc-seg button i { font-size: .72rem; color: #b79bff; }
.sc-steps button:hover, .sc-seg button:hover { border-color: rgba(201, 181, 255, .7); color: #fff; transform: translateY(-1px); }
.sc-steps button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: var(--spim-grad); opacity: 0; transition: opacity .25s; }
.sc-steps button.on { background: rgba(155, 92, 246, .22); border-color: rgba(201, 181, 255, .75); color: #fff; }
.sc-steps button.on::after { opacity: 1; }
.sc-steps button.on i { color: #f0a6f6; }
.sc-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(12, 8, 32, .8); border: 1px solid rgba(201, 181, 255, .4); }
.sc-seg button { border: 0; background: transparent; padding: 9px 16px; }
.sc-seg button.on { background: var(--spim-grad); color: #fff; }
.sc-seg button.on i { color: #fff; }
.sc-steps button:focus-visible, .sc-seg button:focus-visible { outline: 2px solid #c9b5ff; outline-offset: 2px; }
@media (max-width: 560px) {
    .sc-frame--real { aspect-ratio: 16 / 10; }
    .sc-steps button { padding: 7px 12px; font-size: .74rem; }
    .sc-bar { padding-top: 10px; }
}

/* map frame uses the clip's own ratio; colour legend under the bar */
.sc-frame--map { aspect-ratio: 1280 / 734; }
.sc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 6px 2px; padding: 12px 0 0; list-style: none; border-top: 1px solid rgba(169, 138, 255, .18); color: #c3badf; font-size: .78rem; }
.sc-legend li { display: inline-flex; align-items: center; gap: 7px; }
.sc-legend i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .18); }


/* ---------- intro preloader (first visit only) — same GSAP effect as the original SPIM site ---------- */
.mil-preloader { display: none; }
html.spim-intro .mil-preloader { display: flex; }
html.spim-intro { overflow: hidden; }
html.spim-intro .h-hero__copy { opacity: 0; }
.mil-preloader { position: fixed; z-index: 2147483000; top: 0; left: 0; width: 100%; height: 100vh; background: #000; justify-content: center; align-items: center; }
.mil-preloader.mil-hidden { display: none !important; pointer-events: none; }
.mil-preloader-animation { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; position: relative; }
.mil-pos-abs { position: absolute; width: 100%; display: flex; justify-content: center; align-items: center; pointer-events: none; }
.intro-text-row { display: flex; justify-content: center; align-items: center; gap: .6rem; white-space: nowrap; flex-wrap: wrap; }
.mil-h3 { font-family: 'Montserrat', 'Inter', sans-serif; font-size: 2rem; margin: 0; line-height: 1; color: #fff; letter-spacing: 2px; }
.mil-thin { font-weight: 300; color: #b0b0b0; }
.mil-bold { font-weight: 700; color: #fff; }
.purple-gradient-text { font-weight: 700; background: linear-gradient(90deg, #9333ea, #d946ef); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: inline-block; padding-bottom: 2px; }
.rotating-text-area { position: relative; display: inline-block; height: 2rem; min-width: 200px; overflow: hidden; vertical-align: bottom; text-align: left; }
.rotating-word { position: absolute; top: 0; left: 0; opacity: 0; transform: translateY(100%); }
.word-metaverse { opacity: 1; transform: translateY(0%); }
.mil-reveal-frame { position: relative; display: inline-block; overflow: hidden; padding: 5px 0; }
.mil-reveal-box { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: linear-gradient(90deg, #9333ea, #d946ef); z-index: 5; }
.spim-text { position: relative; z-index: 1; padding: 0 15px; display: block; opacity: 0; color: #fff; font-weight: 400; letter-spacing: 2px; }
@media (max-width: 768px) { .intro-text-row { flex-wrap: wrap; text-align: center; } .mil-h3 { font-size: 1.2rem; } .rotating-text-area { min-width: 140px; height: 1.4rem; } }

/* "world is loading" indicator — only appears if the 3D world takes more than ~0.5s, sits where the island will be */
.w3d__boot { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; animation: bootIn .5s ease .55s forwards; }
.w3d.is-ready .w3d__boot { animation: none; opacity: 0; transition: opacity .4s; }
.w3d__boot b { position: absolute; left: 67%; top: 52%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 2px solid rgba(155,140,255,.18); border-top-color: #e86cf0; border-right-color: #8f7bff; animation: bootSpin 1s linear infinite; box-shadow: 0 0 30px rgba(108,92,231,.35); }
.w3d__boot span { position: absolute; left: 67%; top: calc(52% + 52px); transform: translateX(-50%); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #cbbcff; white-space: nowrap; }
@keyframes bootIn { to { opacity: 1; } }
@keyframes bootSpin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .w3d__boot b { left: 50%; } .w3d__boot span { left: 50%; } }
@media (prefers-reduced-motion: reduce) { .w3d__boot b { animation: none; } }

/* intro smoothness: promote animated layers so the wipe/words never repaint the page */
html.spim-intro .mil-preloader, html.spim-intro .rotating-word, html.spim-intro .anim-static, html.spim-intro .mil-reveal-box, html.spim-intro .mil-animation-1 { will-change: transform, opacity; backface-visibility: hidden; }
html.spim-intro .mil-reveal-box { will-change: left, width, transform; }
