/* Hero 3D fijado al scroll: the violet stage stays pinned while a WebGL particle field tells three beats —
   constellation (mouse-reactive) with the symbol as a live outline in the corner → the onbrainy symbol assembled from the nodes → a flowing 3D mesh the camera dips over —
   and finally closes into a card. --close (0 → 1) is written by hero-pin.js. */

.hpin .hero { display: block; min-height: 0; height: 360vh; --close: 0; }
.hpin .hero::after { display: none; }
.hpin .panel { position: sticky; top: 0; height: 100svh; padding-bottom: 0; overflow: hidden;
  clip-path: inset(0 calc(var(--close) * 4vw) calc(var(--close) * 6vh) round calc(var(--close) * 40px)); }
.hpin #gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
/* soft chispa glow behind the small symbol in the bottom-left corner of stage 01, placed and faded by hero-pin.js */
.hpin .mglow { position: absolute; z-index: 0; left: 0; bottom: 0; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(204,255,96,.2), rgba(204,255,96,.07) 55%, rgba(204,255,96,0)); will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) { .hpin .mglow { display: none; } }
.hpin .panel .veil { background: radial-gradient(46% 40% at 50% 48%, rgba(85,42,204,.55) 10%, rgba(106,53,255,0) 75%); }
.hpin .hero .wrap { padding-block: 84px 40px; will-change: opacity, transform; }

/* beats 2 and 3: copy over the scene, faded in by hero-pin.js */
.hpin .beat { position: absolute; z-index: 2; inset: 0; display: flex; pointer-events: none; opacity: 0; will-change: opacity, transform; }
.hpin .beat .wrap { display: flex; flex: 1; padding-block: 96px 64px; }
.hpin .beat-2 .wrap { align-items: center; }
.hpin .beat-3 .wrap { align-items: flex-start; justify-content: center; text-align: center; padding-top: clamp(110px, 18vh, 170px); }
.hpin .beat-in { display: grid; gap: 18px; max-width: 34rem; }
.hpin .beat-3 .beat-in { max-width: 62rem; justify-items: center; }
.hpin .beat-3 h2 { max-width: 46rem; }
.hpin .beat-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 36px); margin-top: 10px; text-align: left; }
.hpin .beat-stats > div { display: grid; align-content: start; gap: 6px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.35); }
.hpin .beat-stats b { font: 600 clamp(1rem, .9rem + .4vw, 1.25rem)/1.2 var(--f-display); letter-spacing: -.02em; color: #fff; }
.hpin .beat-stats span { font-size: .95rem; line-height: 1.45; color: rgba(255,255,255,.82); }
/* the value band below repeats beat 3, so it only shows when the beats do not (reduced motion) */
.proof { display: none; }
@media (max-width: 760px) { .hpin .beat-stats { grid-template-columns: 1fr; gap: 12px; width: 100%; } .hpin .beat-stats > div { padding-top: 10px; gap: 2px; } .hpin .beat-stats span { font-size: .9rem; } }
.hpin .beat .eyebrow { color: rgba(255,255,255,.75); }
.hpin .beat .eyebrow::before { background: var(--chispa); }
.hpin .beat h2 { color: #fff; font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4.6rem); line-height: 1.02; }
.hpin .beat h2 em { font-style: normal; color: var(--chispa); }
.hpin .beat p { color: rgba(255,255,255,.85); font-size: var(--step-1); font-weight: 400; line-height: 1.4; max-width: 34ch; }

/* progress rail, right edge: 01 · 02 · 03 */
.hpin .rail { position: absolute; z-index: 3; right: max(var(--pad-x), calc((100% - 1320px) / 2)); top: 50%; translate: 0 -50%;
  display: grid; gap: 14px; font: 600 .7rem var(--f-label); letter-spacing: .14em; color: rgba(255,255,255,.45); }
.hpin .rail b { font-weight: 400; display: flex; align-items: center; gap: 10px; transition: color .3s; }
.hpin .rail b::before { content: ""; width: 14px; height: 1px; background: currentColor; transition: width .4s var(--ease); }
.hpin .rail b.on { color: #fff; }
.hpin .rail b.on::before { width: 32px; }
/* below ~1100px the symbol reaches the right edge, so the rail would sit on top of it */
@media (max-width: 1100px) { .hpin .rail { display: none; } }
/* where the page's scroll ruler shows (styles.css), it takes over from this rail */
@media (hover: hover) and (min-width: 1180px) { .hpin .rail { display: none; } }

/* scroll cue */
.hpin .scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 28px; translate: -50% 0; display: grid; justify-items: center; gap: 6px;
  font: 600 .68rem var(--f-label); letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.7); transition: opacity .3s; }
.hpin .scroll-cue::after { content: "↓"; letter-spacing: 0; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0%, 100% { translate: 0 0; opacity: .5; } 50% { translate: 0 5px; opacity: 1; } }

/* while the symbol is on stage it can be turned by dragging (hero-pin.js) */
.hpin .panel.can-drag { cursor: grab; }
.hpin .panel.grabbing, .hpin .panel.grabbing * { cursor: grabbing; user-select: none; }

/* interaction hint, bottom-left; shown while the symbol is on stage (hero-pin.js) */
.hpin .hint { position: absolute; z-index: 3; left: max(var(--pad-x), calc((100% - 1320px) / 2)); bottom: 28px; opacity: 0;
  display: inline-flex; align-items: center; gap: 10px; font: 600 .68rem var(--f-label); letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.hpin .hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; animation: hint-ping 2s var(--ease) infinite; }
@keyframes hint-ping { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } }
/* only the touch hint is left: with a mouse there is no label, so the whole hint is hidden */
.hpin .hint { display: none; }
@media (hover: none) { .hpin .hint { display: inline-flex; } }

@media (max-width: 760px) {
  .hpin .rail { display: none; }
  .hpin .scroll-cue { display: none; }   /* the hero copy now runs to the bottom on a phone */
  .hpin .beat-2 .wrap { align-items: flex-start; padding-top: 110px; }
}
@media (max-height: 640px) { .hpin .scroll-cue { display: none; } }

/* reduced motion: no pin, the first beat only */
@media (prefers-reduced-motion: reduce) {
  .hpin .hero { height: auto; }
  .hpin .panel { position: relative; height: 100svh; clip-path: none; }
  .hpin .beat, .hpin .rail, .hpin .scroll-cue { display: none; }
  .proof { display: block; }
}

