/* Generated from src/styles/; see manifest.json for cascade order. */
/* One shared, painted landscape asset keeps both hero panels coherent. */
.hero-landscape {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  background: url("assets/hero-meadow-painted.webp") center/100% 100% no-repeat;
}
.learning-tile .hero-landscape {
  filter: hue-rotate(9deg);
}

.hero-landscape > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-flock {
  position: absolute;
  inset: 0;
}
.hero-flock .pasture-walker {
  width: 16%;
  left: 3%;
  bottom: 5%;
  --walk-distance: 18px;
}
.hero-flock .pasture-walker-1 {
  left: auto;
  right: 2%;
  bottom: 7%;
  width: 16%;
  --walk-distance: -17px;
}
.hero-flock .pasture-walker-2 {
  left: 5%;
  bottom: 22%;
  width: 9%;
  --walk-distance: 13px;
}
.learning-tile .hero-flock .pasture-walker {
  width: 20%;
  left: 1%;
  --walk-distance: 10px;
}
.learning-tile .hero-flock .pasture-walker-1 {
  --walk-distance: -10px;
}
.learning-tile .hero-flock .pasture-walker-2 {
  left: 3%;
  width: 10%;
  bottom: 23%;
}
@media (max-width: 760px) {
  .hero-flock .pasture-walker {
    width: 18%;
    left: 1%;
    --walk-distance: 8px;
  }
  .hero-flock .pasture-walker-1 {
    left: auto;
    right: 1%;
    width: 17%;
    --walk-distance: -8px;
  }
  .hero-flock .pasture-walker-2 {
    left: 3%;
    width: 10%;
    bottom: 23%;
    --walk-distance: 7px;
  }
}

/* Reuse the journey's separate rooted grass/flower sprites and wind keyframes. */
.hero-plants {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-plants .pasture-plant {
  z-index: 1;
}
.hero-flock {
  z-index: 2;
}
/* Two sheep in the wide panel frame the phone; one balances the narrow panel. */
.keyboard-tile .hero-flock .pasture-walker-0 {
  left: 4%;
  bottom: 6%;
  width: 15%;
  --walk-distance: 12px;
}
.keyboard-tile .hero-flock .pasture-walker-2 {
  left: auto;
  right: 5%;
  bottom: 18%;
  width: 10%;
  --walk-distance: -10px;
}
.learning-tile .hero-flock .pasture-walker-1 {
  left: auto;
  right: 3%;
  bottom: 7%;
  width: 19%;
  --walk-distance: -8px;
}
@media (max-width: 760px) {
  .keyboard-tile .hero-flock .pasture-walker-0 {
    left: 2%;
    bottom: 6%;
    width: 17%;
    --walk-distance: 5px;
  }
  .keyboard-tile .hero-flock .pasture-walker-2 {
    left: auto;
    right: 3%;
    bottom: 19%;
    width: 12%;
    --walk-distance: -5px;
  }
  .learning-tile .hero-flock .pasture-walker-1 {
    right: 1%;
    bottom: 7%;
    width: 17%;
    --walk-distance: -4px;
  }
}
/* Constant-speed travel with a separate smooth turn. */
.hero-flock .pasture-walker {
  animation-name: hero-sheep-stroll;
  animation-timing-function: linear;
}
.hero-flock .pasture-facing {
  perspective: 450px;
  animation-name: hero-sheep-turn;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: visible;
}
@keyframes hero-sheep-stroll {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(var(--walk-distance));
  }
}
@keyframes hero-sheep-turn {
  0%,
  44% {
    transform: scaleX(var(--out-facing)) rotateY(0deg) rotate(0deg);
  }
  46% {
    transform: scaleX(var(--out-facing)) rotateY(25deg) rotate(-2deg);
  }
  49% {
    transform: scaleX(var(--out-facing)) rotateY(145deg) rotate(1deg);
  }
  52%,
  94% {
    transform: scaleX(var(--out-facing)) rotateY(180deg) rotate(0deg);
  }
  96% {
    transform: scaleX(var(--out-facing)) rotateY(205deg) rotate(-2deg);
  }
  99% {
    transform: scaleX(var(--out-facing)) rotateY(325deg) rotate(1deg);
  }
  100% {
    transform: scaleX(var(--out-facing)) rotateY(360deg) rotate(0deg);
  }
}

