/**
 * LENS Ecosystem Design System
 * Modern, High-End, Fully Responsive Design System (Vanilla CSS)
 */

:root {
  /* Brand Palette (Derived directly from official LENS Ecosystem Logo) */
  --lens-navy: #0d3b66;         /* Ocean Foundation Blue (open book base) */
  --lens-navy-deep: #072448;
  --lens-navy-light: #1e40af;
  --lens-blue-accent: #0284c7;  /* Sky Blue / Upward Arrow */
  --lens-teal: #0d9488;
  --lens-green: #16a34a;        /* Growth Leaf Green (central seedling & top figure) */
  --lens-green-light: #22c55e;
  --lens-gold: #f59e0b;         /* Rising Sun Gold / Golden Rays */
  --lens-gold-light: #fbbf24;
  --lens-coral: #ea580c;        /* Warm Sunset Orange (right community figure) */
  --lens-orange: #ea580c;

  /* Neutral Spectrum */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;

  /* Semantic */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-light: #e2e8f0;
  --border-subtle: rgba(226, 232, 240, 0.8);

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.1), 0 1px 2px -1px rgba(15, 23, 42, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.2);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Alpine Cloak to avoid FOUC */
[x-cloak] {
  display: none !important;
}

/* Smooth Scrolling & Custom Scrollbar */
html {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--slate-100);
}

::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--lens-navy);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--lens-blue-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--lens-navy-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-sm {
  max-width: 800px;
}

.section-py {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-py-sm {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Section Header Component */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background-color: rgba(37, 99, 235, 0.08);
  color: var(--lens-blue-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.section-tag--gold {
  background-color: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.section-tag--green {
  background-color: rgba(16, 117, 78, 0.1);
  color: var(--lens-green);
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--lens-navy) 0%, var(--lens-navy-light) 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(13, 33, 63, 0.25);
}

.btn-primary:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 33, 63, 0.35);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--lens-gold) 0%, #e88d05 100%);
  color: var(--slate-900);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-secondary:hover {
  color: var(--slate-900);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

.btn-outline {
  background: transparent;
  border-color: var(--slate-300);
  color: var(--lens-navy);
}

.btn-outline:hover {
  background: var(--slate-100);
  border-color: var(--slate-400);
}

.btn-outline-white {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--slate-700);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--lens-navy);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-primary { background: rgba(37, 99, 235, 0.1); color: var(--lens-blue-accent); }
.badge-green { background: rgba(16, 117, 78, 0.1); color: var(--lens-green); }
.badge-gold { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-gray { background: var(--slate-200); color: var(--slate-700); }

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--slate-900);
  background-color: var(--white);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--lens-blue-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* Flash Messages */
.flash-messages {
  position: sticky;
  top: 72px;
  z-index: 100;
  padding: 0.75rem 0;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 0.5rem;
}

.flash--success {
  background: #ecfdf5;
  color: #065f46;
  border-left: 4px solid var(--lens-green);
}

.flash--error {
  background: #fef2f2;
  color: #991b1b;
  border-left: 4px solid var(--lens-coral);
}

.flash--warning {
  background: #fffbeb;
  color: #92400e;
  border-left: 4px solid var(--lens-gold);
}

.flash__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: currentColor;
  opacity: 0.7;
}

.flash__close:hover {
  opacity: 1;
}

/* Glassmorphism helpers */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-dark {
  background: rgba(13, 33, 63, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE GRID SYSTEM
   ═══════════════════════════════════════════════════════ */
.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.grid-2-cols--wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .grid-2-cols--wide {
    grid-template-columns: 1.35fr 1fr;
    gap: 3rem;
    align-items: start;
  }
}

.grid-3-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .grid-3-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3-cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* ═══════════════════════════════════════════════════════
   TRANSITION & ALPINE INTERACTION UTILITIES
   ═══════════════════════════════════════════════════════ */
.transition {
  transition-property: color, background-color, border-color, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

.duration-150 { transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-250 { transition-duration: 250ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }

.transform {
  transform: translate(var(--tw-translate-x, 0), var(--tw-translate-y, 0)) scale(var(--tw-scale, 1));
}

.translate-x-0 { --tw-translate-x: 0px; }
.translate-x-full { --tw-translate-x: 100%; }
.-translate-x-full { --tw-translate-x: -100%; }

.translate-y-0 { --tw-translate-y: 0px; }
.translate-y-2 { --tw-translate-y: 0.5rem; }
.-translate-y-2 { --tw-translate-y: -0.5rem; }
.-translate-y-4 { --tw-translate-y: -1rem; }

.scale-95 { --tw-scale: 0.95; }
.scale-100 { --tw-scale: 1; }

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITY & TOUCH OPTIMIZATIONS
   ═══════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--lens-blue-accent);
  outline-offset: 2px;
}

@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;
  }
}

/* ═══════════════════════════════════════════════════════
   SLOW MOTION KEYFRAMES & PREMIUM INTERACTIVE UTILITIES
   ═══════════════════════════════════════════════════════ */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.4deg);
  }
}

@keyframes floatReverseSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(8px) rotate(-0.4deg);
  }
}

@keyframes pulseGlowSlow {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.28;
    transform: scale(1.05);
  }
}

.animate-float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.animate-float-reverse {
  animation: floatReverseSlow 7.5s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulseGlowSlow 8s ease-in-out infinite;
}

/* Smooth slow-motion hover elevation */
.card-hover-slow {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease;
}

.card-hover-slow:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px -10px rgba(13, 59, 102, 0.12);
}

/* Hardened opaque dropdown guarantee */
.nav-dropdown-panel,
header nav .relative > div[x-show="open"],
header .relative > div[x-show="open"] {
  background-color: #ffffff !important;
  background: #ffffff !important;
  opacity: 1 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}


