/* ============================================================
   site.css — Seek Arcana
   Shared styles across all pages.
   Page-specific styles live in each page's <style> block.
   ============================================================ */

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  --bg:            #080414;
  --bg-off:        #0b0620;
  --bg-card:       #0e0828;
  --bg-elevated:   #120a2e;
  --bg-input:      rgba(139,90,200,0.06);

  --gold:          #d4af37;
  --gold-light:    #e8c96a;
  --gold-soft:     rgba(212,175,55,0.1);
  --gold-mid:      rgba(212,175,55,0.25);
  --gold-muted:    rgba(212,175,55,0.5);

  --purple:        #8b5ac8;
  --purple-deep:   #2a1055;
  --purple-soft:   rgba(139,90,200,0.08);
  --purple-mid:    rgba(139,90,200,0.25);
  --purple-glow:   rgba(139,90,200,0.15);

  --cream:         #e8d5b7;
  --lavender:      #b8a0c8;
  --lav-muted:     rgba(184,160,200,0.5);
  --lav-faint:     rgba(184,160,200,0.3);

  --green:         #4ade80;
  --amber:         #fbbf24;

  --rule:          rgba(212,175,55,0.08);
  --rule-strong:   rgba(212,175,55,0.15);
  --nav-h:         64px;

  --font-display:  'Cormorant Garamond', serif;
  --font-body:     'Crimson Text', serif;
  --font-label:    'Cinzel', serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

section[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--cream);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── SKIP LINK — WCAG 2.1 AA ────────────────────────────── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 0 0 6px 6px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 1px;
  z-index: 9999;
  transition: top 0.2s ease;
  white-space: nowrap;
  visibility: hidden;
}
.skip-link:focus { top: 0; visibility: visible; }

/* ── FOCUS STATES — WCAG 2.2 AA ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── SCROLL PROGRESS BAR ─────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(212,175,55,0.3) 100%);
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── SCROLL REVEAL ───────────────────────────────────────── */
.sr {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.sr.sr-visible { opacity: 1; transform: translateY(0); }
.sr-d1 { transition-delay: 0.1s; }
.sr-d2 { transition-delay: 0.2s; }
.sr-d3 { transition-delay: 0.3s; }
.sr-d4 { transition-delay: 0.4s; }

/* ── STARFIELD ───────────────────────────────────────────── */
.starfield {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.star {
  position: absolute;
  color: rgba(212,175,55,0.2);
  animation: twinkle var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
}
@keyframes twinkle { 0%,100% { opacity: 0.08; } 50% { opacity: 0.42; } }

/* ── LAYOUT ──────────────────────────────────────────────── */
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.section-inner--narrow { max-width: 800px; }

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(8,4,20,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo-text {
  font-family: var(--font-label);
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 3px;
}
.nav-logo-sub {
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--gold-muted);
  letter-spacing: 2px;
  margin-top: -2px;
  display: block;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  color: var(--lav-muted);
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--cream); }
.nav-cta {
  background: linear-gradient(135deg, var(--purple), #5a2d8b);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 2px;
  transition: box-shadow 0.2s, transform 0.15s;
}
.nav-cta:hover {
  box-shadow: 0 4px 16px rgba(139,90,200,0.3);
  transform: translateY(-1px);
}

/* ── NAV: HAMBURGER ──────────────────────────────────────── */
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span {
  width: 22px; height: 1.5px;
  background: var(--cream);
  transition: transform 0.2s, opacity 0.2s;
  display: block;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── NAV: MOBILE OVERLAY ─────────────────────────────────── */
.mobile-nav-overlay {
  position: fixed; inset: 0;
  background: rgba(8,4,20,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 99;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-nav-overlay.visible { opacity: 1; }
.mobile-nav-overlay a {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--cream);
  transition: color 0.2s;
}
.mobile-nav-overlay a:hover { color: var(--gold); }
.mobile-nav-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: var(--gold-muted);
  cursor: pointer;
  padding: 8px;
}
.mobile-nav-cta {
  background: linear-gradient(135deg, var(--purple), #5a2d8b);
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 10px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 2px;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 2.5px;
  padding: 14px 32px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #8b6914);
  color: var(--bg);
  font-weight: 600;
}
.btn-gold:hover {
  box-shadow: 0 4px 24px rgba(212,175,55,0.35);
  transform: translateY(-2px);
}
.btn-purple {
  background: linear-gradient(135deg, var(--purple), #5a2d8b);
  color: #fff;
}
.btn-purple:hover {
  box-shadow: 0 4px 20px rgba(139,90,200,0.3);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--gold-mid);
  color: var(--gold-muted);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── OVERLINE / SECTION HEADERS ──────────────────────────── */
.overline {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold-muted);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 300;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-subtitle {
  color: var(--lav-muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 560px;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: #060310;
  border-top: 1px solid var(--rule);
  padding: 48px 24px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .nav-logo-text { margin-bottom: 12px; display: block; }
.footer-brand p {
  color: var(--lav-faint);
  font-size: 14px;
  line-height: 1.7;
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--gold-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--lav-muted);
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  max-width: 1080px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  color: var(--lav-faint);
  font-size: 12px;
}
.footer-bottom a {
  color: var(--lav-faint);
  font-size: 12px;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: var(--cream); }

/* ── BACK TO TOP ─────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-mid);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, box-shadow 0.2s;
  pointer-events: none;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover { box-shadow: 0 4px 16px rgba(212,175,55,0.2); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
