/* =========================================================================
   XNOVA SYSTEMS — PAGE D'ACCUEIL (spécifique ; les composants partagés sont dans styles.css)
   Héros (entrée orchestrée + scène 3D), bandeau de preuves, bloc fondateur.
   ========================================================================= */

/* ---------- Héros ---------- */

.hero {
  position: relative;
  padding-top: calc(var(--nav-height) + clamp(var(--space-7), 7vw, var(--space-9)));
  padding-bottom: clamp(var(--space-7), 6vw, var(--space-9));
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  background:
    radial-gradient(50% 50% at 75% 30%, rgba(0, 102, 255, 0.16) 0%, rgba(0, 102, 255, 0) 70%),
    radial-gradient(40% 40% at 15% 10%, rgba(0, 240, 255, 0.06) 0%, rgba(0, 240, 255, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--space-8);
  }
}

.hero__title {
  max-width: 16ch;
}

.hero__lead {
  margin-top: var(--space-5);
  max-width: 52ch;
}

.hero__actions {
  margin-top: var(--space-6);
}

/* Composition : capture d'un projet client + Muslim+ en main.
   .hero__visual porte la perspective ; .hero__stage est la scène inclinée par motion.js
   (data-tilt) : le téléphone et les légendes flottent devant la capture (translateZ). */
.hero__visual {
  perspective: 1400px;
}

.hero__stage {
  position: relative;
  padding-bottom: 14%;
  transform-style: preserve-3d;
}

.hero__shot {
  position: relative;
  width: 86%;
  transform-style: preserve-3d;
}

.hero__phone {
  position: absolute;
  right: -2%;
  bottom: -4%;
  width: 44%;
  transform: translateZ(70px);
  transform-style: preserve-3d;
}

/* Reflet sur la capture : il glisse avec l'inclinaison de la scène (--tilt-x / --tilt-y) */
.hero__shot .media-frame {
  position: relative;
}

.hero__shot .media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at calc(30% + var(--tilt-x, 0) * 30%) calc(20% + var(--tilt-y, 0) * 30%), rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}

.hero__phone img {
  width: 100%;
  aspect-ratio: 0.78;
  object-fit: cover;
  object-position: 45% 50%;
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.55));
}

.hero__caption {
  position: absolute;
  background: var(--color-surface-2);
  box-shadow: var(--shadow-md);
}

.hero__caption.tag--accent {
  background: linear-gradient(var(--color-accent-soft), var(--color-accent-soft)), var(--color-surface-2);
}

/* Sous la barre du navigateur, à gauche : jamais recouverte par le téléphone */
.hero__shot .hero__caption {
  top: calc(32px + var(--space-3));
  left: var(--space-3);
  transform: translateZ(40px);
}

.hero__phone .hero__caption {
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%) translateZ(30px);
}

@media (max-width: 559px) {
  .hero__shot {
    width: 92%;
  }

  .hero__phone {
    width: 48%;
    right: 0;
  }

  .hero__phone .hero__caption {
    bottom: 2%;
  }
}

/* ---------- Bandeau de preuves (clients) ---------- */

.proof {
  border-block: 1px solid var(--color-border);
}

.proof__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-7);
  padding-block: var(--space-6);
}

.proof__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-subtle);
}

.proof__clients {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-7);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  color: var(--color-text-muted);
}

.proof__todo {
  flex-basis: 100%;
}

@media (min-width: 1200px) {
  .proof__todo {
    flex-basis: auto;
    margin-left: auto;
  }
}

.proof__stats {
  flex-basis: 100%;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

/* ---------- Fondateur ---------- */

.founder {
  display: grid;
  gap: var(--space-6) var(--space-8);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 900px) {
  .founder {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

.founder__photo {
  max-width: 320px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(70% 60% at 50% 100%, rgba(0, 102, 255, 0.3) 0%, rgba(0, 0, 0, 0) 70%),
    var(--color-surface-2);
}

.founder__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 100%;
}

.founder__body {
  max-width: 680px;
  height: auto;
}

.founder__body .eyebrow {
  margin-bottom: 0;
}

.founder__body .quote__author {
  margin-top: 0;
}

/* Tchapa en attendant ses captures : icône et mention « Bientôt disponible » */
.app-card__media--soon {
  align-content: center;
  gap: var(--space-4);
}

.app-card__soon-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  font-size: 1.75rem;
}

.app-card__soon-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@media (min-width: 900px) {
  /* Même hauteur de visuel que la carte Muslim+ voisine */
  .app-card__media--soon {
    min-height: 320px;
  }
}

/* Légendes posées sur le visuel du héros : police de texte, plus compacte que le mono des tags */
.hero__caption {
  font-family: var(--font-body);
  font-weight: 500;
}

/* Vague de particules 3D (hero-wave.js) : décor derrière le contenu, fondu en haut et en bas */
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s var(--ease-out);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 85%, transparent 100%);
}

/* Grand écran : la vague s'efface derrière le texte (colonne de gauche) pour garder la lecture nette */
@media (min-width: 1024px) {
  .hero__canvas {
    -webkit-mask-image:
      linear-gradient(to bottom, transparent 0%, #000 45%, #000 85%, transparent 100%),
      linear-gradient(to right, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.35) 40%, #000 62%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to bottom, transparent 0%, #000 45%, #000 85%, transparent 100%),
      linear-gradient(to right, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.35) 40%, #000 62%);
    mask-composite: intersect;
  }
}

.hero__canvas.is-ready {
  opacity: 1;
}

/* ---------- Entrée du héros : un seul moment orchestré au chargement ----------
   En CSS pur (aucune dépendance au JavaScript) : sur-titre, puis le titre mot à mot
   (flou → net), le chapeau, les boutons, et la scène qui se redresse en 3D.
   Rien ne bouge si l'utilisateur préfère moins d'animations. */

.hero__word {
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > .eyebrow,
  .hero__lead,
  .hero__actions {
    animation: hero-rise var(--duration-slow) var(--ease-out) both;
  }

  .hero__copy > .eyebrow {
    animation-delay: 60ms;
  }

  .hero__word {
    animation: hero-word var(--duration-slow) var(--ease-out) both;
    animation-delay: calc(140ms + var(--i, 0) * 55ms);
  }

  .hero__lead {
    animation-delay: 620ms;
  }

  .hero__actions {
    animation-delay: 720ms;
  }

  .hero__visual {
    animation: hero-stage 1400ms var(--ease-out) 300ms both;
  }

  /* Un reflet traverse le groupe en dégradé une fois le titre en place */
  .hero .gradient-text {
    background-image: var(--gradient-text-sheen);
    background-size: 300% 100%;
    background-position: 100% 0;
    animation: hero-sheen 1800ms var(--ease-in-out) 900ms both;
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes hero-word {
  from {
    opacity: 0;
    transform: translateY(0.35em);
    filter: blur(10px);
  }
}

@keyframes hero-stage {
  from {
    opacity: 0;
    transform: perspective(1400px) rotateX(24deg) rotateY(-12deg) translateY(56px) scale(0.94);
  }
}

@keyframes hero-sheen {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: 0 0;
  }
}
