/* ==========================================================================
   RESOLVIA — BRAND DESIGN SYSTEM & GLOBAL CSS TOKENS
   Theme Custom Properties (Dark Mode default, Light Mode support)
   ========================================================================== */

:root {
  /* Dark Mode Default Theme Tokens */
  --bg-dark: #020512;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.7);
  --bg-card-solid: #0f172a;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(59, 130, 246, 0.3);
  --border-subtle: rgba(255, 255, 255, 0.05);

  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-glow: rgba(59, 130, 246, 0.35);
  
  --color-cyan: #38bdf8;
  --color-emerald: #10b981;
  --color-rose: #f43f5e;

  /* Typography */
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

  /* Borders & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.25);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode Overrides (Seamless Pure White Canvas) */
[data-theme="light"] {
  --bg-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-card-solid: #ffffff;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --border-glass: rgba(15, 23, 42, 0.08);
  --border-glass-hover: rgba(59, 130, 246, 0.4);
  --border-subtle: rgba(15, 23, 42, 0.06);

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.15);
}

/* Base Styles & Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* The desktop layout was designed and reviewed at 80% browser zoom. */
@media (min-width: 769px) {
  html {
    zoom: 0.8;
  }
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Universal Mobile-Native Press Feedback (:active scale 0.96) */
button, .btn, .service-card, .result-card, .archetype-card, .faq-question, .pipeline-tab-btn, .comparison-toggle-btn, .mobile-nav-link {
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

button:active, .btn:active, .service-card:active, .result-card:active, .archetype-card:active, .faq-question:active, .pipeline-tab-btn:active, .comparison-toggle-btn:active, .mobile-nav-link:active {
  transform: scale(0.96) !important;
}

/* Accessibility: Prefers Reduced Motion Fallbacks */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll, .reveal-scale, .reveal-slide-left, .reveal-blur {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* Full Viewport Smooth Radial Lighting (NO CUTOFF / NO HORIZONTAL LINE) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(100% 60% at 50% 0%, rgba(37, 99, 235, 0.15) 0%, rgba(56, 189, 248, 0.03) 50%, rgba(2, 5, 18, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

[data-theme="light"] body::before {
  display: none !important; /* Disabled in light mode for 100% flat pure white background */
}

/* Top Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6 0%, #38bdf8 50%, #10b981 100%);
  width: 0%;
  z-index: 10000;
  transition: width 0.1s ease-out;
}

/* Ambient Mouse Spotlight */
#mouse-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  margin-top: -300px;
  margin-left: -300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, rgba(56, 189, 248, 0.02) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] #mouse-spotlight {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
}

/* Subtle 1% Film Grain Overlay */
.bg-noise-grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.015;
  pointer-events: none;
  z-index: 9998;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center {
  text-align: center;
}

.section-padding {
  padding: 6rem 0;
}

/* Section Header Typography */
.section-header {
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--color-cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

[data-theme="light"] .section-badge {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
  color: #2563eb;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.gradient-text-primary {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
