/* Star variant — anchor UI to the video frame, not the viewport */

.page--star {
  /* Tune against the bottle shoulder in the video (0–100% of frame) */
  --star-anchor-x: 67%;
  --star-anchor-y: 35%;
  --star-size: calc(30.34% * 1.05);
}

.page--star .hero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 2304;
  transform: translateY(var(--hero-video-nudge)) scale(var(--hero-video-zoom));
  transform-origin: center center;
}

.page--star .hero__bg--desktop {
  display: none;
}

.page--star .hero__bg {
  transform: none;
}

.page--star .hero__ui {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.page--star .hero__ui > * {
  pointer-events: auto;
}

.page--star .hero__chrome {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 22;
  width: auto;
  height: auto;
  pointer-events: none;
}

.page--star .hero__chrome > * {
  pointer-events: auto;
}

.page--star .hero__logo-btn {
  position: absolute;
}

@keyframes logo-wiggle {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(-6deg); }
  40% { transform: rotate(5deg); }
  60% { transform: rotate(-3deg); }
  80% { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}

.page--star .hero__logo {
  transform-origin: 50% 80%;
}

.page--star .hero__logo.is-wiggling {
  animation: logo-wiggle 0.5s ease-in-out 1;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1) rotate(var(--star-rotate, 0deg));
  }
  50% {
    transform: scale(1.07) rotate(var(--star-rotate, 0deg));
  }
}

@keyframes globe-tilt {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(-15deg);
  }
  50% {
    transform: translate(-50%, -50%) rotate(-24deg);
  }
}

.page--star .hero__why-wiif {
  position: absolute;
  top: calc(var(--star-anchor-y) + 31%);
  left: calc(100% - var(--star-anchor-x) - 9%);
  width: 90px;
  height: auto;
  transform: translate(-50%, -50%) rotate(-15deg);
  animation: globe-tilt 4.5s ease-in-out infinite;
  animation-delay: 0.8s;
  z-index: 5;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(10, 10, 10, 0.45));
}

.page--star .hero__why-wiif:active {
  filter: drop-shadow(0 4px 12px rgba(10, 10, 10, 0.45)) brightness(0.95);
}

.star-anchor {
  position: absolute;
  top: calc(var(--star-anchor-y) - 2%);
  left: var(--star-anchor-x);
  width: var(--star-size);
  transform: translate(-50%, -50%);
  z-index: 5;
}

.star-tap {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  --star-rotate: 0deg;
  animation: pulse 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(10, 10, 10, 0.45));
}

.star-tap__img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.star-tap:active {
  filter: drop-shadow(0 4px 12px rgba(10, 10, 10, 0.45)) brightness(0.95);
}

#whySheet.sheet--why {
  background: #F7F2E0;
  background-color: #F7F2E0;
}

#whySheet .sheet__scroll {
  background-color: #F7F2E0;
}

#whySheet .sheet__handle {
  background: rgba(10, 10, 10, 0.2);
}

#whySheet .sheet__heading--why {
  font-family: 'Somik', var(--font-body);
  font-size: clamp(36px, 9vw, 52px);
  font-weight: normal;
  font-style: normal;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .page--star .hero__logo {
    animation: none;
  }

  .page--star .hero__why-wiif {
    animation: none;
  }

  .star-tap {
    animation: none;
  }
}

/* ─────────────────────────────────────────
   DESKTOP — full-bleed hero + panel overlay
   Breakpoint matches main.css: 768px
───────────────────────────────────────── */
@media (min-width: 768px) {
  .page--star {
    overflow: hidden;
    height: 100dvh;
  }

  .page--star .star-layout {
    position: relative;
    height: 100dvh;
    overflow: hidden;
  }

  .page--star .star-layout .hero {
    position: relative;
    height: 100dvh;
    overflow: visible;
  }

  .page--star .star-layout .hero__media {
    aspect-ratio: auto;
    height: 100dvh;
    transform: none;
  }

  .page--star .star-layout .hero__bg--video {
    display: none;
  }

  .page--star .hero__bg--desktop {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    object-fit: cover;
    object-position: center center;
    transform: none;
    z-index: 0;
  }

  .page--star .star-layout .hero__ui {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    z-index: 2;
  }

  .page--star #buySheet.sheet--buy {
    position: fixed;
    top: 20px;
    right: 20px;
    bottom: 20px;
    left: auto;
    display: flex;
    flex-direction: column;
    width: 440px;
    height: auto;
    max-height: none;
    margin: 0;
    padding-bottom: 0;
    transform: none !important;
    border-radius: var(--radius-sheet);
    box-shadow: 0 12px 40px rgba(10, 10, 10, 0.2);
    z-index: 25;
    overflow: hidden;
    touch-action: pan-y;
    will-change: auto;
    transition: none;
  }

  .page--star #buySheet.sheet--buy.is-visible {
    display: flex;
  }

  .page--star #buySheet .sheet__handle,
  .page--star #buySheet .sheet__close {
    display: none !important;
  }

  .page--star #buySheet .sheet__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .page--star #buySheet .product__name {
    padding-right: 0;
  }

  .page--star .star-anchor {
    display: none;
  }

  .page--star .star-tap {
    cursor: default;
    pointer-events: none;
  }
}
