/* ================================================================
   CGT-2027 — Background Patterns & Animated Effects
   ================================================================ */

/* ---- KEYFRAMES ---- */
@keyframes blob-drift {

  0%,
  100% {
    transform: translate(0, 0) scale(1)
  }

  33% {
    transform: translate(45px, -55px) scale(1.08)
  }

  66% {
    transform: translate(-35px, 35px) scale(.94)
  }
}

@keyframes blob-morph {

  0%,
  100% {
    border-radius: 60% 40% 30% 70%/60% 30% 70% 40%
  }

  25% {
    border-radius: 30% 60% 70% 40%/50% 60% 30% 60%
  }

  50% {
    border-radius: 50% 60% 30% 60%/30% 70% 40% 60%
  }

  75% {
    border-radius: 40% 60% 60% 30%/60% 40% 60% 40%
  }
}

@keyframes float-node {

  0%,
  100% {
    transform: translateY(0) scale(1)
  }

  50% {
    transform: translateY(-22px) scale(1.15)
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(.8);
    opacity: .7
  }

  100% {
    transform: scale(2.6);
    opacity: 0
  }
}

@keyframes grid-move {
  0% {
    background-position: 0 0
  }

  100% {
    background-position: 40px 40px
  }
}

@keyframes hex-move {
  0% {
    background-position: 0 0
  }

  100% {
    background-position: 60px 52px
  }
}

@keyframes dot-move {
  0% {
    background-position: 0 0
  }

  100% {
    background-position: 28px 28px
  }
}

@keyframes diag-slide {
  0% {
    background-position: 0 0
  }

  100% {
    background-position: 100px 100px
  }
}

@keyframes shimmer-pan {
  0% {
    background-position: -200% center
  }

  100% {
    background-position: 200% center
  }
}

@keyframes glow-pulse {

  0%,
  100% {
    opacity: .5;
    filter: blur(72px)
  }

  50% {
    opacity: .85;
    filter: blur(50px)
  }
}

@keyframes scan-line {
  0% {
    left: -25%
  }

  100% {
    left: 110%
  }
}

@keyframes card-shine {
  0% {
    left: -120%
  }

  100% {
    left: 200%
  }
}

@keyframes reg-shimmer {

  0%,
  100% {
    left: -120%
  }

  50% {
    left: 180%
  }
}

@keyframes key-dot-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .18)
  }

  50% {
    box-shadow: 0 0 0 9px rgba(16, 185, 129, .32)
  }
}

@keyframes cta-float {
  0% {
    transform: translateY(0) scale(0);
    opacity: 0
  }

  10% {
    opacity: .75;
    transform: scale(1)
  }

  90% {
    opacity: .15
  }

  100% {
    transform: translateY(-130px) scale(.5);
    opacity: 0
  }
}

@keyframes star-wave {

  0%,
  80%,
  100% {
    transform: scale(1)
  }

  40% {
    transform: scale(1.28) rotate(-5deg)
  }
}

@keyframes num-flash {
  0% {
    filter: brightness(1)
  }

  50% {
    filter: brightness(1.6) drop-shadow(0 0 16px rgba(14, 165, 233, .55))
  }

  100% {
    filter: brightness(1)
  }
}

/* ================================================================
   PATTERN LAYER CLASSES (injected as first child of sections)
   ================================================================ */
.bg-grid-dark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, .08) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-move 22s linear infinite;
}

.bg-grid-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: grid-move 28s linear infinite;
}

.bg-hex {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='52' viewBox='0 0 60 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 17.3v17.4L30 52 0 34.7V17.3Z' fill='none' stroke='%230EA5E9' stroke-opacity='0.085' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 52px;
  animation: hex-move 32s linear infinite;
}

.bg-hex-gray {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='52' viewBox='0 0 60 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 17.3v17.4L30 52 0 34.7V17.3Z' fill='none' stroke='%2394A3B8' stroke-opacity='0.13' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 52px;
  animation: hex-move 36s linear infinite;
}

.bg-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(14, 165, 233, .12) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  animation: dot-move 20s linear infinite;
}

.bg-dots-white {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .06) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  animation: dot-move 20s linear infinite;
}

.bg-circuit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230EA5E9' stroke-opacity='0.07' stroke-width='1'%3E%3Crect x='10' y='10' width='20' height='20'/%3E%3Cline x1='30' y1='20' x2='60' y2='20'/%3E%3Ccircle cx='60' cy='20' r='3'/%3E%3Cline x1='60' y1='20' x2='60' y2='60'/%3E%3Ccircle cx='60' cy='60' r='4'/%3E%3Cline x1='60' y1='60' x2='85' y2='60'/%3E%3Cline x1='85' y1='60' x2='85' y2='85'/%3E%3Ccircle cx='85' cy='85' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100px 100px;
  animation: grid-move 45s linear infinite;
}

.bg-diagonal {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 60px, rgba(14, 165, 233, .03) 60px, rgba(14, 165, 233, .03) 61px);
  animation: diag-slide 35s linear infinite;
}

