/* ColourLex – Startseite: Hero (.hero-xl) und Globus-Teaser (Schritt H1) */

/* Nur html, nicht body: ein overflow-x auf body wuerde body zum Scroll-Container machen
   und den sticky Header in style.css wirkungslos machen. */
html {
  overflow-x: hidden;
}

/* ---------- Hero (.hero-xl) ---------- */
.hero-xl {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--night);
  color: var(--night-text);
}

/* Hintergrund: Pigment-Mosaik, bewegt sich sehr langsam */
.hero-xl .hero-mosaic {
  position: absolute;
  inset: -10%;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-auto-rows: 1fr;
  gap: 3px;
  animation: mosaic-drift 40s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-xl .hero-mosaic img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 0;
}

@keyframes mosaic-drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-4%, -3%, 0);
  }
}

/* Verlauf und Vignette ueber dem Mosaik */
.hero-xl .hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(180deg, rgba(21, 19, 15, 0.35) 0%, rgba(21, 19, 15, 0.72) 55%, var(--night) 100%);
}

/* Vordergrund */
.hero-xl .hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 24px 120px;
}

.hero-xl .eyebrow {
  margin-bottom: var(--s3);
}

.hero-xl .hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(4.5rem, 16vw, 13rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--night-text);
  margin: 0;
}

.hero-xl .hero-claim {
  margin-top: var(--s3);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  line-height: 1.2;
  color: var(--night-text);
}

.hero-xl .hero-lead {
  max-width: 52ch;
  margin-top: var(--s3);
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.85;
}

.hero-xl .hero-actions {
  margin-top: var(--s4);
}

.hero-xl .hero-meta {
  margin-top: var(--s4);
  font-family: var(--font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.6;
}

/* Scroll-Hinweis unten mittig */
.hero-xl .scroll-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 2;
  margin: 0 auto;
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--night-text);
  font-family: var(--font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  opacity: 0.7;
  animation: cue-bob 2.4s ease-in-out infinite;
}

.hero-xl .scroll-cue:hover {
  opacity: 1;
}

@keyframes cue-bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* Einblenden beim Laden: Wortmarke, Claim, Absatz, Buttons nacheinander */
.js .hero-xl .rise {
  animation: rise-in 700ms ease-out backwards;
}
/* Sicherheitsnetz: nach kurzer Zeit immer sichtbar, auch wenn Animationen angehalten sind */
.hero-xl.is-ready .rise {
  animation: none;
  opacity: 1;
  transform: none;
}

.hero-xl .rise-1 {
  animation-delay: 0ms;
}

.hero-xl .rise-2 {
  animation-delay: 120ms;
}

.hero-xl .rise-3 {
  animation-delay: 240ms;
}

.hero-xl .rise-4 {
  animation-delay: 360ms;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Sprungmarke #start liegt nicht unter dem sticky Header */
#start {
  scroll-margin-top: var(--header-h);
}

/* ---------- Globus-Teaser ---------- */
.globe-teaser {
  padding: 96px 0;
  background: var(--night);
  color: var(--night-text);
}

.globe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
  align-items: center;
}

.globe-teaser h2 {
  margin-bottom: var(--s3);
}

.globe-teaser .globe-text {
  max-width: 46ch;
  margin-bottom: var(--s3);
  opacity: 0.85;
}

.globe-orb {
  position: relative;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1d2733, #0e141b);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.globe-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--dot);
  animation: dot-pulse 3.2s ease-in-out var(--d, 0s) infinite;
}

@keyframes dot-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .globe-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .globe-orb {
    max-width: 360px;
    margin: 0 0 0 auto;
  }
}

/* ---------- Mobil ---------- */
@media (max-width: 600px) {
  .hero-xl .hero-mosaic {
    grid-template-columns: repeat(5, 1fr);
  }


  .hero-xl .hero-title {
    font-size: clamp(3rem, 16vw, 13rem);
  }

  .hero-xl .hero-lead {
    font-size: 16px;
  }

  .hero-xl .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-xl .hero-actions .btn {
    width: 100%;
  }

  .globe-teaser {
    padding: 56px 0;
  }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-xl *,
  .hero-xl *::before,
  .hero-xl *::after,
  .globe-dot {
    animation: none !important;
  }

  .hero-xl .rise {
    opacity: 1;
    transform: none;
  }
}

/* Mini-Globus (Canvas) im Teaser */
.globe-orb { display: block; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 0 0 40px rgba(0,0,0,.4); transition: transform .4s; }
.globe-orb:hover { transform: scale(1.02); }
#globe-mini { display: block; width: 100%; height: 100%; border-radius: 50%; }
