/* ═══════════════════════════════════════════════════════════
   AVIONICS WORKS — PREMIUM EFFECTS v2
   Award-winning level visual polish
   ═══════════════════════════════════════════════════════════ */

/* ── Animated Noise/Grain Overlay (cinematic feel) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ── Smooth Page Transitions ── */
.page-content {
  animation: aw-pageReveal 1s cubic-bezier(.16,1,.3,1) both;
}
@keyframes aw-pageReveal {
  from { opacity: 0; filter: blur(6px); transform: translateY(16px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

/* ── Hero Power-Up Sequence ── */
.hero {
  position: relative;
}

/* Scan line effect over hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.03) 2px,
    rgba(0,0,0,.03) 4px
  );
  z-index: 2;
  pointer-events: none;
  animation: aw-scanlines 8s linear infinite;
}
@keyframes aw-scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* Gold particle field behind hero text */
.hero-content {
  position: relative;
  z-index: 3;
}
.hero-content::before {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 120%; height: 140%;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(252,212,98,.4), transparent),
    radial-gradient(1px 1px at 80% 70%, rgba(252,212,98,.3), transparent),
    radial-gradient(1px 1px at 50% 20%, rgba(252,212,98,.35), transparent),
    radial-gradient(1px 1px at 30% 80%, rgba(252,212,98,.25), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(252,212,98,.3), transparent),
    radial-gradient(1.5px 1.5px at 10% 60%, rgba(252,212,98,.2), transparent),
    radial-gradient(1.5px 1.5px at 90% 10%, rgba(252,212,98,.2), transparent);
  animation: aw-starfield 20s linear infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes aw-starfield {
  0% { transform: translateY(0) scale(1); opacity: .6; }
  50% { opacity: 1; }
  100% { transform: translateY(-20px) scale(1.02); opacity: .6; }
}

/* Hero title word-by-word stagger */
/* .hero-title overflow removed - was breaking render */
.hero-title {
  /* overflow: hidden; */
}
.hero-title .text-gold {
  display: inline-block;
  animation: aw-goldPulse 3s ease-in-out infinite;
}
@keyframes aw-goldPulse {
  0%, 100% { filter: drop-shadow(0 0 0px transparent); }
  50% { filter: drop-shadow(0 0 12px rgba(252,212,98,.3)); }
}

/* ── Section Divider Lines ── */
.section, .section-sm {
  position: relative;
}
.section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
  transition: width 1s var(--ease-out);
}
.section.aw-line-visible::after {
  width: 60%;
}

/* ── Glass Morphism Cards ── */
.service-card {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .5s var(--ease-out);
}
.service-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px rgba(252,212,98,.05), inset 0 1px 0 rgba(252,212,98,.1);
}

/* Service card inner glow on hover */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(252,212,98,.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
  z-index: 1;
}
.service-card:hover::before {
  opacity: 1;
}

/* ── Featured Project Cards — Cinematic Hover ── */
.featured-item {
  position: relative;
  /* overflow: hidden; */
  border-radius: var(--radius-lg);
}
.featured-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(252,212,98,.05), transparent 50%);
  opacity: 0;
  transition: opacity .5s;
  z-index: 1;
  pointer-events: none;
}
.featured-item:hover::before {
  opacity: 1;
}

/* ── Testimonial Floating Quotes ── */
.testimonial {
  position: relative;
}
.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px; right: 30px;
  font-family: var(--font-heading);
  font-size: 8rem;
  color: var(--gold);
  opacity: 0;
  transform: translateY(20px);
  transition: all .6s var(--ease-out);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}
.testimonial:hover::before {
  opacity: .06;
  transform: translateY(0);
}

/* ── CTA Section — Dramatic Spotlight ── */
.cta-section {
  position: relative;
  /* overflow: hidden; */
}
.cta-section::after {
  content: '';
  position: absolute;
  top: -50%; left: 20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(252,212,98,.06) 0%, transparent 60%);
  animation: aw-spotlight 6s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aw-spotlight {
  0% { transform: translateX(-20%) rotate(-5deg); }
  100% { transform: translateX(20%) rotate(5deg); }
}

/* ── Animated Section Labels ── */
.section-label {
  position: relative;
  display: inline-block;
  /* overflow: hidden; */
}
.section-label::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease-out);
}
.section-header.visible .section-label::before {
  transform: scaleX(1);
}

/* ── Trust Bar — Animated Borders ── */
.trust-bar {
  position: relative;
}
.trust-bar::before,
.trust-bar::after {
  content: '';
  position: absolute;
  left: 0; width: 100%; height: 1px;
}
.trust-bar::before { top: 0; }
.trust-bar::after { bottom: 0; }
.trust-bar::before,
.trust-bar::after {
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
  animation: aw-borderSweep 4s ease-in-out infinite;
}
@keyframes aw-borderSweep {
  0%, 100% { background-position: -200% center; }
  50% { background-position: 200% center; }
}

/* ── Glitch Text Effect on Hover (hero title) ── */
#DISABLED .hero-title:hover {

/* ── Button Shine Sweep ── */
.btn-primary {
  position: relative;
  /* overflow: hidden; */
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transition: none;
  animation: aw-btnShine 4s ease-in-out infinite;
}
@keyframes aw-btnShine {
  0%, 70%, 100% { left: -100%; }
  85% { left: 150%; }
}

/* ── Footer Glow Line ── */
.footer {
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .3;
}

/* ── Smooth Link Hover Effect ── */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: left .3s var(--ease-out), right .3s var(--ease-out);
}
.nav-link:hover::after,
.nav-link.active::after {
  left: 12px;
  right: 12px;
}

/* ── Magnetic Shadow on Cards ── */
.data-card,
.service-card,
.featured-item,
.testimonial,
.estimator-card {
  transition: all .4s var(--ease-out), box-shadow .4s;
}

/* ── Badge Glow ── */
.hero-badge .badge {
  position: relative;
  /* overflow: hidden; */
}
.hero-badge .badge::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(252,212,98,.2), transparent);
  animation: aw-badgeShine 3s ease-in-out infinite;
}
@keyframes aw-badgeShine {
  0%, 60%, 100% { left: -100%; }
  80% { left: 150%; }
}

/* ── Image Reveal Mask ── */
.featured-img {
  position: relative;
  /* overflow: hidden; */
}
.featured-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 40%);
  pointer-events: none;
}

/* ── Scrollbar Enhancement ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--gold), var(--bg-tertiary));
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ── Text Selection ── */
::selection {
  background: var(--gold);
  color: var(--bg-primary);
  text-shadow: none;
}

/* ── Video Section Enhancement ── */
.section iframe {
  transition: box-shadow .4s;
}
.section iframe:hover {
  box-shadow: 0 0 40px rgba(252,212,98,.1);
}

/* ── Loading Skeleton Pulse ── */
@keyframes aw-skeleton {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── Gold Accent Underlines ── */
.cta-title {
  position: relative;
  display: inline-block;
}
.cta-title::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}

/* ── Mobile Optimizations ── */
@media (max-width: 768px) {
  .hero::before { display: none; } /* no scan lines on mobile */
  .hero-content::before { display: none; } /* no particles on mobile */
  body::before { opacity: .015; } /* less grain on mobile */
  #DISABLED .hero-title:hover { animation: none; } /* no glitch on touch */
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .2s !important;
  }
  body::before { display: none; }
  .hero::before { display: none; }
  .hero-content::before { display: none; }
}
