/* ==========================================================================
   Blacksite Training — scroll-assembly homepage (anime.js v4)
   Layered on the shared luminous design system (styles.css).
   ========================================================================== */

/* ---------- hero ---------- */
.bt-hero {
  position: relative;
  min-height: 92vh;
  display: grid; place-items: center;
  text-align: center;
  overflow: clip;
  padding: 120px 20px 80px;
}
/* blueprint grid backdrop */
.bt-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(214, 231, 192, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 231, 192, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(75% 65% at 50% 45%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(75% 65% at 50% 45%, #000 30%, transparent 75%);
}
.bt-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(52% 42% at 50% 32%, rgba(214, 228, 198, 0.16), transparent 64%),
    radial-gradient(40% 36% at 78% 72%, rgba(150, 170, 136, 0.1), transparent 66%);
}
.bt-hero-inner { max-width: 880px; position: relative; }
.bt-hero h1 {
  font-size: clamp(3rem, 8.4vw, 6.6rem);
  line-height: 1.02;
  margin-bottom: 0.3em;
}
.bt-hero h1 em { font-style: normal; color: var(--ink-dim); }
.bt-hero h1 .word { display: inline-block; white-space: nowrap; }
.bt-hero h1 .ch { display: inline-block; will-change: transform; }
.bt-hero .lede { max-width: 560px; }
/* floating exploded shards */
.bt-shard {
  position: absolute; z-index: -1;
  border: 1px solid rgba(226, 238, 216, 0.14);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.bt-shard i { display: block; height: 5px; border-radius: 3px; background: rgba(214, 228, 198, 0.3); margin: 9px 10px 0; }
.bt-shard i:nth-child(2) { width: 60%; opacity: 0.6; }
.bt-shard.s1 { width: 130px; height: 48px; left: 8%; top: 24%; }
.bt-shard.s2 { width: 90px; height: 64px; right: 11%; top: 20%; }
.bt-shard.s3 { width: 110px; height: 42px; left: 14%; bottom: 22%; }
.bt-shard.s4 { width: 74px; height: 74px; right: 9%; bottom: 26%; border-radius: 50%; }
.bt-shard.s4 i { margin: 32px 16px 0; }
.bt-scrollcue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint);
}
.bt-scrollcue .ring {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(238, 244, 230, 0.3);
  display: grid; place-items: center;
}
.bt-scrollcue svg { width: 12px; height: 12px; stroke: var(--sage); stroke-width: 2; fill: none; }

/* ---------- assembly scene ---------- */
.asm { position: relative; height: 640vh; }
.motion-off .asm, .no-js .asm { height: auto; }
.asm-pin {
  position: sticky; top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(250px, 330px) 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  width: min(1340px, calc(100% - 48px));
  margin-inline: auto;
  overflow: visible;
}
.motion-off .asm-pin, .no-js .asm-pin { position: relative; height: auto; padding: 80px 0; align-items: start; }

/* captions (left column) */
.asm-caps { position: relative; min-height: 300px; }
.asm-cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; }
.motion-off .asm-cap, .no-js .asm-cap { position: static; opacity: 1; margin-bottom: 36px; }
.asm-cap .eyebrow { margin-bottom: 14px; }
.asm-cap h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin-bottom: 0.4em; }
.asm-cap p { color: var(--muted); font-size: 0.97rem; max-width: 300px; }
.asm-cap .idx { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.2em; color: var(--faint); margin-top: 18px; }

/* progress rail */
.asm-rail {
  position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 22px;
  z-index: 5;
}
.motion-off .asm-rail, .no-js .asm-rail { display: none; }
.asm-rail i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(226, 238, 216, 0.18);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.asm-rail i.on {
  background: var(--sage-bright);
  box-shadow: 0 0 10px rgba(214, 228, 198, 0.8);
  transform: scale(1.35);
}

/* ---------- the console ---------- */
.asm-stage { position: relative; perspective: 1400px; }
.asm-console {
  position: relative;
  width: min(760px, 100%);
  margin-inline: auto;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.55);
  font-family: var(--mono);
  isolation: isolate;
}
.asm-glow {
  position: absolute; inset: -14%; z-index: -1; pointer-events: none;
  background: radial-gradient(52% 52% at 50% 50%, rgba(184, 203, 170, 0.17), transparent 70%);
  opacity: 0;
}
.asm-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.asm-frame rect { fill: none; stroke: rgba(226, 238, 216, 0.35); stroke-width: 1.5; }
.part { will-change: transform, opacity; }

.asm-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(235, 243, 227, 0.09);
}
.asm-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(235, 243, 227, 0.18); }
.asm-bar i:nth-child(1) { background: rgba(201, 143, 130, 0.75); }
.asm-bar i:nth-child(2) { background: rgba(217, 200, 154, 0.75); }
.asm-bar i:nth-child(3) { background: rgba(184, 203, 170, 0.75); }
.asm-bar span { margin-left: 10px; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.asm-bar em {
  margin-left: auto; font-style: normal;
  font-size: 0.56rem; letter-spacing: 0.16em; color: var(--sage);
  display: inline-flex; align-items: center; gap: 6px;
}
.asm-bar em::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 8px rgba(184, 203, 170, 0.9); }

.asm-body { display: grid; grid-template-columns: 136px 1fr; min-height: 420px; }
.asm-side { border-right: 1px solid rgba(235, 243, 227, 0.08); padding: 14px 0; }
.asm-side span {
  display: block; padding: 9px 16px;
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint);
  border-left: 2px solid transparent;
}
.asm-side span.on { color: var(--ink); border-left-color: var(--sage); background: rgba(184, 203, 170, 0.07); }

