/* Global motion system (subtle, premium) */

/* 1) Ambient background "life" */
@keyframes ambientDrift {
  0% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(-18px, 12px, 0); }
  100% { transform: translate3d(0,0,0); }
}
@keyframes ambientDots {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-80px, 56px, 0); }
}
.site-ambient{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.08;
}
.dark .site-ambient{ opacity: 0.12; }

.site-ambient .dots{
  position:absolute; inset:0;
  background-image: radial-gradient(circle at 1px 1px, rgba(23,176,207,0.45) 1px, rgba(23,176,207,0.0) 2px);
  background-size: 28px 28px;
  animation: ambientDots 26s linear infinite;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 18%, rgba(0,0,0,0.0) 74%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 18%, rgba(0,0,0,0.0) 74%);
}
.site-ambient .blob1{
  position:absolute;
  width: 620px; height: 620px;
  right: -220px; top: -240px;
  border-radius: 9999px;
  background: rgba(23,176,207,0.22);
  filter: blur(70px);
  animation: ambientDrift 14s ease-in-out infinite;
}
.site-ambient .blob2{
  position:absolute;
  width: 720px; height: 720px;
  left: -260px; bottom: -300px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.10);
  filter: blur(80px);
  animation: ambientDrift 18s ease-in-out infinite reverse;
}

/* Keep content above ambient layer */
body > * { position: relative; z-index: 1; }

/* 2) Scroll reveal */
.reveal-ready{ opacity: 0; transform: translateY(10px); }
.reveal-in{ opacity: 1 !important; transform: translateY(0) !important; }
.reveal-ready{
  transition: opacity 700ms ease, transform 700ms ease;
  will-change: opacity, transform;
}

/* 3) Premium hover */
.hover-lift{
  transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}
.hover-lift:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.16);
  border-color: rgba(23,176,207,0.28);
}
.dark .hover-lift:hover{
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  border-color: rgba(23,176,207,0.24);
}

/* 4) Link underline animation */
.nav-underline{
  position: relative;
}
.nav-underline::after{
  content:"";
  position:absolute;
  left:0; right:0;
  bottom:-6px;
  height:2px;
  background: rgba(23,176,207,0.65);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform 220ms ease;
}
.nav-underline:hover::after{ transform: scaleX(1); }

/* 5) Button shimmer (very subtle) */
@keyframes btnShimmer {
  0% { transform: translateX(-140%); }
  100% { transform: translateX(160%); }
}
.btn-shimmer{ position: relative; overflow: hidden; }
.btn-shimmer::after{
  content:"";
  position:absolute;
  inset:-50% -70%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-140%);
  animation: btnShimmer 4.2s ease-in-out infinite;
}


/* 6) Hero image motion (Ken Burns, calm) */
@keyframes heroKenBurns {
  0%   { transform: scale(1.08) translate3d(0,0,0); }
  50%  { transform: scale(1.12) translate3d(-14px, 10px, 0); }
  100% { transform: scale(1.10) translate3d(10px, -12px, 0); }
}
.hero-media{
  background-image: var(--hero-url);
  background-size: cover;
  background-position: center;
  will-change: transform;
  opacity: var(--hero-opacity, 0.45);
}
.hero-kenburns{ animation: heroKenBurns 26s ease-in-out infinite; }
.hero-vignette{
  background: radial-gradient(1200px 600px at 50% 20%, rgba(17,31,34,0.08), rgba(17,31,34,0.62));
}
.hero-grain{
  opacity: 0.10;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.14) 1px, rgba(255,255,255,0.0) 2px);
  background-size: 34px 34px;
  mix-blend-mode: overlay;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .site-ambient .dots,
  .site-ambient .blob1,
  .site-ambient .blob2,
  .btn-shimmer::after,
  .hero-kenburns{
    animation: none !important;
  }
}


