/* ============================================
   Innocrazy — Custom Styles
   ============================================ */

:root {
  --primary: #d2bbff;
  --primary-container: #7c3aed;
  --on-primary: #3f008e;
  --on-primary-container: #ede0ff;
  --secondary: #89ceff;
  --secondary-container: #00a2e6;
  --tertiary: #ffafd3;
  --tertiary-container: #ae397b;
  --surface: #0b1326;
  --surface-dim: #0b1326;
  --surface-bright: #31394d;
  --surface-container: #171f33;
  --surface-container-low: #131b2e;
  --surface-container-lowest: #060e20;
  --surface-container-high: #222a3d;
  --surface-container-highest: #2d3449;
  --on-surface: #dae2fd;
  --on-surface-variant: #ccc3d8;
  --outline: #958da1;
  --outline-variant: #4a4455;
  --background: #0b1326;
  --on-background: #dae2fd;
  --error: #ffb4ab;
  --error-container: #93000a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #020617;
  color: var(--on-surface);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: var(--primary-container); border-radius: 3px; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* ---- Glass Nav ---- */
.glass-nav {
  background: rgba(11, 19, 38, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---- Neural gradient blob ---- */
.neural-gradient {
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.18) 0%, transparent 70%);
}

/* ---- Gradient border button ---- */
.gradient-border-btn {
  position: relative;
  background: transparent;
  z-index: 1;
  cursor: pointer;
}

.gradient-border-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1.5px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---- Bento Card ---- */
.bento-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  position: relative;
}

.bento-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(210, 187, 255, 0.04),
    transparent 40%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.bento-card:hover {
  border-color: rgba(210, 187, 255, 0.35);
  box-shadow: 0 0 30px 0 rgba(210, 187, 255, 0.1);
  transform: translateY(-4px);
}

/* ---- Floating animation ---- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

.animate-float { animation: float 7s ease-in-out infinite; }

/* ---- Fade-in-up ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* ---- Marquee (brand strip) ---- */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}

.marquee-track:hover { animation-play-state: paused; }

/* ---- Counter number ---- */
.stat-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---- Gradient text ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Nav underline hover ---- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

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

/* ---- Mobile menu ---- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

#mobile-menu.open { max-height: 400px; }

/* ---- Testimonial dots ---- */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--outline-variant);
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease;
}

.dot.active {
  background: var(--primary);
  width: 24px;
}

/* ---- Back-to-top ---- */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary-container);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.4);
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Form inputs ---- */
.form-input {
  background: #1a2236 !important;
  border: 1px solid var(--outline-variant) !important;
  border-radius: 12px;
  color: #dae2fd !important;
  padding: 0.875rem 1.25rem;
  width: 100%;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input option {
  background: #171f33;
  color: var(--on-surface);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(210, 187, 255, 0.12);
}

.form-input::placeholder { color: var(--outline); }

/* ---- Responsive helpers ---- */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ============================================
   Light Theme
   ============================================ */

html.light {
  --primary: #6d28d9;
  --primary-container: #7c3aed;
  --on-primary: #ffffff;
  --on-primary-container: #3b0070;
  --secondary: #0077b6;
  --secondary-container: #0090d0;
  --tertiary: #b5004f;
  --tertiary-container: #c2185b;
  --surface: #ffffff;
  --surface-dim: #e4e8f7;
  --surface-bright: #ffffff;
  --surface-container: #eef2ff;
  --surface-container-low: #f2f5ff;
  --surface-container-lowest: #f6f8ff;
  --surface-container-high: #e8eeff;
  --surface-container-highest: #e2e8ff;
  --on-surface: #1a1a2e;
  --on-surface-variant: #4a4060;
  --outline: #7a7389;
  --outline-variant: #c8c2d4;
  --background: #f8faff;
  --on-background: #1a1a2e;
}

html.light body {
  background-color: #f8faff;
  color: #1a1a2e;
}

html.light ::-webkit-scrollbar-track { background: #f8faff; }
html.light ::-webkit-scrollbar-thumb { background: #7c3aed; }

/* Nav */
html.light .glass-nav {
  background: rgba(248, 250, 255, 0.90) !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

/* Cards */
html.light .bento-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
html.light .bento-card:hover {
  border-color: rgba(109, 40, 217, 0.35);
  box-shadow: 0 0 30px 0 rgba(109, 40, 217, 0.10);
}

/* Card with dark inline gradient (WhatsApp card) */
html.light .whatsapp-sms-card {
  background: linear-gradient(135deg, #eef2ff, #e8eeff) !important;
}

/* CTA inner card */
html.light .cta-inner-card {
  background: linear-gradient(135deg, rgba(240,244,255,0.97), rgba(232,238,255,0.97)) !important;
  border-color: rgba(109, 40, 217, 0.15) !important;
}

/* Gradient blobs — lighter in light mode */
html.light .neural-gradient {
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.07) 0%, transparent 70%);
}

/* Logo: dark silhouette instead of white */
html.light .logo-img {
  filter: brightness(0) !important;
}

/* Marquee edge fades match light background */
html.light .marquee-fade-left {
  background: linear-gradient(to right, #f8faff, transparent) !important;
}
html.light .marquee-fade-right {
  background: linear-gradient(to left, #f8faff, transparent) !important;
}

/* Form inputs */
html.light .form-input {
  background: #f2f5ff !important;
  color: #1a1a2e !important;
  border-color: #c8c2d4 !important;
}
html.light .form-input::placeholder { color: #7a7389 !important; }
html.light .form-input option {
  background: #eef2ff;
  color: #1a1a2e;
}
html.light .form-input:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.10) !important;
}

/* Footer heading */
html.light footer h5 { color: #1a1a2e !important; }

/* White/opacity utility classes become dark/opacity in light mode */
html.light [class*="bg-white/5"],
html.light [class*="bg-white\/5"] { background-color: rgba(0, 0, 0, 0.05) !important; }
html.light [class*="bg-white/10"],
html.light [class*="bg-white\/10"] { background-color: rgba(0, 0, 0, 0.07) !important; }
html.light [class*="border-white/5"],
html.light [class*="border-white\/5"] { border-color: rgba(0, 0, 0, 0.07) !important; }
html.light [class*="border-white/10"],
html.light [class*="border-white\/10"] { border-color: rgba(0, 0, 0, 0.10) !important; }

/* Theme toggle button hover */
html.light .theme-toggle-btn:hover { background: rgba(0, 0, 0, 0.07); }

/* Smooth transitions on theme switch */
body,
.glass-nav,
.bento-card,
.form-input,
header,
footer { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
