/* ============ MOON HORIZON STUDIO ============ */

:root {
  --bg: #0a0620;
  --ink: #f2f0ff;
  --dim: #b9b3d9;
  --magenta: #ff5ecb;
  --violet: #7b4dff;
  --cyan: #41d6ff;
  --display: "Archivo", sans-serif;
  --mono: "Azeret Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  overflow: hidden;
  cursor: none;
}

@media (hover: none), (prefers-reduced-motion: reduce) {
  body { cursor: auto; }
  .cursor { display: none; }
}

::selection { background: var(--magenta); color: #14042a; }

a { color: inherit; text-decoration: none; }

/* ---------- warp canvas ---------- */
#warp {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.stars-fallback {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 45%, #341b6e 0%, #170b3d 40%, #090418 75%);
}

/* ---------- custom cursor ---------- */
.cursor { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.cursor-dot {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta);
}
.cursor-ring {
  position: absolute; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(255, 94, 203, 0.55);
  transition: width .25s ease, height .25s ease, border-color .25s ease;
}
.cursor.is-hover .cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--cyan);
}

/* ---------- hero (page unique) ---------- */
.hero {
  position: relative;
  z-index: 1;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.tagline {
  font-family: var(--mono);
  font-size: clamp(14px, 1.8vw, 20px);
  color: var(--ink);
  text-shadow: 0 0 20px rgba(65, 214, 255, 0.6);
  margin-bottom: 1.2rem;
  letter-spacing: 0.04em;
}

.title {
  display: flex;
  gap: 0.35em;
  flex-wrap: wrap;
  justify-content: center;
  font-size: clamp(3.2rem, 12.5vw, 12.5rem);
  line-height: 0.95;
  user-select: none;
}

/* Le remplissage vit sur ::before (background-clip: text peint dans la couche
   background, donc tout ce qui doit passer "derrière" va sur le texte de
   l'élément). Élément = fantômes chromatiques, ::before = verre, ::after =
   reflet qui balaye. */
.title .word {
  position: relative;
  font-style: italic;
  font-weight: 900;
  font-stretch: 120%;
  letter-spacing: -0.01em;
  color: transparent;
  text-shadow: -3px 0 rgba(255, 0, 180, 0.35), 3px 0 rgba(0, 200, 255, 0.35);
  filter: drop-shadow(0 10px 34px rgba(8, 2, 34, 0.8)) drop-shadow(0 0 40px rgba(170, 110, 255, 0.35));
}

/* remplissage "glace" : translucide, le tunnel se devine à travers */
.title .word::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.6) 0%,
    rgba(238,243,255,0.3) 42%,
    rgba(205,220,255,0.18) 56%,
    rgba(255,255,255,0.48) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.65);
  text-shadow: none;
}

.title .word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 30%, rgba(255,255,255,0.9) 48%, rgba(160,220,255,0.6) 52%, transparent 68%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  animation: shine 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine {
  0%, 55% { background-position: 120% 0; }
  85%, 100% { background-position: -60% 0; }
}

/* ---------- astronaute ---------- */
.astro {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: clamp(150px, 19vw, 250px);
  transform: translate(-50%, -55%);
  filter: drop-shadow(0 18px 44px rgba(10, 4, 32, 0.8)) drop-shadow(0 0 26px rgba(255, 94, 203, 0.25));
  pointer-events: none;
}
.astro-inner {
  position: relative;
  animation: floaty 5.2s ease-in-out infinite;
  will-change: transform;
}
.astro-img { width: 100%; height: auto; display: block; position: relative; }

/* deux flammes parallèles à la colonne du perso (tête à gauche, hanches à
   droite) : origine derrière les hanches, la queue dépasse sous les bottes
   vers le bas-droite */
.astro-flame {
  position: absolute;
  left: 28%;
  top: 58%;
  width: 54%;
  height: auto;
  transform: rotate(-30deg);
  transform-origin: top center;
  filter: blur(1px);
  overflow: visible;
}
@keyframes floaty {
  0%, 100% { transform: translateY(-10px) rotate(-2deg); }
  50% { transform: translateY(12px) rotate(2.5deg); }
}
.flame { transform-origin: 100px 6px; will-change: transform, opacity; }

/* ---------- CTA ---------- */
.hero-cta {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(36px, 7vh, 80px);
  padding: 18px 44px;
  border-radius: 999px;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
  font-weight: 800;
  font-style: italic;
  background: linear-gradient(120deg, #7b4dff, #ff5ecb);
  box-shadow: 0 0 40px rgba(255, 94, 203, 0.45), inset 0 2px 0 rgba(255,255,255,.4);
  transition: box-shadow .3s;
  will-change: transform;
}
.hero-cta:hover { box-shadow: 0 0 90px rgba(255, 94, 203, 0.85), inset 0 2px 0 rgba(255,255,255,.4); }
.rocket { display: inline-block; transition: transform .3s cubic-bezier(.2,2,.4,1); }
.hero-cta:hover .rocket { transform: translate(4px, -4px) rotate(8deg); }

.cta-rings {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.cta-rings::before, .cta-rings::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid rgba(255, 94, 203, 0.7);
  animation: ping 2.4s cubic-bezier(0, .6, .4, 1) infinite;
}
.cta-rings::after { animation-delay: 1.2s; }
@keyframes ping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- micro footer ---------- */
.micro {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(185, 179, 217, 0.55);
}

/* ---------- load-in ---------- */
.tagline, .title .word, .hero-cta, .micro {
  animation: rise 1s cubic-bezier(.2,.65,.3,1) both;
}
.tagline { animation-delay: .05s; }
.title .word:nth-child(1) { animation-delay: .15s; }
.title .word:nth-child(2) { animation-delay: .3s; }
.hero-cta { animation-delay: .55s; }
.micro { animation-delay: .8s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}
.astro { animation: astro-in 1.4s cubic-bezier(.2,.9,.3,1.1) .4s both; }
@keyframes astro-in {
  from { opacity: 0; transform: translate(-50%, 30%) scale(.6); }
  to { opacity: 1; transform: translate(-50%, -55%) scale(1); }
}

/* ---------- petits écrans ---------- */
@media (max-width: 720px) {
  .astro { top: 54%; }
  .micro .sep { display: block; height: 0; overflow: hidden; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
