/*
Theme Name: Quantum Vision
Theme URI: https://quantumvision.in
Author: Quantum Vision Studio
Author URI: https://quantumvision.in
Description: Enterprise performance marketing agency theme featuring layered depth-parallax hero, WebGL quantum interference fields, security rate-limiting, first-party visitor analytics, and full editorial blog platform.
Version: 1.1.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 8.1
Text Domain: quantumvision
License: Proprietary
*/

/* ==========================================================================
   1. DESIGN TOKENS & SYSTEM VARIABLES (Section 2 in Prompt)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* Palette */
  --void:        #0B0A10;   /* Page background base */
  --slate:       #14131C;   /* Card surfaces & raised elements */
  --slate-hover: #1C1A28;   /* Elevated hover state */
  --fringe-a:    #6C4BF4;   /* Violet (Primary Accent) */
  --fringe-b:    #12D8C4;   /* Teal (Secondary Accent) */
  --fringe-c:    #F2A03D;   /* Amber (CTA Focus) */
  --paper:       #EDEBF2;   /* High-contrast body text */
  --muted:       #8E8AA0;   /* Captions & secondary metadata */
  --border-subtle: rgba(237, 235, 242, 0.08);
  --border-glow:   rgba(108, 75, 244, 0.3);

  /* Gradients */
  --gradient-iridescent: linear-gradient(135deg, rgba(108,75,244,0.2) 0%, rgba(18,216,196,0.15) 50%, rgba(242,160,61,0.15) 100%);
  --gradient-edge: linear-gradient(90deg, var(--fringe-a), var(--fringe-b), var(--fringe-c));
  --gradient-scrim: linear-gradient(to top, var(--void) 0%, rgba(11,10,16,0.7) 50%, transparent 100%);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', 'General Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-utility: 'JetBrains Mono', monospace;

  /* Header-to-Hero Responsive Spacing Tokens (Section 2 in Prompt) */
  --header-height-desktop: 90px;
  --header-height-mobile:  70px;
  --header-hero-gap-desktop: 60px;
  --header-hero-gap-tablet:  40px;
  --header-hero-gap-mobile:  28px;

  /* Layout Grid & Spacing */
  --grid-max-width: 1440px;
  --gutter-desktop: 120px;
  --gutter-mobile:  20px;
  --section-padding-desktop: 140px;
  --section-padding-mobile:  64px;

  /* Radii & Shadows */
  --radius-card: 16px;
  --radius-pill: 9999px;
  --glow-shadow: 0 0 30px rgba(108, 75, 244, 0.15);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.4s var(--ease-out-expo);
}

/* ==========================================================================
   2. ACCESSIBILITY & PREFERS-REDUCED-MOTION (Section 4 in Prompt)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .site-logo .logo-dot {
    animation: none !important;
  }
  .interactive-edge-card:hover,
  .service-studio-card:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   3. GLOBAL RESET & NATIVE SCROLL ASSURANCE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  background-color: var(--void);
  color: var(--paper);
  scroll-behavior: smooth !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: auto !important;
  width: 100%;
}

body {
  background-color: var(--void);
  color: var(--paper);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto !important;
  overflow-x: hidden;
  width: 100%;
}

body.menu-open {
  overflow: hidden !important;
}

/* Hero Section Separation Margin (Section 2 in Prompt) */
.hero-section {
  margin-top: calc(var(--header-height-desktop) + var(--header-hero-gap-desktop)) !important;
}

@media (max-width: 991px) {
  .hero-section {
    margin-top: calc(var(--header-height-mobile) + var(--header-hero-gap-tablet)) !important;
  }
}

@media (max-width: 600px) {
  .hero-section {
    margin-top: calc(var(--header-height-mobile) + var(--header-hero-gap-mobile)) !important;
  }
}

/* Global SVG Size Caps */
svg {
  max-width: 100%;
}

.service-icon,
.btn-icon,
.service-card-link svg,
.card-link svg,
.pop-post-item svg,
.info-item svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  flex-shrink: 0 !important;
}

/* Kinetic 3D Tilt Scale Elevation Animations Across All Cards */
.interactive-edge-card,
.service-studio-card,
.why-card,
.timeline-step-card,
.post-card,
.team-member-card,
.deliverable-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease !important;
  will-change: transform;
}

.interactive-edge-card:hover,
.service-studio-card:hover,
.why-card:hover,
.timeline-step-card:hover,
.post-card:hover,
.team-member-card:hover,
.deliverable-card:hover {
  transform: translateY(-8px) scale(1.015) !important;
  border-color: var(--fringe-b) !important;
  box-shadow: 0 16px 40px rgba(18, 216, 196, 0.18), 0 0 30px rgba(108, 75, 244, 0.22) !important;
}

/* Section Header Clearance Spacing Polish */
.section-header {
  margin-bottom: 64px !important;
  position: relative;
  z-index: 2;
}

