/**
 * elevation-theme.css
 * Design System Tokens & Elevation Architecture for Igreja Luz da Verdade
 * Inspired by Elevation Church (elevationchurch.org)
 * Authored by: teamwork_preview_worker_m1_1
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800;900&display=swap');

:root {
  /* ==========================================================================
     1. CONTRACT SEMANTIC TOKENS (PROJECT.md Compliance)
     ========================================================================== */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F8FAFC;
  --color-text-primary: #0F172A;
  --color-text-secondary: #475569;
  --color-gold-primary: #D97706;
  --color-gold-hover: #B45309;
  --color-gold-light: #FEF3C7;
  --color-blue-deep: #1E3A8A;
  --radius-card: 20px;
  --radius-pill: 9999px;
  --radius-sm: 8px;
  --shadow-elevation: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.08);

  /* ==========================================================================
     2. EXTENDED SURFACE PALETTE (Clean White & Soft Ivory)
     ========================================================================== */
  --color-surface-pure: #FFFFFF;
  --color-surface-ivory: #FAFAFA;
  --color-surface-soft: #F8FAFC;
  --color-surface-muted: #F1F5F9;
  --color-surface-border: #E2E8F0;
  --color-surface-border-subtle: rgba(15, 23, 42, 0.06);

  --color-surface-dark: #0F172A;
  --color-surface-dark-card: #1E293B;
  --color-surface-dark-border: rgba(255, 255, 255, 0.12);

  /* ==========================================================================
     3. SLATE TYPOGRAPHY PALETTE
     ========================================================================== */
  --color-slate-900: #0F172A;
  --color-slate-800: #1E293B;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748B;
  --color-slate-400: #94A3B8;
  --color-slate-200: #E2E8F0;
  --color-text-tertiary: #475569;
  --color-text-muted: #64748B;
  --color-text-light: #94A3B8;
  --color-text-inverse: #FFFFFF;
  --color-text-inverse-muted: #E2E8F0;

  /* ==========================================================================
     4. GOLD ACCENTS — "LUZ" (Divine Light & Radiance)
     ========================================================================== */
  --color-gold-50: #FFFBEB;
  --color-gold-100: #FEF3C7;
  --color-gold-200: #FDE68A;
  --color-gold-400: #FBBF24;
  --color-gold-500: #F59E0B;
  --color-gold-600: #D97706;
  --color-gold-700: #B45309;
  --color-gold-800: #92400E;
  --color-gold-900: #78350F;

  --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  --gradient-gold-hover: linear-gradient(135deg, #FBBF24 0%, #B45309 100%);
  --gradient-gold-subtle: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.16) 100%);

  /* ==========================================================================
     5. BLUE ACCENTS — "VERDADE" (Biblical Truth & Covenant)
     ========================================================================== */
  --color-blue-50: #EFF6FF;
  --color-blue-100: #DBEAFE;
  --color-blue-600: #2563EB;
  --color-blue-700: #1D4ED8;
  --color-blue-800: #1E40AF;
  --color-blue-900: #1E3A8A;
  --color-blue-950: #172554;

  --gradient-blue: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
  --gradient-blue-subtle: linear-gradient(135deg, rgba(30, 64, 175, 0.06) 0%, rgba(30, 58, 138, 0.12) 100%);

  /* ==========================================================================
     6. STATUS & FUNCTIONAL COLORS
     ========================================================================== */
  --color-success: #059669;
  --color-success-bg: #ECFDF5;
  --color-success-border: #A7F3D0;
  --color-whatsapp: #25D366;
  --color-youtube: #FF0000;

  /* ==========================================================================
     7. TYPOGRAPHY FAMILIES & FLUID SCALES (clamp)
     ========================================================================== */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --font-size-hero: clamp(2.5rem, 5.5vw + 1rem, 4.5rem);
  --font-size-h1: clamp(2rem, 3vw + 0.75rem, 3rem);
  --font-size-h2: clamp(1.35rem, 1.8vw + 0.6rem, 2rem);
  --font-size-h3: clamp(1.125rem, 1vw + 0.5rem, 1.35rem);
  --font-size-lead: clamp(1.0625rem, 0.8vw + 0.6rem, 1.25rem);
  --font-size-body: clamp(0.95rem, 0.25vw + 0.9rem, 1.0625rem);
  --font-size-btn: clamp(0.9375rem, 0.2vw + 0.9rem, 1rem);
  --font-size-caption: clamp(0.8125rem, 0.15vw + 0.8rem, 0.875rem);
  --font-size-micro: clamp(0.6875rem, 0.1vw + 0.7rem, 0.75rem);

  /* ==========================================================================
     8. BORDER RADII HIERARCHY
     ========================================================================== */
  --radius-xs: 4px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-modal: 24px;

  /* ==========================================================================
     9. AMBIENT DIFFUSE SHADOWS
     ========================================================================== */
  --shadow-elevation-0: none;
  --shadow-elevation-1: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-elevation-4: 0 20px 48px -8px rgba(15, 23, 42, 0.12), 0 8px 18px -4px rgba(15, 23, 42, 0.06);
  --shadow-glow-gold: 0 8px 24px -4px rgba(217, 119, 6, 0.35), 0 2px 8px -2px rgba(217, 119, 6, 0.20);
  --shadow-glow-blue: 0 8px 24px -4px rgba(30, 64, 175, 0.30), 0 2px 8px -2px rgba(30, 64, 175, 0.15);

  /* ==========================================================================
     10. GLASSMORPHISM & OVERLAYS
     ========================================================================== */
  --glass-bg-light: rgba(255, 255, 255, 0.85);
  --glass-border-light: rgba(255, 255, 255, 0.60);
  --glass-border-subtle: rgba(15, 23, 42, 0.07);
  --glass-blur: 16px;

  --glass-bg-dark: rgba(15, 23, 42, 0.75);
  --glass-border-dark: rgba(255, 255, 255, 0.12);
  --glass-blur-heavy: 24px;

  --overlay-hero-scrim: linear-gradient(180deg, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.85) 60%, rgba(15, 23, 42, 0.95) 100%);
  --overlay-hero-radial: radial-gradient(circle at 50% 35%, rgba(245, 158, 11, 0.15) 0%, transparent 70%);

  /* ==========================================================================
     11. SPACING & CONTAINERS
     ========================================================================== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-prose: 896px;

  /* ==========================================================================
     12. TRANSITIONS & TIMING
     ========================================================================== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   GLOBAL RESET & TYPOGRAPHIC BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-size-adjust: from-font;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  margin-top: 0;
  line-height: 1.2;
}

h1, h2, h3, h4, h5, h6, .text-balance {
  text-wrap: balance;
}

p, blockquote, .text-pretty {
  text-wrap: pretty;
}

/* ==========================================================================
   REUSABLE ELEVATION & GLASS UTILITY CLASSES
   ========================================================================== */

