/* ============================================================
   NotFit V2 — "What's In The App?" section
   All rules scoped under .nfx-whatsinapp- (global tokens only)
   ============================================================ */

.nfx-whatsinapp {
  position: relative;
  padding-block: clamp(4rem, 3rem + 5vw, 7rem);
  background: var(--nfx-ink);
  color: var(--nfx-text);
}

/* ---- Section header: title left, paragraph right ---- */
.nfx-whatsinapp-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 1rem + 4vw, 5rem);
  align-items: start;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem);
}

.nfx-whatsinapp-title {
  margin: 0;
  font-size: clamp(2.1rem, 1.4rem + 3.4vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.nfx-whatsinapp-lead {
  margin: 0;
  align-self: end;
  max-width: 46ch;
  font-size: clamp(0.98rem, 0.92rem + 0.4vw, 1.15rem);
  line-height: 1.5;
  color: var(--nfx-muted);
}
.nfx-whatsinapp-lead b {
  color: var(--nfx-text);
  font-weight: 600;
}

/* ---- Top two-card row ---- */
.nfx-whatsinapp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 0.6rem + 1.4vw, 1.6rem);
}

.nfx-whatsinapp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 1rem + 1.2vw, 2.1rem);
  background: var(--nfx-card);
  border: 1px solid var(--nfx-line);
  border-radius: 22px;
  overflow: hidden;
}

.nfx-whatsinapp-card-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nfx-whatsinapp-card-body {
  margin: 0 0 1.5rem;
  max-width: 42ch;
  font-size: 0.97rem;
  line-height: 1.5;
  color: var(--nfx-muted);
}

/* ---- Streak inner card (card 1) ---- */
.nfx-whatsinapp-streak {
  margin-top: auto;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(255, 152, 3, 0.08), transparent 60%),
    var(--nfx-card-2);
  border: 1px solid var(--nfx-line);
  border-radius: 18px;
  text-align: center;
}

.nfx-whatsinapp-flame {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 152, 3, 0.35), rgba(255, 152, 3, 0.08));
  color: var(--nfx-amber);
  font-size: 1.7rem;
  box-shadow: 0 0 0 1px rgba(255, 152, 3, 0.25), 0 0 28px rgba(255, 152, 3, 0.25);
}

.nfx-whatsinapp-streak-count {
  margin: 0;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nfx-whatsinapp-streak-count span { color: var(--nfx-amber); }

.nfx-whatsinapp-streak-sub {
  margin: 0.3rem auto 1.25rem;
  max-width: 34ch;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--nfx-muted);
}

/* weekly streak strip: completed / frozen / upcoming */
.nfx-whatsinapp-week {
  display: flex;
  justify-content: center;
  gap: clamp(0.3rem, 0.15rem + 0.5vw, 0.6rem);
  flex-wrap: nowrap;
}
.nfx-whatsinapp-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.nfx-whatsinapp-day small {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: var(--nfx-muted);
}
.nfx-whatsinapp-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.92rem;
  /* default = upcoming / no streak (hollow) */
  background: rgba(255, 255, 255, 0.04);
  color: var(--nfx-muted);
  border: 1px solid var(--nfx-line);
}
.nfx-whatsinapp-dot.is-done {
  background: rgba(255, 152, 3, 0.16);
  color: var(--nfx-amber);
  border-color: rgba(255, 152, 3, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 152, 3, 0.14), 0 0 14px rgba(255, 152, 3, 0.3);
}
.nfx-whatsinapp-dot.is-done i { filter: drop-shadow(0 0 5px rgba(255, 152, 3, 0.55)); }
.nfx-whatsinapp-dot.is-freeze {
  background: rgba(94, 170, 255, 0.18);
  color: #7cc4ff;
  border-color: rgba(124, 196, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(124, 196, 255, 0.16), 0 0 16px rgba(94, 170, 255, 0.28);
}

/* chips under streak */
.nfx-whatsinapp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.nfx-whatsinapp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  color: var(--nfx-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nfx-line);
  border-radius: 999px;
}
.nfx-whatsinapp-chip i { color: var(--nfx-gold); font-size: 0.95rem; }

/* ---- Donut chart (card 2) — rebuilt in CSS ---- */
.nfx-whatsinapp-eco {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 0.5rem + 2vw, 2rem);
  align-items: center;
}

