html,
body.home-template {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body.home-template {
  overflow: hidden;
  background: #090310;
}

body.home-template > *:not(.g-load-transition__container):not(script) {
  display: none !important;
}

body.home-template .g-load-transition__container > *:not(.slfh-home) {
  display: none !important;
}

body.home-template .g-load-transition__container {
  width: 100%;
  height: 100svh;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.slfh-home {
  --pointer-x: 50vw;
  --pointer-y: 50vh;

  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  height: 100svh;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  background: #090310;
}

.slfh-home__background {
  position: absolute;
  z-index: -5;
  inset: -4%;
  background-color: #140623;
  background-image:
    linear-gradient(
      125deg,
      rgba(13, 2, 28, 0.42),
      rgba(73, 20, 105, 0.16)
    ),
    var(--slfh-background, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.08);
  animation: slfh-background-breathe 14s ease-in-out infinite alternate;
}

.slfh-home__aurora {
  position: absolute;
  z-index: -4;
  inset: -30%;
  overflow: hidden;
  filter: blur(75px) saturate(135%);
  opacity: 0.75;
  pointer-events: none;
}

.slfh-home__orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  mix-blend-mode: screen;
  will-change: transform;
}

.slfh-home__orb--one {
  top: 8%;
  left: 5%;
  width: 52vw;
  height: 48vw;
  background: rgba(130, 37, 255, 0.38);
  animation: slfh-orb-one 18s ease-in-out infinite alternate;
}

.slfh-home__orb--two {
  right: 3%;
  bottom: 2%;
  width: 55vw;
  height: 45vw;
  background: rgba(255, 42, 195, 0.24);
  animation: slfh-orb-two 22s ease-in-out infinite alternate;
}

.slfh-home__orb--three {
  top: 27%;
  left: 38%;
  width: 38vw;
  height: 38vw;
  background: rgba(53, 95, 255, 0.25);
  animation: slfh-orb-three 16s ease-in-out infinite alternate;
}

.slfh-home__halo {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(
      circle 320px at var(--pointer-x) var(--pointer-y),
      rgba(218, 173, 255, 0.20),
      rgba(126, 47, 205, 0.07) 42%,
      transparent 72%
    );
  pointer-events: none;
}

.slfh-home__vignette {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(
      circle at center,
      transparent 22%,
      rgba(5, 0, 13, 0.18) 62%,
      rgba(5, 0, 13, 0.55) 115%
    );
  pointer-events: none;
}

.slfh-home__content {
  --title-x: 0px;
  --title-y: 0px;
  --title-rotate-x: 0deg;
  --title-rotate-y: 0deg;

  position: relative;
  z-index: 2;
  padding: 2rem;
  text-align: center;
  perspective: 800px;
  transform:
    translate3d(var(--title-x), var(--title-y), 0)
    rotateX(var(--title-rotate-x))
    rotateY(var(--title-rotate-y));
  transition: transform 120ms linear;
  will-change: transform;
}

.slfh-home h1 {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15em;
  margin: 0;
  color: #fff;
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-size: clamp(2.8rem, 8vw, 7.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.045em;
  text-shadow:
    0 0 20px rgba(222, 183, 255, 0.13),
    0 8px 45px rgba(0, 0, 0, 0.55);
  opacity: 0;
  filter: blur(18px);
  transform: scale(0.92) translateY(18px);
  animation:
    slfh-title-reveal 1.65s cubic-bezier(0.16, 1, 0.3, 1)
    0.18s forwards;
}

.slfh-home__slash {
  color: rgba(248, 229, 255, 0.96);
  text-shadow:
    0 0 8px rgba(226, 172, 255, 0.72),
    0 0 28px rgba(170, 72, 255, 0.58);
  animation: slfh-slash-pulse 2.4s ease-in-out 1.8s infinite;
}

.slfh-home__name {
  transition:
    text-shadow 500ms ease,
    color 500ms ease;
}

.slfh-home h1:hover .slfh-home__name {
  color: #fff;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.24),
    0 0 34px rgba(197, 117, 255, 0.25);
}

@keyframes slfh-title-reveal {
  0% {
    opacity: 0;
    filter: blur(18px);
    transform: scale(0.92) translateY(18px);
  }

  65% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1) translateY(0);
  }
}

