/*
Theme Name: GHS
Theme URI: https://ghs.sa
Author: Gray Hat Security
Description: Custom theme for Gray Hat Security (GHS) and the ComplyOS product site. Tailwind CDN + custom design system, editable via WordPress admin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ghs
*/

html { scroll-behavior: smooth; }
body {
  background-color: #0a0510;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}
h1, h2, h3, h4, .font-display { font-family: 'Sora', sans-serif; }

::selection { background: #4f1964; color: #ffffff; }

/* Grain texture overlay */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-mesh {
  background:
    radial-gradient(ellipse 900px 500px at 12% -10%, rgba(230,175,252,0.16), transparent 60%),
    radial-gradient(ellipse 700px 600px at 100% 10%, rgba(79,25,100,0.55), transparent 55%),
    radial-gradient(ellipse 800px 500px at 50% 100%, rgba(79,25,100,0.35), transparent 60%),
    #0a0510;
}

.grid-overlay {
  background-image:
    linear-gradient(rgba(230,175,252,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,175,252,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 70% 30%, black, transparent 80%);
          mask-image: radial-gradient(ellipse 60% 60% at 70% 30%, black, transparent 80%);
}

.shadow-glow-sm {
  box-shadow: 0 4px 20px -4px rgba(79,25,100,0.5), 0 2px 8px -2px rgba(0,0,0,0.6);
}
.shadow-glow {
  box-shadow:
    0 20px 60px -15px rgba(79,25,100,0.55),
    0 8px 24px -8px rgba(0,0,0,0.7),
    0 0 0 1px rgba(230,175,252,0.06);
}
.shadow-glow-lg {
  box-shadow:
    0 30px 90px -20px rgba(79,25,100,0.65),
    0 10px 40px -10px rgba(0,0,0,0.8),
    0 0 60px -15px rgba(230,175,252,0.15);
}
.shadow-card {
  box-shadow:
    0 12px 32px -12px rgba(0,0,0,0.6),
    0 2px 8px -2px rgba(79,25,100,0.35),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.ease-spring { transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
.animate-float-slow { animation: float-slow 9s ease-in-out infinite; }

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.6; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
.animate-pulse-ring { animation: pulse-ring 3s ease-out infinite; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.animate-blink { animation: blink 1s step-start infinite; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-marquee { animation: marquee 28s linear infinite; }
.animate-marquee-slow { animation: marquee 55s linear infinite; }
.testimonial-marquee:hover .marquee-row { animation-play-state: paused; }

/* 404-page-only animations */
@keyframes spark {
  0%, 100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  10% { opacity: 1; transform: scale(1) rotate(10deg); }
  20% { opacity: 0; transform: scale(0.6) rotate(0deg); }
}
.animate-spark { animation: spark 2.4s ease-in-out infinite; }
.animate-spark-delay { animation: spark 2.4s ease-in-out infinite; animation-delay: 1.1s; }

@keyframes wobble {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
.animate-wobble { animation: wobble 3.2s ease-in-out infinite; transform-origin: top center; }

@keyframes drift {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.9; }
  100% { transform: translateY(60px) translateX(-16px) rotate(160deg); opacity: 0; }
}
.animate-drift { animation: drift 3s ease-in infinite; }

/* 404 page uses its own float-slow timing (bent/wobbly, not the calmer global one) */
.error-404-robot { animation: float-slow 5s ease-in-out infinite; }

.text-gradient {
  background: linear-gradient(90deg, #e6affc, #c98fe0 45%, #7c3596);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-link {
  position: relative;
  color: #d9c9e2;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%; height: 1.5px;
  background: linear-gradient(90deg, #e6affc, #4f1964);
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-link:hover { color: #ffffff; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: #ffffff; }
.nav-link.active::after { width: 100%; }

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 4px 20px -4px rgba(79,25,100,0.5), 0 0 16px 0 rgba(230,175,252,0.25); }
  50% { box-shadow: 0 4px 20px -4px rgba(79,25,100,0.5), 0 0 30px 4px rgba(230,175,252,0.5); }
}
.btn-primary {
  background: linear-gradient(135deg, #e6affc, #b478d6 55%, #7c3596);
  color: #1a0721;
  animation: glow-pulse 2.6s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 36px -6px rgba(230,175,252,0.6), 0 0 38px 6px rgba(230,175,252,0.5); animation-play-state: paused; }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:focus-visible { outline: 2px solid #e6affc; outline-offset: 3px; }

.btn-ghost {
  border: 1px solid rgba(230,175,252,0.28);
  color: #f2e6fb;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-ghost:hover { background-color: rgba(230,175,252,0.08); border-color: rgba(230,175,252,0.6); transform: translateY(-2px); box-shadow: 0 0 26px -4px rgba(230,175,252,0.4); }
.btn-ghost:active { transform: translateY(0); }
.btn-ghost:focus-visible { outline: 2px solid #e6affc; outline-offset: 3px; }
.btn-ghost.is-active {
  background-color: rgba(230,175,252,0.14);
  border-color: rgba(230,175,252,0.6);
  color: #ffffff;
  box-shadow: 0 0 20px -4px rgba(230,175,252,0.4);
}

.card-hover {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.card-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(230,175,252,0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card-hover:hover::before { opacity: 1; }
.card-hover:hover { transform: translateY(-6px); border-color: rgba(230,175,252,0.35); box-shadow: 0 16px 40px -14px rgba(0,0,0,0.6), 0 0 0 1px rgba(230,175,252,0.12); }

a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #e6affc; outline-offset: 2px; border-radius: 4px;
}

.img-treat { position: relative; }
.img-treat::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,5,16,0.85), rgba(79,25,100,0.15) 55%, transparent);
  mix-blend-mode: multiply;
}
.img-treat img { position: relative; }
.img-treat-black::after {
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.15) 55%, transparent);
}

input, textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(230,175,252,0.16);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
input:hover, textarea:hover { border-color: rgba(230,175,252,0.3); }
input:focus, textarea:focus { border-color: #e6affc; background: rgba(230,175,252,0.05); outline: none; }

.mobile-menu { transition: max-height 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease; }

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: rgba(230,175,252,0.08);
  border: 1px solid rgba(230,175,252,0.25);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #e6affc;
}

.service-anchor { scroll-margin-top: 100px; }

/* Legal pages (Terms / Privacy) */
.legal-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  color: #ffffff;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  color: #ffffff;
}
.legal-content p {
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 1.1rem;
}
.legal-content ul {
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 1.1rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.legal-content ul li { margin-bottom: 0.5rem; }
.legal-content a { color: #e6affc; text-decoration: underline; text-underline-offset: 2px; }
.legal-content a:hover { color: #f2e6fb; }
.legal-content strong { color: rgba(255,255,255,0.85); }

/* Blog post FAQ accordion */
.faq-item .faq-icon { transition: transform 0.25s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-item .faq-answer { display: none; }
.faq-item.open .faq-answer { display: block; }

/* Blog post comparison / key-facts tables */
.data-table th { background: #1e1029; }
.data-table tr:hover td { background: rgba(230,175,252,0.03); }
