/* ============================================================
   HyvaMagento.com — Custom Styles (supplements Tailwind)
   ============================================================ */

/* ── Root variables ── */
:root {
  --color-primary: #7C3AED;
  --color-primary-light: #A78BFA;
  --color-accent: #F59E0B;
  --color-dark: #0F0A1E;
  --color-dark-2: #1A1035;
  --color-surface: #1E1540;
  --color-text: #E2D9F3;
  --color-muted: #8B7BB8;
  --gradient-hero: linear-gradient(135deg, #0F0A1E 0%, #1A1035 50%, #200D4E 100%);
  --gradient-card: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(167,139,250,0.06) 100%);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--color-dark);
  color: var(--color-text);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', sans-serif; }

/* ── Noise texture overlay ── */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* ── Gradient mesh blobs ── */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.35) 0%, transparent 70%);
  top: -150px;
  right: -100px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.2) 0%, transparent 70%);
  bottom: -50px;
  left: -80px;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, transparent 70%);
  top: 40%;
  left: 30%;
}

/* ── Navigation ── */
.nav-glass {
  background: rgba(15, 10, 30, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(167, 139, 250, 0.3);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(124, 58, 237, 0.55); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--color-primary-light);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(124, 58, 237, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover { background: rgba(124, 58, 237, 0.12); border-color: rgba(124, 58, 237, 0.7); color: #fff; }

/* ── Hero SVG Scene ── */
.hero-svg-scene {
  position: relative;
  width: 100%;
  max-width: 560px;
}

/* ── Service cards ── */
.service-card {
  background: var(--gradient-card);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s, box-shadow 0.35s;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.service-card:hover { transform: translateY(-6px); border-color: rgba(124, 58, 237, 0.5); box-shadow: 0 20px 60px rgba(124, 58, 237, 0.2); }
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(124,58,237,0.1));
  border: 1px solid rgba(124,58,237,0.3);
  margin-bottom: 1.25rem;
}

/* ── Process steps ── */
.process-step { position: relative; }

.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(167,139,250,0.1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  position: absolute;
  top: -0.75rem;
  left: 0;
}

/* ── Pricing cards ── */
.pricing-card {
  background: rgba(26, 16, 53, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 1.25rem;
  padding: 2.5rem;
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s;
}

.pricing-card.featured {
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(109,40,217,0.15));
  border-color: rgba(124, 58, 237, 0.6);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.3), 0 24px 64px rgba(124,58,237,0.25);
}

.pricing-card:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(124, 58, 237, 0.2); }

/* ── FAQ accordion ── */
.faq-item { border-bottom: 1px solid rgba(124, 58, 237, 0.15); }

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-answer.open { max-height: 300px; }

/* ── Testimonial cards ── */
.testimonial-card {
  background: rgba(30, 21, 64, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: transform 0.35s, box-shadow 0.35s;
}

.testimonial-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(124,58,237,0.15); }

/* ── Form ── */
.form-input {
  width: 100%;
  background: rgba(26, 16, 53, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 0.625rem;
  padding: 0.875rem 1.125rem;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder { color: rgba(139, 123, 184, 0.7); }
.form-input:focus { border-color: rgba(124, 58, 237, 0.7); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.form-input option { background: #1A1035; }

/* ── Stats strip ── */
.stat-item { text-align: center; padding: 1.5rem; }

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #A78BFA, #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* ── Section headings ── */
.section-eyebrow {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 40%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Grid lines background decoration ── */
.grid-lines-bg {
  background-image:
    linear-gradient(rgba(124,58,237,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Floating badge ── */
.floating-badge {
  position: absolute;
  background: rgba(15, 10, 30, 0.9);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  backdrop-filter: blur(12px);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ── Mobile menu ── */
.mobile-menu {
  background: rgba(15, 10, 30, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

/* ── Scroll indicator ── */
.scroll-line {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.scroll-mouse {
  width: 1.375rem;
  height: 2.125rem;
  border: 2px solid rgba(124,58,237,0.5);
  border-radius: 999px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 7px;
  background: rgba(124,58,237,0.8);
  border-radius: 3px;
  animation: scrollPulse 1.8s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(8px); }
}

/* ── SVG animations ── */
.orbit-ring {
  animation: orbitRotate 20s linear infinite;
  transform-origin: center;
}

.orbit-ring-rev {
  animation: orbitRotate 30s linear infinite reverse;
  transform-origin: center;
}

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pulse-glow { animation: pulseGlow 2.5s ease-in-out infinite; }

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; filter: blur(8px); }
  50% { opacity: 1; filter: blur(4px); }
}

.float-anim { animation: floatAnim 4s ease-in-out infinite; }

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.float-anim-slow { animation: floatAnim 6s ease-in-out infinite; }

/* ── Preloader ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-dark); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.8); }

/* ── Selection ── */
::selection { background: rgba(124,58,237,0.4); color: #fff; }

/* ── Gradient border util ── */
.gradient-border {
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(124,58,237,0.5), rgba(245,158,11,0.3));
  z-index: -1;
}

/* ── Tag pill ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  color: var(--color-primary-light);
}

/* ── Prose styles for legal pages ── */
.prose-style p { margin-bottom: 0; }
.prose-style h2 { margin-top: 0; }

/* ── Case study specific ── */
.case-study-card {
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .blob-1 { width: 400px; height: 400px; }
  .blob-2 { width: 280px; height: 280px; }
}

@media (max-width: 640px) {
  .stat-num { font-size: 2rem; }
  .hero-svg-scene { max-width: 340px; }
  .pricing-card { padding: 1.5rem; }
}

/* ── Print ── */
@media print {
  .noise-overlay, .blob-1, .blob-2, .blob-3, header, footer { display: none !important; }
  body { background: white; color: black; }
}
