/* Tier 1 2.5D hero depth: pointer + scroll parallax for layered heroes.
   Transform/opacity only, no dependencies. Reduced-motion safe. */

[data-depth]{
  transform: translate3d(var(--dx, 0px), calc(var(--dy, 0px) + var(--sy, 0px)), 0);
  transition: transform .22s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce){
  [data-depth]{ transform: none !important; transition: none !important; }
}

/* Generic layer helpers used by Group + Megalog pilots. */
.hero-depth-media{ position:absolute; inset:-7%; z-index:0; }
.hero-depth-media img{
  width:100%; height:100%; object-fit:cover; display:block;
  animation:none !important; transform:none !important;
}
.hero-depth-fog{
  position:absolute; inset:0; z-index:1; pointer-events:none;
  background: radial-gradient(55% 55% at 50% 62%, rgba(6,22,38,.42) 0%, transparent 72%);
}
.hero-depth-chips{
  display:none; position:absolute; inset:0; z-index:2; pointer-events:none;
}
@media (min-width:1280px){ .hero-depth-chips{ display:block; } }
.hero-depth-chip{
  position:absolute; padding:8px 13px; border-radius:999px;
  font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase;
  color:rgba(255,255,255,.82); background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14); backdrop-filter:blur(10px);
  box-shadow:0 10px 30px -12px rgba(0,0,0,.6);
}
.hero-depth-chip::before{
  content:""; display:inline-block; width:5px; height:5px; border-radius:50%;
  background:rgba(52,211,153,.9); margin-right:7px; vertical-align:1px;
}
.hero-depth-chip:nth-child(1){ top:16%; right:6%; }
.hero-depth-chip:nth-child(2){ top:32%; left:6%; }
.hero-depth-chip:nth-child(3){ bottom:27%; right:9%; }
.hero-depth-chip:nth-child(4){ bottom:16%; left:9%; }
.hero-depth-chip:nth-child(5){ top:55%; right:4%; }

