/*
 * Bounce Design System
 * Unified CSS for all public-facing pages
 * ========================================
 */

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  /* Primary Palette */
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;

  /* Blue Accent */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;

  /* Pink Accent */
  --pink-50: #fdf2f8;
  --pink-100: #fce7f3;
  --pink-200: #fbcfe8;
  --pink-300: #f9a8d4;
  --pink-400: #f472b6;
  --pink-500: #ec4899;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --error: #ef4444;
  --error-light: #fee2e2;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Typography */
  --font-title: 'Lexend', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;

  /* Container */
  --container-max: 1200px;
  --container-narrow: 800px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.2;
  color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.text-muted { color: var(--gray-500); }
.text-purple { color: var(--purple-600); }
.text-center { text-align: center; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ===== BUTTONS ===== */
/*
 * IMPORTANT: Buttons should NEVER move/translate on hover.
 * Only use color, background, and shadow changes for hover states.
 * This keeps the UI stable and prevents layout shifts.
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus {
  outline: 2px solid var(--purple-300);
  outline-offset: 2px;
}

/* Primary Button */
.btn--primary {
  background: linear-gradient(135deg, var(--purple-400) 0%, var(--blue-400) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--purple-500) 0%, var(--blue-500) 100%);
  box-shadow: 0 6px 20px rgba(104, 69, 209, 0.4);
  /* NOTE: No transform on hover. Buttons should NEVER move/translate on hover. */
}

.btn--primary:active {
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
}

/* Secondary Button */
.btn--secondary {
  background: var(--white);
  color: var(--purple-600);
  border: 2px solid var(--purple-200);
}

.btn--secondary:hover {
  background: var(--purple-50);
  border-color: var(--purple-300);
}

/* Ghost Button */
.btn--ghost {
  background: transparent;
  color: var(--gray-700);
}

.btn--ghost:hover {
  background: var(--gray-100);
}

/* Button Sizes */
.btn--sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

/* ===== FORMS ===== */
.input-group {
  margin-bottom: var(--space-lg);
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: var(--space-sm);
}

.input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray-800);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.input:hover {
  border-color: var(--gray-300);
}

.input:focus {
  outline: none;
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.input--error {
  border-color: var(--error);
}

.input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.input-error-text {
  font-size: 0.8125rem;
  color: var(--error);
  margin-top: var(--space-xs);
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card--bordered {
  box-shadow: none;
  border: 1px solid var(--gray-200);
}

.card--hover {
  transition: all var(--transition);
}

.card--hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
}

.badge--purple {
  background: var(--purple-100);
  color: var(--purple-700);
}

.badge--blue {
  background: var(--blue-100);
  color: var(--blue-500);
}

.badge--pink {
  background: var(--pink-100);
  color: var(--pink-500);
}

.badge--success {
  background: var(--success-light);
  color: var(--success);
}

.badge--warning {
  background: var(--warning-light);
  color: var(--warning);
}

/* ===== AVATAR ===== */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.avatar--sm { width: 32px; height: 32px; }
.avatar--lg { width: 64px; height: 64px; }
.avatar--xl { width: 80px; height: 80px; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1002;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar__logo img {
  max-width:150px;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
}

.navbar__link:hover,
.navbar__link--active {
  color: var(--purple-600);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Mobile Nav Toggle */
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-sm);
  cursor: pointer;
  position: relative;
  z-index: 1001;
  width: 40px;
  height: 40px;
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  margin: 5px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger to X animation */
.navbar__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.navbar__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.mobile-menu__link {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  transition: color var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu.active .mobile-menu__link {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease;
}

.mobile-menu.active .mobile-menu__link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-menu__link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-menu__link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-menu__link:nth-child(4) { transition-delay: 0.25s; }

.mobile-menu__link:hover,
.mobile-menu__link--active {
  color: var(--purple-600);
}

.mobile-menu__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-width: 280px;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu.active .mobile-menu__actions {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease 0.3s;
}

.mobile-menu__actions .btn {
  width: 100%;
  justify-content: center;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand p {
  color: var(--gray-500);
  margin-top: var(--space-md);
  max-width: 280px;
}

.footer__heading {
  font-family: var(--font-title);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-lg);
}

.footer__links li {
  margin-bottom: var(--space-sm);
}

.footer__links a {
  font-size: 0.9375rem;
  color: var(--gray-500);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--purple-600);
}

.footer__social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--gray-500);
  transition: all var(--transition);
}

.footer__social a:hover {
  background: var(--purple-100);
  color: var(--purple-600);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--gray-200);
  font-size: 0.875rem;
  color: var(--gray-500);
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal a:hover {
  color: var(--purple-600);
}

