/* ============================================================
   nosotros-anim.css — Nosotros page animation layer
   ============================================================ */

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes na-rise {
  from { opacity:0; transform:translateY(32px); }
  to   { opacity:1; transform:none; }
}
@keyframes na-from-left {
  from { opacity:0; transform:translateX(-44px) translateY(12px); }
  to   { opacity:1; transform:none; }
}
@keyframes na-from-right {
  from { opacity:0; transform:translateX(44px) translateY(12px); }
  to   { opacity:1; transform:none; }
}
@keyframes na-pop {
  from { opacity:0; transform:scale(.86) translateY(20px); }
  to   { opacity:1; transform:none; }
}
@keyframes na-clip-up {
  from { clip-path:inset(0 0 110% 0); opacity:0; }
  to   { clip-path:inset(0 0 0 0);    opacity:1; }
}
@keyframes na-dot-pop {
  from { opacity:0; transform:scale(0); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes na-line-in {
  from { opacity:0; transform:scaleX(0); transform-origin:left; }
  to   { opacity:1; transform:scaleX(1); transform-origin:left; }
}

/* ── Progressive enhancement gate ──────────────────────────── */

/* Hero */
.js-na .ab-hero h1 .nw   { display:inline-block; opacity:0; }
.js-na .ab-hero-sub       { opacity:0; }

/* Section markers & headings */
.js-na .ab .marker        { opacity:0; }
.js-na .ab h2             { opacity:0; }

/* Timeline cards — override existing nosotros.css transition system */
.js-na .tl2-card          { transition:none; }
/* Neutralise the inline IO's .in class so only .na-in drives visibility */
.js-na .tl2-card.in       { opacity:0; }
.js-na .tl2-l .tl2-card.in { transform:translateX(-22px); }
.js-na .tl2-r .tl2-card.in { transform:translateX(22px);  }

/* Timeline dots */
.js-na .tl2-dot           { opacity:0; transform:scale(0); }

/* Stats consolidation block */
.js-na .ab-consol > p     { opacity:0; }
.js-na .ab-stat           { opacity:0; }

/* Leadership — hide each column */
.js-na .leader > div      { opacity:0; }

/* Awards */
.js-na .award             { opacity:0; }

/* Partner CTA */
.js-na .ab-partner p,
.js-na .ab-partner .btn   { opacity:0; }

/* ── Hero animations ────────────────────────────────────────── */
.js-na .ab-hero h1.na-in .nw {
  animation: na-clip-up .65s cubic-bezier(.16,1,.3,1) both;
}
.js-na .ab-hero-sub.na-in {
  animation: na-rise .7s cubic-bezier(.16,1,.3,1) both;
}

/* ── Section markers & headings ─────────────────────────────── */
.js-na .ab .marker.na-in {
  animation: na-from-left .5s cubic-bezier(.16,1,.3,1) both;
}
.js-na .ab h2.na-in {
  animation: na-rise .65s cubic-bezier(.16,1,.3,1) both;
}

/* ── Timeline cards ─────────────────────────────────────────── */
.js-na .tl2-l .tl2-card.na-in {
  animation: na-from-left .72s cubic-bezier(.16,1,.3,1) both;
}
.js-na .tl2-r .tl2-card.na-in {
  animation: na-from-right .72s cubic-bezier(.16,1,.3,1) both;
}

/* Timeline dots — pop with slight delay after card */
.js-na .tl2-dot.na-in {
  animation: na-dot-pop .38s cubic-bezier(.16,1,.3,1) .18s both;
}

/* ── Stats block ────────────────────────────────────────────── */
.js-na .ab-consol > p.na-in {
  animation: na-from-left .65s cubic-bezier(.16,1,.3,1) both;
}
.js-na .ab-stat.na-in {
  animation: na-pop .52s cubic-bezier(.16,1,.3,1) both;
}

/* ── Leadership — photo from left, bio from right ───────────── */
.js-na .leader.na-in > div:first-child {
  animation: na-from-left  .65s cubic-bezier(.16,1,.3,1) both;
}
.js-na .leader.na-in > div:last-child {
  animation: na-from-right .65s cubic-bezier(.16,1,.3,1) .1s both;
}

/* ── Awards ─────────────────────────────────────────────────── */
.js-na .award.na-in {
  animation: na-pop .5s cubic-bezier(.16,1,.3,1) both;
}

/* ── Partner CTA ────────────────────────────────────────────── */
.js-na .ab-partner p.na-in {
  animation: na-rise .65s cubic-bezier(.16,1,.3,1) both;
}
.js-na .ab-partner .btn.na-in {
  animation: na-pop .5s cubic-bezier(.16,1,.3,1) .15s both;
}

/* ── Instant-show for scroll-up re-entries (no animation) ───── */
/* Applied when an element re-enters from above; overrides all   */
/* animation and the CSS gate so content is simply visible.      */
.js-na .na-snap,
.js-na .na-snap * {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ── prefers-reduced-motion ─────────────────────────────────── */
@media (prefers-reduced-motion:reduce) {
  .js-na .ab-hero h1 .nw,
  .js-na .ab-hero-sub,
  .js-na .ab .marker,
  .js-na .ab h2,
  .js-na .tl2-card,
  .js-na .tl2-dot,
  .js-na .ab-consol > p,
  .js-na .ab-stat,
  .js-na .leader > div,
  .js-na .award,
  .js-na .ab-partner p,
  .js-na .ab-partner .btn {
    opacity:1 !important;
    transform:none !important;
    animation:none !important;
  }
  /* Restore inline IO system for reduced-motion */
  .js-na .tl2-card { transition: opacity .65s ease, transform .65s ease !important; }
  .js-na .tl2-card.in { opacity:1 !important; transform:none !important; }
}

/* ── Form drawer ─────────────────────────────────────────────── */
.cy-form-btn {
  position: fixed; bottom: 32px; right: 32px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px;
  background: linear-gradient(90deg, var(--c3-blue-royal, #3F5EFB), var(--c3-cyan, #00e5cc));
  color: #fff; border: none; border-radius: 50px;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 700;
  letter-spacing: .01em; cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 28px rgba(63,94,251,.38);
  z-index: 200;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cy-form-btn:hover { transform: scale(1.04) translateY(-2px); box-shadow: 0 14px 40px rgba(63,94,251,.5); }
.cy-form-btn svg { width:15px; height:15px; flex-shrink:0; }
.cy-overlay {
  position: fixed; inset: 0; background: rgba(4,9,22,.72);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
  z-index: 400; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.cy-overlay.cy-open { opacity:1; pointer-events:all; }
.cy-drawer {
  position: fixed; top: 16px; right: 16px; bottom: 16px;
  width: 440px; max-width: calc(100vw - 32px);
  background: var(--bg-base, #060d1f);
  border: 1px solid rgba(204,231,255,.12); border-radius: 20px;
  display: flex; flex-direction: column;
  transform: translateX(calc(100% + 32px));
  transition: transform .34s cubic-bezier(.2,0,0,1);
  z-index: 401; overflow: hidden;
}
.cy-drawer.cy-open { transform: translateX(0); }
.cy-drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 28px 28px 22px;
  border-bottom: 1px solid rgba(204,231,255,.08); flex-shrink: 0;
}
.cy-drawer-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--c3-cyan, #00e5cc); opacity:.9; display: block; margin-bottom: 5px;
}
.cy-drawer-h { font-family: var(--font-sans); font-size: 22px; font-weight: 800; letter-spacing: -.035em; color: #fff; margin: 0; line-height: 1.1; }
.cy-drawer-sub { font-family: var(--font-body); font-size: 13.5px; color: rgba(204,231,255,.55); margin: 6px 0 0; line-height: 1.45; }
.cy-drawer-close {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07); border: none; border-radius: 10px;
  color: rgba(204,231,255,.65); cursor: pointer; font-size: 16px;
  transition: background .15s, color .15s;
}
.cy-drawer-close:hover { background: rgba(255,255,255,.14); color:#fff; }
.cy-drawer-body { flex: 1; overflow-y: auto; padding: 28px 28px 48px; scrollbar-width: thin; scrollbar-color: rgba(204,231,255,.12) transparent; }
.cy-drawer-body::-webkit-scrollbar { width:4px; }
.cy-drawer-body::-webkit-scrollbar-track { background: transparent; }
.cy-drawer-body::-webkit-scrollbar-thumb { background: rgba(204,231,255,.15); border-radius:4px; }
.cy-drawer-body .hs-form fieldset { max-width: none !important; }
.cy-drawer-body .hs-form .hs-input,
.cy-drawer-body .hs-form input,
.cy-drawer-body .hs-form textarea,
.cy-drawer-body .hs-form select { width: 100% !important; box-sizing: border-box !important; }
@media (max-width: 520px) {
  .cy-drawer { top: 12px; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; border-radius: 20px; transform: translateY(calc(100% + 24px)); }
  .cy-drawer.cy-open { transform: translateY(0); }
  .cy-form-btn { bottom: 20px; right: 16px; padding: 12px 18px; font-size: 13px; }
  .cy-drawer-head { padding: 22px 20px 18px; }
  .cy-drawer-body { padding: 20px 20px 40px; }
}
