/*
 * PPECare's single-video Scroll World presentation layer.
 * Scoped to the bilingual landing pages so the shared site stylesheet and
 * interior pages keep their existing layout.
 */

main[data-scroll-world] .hero {
  min-height: 100svh;
}

main[data-scroll-world] .hero-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "intro preview"
    "details preview";
  gap: 24px clamp(34px, 5vw, 76px);
  min-height: 100svh;
  align-content: center;
  align-items: center;
  padding-top: calc(var(--header-height) + 42px);
  padding-bottom: 48px;
}

main[data-scroll-world] .hero-intro {
  grid-area: intro;
  align-self: end;
}

main[data-scroll-world] .hero-details {
  grid-area: details;
  align-self: start;
}

main[data-scroll-world] .hero-intro > :last-child,
main[data-scroll-world] .hero-details > :last-child {
  margin-bottom: 0;
}

main[data-scroll-world] .hero h1 {
  max-width: 620px;
  font-size: clamp(2.8rem, 4.2vw, 3.75rem);
}

main[data-scroll-world] .hero-copy {
  max-width: 620px;
}

main[data-scroll-world] .hero-metrics {
  width: 100%;
}

main[data-scroll-world] .hero-media {
  height: 100svh;
  opacity: 0.32;
}

main[data-scroll-world] .hero-tour-card {
  position: relative;
  grid-area: preview;
  width: 100%;
  max-width: 650px;
  justify-self: end;
  overflow: hidden;
  padding: 10px;
  background: rgb(255 253 248 / 0.94);
  border: 1px solid rgb(64 93 75 / 0.18);
  border-radius: calc(var(--radius) * 2);
  box-shadow: var(--shadow-lg);
  transform-origin: center;
  isolation: isolate;
}

main[data-scroll-world] .hero-tour-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #edf4ee;
  border-radius: var(--radius);
}

main[data-scroll-world] .hero-tour-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #edf4ee;
}

