:root {
  --indigo: #1a1a2e;
  --charcoal: #16213e;
  --cedar: #4a3728;
  --copper: #4a7c59;
  --cream: #f5f0e8;
  --gold: #c9a96e;
  --deep-black: #0a0a0f;
  --plaster: #e8e0d4;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--deep-black);
  color: var(--cream);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
}

#ripple-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
}

#root {
  position: relative;
  z-index: 1;
}

.font-serif {
  font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
}

.font-jp {
  font-family: 'Noto Serif JP', serif;
}

.font-body {
  font-family: 'IBM Plex Sans', sans-serif;
}

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

@keyframes breathe {
  0%, 100% { opacity: 0.12; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.03); }
}

@keyframes breatheSlow {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.6; }
}

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

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

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

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

@keyframes pulse-brass {
  0%, 100% { box-shadow: 0 0 20px rgba(201, 169, 110, 0.2); }
  50% { box-shadow: 0 0 50px rgba(201, 169, 110, 0.5); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes droneWave {
  0%, 100% { transform: scaleY(1); opacity: 0.3; }
  50% { transform: scaleY(2); opacity: 0.6; }
}

@keyframes parallaxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes lineReveal {
  from { width: 0; }
  to { width: 100%; }
}

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

.animate-breathe {
  animation: breathe 6s ease-in-out infinite;
}

.animate-breathe-slow {
  animation: breatheSlow 8s ease-in-out infinite;
}

.animate-pulse-brass {
  animation: pulse-brass 3s ease-in-out infinite;
}

.animate-float {
  animation: parallaxFloat 6s ease-in-out infinite;
}

/* ============ SCROLL REVEAL ============ */

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

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

.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: brightness(0.5) saturate(0.8);
  transition: opacity 2s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,15,0.3) 0%,
    rgba(10,10,15,0.1) 40%,
    rgba(10,10,15,0.6) 80%,
    rgba(10,10,15,1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

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

.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  transition: all 0.6s ease;
  backdrop-filter: blur(0px);
  background: transparent;
}

.nav-fixed.scrolled {
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.85);
  padding: 0.6rem 2rem;
  border-bottom: 1px solid rgba(201, 169, 110, 0.1);
}

/* ============ COURSE GRID ============ */

.course-card {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.course-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.course-card:hover img {
  transform: scale(1.06);
}

.course-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0.3) 40%, transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: background 0.5s ease;
}

.course-card:hover .course-card-overlay {
  background: linear-gradient(0deg, rgba(10,10,15,0.98) 0%, rgba(10,10,15,0.4) 50%, rgba(10,10,15,0.1) 80%);
}

/* ============ FEATURED COURSE ============ */

.featured-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.featured-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(10,10,15,0.4) 100%);
  pointer-events: none;
}

.featured-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}

.featured-image-wrap:hover img {
  transform: scale(1.03);
}

/* ============ COUNTER TEXTURE ============ */

.cedar-surface {
  background: linear-gradient(135deg,
    #4a3728 0%,
    #5a4738 25%,
    #4a3728 50%,
    #3a2718 75%,
    #4a3728 100%
  );
  background-size: 200% 200%;
}

/* ============ DIVIDER ============ */

.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.3;
}

.gold-divider-thick {
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--gold) 50%, transparent 95%);
  opacity: 0.2;
}

/* ============ GALLERY MOSAIC ============ */

.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 250px;
  gap: 6px;
}

@media (max-width: 768px) {
  .gallery-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
}

.gallery-mosaic .tall {
  grid-row: span 2;
}

.gallery-mosaic .wide {
  grid-column: span 2;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease, filter 0.8s ease;
  filter: saturate(0.85);
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: saturate(1.1);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,10,15,0.5) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* ============ CTA SECTION ============ */

.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  filter: brightness(0.4) saturate(0.6);
}

/* ============ STAT COUNTER ============ */

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--gold);
}

.stat-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.5;
  margin-top: 0.5rem;
}

/* ============ TESTIMONIAL ============ */

.testimonial-card {
  background: rgba(245, 240, 232, 0.03);
  border: 1px solid rgba(245, 240, 232, 0.06);
  border-radius: 6px;
  padding: 2rem;
  transition: border-color 0.5s ease;
}

.testimonial-card:hover {
  border-color: rgba(201, 169, 110, 0.2);
}

/* ============ SCROLLBAR ============ */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--deep-black);
}

::-webkit-scrollbar-thumb {
  background: var(--cedar);
  border-radius: 2px;
}

/* ============ IMAGE LOADING ============ */

.img-placeholder {
  background: linear-gradient(135deg, rgba(201,169,110,0.05), rgba(201,169,110,0.02));
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-shimmer {
  background: linear-gradient(90deg, 
    rgba(201,169,110,0.03) 25%, 
    rgba(201,169,110,0.08) 50%, 
    rgba(201,169,110,0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}