/* ========================================
   CRYSTAL COMMUTE - PREMIUM THEME SYSTEM
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&family=Space+Mono:wght@400;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Light Theme Colors */
  --cc-primary: #00D966;
  --cc-primary-dark: #00B855;
  --cc-accent: #FF6B35;
  --cc-accent-dark: #E55A24;
  --cc-bg: #FAFBFC;
  --cc-bg-alt: #F0F2F5;
  --cc-surface: #FFFFFF;
  --cc-text: #1A202C;
  --cc-text-muted: #626D7D;
  --cc-border: #E2E8F0;
  --cc-border-light: #F0F4F8;

  /* Shadows */
  --cc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --cc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --cc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --cc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Dark Theme Colors */
  --cc-primary: #00FF7F;
  --cc-primary-dark: #00DD6B;
  --cc-accent: #FF8C42;
  --cc-accent-dark: #F07A2E;
  --cc-bg: #0F1117;
  --cc-bg-alt: #161B22;
  --cc-surface: #1C2128;
  --cc-text: #E8EAED;
  --cc-text-muted: #8B949E;
  --cc-border: #30363D;
  --cc-border-light: #21262D;

  /* Shadows - Dark */
  --cc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --cc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --cc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--cc-text);
  background-color: var(--cc-bg);
  font-size: 16px;
  line-height: 1.6;
  transition: var(--cc-transition);
}

h1, h2, h3, h4, h5, h6,
.heading-display, .heading-lg, .heading-md {
  font-family: 'Clash Display', 'Space Mono', monospace;
  font-weight: 700;
  line-height: 1.2;
  color: var(--cc-text);
  transition: var(--cc-transition);
}

h1, .heading-display {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2, .heading-lg {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
}

h3, .heading-md {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
}

h4, h5, h6 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  color: var(--cc-text);
  line-height: 1.8;
}

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

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--cc-text-muted);
}

/* ========================================
   LAYOUT & SPACING
   ======================================== */

main {
  min-height: calc(100vh - 300px);
}

section {
  scroll-margin-top: 80px;
}

.container {
  max-width: 1280px;
}

/* Padding utilities */
.py-xs { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-sm { padding-top: 1rem; padding-bottom: 1rem; }
.py-md { padding-top: 2rem; padding-bottom: 2rem; }
.py-lg { padding-top: 3rem; padding-bottom: 3rem; }
.py-xl { padding-top: 4rem; padding-bottom: 4rem; }

/* ========================================
   BENTO GRID SYSTEM
   ======================================== */

.bento-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  animation: slideInFade 0.6s ease-out;
}

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

  .bento-item {
    grid-column: span 2;
  }

  .bento-item.span-2x2 {
    grid-column: span 4;
    grid-row: span 2;
  }

  .bento-item.span-2x1 {
    grid-column: span 4;
  }

  .bento-item.span-1x2 {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento-item.featured {
    grid-column: span 6;
    grid-row: span 2;
  }
}

.bento-card {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: var(--cc-transition);
  height: 100%;
  overflow: hidden;
  position: relative;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 217, 102, 0.05), rgba(255, 107, 53, 0.05));
  opacity: 0;
  transition: var(--cc-transition);
  pointer-events: none;
}

.bento-card:hover {
  border-color: var(--cc-primary);
  box-shadow: var(--cc-shadow-lg);
  transform: translateY(-4px);
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card.featured {
  grid-column: span 6;
  grid-row: span 2;
}

/* ========================================
   BUTTONS & INTERACTIONS
   ======================================== */

.btn {
  font-family: 'Space Mono', monospace;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: var(--cc-transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cc-primary), var(--cc-primary-dark));
  color: #1A202C;
  box-shadow: var(--cc-shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--cc-primary-dark), var(--cc-primary));
  box-shadow: var(--cc-shadow-lg);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--cc-accent), var(--cc-accent-dark));
  color: white;
  box-shadow: var(--cc-shadow-md);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--cc-accent-dark), var(--cc-accent));
  box-shadow: var(--cc-shadow-lg);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--cc-primary);
  border: 2px solid var(--cc-primary);
}

.btn-outline:hover {
  background: var(--cc-primary);
  color: #1A202C;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
  background: var(--cc-surface);
  border-bottom: 1px solid var(--cc-border);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  transition: var(--cc-transition);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 17, 23, 0.95);
}