/* ================================================================
   FLOATING BLOBS
   ================================================================ */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(72px);
  will-change: transform;
}

.bg-blob--blue {
  background: rgba(14, 165, 233, .20);
  animation: blob-drift 20s ease-in-out infinite;
}

.bg-blob--em {
  background: rgba(16, 185, 129, .16);
  animation: blob-drift 26s ease-in-out infinite reverse;
  animation-delay: -8s;
}

.bg-blob--purple {
  background: rgba(139, 92, 246, .14);
  animation: blob-drift 30s ease-in-out infinite;
  animation-delay: -14s;
}

/* Morphing hero blob */
.hero-morphblob {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(circle at 35% 35%, rgba(14, 165, 233, .16), rgba(16, 185, 129, .10), transparent 70%);
  border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
  animation: blob-morph 14s ease-in-out infinite, blob-drift 22s ease-in-out infinite;
  filter: blur(5px);
}

/* ================================================================
   MOLECULAR NODES
   ================================================================ */
.mol-wrap {
  position: absolute;
  pointer-events: none;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.mol-node {
  position: absolute;
  pointer-events: none;
}

.mol-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  opacity: .42;
  animation: float-node 7s ease-in-out infinite;
}

.mol-dot--em {
  background: var(--emerald);
}

.mol-dot--sm {
  width: 5px;
  height: 5px;
  opacity: .28;
}

.mol-dot--lg {
  width: 13px;
  height: 13px;
  opacity: .36;
  border: 2px solid rgba(14, 165, 233, .38);
  background: transparent;
}

.mol-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--blue);
  opacity: 0;
  animation: pulse-ring 2.8s ease-out infinite;
}

.mol-ring--em {
  border-color: var(--emerald);
}

/* ================================================================
   HERO EXTRA GLOW ORBS
   ================================================================ */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 1;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(14, 165, 233, .14) 0%, transparent 70%);
  animation: blob-drift 24s ease-in-out infinite;
}

.hero-orb-2 {
  width: 380px;
  height: 380px;
  bottom: -60px;
  right: 8%;
  background: radial-gradient(circle, rgba(16, 185, 129, .11) 0%, transparent 70%);
  animation: blob-drift 30s ease-in-out infinite reverse;
  animation-delay: -8s;
}

.hero-orb-3 {
  width: 260px;
  height: 260px;
  top: 25%;
  right: 4%;
  background: radial-gradient(circle, rgba(139, 92, 246, .09) 0%, transparent 70%);
  animation: blob-drift 18s ease-in-out infinite;
  animation-delay: -4s;
}

/* ================================================================
   STATS SCAN LINE
   ================================================================ */
.stats-scan {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 200px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, .16), rgba(16, 185, 129, .10), transparent);
  pointer-events: none;
  animation: scan-line 5.5s ease-in-out infinite;
  z-index: 0;
}

#stats>.container {
  position: relative;
  z-index: 1;
}

/* ================================================================
   CTA PARTICLE
   ================================================================ */
.cta-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: cta-float linear infinite;
}

/* ================================================================
   SECTION BACKGROUND OVERLAYS (via CSS ::before / ::after)
   ================================================================ */

/* WHY ATTEND — hex grid */
#why-attend {
  position: relative;
  overflow: hidden;
}

#why-attend::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='52' viewBox='0 0 60 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 17.3v17.4L30 52 0 34.7V17.3Z' fill='none' stroke='%2394A3B8' stroke-opacity='0.12' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 52px;
  animation: hex-move 36s linear infinite;
}

#why-attend>.container {
  position: relative;
  z-index: 1;
}

/* SESSIONS — moving grid */
#sessions {
  position: relative;
  overflow: hidden;
}

#sessions::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='52' viewBox='0 0 60 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 17.3v17.4L30 52 0 34.7V17.3Z' fill='none' stroke='%2394A3B8' stroke-opacity='0.12' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 52px;
  animation: hex-move 36s linear infinite;
}

#sessions>.container {
  position: relative;
  z-index: 1;
}

/* PROGRAM — diagonals */
#program {
  position: relative;
  overflow: hidden;
}

#program::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 70px, rgba(14, 165, 233, .025) 70px, rgba(14, 165, 233, .025) 71px);
  animation: diag-slide 40s linear infinite;
}

#program>.container {
  position: relative;
  z-index: 1;
}

/* REGISTRATION — faint diagonals */
#registration {
  position: relative;
  overflow: hidden;
}

#registration::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 80px, rgba(16, 185, 129, .022) 80px, rgba(16, 185, 129, .022) 81px);
  animation: diag-slide 32s linear infinite;
}

#registration>.container {
  position: relative;
  z-index: 1;
}

/* SPONSORS — dots */
#sponsors {
  position: relative;
  overflow: hidden;
}

#sponsors::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(14, 165, 233, .06) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  animation: dot-move 28s linear infinite;
}

#sponsors>.container {
  position: relative;
  z-index: 1;
}

/* GALLERY — circuit tiles */
#gallery {
  position: relative;
  overflow: hidden;
}

