/* ==========================================================================
   Hero — the home editorial hero, the app-icon masthead used on sub-pages,
   and the floating brew-method ring (.hero-orbit / .hero-float) around the
   phone. Motion is JS-driven (assets/js/hero-orbit.js) + reduced-motion gated.
   ========================================================================== */

/* ------------------------------ Hero app icon --------------------------- */
.hero-ed__icon {
  width: 5rem;
  height: 5rem;
  border-radius: 1.1rem;
  display: block;
  margin: 0 auto 20px;
}

/* App-icon "masthead" on sub-pages — same look as the home hero icon, but a
   link back home (centred by the hero's text-align: center). */
.hero-logo {
  display: inline-block;
  margin-bottom: 20px;
  transition: transform 0.12s ease;
}

.hero-logo:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-logo img {
  width: 5rem;
  height: 5rem;
  border-radius: 1.1rem;
}

/* ------------------------------ Editorial hero -------------------------- */
.hero-ed {
  text-align: center;
  padding-top: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(40px, 6vw, 84px);
}

.hero-ed h1 {
  font-size: clamp(2.9rem, 8.4vw, 5.8rem);
  line-height: 0.97;
  letter-spacing: -0.03em;
  margin: 0 auto 24px;
  max-width: 15ch;
}

.hero-ed__subhead {
  font-size: clamp(1.3rem, 2.7vw, 1.8rem);
  color: var(--color-text);
  font-weight: 500;
  max-width: 30ch;
  margin: 0 auto 16px;
}

.hero-ed__support {
  color: var(--color-body);
  max-width: 54ch;
  margin: 0 auto;
}

.hero-ed__rating {
  /* Fluid, Basecamp-style: lands ~1.5rem around desktop widths and scales
     linearly with the viewport (rem + vw) between a mobile floor and wide cap. */
  font-size: clamp(1.25rem, 1rem + 0.6vw, 1.75rem);
  font-weight: 600;
  margin-bottom: 22px;
}

.hero-ed__platform {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 10px 0 0;
}

.hero-ed__media {
  margin-top: clamp(64px, 9vw, 108px);
  display: flex;
  justify-content: center;
}

.hero-orbit {
  position: relative;
  width: min(320px, 74%);
}

.hero-orbit>img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 30px;
  filter: drop-shadow(0 40px 70px rgba(0, 0, 0, 0.65));
}

/* Nine circular brew-method badges scattered around the phone (Sleeve-style),
   with the same liquid-glass treatment as the bento cards. Four concerns are
   split across nested elements so their transforms never collide:
     .hero-ring    — collective cursor parallax + responsive scale (JS + media)
     .hero-float   — target position (top/left, centred via translate -50%)
     __enter       — gentle slide-in + fade reveal (JS-driven CSS transition)
     __inner       — the glass circle + gentle bob + per-icon tilt            */
.hero-ring {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  /* transform: scale(var(--ring-scale, 1)); */
  transform-origin: center;
}

.hero-float {
  position: absolute;
  width: 110px;
  aspect-ratio: 1;
  /* --par-x/y is the per-badge cursor pull (distance field, JS-driven). */
  transform: translate(-50%, -50%) translate(var(--par-x, 0px), var(--par-y, 0px));
  transition: transform 0.28s ease-out;
  will-change: transform;
}

.hero-float__enter {
  display: block;
  width: 100%;
  height: 100%;
  opacity: var(--enter-o, 0);
  transform: translate(var(--enter-x, 0px), var(--enter-y, 0px)) scale(var(--enter-s, 1));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease-out;
  will-change: transform, opacity;
}

.hero-float__inner {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px;
  border-radius: 50%;
  border: 1px solid transparent;
  overflow: hidden;
  background:
    linear-gradient(180deg, #1d1d1d, #131313) padding-box,
    linear-gradient(150deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04) 42%, rgba(255, 255, 255, 0.14)) border-box;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: rotate(var(--rot, 0deg));
  animation: hero-bob 8s ease-in-out infinite;
  animation-delay: var(--bob-delay, 0s);
}

.hero-float__inner img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Scattered target positions (hand-tuned, not a strict ellipse). */
.hero-float--1 {
  top: 25%;
  left: 110%;
  --rot: -7deg;
  --bob-delay: 0s;
}

.hero-float--2 {
  top: 12%;
  left: 176%;
  --rot: 5deg;
  --bob-delay: -0.9s;
}

.hero-float--3 {
  top: 58%;
  left: 167%;
  --rot: -5deg;
  --bob-delay: -1.8s;
}

.hero-float--4 {
  top: 84%;
  left: 127%;
  --rot: 6deg;
  --bob-delay: -2.7s;
}

.hero-float--5 {
  top: 72%;
  left: -100%;
  --rot: -4deg;
  --bob-delay: -3.6s;
}

.hero-float--6 {
  top: 93%;
  left: -7%;
  --rot: 5deg;
  --bob-delay: -4.5s;
}

.hero-float--7 {
  top: 46%;
  left: -37%;
  --rot: -6deg;
  --bob-delay: -5.4s;
}

.hero-float--8 {
  top: 5%;
  left: -87%;
  --rot: 6deg;
  --bob-delay: -6.3s;
}

.hero-float--9 {
  top: 17%;
  left: -10%;
  --rot: -5deg;
  --bob-delay: -7.2s;
}

@keyframes hero-bob {

  0%,
  100% {
    transform: translateY(0) rotate(var(--rot, 0deg));
  }

  50% {
    transform: translateY(-9px) rotate(var(--rot, 0deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-float__inner {
    animation: none;
  }

  .hero-float__enter {
    transition: none;
  }
}

/* The scatter is tuned wide for desktop; scale it toward the phone as the
   viewport narrows so it never overflows, then drop it entirely when tight. */
/* @media (max-width: 1240px) { .hero-ring { --ring-scale: 0.86; } }
@media (max-width: 1080px) { .hero-ring { --ring-scale: 0.74; } } */
@media (max-width: 768px) {
  .hero-ring {
    display: none;
  }
}