/* Falisa — Cosmic Tarot Celestial Universe Design System */
:root {
  --cos-obsidian: #06040D;
  --cos-violet: #120824;
  --cos-purple: #1D0F3B;
  --cos-lavender: #B599FF;
  --cos-nebula: #23387A;
  --cos-pink: #E879C5;
  --cos-gold: #E5C17B;
  --cos-gold-dim: rgba(229, 193, 123, 0.32);
  --cos-moon: #F5F2FF;
  --cos-muted: #B2ABC7;
  --cos-rule: rgba(229, 193, 123, 0.16);
  --font-serif: "Lora", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.cosmic-body {
  margin: 0;
  background: var(--cos-obsidian);
  color: var(--cos-moon);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* Fixed Living WebGL + Starfield Layers */
#cosmic-webgl, #cosmic-stars {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}
#cosmic-webgl { z-index: 0; }
#cosmic-stars { z-index: 1; }

.cosmic-layer {
  position: relative;
  z-index: 2;
}
.cos-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Header */
.cos-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 4, 13, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 193, 123, 0.14);
}
.cos-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.cos-logo img { display: block; max-height: 30px; width: auto; }
.cos-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cos-links a {
  font-size: 14.5px;
  color: var(--cos-muted);
  transition: color 0.2s;
}
.cos-links a:hover { color: var(--cos-gold); }
.cos-nav-actions { display: flex; gap: 12px; align-items: center; }

/* Ritual Buttons */
.cos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s, border-color 0.2s, background 0.2s;
}
.cos-btn-ritual {
  background: linear-gradient(135deg, #E5C17B 0%, #C89B4F 100%);
  color: #090514;
  box-shadow: 0 0 30px rgba(229, 193, 123, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.cos-btn-ritual:hover {
  box-shadow: 0 0 46px rgba(229, 193, 123, 0.56);
  color: #090514;
}
.cos-btn-ghost {
  background: rgba(18, 8, 36, 0.62);
  border-color: rgba(229, 193, 123, 0.38);
  color: var(--cos-moon);
}
.cos-btn-ghost:hover {
  border-color: var(--cos-gold);
  background: rgba(229, 193, 123, 0.12);
}
.cos-btn-sm { padding: 8px 18px; font-size: 13.5px; }

/* ================= CINEMATIC HERO SCENE ================= */
.cos-hero {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  position: relative;
  padding: 56px 0 72px;
  overflow: hidden;
}
.cos-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}
.cos-h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--cos-moon);
  text-shadow: 0 0 42px rgba(181, 153, 255, 0.28);
}
.cos-hero-sub {
  font-size: 17px;
  line-height: 1.72;
  color: #CBC4E0;
  margin: 0 0 34px;
  max-width: 50ch;
}

/* Right Hero Stage: Volumetric Moon + Rotating Zodiac Portal + 3 Floating 3D Tarot Cards */
.cos-portal-stage {
  position: relative;
  height: 490px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cos-moon-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #FFF9EB 0%, #E5C17B 36%, #7E56C4 72%, rgba(29, 15, 59, 0) 100%);
  box-shadow: 0 0 90px rgba(229, 193, 123, 0.36), 0 0 160px rgba(181, 153, 255, 0.32);
  opacity: 0.9;
}
.cos-zodiac-wheel {
  position: absolute;
  width: 440px;
  max-width: 96%;
  height: auto;
  opacity: 0.85;
}
@keyframes cosSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin-slow { transform-origin: 220px 220px; animation: cosSpin 80s linear infinite; }
.spin-rev  { transform-origin: 220px 220px; animation: cosSpin 120s linear infinite reverse; }

/* Floating Hero Mini Tarot Cards */
.hero-float-card {
  position: absolute;
  width: 118px;
  height: 186px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(28, 15, 56, 0.94), rgba(9, 5, 22, 0.96));
  border: 1px solid rgba(229, 193, 123, 0.65);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65), 0 0 26px rgba(229, 193, 123, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-float-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(229, 193, 123, 0.28);
  border-radius: 8px;
  pointer-events: none;
}
.hero-float-card span {
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--cos-gold);
  letter-spacing: 0.06em;
}
.hfc-1 { top: 28px; left: 12px; transform: rotate(-11deg); }
.hfc-2 { bottom: 26px; left: 32px; transform: rotate(8deg); }
.hfc-3 { top: 72px; right: 10px; transform: rotate(10deg); }

/* ================= INTERACTIVE 3D TAROT TEMPLE SECTION ================= */
.cos-section {
  padding: 96px 0;
  position: relative;
  border-top: 1px solid rgba(229, 193, 123, 0.12);
}
.cos-h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 500;
  line-height: 1.16;
  margin: 0 0 14px;
  color: var(--cos-moon);
}
.cos-lead {
  color: var(--cos-muted);
  font-size: 16px;
  max-width: 56ch;
  margin: 0;
}

