/* Integration overrides: loaded only by the public landing, never by the app shell. */
html {
  scroll-padding-top: 5rem;
}

section[id] {
  scroll-margin-top: 5rem;
}

/* The existing four navigation links and system CTA need the desktop width. */
@media (min-width: 768px) and (max-width: 1023px) {
  header > div {
    display: flex;
  }

  header nav,
  .landing-header-actions {
    display: none;
  }

  header button[aria-controls="menu-mobile"] {
    display: inline-flex;
  }

  #menu-mobile {
    display: flex;
  }
}

/* The head loader reserves this space before the first body layout.
   Model readiness/failure never changes the height or forces the scroll position. */
.hero-tour-space {
  display: none;
}

html[data-landing-tour="enabled"] .hero-tour-space {
  display: block;
  height: 160svh;
}

.hero-canvas {
  opacity: 0;
  transition: opacity 1s;
}

.hero-canvas[data-pronto] {
  opacity: 1;
}

.hero-fallback {
  transition: opacity 1s;
}

[data-tour-state="ready"] .hero-fallback {
  opacity: 0;
}

.hero-shade {
  opacity: clamp(0.05, calc(0.6 - var(--progresso, 0) * 1.6), 0.6);
}

.hero-tour-caption {
  top: 38svh;
  opacity: clamp(0, min(calc((var(--progresso, 0) - 0.5) * 5), calc((1 - var(--progresso, 0)) * 12)), 1);
  text-shadow: 0 2px 24px #12171b, 0 0 8px #12171b;
}

@media (max-width: 767px) {
  html[data-landing-tour="enabled"] .hero-tour-space {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-canvas, .hero-fallback {
    transition: none;
  }
}
