:root { --header-glass: linear-gradient(150deg, rgb(40 36 31 / .60), rgb(19 18 17 / .55)); }
html { scroll-padding-top: 122px; }

body > .header {
  position: sticky;
  top: max(12px, env(safe-area-inset-top));
  z-index: 20;
  box-sizing: border-box;
  width: calc(100% - 48px);
  max-width: 1408px;
  margin: 12px auto 0;
  min-height: 88px;
  padding: 10px clamp(18px, 2.5vw, 36px);
  border: 1px solid rgb(255 244 230 / .12);
  border-radius: 22px;
  background: var(--header-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 34px rgb(0 0 0 / .45), inset 0 1px rgb(255 244 230 / .05);
}

@media (max-width: 760px) {
  html { scroll-padding-top: 108px; }

  #start .hero { padding-top: 22px; }

  body > .header {
    top: max(8px, env(safe-area-inset-top));
    width: calc(100% - 20px);
    margin-top: 8px;
    min-height: 72px;
    padding: 7px 16px;
    border-radius: 18px;
  }

  .header #navigation {
    top: calc(100% + 8px);
    padding: 16px;
    max-height: min(65dvh, 420px);
    overflow-y: auto;
    border: 1px solid rgb(255 244 230 / .12);
    border-radius: 16px;
    background: linear-gradient(150deg, rgb(40 36 31 / .96), rgb(19 18 17 / .95));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 12px 28px rgb(0 0 0 / .5);
  }
}

/* Center within the main body of the bubble, excluding its tail. */
.question-bubble .faq-typing-stage {
  position: absolute;
  inset: 5.625% 8% 13.75%;
  width: auto;
  min-height: 0;
  justify-content: center;
  text-align: center;
}
.question-bubble .typing-title { margin: 0; }

@media (max-width: 760px) {
  :root {
    --mobile-header-top: max(8px, env(safe-area-inset-top));
    --mobile-header-height: 72px;
  }

  body > main {
    padding-top: calc(var(--mobile-header-top) + var(--mobile-header-height));
  }

  body > .header {
    position: fixed;
    inset-inline: 10px;
    top: var(--mobile-header-top);
    height: var(--mobile-header-height);
    margin: 0 auto;
  }

  /* Keep the snap boxes stationary while the visible cards tilt. */
  #start .hero-deck .media-slide.is-active,
  #start .hero-deck .media-slide:not(.is-active) {
    transform: none;
    opacity: 1;
    transition: none;
    scroll-snap-stop: normal;
  }

  .clip-identity > img {
    flex: 0 0 64px;
    width: 64px;
    height: 46px;
    padding: 4px;
    border: 1px solid rgb(255 244 230 / .2);
    border-radius: 8px;
    background: #171411;
    object-fit: contain;
  }

  .partner-track > a.partner-logo:nth-child(n) { padding: 12px; }
  .partner-track .partner-logo img {
    height: 76px;
    transform: none;
    transition: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    #start .hero-deck .media-window {
      transform: scale(.84) rotate(5deg);
      opacity: .65;
      transition: transform .28s ease-out, opacity .28s ease-out;
    }

    #start .hero-deck .is-active .media-window {
      transform: rotate(-3deg);
      opacity: 1;
    }

    #start .hero-deck .is-active .clip-identity > img {
      rotate: 3deg;
    }
  }
}
