/* ══════════════════════════════════════════════════════════════
   SECTION 4 — THE POWER OF 4
   Centred title + subcopy, then a rounded photo card with 3 glass
   widgets overlapping its edges (Hydration TR, Breathing bottom,
   Daily movement BL). Widgets are real glass HTML/CSS — liquid fill,
   pill segments, progress ring — animated in view (js/power-widgets.js).
   Section is transparent so the fixed page-bg shows through.
   ══════════════════════════════════════════════════════════════ */
.power {
  position: relative;
  z-index: 1;
  background: transparent;                /* page-bg shows through */
  padding: clamp(40px, 6vh, 90px) 24px clamp(120px, 18vh, 220px);
}
.power-head { text-align: center; max-width: 760px; margin: 0 auto clamp(48px, 8vh, 90px); }
.power-title {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.power-sub {
  margin-top: 18px;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
  max-width: 54ch;
  margin-inline: auto;
}

/* — Photo + overlapping widgets stage — */
.power-stage {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
}
.power-photo {
  width: 100%;
  border-radius: 26px;
  display: block;
}

/* — Shared widget body: airy, see-through frosted glass (the photo
   reads clearly through it) with a bright rim, like the goal mockup. — */
.widget {
  position: absolute;
  padding: 22px 24px;
  border-radius: 28px;
  color: #ffffff;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(1.5px) saturate(120%);
  -webkit-backdrop-filter: blur(1.5px) saturate(120%);
  /* Inset rim only — no outer drop-shadow on the glass widgets. */
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.18);
}
.widget-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.96;
}
.widget-head svg { width: 17px; height: 17px; }
.widget-icon { width: 18px; height: 18px; object-fit: contain; }
.widget-big {
  margin-top: 10px;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.widget-big small { font-size: 20px; font-weight: 700; opacity: 0.9; }
.widget-foot {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.92;
}
.widget-foot b { font-weight: 700; }

/* — Hydration — top-right. Card body + a SEPARATE tall liquid capsule
     that juts out to the right, ~20% filled with cyan. — */
.w-hydration {
  top: -28px; right: -18px;
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding-right: 18px;
}
.hydration-tube {
  align-self: center;
  width: 44px;
  height: 96px;
  border-radius: 18px;                     /* soft rounded-rect, not full pill caps */
  background: rgba(255,255,255,0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
  overflow: hidden;
  position: relative;
  flex: none;
}
/* Water body — fills the tube wall-to-wall; the tube's overflow:hidden +
   pill radius rounds the bottom into the capsule. The flat top is overlaid
   with a gentle wave crest (::before) so the waterline reads as liquid. */
.hydration-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0%;                              /* animated → 60% */
  background: #47D7FF;
  transition: height 1.2s cubic-bezier(.2,.7,.2,1);
}
/* Wave crest sitting on top of the water surface — a soft S-curve, same cyan,
   so the waterline is a gentle wave instead of a hard flat cut. */
.hydration-fill::before {
  content: "";
  position: absolute;
  left: -1px; right: -1px;
  bottom: 100%;
  height: 9px;
  background: #47D7FF;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 9' preserveAspectRatio='none'%3E%3Cpath d='M0 9 V3 C12 -1 30 8 46 4 V9 Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 9' preserveAspectRatio='none'%3E%3Cpath d='M0 9 V3 C12 -1 30 8 46 4 V9 Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* — Breathing — fully ON the photo, right/middle, 3 big pills. — */
.w-breathing {
  top: 50%; right: 96px;
  transform: translateY(-50%);
}
.w-breathing .widget-row { display: flex; align-items: center; gap: 36px; }
.breath-pills { display: flex; gap: 12px; }
.breath-pill {
  width: 40px; height: 78px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  transition: background 0.5s ease;
}
.breath-pill.on { background: #FF7EF9; }

/* — Daily movement — bottom-left, big lime progress ring. — */
.w-movement { left: -18px; bottom: -28px; }
.w-movement .widget-row { display: flex; align-items: center; gap: 30px; }
@property --pct { syntax: '<number>'; inherits: false; initial-value: 0; }
.move-ring {
  --pct: 0;                                /* animated → 8 */
  width: 86px; height: 86px;
  border-radius: 50%;
  flex: none;
  background:
    conic-gradient(#C7F000 calc(var(--pct) * 1%), rgba(255,255,255,0.26) 0);
  transition: --pct 1.2s cubic-bezier(.2,.7,.2,1);
  -webkit-mask: radial-gradient(closest-side, transparent 70%, #000 71%);
  mask: radial-gradient(closest-side, transparent 70%, #000 71%);
}

/* — In-view trigger sets the animated end values — */
.power-stage.in .hydration-fill { height: 60%; }
.power-stage.in .move-ring { --pct: 35; }
.power-stage.in .breath-pill.fill-on-view {
  background: #FF7EF9;
}

@media (prefers-reduced-motion: reduce) {
  .hydration-fill { height: 60%; transition: none; }
  .move-ring { --pct: 35; transition: none; }
  .breath-pill.fill-on-view { background: #FF7EF9; }
}
