/**
 * Bloom Cycles - Shared Modern Design System
 * Bento Grid | Dark/Light Theme | Premium Typography
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafb;
  --bg-tertiary: #f0f3f7;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --border-color: #e2e8f0;
  --accent-primary: #10b981;
  --accent-secondary: #f59e0b;
  --accent-tertiary: #3b82f6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 10px 15px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 20px 25px rgba(15, 23, 42, 0.15);
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border-color: #475569;
  --accent-primary: #10b981;
  --accent-secondary: #f59e0b;
  --accent-tertiary: #3b82f6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

* {
  transition: var(--transition);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

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

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

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

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-tertiary);
  text-decoration: underline;
}

/* Navigation */
.navbar {
  background-color: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary) !important;
}

/* Buttons */
.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background: var(--gradient-secondary);
  border: none;
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

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

.btn-outline-primary:hover {
  background: var(--accent-primary);
  color: white;
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.bento-grid.asymmetric {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.bento-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

.bento-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.bento-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

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

@media (max-width: 768px) {
  .bento-grid.asymmetric {
    grid-template-columns: repeat(6, 1fr);
  }
  .bento-item-2x1,
  .bento-item-2x2 {
    grid-column: span 6;
  }
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: var(--transition);
  overflow: hidden;
}

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

.card-body {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.card-title {
  color: var(--text-primary);
  font-weight: 700;
}

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

.card-header {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

/* Sections */
section {
  padding: 4rem 0;
  transition: var(--transition);
}

section.light-section {
  background: var(--bg-secondary);
}

section.accent-section {
  background: var(--gradient-primary);
  color: white;
}

/* Hero Section */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

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

/* Forms */
.form-control,
.form-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.form-label {
  color: var(--text-primary);
  font-weight: 600;
}

/* Footer */
footer {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}

footer h5 {
  color: var(--text-primary);
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

/* Glassmorphism Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

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

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out forwards;
}

/* Staggered animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Badges */
.badge {
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
}

/* Utility Classes */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary { color: var(--text-tertiary) !important; }

.bg-primary { background: var(--bg-primary) !important; }
.bg-secondary { background: var(--bg-secondary) !important; }
.bg-tertiary { background: var(--bg-tertiary) !important; }

.border-primary { border-color: var(--accent-primary) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }

/* Responsive */
@media (max-width: 576px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  section {
    padding: 2rem 0;
  }

  .bento-grid {
    gap: 1rem;
  }

  .bento-item {
    padding: 1.5rem;
  }
}

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

/* Smooth page transitions */
body {
  animation: fadeIn 0.5s ease-out;
}

/* Cookie Consent */
#cookieConsentBanner {
  background: var(--bg-tertiary) !important;
  border-top: 2px solid var(--accent-primary) !important;
  color: var(--text-primary) !important;
  animation: slideInUp 0.3s ease-out;
}

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

/* Language Switcher */
.language-switcher {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-btn {
  padding: 0.4rem 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
  transition: var(--transition);
}

.lang-btn:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.lang-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Theme Toggle */
#themeToggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#themeToggle:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Loading animation for images */
img {
  object-fit: cover;
}

/* Testimonial styling */
.testimonial-card {
  text-align: center;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.testimonial-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--accent-primary);
}

/* Rating stars */
.star-rating {
  color: var(--accent-secondary);
  letter-spacing: 0.2rem;
}

/* Code/Mono Font */
.code, code {
  font-family: 'DM Mono', monospace;
  background: var(--bg-tertiary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  color: var(--accent-tertiary);
}
