/* =========================================
   GLOBAL THEME — Muggs Of Learning Hub
   Celtic Modern Dark Theme (Kells)
   Radial Layout
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Cormorant+Garamond:wght@400;500;600&display=swap');

:root {
  --gold: #d4a726;
  --gold-light: #f0d78a;
  --gold-glow: rgba(212, 167, 38, 0.4);
  --gold-transparent: rgba(212, 167, 38, 0.15);
  --gold-border: rgba(212, 167, 38, 0.4);

  --green-900: #071a0e;
  --green-800: #0d2818;
  --green-700: #143d24;
  --green-600: #1a5231;

  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.4);

  --radius: 12px;
  --radius-full: 50%;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Radial layout */
  --orbit-radius: 220px;
  --total-items: 7;
}

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

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--text-primary);
  background: var(--green-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--green-700) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(212, 167, 38, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 10% 80%, var(--green-600) 0%, transparent 40%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../kells/book_of_kells_1.jpg') center/cover no-repeat;
  opacity: 0.06;
  filter: grayscale(40%) brightness(0.7);
  z-index: -1;
  pointer-events: none;
}

/* ======================================================
   Splash Screen
====================================================== */
#splash-screen {
  position: fixed;
  inset: 0;
  background: var(--green-900);
  color: var(--gold);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: 'Cinzel Decorative', serif;
  text-align: center;
  animation: splashFade 1.8s ease forwards;
  pointer-events: none;
}

#splash-screen h1 {
  font-size: 3rem;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 20px var(--gold-glow);
}

#splash-screen p {
  font-size: 1.3rem;
  color: var(--text-secondary);
  opacity: 0;
  animation: splashSlide 0.8s ease 0.3s forwards;
}

@keyframes splashFade {
  0%, 40% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes splashSlide {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ======================================================
   Main Content
====================================================== */
#main-content {
  opacity: 0;
  transition: opacity 0.6s var(--transition);
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#main-content.fade-in {
  opacity: 1;
}

/* ======================================================
   Radial Container
====================================================== */
.radial-container {
  position: relative;
  width: calc(var(--orbit-radius) * 2 + 160px);
  height: calc(var(--orbit-radius) * 2 + 160px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ======================================================
   Center Piece (Logo + Title)
====================================================== */
.center-piece {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.logo {
  max-width: 180px;
  width: 100%;
  height: auto;
  animation: logoFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 0 30px var(--gold-glow));
}

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

.center-piece h1 {
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold);
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 1rem;
  text-shadow:
    0 0 20px rgba(212, 167, 38, 0.4),
    0 0 40px rgba(212, 167, 38, 0.2);
}

.tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ======================================================
   Orbiting Buttons
====================================================== */
.orbit-btn {
  position: absolute;
  width: 140px;
  height: 45px;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: var(--gold-transparent);
  border: 1px solid var(--gold-border);
  border-radius: 25px;

  text-decoration: none;
  transition: var(--transition);

  /* Position in circle using CSS custom property */
  --angle: calc(360deg / var(--total-items) * var(--i) - 90deg);
  left: 50%;
  top: 50%;
  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateX(var(--orbit-radius))
    rotate(calc(-1 * var(--angle)));
}

.orbit-btn:hover {
  background: rgba(212, 167, 38, 0.35);
  border-color: var(--gold);
  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateX(var(--orbit-radius))
    rotate(calc(-1 * var(--angle)))
    scale(1.05);
  box-shadow: 0 0 25px var(--gold-glow);
}

.btn-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-light);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.orbit-btn:hover .btn-title {
  color: #fff;
}

/* AI Button with logo */
.ai-btn {
  width: 160px;
  height: 50px;
  flex-direction: row;
  gap: 0.5rem;
}

.orbit-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.ai-btn .btn-title {
  font-size: 0.85rem;
}

/* Coming soon buttons - more transparent */
.coming-soon-btn {
  background: transparent;
  border: 1px solid rgba(212, 167, 38, 0.3);
}

.coming-soon-btn .btn-title {
  color: rgba(212, 167, 38, 0.6);
}

.coming-soon-btn:hover {
  background: rgba(212, 167, 38, 0.1);
  border-color: var(--gold);
}

.coming-soon-btn:hover .btn-title {
  color: var(--gold-light);
}

/* ======================================================
   Footer
====================================================== */
.site-footer {
  margin-top: auto;
  padding: 2rem 1rem;
  width: 100%;
  text-align: center;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.site-footer a:hover {
  color: var(--gold-light);
}

.site-footer span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ======================================================
   Responsive - Tablet
====================================================== */
@media (max-width: 768px) {
  :root {
    --orbit-radius: 150px;
  }

  .radial-container {
    width: calc(var(--orbit-radius) * 2 + 150px);
    height: calc(var(--orbit-radius) * 2 + 150px);
  }

  .logo {
    max-width: 90px;
  }

  .center-piece h1 {
    font-size: 1.1rem;
  }

  .tagline {
    font-size: 0.8rem;
  }

  .orbit-btn {
    width: 110px;
    height: 36px;
    padding: 0.4rem 0.6rem;
  }

  .btn-title {
    font-size: 0.65rem;
  }

  .ai-btn {
    width: 120px;
    height: 40px;
  }

  .orbit-logo {
    width: 20px;
    height: 20px;
  }

  .ai-btn .btn-title {
    font-size: 0.65rem;
  }

  #splash-screen h1 {
    font-size: 2rem;
  }

  #splash-screen p {
    font-size: 1.1rem;
  }
}

/* ======================================================
   Responsive - Mobile (Switch to stacked layout)
====================================================== */
@media (max-width: 540px) {
  #main-content {
    padding: 1.5rem 1rem;
    justify-content: flex-start;
    padding-top: 2rem;
  }

  .radial-container {
    position: static;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .center-piece {
    position: static;
    margin-bottom: 1.5rem;
  }

  .logo {
    max-width: 100px;
  }

  .center-piece h1 {
    font-size: 1.4rem;
    margin-top: 0.75rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  /* Reset orbit positioning for stacked layout */
  .orbit-btn {
    position: static;
    transform: none !important;
    width: 100%;
    max-width: 280px;
    height: 48px;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
  }

  .orbit-btn:hover {
    transform: scale(1.02) !important;
  }

  .btn-title {
    font-size: 0.95rem;
  }

  .ai-btn {
    width: 100%;
    max-width: 280px;
    height: 52px;
    flex-direction: row;
    gap: 0.75rem;
  }

  .orbit-logo {
    width: 28px;
    height: 28px;
  }

  .ai-btn .btn-title {
    font-size: 0.95rem;
  }

  .site-footer {
    padding: 1.5rem 1rem;
    margin-top: 2rem;
  }

  #splash-screen h1 {
    font-size: 1.75rem;
    padding: 0 1rem;
  }

  #splash-screen p {
    font-size: 1rem;
  }
}