.tarot-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 48px;
  perspective: 1200px;
}
.tarot-oracle-card {
  position: relative;
  min-height: 390px;
  border-radius: 16px;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(229, 193, 123, 0.18), transparent 58%),
    linear-gradient(165deg, rgba(29, 15, 59, 0.92), rgba(8, 5, 19, 0.96));
  border: 1px solid rgba(229, 193, 123, 0.48);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.6), 0 0 32px rgba(140, 86, 255, 0.14);
  padding: 28px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s, box-shadow 0.25s;
}
.tarot-oracle-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(229, 193, 123, 0.26);
  border-radius: 11px;
  pointer-events: none;
}
.tarot-oracle-card:hover {
  border-color: var(--cos-gold);
  box-shadow: 0 34px 72px rgba(0, 0, 0, 0.72), 0 0 44px rgba(229, 193, 123, 0.24);
}
.tarot-numeral {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--cos-gold);
}
.tarot-card-title {
  font-family: var(--font-serif);
  font-size: 25px;
  margin: 8px 0 6px;
  color: var(--cos-moon);
}
.tarot-reveal-text {
  font-size: 14px;
  line-height: 1.65;
  color: #D7D1EB;
  margin: 8px 0 0;
  opacity: 0.78;
  transition: opacity 0.25s;
}
.tarot-oracle-card.revealed {
  border-color: var(--cos-gold);
  background:
    radial-gradient(circle at 50% 20%, rgba(232, 121, 197, 0.16), transparent 60%),
    linear-gradient(165deg, rgba(44, 22, 84, 0.96), rgba(11, 6, 26, 0.98));
}
.tarot-oracle-card.revealed .tarot-reveal-text { opacity: 1; color: #FFF8EB; }

/* ================= INTERACTIVE ZODIAC WHEEL SECTION ================= */
.zodiac-cosmos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 44px;
  align-items: center;
  margin-top: 44px;
}
.zodiac-ring-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.zodiac-pill-btn {
  padding: 14px 10px;
  border-radius: 10px;
  background: rgba(18, 9, 36, 0.72);
  border: 1px solid rgba(229, 193, 123, 0.2);
  color: #DDD7F2;
  font-family: var(--font-serif);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.zodiac-pill-btn small { font-family: var(--font-sans); font-size: 11px; color: var(--cos-muted); }
.zodiac-pill-btn:hover, .zodiac-pill-btn.active {
  border-color: var(--cos-gold);
  background: rgba(229, 193, 123, 0.14);
  color: var(--cos-gold);
  transform: translateY(-2px);
}
.zodiac-detail-panel {
  background: rgba(16, 8, 32, 0.82);
  border: 1px solid rgba(229, 193, 123, 0.34);
  border-radius: 16px;
  padding: 32px 28px;
}

/* ================= RITUAL DISCIPLINES INDEX ================= */
.cos-ritual-list {
  border-top: 1px solid rgba(229, 193, 123, 0.18);
  margin-top: 40px;
}
.cos-ritual-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px 12px;
  border-bottom: 1px solid rgba(229, 193, 123, 0.14);
  transition: background 0.2s, border-color 0.2s;
}
.cos-ritual-row:hover {
  background: rgba(229, 193, 123, 0.06);
  border-bottom-color: rgba(229, 193, 123, 0.45);
}
.cos-ritual-row h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  color: var(--cos-moon);
}
.cos-ritual-row p { margin: 0; color: var(--cos-muted); font-size: 15px; }
.cos-ritual-row span { color: var(--cos-gold); font-weight: 600; font-size: 14px; }

/* ================= BIRTH CHART PORTAL BAND ================= */
.cos-natal-portal {
  background:
    radial-gradient(600px 320px at 85% 50%, rgba(229, 193, 123, 0.16), transparent 70%),
    rgba(16, 8, 34, 0.85);
  border: 1px solid rgba(229, 193, 123, 0.38);
  border-radius: 20px;
  padding: 48px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 32px;
  align-items: center;
}

/* ================= DIRECTORY & FOOTER ================= */
.cos-dir-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.cos-dir-col h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--cos-gold);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(229, 193, 123, 0.2);
}
.cos-dir-col ul { list-style: none; margin: 0; padding: 0; }
.cos-dir-col li { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.cos-dir-col a {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  font-size: 14.5px;
  color: var(--cos-moon);
}
.cos-dir-col a span { font-size: 12.5px; color: var(--cos-muted); }
.cos-dir-col a:hover { color: var(--cos-gold); }

.cos-footer {
  padding: 64px 0 48px;
  background: rgba(5, 3, 11, 0.92);
  border-top: 1px solid rgba(229, 193, 123, 0.14);
}
.cos-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.cos-footer h4 { font-family: var(--font-serif); color: var(--cos-gold); margin: 0 0 12px; font-size: 16px; }
.cos-footer ul { list-style: none; margin: 0; padding: 0; }
.cos-footer li { margin-bottom: 8px; }
.cos-footer a { font-size: 14px; color: var(--cos-muted); }
.cos-footer a:hover { color: var(--cos-gold); }

@media (max-width: 960px) {
  .cos-hero-grid, .tarot-stage, .zodiac-cosmos-grid, .cos-natal-portal, .cos-dir-grid, .cos-footer-grid {
    grid-template-columns: 1fr;
  }
  .cos-links { display: none; }
  .cos-portal-stage { height: 360px; }
  .hero-float-card { width: 92px; height: 142px; }
  .cos-ritual-row { grid-template-columns: 1fr; gap: 8px; }
  .zodiac-ring-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .spin-slow, .spin-rev { animation: none; }
}