/* Equal mobile panels; crop the painting instead of stretching its proportions. */
@media (max-width: 760px) {
  .product-hero .hs-hero-grid {
    grid-auto-rows: auto;
  }
  .product-hero .product-hero-card {
    height: auto;
    align-self: stretch;
  }
  .product-hero .keyboard-tile .product-demo {
    flex: none;
    justify-content: flex-start;
  }
  .product-hero .keyboard-tile .keyboard-stage {
    aspect-ratio: 1/0.95;
  }
  .product-hero .learning-tile {
    height: var(--hero-card-height, auto);
  }
  .product-hero .learning-tile .product-demo {
    flex: 1;
    width: 100%;
    min-height: 0;
  }
  .product-hero .learning-tile .real-screen {
    position: absolute;
    bottom: 24px;
    height: calc(100% - 24px);
    width: auto;
    max-width: 100%;
    max-height: none;
    aspect-ratio: 1178/2556;
  }
  .hero-landscape {
    background-size: cover;
    background-position: center;
  }
}

/* A single initial phone size and frame for both hero demos. Only the keyboard zooms. */
.product-hero .hs-hero-grid {
  --hero-phone-width: 168px;
  --hero-phone-border: 3px;
  --hero-phone-radius: 25px;
}
.product-hero .product-hero-card .real-screen {
  width: var(--hero-phone-width);
  height: auto;
  max-width: none;
  max-height: none;
  aspect-ratio: 1178/2556;
  border: var(--hero-phone-border) solid #252a45;
  border-radius: var(--hero-phone-radius);
  box-shadow: 0 8px 22px #20264914;
}
.product-hero .learning-tile .product-demo {
  position: relative;
  width: 100%;
}
.product-hero .learning-tile .real-screen {
  position: absolute;
  bottom: 24px;
}
@media (max-width: 760px) {
  .product-hero .hs-hero-grid {
    --hero-phone-border: 2px;
    --hero-phone-radius: 19px;
  }
}
/* Desktop demos share one top gap and one initial-height viewport. Zoom is clipped
   inside that viewport, so it cannot reduce the space beneath the CTA. */
@media (min-width: 761px) {
  .product-hero .hs-hero-grid {
    --hero-demo-gap: 56px;
    --hero-phone-height: calc(var(--hero-phone-width) * 2556 / 1178);
  }
  .product-hero .product-hero-card .product-demo {
    margin-top: var(--hero-demo-gap);
    justify-content: flex-start;
  }
  .product-hero .keyboard-stage {
    height: var(--hero-phone-height);
    aspect-ratio: auto;
  }
  .product-hero .learning-tile .real-screen {
    position: relative;
    bottom: auto;
  }
}
/* Full-bleed mobile carousel: the active panel snaps to the viewport center. */
@media (max-width: 760px) {
  .product-hero .hs-hero-grid {
    display: flex;
    width: 100vw;
    max-width: none;
    margin-inline: calc(50% - 50vw);
    padding-inline: 8vw;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 8vw;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    align-items: flex-start;
  }
  .product-hero .hs-hero-grid::-webkit-scrollbar {
    display: none;
  }
  .product-hero .product-hero-card {
    flex: 0 0 84vw;
    min-width: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
}
@media (max-width: 760px) {
  .product-hero .keyboard-tile {
    align-self: flex-start;
  }
  .product-hero .product-hero-card .tile-copy h2 {
    font-size: clamp(19px, 5.5vw, 25px);
  }
}

.hero-pagination {
  display: none;
}
@media (max-width: 760px) {
  .hero-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 12px 0 0;
  }
  .hero-pagination button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    display: grid;
    place-items: center;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
  }
  .hero-pagination button::before {
    content: "";
    display: block;
    width: 34px;
    height: 4px;
    border-radius: 99px;
    background: #d8e0f3;
    transition: background-color 0.2s ease;
  }
  .hero-pagination button[aria-current="true"]::before {
    background: #2557ff;
  }
  .hero-pagination button:focus-visible {
    outline: 2px solid #2557ff;
    outline-offset: 1px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-pagination button::before {
    transition: none;
  }
}
@media (max-width: 760px) {
  .hero-pagination button:nth-child(2)[aria-current="true"]::before {
    background: #9487cf;
  }
}