.navbar-brand {
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--cc-primary) !important;
  transition: var(--cc-transition);
}

.navbar-brand:hover {
  color: var(--cc-accent) !important;
}

.nav-link {
  color: var(--cc-text) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  transition: var(--cc-transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cc-primary), var(--cc-accent));
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.theme-toggle, .lang-toggle {
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  color: var(--cc-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--cc-transition);
  margin-left: 0.5rem;
}

.theme-toggle:hover, .lang-toggle:hover {
  background: var(--cc-primary);
  color: #1A202C;
  border-color: var(--cc-primary);
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  transition: var(--cc-transition);
  overflow: hidden;
  box-shadow: var(--cc-shadow-sm);
}

.card:hover {
  border-color: var(--cc-primary);
  box-shadow: var(--cc-shadow-md);
  transform: translateY(-4px);
}

.card-img-top {
  height: 280px;
  object-fit: cover;
  transition: var(--cc-transition);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  color: var(--cc-text);
}

.card-title {
  color: var(--cc-text);
  font-weight: 600;
}

.card-text {
  color: var(--cc-text-muted);
}

/* ========================================
   FORMS
   ======================================== */

.form-control, .form-select {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  color: var(--cc-text);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: var(--cc-transition);
  font-family: 'Fira Sans', sans-serif;
}

.form-control:focus, .form-select:focus {
  background: var(--cc-surface);
  border-color: var(--cc-primary);
  color: var(--cc-text);
  box-shadow: 0 0 0 3px rgba(0, 217, 102, 0.1);
}

.form-label {
  color: var(--cc-text);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  background: var(--cc-text);
  color: var(--cc-surface);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  border-top: 1px solid var(--cc-border);
}

footer h6 {
  color: var(--cc-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

footer p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

footer a {
  color: rgba(255, 255, 255, 0.9);
  transition: var(--cc-transition);
  text-decoration: none;
}

footer a:hover {
  color: var(--cc-primary);
}

footer .text-reset {
  color: var(--cc-primary) !important;
}

footer .text-reset:hover {
  color: var(--cc-accent) !important;
}

/* ========================================
   HERO SECTIONS
   ======================================== */

.hero-section {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cc-bg-alt), var(--cc-surface));
  border-radius: 16px;
  margin-bottom: 2rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 217, 102, 0.1), transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.1), transparent 70%);
  animation: float 8s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: slideInUp 0.8s ease-out;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(20px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.stagger-item {
  opacity: 0;
  animation: slideInFade 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   BADGES & TAGS
   ======================================== */

.badge {
  font-family: 'Space Mono', monospace;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: linear-gradient(135deg, var(--cc-primary), var(--cc-primary-dark));
  color: #1A202C;
}

.badge-accent {
  background: linear-gradient(135deg, var(--cc-accent), var(--cc-accent-dark));
  color: white;
}

/* ========================================
   TESTIMONIALS
   ======================================== */

.testimonial-card {
  background: var(--cc-surface);
  border-left: 4px solid var(--cc-primary);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--cc-shadow-sm);
  transition: var(--cc-transition);
}

.testimonial-card:hover {
  border-left-color: var(--cc-accent);
  box-shadow: var(--cc-shadow-md);
}

.testimonial-text {
  font-style: italic;
  color: var(--cc-text-muted);
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--cc-text);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  h1, .heading-display { font-size: 2rem; }
  h2, .heading-lg { font-size: 1.5rem; }
  h3, .heading-md { font-size: 1.25rem; }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .bento-item,
  .bento-item.span-2x2,
  .bento-item.span-2x1,
  .bento-item.span-1x2,
  .bento-item.featured {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.8rem;
  }

  footer {
    padding: 2rem 0 1rem;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.gradient-text {
  background: linear-gradient(135deg, var(--cc-primary), var(--cc-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gloss {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-shadow {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.container-md {
  max-width: 1024px;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

/* ========================================
   GLASSMORPHISM EFFECT
   ======================================== */

.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass {
  background: rgba(15, 17, 23, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cookie Banner */
#cookieConsentBanner {
  background: var(--cc-surface);
  border-top: 1px solid var(--cc-border);
}
