/* ==========================================================================
   phone-mock.css — iPhone 16 Pro mockup using inline SVG bezel
   (assets/iphone-16-pro.svg) with screen content overlaid via absolute
   positioning. The screen renders a brand strip, a brand-blue summary card
   ("$X earned this month"), and a cycling "new booking" feed.

   Markup: <div class="phone-mock">
            <img class="ph-bezel" src="assets/iphone-16-pro.svg" alt="">
            <div class="ph-screen">
              <div class="ph-app">
                <div class="ph-app-head">SplitMart · Trainer</div>
                <div class="ph-summary">…big monthly take + sub + icon…</div>
                <div class="ph-feed"><div class="pf-stack" id="pfStack"></div></div>
              </div>
            </div>
   JS: landing.js bookingFeed() injects .pf-card rows into #pfStack.
   The trn-pop floating booking-pop card is a SIBLING of .phone-mock — see
   hero-aside.css for its position override.
   ========================================================================== */

.phone-mock {
  --phone-w: 290px;
  position: relative;
  width: var(--phone-w);
  aspect-ratio: 600 / 1300;
  margin-left: auto;
  isolation: isolate;
  filter: drop-shadow(0 24px 40px rgba(var(--ink-pure-rgb), .35));
}

.ph-bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* ── Screen — overlays the SVG screen rectangle (x=13,y=13,w=574,h=1274 in
   600×1300 viewBox). Padding ratios match the SVG inset. ────────────────── */
.ph-screen {
  position: absolute;
  top: 1%;
  bottom: 1%;
  left: 2.17%;
  right: 2.17%;
  border-radius: calc(var(--phone-w) * 0.107);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Dynamic Island — black pill overlaid on the white screen so the camera
   cutout reads through the app surface. Sits inside the screen safe area. */
.ph-screen::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--phone-w) * 0.04);
  transform: translateX(-50%);
  width: calc(var(--phone-w) * 0.30);
  height: calc(var(--phone-w) * 0.085);
  background: var(--ink-pure);
  border-radius: var(--pill);
  z-index: 3;
  pointer-events: none;
}

/* ── Status bar — time on left, signal/wifi/battery on right of the DI ─ */
.ph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--phone-w) * 0.045) var(--space-18) var(--space-2);
  min-height: calc(var(--phone-w) * 0.10);
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ph-time {
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-snug);
}
.ph-cluster {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink);
}
.ph-cluster svg.lucide,
.ph-cluster [data-lucide] {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}

/* ── App body — content sits below the status bar ─────────────────────── */
.ph-app {
  flex: 1;
  padding: var(--space-4) var(--space-12) var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  overflow: hidden;
}

.ph-app-head {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: 0 var(--space-4);
}
.ph-brand {
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-snug);
  line-height: 1;
}
.ph-role {
  font-size: var(--fs-kicker);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  background: var(--bg-3);
  color: var(--ink-3);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--pill);
  font-weight: var(--fw-bold);
  line-height: 1;
}

/* ── Summary card — brand-blue panel with this-month earnings ──────────── */
.ph-summary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand);
  color: white;
  border-radius: var(--radius);
  padding: var(--space-12) var(--space-14);
  display: flex;
  align-items: center;
  gap: var(--space-10);
  box-shadow: var(--shadow-brand);
}
/* Same subtle radial highlight as the calc-output panel for consistency */
.ph-summary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 8%,
    rgba(var(--white-rgb), .18) 0%,
    rgba(var(--white-rgb), 0) 60%);
  z-index: -1;
  pointer-events: none;
}
.ph-sum-text { flex: 1; min-width: 0; }
.ph-sum-big {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-metric-sm);
  line-height: 1;
  letter-spacing: var(--ls-tight);
  font-variant-numeric: tabular-nums;
}
.ph-sum-sub {
  font-size: var(--fs-meta);
  color: rgba(var(--white-rgb), .85);
  margin-top: var(--space-4);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph-sum-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--white-rgb), .18);
  flex-shrink: 0;
}
.ph-sum-icon svg.lucide,
.ph-sum-icon [data-lucide] {
  width: 18px;
  height: 18px;
  color: white;
  stroke-width: 2.4;
}

/* ── Booking feed — cycling cards, newest at the top ───────────────── */
.ph-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pf-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.pf-card {
  background: var(--bg-3);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: var(--space-10) var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  transition:
    opacity .55s ease,
    transform .55s ease,
    height .55s ease,
    padding .55s ease,
    margin .55s ease,
    border-color .55s ease;
}

.pf-card.is-new {
  background: var(--bg);
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}

.pf-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-8);
  background: var(--accent-live);
  color: white;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  border-radius: var(--pill);
  align-self: flex-start;
  line-height: 1.4;
}

.pf-row {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.pf-row .av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-3);
}

.pf-row .info { flex: 1; min-width: 0; }
.pf-row .info .t {
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-row .info .s {
  font-size: var(--fs-kicker);
  color: var(--ink-3);
  margin-top: var(--space-2);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-row .amt {
  font-family: var(--font-display);
  font-size: var(--fs-caption);
  font-weight: var(--fw-display);
  color: var(--brand-ink);
  letter-spacing: var(--ls-snug);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ── Animation states ───────────────────────────────────────────────── */
.pf-card.entering { animation: pf-pop-in .65s cubic-bezier(.22,1,.36,1); }
@keyframes pf-pop-in {
  0%   { opacity: 0; transform: translateY(-26px) scale(.94); }
  100% { opacity: 1; transform: translateY(0)     scale(1); }
}

.pf-card.leaving {
  opacity: 0;
  transform: translateY(14px) scale(.96);
  height: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: calc(var(--space-8) * -1);
  border-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .pf-card.entering { animation: none; }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .phone-mock { margin-right: auto; }
}
@media (max-width: 720px) {
  .phone-mock { --phone-w: 240px; }
  .ph-app { padding: var(--space-3) var(--space-10) var(--space-14); gap: var(--space-8); }
  .pf-card { padding: var(--space-8) var(--space-10); gap: var(--space-4); }
  .pf-row .av { width: 26px; height: 26px; }
  .ph-sum-big { font-size: var(--fs-h3-lg); }
  .ph-sum-icon { width: 30px; height: 30px; }
  .ph-sum-icon svg.lucide,
  .ph-sum-icon [data-lucide] { width: 15px; height: 15px; }
}
