/*
 * Opinion Printing — Premium Design System
 * Theme: Dark (default) + Light toggle
 * Font: Inter
 */

/* ══════════════════════════════════════
   Theme Variables
   ══════════════════════════════════════ */

:root {
  --bg: #08101E;
  --bg-card: #0D1528;
  --bg-deep: #060C18;
  --heading: #FFFFFF;
  --body: #A0AECB;
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.04);
}

:root.light {
  --bg: #FAF8F5;
  --bg-card: #F3F0EB;
  --bg-deep: #EBE7E1;
  --heading: #1C1917;
  --body: #57534E;
  --border: rgba(28, 25, 23, 0.08);
  --border-light: rgba(28, 25, 23, 0.04);
}

/* ══════════════════════════════════════
   Light Theme — Color Overrides
   ══════════════════════════════════════ */

/* Text white → warm dark heading */
.light .text-white { color: var(--heading); }
.light .text-white\/90 { color: rgba(28, 25, 23, 0.9); }
.light .text-white\/80 { color: rgba(28, 25, 23, 0.8); }
.light .text-white\/70 { color: rgba(28, 25, 23, 0.7); }
.light .text-white\/60 { color: rgba(28, 25, 23, 0.6); }
.light .text-white\/50 { color: rgba(28, 25, 23, 0.5); }
.light .text-white\/40 { color: rgba(28, 25, 23, 0.4); }
.light .text-white\/30 { color: rgba(28, 25, 23, 0.3); }
.light .text-white\/20 { color: rgba(28, 25, 23, 0.2); }
.light .text-white\/15 { color: rgba(28, 25, 23, 0.15); }

/* Keep white text on accent-colored backgrounds */
.light .bg-\[\#3B82F6\].text-white,
.light .bg-\[\#3B82F6\] .text-white,
.light .bg-\[\#3B82F6\] { color: #FFFFFF; }
.light .bg-\[\#2563EB\].text-white,
.light .bg-\[\#2563EB\] .text-white { color: #FFFFFF; }

/* Hover text overrides */
.light .hover\:text-white:hover { color: var(--heading); }
.light .hover\:text-\[\#3B82F6\]:hover { color: #2563EB; }

/* Background white-opacity → black-opacity */
.light .hover\:bg-white\/\[0\.04\]:hover { background-color: rgba(0, 0, 0, 0.04); }
.light .hover\:bg-white\/5:hover { background-color: rgba(0, 0, 0, 0.05); }
.light .bg-white\/\[0\.04\] { background-color: rgba(0, 0, 0, 0.04); }

/* Shadows — softer in light mode */
.light .shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12) !important; }
.light .shadow-black\/50 { --tw-shadow-color: rgba(0, 0, 0, 0.08); }
.light .shadow-black\/20 { --tw-shadow-color: rgba(0, 0, 0, 0.04); }

/* ══════════════════════════════════════
   Grain Overlay
   ══════════════════════════════════════ */

.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  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: 256px 256px;
}
.light .grain::before {
  opacity: 0.012;
}

/* ══════════════════════════════════════
   Display Font Utility
   ══════════════════════════════════════ */

.font-display {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
}

/* ══════════════════════════════════════
   Accent Glow
   ══════════════════════════════════════ */

.glow-accent {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15), 0 0 60px rgba(59, 130, 246, 0.05);
}
.glow-accent-strong {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.25), 0 0 80px rgba(59, 130, 246, 0.1), 0 0 120px rgba(59, 130, 246, 0.05);
}

/* ══════════════════════════════════════
   Text Gradient
   ══════════════════════════════════════ */

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #C8D5E6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.light .text-gradient {
  background: linear-gradient(135deg, #1C1917 0%, #44403C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-accent {
  background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════
   Mesh Gradient Backgrounds
   ══════════════════════════════════════ */

.mesh-dark {
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59, 130, 246, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 50% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 60%),
    var(--bg);
}
.light .mesh-dark {
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59, 130, 246, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(99, 102, 241, 0.02) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 50% 80%, rgba(59, 130, 246, 0.02) 0%, transparent 60%),
    var(--bg);
}

.mesh-elevated {
  background:
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 70%, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
    var(--bg-card);
}
.light .mesh-elevated {
  background:
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(59, 130, 246, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 70%, rgba(99, 102, 241, 0.02) 0%, transparent 60%),
    var(--bg-card);
}

/* ══════════════════════════════════════
   Divider Gradient
   ══════════════════════════════════════ */

.divider-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}
.light .divider-gradient {
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.15), transparent);
}

/* ══════════════════════════════════════
   Card Hover Lift
   ══════════════════════════════════════ */

.card-lift {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(59, 130, 246, 0.08);
}
.light .card-lift:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06), 0 0 30px rgba(59, 130, 246, 0.04);
}

/* ══════════════════════════════════════
   Animated Underline Links
   ══════════════════════════════════════ */

.link-underline {
  position: relative;
}
.link-underline::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #3B82F6;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.link-underline:hover::after {
  width: 100%;
}

/* ══════════════════════════════════════
   Stagger Animation Delays
   ══════════════════════════════════════ */

.stagger-1 { transition-delay: 0ms !important; }
.stagger-2 { transition-delay: 100ms !important; }
.stagger-3 { transition-delay: 200ms !important; }
.stagger-4 { transition-delay: 300ms !important; }
.stagger-5 { transition-delay: 400ms !important; }
.stagger-6 { transition-delay: 500ms !important; }

/* ══════════════════════════════════════
   Pulse Glow Animation
   ══════════════════════════════════════ */

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* ══════════════════════════════════════
   Marquee Animation
   ══════════════════════════════════════ */

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.animate-marquee {
  animation: marquee 30s linear infinite;
}

/* ══════════════════════════════════════
   Button Outline Gradient
   ══════════════════════════════════════ */

.btn-outline-gradient {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  background-image: linear-gradient(var(--bg), var(--bg)), linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(59, 130, 246, 0.1));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-outline-gradient:hover {
  background-image: linear-gradient(var(--bg-card), var(--bg-card)), linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(59, 130, 246, 0.3));
}

/* ══════════════════════════════════════
   Stat Bar Accent
   ══════════════════════════════════════ */

.stat-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3B82F6, transparent);
}

/* ══════════════════════════════════════
   Navbar Scroll State
   ══════════════════════════════════════ */

.navbar-scrolled {
  background-color: rgba(8, 16, 30, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.light .navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ══════════════════════════════════════
   Product Filter Buttons
   ══════════════════════════════════════ */

.filter-btn {
  width: 100%;
  text-align: left;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s, background-color 0.15s;
}
.filter-btn-active {
  background-color: #3B82F6;
  color: #FFFFFF;
}
.filter-btn-inactive {
  color: var(--body);
  opacity: 0.7;
}
.filter-btn-inactive:hover {
  color: var(--heading);
  background-color: rgba(128, 128, 128, 0.06);
  opacity: 1;
}

/* ══════════════════════════════════════
   Scrollbar
   ══════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.5); }
