/* ==========================================================
   Mihubpro – landing page plein écran
   ========================================================== */

/* Angle animé de la comète (supporté par les navigateurs récents) */
@property --beam {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  /* Couleurs */
  --violet-deep: #3a1a6e;
  --magenta: #8a1f8c;
  --violet: #4a2f9e;
  --blue: #2d63d4;
  --accent: #19e3e0;          /* « PRO » + trait du slogan */
  --white: #ffffff;
  --gold: #ffd24a;            /* pointe de la comète */
  --shade: 28, 14, 70;        /* voile de lisibilité (rgb) */

  /* Typographie */
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Mise en page */
  --gutter: 6vw;
  --logo-height: 76px;
  --bp-mobile: 820px;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--violet-deep);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Page plein écran ---------- */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: max(100svh, 560px);
  overflow: hidden;
  background: linear-gradient(90deg, var(--violet-deep) 0%, var(--magenta) 30%, var(--violet) 55%, var(--blue) 100%);
}

/* ---------- Fond ---------- */
.page__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  background: url("../assets/hero-ext.webp") center / 100% auto no-repeat;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(var(--shade), 0.42) 0%,
    rgba(var(--shade), 0.18) 40%,
    rgba(var(--shade), 0) 65%);
}

/* Cadre calé sur l'image d'origine (ratio 1983 × 793), centré verticalement */
.hero-frame {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  aspect-ratio: 1983 / 793;
  filter: drop-shadow(0 0 7px rgba(255, 206, 90, 0.8))
          drop-shadow(0 0 16px rgba(255, 255, 255, 0.35));
}

/* Comète : dégradé conique animé, masqué pour ne garder que le contour (haut et bas, 2 px) */
.hero-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px 0;
  background: conic-gradient(from var(--beam) at 50% 50%,
    transparent 0deg,
    transparent 300deg,
    rgba(255, 255, 255, 0) 300deg,
    rgba(255, 255, 255, 0.55) 342deg,
    var(--white) 354deg,
    var(--gold) 359deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: beam 4s linear infinite;
}

@keyframes beam {
  to { --beam: 360deg; }
}

/* Apparition en fondu une fois l'image chargée (classes ajoutées par js/main.js) */
.js .hero-img {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.js .hero-img.is-loaded {
  opacity: 1;
}

/* ---------- Contenu ---------- */
.page__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 32px var(--gutter) 36px;
}

.top {
  display: flex;
  align-items: center;
}

.logo {
  display: block;
  height: var(--logo-height);
  width: auto;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 7vw, 120px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-shadow: 0 2px 40px rgba(30, 10, 80, 0.5);
}

.wordmark__pro {
  color: var(--accent);
}

.tagline {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tagline__rule {
  flex: none;
  width: 56px;
  height: 2px;
  background: var(--accent);
}

.tagline__text {
  margin: 0;
  font-size: clamp(18px, 2.1vw, 28px);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-wrap: balance;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 24px rgba(30, 10, 80, 0.5);
}

.foot__domain {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Mobile : image recadrée sur le globe, sans contour animé ---------- */
@media (max-width: 820px) {
  .hero-img {
    background-image: url("../assets/hero.webp");
    background-size: auto 100%;
    background-position: 82% center;
  }
  .hero-shade {
    background: linear-gradient(180deg,
      rgba(var(--shade), 0.55) 0%,
      rgba(var(--shade), 0.35) 55%,
      rgba(var(--shade), 0.65) 100%);
  }
  .hero-frame { display: none; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-frame { display: none; }
  .js .hero-img { transition: none; }
}
