@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&family=Space+Grotesk:wght@300;400;700&display=swap');

:root {
  --accent: #fbbf24;
  --accent-glow: rgba(251, 191, 36, 0.6);
}

html, body { height: 100%; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #000000;
  color: #ffffff;
  scroll-behavior: smooth;
  min-height: 100vh;
  margin: 0;
}

.perspective-container {
  perspective: 2000px;
  width: 100%;
}

.page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.page-inner {
  width: 100%;
  max-width: 520px;
  margin: auto;
}

h1, h2, h3, .brand-font { font-family: 'Space Grotesk', sans-serif; }

/* Ensure VFX scene sits behind all content */
nav, section, footer {
  position: relative;
  z-index: 10;
}

/* Enhanced Color Grading Overlay */
.color-grade-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 9998;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url('https://grainy-gradients.vercel.app/noise.svg');
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

/* Glass */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-gradient {
  background: radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.15) 0%, transparent 60%);
}

.text-glow { text-shadow: 0 0 30px var(--accent-glow); }

.yellow-gradient-text {
  background: linear-gradient(to right, #fbbf24, #f59e0b, #fef3c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.border-accent { border-color: var(--accent); }
.bg-accent { background-color: var(--accent); }

/* Nav underline */
.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent);
  transition: width 0.3s ease;
}
.nav-link:hover:after { width: 100%; }

/* Comparison slider */
.comparison-slider {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 50px 100px -20px rgba(0,0,0,0.7);
}

.comparison-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.image-after {
  width: 50%;
  border-right: 4px solid var(--accent);
  z-index: 10;
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  z-index: 20;
  transform: translateX(-50%);
  cursor: ew-resize;
}

.slider-handle::after {
  content: "↔";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: black;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Services hover (no text distortion) */
.card-hover { position: relative; }

.card-hover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(251,191,36,0.08), transparent 45%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.card-hover:hover::after { opacity: 1; }

/* Global VFX scene */
#vfxScene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  contain: layout paint;
  will-change: transform;
}

.vfx-obj {
  position: absolute;
  will-change: transform, translate;
  transform: translate3d(0,0,0);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.65));
  opacity: 0.75;
  backface-visibility: hidden;
}

.vfx-shape {
  width: var(--size, 260px);
  height: var(--size, 260px);
  border-radius: 999px;
}

@keyframes vfx-breathe {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.06); opacity: 0.9; }
}

@keyframes vfx-spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes vfx-float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-18px); }
}

.vfx-orb {
  background: radial-gradient(circle at 30% 30%, rgba(251,191,36,0.28), rgba(251,191,36,0.10) 35%, rgba(0,0,0,0) 70%);
  filter: blur(1px);
  animation: vfx-breathe 6s ease-in-out infinite;
  mix-blend-mode: screen;
}

.vfx-orb.soft {
  background: radial-gradient(circle at 40% 35%, rgba(251,191,36,0.18), rgba(251,191,36,0.06) 40%, rgba(0,0,0,0) 72%);
  animation-duration: 8s;
  mix-blend-mode: screen;
}

.vfx-ring {
  border-radius: 999px;
  background: conic-gradient(from 180deg,
    rgba(251,191,36,0.00),
    rgba(251,191,36,0.28),
    rgba(251,191,36,0.00),
    rgba(251,191,36,0.18),
    rgba(251,191,36,0.00)
  );
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%);
  mask: radial-gradient(circle, transparent 62%, #000 64%);
  animation: vfx-spin-slow 18s linear infinite;
  opacity: 0.65;
  mix-blend-mode: screen;
}

.vfx-cube {
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(251,191,36,0.02));
  border: 1px solid rgba(251,191,36,0.22);
  backdrop-filter: blur(8px);
  transform: rotate(18deg);
  animation: vfx-float-slow 7s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-20px) rotate(4deg); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-30px) rotate(-4deg); }
}

.floating { animation: float 6s ease-in-out infinite; }
.floating-slow { animation: float-slow 9s ease-in-out infinite; }

@keyframes grid-drift {
  0% { background-position: 0px 0px; }
  100% { background-position: 240px 180px; }
}

.vfx-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(251,191,36,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,191,36,0.05) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.16;
  mask-image: radial-gradient(circle at 50% 30%, rgba(0,0,0,1), rgba(0,0,0,0) 70%);
  animation: grid-drift 28s linear infinite;
}

@keyframes spark-twinkle {
  0%, 100% { opacity: 0.18; transform: scale(0.9); }
  50% { opacity: 0.65; transform: scale(1.15); }
}

.vfx-spark {
  width: var(--size, 10px);
  height: var(--size, 10px);
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(251,191,36,0.95), rgba(251,191,36,0.0) 70%);
  box-shadow: 0 0 22px rgba(251,191,36,0.16);
  mix-blend-mode: screen;
  opacity: 0.35;
  animation: spark-twinkle 3.4s ease-in-out infinite;
}

/* Scroll progress */
#scrollProgressWrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10030;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(6px);
}

@keyframes progress-glint {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

#scrollProgress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(251,191,36,0.8), rgba(254,243,199,0.95));
  box-shadow: 0 0 18px rgba(251,191,36,0.28);
  transform-origin: left;
  animation: progress-glint 2.2s ease-in-out infinite;
}

