/* ══════════════════════════════════════════════
   LUNE — SHARED STYLES
   Dark cosmic theme, purple/pink/cyan palette
══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  background: #060212;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
}

:root {
  --p: #8A5CFF;
  --s: #C86BFF;
  --a: #FF78D1;
  --g: #B48CFF;
  --cy: #8DEBFF;
  --disc: #5865F2;
  --t2: rgba(200, 180, 255, .72);
  --t3: rgba(180, 150, 255, .45);
  --gb: rgba(138, 92, 255, .07);
  --r: 16px;
  --rp: 50px;
  --accent2: #B48CFF;
  --nav-h: 68px;
}

/* ── COSMIC BACKGROUND ── */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 5%, #1E0A50 0%, #0D0428 40%, #060212 70%, #100530 100%);
}
.neb { position: absolute; border-radius: 50%; pointer-events: none; }
.n1 {
  width: 160vw; height: 120vh; top: -30vh; left: -20vw;
  background: radial-gradient(ellipse, rgba(138,92,255,.22) 0%, rgba(200,107,255,.10) 40%, transparent 68%);
  filter: blur(90px);
  animation: nebDrift 24s ease-in-out infinite alternate;
}
.n2 {
  width: 120vw; height: 90vh; top: 20%; right: -20vw;
  background: radial-gradient(ellipse, rgba(255,120,209,.15) 0%, rgba(141,235,255,.07) 44%, transparent 68%);
  filter: blur(100px);
  animation: nebDrift 30s ease-in-out infinite alternate-reverse;
}
.n3 {
  width: 100vw; height: 80vh; bottom: 0; left: 10%;
  background: radial-gradient(ellipse, rgba(70,30,200,.18) 0%, rgba(200,107,255,.08) 52%, transparent 68%);
  filter: blur(110px);
  animation: nebDrift 38s ease-in-out infinite alternate;
}
@keyframes nebDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(2vw, 1.5vh) scale(1.08); }
}

.stars { position: absolute; inset: 0; }
.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--d, 3s) ease-in-out infinite alternate;
  animation-delay: var(--dl, 0s);
}
@keyframes twinkle {
  from { opacity: var(--a1, .2); transform: scale(1); }
  to { opacity: var(--a2, .9); transform: scale(var(--s, 1.3)); }
}

/* sparkle 4-point */
.sparkle {
  position: absolute;
  width: var(--sz, 16px);
  height: var(--sz, 16px);
  animation: sparklePop var(--d, 4s) ease-in-out infinite;
  animation-delay: var(--dl, 0s);
  opacity: 0;
  pointer-events: none;
}
.sparkle::before, .sparkle::after {
  content: '';
  position: absolute;
  background: var(--c, rgba(180,140,255,.9));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--c, rgba(180,140,255,.9));
}
.sparkle::before { width: 100%; height: 2px; top: 50%; left: 0; transform: translateY(-50%); }
.sparkle::after { width: 2px; height: 100%; top: 0; left: 50%; transform: translateX(-50%); }
@keyframes sparklePop {
  0%, 100% { opacity: 0; transform: rotate(0deg) scale(.5); }
  50% { opacity: 1; transform: rotate(45deg) scale(1); }
}

