/* ═══════════════════════════════════════════════════════════════
   CHIMADEV BRAND GUIDE OVERRIDES v1.0
   "Creative Systems, Intelligent Futures"
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Outfit:wght@100..900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Core Palette */
  --midnight-indigo: #1A1B3A;
  --neon-cyan: #00E5FF;
  --vibrant-purple: #7B3FF2;
  --warm-sand: #F5E9D7;

  /* Secondary Palette */
  --lime-pulse: #C6FF00;
  --tech-silver: #D9D9D9;
  --coral-spark: #FF6F61;

  /* Functional aliases */
  --bg-primary: var(--midnight-indigo);
  --bg-surface: #12132e;
  --bg-card: rgba(18, 19, 46, 0.7);
  --border-default: rgba(123, 63, 242, 0.2);
  --border-hover: var(--neon-cyan);
  --text-primary: var(--warm-sand);
  --text-secondary: var(--tech-silver);
  --text-muted: rgba(217, 217, 217, 0.6);
  --accent-primary: var(--neon-cyan);
  --accent-secondary: var(--vibrant-purple);

  /* Spacing Scale (px) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Transition */
  --transition-fast: 200ms ease;
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════════════════════
   BASE RESETS / BODY
   ══════════════════════════════════ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif !important;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ══════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════ */

/* Unified Typeface: JetBrains Mono — Headlines, Body, UI */
h1, h2 {
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: -0.02em;
  line-height: 1.15 !important;
}

h1 {
  font-weight: 800 !important;
  font-size: clamp(2.25rem, 5vw, 3.75rem) !important;
}

h2 {
  font-weight: 700 !important;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem) !important;
}

h3 {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

p, li, span, a, label, select, option, button, input, textarea {
  font-family: 'Outfit', sans-serif;
}

/* Code & Mono Elements */
.font-mono, code, pre, kbd, samp {
  font-family: 'JetBrains Mono', monospace !important;
}

/* ══════════════════════════════════
   COLOR SYSTEM OVERRIDES
   ══════════════════════════════════ */

/* Background overrides */
.bg-slate-950 {
  background-color: var(--bg-primary) !important;
}

.bg-slate-950\/80 {
  background-color: rgba(26, 27, 58, 0.85) !important;
}

.bg-slate-900 {
  background-color: var(--bg-surface) !important;
}

.bg-slate-900\/60 {
  background-color: var(--bg-card) !important;
}

.bg-slate-900\/40 {
  background-color: rgba(18, 19, 46, 0.5) !important;
}

.bg-slate-800 {
  background-color: var(--bg-surface) !important;
}

/* Text overrides */
.text-slate-100, .text-slate-50 {
  color: var(--warm-sand) !important;
}

.text-slate-200 {
  color: var(--tech-silver) !important;
}

.text-slate-300 {
  color: rgba(217, 217, 217, 0.8) !important;
}

.text-slate-400 {
  color: var(--text-muted) !important;
}

.text-slate-500 {
  color: rgba(217, 217, 217, 0.45) !important;
}

/* Accent color overrides — Neon Cyan replaces Tailwind cyan */
.text-cyan-400,
.text-cyan-300,
.text-cyan-200 {
  color: var(--neon-cyan) !important;
}

.bg-cyan-400 {
  background-color: var(--neon-cyan) !important;
}

.bg-cyan-400\/10,
.bg-cyan-400\/20 {
  background-color: rgba(0, 229, 255, 0.12) !important;
}

/* Violet / Purple overrides */
.text-violet-400 {
  color: var(--vibrant-purple) !important;
}

.bg-violet-400\/10 {
  background-color: rgba(123, 63, 242, 0.1) !important;
}

/* Rose → Coral Spark */
.text-rose-400 {
  color: var(--coral-spark) !important;
}

.bg-rose-400 {
  background-color: var(--coral-spark) !important;
}

.bg-rose-400\/10 {
  background-color: rgba(255, 111, 97, 0.1) !important;
}

/* Border overrides */
.border-slate-800 {
  border-color: var(--border-default) !important;
}

.border-slate-700 {
  border-color: rgba(123, 63, 242, 0.3) !important;
}

.border-cyan-400\/40 {
  border-color: rgba(0, 229, 255, 0.4) !important;
}

/* Shadow overrides */
.shadow-cyan-400\/30 {
  --tw-shadow-color: rgba(0, 229, 255, 0.25);
  --tw-shadow: var(--tw-shadow-colored);
}

/* ══════════════════════════════════
   HERO SECTION
   ══════════════════════════════════ */
#hero {
  position: relative;
}

