/* V19: keep the approved Workibly hero while bringing browsing forward.
   Contra Discover and Framer Experts place useful work close to the entry point.
   Only hero geometry changes here; navigation, composer, buttons and playback
   retain their existing components and behavior. Load after the prior styles. */

.hero {
  height: 440px;
  min-height: 0;
  padding-bottom: 0;
}
.hero-copy {
  width: 50%;
  max-width: 760px;
  padding-top: 20px;
}
.hero h1 {
  font-size: clamp(40px, 3.4vw, 50px);
  line-height: 1.14;
  margin-top: 9px;
}
.hero h1 br { display: block; }
.hero-description { margin-top: 10px; }
.hero .project-composer { margin-top: 16px; }
.hero-suggestions { margin-top: 9px; }

.surround-demos::before { bottom: 30px; }
.surround-demo:nth-child(1),
.surround-demo:nth-child(2) {
  top: -4px;
  width: 18.5%;
  max-width: 236px;
}
.surround-demo:nth-child(3),
.surround-demo:nth-child(4) {
  top: 142px;
  width: 19%;
  max-width: 230px;
}
.surround-demo:nth-child(5),
.surround-demo:nth-child(6) {
  bottom: 3px;
  width: 16.8%;
  max-width: 188px;
}
.surround-motion { bottom: 7px; }
main > .hero + .operators { padding-top: 24px; }

/* Tablet keeps the surrounding composition, with clear space for the form. */
@media (min-width: 701px) and (max-width: 1000px) {
  .hero { height: 440px; }
  .hero-copy { width: 62%; padding-top: 20px; }
  .hero h1 { font-size: clamp(30px, 4vw, 40px); }
  .hero-description { max-width: 420px; margin-inline: auto; }
  .surround-demo:nth-child(1),
  .surround-demo:nth-child(2) { top: 8px; width: 18%; }
  .surround-demo:nth-child(1) { left: 0; }
  .surround-demo:nth-child(2) { right: 0; }
  .surround-demo:nth-child(3),
  .surround-demo:nth-child(4) { top: 151px; width: 19%; }
  .surround-demo:nth-child(3) { left: -5%; }
  .surround-demo:nth-child(4) { right: -5%; }
  .surround-demo:nth-child(5),
  .surround-demo:nth-child(6) { bottom: 15px; width: 18%; }
  .surround-demo:nth-child(5) { left: 1.5%; }
  .surround-demo:nth-child(6) { right: 1.5%; }
}

/* All six demos remain available in one native swipe strip on phones.
   The existing hero controller still owns simultaneous playback. */
@media (max-width: 700px) {
  .hero {
    height: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
  }
  .hero-copy { width: 90%; padding-top: 20px; }
  .hero h1 { font-size: 36px; line-height: 1.1; margin-top: 13px; }
  .hero-description { margin-top: 12px; }
  .hero .project-composer { margin-top: 18px; }
  .hero-suggestions { margin-top: 10px; }
  .surround-demos {
    position: relative;
    inset: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 4px 0 0;
    padding: 27px 5% 7px;
    order: 2;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 5%;
    scrollbar-width: none;
    perspective: none;
    transform: none;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
  }
  .surround-demos::-webkit-scrollbar { display: none; }
  .surround-demo {
    position: relative;
    inset: auto !important;
    flex: 0 0 110px;
    width: 110px !important;
    min-width: 110px;
    max-width: 110px;
    transform: none !important;
    scroll-snap-align: start;
    filter: saturate(.9);
  }
  .surround-demo .demo-media { aspect-ratio: 16 / 9; }
  .surround-demo figcaption {
    font-size: 8px;
    line-height: 1.5;
    padding: 6px 0 4px;
    white-space: nowrap;
  }
  .surround-demo figcaption > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .surround-demo figcaption > span:last-child { display: none; }
  .surround-motion {
    position: absolute;
    left: auto;
    right: 5%;
    bottom: 94px;
    transform: none;
    margin: 0;
    min-height: 28px;
    padding: 5px 0;
    font-size: 10px;
  }
  main > .hero + .operators { padding-top: 22px; }
}

@media (min-width: 381px) and (max-width: 420px) {
  .hero-copy { padding-top: 18px; }
}

@media (max-width: 380px) {
  .hero-copy { padding-top: 18px; }
  .hero h1 { font-size: 30px; }
  .hero-description { max-width: 275px; }
  .surround-demos { gap: 9px; }
  main > .hero + .operators { padding-top: 20px; }
}
