/* ============================================================
   base.css — AstroVault
   Shared across ALL pages: reset, variables, typography,
   nav, footer, buttons, section utilities, glow divider.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@400;500;600&display=swap');

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

/* ── Design tokens ── */
:root {
  --bg:           #0D0B14;
  --surface:      #13101F;
  --surface2:     #1C1730;
  --brand:        #7C3AED;
  --brand-light:  #9D5CF6;
  --brand-glow:   rgba(124, 58, 237, 0.35);
  --violet-soft:  #C4B5FD;
  --gold:         #F59E0B;
  --gold-light:   #FCD34D;
  --text:         #F1EEF9;
  --text-muted:   #8B7FB5;
  --border:       rgba(196, 181, 253, 0.12);
  --card-bg:      rgba(28, 23, 48, 0.8);

  --radius-sm:    8px;
  --radius-md:    10px;
  --radius-lg:    16px;

  --transition:   0.2s ease;
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

/* ── Starfield canvas (shared, used on index + store) ── */
#stars-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  height: 64px;
  background: rgba(13, 11, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-logo span {
  color: var(--brand-light);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover {
  color: var(--text);
}

/* ── MOBILE NAV TOGGLE ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span::after  { transform: rotate(-45deg) translate(5px, -5px); }

.nav-cta {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
  display: inline-block;
}
.nav-cta:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 0 30px var(--brand-glow);
}
.btn-primary:hover {
  background: var(--brand-light);
  transform: translateY(-2px);
  box-shadow: 0 0 50px var(--brand-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-secondary:hover {
  border-color: var(--violet-soft);
  color: var(--violet-soft);
}

/* ── SECTION UTILITIES ── */
section {
  position: relative;
  z-index: 1;
  padding: 6rem 5vw;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--violet-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--brand-light);
}

.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 3rem;
}

/* ── GLOW DIVIDER ── */
.glow-divider {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.4;
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  padding: 3rem 5vw;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text);
}
.footer-brand span {
  color: var(--brand-light);
}

.bir-seal-link {
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
  transition: opacity var(--transition);
}
.bir-seal-link:hover {
  opacity: 1;
}
.bir-seal-badge {
  height: 44px;
  width: auto;
  display: block;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: var(--text);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav {
    padding: 0 1rem;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(13, 11, 20, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }
  .nav-cta {
    display: none;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}