/* ==========================================================================
   LIBERA DANCE — Unified Global Stylesheet
   Source of truth: index.html inline styles (unified tokens)
   ========================================================================== */

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

/* ==========================================================================
   2. DESIGN TOKENS
   ========================================================================== */
:root {
  --color-bg: #0a0a0a;
  --color-bg-warm: #111008;
  --color-surface: #1a1914;
  --color-surface-light: #252318;
  --color-surface-hover: #2a2820;
  --color-gold: #c9a84c;
  --color-gold-light: #e8d48b;
  --color-gold-dim: #8a7334;
  --color-cream: #f5f0e8;
  --color-cream-dim: #d4cfc5;
  --color-text: #e8e4dc;
  --color-text-dim: #9a9690;
  --color-accent-red: #a85c4c;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-serif: 'Noto Serif JP', serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --max-w: 1200px;
  --max-w-wide: 1400px;
}

/* ==========================================================================
   3. BASE STYLES
   ========================================================================== */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* ==========================================================================
   4. ACCESSIBILITY
   ========================================================================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ==========================================================================
   5. UTILITY CLASSES
   ========================================================================== */
.container      { max-width: var(--max-w);      margin: 0 auto; padding: 0 clamp(20px, 5vw, 60px); }
.container-wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 clamp(20px, 4vw, 60px); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   6. NAVIGATION
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  transition: all 0.5s var(--ease-out);
}

.nav--solid,
.nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w-wide); margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--color-gold);
  text-decoration: none;
  text-transform: uppercase;
}

/* --- Nav links --- */
.nav-links { display: flex; gap: clamp(16px, 3vw, 40px); list-style: none; }

.nav-links a {
  color: var(--color-cream-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--color-gold);
  transition: width 0.4s var(--ease-out);
}

.nav-links a:hover           { color: var(--color-gold); }
.nav-links a:hover::after    { width: 100%; }
.nav-links a.active          { color: var(--color-gold); }
.nav-links a.active::after   { width: 100%; }

/* --- Nav CTA button --- */
.nav-cta {
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  padding: 8px 24px;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.4s var(--ease-out);
  font-family: var(--font-body);
}

.nav-cta:hover {
  background: var(--color-gold);
  color: var(--color-bg);
}

/* --- Hamburger --- */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative; z-index: 110;
}

.hamburger span {
  display: block; width: 100%; height: 1px;
  background: var(--color-gold);
  position: absolute; left: 0;
  transition: all 0.4s var(--ease-out);
}

.hamburger span:nth-child(1) { top: 2px; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 2px; }

.hamburger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* --- Mobile menu --- */
.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px; z-index: 105;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.mobile-menu.active { opacity: 1; pointer-events: all; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--color-cream);
  text-decoration: none;
  letter-spacing: 0.15em;
  opacity: 0; transform: translateY(20px);
  transition: all 0.5s var(--ease-out), color 0.3s;
}

.mobile-menu.active a {
  opacity: 1; transform: translateY(0);
}

.mobile-menu a:hover { color: var(--color-gold); }

/* ==========================================================================
   7. PAGE HEADER
   ========================================================================== */
.page-header {
  padding: 150px 0 70px;
  text-align: center;
  position: relative;
}

.page-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.2), transparent);
}

.page-label {
  font-size: 0.65rem; letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--color-gold-dim); margin-bottom: 14px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--color-cream);
}

/* ==========================================================================
   8. SECTION STYLES
   ========================================================================== */
.section { padding: clamp(60px, 10vw, 120px) 0; }

.section-label {
  font-size: 0.68rem; letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--color-gold-dim); margin-bottom: 16px;
  display: flex; align-items: center; gap: 16px;
}

.section-label::before {
  content: ''; display: block;
  width: 40px; height: 1px;
  background: var(--color-gold-dim);
}

.section-label--center { justify-content: center; }
.section-label--center::before { display: none; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300; line-height: 1.3;
  color: var(--color-cream);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 0.95rem; color: var(--color-text-dim);
  max-width: 600px; line-height: 2;
}

/* ==========================================================================
   9. BUTTONS
   ========================================================================== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--color-gold);
  color: var(--color-bg);
  padding: 16px 36px;
  font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.4s var(--ease-out);
  font-family: var(--font-body);
  border: none; cursor: pointer;
}

.btn-primary:hover {
  background: var(--color-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.25);
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 12px;
  background: transparent;
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--color-gold);
  padding: 16px 36px;
  font-size: 0.85rem; font-weight: 400;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.4s var(--ease-out);
  font-family: var(--font-body);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--color-gold);
  background: rgba(201, 168, 76, 0.08);
}

/* ==========================================================================
   10. CARDS
   ========================================================================== */
.card {
  background: var(--color-surface);
  padding: clamp(24px, 3vw, 40px);
  position: relative; overflow: hidden;
  transition: all 0.5s var(--ease-out);
  border: 1px solid rgba(201, 168, 76, 0.05);
}

.card:hover {
  background: var(--color-surface-light);
  border-color: rgba(201, 168, 76, 0.12);
  transform: translateY(-3px);
}

.card-tag {
  display: inline-block; margin-top: 14px;
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-gold-dim);
  border: 1px solid rgba(201, 168, 76, 0.18);
  padding: 3px 10px;
}

/* ==========================================================================
   11. DIVIDERS
   ========================================================================== */
.divider {
  height: 1px; border: none;
  background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.18), transparent);
  margin: 0;
}

/* ==========================================================================
   12. CTA BANNER  (reused on teachers, lessons, news pages)
   ========================================================================== */
.cta-banner {
  text-align: center;
  padding: clamp(60px, 10vw, 120px) 0;
  position: relative; overflow: hidden;
}

.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
    var(--color-bg-warm);
}

.cta-banner > * { position: relative; z-index: 2; }

.cta-banner .section-title { margin-bottom: 12px; }
.cta-banner .section-title em { font-style: italic; color: var(--color-gold); }

.cta-desc {
  font-size: 0.92rem; color: var(--color-text-dim);
  max-width: 500px; margin: 0 auto 32px;
  line-height: 2;
}

.cta-buttons {
  display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap;
}

/* ==========================================================================
   13. FOOTER  (4-column grid layout from teachers/lessons/news pages)
   ========================================================================== */
.footer {
  background: var(--color-surface);
  padding: 60px 0 40px;
  border-top: 1px solid rgba(201, 168, 76, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--color-gold);
  margin-bottom: 16px;
}

.footer-brand-desc {
  font-size: 0.8rem; color: var(--color-text-dim); line-height: 1.9;
}

.footer h5 {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--color-gold-dim); margin-bottom: 20px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: var(--color-text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--color-gold); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(201, 168, 76, 0.08);
  font-size: 0.72rem;
  color: var(--color-text-dim);
}

.footer-socials { display: flex; gap: 20px; }
.footer-socials a {
  color: var(--color-text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s;
}
.footer-socials a:hover { color: var(--color-gold); }

/* ==========================================================================
   14. ANIMATIONS  (@keyframes)
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideRight {
  from { width: 0; }
  to   { width: 80px; }
}

/* ==========================================================================
   15. SCROLL REVEAL
   ========================================================================== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.35s; }
.reveal-delay-5 { transition-delay: 0.4s; }

/* ==========================================================================
   16. ANIMATE-IN
   ========================================================================== */
.animate-in      { animation: fadeUp 0.8s var(--ease-out) both; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* ==========================================================================
   17. RESPONSIVE BREAKPOINTS  (shared components only)
   ========================================================================== */

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

/* --- 768px --- */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: block; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