#hero > .absolute.inset-0 {
  background: radial-gradient(ellipse at top left, rgba(0, 229, 255, 0.15), transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(123, 63, 242, 0.15), transparent 50%) !important;
}

/* Hero glow orbs → brand colors */
#hero .blur-3xl {
  background-color: rgba(0, 229, 255, 0.18) !important;
}

#hero .blur-3xl + .blur-3xl {
  background-color: rgba(123, 63, 242, 0.18) !important;
}

/* ══════════════════════════════════
   NAVIGATION
   ══════════════════════════════════ */
header.sticky {
  background-color: transparent !important;
  border-bottom-color: transparent !important;
  transition: background-color var(--transition-smooth),
              border-color var(--transition-smooth),
              backdrop-filter var(--transition-smooth);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

header.sticky.nav-scrolled {
  background-color: rgba(26, 27, 58, 0.92) !important;
  border-bottom-color: var(--border-default) !important;
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
}

/* Nav logo gradient */
header .bg-gradient-to-tr {
  background-image: linear-gradient(to top right, var(--neon-cyan), var(--vibrant-purple)) !important;
}

/* Nav links — neon underline effect */
header nav a {
  position: relative;
  transition: color var(--transition-fast);
}

header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--neon-cyan);
  transition: width var(--transition-smooth);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
  border-radius: 1px;
}

header nav a:hover::after {
  width: 100%;
}

header nav a:hover {
  color: var(--neon-cyan) !important;
}

/* Nav CTA button */
header a.bg-cyan-400[href="#contact"] {
  background: linear-gradient(135deg, var(--neon-cyan), var(--vibrant-purple)) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.25),
              0 0 40px rgba(123, 63, 242, 0.15);
  transition: all var(--transition-smooth);
}

header a.bg-cyan-400[href="#contact"]:hover {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.4),
              0 0 60px rgba(123, 63, 242, 0.25);
  transform: translateY(-1px);
}

/* ══════════════════════════════════
   MOBILE NAVIGATION
   ══════════════════════════════════ */
#mobile-nav aside {
  background-color: var(--bg-primary) !important;
  border-right-color: var(--border-default) !important;
}

#mobile-nav nav a {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 1.25rem !important;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
  transition: color var(--transition-fast);
}

#mobile-nav nav a:hover {
  color: var(--neon-cyan) !important;
}

#mobile-nav nav a::after {
  display: none;
}

#mobile-nav-overlay {
  background-color: rgba(10, 10, 30, 0.75) !important;
}

/* ══════════════════════════════════
   PRIMARY BUTTONS
   ══════════════════════════════════ */
a.bg-cyan-400,
button.bg-cyan-400 {
  background-color: var(--neon-cyan) !important;
  color: var(--midnight-indigo) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2),
              0 4px 12px rgba(0, 0, 0, 0.3);
}

a.bg-cyan-400:hover,
button.bg-cyan-400:hover {
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.45),
              0 0 50px rgba(0, 229, 255, 0.15),
              0 6px 20px rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-2px) scale(1.02);
}

/* ══════════════════════════════════
   SECONDARY BUTTONS (View services, etc.)
   ══════════════════════════════════ */
#hero a.border {
  border-color: var(--vibrant-purple) !important;
  color: var(--vibrant-purple) !important;
  border-radius: 8px !important;
  transition: all var(--transition-smooth);
}

#hero a.border:hover {
  border-color: var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25),
              inset 0 0 15px rgba(0, 229, 255, 0.05);
}

/* ══════════════════════════════════
   CARDS
   ══════════════════════════════════ */
.rounded-2xl.border,
.rounded-xl.border {
  background: linear-gradient(145deg, rgba(26, 27, 58, 0.4), rgba(18, 19, 46, 0.3)) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(123, 63, 242, 0.18) !important;
  transition: all var(--transition-smooth);
}

/* Service cards — lift + glow */
#services .rounded-2xl.border {
  transition: all var(--transition-smooth);
}

#services .rounded-2xl.border:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(0, 229, 255, 0.5) !important;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.12),
              0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Service card icon containers — brand accent on hover */
