/* EAP set piece: topics members can talk about, beside the member app photo
   (see partials/features/eap-wheel.php). The default is the finished static
   layout: pills beside the photo. .is-drum (added by the script on desktop with
   full motion) turns the same list into a 3D drum inside a pinned scene. */
.eapw {
  --eap-img: min(calc(var(--media-cap) - 160px), 460px);
  overflow: clip; padding-block: clamp(3rem, min(7vw, 8vh), 6rem);
}
.eapw-in { position: relative; z-index: 1; }
.eapw-head { margin-bottom: clamp(1.4rem, 3vh, 2.4rem); }
.eapw-head .h2 { color: #fff; }

.eapw-grid { display: grid; gap: clamp(2.4rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 980px) {
  .eapw-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

/* topics: a wrapped set of pills */
.eapw-drum { position: relative; }
.eapw-window { display: none; }
.eapw-topics { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.eapw-topic {
  display: inline-flex; align-items: center; min-height: 48px;
  padding: .7rem 1.25rem; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.22);
  font-family: var(--display); font-weight: 700; font-size: clamp(1.0625rem, 1.4vw, 1.3rem);
  letter-spacing: -.01em; line-height: 1.15; color: #fff;
}
.eapw-topic::before {
  content: ""; width: 9px; height: 9px; margin-right: .7rem; flex: none;
  border-radius: 50%; background: var(--mint-deep);
}

/* the counter and the confidential line */
.eapw-meta {
  display: grid; gap: 1.1rem; margin-top: clamp(1.6rem, 3vw, 2.4rem);
  padding-top: clamp(1.2rem, 2.4vw, 1.8rem); border-top: 1px solid rgba(255,255,255,.16);
}
.eapw-count { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.6rem); margin: 0; }
.eapw-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eapw-num { display: grid; justify-items: start; line-height: 1; }
.eapw-up { font-weight: 600; font-size: 1rem; color: rgba(255,255,255,.72); margin-bottom: .2rem; }
.eapw-n {
  font-family: var(--display); font-weight: 800; letter-spacing: -.05em;
  font-size: clamp(3.4rem, min(6vw, 9vh), 4rem); line-height: .9; color: #fff;
  font-variant-numeric: tabular-nums; min-width: .62em;
}
.eapw-cl { display: grid; gap: .7rem; }
.eapw-cl-t { font-weight: 600; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.3; color: #fff; }
.eapw-pips { display: flex; gap: 6px; }
.eapw-pips i {
  width: clamp(18px, 2.2vw, 30px); height: 8px; border-radius: 8px; background: var(--tick);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); transition: background-color .3s;
}
.eapw-pips i.is-off { background: rgba(255,255,255,.14); }
.eapw-conf { display: flex; align-items: flex-start; gap: .7rem; margin: 0; color: rgba(255,255,255,.86); }
.eapw-lock {
  width: 1.5em; height: 1.5em; flex: none; margin-top: -.05em;
  fill: none; stroke: var(--mint-deep); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* the member app photo, on a white card */
.eapw-photo { position: relative; }
.eapw-photo .frame { width: fit-content; max-width: 100%; margin-inline: auto; }
.eapw-photo .frame > img { width: auto; max-width: 100%; height: auto; max-height: var(--eap-img); object-fit: contain; }
.eapw-photo .chip-float { bottom: -18px; }

/* ------------------------------------------------ the drum (desktop, pinned) */
@media (min-width: 1024px) {
  .eapw.is-drum {
    --eap-img: min(calc(100vh - 380px), 500px);
    --drum-h: min(calc(100vh - 490px), 400px);
    --face-h: clamp(58px, 8.4vh, 78px);
    min-height: 100vh; display: grid; align-items: center;
    padding-block: 92px 28px;
  }
  .eapw.is-drum .eapw-head { margin-bottom: clamp(1.4rem, 3.4vh, 2.6rem); }
  .eapw.is-drum .eapw-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .eapw.is-drum .eapw-drum {
    height: var(--drum-h);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
  }
  /* the lit slot: a window with the tick, the facing topic sits inside it */
  .eapw.is-drum .eapw-window {
    display: block; position: absolute; left: 0; right: 0;
    top: calc(50% - var(--face-h) / 2 - 8px); height: calc(var(--face-h) + 16px);
    border-radius: 999px; background: rgba(255,255,255,.06);
    border: 1px solid rgba(159,216,180,.45);
    box-shadow: 0 0 0 6px rgba(159,216,180,.06), 0 30px 60px -30px rgba(0,0,0,.5);
  }
  .eapw.is-drum .eapw-badge {
    position: absolute; left: 12px; top: calc(50% - 26px); width: 52px; height: 52px; border-radius: 50%;
    display: grid; place-items: center; background: var(--tick); color: #fff;
  }
  .eapw.is-drum .eapw-badge .tick { width: 28px; height: 28px; color: #fff; }
  .eapw.is-drum .eapw-topics { display: block; position: absolute; inset: 0; }
  .eapw.is-drum .eapw-topic {
    position: absolute; left: 0; right: 0; top: calc(50% - var(--face-h) / 2); height: var(--face-h);
    display: flex; align-items: center; min-height: 0;
    padding: 0 1rem 0 88px; border: 0; border-radius: 0; background: none;
    font-weight: 800; font-size: clamp(1.7rem, min(2.75vw, 5.2vh), 2.9rem); letter-spacing: -.035em; line-height: 1;
    color: rgba(255,255,255,.62);
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    transition: color .35s;
  }
  .eapw.is-drum .eapw-topic::before { display: none; }
  .eapw.is-drum .eapw-topic.is-on { color: #fff; }
  .eapw.is-drum .eapw-meta { margin-top: clamp(1rem, 2.6vh, 1.8rem); padding-top: clamp(.9rem, 2.2vh, 1.4rem); }
}

/* faces turned away from the viewer are never seen mirrored */
.eapw.is-drum .eapw-topic, .is-drum .eapw-topic { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
