/* ==========================================================================
   PROSOL — CORE DESIGN SYSTEM & STYLESHEET
   Apple + Tesla + High-End Architecture & Photovoltaic Engineering
   ========================================================================== */

:root {
  --bg-dark: #0A0A0A;
  --bg-surface: #111111;
  --bg-surface-elevated: #18191d;
  --bg-offwhite: #F4F4F6;
  --text-dark: #111111;
  --text-muted-dark: #66666E;
  --text-light: #F4F4F6;
  --text-muted-light: #8E8E96;
  
  /* PROSOL Strategic Accent (Rare & Intentional) */
  --prosol-orange: #F59E0B;
  --prosol-orange-deep: #EA580C;
  --prosol-orange-glow: rgba(245, 158, 11, 0.18);
  
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-light: rgba(0, 0, 0, 0.08);
  
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Typography Base */
body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

h1, h2, h3, .font-display {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: #0A0A0A;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--prosol-orange);
}

/* Grain Filter */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.02;
  background-image: 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");
}

/* Sticky Header */
#site-header {
  background-color: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s var(--ease-smooth), backdrop-filter 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth), padding 0.3s var(--ease-smooth);
}
#site-header.scrolled {
  background-color: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dark);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Page Transitions */
.page-transition-enter {
  opacity: 0;
  transform: translateY(10px);
}
.page-transition-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 280ms var(--ease-smooth), transform 280ms var(--ease-smooth);
}

/* Interactive Components */
.interactive-hover-zoom {
  overflow: hidden;
  transition: border-color 0.3s var(--ease-smooth);
}
.interactive-hover-zoom img {
  transition: transform 0.6s var(--ease-smooth);
}
.interactive-hover-zoom:hover img {
  transform: scale(1.04);
}

/* Light / Offwhite Section Transition */
.section-offwhite {
  background-color: var(--bg-offwhite);
  color: var(--text-dark);
}
.section-offwhite h2, .section-offwhite h3 {
  color: var(--text-dark);
}
.section-offwhite p {
  color: var(--text-muted-dark);
}

/* Accessibility Focus */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--prosol-orange);
  outline-offset: 3px;
}

/* ==========================================================================
   5 CINEMATIC FEATURES (Awwwards / Apple Standard)
   ========================================================================== */

/* 1. Infinite Tech & Compliance Marquee */
.marquee-wrapper {
  overflow: hidden;
  user-select: none;
  display: flex;
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
  min-width: 100%;
  animation: marquee-scroll 28s linear infinite;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
}

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

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* 2. Before / After Comparison Slider */
.comparison-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}

.comparison-before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #F59E0B;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7);
  z-index: 20;
  transform: translateX(-50%);
  pointer-events: none;
}

.comparison-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #0A0A0A;
  border: 2px solid #F59E0B;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F59E0B;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

/* 3. Mobile Sticky Conversion Pill */
#mobile-sticky-pill {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

#mobile-sticky-pill.pill-hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

#mobile-sticky-pill.pill-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-content {
    animation: none !important;
  }
}