.nfx-whatsinapp-donut {
  position: relative;
  width: clamp(190px, 16vw, 240px);
  aspect-ratio: 1;
  margin-inline: auto;
}
/* concentric conic-gradient rings */
.nfx-whatsinapp-ring {
  position: absolute;
  border-radius: 50%;
  inset: 0;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w)));
          mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w)));
}
.nfx-whatsinapp-ring.r1 {
  --w: 16px;
  background: conic-gradient(var(--nfx-gold) 0 53%, rgba(255, 255, 255, 0.07) 53% 100%);
}
.nfx-whatsinapp-ring.r2 {
  --w: 16px;
  inset: 20px;
  background: conic-gradient(#5fcf7f 0 50%, rgba(255, 255, 255, 0.07) 50% 100%);
}
.nfx-whatsinapp-ring.r3 {
  --w: 16px;
  inset: 40px;
  background: conic-gradient(#ec6f9b 0 80%, rgba(255, 255, 255, 0.07) 80% 100%);
}
.nfx-whatsinapp-ring.r4 {
  --w: 16px;
  inset: 60px;
  background: conic-gradient(#e0524f 0 75%, rgba(255, 255, 255, 0.07) 75% 100%);
}
.nfx-whatsinapp-donut-core {
  position: absolute;
  inset: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--nfx-card);
  border: 1px solid var(--nfx-line);
}
.nfx-whatsinapp-donut-core span {
  font-size: 0.62rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nfx-whatsinapp-donut-core small {
  display: block;
  font-size: 0.52rem;
  color: var(--nfx-muted);
  font-weight: 500;
}

/* surrounding stat labels */
.nfx-whatsinapp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
}
.nfx-whatsinapp-stat {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--nfx-line);
  border-radius: 12px;
}
.nfx-whatsinapp-stat .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  align-self: center;
}
.nfx-whatsinapp-stat .dot.gold { background: var(--nfx-gold); }
.nfx-whatsinapp-stat .dot.green { background: #5fcf7f; }
.nfx-whatsinapp-stat .dot.pink { background: #ec6f9b; }
.nfx-whatsinapp-stat .dot.red { background: #e0524f; }
.nfx-whatsinapp-stat .val {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nfx-whatsinapp-stat .lbl {
  font-size: 0.72rem;
  color: var(--nfx-muted);
}

/* ---- Wide "Routine stacks" card ---- */
.nfx-whatsinapp-wide {
  position: relative;
  margin-top: clamp(1rem, 0.6rem + 1.4vw, 1.6rem);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(1rem, 0.4rem + 2vw, 2.5rem);
  align-items: stretch;
  padding: clamp(1.4rem, 1rem + 1.2vw, 2.4rem);
  background: var(--nfx-card);
  border: 1px solid var(--nfx-line);
  border-radius: 22px;
  overflow: hidden;
}

.nfx-whatsinapp-wide-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 30ch;
}
.nfx-whatsinapp-wide-title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nfx-whatsinapp-wide-body {
  margin: 0 0 1.5rem;
  font-size: 0.97rem;
  line-height: 1.5;
  color: var(--nfx-muted);
}
.nfx-whatsinapp-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--nfx-ink);
  background: var(--nfx-gold);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--nfx-ease) 220ms, opacity 220ms;
}
.nfx-whatsinapp-cta:hover {
  transform: translateY(-2px);
  opacity: 0.94;
}
.nfx-whatsinapp-cta i { font-size: 1.05rem; }

.nfx-whatsinapp-foot {
  margin: 1.1rem 0 0;
  font-size: 0.72rem;
  color: var(--nfx-muted);
}

/* visual side: pixel-exact routine composite (athlete + checklist + app) */
.nfx-whatsinapp-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--nfx-card-2);
}
.nfx-whatsinapp-routine-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.nfx-whatsinapp-phone {
  position: absolute;
  right: clamp(0.5rem, 1vw, 1.5rem);
  bottom: -14%;
  width: clamp(140px, 16vw, 210px);
  height: auto;
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  border: 1px solid var(--nfx-line-2);
}

/* checklist pill floating over the athlete */
.nfx-whatsinapp-checklist {
  position: absolute;
  left: clamp(0.8rem, 1.5vw, 1.5rem);
  top: clamp(0.8rem, 1.5vw, 1.5rem);
  width: min(58%, 240px);
  padding: 0.85rem 0.95rem;
  background: rgba(19, 21, 21, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--nfx-line-2);
  border-radius: 16px;
}
.nfx-whatsinapp-checklist-h {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.nfx-whatsinapp-task {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.32rem 0;
  font-size: 0.78rem;
  color: var(--nfx-muted);
}
.nfx-whatsinapp-task i {
  color: var(--nfx-gold);
  font-size: 1rem;
}
.nfx-whatsinapp-task.done {
  color: var(--nfx-text);
  text-decoration: line-through;
  text-decoration-color: var(--nfx-line-2);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .nfx-whatsinapp-eco { grid-template-columns: 1fr; }
  .nfx-whatsinapp-donut { margin-bottom: 0.5rem; }
}

@media (max-width: 860px) {
  .nfx-whatsinapp-head { grid-template-columns: 1fr; }
  .nfx-whatsinapp-lead { align-self: start; }
  .nfx-whatsinapp-row { grid-template-columns: 1fr; }
  /* Stacked: breathing room between the CTA and the device below it */
  .nfx-whatsinapp-wide { grid-template-columns: 1fr; row-gap: 2.5rem; }
  .nfx-whatsinapp-visual { min-height: 360px; }
  .nfx-whatsinapp-phone {
    position: static;
    display: block;
    width: clamp(160px, 50vw, 220px);
    margin: 1.25rem auto 0;
  }
}

@media (max-width: 460px) {
  .nfx-whatsinapp-stats { grid-template-columns: 1fr; }
  .nfx-whatsinapp-checklist { width: min(80%, 260px); }
}

/* Real donut sliced pixel-exact from the Figma render (replaces CSS rebuild) */
.nfx-whatsinapp-eco {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
}
.nfx-whatsinapp-donut-img {
  display: block;
  width: 100%;
  max-width: 430px;
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
}
