/*
  Intro screen styles
  Variables faciles à ajuster : durée, palette, taille du logo et du texte.
  Le style est volontairement minimal pour ne pas toucher au design du site existant.
*/

:root {
  --intro-bg: #0b0b10;
  --intro-accent: #9d98f3;
  --intro-accent-soft: rgba(157, 152, 243, 0.18);
  --intro-text: rgba(245, 242, 234, 0.96);
  --intro-text-muted: rgba(245, 242, 234, 0.7);
  --intro-logo-size: clamp(70px, 11vw, 170px);
  --intro-title-size: clamp(2.2rem, 8.5vw, 8.5rem);
  --intro-line-duration: 0.48s;
  --intro-enter-duration: 1.4s;
  --intro-fill-duration: 0.9s;
}

body.intro-is-active {
  overflow: hidden;
}

body.intro-is-active .page-shell {
  visibility: hidden;
}

.intro {
  position: fixed;
  inset: 0;
  background: var(--intro-bg);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__noise {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.6px, transparent 0.6px);
  background-size: 7px 7px;
  opacity: 0.04;
  pointer-events: none;
}

.intro__trace {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(62vw, 900px);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--intro-accent) 18%, var(--intro-accent) 82%, transparent 100%);
  transform: translate(-50%, -50%) scaleX(0);
  transform-origin: center;
  box-shadow: 0 0 18px rgba(157, 152, 243, 0.25);
  pointer-events: none;
}

.intro__trigger {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 26px);
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--intro-text);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.intro__brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--intro-logo-size);
  height: var(--intro-logo-size);
  flex-shrink: 0;
  transform-origin: center;
}

.intro__logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.12));
}

.intro__brand-name {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-size: var(--intro-title-size);
  line-height: 0.9;
  letter-spacing: -0.07em;
  font-weight: 700;
  text-transform: lowercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 242, 234, 0.76);
  white-space: nowrap;
  will-change: transform, opacity, clip-path;
}

.intro__cta-wrap {
  position: absolute;
  left: 50%;
  bottom: clamp(28px, 6vw, 72px);
  transform: translateX(-50%);
  opacity: 0;
}

.intro__cta-label {
  display: inline-block;
  color: var(--intro-text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: introPulse 1.8s ease-in-out infinite;
}

.intro__lang-switch {
  position: absolute;
  top: 24px;
  right: clamp(18px, 4vw, 42px);
  z-index: 6;
}

.intro__trigger:hover .intro__brand-name,
.intro__trigger:focus-visible .intro__brand-name {
  transform: translate3d(0, -2px, 0) skewX(-1deg);
}

@keyframes introPulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .intro {
    display: flex;
  }

  .intro__trigger {
    flex-direction: column;
    gap: 14px;
    white-space: normal;
  }

  .intro__brand-name {
    font-size: clamp(2.1rem, 12vw, 5.1rem);
    white-space: nowrap;
    letter-spacing: -0.04em;
  }

  .intro__cta-label {
    letter-spacing: 0.16em;
    font-size: 0.57rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro__trace,
  .intro__brand-name,
  .intro__logo,
  .intro__cta-wrap,
  .intro__trigger {
    animation: none !important;
    transition: none !important;
  }

  .intro__cta-label {
    animation: none;
  }
}