#gallery::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%2394A3B8' stroke-opacity='0.07' stroke-width='1'%3E%3Crect x='10' y='10' width='22' height='22'/%3E%3Cline x1='32' y1='21' x2='62' y2='21'/%3E%3Ccircle cx='62' cy='21' r='3'/%3E%3Cline x1='62' y1='21' x2='62' y2='62'/%3E%3Ccircle cx='62' cy='62' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100px 100px;
  animation: grid-move 50s linear infinite;
}

#gallery>.container {
  position: relative;
  z-index: 1;
}

/* TESTIMONIALS — faint diagonal */
#testimonials {
  position: relative;
  overflow: hidden;
}

#testimonials::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 50px, rgba(14, 165, 233, .022) 50px, rgba(14, 165, 233, .022) 51px);
}

#testimonials>.container {
  position: relative;
  z-index: 1;
}

/* VENUE — hex */
#venue {
  position: relative;
  overflow: hidden;
}

#venue::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='52' viewBox='0 0 60 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 17.3v17.4L30 52 0 34.7V17.3Z' fill='none' stroke='%2394A3B8' stroke-opacity='0.09' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 52px;
  animation: hex-move 40s linear infinite;
}

#venue>.container {
  position: relative;
  z-index: 1;
}

/* CONTACT — grid */
#contact {
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(14, 165, 233, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 165, 233, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: grid-move 30s linear infinite;
}

#contact>.container {
  position: relative;
  z-index: 1;
}

/* FOOTER — grid */
#footer {
  position: relative;
  overflow: hidden;
}

/* #footer::before { content:'';position:absolute;inset:0;pointer-events:none;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:50px 50px; } */
#footer>.container {
  position: relative;
  z-index: 1;
}

/* CTA BANNER — white dots */
#cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .06) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  animation: dot-move 18s linear infinite;
  z-index: 0;
}

#cta-banner>.container {
  position: relative;
  z-index: 2;
}

/* ABOUT — dot pattern */
#about {
  position: relative;
  overflow: hidden;
}

#about::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(14, 165, 233, .055) 1px, transparent 1px);
  background-size: 26px 26px;
  animation: dot-move 30s linear infinite;
}

#about::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, .07) 0%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 8s ease-in-out infinite;
}

#about>.container {
  position: relative;
  z-index: 1;
}

/* SPEAKERS glow */
#speakers {
  position: relative;
  overflow: hidden;
}

#speakers::after {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(14, 165, 233, .06) 0%, transparent 70%);
  pointer-events: none;
}

/* ================================================================
   CARD HOVER — GRADIENT BORDER
   ================================================================ */
.why-card:hover {
  background: linear-gradient(var(--white), var(--white)) padding-box,
    var(--grad-accent) border-box;
  border: 1.5px solid transparent;
}

.session-card:hover {
  background: linear-gradient(var(--gray-50), var(--gray-50)) padding-box,
    var(--grad-accent) border-box;
  border: 1px solid transparent;
}

/* Registration popular card shimmer sweep */
.reg-card--popular::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
  animation: reg-shimmer 3.5s ease 1.2s infinite;
  pointer-events: none;
}

/* Speaker card light sweep */
.speaker-photo::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -120%;
  width: 55%;
  height: 200%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, .12), transparent);
  transform: rotate(20deg);
  pointer-events: none;
}

.speaker-card:hover .speaker-photo::after {
  animation: card-shine .7s ease forwards;
}

/* Gallery sweep */
.gal-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, .12), rgba(16, 185, 129, .08));
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 1;
  pointer-events: none;
}

.gal-item:hover::before {
  opacity: 1;
}

/* ================================================================
   STAT HOVER GLOW
   ================================================================ */
.stat-item:hover .stat-num {
  filter: drop-shadow(0 0 22px rgba(14, 165, 233, .55));
  transition: filter .3s ease;
}

.stat-num.counted {
  animation: num-flash .6s ease;
}

/* ================================================================
   TIMELINE KEY DOT PULSE
   ================================================================ */
.prog-dot--key {
  animation: key-dot-pulse 2.2s ease-in-out infinite;
}

/* ================================================================
   TESTIMONIAL ANIMATED STARS
   ================================================================ */
.testi-stars span {
  display: inline-block;
  animation: star-wave 2.4s ease-in-out infinite;
}

.testi-stars span:nth-child(1) {
  animation-delay: 0s;
}

.testi-stars span:nth-child(2) {
  animation-delay: .12s;
}

.testi-stars span:nth-child(3) {
  animation-delay: .24s;
}

.testi-stars span:nth-child(4) {
  animation-delay: .36s;
}

.testi-stars span:nth-child(5) {
  animation-delay: .48s;
}

/* ================================================================
   NAVBAR GLOW LINE
   ================================================================ */
#navbar.scrolled::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, .55), rgba(16, 185, 129, .45), transparent);
}

/* ================================================================
   FORM FOCUS GRADIENT BORDER
   ================================================================ */
.form-ctrl:focus {
  background: linear-gradient(var(--white), var(--white)) padding-box,
    var(--grad-accent) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .09), 0 0 24px rgba(14, 165, 233, .06);
}