/* ════════════════════════════════════════════════════════════
   ARIVON TUTORS — Solar System Explorer
   style.css
   Matches the games.html design language exactly
════════════════════════════════════════════════════════════ */

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

:root {
  --gold-deep: #b8860b;
  --gold-mid: #c9a227;
  --gold-warm: #d4a843;
  --gold-light: #e8c96a;
  --gold-pale: #f5e9c8;
  --cream: #f8f6f2;
  --cream-dark: #eeebe4;
  --navy-dark: #0d1528;
  --navy-mid: #1a2744;
  --navy-light: #243460;
  --navy-text: #1a2744;
  --white-warm: #fffdf7;
  --shadow-gold: rgba(196, 154, 67, 0.18);
  --canvas-bg: #060b14;
  --font-display: 'Cinzel', serif;
  --font-serif: 'Cormorant Garamond', serif;
  --font-body: 'EB Garamond', serif;
  --font-game: 'Nunito', sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--cream);
  color: var(--navy-text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

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

::-webkit-scrollbar-track {
  background: var(--cream-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-warm);
  border-radius: 3px;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  background: rgba(13, 21, 40, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 168, 67, 0.15);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  color: var(--white-warm);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.1;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo-text span {
  font-size: 0.42rem;
  letter-spacing: 0.4em;
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  margin-top: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-badge {
  font-family: var(--font-game);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--gold-deep);
  color: var(--navy-dark);
  padding: 0.22rem 0.65rem;
}

.nav-back {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: rgba(232, 201, 122, 0.7);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-back:hover {
  color: var(--gold-light);
}

/* ── PAGE HERO ── */
.page-hero {
  padding-top: 64px;
  background: linear-gradient(135deg, #0a0f1e 0%, #0d1528 40%, #1a2744 70%, #0a0f1e 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(212, 168, 67, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 25% 70%, rgba(74, 124, 89, 0.06) 0%, transparent 55%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 5% 3rem;
}

.hero-eyebrow {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.45em;
  color: var(--gold-warm);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--gold-warm);
  opacity: 0.4;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--white-warm);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
  font-family: var(--font-serif);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(248, 246, 242, 0.65);
  margin-bottom: 1.8rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-pill {
  font-family: var(--font-game);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.9rem;
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid rgba(212, 168, 67, 0.25);
  color: var(--gold-light);
  border-radius: 2px;
}

/* ── CONTROLS BAR ── */
.controls-bar {
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(212, 168, 67, 0.12);
  padding: 0.75rem 0;
  position: sticky;
  top: 64px;
  z-index: 500;
}

.controls-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ctrl-label {
  font-family: var(--font-game);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold-warm);
  text-transform: uppercase;
}

.ctrl-slider {
  -webkit-appearance: none;
  width: 120px;
  height: 4px;
  background: rgba(212, 168, 67, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.ctrl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-warm);
  cursor: pointer;
  transition: background 0.2s;
}

.ctrl-slider::-webkit-slider-thumb:hover {
  background: var(--gold-light);
}

.ctrl-val {
  font-family: var(--font-game);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-light);
  min-width: 2.5rem;
}

.ctrl-btn {
  font-family: var(--font-game);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.32rem 0.8rem;
  background: transparent;
  border: 1px solid rgba(212, 168, 67, 0.3);
  color: rgba(232, 201, 122, 0.7);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
  text-transform: uppercase;
}

.ctrl-btn:hover,
.ctrl-btn.active {
  background: rgba(212, 168, 67, 0.12);
  border-color: var(--gold-warm);
  color: var(--gold-light);
}

.ctrl-hint {
  margin-left: auto;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.78rem;
  color: rgba(248, 246, 242, 0.4);
}

/* ── CANVAS WRAPPER ── */
#canvas-wrapper {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 500px;
  background: var(--canvas-bg);
  overflow: hidden;
}

#solarCanvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── HOVER TOOLTIP ── */
.hover-tooltip {
  position: absolute;
  background: rgba(13, 21, 40, 0.92);
  border: 1px solid rgba(212, 168, 67, 0.35);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  z-index: 200;
}

.hover-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── INFO CARD ── */
.info-card {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%) translateX(20px);
  width: 300px;
  background: rgba(10, 15, 30, 0.96);
  border: 1px solid rgba(212, 168, 67, 0.3);
  backdrop-filter: blur(16px);
  padding: 1.8rem 1.6rem 1.6rem;
  z-index: 300;
  transition: opacity 0.35s ease, transform 0.35s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 168, 67, 0.05);
}

.info-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(30px);
}

.info-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: transparent;
  border: 1px solid rgba(212, 168, 67, 0.25);
  color: rgba(232, 201, 122, 0.6);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.2s;
  border-radius: 2px;
}