/* ===== BRAND PATTERN OVERLAY ===== */
/*
 * Use brand-pattern.png for subtle texture overlays.
 * Apply to elements that need brand identity reinforcement.
 * Keep opacity low (0.05-0.15) to maintain readability.
 */
.brand-pattern {
  position: relative;
  overflow: hidden;
}

.brand-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('brand-pattern.png');
  background-size: 120px;
  background-repeat: repeat;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

.brand-pattern > * {
  position: relative;
  z-index: 1;
}

/* ===== BLOCK EDITOR CONTENT STYLES ===== */
.content-block {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--gray-700);
}

.content-block h2 {
  font-size: 1.75rem;
  margin: var(--space-2xl) 0 var(--space-md);
}

.content-block h3 {
  font-size: 1.375rem;
  margin: var(--space-xl) 0 var(--space-md);
}

.content-block h4 {
  font-size: 1.125rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

.content-block p {
  margin-bottom: var(--space-lg);
}

.content-block ul,
.content-block ol {
  margin: var(--space-md) 0 var(--space-lg);
  padding-left: var(--space-lg);
}

.content-block ul {
  list-style: disc;
}

.content-block ol {
  list-style: decimal;
}

.content-block li {
  margin-bottom: var(--space-sm);
}

.content-block blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, var(--purple-50) 0%, var(--blue-50) 100%);
  border-left: 4px solid var(--purple-400);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--gray-600);
}

.content-block blockquote p:last-child {
  margin-bottom: 0;
}

.content-block img {
  margin: var(--space-xl) 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.content-block a {
  color: var(--purple-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-block a:hover {
  color: var(--purple-700);
}

.content-block hr {
  margin: var(--space-2xl) 0;
  border: none;
  border-top: 1px solid var(--gray-200);
}

/* ===== EVENT CARDS ===== */
/*
 * Event cards CAN have translateY hover effects.
 * This is different from buttons which should never move.
 */
.event-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.event-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.event-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.event-card:hover .event-card__image img {
  transform: scale(1.03);
}

.event-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.event-card__like {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  transition: all var(--transition);
}

.event-card__like:hover,
.event-card__like--liked {
  color: #ec4899;
  background: var(--white);
}

.event-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-card__date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--purple-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.event-card__title {
  font-family: var(--font-title);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-card__location {
  font-size: 0.8125rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.event-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.event-card__price {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--gray-900);
}

.event-card__price span {
  font-size: 0.75rem;
}

.event-card__host {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-card__host-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.event-card__host-name {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Event Card Grid */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 900px) {
  .event-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .event-grid {
    grid-template-columns: 1fr;
  }
}

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 20px;
    --space-xl: 28px;
    --space-2xl: 40px;
    --space-3xl: 56px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  h3 { font-size: 1.25rem; }

  .container {
    padding: 0 var(--space-md);
  }

  /* Mobile Nav */
  .navbar__nav {
    display: none;
  }

  .navbar__toggle {
    display: block;
  }

  .navbar__actions {
    display: none;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .btn {
    padding: 10px 20px;
    font-size: 0.875rem;
  }

  .btn--lg {
    padding: 14px 28px;
  }
}

/* ==========================================================================
   PAGE CTA SECTION
   Unified call-to-action section used across all pages
   Usage: <section class="page-cta page-cta--light"> or page-cta--dark
   ========================================================================== */

.page-cta {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}

.page-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('brand-pattern.png');
  background-size: 500px;
  background-repeat: repeat;
  opacity: 0.05;
  pointer-events: none;
}

.page-cta__content {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 0 auto;
}

.page-cta__title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.page-cta__text {
  font-size: 1.1875rem;
  margin-bottom: 36px;
  line-height: 1.7;
}

.page-cta__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Light variant (light gradient, dark text) */
.page-cta--light {
  background: linear-gradient(135deg, var(--purple-50) 0%, var(--blue-50) 100%);
}

.page-cta--light .page-cta__title {
  color: var(--gray-900);
}

.page-cta--light .page-cta__text {
  color: var(--gray-600);
}

/* Dark variant (dark gradient, white text) */
.page-cta--dark {
  background: linear-gradient(135deg, var(--purple-600) 0%, var(--blue-500) 100%);
}

.page-cta--dark::before {
  opacity: 0.08;
}

.page-cta--dark .page-cta__title {
  color: var(--white);
}

.page-cta--dark .page-cta__text {
  color: rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
  .page-cta {
    padding: 60px 0;
  }

  .page-cta__title {
    font-size: 1.75rem;
  }

  .page-cta__text {
    font-size: 1.0625rem;
  }

  .page-cta__buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* ===== TIMEZONE DISPLAY ===== */
.local-time {
  /* Wrapper for timestamps that get converted to local time */
}

.utc-label {
  font-size: 0.75em;
  color: var(--gray-500);
  font-weight: 500;
  margin-left: 4px;
}
