/*
Theme Name: JTG Neon Minimal
Author: Jonathan C. Smith (Jon Tha Geeks)
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.5
Text Domain: jtg-neon-min
*/

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Colors - Neon Palette */
  --brand-dark: #05070A;
  --brand-slate: #0B1220;
  --brand-teal: #00F5C8;
  --brand-emerald: #00C98F;
  --brand-magenta: #FF3D7F;
  --text: #EAFBF7;
  --text-muted: rgba(234, 251, 247, 0.7);
  
  /* Spacing (8px scale) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Typography */
  --font-system: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, monospace;
  
  /* Effects */
  --glow-teal: 0 0 20px rgba(0, 245, 200, 0.3);
  --glow-magenta: 0 0 20px rgba(255, 61, 127, 0.3);
  --glow-subtle: 0 0 40px rgba(0, 245, 200, 0.1);
  
  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-normal: 0.3s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);
  
  /* Layout */
  --container-max: 1200px;
  --container-wide: 1440px;
  --header-height: 70px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--brand-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-teal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-emerald);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 2px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  margin: 0 0 var(--space-sm);
}

.text-muted {
  color: var(--text-muted);
}

.text-teal {
  color: var(--brand-teal);
}

.text-magenta {
  color: var(--brand-magenta);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: var(--container-wide);
}

.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 1.75rem;
  font-size: 0.938rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-teal);
  color: var(--brand-dark);
}

.btn-primary:hover {
  background: var(--brand-emerald);
  color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--glow-teal);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(234, 251, 247, 0.2);
}

.btn-secondary:hover {
  border-color: var(--brand-teal);
  color: var(--brand-teal);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-teal);
  padding: 0.5rem 0;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-ghost::after {
  content: "→";
  margin-left: var(--space-xs);
  transition: transform var(--transition-fast);
}

.btn-ghost:hover::after {
  transform: translateX(4px);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: rgba(11, 18, 32, 0.6);
  border: 1px solid rgba(0, 245, 200, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: rgba(0, 245, 200, 0.25);
  box-shadow: var(--glow-subtle);
  transform: translateY(-4px);
}

.card-flat {
  background: transparent;
  border: none;
  box-shadow: none;
}

.card-flat:hover {
  transform: none;
  box-shadow: none;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 245, 200, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.site-logo:hover {
  color: var(--brand-teal);
}

.nav-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-lg);
}

.nav-menu a {
  color: var(--text-muted);
  font-size: 0.938rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-menu a:hover {
  color: var(--brand-teal);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition-fast);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--brand-dark);
  padding: var(--space-lg);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  z-index: 999;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav li {
  border-bottom: 1px solid rgba(0, 245, 200, 0.1);
}

.mobile-nav a {
  display: block;
  padding: var(--space-md) 0;
  font-size: 1.125rem;
  color: var(--text);
}

/* Desktop Nav */
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
  
  .menu-toggle,
  .mobile-nav {
    display: none;
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-height) + var(--space-2xl)) var(--space-md) var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* Hero Background Layers (Parallax) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 200, 0.15), transparent 70%);
  top: -200px;
  right: -200px;
  filter: blur(60px);
  animation: pulse 8s ease-in-out infinite;
}

.hero-bg::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 61, 127, 0.1), transparent 70%);
  bottom: -100px;
  left: -100px;
  filter: blur(60px);
  animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* ============================================
   GRID
   ============================================ */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: var(--space-2xl) 0 var(--space-lg);
  border-top: 1px solid rgba(0, 245, 200, 0.1);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-teal), var(--brand-magenta), transparent);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--brand-teal);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   ANIMATIONS - Scroll Reveal
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .fade-in:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .fade-in:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   CIRCUIT TRACE (Unique Feature)
   ============================================ */
.circuit-trace {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  pointer-events: none;
  z-index: 1;
}

.circuit-trace svg {
  width: 100%;
  height: 100%;
}

.circuit-trace path {
  fill: none;
  stroke: var(--brand-teal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  filter: drop-shadow(0 0 6px var(--brand-teal));
}

.circuit-trace.is-active path {
  animation: traceIn 1.5s var(--ease-out) forwards;
}

@keyframes traceIn {
  to { stroke-dashoffset: 0; }
}

/* Circuit dots */
.circuit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--brand-teal);
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  box-shadow: 0 0 12px var(--brand-teal);
  transition: transform 0.4s var(--ease-out);
}

.circuit-dot.is-visible {
  transform: translateX(-50%) scale(1);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   WOOCOMMERCE OVERRIDES
   ============================================ */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.woocommerce ul.products li.product {
  margin: 0;
  padding: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
  display: block;
}

.woocommerce ul.products li.product h2 {
  font-size: 1rem;
  margin-top: var(--space-sm);
}

.woocommerce ul.products li.product .price {
  color: var(--brand-teal);
  font-weight: 600;
}

.woocommerce .button,
.woocommerce button.button {
  background: var(--brand-teal) !important;
  color: var(--brand-dark) !important;
  border-radius: var(--radius-md) !important;
  font-weight: 500;
  transition: all var(--transition-normal);
}

.woocommerce .button:hover,
.woocommerce button.button:hover {
  background: var(--brand-emerald) !important;
  transform: translateY(-2px);
  box-shadow: var(--glow-teal);
}