@keyframes slfh-slash-pulse {
  0%,
  100% {
    opacity: 0.72;
    text-shadow:
      0 0 7px rgba(226, 172, 255, 0.52),
      0 0 20px rgba(170, 72, 255, 0.38);
  }

  50% {
    opacity: 1;
    text-shadow:
      0 0 12px rgba(245, 220, 255, 0.92),
      0 0 38px rgba(180, 85, 255, 0.78);
  }
}

@keyframes slfh-background-breathe {
  from {
    transform: scale(1.08);
    filter: brightness(0.92);
  }

  to {
    transform: scale(1.14);
    filter: brightness(1.08);
  }
}

@keyframes slfh-orb-one {
  from {
    transform: translate3d(-4%, -6%, 0) scale(0.92);
  }

  to {
    transform: translate3d(30%, 20%, 0) scale(1.18);
  }
}

@keyframes slfh-orb-two {
  from {
    transform: translate3d(8%, 8%, 0) scale(1.12);
  }

  to {
    transform: translate3d(-28%, -22%, 0) scale(0.9);
  }
}

@keyframes slfh-orb-three {
  from {
    transform: translate3d(-12%, 22%, 0) scale(0.88);
  }

  to {
    transform: translate3d(22%, -20%, 0) scale(1.15);
  }
}

@media (max-width: 600px) {
  .slfh-home__content {
    padding: 1.25rem;
  }

  .slfh-home h1 {
    font-size: clamp(2.5rem, 15vw, 4.5rem);
  }

  .slfh-home__halo {
    background:
      radial-gradient(
        circle 210px at var(--pointer-x) var(--pointer-y),
        rgba(218, 173, 255, 0.18),
        transparent 72%
      );
  }
}

@media (prefers-reduced-motion: reduce) {
  .slfh-home__background,
  .slfh-home__orb,
  .slfh-home__slash {
    animation: none !important;
  }

  .slfh-home h1 {
    opacity: 1;
    filter: none;
    transform: none;
    animation: none;
  }

  .slfh-home__content {
    transform: none;
    transition: none;
  }
}

/* Flash renforcé du slash — slfh.app */
.slfh-home__slash {
  color: #fff;
  will-change: opacity, filter, text-shadow;
  animation: slfh-slash-pulse 2.4s ease-in-out 1.8s infinite;
}

@keyframes slfh-slash-pulse {
  0%,
  100% {
    opacity: 0.58;
    filter: brightness(0.9);
    text-shadow:
      0 0 5px rgba(226, 172, 255, 0.48),
      0 0 16px rgba(170, 72, 255, 0.34);
  }

  42% {
    opacity: 0.76;
    filter: brightness(1.15);
    text-shadow:
      0 0 9px rgba(245, 220, 255, 0.75),
      0 0 28px rgba(190, 100, 255, 0.58);
  }

  50% {
    opacity: 1;
    filter: brightness(2.15);
    text-shadow:
      0 0 4px rgba(255, 255, 255, 1),
      0 0 14px rgba(255, 255, 255, 0.98),
      0 0 35px rgba(225, 170, 255, 0.95),
      0 0 70px rgba(178, 72, 255, 0.82),
      0 0 110px rgba(132, 45, 255, 0.52);
  }

  58% {
    opacity: 0.76;
    filter: brightness(1.15);
    text-shadow:
      0 0 9px rgba(245, 220, 255, 0.75),
      0 0 28px rgba(190, 100, 255, 0.58);
  }
}

/* Flash plus rapide du slash */
.slfh-home__slash {
  animation-duration: 1.2s;
  animation-delay: 0.4s;
}

/* Test du fond noir — slfh.app */
html,
body.home-template,
.slfh-home {
  background: #000 !important;
}

.slfh-home__background {
  background-color: #000 !important;
  background-image: none !important;
  filter: none !important;
  animation: none !important;
}

/* Suppression des grandes masses violettes */
.slfh-home__aurora {
  opacity: 0 !important;
}

/* Halo interactif plus neutre sur fond noir */
.slfh-home__halo {
  background:
    radial-gradient(
      circle 340px at var(--pointer-x) var(--pointer-y),
      rgba(255, 255, 255, 0.10),
      rgba(190, 120, 255, 0.045) 40%,
      transparent 72%
    ) !important;
}

/* Vignette très légère pour conserver de la profondeur */
.slfh-home__vignette {
  background:
    radial-gradient(
      circle at center,
      transparent 20%,
      rgba(0, 0, 0, 0.18) 65%,
      rgba(0, 0, 0, 0.70) 120%
    ) !important;
}

/* =========================================================
   Univers self-hosted — couche indépendante de l’effet WOW
   ========================================================= */

