﻿/* ==========================================================================
   STAGE — "COLLAPSE"  (Site 2 only)
   Igloo-style: the headline is built from individual 3D letters that drop in,
   hold, collapse and reassemble on a continuous 8s loop. Three video panels
   sit at different depths
   behind the type, veiled so navy text stays readable over them.
   ========================================================================== */
.stagecollapse{
  position:relative;min-height:100vh;overflow:hidden;isolation:isolate;
  perspective:1200px;perspective-origin:50% 44%;
  background:
    radial-gradient(900px 620px at 14% 10%, rgba(22,104,216,.10), transparent 62%),
    radial-gradient(860px 600px at 88% 86%, rgba(31,169,122,.12), transparent 62%),
    #FFFFFF;
}

/* ---------- three equal video panels filling the screen, folded in 3D ----------
   The group is deliberately wider than the stage (left/right -9%) so the fold
   never exposes a gap at the edges; .stagecollapse clips the overflow.        */
.c-vids{position:absolute;top:0;bottom:0;left:-9%;right:-9%;z-index:1;
  display:flex;transform-style:preserve-3d;pointer-events:none;
  transition:transform .4s cubic-bezier(.2,.8,.2,1);will-change:transform}
.c-vid{position:relative;flex:1 1 0;height:100%;overflow:hidden;background:#0E1D44;
  transform-style:preserve-3d}
.c-vid video{width:100%;height:100%;object-fit:cover;display:block}
/* white veil keeps the navy type readable over moving footage */
.c-vid::after{content:"";position:absolute;inset:0;background:rgba(255,255,255,.62)}

/* the fold: outer panels hinge on their inner edge and swing away from you */
.c-vid.v-l{transform-origin:100% 50%;
  transform:rotateY(11deg) translateZ(-40px);filter:blur(1.1px);
  animation:vFoldA 11s ease-in-out infinite alternate}
.c-vid.v-c{transform:translateZ(6px);filter:blur(.5px)}
.c-vid.v-c::after{background:rgba(255,255,255,.58)}
.c-vid.v-r{transform-origin:0% 50%;
  transform:rotateY(-11deg) translateZ(-40px);filter:blur(1.1px);
  animation:vFoldB 13s ease-in-out infinite alternate}
@keyframes vFoldA{to{transform:rotateY(7deg) translateZ(-14px)}}
@keyframes vFoldB{to{transform:rotateY(-7deg) translateZ(-14px)}}

/* hairline seams so the three panels read as deliberately divided */
.c-vid + .c-vid{box-shadow:-1px 0 0 rgba(255,255,255,.55),-16px 0 30px -16px rgba(21,42,94,.45)}

/* ---------- copy layer ---------- */
.c-scene{position:relative;z-index:3;min-height:100vh;display:grid;place-items:center;
  text-align:center;padding:9vh 24px 0}
.c-inner{max-width:900px}

.c-eyebrow{display:inline-flex;align-items:center;gap:9px;background:rgba(255,255,255,.94);
  border:1px solid rgba(21,42,94,.1);border-radius:99px;padding:9px 18px;font-size:12.5px;font-weight:800;
  color:var(--navy);margin-bottom:26px;backdrop-filter:blur(6px);
  box-shadow:0 2px 3px rgba(21,42,94,.06),0 12px 26px -8px rgba(21,42,94,.3);
  animation:cFade .8s ease .1s backwards}
.c-eyebrow .d{width:8px;height:8px;border-radius:50%;background:var(--green);
  box-shadow:0 0 0 0 rgba(31,169,122,.55);animation:csp 1.9s infinite}
@keyframes csp{70%{box-shadow:0 0 0 10px rgba(31,169,122,0)}100%{box-shadow:0 0 0 0 rgba(31,169,122,0)}}
@keyframes cFade{from{opacity:0;transform:translateY(14px)}}

/* ---------- the collapsing word ---------- */
.c-word{margin:0 0 6px;line-height:.92;
  font-size:clamp(46px,12.5vw,158px);font-weight:800;letter-spacing:-.045em;
  display:flex;justify-content:center;flex-wrap:wrap}