main[data-scroll-world] .hero-tour-meta {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr 44px;
  gap: 8px 12px;
  min-height: 54px;
  align-items: center;
  padding: 5px 5px 5px 14px;
  color: var(--primary-dark);
  background: rgb(255 253 248 / 0.94);
  border: 1px solid rgb(64 93 75 / 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

main[data-scroll-world] .hero-tour-label,
main[data-scroll-world] .hero-tour-hint {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

main[data-scroll-world] .hero-tour-label {
  color: var(--accent-aa);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

main[data-scroll-world] .hero-tour-hint {
  color: var(--muted);
}

main[data-scroll-world] .hero.is-expanding .hero-tour-hint {
  opacity: 0;
}

main[data-scroll-world] .hero-tour-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--paper);
  background: var(--primary-dark);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 180ms ease-out, background-color 180ms ease-out;
}

main[data-scroll-world] .hero-tour-toggle:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

main[data-scroll-world] .hero-tour-toggle:focus-visible {
  outline: 3px solid var(--accent-aa);
  outline-offset: 3px;
}

main[data-scroll-world] .is-scroll-world-enhanced .hero-tour-toggle {
  display: grid;
}

main[data-scroll-world] .hero-tour-toggle-icon {
  position: relative;
  width: 14px;
  height: 16px;
}

main[data-scroll-world] .hero-tour-toggle-icon::before,
main[data-scroll-world] .hero-tour-toggle-icon::after {
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 4px;
  content: "";
  background: currentcolor;
  border-radius: 2px;
}

main[data-scroll-world] .hero-tour-toggle-icon::before {
  left: 1px;
}

main[data-scroll-world] .hero-tour-toggle-icon::after {
  right: 1px;
}

main[data-scroll-world] .is-motion-paused .hero-tour-toggle-icon::before {
  inset: 1px auto 1px 2px;
  width: 0;
  height: 0;
  background: transparent;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentcolor;
  border-radius: 0;
}

main[data-scroll-world] .is-motion-paused .hero-tour-toggle-icon::after {
  display: none;
}

main[data-scroll-world] .hero-tour-progress {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  height: 4px;
  overflow: hidden;
  background: rgb(64 93 75 / 0.12);
}

main[data-scroll-world] .hero-tour-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

main[data-scroll-world] .demo-section .video-frame {
  background: #edf4ee;
  border-color: rgb(64 93 75 / 0.18);
}

main[data-scroll-world].scroll-reveal-enhanced [data-scroll-reveal] {
  opacity: 0;
  transform: translate3d(0, 42px, 0) scale(0.988);
}

main[data-scroll-world].scroll-reveal-enhanced [data-scroll-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity 700ms ease-out, transform 700ms ease-out;
}

@media (min-width: 981px) and (prefers-reduced-motion: no-preference) {
  main[data-scroll-world] .hero.is-scroll-world-ready {
    display: block;
    height: 280svh;
    min-height: 280svh;
    overflow: clip;
  }

  main[data-scroll-world] .hero.is-scroll-world-ready .hero-content {
    position: sticky;
    top: 0;
    height: 100svh;
  }

  main[data-scroll-world] .hero.is-scroll-world-ready.is-expanding .hero-tour-card,
  main[data-scroll-world] .hero.is-scroll-world-ready.is-expanding .hero-intro,
  main[data-scroll-world] .hero.is-scroll-world-ready.is-expanding .hero-details,
  main[data-scroll-world] .hero.is-scroll-world-ready.is-expanding .hero-media {
    will-change: transform, opacity;
  }
}

@media (max-width: 980px) {
  main[data-scroll-world] .hero-content {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "details"
      "preview";
    gap: 24px;
    min-height: auto;
    padding-top: calc(var(--header-height) + 50px);
  }

  main[data-scroll-world] .hero-tour-card {
    max-width: 720px;
    justify-self: center;
  }

  main[data-scroll-world] .hero-media {
    height: 100%;
    opacity: 0.2;
  }
}

@media (max-width: 700px) {
  main[data-scroll-world] .hero-content {
    width: min(100% - 32px, var(--max));
    gap: 20px;
    padding-top: calc(var(--header-height) + 34px);
    padding-bottom: 34px;
  }

  main[data-scroll-world] .hero h1 {
    font-size: clamp(2.35rem, 11.7vw, 3rem);
  }

  main[data-scroll-world] .hero-kicker {
    margin-bottom: 0;
  }

  main[data-scroll-world] .hero-tour-card {
    padding: 7px;
    border-radius: calc(var(--radius) + 4px);
  }

  main[data-scroll-world] .hero-tour-meta {
    inset: auto 8px 8px;
    grid-template-columns: 1fr 44px;
    padding-left: 12px;
  }

  main[data-scroll-world] .hero-tour-hint {
    display: none;
  }

  main[data-scroll-world] .hero-details {
    margin-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  main[data-scroll-world] .hero-tour-toggle,
  main[data-scroll-world] .hero-tour-progress {
    display: none;
  }

  main[data-scroll-world].scroll-reveal-enhanced [data-scroll-reveal],
  main[data-scroll-world].scroll-reveal-enhanced [data-scroll-reveal].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Keep the request and its expectations together before the mobile preview. */
main[data-scroll-world] .hero-request-note {
  margin: 12px 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.9rem;
}
main[data-scroll-world] .tour-next-step { margin: 24px 0 0; }
@media (max-width: 700px) {
  main[data-scroll-world] .hero h1 { font-size: clamp(2rem, 8.8vw, 2.65rem); }
  main[data-scroll-world] .hero-kicker { font-size: 1.25rem; line-height: 1.25; }
  main[data-scroll-world] .hero-metrics { display: none; }
  main[data-scroll-world] .hero-content { padding-top: calc(var(--header-height) + 22px); }
}