/* Megalog: technical network plane. */
.ml-hero-net{
  position:absolute; inset:0; z-index:1; width:100%; height:100%;
  pointer-events:none; opacity:.62;
}
.ml-hero-grid{
  position:absolute; inset:0; z-index:1; pointer-events:none; opacity:.20;
  background-image:
    linear-gradient(rgba(255,255,255,.20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.20) 1px, transparent 1px);
  background-size:64px 64px;
  -webkit-mask-image:radial-gradient(72% 72% at 50% 38%, #000 0%, transparent 74%);
  mask-image:radial-gradient(72% 72% at 50% 38%, #000 0%, transparent 74%);
}
.ml-hero-media{ position:absolute; inset:-6%; z-index:0; }
.ml-hero-media img{
  width:100%; height:100%; object-fit:cover; display:block;
  animation:none !important; transform:none !important;
}

/* -- Mega Global: 3-card unfold rail (Tier 1, code only) --------------- */
[data-site="megaglobal"] .mg-hero-cards{ display:none; }
@media (min-width:1536px){
  [data-site="megaglobal"] .mg-hero-cards{
    display:flex; flex-direction:column; gap:12px;
    position:absolute; right:3.5rem; top:50%; transform:translateY(-50%);
    z-index:2; pointer-events:none;
  }
}
[data-site="megaglobal"] .mg-hero-card{
  width:230px; padding:13px 16px; border-radius:14px;
  background:rgba(6,32,36,.46); border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(12px); box-shadow:0 18px 40px -18px rgba(0,0,0,.6);
  opacity:0; transform:translateX(34px) rotateY(-16deg); transform-origin:right center;
  animation:mgCardUnfold .9s cubic-bezier(.2,.7,.2,1) forwards;
}
[data-site="megaglobal"] .mg-hero-card:nth-child(1){ animation-delay:.25s; }
[data-site="megaglobal"] .mg-hero-card:nth-child(2){ animation-delay:.4s; }
[data-site="megaglobal"] .mg-hero-card:nth-child(3){ animation-delay:.55s; }
[data-site="megaglobal"] .mg-hero-k{
  display:block; font-size:10px; font-weight:800; letter-spacing:.14em;
  text-transform:uppercase; color:#5eead4;
}
[data-site="megaglobal"] .mg-hero-v{
  display:block; margin-top:4px; font-size:13px; font-weight:600; color:#f8fafc;
}
@keyframes mgCardUnfold{ to{ opacity:1; transform:none; } }

/* -- Mega Cargo: route line + passing containers ----------------------- */
[data-site="megacargo"] .mc-route{
  position:absolute; inset:0; z-index:1; width:100%; height:100%;
  pointer-events:none; opacity:.55;
}
[data-site="megacargo"] .mc-route path{ animation:mcDash 7s linear infinite; }
@keyframes mcDash{ to{ stroke-dashoffset:-44; } }
[data-site="megacargo"] .mc-foreground{
  position:absolute; left:0; right:0; bottom:14px; height:64px;
  overflow:hidden; pointer-events:none; z-index:1; opacity:.92;
}
[data-site="megacargo"] .mc-container{
  position:absolute; bottom:0; left:100%; width:144px; height:52px;
  border-radius:6px; border:1px solid rgba(148,163,184,.45);
  background:linear-gradient(135deg, rgba(30,41,59,.92), rgba(15,23,42,.86));
  color:#cbd5e1; font:800 11px/52px Inter, sans-serif; letter-spacing:.2em;
  text-align:center; animation:mcContainer 9s linear infinite;
}
[data-site="megacargo"] .mc-container--air{ bottom:9px; animation-duration:11s; animation-delay:1.2s; }
[data-site="megacargo"] .mc-container--road{ bottom:18px; animation-duration:13s; animation-delay:2.4s; }
@keyframes mcContainer{ to{ transform:translateX(-140vw); } }
@media (max-width:767px){ [data-site="megacargo"] .mc-foreground{ display:none; } }

/* -- GTA: shelf strip over the video (video untouched) ----------------- */
[data-site="gta"] .gta-hero-shelf{
  position:absolute; left:0; right:0; bottom:0; z-index:8;
  overflow:hidden; pointer-events:none; padding:12px 0;
  background:linear-gradient(180deg, transparent, rgba(6,20,14,.55));
}
[data-site="gta"] .gta-shelf-track{
  display:flex; gap:12px; width:max-content; animation:gtaShelf 28s linear infinite;
}
[data-site="gta"] .gta-shelf-item{
  padding:7px 14px; border-radius:999px; white-space:nowrap;
  font-size:10px; font-weight:800; letter-spacing:.14em; text-transform:uppercase;
  color:#f1f5f9; border:1px solid rgba(197,168,106,.45);
  background:rgba(8,28,20,.45); backdrop-filter:blur(8px);
}
@keyframes gtaShelf{ to{ transform:translateX(-50%); } }
@media (max-width:767px){ [data-site="gta"] .gta-hero-shelf{ display:none; } }

/* -- Mega Capital: restrained crossfade + gold rule -------------------- */
[data-site="megacapital"] .mcx-slides{
  position:absolute; inset:0; z-index:0; overflow:hidden;
}
[data-site="megacapital"] .mcx-slide{
  position:absolute; inset:-3%; width:106%; height:106%;
  object-fit:cover; animation:none !important;
}
[data-site="megacapital"] .mcx-a{ animation:mcxFadeA 18s ease-in-out infinite !important; }
[data-site="megacapital"] .mcx-b{ animation:mcxFadeB 18s ease-in-out infinite !important; }
@keyframes mcxFadeA{ 0%,45%,100%{ opacity:1; } 55%,90%{ opacity:0; } }
@keyframes mcxFadeB{ 0%,45%,100%{ opacity:0; } 55%,90%{ opacity:1; } }
[data-site="megacapital"] .mcx-rule{
  display:block; width:0; height:2px; margin-top:18px;
  background:linear-gradient(90deg, #a57838, #e6c9a0);
  animation:mcxRule 1.4s .5s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes mcxRule{ to{ width:140px; } }

@media (prefers-reduced-motion: reduce){
  [data-site="megaglobal"] .mg-hero-card{ animation:none; opacity:1; transform:none; }
  [data-site="megacargo"] .mc-route path,
  [data-site="megacargo"] .mc-container,
  [data-site="gta"] .gta-shelf-track,
  [data-site="megacapital"] .mcx-a,
  [data-site="megacapital"] .mcx-b,
  [data-site="megacapital"] .mcx-rule{ animation:none !important; }
  [data-site="megacapital"] .mcx-rule{ width:140px; }
  [data-site="megacapital"] .mcx-b{ opacity:0; }
}

/* group accent: neon blue chip dots (was emerald) */
body[data-site="group"] .hero-depth-chip::before{ background:rgba(56,189,248,.95); }
