/* ===== BOOTSTRAP 5 CUSTOMIZATIONS ===== */
/* Extends Bootstrap 5 with custom design tokens */

:root, [data-theme="light"] {
  /* Bootstrap color overrides */
  --bs-primary: #2a5e3a;
  --bs-primary-rgb: 42, 94, 58;
  --bs-warning: #9a7a2a;
  --bs-warning-rgb: 154, 122, 42;
  
  /* Font overrides */
  --bs-font-serif: 'Zodiak', 'Georgia', serif;
  --bs-font-sans-serif: 'Switzer', 'Helvetica Neue', sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  
  /* Custom design tokens */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --color-bg:               #f5f2eb;
  --color-surface:          #f8f5ef;
  --color-surface-2:        #faf8f4;
  --color-surface-offset:   #ede9e0;
  --color-surface-offset-2: #e6e1d7;
  --color-surface-dynamic:  #ddd7cb;
  --color-divider:          #d5cfc3;
  --color-border:           #c9c3b5;

  --color-text:         #1e2018;
  --color-text-muted:   #625f53;
  --color-text-faint:   #a39e93;
  --color-text-inverse: #f5f2eb;

  --color-primary:           #2a5e3a;
  --color-primary-hover:     #1d4429;
  --color-primary-active:    #132e1c;
  --color-primary-highlight: #c8d9cc;

  --color-gold:          #9a7a2a;
  --color-gold-hover:    #7c621f;
  --color-gold-highlight:#ecdfc5;

  --color-moon:          #5d4e7a;
  --color-moon-hover:    #493d62;
  --color-moon-highlight:#d9d1e8;

  --color-error:   #8b2626;
  --color-success: #2e6637;

  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 3px oklch(0.15 0.03 100 / 0.08);
  --shadow-md: 0 4px 16px oklch(0.15 0.03 100 / 0.10);
  --shadow-lg: 0 12px 40px oklch(0.15 0.03 100 / 0.14);

  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;

  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body:    'Switzer', 'Helvetica Neue', sans-serif;
}

/* DARK MODE */
[data-theme="dark"] {
  --color-bg:               #111410;
  --color-surface:          #161912;
  --color-surface-2:        #1a1e14;
  --color-surface-offset:   #1c2016;
  --color-surface-offset-2: #212618;
  --color-divider:          #2a2f25;
  --color-border:           #353a32;
  --color-text:             #f5f2eb;
  --color-text-muted:       #d4cfc4;
  --color-text-faint:       #8a8580;
}

/* Bootstrap customizations */
body {
  font-family: var(--font-body, sans-serif);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
}

.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: color var(--transition-interactive),
              background var(--transition-interactive),
              border-color var(--transition-interactive);
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

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

.btn-outline:not(.btn-check):not(.btn-close) {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:not(.btn-check):not(.btn-close):hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.btn-warning {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: #1e1a10;
}

.btn-warning:hover {
  background-color: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
}

.badge {
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.card {
  border-radius: var(--radius-lg);
  border-color: var(--color-divider);
  box-shadow: var(--shadow-sm);
}

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  background: var(--color-gold-highlight);
  border: 1px solid color-mix(in oklab, var(--color-gold) 30%, transparent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-8);
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.95;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: italic;
  color: var(--color-primary);
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-gold);
  margin-bottom: var(--space-6);
  font-weight: 400;
}

.hero-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 50ch;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.hero-desc img {
  border-radius: 8px;
  margin-bottom: var(--space-4);
  max-width: 100%;
  height: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

.hero-moon {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-moon-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.hero-moon-divider {
  width: 1px;
  height: 16px;
  background: var(--color-divider);
}

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* SECTIONS */
.section {
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
}

.section--sm {
  padding-block: clamp(var(--space-12), 8vw, var(--space-20));
}

.section--accent {
  background: var(--color-surface-offset);
}

.section-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 70ch;
}

.divider {
  width: 40px;
  height: 3px;
  background: var(--color-primary);
  margin-block: var(--space-4);
  border-radius: var(--radius-full);
}

.divider--gold {
  background: var(--color-gold);
}

/* ABOUT SECTION */
.about-body {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: var(--space-6);
}

.about-body a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.about-body a:hover {
  text-decoration: underline;
}

.sacred-geo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.sacred-geo {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.sacred-geo-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
}

/* GATHERING CARDS */
.gathering-card {
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

.gathering-card:hover {
  transform: translateY(-4px);
}

.gathering-card.gathering-card--featured .card {
  border-color: var(--color-gold);
}

.gathering-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-primary-highlight);
  border-radius: var(--radius-md);
  color: var(--color-primary);
}

.gathering-icon.moon-full {
  background: var(--color-gold-highlight);
  color: var(--color-gold);
}

.gathering-icon.sabbat {
  background: var(--color-gold-highlight);
  color: var(--color-gold);
}

.gathering-type {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
}

.gathering-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.gathering-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.gathering-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}

/* INFO ITEMS */
.info-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.info-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-primary);
}

.info-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.info-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.info-desc a {
  color: var(--color-primary);
  text-decoration: none;
}

.info-desc a:hover {
  text-decoration: underline;
}

/* WHEEL TEASER */
.wheel-teaser {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1d4429 100%);
  color: #fff;
}

.wheel-teaser-text {
  max-width: 560px;
}

.wheel-teaser-desc {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.wheel-sabbats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.wheel-teaser-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
}

/* EGGS TEASER */
.eggs-teaser-text {
  max-width: 560px;
}

.eggs-teaser-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.eggs-icon-cluster {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-inline: auto;
}

/* FADE IN ANIMATION */
.fade-in {
  animation: fadeIn 0.8s ease-in;
}

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

.stagger > * {
  animation: fadeIn 0.8s ease-in;
}

.stagger > :nth-child(1) { animation-delay: 0s; }
.stagger > :nth-child(2) { animation-delay: 0.1s; }
.stagger > :nth-child(3) { animation-delay: 0.2s; }
.stagger > :nth-child(4) { animation-delay: 0.3s; }

/* UTILITIES */
.text-center {
  text-align: center;
}

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

/* RESPONSIVE OVERRIDES */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
}
