/* ==========================================================================
   NexTech Ads - Premium Social Media Promotion Agency
   Stylesheet: custom.css
   Modern Dark Aesthetic, Glassmorphism & High-Velocity Transitions
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typography Reference (Preconnected & Loaded via HTML for Maximum Speed)
   -------------------------------------------------------------------------- */
/* Fonts: 'Plus Jakarta Sans' (headings) and 'Inter' (body) loaded in <head> */

/* --------------------------------------------------------------------------
   2. Design System Variables (:root)
   -------------------------------------------------------------------------- */
:root {
  /* Brand Identification */
  --brand-name: "NexTech Ads";

  /* Background Palette (Ultra-Dark Aesthetic #07070A) */
  --bg-primary: #07070A;
  --bg-secondary: #0D0D14;
  --bg-surface: #12121E;
  --bg-surface-elevated: #181829;
  --bg-card: rgba(18, 18, 30, 0.65);
  --bg-card-hover: rgba(26, 26, 44, 0.85);

  /* Glassmorphism Borders */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-light: rgba(255, 255, 255, 0.14);
  --border-glass-hover: rgba(255, 255, 255, 0.25);

  /* Core Brand Gradients (Electric Violet to Cyan) */
  --brand-violet: #8B5CF6;
  --brand-violet-hover: #7C3AED;
  --brand-cyan: #06B6D4;
  --brand-cyan-light: #22D3EE;
  --gradient-brand: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 100%);
  --gradient-brand-hover: linear-gradient(135deg, #7C3AED 0%, #0891B2 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

  /* Platform Accent Colors */
  --accent-tiktok: #FE2C55;
  --accent-tiktok-cyan: #25F4EE;
  --accent-twitch: #9146FF;
  --accent-youtube: #FF0033;
  --accent-soundcloud: #FF5500;
  --accent-spotify: #1DB954;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* High Contrast Text */
  --text-primary: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  /* Container Max Width */
  --container-max: 1200px;
}

/* --------------------------------------------------------------------------
   3. Base & Noise Texture Overlay
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  color-scheme: dark;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Ambient Subtle Grain/Noise Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/noise.svg');
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 999;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

/* --------------------------------------------------------------------------
   4. Glassmorphism & Surface Utilities
   -------------------------------------------------------------------------- */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
}