.slfh-home__universe {
  position: absolute;
  z-index: -3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/*
 * Le titre reste toujours au-dessus des mots,
 * avec une légère zone sombre préservant sa lisibilité.
 */
.slfh-home__content::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(620px, 85vw);
  height: min(260px, 34vh);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.54) 0%,
    rgba(0, 0, 0, 0.22) 42%,
    transparent 74%
  );
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

@media (max-width: 700px) {
  .slfh-home__content::before {
    width: 92vw;
    height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slfh-home__universe {
    opacity: 0.38;
  }
}

/* =========================================================
   Univers self-hosted — couche indépendante de l’effet WOW
   ========================================================= */

.slfh-home__universe {
  position: absolute;
  z-index: -3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/*
 * Le titre reste toujours au-dessus des mots,
 * avec une légère zone sombre préservant sa lisibilité.
 */
.slfh-home__content::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(620px, 85vw);
  height: min(260px, 34vh);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.54) 0%,
    rgba(0, 0, 0, 0.22) 42%,
    transparent 74%
  );
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

@media (max-width: 700px) {
  .slfh-home__content::before {
    width: 92vw;
    height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slfh-home__universe {
    opacity: 0.38;
  }
}

/* =========================================================
   Ciel étoilé scintillant — derrière l’univers self-hosted
   ========================================================= */

.slfh-home__stars {
  position: absolute;
  z-index: -4;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.92;
  pointer-events: none;
}

@media (max-width: 700px) {
  .slfh-home__stars {
    opacity: 0.78;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slfh-home__stars {
    opacity: 0.58;
  }
}

/* =========================================================
   Onde énergétique synchronisée avec le flash du slash
   ========================================================= */

.slfh-home__energy {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.slfh-home__energy::before,
.slfh-home__energy::after {
  position: absolute;
  top: var(--slfh-energy-y, 50%);
  left: var(--slfh-energy-x, 50%);
  border-radius: 50%;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.08);
}

.slfh-home__energy::before {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 226, 255, 0.95);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.76),
    0 0 24px rgba(213, 145, 255, 0.62),
    inset 0 0 12px rgba(255, 255, 255, 0.32);
}

.slfh-home__energy::after {
  width: 90px;
  height: 90px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(212, 145, 255, 0.22) 22%,
    rgba(130, 105, 255, 0.08) 48%,
    transparent 72%
  );
  filter: blur(2px);
}

.slfh-home.slfh-energy-pulse
.slfh-home__energy::before {
  animation: slfh-energy-wave 900ms
    cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slfh-home.slfh-energy-pulse
.slfh-home__energy::after {
  animation: slfh-energy-glow 720ms ease-out forwards;
}

/*
 * Les étoiles et les mots reçoivent brièvement
 * la lumière émise par le slash.
 */
.slfh-home__stars,
.slfh-home__universe,
.slfh-home__halo {
  transition:
    filter 520ms ease,
    opacity 520ms ease;
}

.slfh-home.slfh-energy-pulse
.slfh-home__stars {
  filter:
    brightness(1.42)
    drop-shadow(0 0 4px rgba(226, 190, 255, 0.32));
}

.slfh-home.slfh-energy-pulse
.slfh-home__universe {
  filter:
    brightness(1.18)
    saturate(1.12);
}

.slfh-home.slfh-energy-pulse
.slfh-home__halo {
  filter:
    brightness(1.17)
    saturate(1.08);
}

@keyframes slfh-energy-wave {
  0% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      scale(0.08);
  }

  14% {
    opacity: 0.68;
  }

  100% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      scale(25);
  }
}

@keyframes slfh-energy-glow {
  0% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      scale(0.12);
  }

  20% {
    opacity: 0.82;
  }

  100% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      scale(5.8);
  }
}

@media (max-width: 700px) {
  .slfh-home__energy::before {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slfh-home__energy {
    display: none;
  }

  .slfh-home__stars,
  .slfh-home__universe,
  .slfh-home__halo {
    transition: none;
  }
}

/* =========================================================
   Constellation interactive SLFH
   ========================================================= */

.slfh-home__constellation {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.slfh-home h1 {
  cursor: default;
  touch-action: manipulation;
}

.slfh-home.slfh-energy-pulse
.slfh-home__constellation {
  filter:
    brightness(1.22)
    saturate(1.10);
}

@media (max-width: 700px) {
  .slfh-home__constellation {
    opacity: 0.88;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slfh-home__constellation {
    display: none;
  }
}