/* Header scroll state (subtle, premium) */
.site-header{
  transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  will-change: background-color, box-shadow;
}
.site-header.is-scrolled{
  background-color: rgba(17,31,34,0.96) !important;
  border-bottom-color: rgba(36,65,71,0.85) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* Leadership cards: keep LinkedIn buttons aligned regardless of bio length */
.leader-bio{ min-height: 6.5rem; }

/* ── Stats section animations ─────────────────────────────────────── */
@keyframes statsSheen {
  0%   { background-position: 0%   50%; }
  100% { background-position: 100% 50%; }
}
.stats-sheen {
  background: linear-gradient(90deg, rgba(23,176,207,0.0), rgba(23,176,207,0.22), rgba(23,176,207,0.0));
  background-size: 200% 100%;
  animation: statsSheen 6s linear infinite;
}
@keyframes statsFloat {
  0%   { transform: translate3d(0,0,0); }
  50%  { transform: translate3d(-18px, 10px, 0); }
  100% { transform: translate3d(0,0,0); }
}
@keyframes statsFloat2 {
  0%   { transform: translate3d(0,0,0); }
  50%  { transform: translate3d(14px, -12px, 0); }
  100% { transform: translate3d(0,0,0); }
}
.stats-float  { animation: statsFloat  10s ease-in-out infinite; }
.stats-float2 { animation: statsFloat2 12s ease-in-out infinite; }
@keyframes statPop {
  0%   { transform: scale(1); }
  55%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.stat-pop { animation: statPop 520ms ease-out 1; }
@keyframes statsDotsMove {
  0%   { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-60px, 40px, 0); }
}
.stats-dots {
  background-image: radial-gradient(circle at 1px 1px, rgba(23,176,207,0.55) 1px, rgba(23,176,207,0.0) 2px);
  background-size: 26px 26px;
  animation: statsDotsMove 18s linear infinite;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 20%, rgba(0,0,0,0.0) 72%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 20%, rgba(0,0,0,0.0) 72%);
}

/* ── Leadership animations ────────────────────────────────────────── */
@keyframes leadershipGridMove {
  0%   { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-40px, 30px, 0); }
}
.leadership-grid {
  background-image: radial-gradient(circle at 1px 1px, rgba(23,176,207,0.45) 1px, rgba(23,176,207,0.0) 2px);
  background-size: 28px 28px;
  animation: leadershipGridMove 22s linear infinite;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 20%, rgba(0,0,0,0.0) 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 20%, rgba(0,0,0,0.0) 75%);
}
@keyframes leadershipFloat {
  0%   { transform: translate3d(0,0,0); }
  50%  { transform: translate3d(-16px, 12px, 0); }
  100% { transform: translate3d(0,0,0); }
}
.leadership-float { animation: leadershipFloat 12s ease-in-out infinite; }
.leadership-sheen {
  background: linear-gradient(110deg, rgba(23,176,207,0.0), rgba(23,176,207,0.22), rgba(23,176,207,0.0));
  background-size: 200% 100%;
  animation: statsSheen 6s linear infinite;
}
.leader-card.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 700ms ease, transform 700ms ease;
}