/* Ensure key CTAs remain clickable even with heavy overlays */
#getFreeAudit { position: relative; z-index: 50; pointer-events: auto; }

/* Primary CTA (Get Free Audit) - button version (no inline JS) */
.get-audit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 24px 48px;
  border-radius: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1.25rem;
  line-height: 1;
  background: var(--accent);
  color: #000;
  box-shadow: 0 10px 40px rgba(251,191,36,0.4);
  transition: transform 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.get-audit-btn:hover {
  background: #fff;
  transform: translateY(-4px);
  box-shadow: 0 14px 52px rgba(251,191,36,0.42);
}

.get-audit-btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Small helper toast (only used as a fallback if mailto is blocked) */
#auditToast {
  opacity: 0;
  transition: opacity 250ms ease;
}

/* Cursor-follow glow + ring + dot */
#cursorGlow {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 200ms ease;
}

#cursorGlow::before {
  content: '';
  position: absolute;
  pointer-events: none;
  left: -400px;
  top: -400px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle at center,
    rgba(251, 191, 36, 0.22) 0%,
    rgba(251, 191, 36, 0.12) 20%,
    rgba(251, 191, 36, 0.04) 45%,
    rgba(0, 0, 0, 0) 75%
  );
  filter: blur(10px);
  mix-blend-mode: screen;
}

#cursorGlow::after {
  content: '';
  position: absolute;
  pointer-events: none;
  left: -40px;
  top: -40px;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: radial-gradient(circle at center,
    rgba(251, 191, 36, 0.45) 0%,
    rgba(251, 191, 36, 0.25) 35%,
    rgba(251, 191, 36, 0.00) 75%
  );
  box-shadow:
    0 0 25px rgba(251, 191, 36, 0.45),
    0 0 60px rgba(251, 191, 36, 0.25);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
}

#cursorRing {
  position: fixed;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  border: 1px solid rgba(251,191,36,0.5);
  box-shadow: 0 0 30px rgba(251,191,36,0.3);
  backdrop-filter: blur(3px);
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 200ms ease;
}

@keyframes ring-pulse {
  0%, 100% { transform: translate3d(var(--rx, 0px), var(--ry, 0px), 0) scale(1); }
  50% { transform: translate3d(var(--rx, 0px), var(--ry, 0px), 0) scale(1.06); }
}

.ring-pulse { animation: ring-pulse 1.6s ease-in-out infinite; }

#cursorDot {
  position: fixed;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(251,191,36,0.95);
  box-shadow: 0 0 18px rgba(251,191,36,0.55);
  pointer-events: none;
  z-index: 100; /* Keep dot on top of everything for usability */
  opacity: 0;
  transform: translate3d(-50px, -50px, 0);
  transition: opacity 200ms ease;
}

/* 3D reveal */
.reveal-3d {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-3d.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pricing / growth hover subtle */
.pricing-card-3d, .growth-card-3d {
  transform-style: preserve-3d;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hero 3D canvas polish */
#hero3dContainer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

/* Project Vault */
.vault-scroll-container { will-change: transform; transition: transform 0.3s ease-out; }

.vault-card {
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.vault-card:hover {
  transform: scale(1.05) translateY(-10px);
  z-index: 30;
  box-shadow: 0 30px 60px -15px rgba(251, 191, 36, 0.4);
  border-color: var(--accent);
}

/* Services stagger layout */
.services-wrap { align-items: stretch; }

.services-stagger {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
}

.services-wrap > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

@media (min-width: 640px) {
  .services-wrap > a { width: 360px; }
}

@media (min-width: 1024px) {
  .services-wrap > a { width: 380px; }
}

@media (min-width: 768px) {
  .services-wrap > a { min-height: 560px; }
}

@media (min-width: 1024px) {
  .services-stagger {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    justify-items: center;
    align-items: stretch;
    column-gap: 2.5rem;
    row-gap: 2.5rem;
  }

  .services-stagger > a:nth-child(1) { grid-column: 1 / span 2; }
  .services-stagger > a:nth-child(2) { grid-column: 3 / span 2; }
  .services-stagger > a:nth-child(3) { grid-column: 5 / span 2; }
  .services-stagger > a:nth-child(4) { grid-column: 2 / span 2; }
  .services-stagger > a:nth-child(5) { grid-column: 4 / span 2; }
}

.services-wrap > a ul { flex: 1; }
.services-wrap > a > :last-child { margin-top: auto; }

@media (prefers-reduced-motion: reduce) {
  .vfx-orb, .vfx-ring, .vfx-cube, .ring-pulse { animation: none !important; }
}

/* Buttons used in sub-pages */
.btn {
  background: var(--accent);
  color: #000;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
}

/* Contact Sales: audit form submit button */
.audit-btn {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #000;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.audit-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 40px rgba(250, 204, 21, 0.55);
  filter: brightness(1.03);
}

/* Subpage layout helpers */
.nav { max-width: 80rem; margin: 0 auto; padding: 24px; }
.footer-inner { max-width: 80rem; margin: 0 auto; border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 24px; text-align: center; color: #9ca3af; }
.footer-inner a { color: var(--accent); margin-left: 8px; }

/* Contact Page Specific */
#auditForm input, #auditForm select, #auditForm textarea {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
#auditForm input:focus, #auditForm select:focus, #auditForm textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
    transform: translateY(-2px);
}