.services-studio-grid,
.why-grid,
.stagger-grid,
.deliverables-grid {
  margin-top: 56px !important;
}

.services-section,
.why-us-section,
.methodology-section,
.team-section {
  overflow: visible !important;
  padding-top: var(--section-padding-desktop);
  padding-bottom: var(--section-padding-desktop);
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--fringe-a);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 20px;
}

:focus-visible {
  outline: 2px solid var(--fringe-b);
  outline-offset: 4px;
}

/* ==========================================================================
   4. TYPOGRAPHY SYSTEM
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.display-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  line-height: 1.15;
}

h1, .h1-size { font-size: clamp(2rem, 5vw + 0.5rem, 4.5rem); }
h2, .h2-size { font-size: clamp(1.65rem, 3vw + 0.3rem, 3.25rem); }
h3, .h3-size { font-size: clamp(1.25rem, 2vw + 0.2rem, 2rem); }
h4, .h4-size { font-size: clamp(1.1rem, 1.5vw + 0.1rem, 1.4rem); }

p {
  max-width: 68ch;
  color: var(--paper);
  font-size: 1.0625rem;
}

.text-muted { color: var(--muted); }
.text-accent { color: var(--fringe-b); }
.text-amber { color: var(--fringe-c); }

.eyebrow, .stat-label, .post-meta-mono {
  font-family: var(--font-utility);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fringe-b);
  display: inline-block;
  margin-bottom: 12px;
}

/* Article Typography System (Section 14 in Prompt) */
.single-article-content h2 {
  font-size: 1.85rem;
  margin: 40px 0 20px;
  color: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.single-article-content h3 {
  font-size: 1.4rem;
  margin: 32px 0 16px;
  color: #ffffff;
}

.single-article-content p {
  margin-bottom: 24px;
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--paper);
}

.single-article-content ul,
.single-article-content ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.single-article-content li {
  margin-bottom: 8px;
}

/* ==========================================================================
   5. LAYOUT & CONTAINERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--grid-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter-desktop);
  padding-right: var(--gutter-desktop);
}

@media (max-width: 1024px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-width: 767px) {
  .container {
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
  }
}

.section-padding {
  padding-top: var(--section-padding-desktop);
  padding-bottom: var(--section-padding-desktop);
}

@media (max-width: 767px) {
  .section-padding {
    padding-top: var(--section-padding-mobile) !important;
    padding-bottom: var(--section-padding-mobile) !important;
  }
}

/* ==========================================================================
   6. BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-height: 48px;
}

.btn-primary {
  background: var(--fringe-c);
  color: var(--void);
  box-shadow: 0 4px 20px rgba(242, 160, 61, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(242, 160, 61, 0.5);
  background: #f4ab51;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--paper);
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--fringe-b);
  color: #ffffff;
  background: rgba(18, 216, 196, 0.1);
  transform: translateY(-2px);
}

/* ==========================================================================
   7. HEADER & SLIDE-OVER MOBILE NAVIGATION DRAWER
   ========================================================================== */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  padding: 14px 0 !important;
  background: rgba(11, 10, 16, 0.95) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(237, 235, 242, 0.1) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

body.admin-bar .site-header {
  top: 32px !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px !important;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo .logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fringe-b);
  box-shadow: 0 0 8px var(--fringe-b);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.main-nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav li.current-menu-item > a {
  color: var(--fringe-b);
}

/* Mobile Hamburger Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10002;
  padding: 0;
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Mobile Navigation Slide-Over Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: rgba(11, 10, 16, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-left: 1px solid var(--border-subtle);
  z-index: 10001;
  transition: right 0.4s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
}

.mobile-nav-drawer.active {
  right: 0 !important;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-drawer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-drawer-nav a {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-drawer-nav a:hover {
  color: var(--fringe-b);
}

.drawer-footer-actions {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 991px) {
  .desktop-only-nav,
  .desktop-only-actions {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--slate);
  border-top: 1px solid var(--border-subtle);
  padding: 80px 0 40px;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
}

.footer-brand p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-title {
  font-family: var(--font-utility);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--paper);
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  display: inline-block;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--fringe-b);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--muted);
}

@media (max-width: 767px) {
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Floating WhatsApp Badge */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float svg {
  width: 26px !important;
  height: 26px !important;
  fill: currentColor;
}

/* ==========================================================================
   9. EXPLICIT MOBILE GRID OVERRIDES (100% Mobile Responsiveness)
   ========================================================================== */
@media (max-width: 767px) {
  .services-studio-grid,
  .why-grid,
  .methodology-clean-grid,
  .team-grid,
  .values-grid,
  .testimonials-grid,
  .blog-editorial-grid,
  .stats-grid,
  .deliverables-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .featured-article-card {
    grid-template-columns: 1fr !important;
    padding: 24px !important;
  }

  .interactive-edge-card {
    padding: 28px 20px !important;
  }

  .single-post-page .post-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .post-pagination-grid {
    grid-template-columns: 1fr !important;
  }
}