.c-l{display:inline-block;color:var(--navy);
  /* stacked shadows read as an extruded solid, not a flat glyph */
  text-shadow:
    1px 1px 0 #C8D4E6, 2px 2px 0 #C2CEE1, 3px 3px 0 #BCC9DD, 4px 4px 0 #B6C4D9,
    5px 5px 0 #B0BFD5, 6px 6px 0 #AABAD1, 7px 7px 0 #A4B5CD, 8px 8px 0 #9EB0C9,
    9px 9px 0 #98ABC5, 10px 10px 0 #93A6C1,
    0 22px 26px rgba(21,42,94,.22), 0 44px 60px rgba(21,42,94,.16);
  /* expands outward and pulls back, blooming as it goes — never a slide-in */
  animation:letterBreathe 2.9s cubic-bezier(.42,0,.3,1) infinite alternate;
  animation-delay:calc(var(--d, 0) * 130ms)}
.c-l.sp{width:.28em;text-shadow:none}

@keyframes letterBreathe{
  from{
    transform:translateX(0);
    color:var(--navy);
    filter:drop-shadow(0 0 0 rgba(63,206,155,0));
  }
  to{
    /* translateX only — a 3D transform or a scale forces the browser to
       rasterise the glyph once and stretch the texture, which is what made
       the type look soft. Sliding on one axis keeps it pixel-crisp.       */
    transform:translateX(calc(var(--dx, 0) * 64px));
    color:#1E56B4;
    filter:drop-shadow(0 0 20px rgba(63,206,155,.95))
           drop-shadow(0 0 52px rgba(22,104,216,.6))
           drop-shadow(0 0 96px rgba(63,206,155,.35));
  }
}

/* second line: solid, with a white halo so it stays legible over moving footage */
.c-word2{margin:0 0 26px;font-size:clamp(26px,5.4vw,64px);font-weight:800;letter-spacing:-.04em;
  line-height:1.02;color:var(--navy);
  text-shadow:0 1px 0 #fff, 0 0 16px rgba(255,255,255,.98),
              0 0 38px rgba(255,255,255,.9), 0 0 70px rgba(255,255,255,.7);
  animation:cFade .9s ease .62s backwards}

.c-sub{font-size:17.5px;color:#3B4A66;font-weight:500;margin:0 auto 32px;max-width:450px;
  text-shadow:0 0 14px rgba(255,255,255,.98), 0 0 32px rgba(255,255,255,.85);
  animation:cFade .9s ease .74s backwards}
.c-cta{display:inline-flex;align-items:center;gap:10px;
  background:linear-gradient(135deg,#3FCE9B,var(--green));color:#fff;font-weight:800;font-size:16px;
  padding:17px 34px;border-radius:99px;text-decoration:none;
  box-shadow:0 6px 0 #0C6B4E,0 18px 34px -8px rgba(31,169,122,.6),inset 0 1px 0 rgba(255,255,255,.4);
  transition:transform .13s,box-shadow .13s;animation:cFade .9s ease .86s backwards}
.c-cta:hover{transform:translateY(-2px);box-shadow:0 8px 0 #0C6B4E,0 24px 44px -8px rgba(31,169,122,.7)}
.c-cta:active{transform:translateY(5px);box-shadow:0 1px 0 #0C6B4E}


@media(max-width:820px){
  .stagecollapse{min-height:88vh;perspective:900px}
  .c-scene{min-height:88vh}
  .c-vid.v-l,.c-vid.v-r{filter:blur(.6px)}
  .c-vid.v-c{filter:none}
  .c-l{text-shadow:1px 1px 0 #C8D4E6,2px 2px 0 #C0CCE0,3px 3px 0 #B8C6DA,4px 4px 0 #B0BFD5,
       5px 5px 0 #A8B8CF,0 14px 18px rgba(21,42,94,.2)}
}
@media(prefers-reduced-motion:reduce){
  .c-l,.c-word2,.c-sub,.c-cta,.c-eyebrow,.c-vid{animation:none!important}
  .c-vids,.c-inner{transition:none!important}
}