/* particle canvas */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .35;
}

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(6, 2, 18, .55);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid rgba(180, 140, 255, .08);
  transition: background .3s ease, border-color .3s ease;
}
.nav.scrolled {
  background: rgba(6, 2, 18, .85);
  border-bottom-color: rgba(180, 140, 255, .13);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 32px;
}
.nav-logo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .2em;
  background: linear-gradient(135deg, #EDD5FF 0%, #C86BFF 55%, #8DEBFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(180, 140, 255, .6));
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  color: rgba(210, 190, 255, .7);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 50px;
  transition: all .22s ease;
  letter-spacing: .02em;
}
.nav-link:hover { color: #fff; background: rgba(138, 92, 255, .12); }
.nav-link.active { color: #fff; background: rgba(138, 92, 255, .12); }

.btn-disc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #4A46D4, #6E5FF0);
  color: #fff;
  padding: 8px 18px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .8rem;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(88, 101, 242, .38);
  transition: all .25s ease;
  flex-shrink: 0;
}
.btn-disc:hover {
  box-shadow: 0 0 30px rgba(88, 101, 242, .65);
  transform: translateY(-1px);
}

/* HAMBURGER */
.hbg {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 7px;
  background: rgba(138, 92, 255, .1);
  border: 1px solid rgba(180, 140, 255, .18);
  border-radius: 10px;
  cursor: pointer;
  margin-left: auto;
}
.hbg span {
  display: block;
  height: 2px;
  background: rgba(200, 180, 255, .82);
  border-radius: 2px;
  transition: all .26s ease;
}
.hbg.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hbg.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hbg.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE DRAWER */
.mob-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 1, 15, .96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 190;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 80px 24px 40px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .3s ease, transform .3s ease;
}
.mob-drawer.open { opacity: 1; transform: translateY(0); }
.mob-drawer.visible { display: flex; }
.drawer-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(138, 92, 255, .1);
  border: 1px solid rgba(180, 140, 255, .18);
  color: rgba(200, 180, 255, .7);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-link {
  color: rgba(210, 185, 255, .9);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 14px 40px;
  border-radius: 50px;
  letter-spacing: .04em;
  transition: all .2s;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(180, 140, 255, .07);
}
.drawer-link:hover, .drawer-link.active { background: rgba(138, 92, 255, .14); color: #fff; }
.drawer-disc {
  background: linear-gradient(135deg, #4A46D4, #6E5FF0);
  color: #fff;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-shadow: 0 0 24px rgba(88, 101, 242, .4);
}

/* ── BUTTONS ── */
.btn-p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #5525D8, #8A3AEA, #B850F5);
  color: #fff;
  padding: 13px 28px;
  border-radius: var(--rp);
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  letter-spacing: .03em;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 26px rgba(138,92,255,.46), 0 0 55px rgba(138,92,255,.16), 0 1px 0 rgba(255,255,255,.14) inset;
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}
.btn-p::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  transition: left .55s ease;
}
.btn-p:hover::before { left: 100%; }
.btn-p:hover { box-shadow: 0 0 44px rgba(200,107,255,.65), 0 0 85px rgba(138,92,255,.22), 0 1px 0 rgba(255,255,255,.18) inset; transform: translateY(-2px); }

.btn-g {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(138,92,255,.07);
  border: 1px solid rgba(180,140,255,.2);
  color: rgba(210,185,255,.9);
  padding: 12px 24px;
  border-radius: var(--rp);
  font-weight: 600;
  font-size: .86rem;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: all .28s ease;
}
.btn-g:hover { background: rgba(138,92,255,.14); border-color: rgba(200,107,255,.36); color: #fff; transform: translateY(-1px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(180,140,255,.18);
  color: rgba(200,175,255,.7);
  padding: 12px 22px;
  border-radius: var(--rp);
  font-weight: 600;
  font-size: .84rem;
  text-decoration: none;
  transition: all .28s ease;
}
.btn-outline:hover { border-color: rgba(200,107,255,.35); color: #fff; background: rgba(138,92,255,.06); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rv {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.rv.in { opacity: 1; transform: translateY(0); }

/* ── FOOTER ── */
.footer {
  position: relative;
  z-index: 2;
  padding: 48px 24px 36px;
  border-top: 1px solid rgba(180,140,255,.07);
  margin-top: 40px;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-logo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .18em;
  background: linear-gradient(135deg, #EDD5FF, #C86BFF, #8DEBFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 9px;
  filter: drop-shadow(0 0 8px rgba(180,140,255,.5));
}
.footer-copy {
  font-size: .75rem;
  color: rgba(180,150,255,.35);
  max-width: 480px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: .78rem;
  color: rgba(180,150,255,.45);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-links a:hover { color: rgba(200,180,255,.8); }

/* CURSOR TRAIL */
.trail {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: trailFade .8s ease forwards;
}
@keyframes trailFade {
  from { opacity: .6; transform: scale(1); }
  to { opacity: 0; transform: scale(.1); }
}

/* GLITCH TEXT EFFECT */
@keyframes glitch1 {
  0%, 100% { clip-path: none; transform: none; }
  20% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 0); }
  40% { clip-path: inset(70% 0 10% 0); transform: translate(2px, 0); }
  60% { clip-path: inset(20% 0 75% 0); transform: translate(-1px, 0); }
  80% { clip-path: inset(60% 0 30% 0); transform: translate(1px, 0); }
}

/* GRID GLOW SEPARATOR */
.section-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,140,255,.18), rgba(200,107,255,.12), transparent);
  margin: 0 auto;
  max-width: 700px;
}

/* PAGE WRAPPER */
.page-wrap {
  padding-top: var(--nav-h);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .btn-disc { display: none; }
  .hbg { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