/* Glass Card */
.glass-card {
  background: var(--glass-bg-light);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevation);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(217, 119, 6, 0.30);
}

/* Sticky Glass Header */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  transition: background var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.glass-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--color-surface-border-subtle);
  box-shadow: var(--shadow-elevation);
}

/* Cultos Schedule Active Day Card */
.culto-card.is-today,
.culto-card-active {
  border: 2px solid var(--color-gold-primary) !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBEB 100%) !important;
  box-shadow: var(--shadow-glow-gold) !important;
}

/* Today Status Badge */
.badge-today {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-gold-primary);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: var(--font-size-micro);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* Brand Pill Badges */
.badge-pill-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.40);
  color: #FDE68A;
  font-size: var(--font-size-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
}

.badge-pill-blue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-blue-50);
  border: 1px solid var(--color-blue-100);
  color: var(--color-blue-900);
  font-size: var(--font-size-caption);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   BUTTON & CTA TOKENS
   ========================================================================== */

/* Primary CTA Button (Gold Pill) */
.btn-gold-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-gold);
  color: var(--color-slate-900);
  font-family: var(--font-display);
  font-size: var(--font-size-btn);
  font-weight: 700;
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-glow-gold);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-gold-primary:hover {
  transform: translateY(-2px);
  background: var(--gradient-gold-hover);
  box-shadow: 0 12px 28px -4px rgba(217, 119, 6, 0.45);
}

/* Secondary Hero CTA Button (Glass Pill) */
.btn-glass-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.60);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: var(--font-size-btn);
  font-weight: 700;
  padding: 16px 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.btn-glass-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

/* WhatsApp Brand Pill CTA */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-whatsapp);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: var(--font-size-btn);
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 16px -2px rgba(37, 211, 102, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(37, 211, 102, 0.50);
}

/* Subtle Outline Button */
.btn-outline-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-pure);
  border: 1.5px solid var(--color-surface-border);
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: var(--font-size-btn);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.btn-outline-subtle:hover {
  border-color: var(--color-gold-primary);
  color: var(--color-gold-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   PIX TOAST NOTIFICATION COMPONENT
   ========================================================================== */
#pix-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  background: var(--color-slate-900);
  color: #FFFFFF;
  border: 1px solid var(--color-gold-primary);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-elevation-4);
  font-family: var(--font-display);
  font-size: var(--font-size-caption);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), opacity 250ms ease;
}

#pix-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION OVERRIDES
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-gold-primary);
  outline-offset: 2px;
}

@supports not (backdrop-filter: blur(16px)) {
  .glass-card {
    background: rgba(255, 255, 255, 0.96);
  }
  .glass-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
  }
}

@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;
  }
  .glass-card:hover,
  .btn-gold-primary:hover,
  .btn-glass-secondary:hover,
  .btn-whatsapp:hover,
  .btn-outline-subtle:hover {
    transform: none !important;
  }
}
