/* Leads Rubix — anchors for the Lead Engine (static/js/engine.js) and the layouts that hold them. */
#engine { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 3; pointer-events: none; display: block; }
.orb-anchor { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1 / 1; margin-inline: auto; touch-action: pan-y; cursor: grab; }
.orb-anchor:active { cursor: grabbing; }
.sec-split .orb-anchor, .split .orb-anchor { max-width: 440px; aspect-ratio: 1.05 / 1; }

/* no WebGL (or 3D skipped): a quiet drawn emblem of the engine so the layout never looks empty */
.orb-fallback { display: none; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #5b50b8, #252140 62%); box-shadow: 0 30px 70px -20px rgba(37,33,64,.55); }
.orb-fallback i { position: absolute; inset: -22%; border-radius: 50%; border: 3px solid #8d81d0; transform: rotateX(70deg); }
.orb-fallback i:nth-child(2) { border-color: #10b981; transform: rotateX(70deg) rotateY(55deg); }
.orb-fallback i:nth-child(3) { border-color: #5b50b8; transform: rotateX(70deg) rotateY(-55deg); }
.no-webgl .orb-fallback { display: block; }
.no-webgl .orb-anchor { cursor: default; }

/* layouts */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.page-hero .wrap > .hero-grid { max-width: none; }
.hero-grid > div > * { max-width: 620px; }
.sec-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: center; margin-bottom: 46px; }
.sec-split .sec-head { margin-bottom: 0; }
.sec-split.flip > .orb-anchor { order: -1; }
.split > div:first-child:has(.orb-anchor) .sec-head { position: static; }
.split .orb-anchor { margin-top: 30px; margin-inline: 0; }
.hero .hero-vis { position: absolute; right: max(24px, calc((100vw - 1240px) / 2)); top: 50%; width: min(600px, 46vw); transform: translateY(-48%); z-index: 3; }
.chapter .ch-grid { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: clamp(30px, 6vw, 110px); align-items: center; }
.chapter .ch-grid .story-card { margin: 0; }

@media (max-width: 1000px) {
  .hero-grid, .sec-split, .chapter .ch-grid { grid-template-columns: 1fr; }
  .sec-split.flip > .orb-anchor { order: 0; }
  .orb-anchor, .sec-split .orb-anchor, .split .orb-anchor { max-width: 360px; }
  .hero { flex-direction: column; align-items: stretch; padding: calc(var(--head-h) + 34px) 0 60px; min-height: 0; }
  .hero .hero-inner { padding-top: 0; }
  .hero .hero-vis { position: relative; right: auto; top: auto; width: calc(100% - 48px); max-width: 420px; transform: none; margin: 10px auto 0; }
  .hero .scroll-cue { display: none; }
  .page-hero, .page-hero.has-vis { align-items: flex-start; padding-top: calc(var(--head-h) + 34px); padding-bottom: 40px; min-height: 0; }
  .chapter { min-height: 0; padding: 60px 0; align-items: center; }
}

/* chapters fill one screen each so the engine always has an anchor in view */
@media (min-width: 1001px) { .chapter { min-height: 100vh; padding: 10vh 0; } }