/* ── Capabilities / Expertise animations ──────────────────────────── */
@keyframes capDotsMove {
  0%   { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-60px, 40px, 0); }
}
.cap-dots {
  background-image: radial-gradient(circle at 1px 1px, rgba(23,176,207,0.50) 1px, rgba(23,176,207,0.0) 2px);
  background-size: 26px 26px;
  animation: capDotsMove 20s linear infinite;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 20%, rgba(0,0,0,0.0) 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 20%, rgba(0,0,0,0.0) 75%);
}
@keyframes capFloat  { 0%{transform:translate3d(0,0,0)} 50%{transform:translate3d(-18px,12px,0)}  100%{transform:translate3d(0,0,0)} }
@keyframes capFloat2 { 0%{transform:translate3d(0,0,0)} 50%{transform:translate3d(16px,-14px,0)} 100%{transform:translate3d(0,0,0)} }
.cap-float  { animation: capFloat  12s ease-in-out infinite; }
.cap-float2 { animation: capFloat2 14s ease-in-out infinite; }
.cap-card { transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease, opacity 700ms ease; }
.cap-card:hover      { box-shadow: 0 18px 60px rgba(0,0,0,0.18); border-color: rgba(23,176,207,0.30); }
.dark .cap-card:hover{ box-shadow: 0 18px 60px rgba(0,0,0,0.55); border-color: rgba(23,176,207,0.28); }
.approach-card { transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease, opacity 700ms ease; }
.approach-card:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(0,0,0,0.14); border-color: rgba(23,176,207,0.25); }
.reveal-in { opacity: 1 !important; transform: translateY(0) !important; }
@keyframes shimmer { 0%{transform:translateX(-120%)} 100%{transform:translateX(160%)} }
.cta-shimmer::after {
  content:""; position:absolute; inset:-40% -60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: translateX(-120%);
  animation: shimmer 3.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .stats-sheen, .stats-float, .stats-float2, .stat-pop,
  .stats-dots, .leadership-grid, .leadership-float,
  .leadership-sheen, .cap-dots, .cap-float, .cap-float2,
  .cta-shimmer::after { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   V3 DESIGN UPGRADES
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Custom cursor ─────────────────────────────────────────────── */
body { cursor: none; }

/* Cursor: two separate fixed elements — dot follows instantly, ring follows with lag.
   Both use will-change:transform + GPU translate3d — zero reflow, no jank. */
#cur-dot {
  position: fixed;
  top: 0; left: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #17b0cf;
  pointer-events: none;
  z-index: 99999;
  will-change: transform;
  transform: translate3d(-50%, -50%, 0);
  transition: width 200ms ease, height 200ms ease, background 200ms ease, opacity 200ms ease;
}
#cur-ring {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(23,176,207,0.6);
  pointer-events: none;
  z-index: 99998;
  will-change: transform;
  transform: translate3d(-50%, -50%, 0);
  transition: width 200ms ease, height 200ms ease, border-color 200ms ease, opacity 200ms ease;
}

/* Hover state */
body.cur-hover #cur-dot {
  width: 10px; height: 10px;
  background: #17b0cf;
}
body.cur-hover #cur-ring {
  width: 48px; height: 48px;
  border-color: rgba(23,176,207,0.9);
}

/* Click state */
body.cur-click #cur-dot {
  width: 4px; height: 4px;
  opacity: 0.7;
}

a, button, [role="button"], input, textarea, select, label {
  cursor: none;
}
@media (hover: none) {
  body, a, button { cursor: auto !important; }
  #cur-dot, #cur-ring { display: none !important; }
}