.info-close:hover {
  background: rgba(212, 168, 67, 0.1);
  color: var(--gold-light);
}

.info-icon {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
  text-align: center;
}

.info-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--white-warm);
  text-align: center;
  margin-bottom: 0.25rem;
}

.info-type {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--gold-warm);
  letter-spacing: 0.2em;
  text-align: center;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.info-stat {
  background: rgba(212, 168, 67, 0.05);
  border: 1px solid rgba(212, 168, 67, 0.12);
  padding: 0.7rem 0.6rem;
}

.info-stat-label {
  font-family: var(--font-game);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(232, 201, 122, 0.5);
  margin-bottom: 0.3rem;
}

.info-stat-val {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gold-light);
  line-height: 1.3;
}

.info-facts-label {
  font-family: var(--font-game);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-warm);
  margin-bottom: 0.6rem;
}

.info-facts ul {
  list-style: none;
  padding: 0;
}

.info-facts ul li {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(248, 246, 242, 0.75);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(212, 168, 67, 0.08);
  display: flex;
  gap: 0.5rem;
  line-height: 1.4;
}

.info-facts ul li::before {
  content: '–';
  color: var(--gold-warm);
  flex-shrink: 0;
}

/* ── LOADING OVERLAY ── */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--canvas-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.8s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-inner {
  text-align: center;
}

.loading-sun {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe0 0%, #f5c518 40%, #e8860b 80%, transparent 100%);
  box-shadow: 0 0 30px 15px rgba(245, 197, 24, 0.3), 0 0 60px 30px rgba(245, 197, 24, 0.1);
  margin: 0 auto 1.5rem;
  animation: sunPulse 1.5s ease-in-out infinite;
}

@keyframes sunPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px 15px rgba(245, 197, 24, 0.3), 0 0 60px 30px rgba(245, 197, 24, 0.1);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 40px 20px rgba(245, 197, 24, 0.45), 0 0 80px 40px rgba(245, 197, 24, 0.15);
  }
}

.loading-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--white-warm);
  margin-bottom: 0.4rem;
}

.loading-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.8rem;
  color: rgba(232, 201, 122, 0.5);
  letter-spacing: 0.1em;
}

/* ── QUICK NAV ── */
.quick-nav-section {
  background: var(--navy-dark);
  border-top: 1px solid rgba(212, 168, 67, 0.1);
  border-bottom: 1px solid rgba(212, 168, 67, 0.1);
  padding: 2rem 0;
}

.quick-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.qn-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  font-weight: 400;
  color: var(--gold-warm);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.qn-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(212, 168, 67, 0.15);
}

.qn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.8rem;
}

.qn-btn {
  background: transparent;
  border: 1px solid rgba(212, 168, 67, 0.2);
  color: rgba(248, 246, 242, 0.7);
  padding: 0.7rem 0.5rem;
  cursor: pointer;
  font-family: var(--font-game);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  transition: all 0.25s;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.qn-btn .qn-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: block;
}

.qn-btn:hover {
  background: rgba(212, 168, 67, 0.08);
  border-color: var(--gold-warm);
  color: var(--gold-light);
  transform: translateY(-2px);
}

/* ── FOOTER ── */
footer {
  background: var(--navy-dark);
  border-top: 1px solid rgba(212, 168, 67, 0.1);
}

.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 5% 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand h2 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--white-warm);
  margin-bottom: 0.2rem;
}

.footer-brand .tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold-warm);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.82rem;
  color: rgba(248, 246, 242, 0.5);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.footer-social {
  display: flex;
  gap: 0.8rem;
}

.social-link {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(212, 168, 67, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232, 201, 122, 0.6);
  text-decoration: none;
  transition: all 0.25s;
  border-radius: 2px;
}

.social-link:hover {
  background: rgba(212, 168, 67, 0.1);
  border-color: var(--gold-warm);
  color: var(--gold-light);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white-warm);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 168, 67, 0.15);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  font-family: var(--font-body);
  font-size: 0.83rem;
  color: rgba(248, 246, 242, 0.5);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 5%;
  border-top: 1px solid rgba(212, 168, 67, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(248, 246, 242, 0.35);
  letter-spacing: 0.05em;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(248, 246, 242, 0.35);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .ctrl-hint {
    display: none;
  }

  .info-card {
    right: 50%;
    transform: translateX(50%) translateY(0);
    top: auto;
    bottom: 1rem;
    width: calc(100% - 2rem);
    max-width: 340px;
  }

  .info-card.hidden {
    transform: translateX(50%) translateY(20px);
  }
}

@media (max-width: 600px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .controls-inner {
    gap: 0.8rem;
  }

  .ctrl-slider {
    width: 80px;
  }

  #canvas-wrapper {
    height: 60vh;
  }

  .qn-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}