/* =========================================================
   CON-SEAL — Motion & animated graphics
   ========================================================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal="left"] { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal].is-visible { opacity: 1; transform: none; }

.cat-card[data-reveal]:nth-child(1) { transition-delay: 0.05s; }
.cat-card[data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.cat-card[data-reveal]:nth-child(3) { transition-delay: 0.15s; }
.cat-card[data-reveal]:nth-child(4) { transition-delay: 0.2s; }
.cat-card[data-reveal]:nth-child(5) { transition-delay: 0.25s; }
.cat-card[data-reveal]:nth-child(6) { transition-delay: 0.3s; }

.trust-item[data-reveal]:nth-child(1) { transition-delay: 0s; }
.trust-item[data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.trust-item[data-reveal]:nth-child(3) { transition-delay: 0.2s; }
.trust-item[data-reveal]:nth-child(4) { transition-delay: 0.3s; }

/* Hero entrance */
.hero:not(.is-ready) .hero-copy > *,
.hero:not(.is-ready) .hero-visual {
  opacity: 0;
  transform: translateY(28px);
}
.hero.is-ready .hero-overlay { animation: fadeIn 1.1s ease forwards; }
.hero.is-ready .hero-img {
  animation: heroZoom 10s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             heroDrift 30s ease-in-out 10s infinite alternate;
}
.hero.is-ready .hero-copy > *:nth-child(1) { animation: fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.2s forwards; }
.hero.is-ready .hero-copy > *:nth-child(2) { animation: fadeUp 0.85s cubic-bezier(0.22,1,0.36,1) 0.35s forwards; }
.hero.is-ready .hero-copy > *:nth-child(3) { animation: fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.5s forwards; }
.hero.is-ready .hero-copy > *:nth-child(4) { animation: fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.65s forwards; }
.hero.is-ready .hero-visual { animation: fadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.45s forwards; }
.hero.is-ready .hero-flare { animation: fadeIn 1.4s ease 0.3s forwards; }
.hero.is-ready .hero-grain { animation: grainIn 1.6s ease 0.4s forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
@keyframes heroDrift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.04) translate(-1.2%, -0.8%); }
}
@keyframes grainIn { from { opacity: 0; } to { opacity: 0.18; } }

/* Scan / orbs / pulse */
.bg-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-fx-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(57, 255, 20, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 20, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(56px, 56px); }
}
.bg-fx-scan {
  position: absolute;
  left: 0; right: 0;
  height: 120px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(57, 255, 20, 0.08),
    transparent
  );
  animation: scanMove 7s ease-in-out infinite;
}
@keyframes scanMove {
  0% { top: -10%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.bg-fx-glow {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: glowPulse 8s ease-in-out infinite alternate;
}
.bg-fx-glow-a {
  top: -10%; right: 5%;
  background: radial-gradient(circle, rgba(57,255,20,0.45), transparent 70%);
}
.bg-fx-glow-b {
  bottom: 0; left: 10%;
  background: radial-gradient(circle, rgba(57,255,20,0.22), transparent 70%);
  animation-delay: 2s;
}
@keyframes glowPulse {
  from { transform: scale(0.9); opacity: 0.25; }
  to { transform: scale(1.15); opacity: 0.45; }
}

.bg-fx-orbs span {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime, #39FF14);
  box-shadow: 0 0 12px rgba(57,255,20,0.8);
  animation: orbFloat 6s ease-in-out infinite;
}
.bg-fx-orbs span:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.bg-fx-orbs span:nth-child(2) { top: 55%; left: 80%; animation-delay: 1.2s; }
.bg-fx-orbs span:nth-child(3) { top: 70%; left: 30%; animation-delay: 2.4s; }
.bg-fx-orbs span:nth-child(4) { top: 35%; left: 60%; animation-delay: 0.8s; }
.bg-fx-orbs span:nth-child(5) { top: 80%; left: 55%; animation-delay: 1.8s; }
@keyframes orbFloat {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-14px); opacity: 1; }
}

