/* ════════════════════════════════════════════════════════════════════════════
 * SECTIONS
 * Section primitives — num, title, char-bounce, magnet, reveals
 * ════════════════════════════════════════════════════════════════════════════
 */

/* ──────────────────────────  SECTIONS  ────────────────────────── */
section{padding:140px 48px;position:relative;}
.sec-inner{max-width:1400px;margin:0 auto;}
.sec-num{font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--periwinkle);margin-bottom:8px;display:flex;align-items:center;gap:14px;font-weight:500;opacity:0;transform:translateX(-24px);}
.sec-num::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--periwinkle),transparent);max-width:0;transition:max-width 1.2s cubic-bezier(.16,1,.3,1) .15s;}
.sec-num.in{opacity:1;transform:none;transition:opacity .8s cubic-bezier(.16,1,.3,1),transform .8s cubic-bezier(.16,1,.3,1);}
.sec-num.in::after{max-width:120px;}

.sec-title{font-weight:900;font-size:clamp(56px,9vw,140px);line-height:.88;letter-spacing:-.04em;text-transform:uppercase;margin-bottom:64px;max-width:18ch;position:relative;will-change:transform,filter;}
.sec-title::after{content:"";position:absolute;left:0;bottom:-24px;width:160px;max-width:25%;height:3px;background:linear-gradient(90deg,var(--parme),var(--periwinkle),var(--indigo),var(--violet),var(--parme));background-size:300% 100%;transform:scaleX(0);transform-origin:left;transition:transform 1.1s cubic-bezier(.16,1,.3,1) .65s;animation:shimmer 6s ease-in-out infinite;}
.sec-title.in::after{transform:scaleX(1);}
/* Periodic flash bar — sweeps across the title every 15s */
.sec-title.in::before{
  content:"";position:absolute;top:-15%;left:0;width:18%;height:130%;
  background:linear-gradient(90deg,transparent 0%,rgba(184,175,232,.55) 35%,rgba(255,255,255,.7) 50%,rgba(184,175,232,.55) 65%,transparent 100%);
  filter:blur(6px);
  pointer-events:none;
  z-index:3;
  mix-blend-mode:screen;
  transform:translateX(-220%) skewX(-14deg);
  animation:title-sweep 15s ease-in-out infinite 5s;
}
/* Subtle text jitter timed with the sweep */
.sec-title.in{animation:title-jitter 15s ease-in-out infinite 5s;}

/* Generic scroll reveal for content blocks */
[data-reveal]{opacity:0;transform:translateY(48px) scale(.985);filter:blur(6px);transition:opacity 1s cubic-bezier(.16,1,.3,1),transform 1s cubic-bezier(.16,1,.3,1),filter .8s cubic-bezier(.16,1,.3,1),box-shadow 1.2s cubic-bezier(.16,1,.3,1);}
[data-reveal].in{opacity:1;transform:none;filter:none;}
[data-reveal="left"]{transform:translateX(-40px);}
[data-reveal="left"].in{transform:none;}
[data-reveal="right"]{transform:translateX(40px);}
[data-reveal="right"].in{transform:none;}
[data-reveal-stagger] > *{opacity:0;transform:translateY(20px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1);}
[data-reveal-stagger].in > *{opacity:1;transform:none;}
[data-reveal-stagger].in > *:nth-child(1){transition-delay:.04s;}
[data-reveal-stagger].in > *:nth-child(2){transition-delay:.12s;}
[data-reveal-stagger].in > *:nth-child(3){transition-delay:.20s;}
[data-reveal-stagger].in > *:nth-child(4){transition-delay:.28s;}
[data-reveal-stagger].in > *:nth-child(5){transition-delay:.36s;}
[data-reveal-stagger].in > *:nth-child(6){transition-delay:.44s;}
[data-reveal-stagger].in > *:nth-child(7){transition-delay:.52s;}
.sec-title em{
  font-family:'Inter',sans-serif;font-style:italic;font-weight:900;letter-spacing:-.04em;
  background:linear-gradient(90deg,var(--parme),var(--periwinkle),var(--indigo),var(--violet),var(--parme));
  background-size:300% 100%;
  background-clip:text;-webkit-background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 0 24px rgba(94,106,210,.45));
  animation:shimmer 6s ease-in-out infinite;
}
.sec-title .ghost{color:transparent;-webkit-text-stroke:1.5px rgba(237,237,239,.18);display:block;}

/* TYPEWRITER — char-by-char bounce reveal on section titles */
.sec-title .ch{display:inline-block;opacity:0;will-change:transform,opacity,filter;}
@keyframes char-bounce{
  0%{opacity:0;transform:translateY(36px) scale(.65);filter:blur(6px);}
  55%{opacity:1;transform:translateY(-5px) scale(1.06);filter:blur(0);}
  100%{opacity:1;transform:none;filter:blur(0);}
}
.sec-title.in .ch{animation:char-bounce .6s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--i,0) * 26ms + .1s);}

/* MAGNET — cards that gravitate toward the cursor */
.magnet{will-change:transform;transition:box-shadow .35s cubic-bezier(.16,1,.3,1),background .35s cubic-bezier(.16,1,.3,1);}
.magnet.pulled{box-shadow:0 24px 64px rgba(124,58,237,.28),0 0 56px rgba(94,106,210,.22);}
