/* ================================================
   MOON-TITAN — SHARED STYLESHEET
   Provides the unified design system across all pages.
   Each HTML file links this before any page-specific styles.
   ================================================ */

/* ---- Variables ---- */
:root {
  --bg:         #020617;
  --bg-card:    rgba(15, 23, 42, 0.6);
  --border:     rgba(139, 92, 246, 0.2);
  --border-dim: rgba(139, 92, 246, 0.12);
  --violet:     #a78bfa;
  --violet-dim: #7c3aed;
  --pink:       #ec4899;
  --text:       #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim:   #64748b;
  --header-h:   64px;
}

/* ---- Resets ---- */
html  { scroll-behavior: smooth; }
body  { background-color: var(--bg); }
*, *::before, *::after { box-sizing: border-box; }

/* ---- Animations ---- */
@keyframes mt-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}
@keyframes mt-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(139,92,246,.3); }
  50%       { box-shadow: 0 0 40px rgba(139,92,246,.6); }
}
@keyframes mt-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mt-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

.mt-float    { animation: mt-float   6s ease-in-out infinite; }
.mt-glow     { animation: mt-glow    3s ease-in-out infinite; }
.mt-fade-up  { animation: mt-fade-up .8s ease-out forwards; }
.mt-pulse    { animation: mt-pulse   2s ease-in-out infinite; }

/* Staggered fade-up delays */
.mt-delay-1 { animation-delay: .1s; opacity: 0; }
.mt-delay-2 { animation-delay: .22s; opacity: 0; }
.mt-delay-3 { animation-delay: .34s; opacity: 0; }

/* ---- Core Components ---- */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

.gradient-text {
  background: linear-gradient(135deg, var(--violet) 0%, var(--pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-hover {
  transition: transform .3s ease, box-shadow .3s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(139,92,246,.25);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  border-radius: .625rem;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  text-decoration: none;
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Primary — filled violet */
.btn-primary {
  background: #7c3aed;
  color: #fff;
  padding: .625rem 1.375rem;
}
.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 8px 24px rgba(124,58,237,.4);
}

/* Secondary — ghost / outline */
.btn-secondary {
  background: transparent;
  color: var(--violet);
  padding: .625rem 1.375rem;
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(139,92,246,.12);
  border-color: var(--violet);
}

/* Large size modifier */
.btn-lg {
  padding: .875rem 2rem;
  font-size: 1rem;
}

/* ---- Accordion / Details ---- */
details summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: "›";
  font-size: 1.35em;
  font-weight: 700;
  line-height: 1;
  color: var(--violet);
  float: right;
  transition: transform .25s ease;
}
details[open] summary::after {
  transform: rotate(90deg);
}

/* ---- Site Header (sub-pages) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dim);
}

.site-header__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-header__logo img  { width: 32px; height: 32px; }
.site-header__logo span {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  white-space: nowrap;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
}
.site-header__nav a {
  padding: .375rem .75rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: .5rem;
  transition: color .2s ease, background .2s ease;
  white-space: nowrap;
}
.site-header__nav a:hover {
  color: var(--violet);
  background: rgba(139,92,246,.1);
}
.site-header__nav a.active {
  color: var(--violet);
  background: rgba(139,92,246,.15);
}

/* Mobile: collapse nav links on very small screens */
@media (max-width: 600px) {
  .site-header__nav { display: none; }
}

/* ---- Page Hero (sub-pages) ---- */
.page-hero {
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-dim);
  background: linear-gradient(180deg, rgba(124,58,237,.06) 0%, transparent 100%);
}
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--violet);
  background: rgba(139,92,246,.1);
  border: 1px solid var(--border);
  padding: .3rem .85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.page-hero__title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 1rem;
}
.page-hero__sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

/* ---- Content Wrapper ---- */
.content-wrap {
  max-width: 56rem; /* ~900px — readable content width */
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.content-wrap--wide {
  max-width: 72rem; /* for gallery pages */
}

/* ---- Section Titles (all pages) ---- */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.65;
}

/* ---- Info Cards ---- */
.info-block {
  border-radius: .875rem;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

/* ---- Rule rows (✅ / ❌ lists inside panels) ---- */
.rule-block {
  background: rgba(15,23,42,.55);
  border-radius: .625rem;
  padding: 1.125rem 1.25rem;
  margin-bottom: .875rem;
}
.rule-block h4 {
  font-size: .9rem;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: .625rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rule-block p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: .2rem 0;
}

/* ---- Site Footer ---- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border-dim);
  margin-top: 4rem;
}
.site-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.site-footer__brand img  { width: 32px; }
.site-footer__brand span { font-size: .875rem; color: var(--text-muted); }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  justify-content: center;
}
.site-footer__links a {
  padding: .375rem .75rem;
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: .5rem;
  transition: color .2s ease, background .2s ease;
}
.site-footer__links a:hover {
  color: var(--violet);
  background: rgba(139,92,246,.1);
}