.asm-main {
  padding: 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  align-content: start;
}
.asm-main h4 {
  margin: 0 0 10px; font-family: var(--mono); font-weight: 500;
  font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint);
}
.asm-main > section {
  border: 1px solid rgba(235, 243, 227, 0.09);
  border-radius: 12px;
  padding: 13px 14px;
  min-height: 150px;
}

/* courses */
.asm-course { display: grid; gap: 5px; margin-bottom: 10px; }
.asm-course small { font-size: 0.62rem; color: var(--muted); display: flex; justify-content: space-between; }
.asm-course small b { color: var(--sage); font-weight: 500; }
.asm-track { height: 5px; border-radius: 3px; background: rgba(235, 243, 227, 0.1); overflow: hidden; }
.asm-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, rgba(184, 203, 170, 0.9), rgba(214, 228, 198, 0.7)); transform-origin: left center; }

/* labs */
.asm-labgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.asm-vm {
  border: 1px solid rgba(235, 243, 227, 0.1); border-radius: 8px;
  padding: 8px 6px 7px;
  display: grid; justify-items: center; gap: 5px;
  font-size: 0.54rem; letter-spacing: 0.08em; color: var(--faint);
}
.asm-vm i { width: 6px; height: 6px; border-radius: 50%; background: rgba(235, 243, 227, 0.2); }
.asm-vm.up i { background: var(--sage); box-shadow: 0 0 7px rgba(184, 203, 170, 0.9); }

/* grading */
.asm-chartrow { position: relative; }
.asm-bars { display: flex; align-items: flex-end; gap: 5px; height: 78px; }
.asm-bars i {
  flex: 1; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, rgba(214, 228, 198, 0.85), rgba(184, 203, 170, 0.25));
  transform-origin: bottom center;
}
.asm-bars i:nth-child(3n) { background: linear-gradient(180deg, rgba(217, 200, 154, 0.8), rgba(217, 200, 154, 0.2)); }
.asm-score { font-size: 0.62rem; color: var(--muted); margin-top: 9px; }
.asm-score b { color: var(--ink); font-size: 0.86rem; font-weight: 600; }
.asm-seal {
  position: absolute; top: -10px; right: -8px; z-index: 3;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--sand);
  color: var(--sand);
  background: rgba(14, 17, 12, 0.9);
  font-size: 0.5rem; letter-spacing: 0.1em; text-align: center; line-height: 1.25;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
}

/* ops */
.asm-log p {
  margin: 0 0 7px; font-size: 0.6rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.asm-log p::before { content: "✓ "; color: var(--sage); }
.asm-log p.warn::before { content: "→ "; color: var(--sand); }
.asm-health {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 6px; padding: 5px 11px;
  border: 1px solid rgba(184, 203, 170, 0.4); border-radius: 999px;
  font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage);
}
.asm-health::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 8px rgba(184, 203, 170, 0.9); }

.asm-done {
  position: absolute; left: 0; right: 0; bottom: -58px;
  text-align: center;
  font-family: var(--font);
  font-size: 1.05rem; font-weight: 550; letter-spacing: -0.01em;
  color: var(--ink);
  opacity: 0;
}
.motion-off .asm-done, .no-js .asm-done { opacity: 1; position: static; margin-top: 26px; }
.asm-done em { font-style: normal; color: var(--sage); }

/* ---------- after-scene sections reuse shared styles ---------- */
.bt-pillars .cards { margin-top: 40px; }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .asm-pin { grid-template-columns: 1fr; align-content: center; gap: 12px; }
  .asm-caps { min-height: 128px; order: 2; }
  .asm-cap { justify-content: flex-start; text-align: center; align-items: center; }
  .asm-cap p { max-width: 460px; }
  .asm-cap .idx { margin-top: 8px; }
  .asm-stage { order: 1; }
  .asm-console { width: min(640px, 100%); }
  .asm-rail { right: 2px; }
  .asm-done { bottom: -40px; }
}
@media (max-width: 680px) {
  .asm-body { grid-template-columns: 1fr; min-height: 0; }
  .asm-side { display: flex; overflow: hidden; border-right: 0; border-bottom: 1px solid rgba(235, 243, 227, 0.08); padding: 0; }
  .asm-side span { border-left: 0; border-bottom: 2px solid transparent; padding: 9px 11px; }
  .asm-side span.on { border-bottom-color: var(--sage); }
  .asm-main { grid-template-columns: 1fr 1fr; }
  .asm-main > section { min-height: 0; }
  .asm-cap h2 { font-size: 1.3rem; }
  .asm-cap p { font-size: 0.85rem; }
  .bt-shard { display: none; }
}

/* chart bar heights */
.asm-bars i:nth-child(1) { height: 36%; }
.asm-bars i:nth-child(2) { height: 54%; }
.asm-bars i:nth-child(3) { height: 44%; }
.asm-bars i:nth-child(4) { height: 68%; }
.asm-bars i:nth-child(5) { height: 50%; }
.asm-bars i:nth-child(6) { height: 78%; }
.asm-bars i:nth-child(7) { height: 60%; }
.asm-bars i:nth-child(8) { height: 92%; }
.asm-bars i:nth-child(9) { height: 72%; }
.asm-bars i:nth-child(10) { height: 84%; }
