/* ============================================================
   Duplica — motion prototype
   Hero staggered entrance (#1) · stat count-up (#2) · scroll reveal (#7)
   Loaded AFTER main.css so it wins on equal specificity.
   Fully reversible: delete this file + the 3 includes in index.html.
   Initial-hidden states apply ONLY under html.js-anim (set by an inline
   head script), so no-JS visitors and reduced-motion users see everything.
   ============================================================ */

/* ---- Hero staggered entrance (re-activates the existing .fade-in/.dN) ---- */
html.js-anim .fade-in,
html.js-anim .d1, html.js-anim .d2, html.js-anim .d3,
html.js-anim .d4, html.js-anim .d5 {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
html.js-anim .is-visible.fade-in,
html.js-anim .is-visible.d1, html.js-anim .is-visible.d2,
html.js-anim .is-visible.d3, html.js-anim .is-visible.d4,
html.js-anim .is-visible.d5 { opacity: 1; transform: none; will-change: auto; }

html.js-anim .d1.is-visible { transition-delay: 0s; }
html.js-anim .d2.is-visible { transition-delay: .09s; }
html.js-anim .d3.is-visible { transition-delay: .18s; }
html.js-anim .d4.is-visible { transition-delay: .27s; }
html.js-anim .d5.is-visible { transition-delay: .36s; }

/* ---- Generic scroll reveal for cards + section heads (#7) ---- */
html.js-anim [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
  will-change: opacity, transform;
}
html.js-anim [data-reveal].is-visible { opacity: 1; transform: none; will-change: auto; }

/* ============================================================
   CONTINUOUS ambient hero motion (always moving, Cloudflare-style)
   Injected by animations.js as .hero-fx inside .hero.
   ============================================================ */
.hero-fx { position: absolute; inset: 0; z-index: 0; overflow: hidden;
           pointer-events: none; }
.hero > .container { position: relative; z-index: 1; }
.hero-grid { position: relative; z-index: 1; }

.hero-blob { position: absolute; border-radius: 50%; filter: blur(64px);
             will-change: transform; }
.hero-blob.b1 { width: 540px; height: 540px; top: -140px; left: -90px;
  background: radial-gradient(circle, rgba(53,94,59,.30), transparent 70%);
  animation: blobDrift1 22s ease-in-out infinite; }
.hero-blob.b2 { width: 480px; height: 480px; top: 20px; right: -130px;
  background: radial-gradient(circle, rgba(209,111,75,.24), transparent 70%);
  animation: blobDrift2 27s ease-in-out infinite; }
.hero-blob.b3 { width: 420px; height: 420px; bottom: -180px; left: 34%;
  background: radial-gradient(circle, rgba(248,231,209,.55), transparent 70%);
  animation: blobDrift3 31s ease-in-out infinite; }

@keyframes blobDrift1 { 0%,100%{transform:translate(0,0) scale(1)}
                        50%{transform:translate(90px,70px) scale(1.18)} }
@keyframes blobDrift2 { 0%,100%{transform:translate(0,0) scale(1)}
                        50%{transform:translate(-80px,50px) scale(1.12)} }
@keyframes blobDrift3 { 0%,100%{transform:translate(0,0) scale(1)}
                        50%{transform:translate(50px,-70px) scale(1.22)} }

.hero-net { position: absolute; inset: 0; width: 100%; height: 100%;
            display: block; }

/* ============================================================
   Reach section — animated México + EUA network map band
   ============================================================ */
.reach { padding: 60px 0; background: var(--bg-white); }
.reach .container { position: relative; z-index: 2; overflow: hidden;
  max-width: 1080px; border-radius: 32px; padding: 60px 48px 44px; color: var(--duplica-cream);
  background:
    radial-gradient(560px circle at 24% 62%, rgba(53,94,59,.50), transparent 70%),
    radial-gradient(480px circle at 78% 38%, rgba(209,111,75,.20), transparent 72%),
    var(--duplica-green-dark); }
.reach-head { text-align: center; max-width: 680px; margin: 0 auto 28px; }
.reach .mono-label { color: var(--duplica-orange); }
.reach h2 { font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1;
  color: var(--duplica-cream); margin: 14px 0 16px; letter-spacing: -0.02em; }
.reach h2 em { font-style: italic; color: #fff; }
.reach-head p { color: rgba(248,231,209,.8); font-size: 1.05rem; line-height: 1.6;
  margin: 0 auto; max-width: 560px; }
.reach-map { position: relative; height: 480px; }
.reach-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.reach-stats { display: flex; justify-content: center; gap: 56px; margin-top: 24px; }
.reach-stats div { text-align: center; }
.reach-stats strong { display: block; font-family: 'Fraunces', serif; font-weight: 400;
  font-size: 2rem; color: var(--duplica-cream); line-height: 1; }
.reach-stats span { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(248,231,209,.78); }
@media (max-width: 768px) {
  .reach { padding: 36px 0; }
  .reach .container { padding: 40px 20px 32px; border-radius: 22px; }
  .reach-map { height: 300px; }
  .reach-stats { gap: 26px; }
  .reach-stats strong { font-size: 1.5rem; }
}

/* Equalize industry-card titles (1-line vs 2-line) so the cases below
   start at the same height and the grid reads clean. 2 lines of the h3. */
.industry-header h3 { min-height: 3.05rem; }

/* Persistent nav stays white; condenses slightly on scroll. */
#site-nav nav { transition: padding .25s ease, box-shadow .3s ease; }
#site-nav.nav-condensed nav { padding-top: 9px; padding-bottom: 9px;
  box-shadow: 0 2px 16px rgba(26,26,26,.07); }

/* ---- Respect reduced-motion: show everything, no movement ---- */
@media (prefers-reduced-motion: reduce) {
  html.js-anim .fade-in,
  html.js-anim .d1, html.js-anim .d2, html.js-anim .d3,
  html.js-anim .d4, html.js-anim .d5,
  html.js-anim [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-blob { animation: none !important; }
  /* Script early-returns under reduced motion, so the map canvas never paints;
     collapse the empty map area so the reach card doesn't gape. */
  .reach-map { height: 0; margin: 0; }
  .reach-canvas { display: none; }
}
