/* ============================================================
   Landing page — Ulti Suite
   Scopé sous .landing-root. Animations désactivées si
   prefers-reduced-motion.
   ============================================================ */

.landing-root {
  --landing-bg: #f7f8fc;
  --landing-fg: #15181e;
  --landing-muted: #5a6172;
  --landing-line: rgba(21, 24, 30, 0.08);
  --landing-card: rgba(255, 255, 255, 0.72);
  --landing-card-strong: rgba(255, 255, 255, 0.9);
  --landing-glow-a: #4f6df5;
  --landing-glow-b: #9a5cf0;
  --landing-glow-c: #1fb6c9;
  --landing-chip: rgba(79, 109, 245, 0.1);
  --landing-chip-fg: #3a55d9;
  --landing-nav-fg: var(--landing-muted);
  background-color: var(--landing-bg);
  color: var(--landing-fg);
  font-feature-settings: "ss01" on, "cv05" on;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

.dark .landing-root {
  --landing-bg: #0b0d12;
  --landing-fg: #eef0f6;
  --landing-muted: #9aa3b5;
  --landing-nav-fg: #c8ceda;
  --landing-line: rgba(238, 240, 246, 0.09);
  --landing-card: rgba(22, 26, 35, 0.66);
  --landing-card-strong: rgba(26, 30, 41, 0.92);
  --landing-glow-a: #5d7bff;
  --landing-glow-b: #a86bff;
  --landing-glow-c: #2cc8dc;
  --landing-chip: rgba(93, 123, 255, 0.16);
  --landing-chip-fg: #c8d4ff;
}

/* ---------- Décor de fond (orbes + grille) ---------- */

.landing-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.landing-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--landing-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--landing-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 35%, transparent 78%);
}

.landing-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.dark .landing-orb {
  opacity: 0.38;
}

.landing-orb--a {
  width: 44rem;
  height: 44rem;
  top: -18rem;
  left: -10rem;
  background: radial-gradient(circle at 30% 30%, var(--landing-glow-a), transparent 65%);
  animation: landing-drift-a 26s ease-in-out infinite alternate;
}

.landing-orb--b {
  width: 38rem;
  height: 38rem;
  top: -12rem;
  right: -12rem;
  background: radial-gradient(circle at 60% 40%, var(--landing-glow-b), transparent 65%);
  animation: landing-drift-b 32s ease-in-out infinite alternate;
}

.landing-orb--c {
  width: 30rem;
  height: 30rem;
  top: 38rem;
  left: 50%;
  background: radial-gradient(circle at 50% 50%, var(--landing-glow-c), transparent 65%);
  animation: landing-drift-c 38s ease-in-out infinite alternate;
}

@keyframes landing-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6rem, 4rem, 0) scale(1.12); }
}

@keyframes landing-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-5rem, 6rem, 0) scale(0.94); }
}

@keyframes landing-drift-c {
  from { transform: translate3d(-50%, 0, 0) scale(1); }
  to { transform: translate3d(-38%, -3rem, 0) scale(1.18); }
}

/* ---------- Texte dégradé animé ---------- */

.landing-gradient-text {
  background-image: linear-gradient(
    100deg,
    var(--landing-glow-a) 0%,
    var(--landing-glow-b) 28%,
    var(--landing-glow-c) 55%,
    var(--landing-glow-a) 80%
  );
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: landing-gradient-pan 9s linear infinite;
}

@keyframes landing-gradient-pan {
  from { background-position: 0% 50%; }
  to { background-position: -220% 50%; }
}

/* ---------- Surfaces verre / halo ---------- */

.landing-glass {
  background: var(--landing-card);
  border: 1px solid var(--landing-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.landing-glass-strong {
  background: var(--landing-card-strong);
  border: 1px solid var(--landing-line);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.landing-halo-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.landing-halo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--halo-x, 50%) var(--halo-y, 0%),
    color-mix(in oklab, var(--landing-glow-a) 16%, transparent),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.landing-halo-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--landing-glow-a) 35%, var(--landing-line));
  box-shadow:
    0 18px 48px -18px color-mix(in oklab, var(--landing-glow-a) 38%, transparent),
    0 6px 20px -10px rgba(0, 0, 0, 0.18);
}

.landing-halo-card:hover::before {
  opacity: 1;
}

/* ---------- Boutons CTA ---------- */

.landing-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, opacity 0.2s ease;
  will-change: transform;
}

.landing-cta:active {
  transform: scale(0.97);
}

.landing-cta--primary {
  color: white;
  background-image: linear-gradient(115deg, var(--landing-glow-a), var(--landing-glow-b) 60%, var(--landing-glow-c) 130%);
  background-size: 160% 100%;
  box-shadow:
    0 10px 30px -10px color-mix(in oklab, var(--landing-glow-a) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.landing-cta--primary:hover {
  transform: translateY(-2px);
  background-position: 80% 50%;
  box-shadow:
    0 16px 38px -12px color-mix(in oklab, var(--landing-glow-b) 60%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.landing-cta--ghost {
  color: var(--landing-fg);
  background: var(--landing-card);
  border: 1px solid var(--landing-line);
  backdrop-filter: blur(12px);
}

.landing-cta--ghost:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--landing-glow-a) 40%, var(--landing-line));
}

/* ---------- Dock d'applications (héro) ---------- */

.landing-dock-tile {
  animation: landing-float 7s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
}

@keyframes landing-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ---------- Badge « pulse » ---------- */

.landing-pulse-dot {
  position: relative;
  display: inline-flex;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #34c77b;
}

.landing-pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 1.5px solid #34c77b;
  opacity: 0.7;
  animation: landing-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes landing-ping {
  0% { transform: scale(0.6); opacity: 0.8; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Révélation au scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  .landing-reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(4px);
    transition:
      opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.7s ease;
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
  }

  .landing-reveal[data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition:
      opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.7s ease;
    transition-delay: var(--reveal-delay, 0s);
  }
}

/* ---------- Bande défilante (intégrations) ---------- */

.landing-marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.landing-marquee__track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 3.5rem;
  padding-right: 3.5rem;
  animation: landing-marquee 36s linear infinite;
  will-change: transform;
}

.landing-marquee:hover .landing-marquee__track {
  animation-play-state: paused;
}

@keyframes landing-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------- Réduction de mouvement ---------- */

@media (prefers-reduced-motion: reduce) {
  .landing-root {
    scroll-behavior: auto;
  }

  .landing-orb,
  .landing-gradient-text,
  .landing-dock-tile,
  .landing-pulse-dot::after,
  .landing-marquee__track {
    animation: none !important;
  }

  .landing-halo-card,
  .landing-cta {
    transition: none;
  }
}