.glass-nav {
  background: rgba(7, 7, 10, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
}

/* --------------------------------------------------------------------------
   5. Dynamic Platform Glows & Accents
   -------------------------------------------------------------------------- */
/* TikTok Glow */
.card-tiktok {
  --platform-color: var(--accent-tiktok);
  --platform-glow: rgba(254, 44, 85, 0.25);
}
.card-tiktok:hover {
  border-color: rgba(254, 44, 85, 0.45);
  box-shadow: 0 20px 45px -10px rgba(254, 44, 85, 0.3), inset 0 1px 0 rgba(254, 44, 85, 0.2);
}
.btn-tiktok {
  background: linear-gradient(135deg, #FE2C55 0%, #E01A4F 100%);
  box-shadow: 0 4px 20px rgba(254, 44, 85, 0.35);
}
.btn-tiktok:hover {
  box-shadow: 0 8px 30px rgba(254, 44, 85, 0.6);
}

/* Twitch Glow */
.card-twitch {
  --platform-color: var(--accent-twitch);
  --platform-glow: rgba(145, 70, 255, 0.25);
}
.card-twitch:hover {
  border-color: rgba(145, 70, 255, 0.5);
  box-shadow: 0 20px 45px -10px rgba(145, 70, 255, 0.3), inset 0 1px 0 rgba(145, 70, 255, 0.2);
}
.btn-twitch {
  background: linear-gradient(135deg, #9146FF 0%, #772CE8 100%);
  box-shadow: 0 4px 20px rgba(145, 70, 255, 0.35);
}
.btn-twitch:hover {
  box-shadow: 0 8px 30px rgba(145, 70, 255, 0.6);
}

/* YouTube Glow */
.card-youtube {
  --platform-color: var(--accent-youtube);
  --platform-glow: rgba(255, 0, 51, 0.25);
}
.card-youtube:hover {
  border-color: rgba(255, 0, 51, 0.5);
  box-shadow: 0 20px 45px -10px rgba(255, 0, 51, 0.3), inset 0 1px 0 rgba(255, 0, 51, 0.2);
}
.btn-youtube {
  background: linear-gradient(135deg, #FF0033 0%, #CC0000 100%);
  box-shadow: 0 4px 20px rgba(255, 0, 51, 0.35);
}
.btn-youtube:hover {
  box-shadow: 0 8px 30px rgba(255, 0, 51, 0.6);
}

/* SoundCloud Glow */
.card-soundcloud {
  --platform-color: var(--accent-soundcloud);
  --platform-glow: rgba(255, 85, 0, 0.25);
}
.card-soundcloud:hover {
  border-color: rgba(255, 85, 0, 0.5);
  box-shadow: 0 20px 45px -10px rgba(255, 85, 0, 0.3), inset 0 1px 0 rgba(255, 85, 0, 0.2);
}
.btn-soundcloud {
  background: linear-gradient(135deg, #FF5500 0%, #E04B00 100%);
  box-shadow: 0 4px 20px rgba(255, 85, 0, 0.35);
}
.btn-soundcloud:hover {
  box-shadow: 0 8px 30px rgba(255, 85, 0, 0.6);
}

/* Spotify Glow */
.card-spotify {
  --platform-color: var(--accent-spotify);
  --platform-glow: rgba(29, 185, 84, 0.25);
}
.card-spotify:hover {
  border-color: rgba(29, 185, 84, 0.5);
  box-shadow: 0 20px 45px -10px rgba(29, 185, 84, 0.3), inset 0 1px 0 rgba(29, 185, 84, 0.2);
}
.btn-spotify {
  background: linear-gradient(135deg, #1DB954 0%, #15883e 100%);
  box-shadow: 0 4px 20px rgba(29, 185, 84, 0.35);
}
.btn-spotify:hover {
  box-shadow: 0 8px 30px rgba(29, 185, 84, 0.6);
}

/* --------------------------------------------------------------------------
   6. Core Brand Buttons & Gradients
   -------------------------------------------------------------------------- */
.btn-brand-primary {
  background: var(--gradient-brand);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 25px rgba(139, 92, 246, 0.4);
  transition: all 0.3s ease;
}

.btn-brand-primary:hover {
  background: var(--gradient-brand-hover);
  box-shadow: 0 8px 35px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

.btn-brand-secondary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass-light);
  color: #FFFFFF;
  transition: all 0.3s ease;
}

.btn-brand-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.gradient-text-brand {
  background: linear-gradient(135deg, #A78BFA 0%, #F472B6 40%, #22D3EE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   7. Ambient Radial Glow Backgrounds
   -------------------------------------------------------------------------- */
.radial-glow-hero {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(6, 182, 212, 0.08) 45%, rgba(7, 7, 10, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.radial-glow-cta {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.22) 0%, rgba(6, 182, 212, 0.12) 50%, rgba(7, 7, 10, 0) 80%);
  filter: blur(60px);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. Keyframe Animations (Floating & Pulses)
   -------------------------------------------------------------------------- */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}

@keyframes floatReverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(12px) rotate(-1.5deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes chartDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pingSlow {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.animate-float-slow {
  animation: floatSlow 7s ease-in-out infinite;
}

.animate-float-reverse {
  animation: floatReverse 6s ease-in-out infinite;
}

.animate-ping-slow {
  animation: pingSlow 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* --------------------------------------------------------------------------
   9. Connecting Step Line in How It Works
   -------------------------------------------------------------------------- */
.step-connecting-line {
  position: absolute;
  top: 36px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.8) 0%, 
    rgba(6, 182, 212, 0.8) 50%, 
    rgba(139, 92, 246, 0.8) 100%);
  background-size: 200% 100%;
  animation: lineFlow 6s linear infinite;
  z-index: 0;
}

@keyframes lineFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* --------------------------------------------------------------------------
   10. Accordion Styling
   -------------------------------------------------------------------------- */
.faq-accordion-item {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.faq-accordion-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.faq-accordion-item.faq-open {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(22, 22, 38, 0.85);
  box-shadow: 0 18px 40px -15px rgba(139, 92, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.faq-accordion-header {
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: transparent;
  cursor: pointer;
  border: none;
}

.faq-icon-wrap {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.faq-accordion-header[aria-expanded="true"] .faq-icon-wrap {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.35);
}

.faq-accordion-header[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
  color: var(--brand-cyan);
}

.faq-accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.35s;
  overflow: hidden;
}

.faq-accordion-content.open {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
}

.faq-accordion-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.faq-accordion-body {
  padding: 1rem 1.5rem 1.35rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* --------------------------------------------------------------------------
   11. Testimonials Slider
   -------------------------------------------------------------------------- */
.testimonial-track-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.testimonial-card-slide {
  flex: 0 0 100%;
  padding: 0 0.75rem;
}

@media (min-width: 768px) {
  .testimonial-card-slide {
    flex: 0 0 50%;
  }
}

@media (min-width: 1024px) {
  .testimonial-card-slide {
    flex: 0 0 33.333%;
  }
}

/* --------------------------------------------------------------------------
   12. Floating WhatsApp & Back to Top Buttons
   -------------------------------------------------------------------------- */
.floating-whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-whatsapp:hover {
  transform: scale(1.08);
}

.floating-back-to-top {
  position: fixed;
  bottom: 5.25rem;
  right: 1.75rem;
  z-index: 89;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.floating-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   13. Scroll Reveal Animation Classes (Safe by default: never hides content)
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 1;
  transform: none;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

html.nta-js-reveal .reveal-on-scroll:not(.revealed) {
  opacity: 0;
  transform: translateY(20px);
}

html.nta-js-reveal .reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   14. Accessibility & Focus States (WCAG AA Compliance)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--brand-violet) !important;
  outline-offset: 3px !important;
}

a, button {
  touch-action: manipulation;
}

/* Respect user's OS preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .animate-float-slow,
  .animate-float-reverse,
  .animate-ping-slow,
  .step-connecting-line {
    animation: none !important;
  }
}