#services .group:hover .bg-cyan-400\/10 {
  background-color: var(--neon-cyan) !important;
}

#services .group:hover .bg-emerald-400\/10 {
  background-color: var(--vibrant-purple) !important;
}

#services .group:hover .bg-sky-400\/10 {
  background-color: var(--neon-cyan) !important;
}

#services .group:hover .bg-rose-400\/10 {
  background-color: var(--coral-spark) !important;
}

#services .group:hover .bg-violet-400\/10 {
  background-color: var(--vibrant-purple) !important;
}

/* ── Process flow ── */
#process .rounded-full.border {
  border-color: rgba(123, 63, 242, 0.3) !important;
  background-color: var(--bg-primary) !important;
  transition: all var(--transition-smooth);
}

#process .group:hover .rounded-full.border {
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
  border-color: rgba(0, 229, 255, 0.6) !important;
}

/* Process connecting line */
#process .bg-gradient-to-r {
  background-image: linear-gradient(to right, rgba(0, 229, 255, 0), rgba(123, 63, 242, 0.3), rgba(0, 229, 255, 0)) !important;
}

/* ══════════════════════════════════
   CASE STUDY CARDS
   ══════════════════════════════════ */
#case-studies article {
  border-left: 3px solid var(--vibrant-purple) !important;
  transition: all var(--transition-smooth);
}

#case-studies article:hover {
  border-left-color: var(--neon-cyan) !important;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.08);
}

/* ══════════════════════════════════
   TESTIMONIAL CARDS
   ══════════════════════════════════ */
#testimonials .rounded-2xl {
  border-color: rgba(123, 63, 242, 0.15) !important;
  position: relative;
  overflow: hidden;
}

#testimonials .rounded-2xl::before {
  content: '\201C';
  position: absolute;
  top: -10px;
  left: 16px;
  font-size: 5rem;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(0, 229, 255, 0.06);
  line-height: 1;
  pointer-events: none;
}

#testimonials .rounded-2xl:hover {
  border-color: rgba(0, 229, 255, 0.35) !important;
}

/* ══════════════════════════════════
   FAQ CARDS
   ══════════════════════════════════ */
#faq .rounded-2xl {
  transition: all var(--transition-smooth);
}

#faq .rounded-2xl:hover {
  border-color: rgba(0, 229, 255, 0.4) !important;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.06);
}

/* ══════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════ */
input:not([type="range"]),
textarea,
select {
  background-color: rgba(18, 19, 46, 0.8) !important;
  border-color: rgba(217, 217, 217, 0.2) !important;
  border-radius: 10px !important;
  color: var(--warm-sand) !important;
  font-family: 'JetBrains Mono', monospace !important;
  transition: all var(--transition-smooth);
}

input:not([type="range"]):focus,
textarea:focus,
select:focus {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15),
              0 0 15px rgba(0, 229, 255, 0.1) !important;
  outline: none !important;
}

/* Range slider */
input[type="range"] {
  accent-color: var(--neon-cyan) !important;
}

input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--neon-cyan), var(--vibrant-purple)) !important;
  border-radius: 999px;
  height: 6px;
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--neon-cyan);
  border: 2px solid var(--midnight-indigo);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
}

/* ══════════════════════════════════
   ROI CALCULATOR
   ══════════════════════════════════ */
#roi-calculator {
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-surface)) !important;
}

#roi-calculator .rounded-3xl {
  background: var(--bg-primary) !important;
  border-color: rgba(123, 63, 242, 0.25) !important;
}

/* ══════════════════════════════════
   CHATBOT WIDGET
   ══════════════════════════════════ */
#chatbot-toggle {
  background: linear-gradient(135deg, var(--neon-cyan), var(--vibrant-purple)) !important;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3),
              0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-smooth);
}

#chatbot-toggle:hover {
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.45),
              0 6px 20px rgba(0, 0, 0, 0.3);
  transform: scale(1.08);
}

#chatbot-window {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-default) !important;
  border-radius: 16px !important;
}

#chatbot-window .bg-slate-800 {
  background: linear-gradient(135deg, rgba(123, 63, 242, 0.15), rgba(0, 229, 255, 0.08)) !important;
}

/* ══════════════════════════════════
   FOOTER
   ══════════════════════════════════ */
footer {
  background-color: var(--bg-primary) !important;
  border-top-color: var(--border-default) !important;
}

