/* STR v3 interactive build guide */
:root {
  --bg: #0b1020;
  --bg-2: #111a30;
  --panel: rgba(19, 26, 46, 0.86);
  --panel-solid: #131a2e;
  --line: rgba(255, 255, 255, 0.09);
  --text: #e8ecf5;
  --muted: #8b94ab;
  --yellow: #ffd21f;
  --yellow-2: #e0b400;
  --red: #e63946;
  --blue: #2f7bdb;
  --radius: 16px;
  --nav-h: 60px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: radial-gradient(1200px 800px at 80% 10%, #182446 0%, var(--bg) 55%) fixed;
  color: var(--text); font-family: var(--font); line-height: 1.5; overflow-x: hidden;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
kbd { font: 600 0.8em var(--font); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }
code { font-size: .9em; background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 6px; }

/* ------------------------------------------------------------- canvases */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 1; transition: opacity .6s ease; }
body[data-mode="dim"] #gl { opacity: .10; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

/* ------------------------------------------------------------- loader */
#loader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-content: center; text-align: center; gap: 16px; transition: opacity .5s ease, visibility .5s; }
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo { font-weight: 900; font-size: 56px; letter-spacing: -0.04em; }
.loader-logo span { color: var(--yellow); font-size: 28px; margin-left: 6px; vertical-align: super; }
.loader-bar { width: 220px; height: 4px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; margin: 0 auto; }
.loader-bar i { display: block; height: 100%; width: 30%; background: var(--yellow); animation: load 1.2s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.loader-text { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------- nav */
#nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; backdrop-filter: blur(14px); background: rgba(11,16,32,.55); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-badge { background: var(--yellow); color: #111; font-weight: 900; padding: 2px 8px; border-radius: 8px; letter-spacing: .02em; }
.brand-text { color: var(--muted); font-weight: 600; font-size: 14px; }
#nav nav { display: flex; gap: 6px; }
#nav nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
#nav nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
#nav nav a.active { color: #111; background: var(--yellow); font-weight: 700; }
.nav-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.nav-progress i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .15s linear; }

/* ------------------------------------------------------------- generic */
main { position: relative; z-index: 1; pointer-events: none; }
/* Empty space over the model passes clicks through to the canvas, so drag and scroll-zoom work. */
#parts, footer,
#hero .hero-copy,
#build .build-head, #build .step, #build .hud,
#finish .finish-copy { pointer-events: auto; }
section { position: relative; }
.stage { min-height: 100vh; padding: calc(var(--nav-h) + 40px) 6vw 60px; }
.panel-section { padding: 110px 6vw 80px; background: linear-gradient(180deg, rgba(11,16,32,0) 0%, rgba(11,16,32,.85) 8%, rgba(11,16,32,.85) 92%, rgba(11,16,32,0) 100%); }
.kicker { color: var(--yellow); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 900; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 17px; max-width: 640px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; border: 1px solid transparent; transition: transform .15s ease, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: #111; }
.btn-primary:hover { background: #ffe26a; }
.btn-primary .arrow { transition: transform .2s; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-ghost { background: rgba(255,255,255,.05); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch span { width: 34px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.14); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--yellow); }
.switch input:checked + span::after { transform: translateX(14px); background: #111; }
.switch:hover { color: var(--text); }

/* ------------------------------------------------------------- hero */
#hero { display: grid; grid-template-columns: minmax(320px, 46%) 1fr; align-items: center; }
.hero-copy { max-width: 560px; animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,210,31,.2); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(255,210,31,.25);} 50% { box-shadow: 0 0 0 7px rgba(255,210,31,0);} }
#hero h1 { margin: 22px 0 14px; line-height: .9; display: flex; align-items: flex-start; gap: 10px; }
.h1-big { font-size: clamp(88px, 13vw, 168px); font-weight: 900; letter-spacing: -0.06em; background: linear-gradient(180deg, #fff 30%, #c8d0e6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h1-ver { font-size: clamp(28px, 4vw, 48px); font-weight: 900; color: #111; background: var(--yellow); padding: 4px 12px; border-radius: 12px; margin-top: 14px; }
.lede { font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); max-width: 520px; }
.stats { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; min-width: 96px; }
.stat b { display: block; font-size: 22px; font-weight: 900; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.hint { margin-top: 22px; color: var(--muted); font-size: 13px; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.25); border-radius: 14px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--yellow); animation: cue 1.6s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }

/* ------------------------------------------------------------- gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel-solid); aspect-ratio: 4 / 3; }
.gallery figure.tall { grid-row: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; font-size: 13px; background: linear-gradient(0deg, rgba(0,0,0,.7), transparent); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 30px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.fact-k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.fact-v { font-weight: 700; }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); }

/* ------------------------------------------------------------- parts */
.toggle-row { margin-top: 18px; }
.parts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.part { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: transform .2s ease, border-color .2s, box-shadow .2s; overflow: hidden; }
.part:hover { transform: translateY(-4px); border-color: rgba(255,210,31,.5); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.part.flash { animation: flash 1s ease; }
@keyframes flash { 0%,100% { box-shadow: 0 0 0 0 rgba(255,210,31,0);} 30% { box-shadow: 0 0 0 6px rgba(255,210,31,.6);} }
.part-img { position: relative; aspect-ratio: 1; border-radius: 12px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.08), rgba(255,255,255,.02)); display: grid; place-items: center; overflow: hidden; }
.part-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10%; transition: opacity .3s; }
.qty { position: absolute; top: 10px; left: 10px; background: var(--yellow); color: #111; font-weight: 900; font-size: 14px; padding: 3px 9px; border-radius: 8px; z-index: 2; }
.part-name { font-weight: 700; margin-top: 12px; font-size: 15px; line-height: 1.25; }
.part-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.part-meta .sw { width: 12px; height: 12px; border-radius: 4px; border: 1px solid rgba(255,255,255,.25); }
.part-step { margin-left: auto; background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 40px; }
.tip { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--muted); font-size: 14px; }
.tip b { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--yellow); color: #111; display: grid; place-items: center; font-weight: 900; }

/* ------------------------------------------------------------- build */
#build { display: grid; grid-template-columns: minmax(340px, 44%) 1fr; gap: 40px; padding-bottom: 0; }
.build-steps { padding-bottom: 40vh; }
.build-head { margin-bottom: 30px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px 22px; transition: border-color .3s, transform .3s, box-shadow .3s, opacity .3s; opacity: .55; scroll-margin-top: 30vh; }
.step.active { opacity: 1; border-color: rgba(255,210,31,.6); box-shadow: 0 20px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(255,210,31,.25) inset; transform: translateX(6px); }
.step-head { display: flex; align-items: center; gap: 14px; }
.step-num { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--yellow); color: #111; display: grid; place-items: center; font-weight: 900; font-size: 22px; }
.step-title { font-size: 20px; font-weight: 800; }
.step-sub { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.step-note { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; }
.step-parts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px 6px 6px; font-size: 13px; }
.chip img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,.06); }
.chip b { color: var(--yellow); font-weight: 900; }
.step-text { color: #c6cde0; font-size: 15px; }
.step-actions { margin-top: 14px; display: flex; gap: 10px; }
.link { background: none; border: none; color: var(--yellow); font-weight: 700; font-size: 13px; padding: 0; }
.link:hover { text-decoration: underline; }

.hud { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; margin-left: auto; width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; backdrop-filter: blur(8px); z-index: 2; transition: opacity .35s ease; }
body:not([data-mode="build"]) .hud { opacity: 0; pointer-events: none; }
.hud-top { display: flex; align-items: baseline; gap: 14px; }
.hud-step { display: flex; align-items: baseline; gap: 6px; }
.hud-step-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.hud-step b { font-size: 30px; font-weight: 900; color: var(--yellow); }
.hud-of { color: var(--muted); font-size: 14px; }
.hud-title { font-weight: 800; font-size: 16px; }
.hud-progress { height: 4px; background: rgba(255,255,255,.1); border-radius: 4px; margin: 12px 0; overflow: hidden; }
.hud-progress i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .4s ease; }
.hud-controls { display: flex; gap: 8px; }
.ctl { flex: 1; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 10px; padding: 10px 0; font-weight: 800; transition: background .2s; }
.ctl:hover { background: rgba(255,255,255,.12); }
.ctl-wide { flex: 2; }
.hud-toggles { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 14px; align-items: center; }
.hud-toggles .link { margin-left: auto; }

/* ------------------------------------------------------------- finish */
#finish { display: grid; place-items: end start; min-height: 100vh; }
.finish-copy { max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 30px; }
.finish-copy h2 { font-size: clamp(40px, 6vw, 72px); font-weight: 900; margin-bottom: 12px; }
.finish-copy p { color: var(--muted); font-size: 17px; }
.care { margin-top: 20px; font-size: 13px; color: var(--muted); border-left: 3px solid var(--red); padding-left: 12px; }

footer { position: relative; z-index: 1; padding: 30px 6vw 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: rgba(11,16,32,.9); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  #nav { padding: 0 16px; }
  .brand-text { display: none; }
  #nav nav a { padding: 8px 10px; font-size: 13px; }
  #hero { grid-template-columns: 1fr; align-content: end; padding-bottom: 90px; }
  .hero-copy { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
  #build { grid-template-columns: 1fr; gap: 0; }
  .hud { position: sticky; top: calc(var(--nav-h) + 8px); width: 100%; margin: 0 0 12px; order: -1; }
  .build-steps { padding-top: 46vh; }
  .step { scroll-margin-top: 60vh; }
  .finish-copy { margin-bottom: 0; }
}
