/* ═══════════════════════════════════════════════════════════
   VA-Rebirth — page WIP « La forge astrale se rallume »
   Réutilise les tokens de marque (variables.css) + navbar.css + wip.css.
   ═══════════════════════════════════════════════════════════ */

/* ─── Tokens spécifiques ──────────────────────────── */
:root {
  --amber-deep: #7a4f26;
}

html,
body {
  background: var(--bg);
  overflow-x: hidden;
}
a:hover {
  color: var(--gold-hi);
}
::selection {
  background: rgba(217, 168, 90, 0.32);
  color: var(--ink);
}

/* ─── Scène plein écran ───────────────────────────── */
.stage {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 50% 6%, rgba(217, 168, 90, 0.1), transparent 60%),
    radial-gradient(900px 620px at 82% 78%, rgba(95, 212, 208, 0.05), transparent 60%),
    radial-gradient(800px 600px at 10% 85%, rgba(139, 125, 201, 0.06), transparent 60%),
    linear-gradient(
      180deg,
      rgba(3, 4, 10, 0.6) 0%,
      rgba(5, 6, 13, 0.55) 32%,
      rgba(5, 6, 13, 0.72) 72%,
      rgba(3, 4, 10, 0.92) 100%
    ),
    url('../../assets/bg-va-rebirth-wip.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
@media (max-width: 900px) {
  .stage {
    background-attachment: scroll;
  }
}

/* Couche étoiles (décorative) */
.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 14% 20%, #fff, transparent 50%),
    radial-gradient(1px 1px at 26% 46%, #fff, transparent 50%),
    radial-gradient(1px 1px at 40% 10%, rgba(255, 255, 255, 0.6), transparent 50%),
    radial-gradient(1px 1px at 58% 34%, #fff, transparent 50%),
    radial-gradient(1.5px 1.5px at 70% 16%, #fff, transparent 50%),
    radial-gradient(1px 1px at 84% 28%, rgba(255, 255, 255, 0.55), transparent 50%),
    radial-gradient(1px 1px at 92% 60%, #fff, transparent 50%),
    radial-gradient(1px 1px at 8% 62%, rgba(255, 255, 255, 0.4), transparent 50%),
    radial-gradient(1px 1px at 34% 72%, rgba(255, 255, 255, 0.5), transparent 50%);
}

/* Couche grain (décorative) */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ─── Navbar — variante WIP ───────────────────────── */
header {
  background: rgba(5, 6, 13, 0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
@media (max-width: 560px) {
  .nav-links {
    display: none;
  }
}

/* ─── Main / contenu WIP ──────────────────────────── */
main {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(72px, 8.5vh, 92px) 24px clamp(24px, 4.5vh, 44px);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(10px, 1.5vh, 22px);
}
.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: clamp(4px, 0.8vh, 12px) 0 clamp(6px, 1.2vh, 16px);
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 55%, var(--amber-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  font-size: clamp(18px, 2.6vw, 27px);
  margin: 0 0 clamp(16px, 2.8vh, 44px);
}

/* ─── Visuel « forge » ────────────────────────────── */
.forge {
  position: relative;
  width: min(62vw, 32vh, 340px);
  aspect-ratio: 1;
  margin: 0 auto clamp(16px, 2.8vh, 40px);
}
.forge-glow {
  position: absolute;
  inset: -24%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(217, 168, 90, 0.32),
    rgba(217, 168, 90, 0.1) 45%,
    transparent 70%
  );
  filter: blur(8px);
  animation: pulseGlow 6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.ring.r2 {
  inset: 9%;
  border-color: var(--cyan-soft);
}
.ring.r3 {
  inset: 18%;
  border-color: var(--line);
}

/* Anneau d'astralithes en orbite */
.astralithe-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: spin 70s linear infinite;
}
.astralithe {
  position: absolute;
  inset: 0;
}
.astralithe .upright {
  position: absolute;
  left: 50%;
  top: -4%;
  width: 34px;
  height: 34px;
  transform-origin: center;
}
.astralithe .upright img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px currentColor);
  animation: counterSpin 70s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes counterSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

/* Médaillon central — mascotte Astrax */
.medallion {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(217, 168, 90, 0.1), transparent 60%),
    linear-gradient(160deg, #0c0d16 0%, #05060d 100%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.medallion img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14%;
  filter: drop-shadow(0 0 18px rgba(217, 168, 90, 0.35));
}

/* Poussière de forge (générée en JS) */
.ember {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 6px var(--gold-hi);
  opacity: 0;
  animation: drift 9s linear infinite;
}
@keyframes drift {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  12% {
    opacity: 0.8;
  }
  88% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 10px), -90px);
  }
}

/* ─── Texte d'ambiance ────────────────────────────── */
.lede {
  max-width: min(52ch, 100%);
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 300;
  margin: 0 auto clamp(16px, 2.6vh, 40px);
}

/* ─── Bouton retour ───────────────────────────────── */
.back-cta {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 16px 26px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  font-weight: 600;
  text-transform: uppercase;
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: color 0.5s ease;
}
.back-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
  z-index: 0;
}
.back-cta:hover {
  color: #05060d;
}
.back-cta:hover::before {
  transform: translateX(0);
}
.back-cta span,
.back-cta svg {
  position: relative;
  z-index: 1;
}
.back-cta svg {
  transition: transform 0.4s ease;
  transform: scaleX(-1);
}
.back-cta:hover svg {
  transform: scaleX(-1) translateX(6px);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ─── Reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ember {
    display: none;
  }
}

@media (max-width: 480px) {
  main {
    padding: 92px 20px 52px;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.22em;
    gap: 8px;
  }
  .eyebrow::before,
  .eyebrow::after {
    width: 16px;
  }
  .forge {
    width: min(66vw, 300px);
  }
}