.bg-fx-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}
.bg-line {
  fill: none;
  stroke: rgba(57, 255, 20, 0.35);
  stroke-width: 1;
  stroke-dasharray: 8 12;
  animation: dashMove 18s linear infinite;
}
.bg-line.d2 { animation-delay: -4s; opacity: 0.6; }
.bg-line.d3 { animation-delay: -8s; opacity: 0.4; }
.bg-diag {
  fill: none;
  stroke: rgba(57, 255, 20, 0.2);
  stroke-width: 1;
  stroke-dasharray: 4 10;
  animation: dashMove 22s linear infinite reverse;
}
@keyframes dashMove {
  to { stroke-dashoffset: -200; }
}

/* Product icon float */
.cat-visual {
  height: 120px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  position: relative;
}
.cat-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  opacity: 0.9;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1), opacity 0.4s;
}
.cat-card:hover .cat-visual img {
  transform: scale(1.06);
  opacity: 1;
}
.float-shot {
  animation: floatSoft 5.5s ease-in-out infinite;
}
.cat-card:nth-child(2) .float-shot { animation-delay: 0.4s; }
.cat-card:nth-child(3) .float-shot { animation-delay: 0.8s; }
.cat-card:nth-child(4) .float-shot { animation-delay: 0.2s; }
.cat-card:nth-child(5) .float-shot { animation-delay: 1s; }
.cat-card:nth-child(6) .float-shot { animation-delay: 0.6s; }
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Shine sweep on cards */
.cat-card {
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(57,255,20,0.12) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
  z-index: 1;
}
.cat-card:hover::before { transform: translateX(120%); }
.cat-card > * { position: relative; z-index: 2; }

/* Split media section */
.media-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.media-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(57,255,20,0.25);
  box-shadow: 0 0 50px rgba(57,255,20,0.12);
  min-height: 360px;
}
.media-frame img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.2s cubic-bezier(0.22,1,0.36,1);
}
.media-frame:hover img { transform: scale(1); }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5,5,5,0.25), transparent 50%, rgba(57,255,20,0.12));
  pointer-events: none;
}

/* Radar ring decoration */
.radar {
  position: absolute;
  width: 180px; height: 180px;
  border: 1px solid rgba(57,255,20,0.35);
  border-radius: 50%;
  right: 8%; bottom: 10%;
  animation: radarSpin 12s linear infinite;
}
.radar::before,
.radar::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(57,255,20,0.25);
  border-radius: 50%;
}
.radar::after { inset: 36%; }
@keyframes radarSpin {
  to { transform: rotate(360deg); }
}

/* Page heroes with images */
.page-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 24px);
}
.page-hero-media {
  position: absolute;
  inset: 0;
}
.page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroDrift 28s ease-in-out infinite alternate;
  filter: brightness(0.45) saturate(0.9);
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(5,5,5,0.92) 0%, rgba(5,5,5,0.55) 55%, rgba(5,5,5,0.35) 100%),
    linear-gradient(180deg, rgba(5,5,5,0.4) 0%, transparent 40%, rgba(5,5,5,0.85) 100%),
    radial-gradient(ellipse 50% 40% at 80% 40%, rgba(57,255,20,0.15), transparent 60%);
}
.page-hero .container { position: relative; z-index: 1; padding-bottom: 48px; }

@media (max-width: 900px) {
  .media-split { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img, .page-hero-media img, .bg-fx-grid, .bg-fx-scan,
  .bg-fx-glow, .bg-fx-orbs span, .bg-line, .bg-diag, .float-shot, .radar {
    animation: none !important;
  }
  .hero:not(.is-ready) .hero-copy > *,
  .hero:not(.is-ready) .hero-visual,
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-overlay, .hero-flare, .hero-grain { opacity: 1 !important; }
}