/* ══════════════════════════════════
   SECTION BORDERS
   ══════════════════════════════════ */
section.border-t {
  border-top-color: var(--border-default) !important;
}

header.border-b {
  border-bottom-color: transparent !important;
}

/* ══════════════════════════════════
   DASHBOARD PANEL (Hero)
   ══════════════════════════════════ */
#hero .shadow-xl {
  background: linear-gradient(160deg, rgba(26, 27, 58, 0.85), rgba(18, 19, 46, 0.7)) !important;
  border-color: rgba(0, 229, 255, 0.15) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
              0 0 30px rgba(0, 229, 255, 0.05);
}

/* Dashboard stat cards */
#hero .rounded-xl.bg-slate-900 {
  background-color: rgba(18, 19, 46, 0.9) !important;
  border-color: rgba(123, 63, 242, 0.15) !important;
}

/* Activity bar gradient */
.bg-gradient-to-r.from-cyan-400.to-emerald-400,
.bg-gradient-to-r.from-cyan-400 {
  background-image: linear-gradient(to right, var(--neon-cyan), var(--vibrant-purple)) !important;
}

/* Pill Badge (Hero) */
.rounded-full.border.border-cyan-400\/40 {
  border-color: rgba(0, 229, 255, 0.3) !important;
  background: rgba(0, 229, 255, 0.05) !important;
}

.animate-pulse.bg-emerald-400,
.animate-pulse.bg-emerald-500 {
  background-color: var(--neon-cyan) !important;
}

/* ═══════════════════════════════════════
   MOTION & INTERACTION SYSTEM
   ═══════════════════════════════════════ */

/* Button glow keyframe */
@keyframes neonGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 229, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 25px rgba(0, 229, 255, 0.35), 0 4px 20px rgba(0, 0, 0, 0.3); }
}

/* Card border pulse */
@keyframes borderPulse {
  0%, 100% { border-color: rgba(123, 63, 242, 0.18); }
  50% { border-color: rgba(0, 229, 255, 0.35); }
}

/* Section reveal — slide up */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Neon streak */
@keyframes neonStreak {
  0% { left: -100%; opacity: 0; }
  50% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Section reveal classes */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Icon subtle hover flicker */
#services .group:hover svg {
  animation: iconFlicker 0.3s ease;
}

@keyframes iconFlicker {
  0%, 100% { opacity: 1; }
  30% { opacity: 0.7; }
  60% { opacity: 1; }
}

/* Tech stack cards animation */
#about .rounded-xl.border:hover {
  animation: borderPulse 2s ease infinite;
}

/* ═══════════════════════════════════════
   LAYOUT REFINEMENTS
   ═══════════════════════════════════════ */

/* Hero wider container */
#hero .max-w-6xl {
  max-width: 1440px !important;
}

/* Content sections */
#about .max-w-6xl,
#services .max-w-6xl,
#case-studies .max-w-6xl,
#testimonials .max-w-6xl,
#faq .max-w-6xl,
#contact .max-w-6xl {
  max-width: 1200px !important;
}

/* Generous vertical spacing on larger viewports */
@media (min-width: 768px) {
  section .py-16 {
    padding-top: var(--space-4xl) !important;
    padding-bottom: var(--space-4xl) !important;
  }
}



/* ═══════════════════════════════════════
   SCROLLBAR STYLING
   ═══════════════════════════════════════ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(123, 63, 242, 0.3);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--vibrant-purple);
}

/* ═══════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Focus visible ring */
*:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════
   TECH STACK SHUFFLE ANIMATION
   ═══════════════════════════════════════ */

/* Each tool card transitions opacity + scale smoothly */
#tech-stack-grid > div {
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

/* Phase 1 — cards fade out and shrink before re-ordering */
#tech-stack-grid > div.tech-card-shuffling {
  opacity: 0;
  transform: scale(0.82) translateY(6px);
}

/* Phase 2 — cards fade back in after DOM re-order */
#tech-stack-grid > div.tech-card-shuffle-in {
  animation: techCardIn 350ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes techCardIn {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Stagger delay helpers (applied by JS via inline style) */

/* Accessibility — skip animation entirely if user prefers */
@media (prefers-reduced-motion: reduce) {
  #tech-stack-grid > div,
  #tech-stack-grid > div.tech-card-shuffling,
  #tech-stack-grid > div.tech-card-shuffle-in {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