/* ── 2. Scroll progress bar ───────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #17b0cf, rgba(23,176,207,0.5));
  z-index: 99998;
  transition: width 60ms linear;
  pointer-events: none;
}

/* ── 3. Editorial "Why Hublat" section ───────────────────────────── */
.editorial-section {
  background: #0a1517;
  position: relative;
  overflow: hidden;
}
.editorial-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(23,176,207,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.editorial-quote {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  font-weight: 700;
}
.editorial-quote em {
  color: #17b0cf;
  font-style: italic;
}
.editorial-rule {
  width: 60px;
  height: 2px;
  background: #17b0cf;
  display: block;
  margin-bottom: 2rem;
}

/* ── 4. Asymmetric capabilities grid ─────────────────────────────── */
.cap-grid-asymm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}
.cap-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: linear-gradient(135deg, #17b0cf08, #17b0cf14);
  border-color: rgba(23,176,207,0.25) !important;
}
.cap-card-featured .cap-card-left {
  padding: 2rem;
  border-right: 1px solid rgba(23,176,207,0.15);
}
.cap-card-featured .cap-card-right {
  padding: 2rem;
  background: rgba(23,176,207,0.04);
}
.cap-card-accent {
  background: #17b0cf !important;
  border-color: #17b0cf !important;
  color: #0a1517;
}
.cap-card-accent h3,
.cap-card-accent .cap-title { color: #0a1517 !important; }
.cap-card-accent p,
.cap-card-accent li,
.cap-card-accent .cap-sub { color: rgba(10,21,23,0.75) !important; }
.cap-card-accent .cap-bullet { color: rgba(10,21,23,0.5) !important; }
.cap-card-accent .cap-icon-wrap {
  background: rgba(10,21,23,0.12) !important;
  border-color: rgba(10,21,23,0.15) !important;
}
.cap-card-accent .cap-icon-wrap svg { color: #0a1517 !important; }
.cap-card-accent .cap-client-tag { color: rgba(10,21,23,0.6) !important; }
@media (max-width: 768px) {
  .cap-grid-asymm { grid-template-columns: 1fr; }
  .cap-card-featured { grid-column: 1; grid-template-columns: 1fr; }
  .cap-card-featured .cap-card-left { border-right: none; border-bottom: 1px solid rgba(23,176,207,0.15); }
}

/* ── 5. CTA arrow microinteraction ───────────────────────────────── */
.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}
.btn-arrow .arrow-icon {
  display: inline-block;
  transition: transform 250ms cubic-bezier(0.34,1.56,0.64,1);
}
.btn-arrow:hover .arrow-icon {
  transform: translateX(5px);
}
.btn-fill {
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.btn-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  transform: translateX(-101%);
  transition: transform 320ms cubic-bezier(0.4,0,0.2,1);
  z-index: -1;
}
.btn-fill:hover::before { transform: translateX(0); }

/* ── 6. Enhanced footer ───────────────────────────────────────────── */
.footer-v3 {
  background: #060e10;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.footer-v3::before {
  content: "";
  position: absolute;
  bottom: -120px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 300px;
  border-radius: 50%;
  background: rgba(23,176,207,0.04);
  filter: blur(60px);
  pointer-events: none;
}
.footer-closing-line {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.footer-closing-line em { color: #17b0cf; font-style: italic; }

/* ── 7. Case study cards — editorial layout ───────────────────────── */
.cs-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0d1618;
  transition: border-color 300ms ease, transform 300ms ease, box-shadow 300ms ease;
}
.cs-card:hover {
  border-color: rgba(23,176,207,0.35);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.cs-card-featured {
  grid-column: 1 / -1;
}
.cs-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #17b0cf;
  background: rgba(23,176,207,0.1);
  border: 1px solid rgba(23,176,207,0.2);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}
.cs-number {
  font-family: "Playfair Display", serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: rgba(23,176,207,0.15);
  line-height: 1;
  letter-spacing: -0.03em;
  position: absolute;
  bottom: 1.25rem; right: 1.5rem;
  pointer-events: none;
  user-select: none;
}

/* ── 8. Stats — scrollytelling feel ──────────────────────────────── */
.stat-narrative {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #94aeb5;
  margin-top: 0.5rem;
  max-width: 160px;
}
.stat-item { border-left: 2px solid #244147; transition: border-color 500ms ease; }
.stat-item.is-visible { border-left-color: #17b0cf; }

/* ── 9. Hero LatAm network overlay ───────────────────────────────── */
.hero-network-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.18;
}

/* ── 10. Dramatic typography scale ───────────────────────────────── */
.display-xl {
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #17b0cf;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.section-eyebrow::before {
  content: "";
  display: block;
  width: 28px;
  height: 1.5px;
  background: #17b0cf;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  #cur-dot, #cur-ring, #scroll-progress { display: none !important; }
  body { cursor: auto !important; }
  a, button { cursor: auto !important; }
  .btn-arrow .arrow-icon, .btn-fill::before { transition: none !important; }
}
