/* =========================================================================
   Keystone CPA · in-feed phone mock (shared by static-ad/ and carousel/phone/)
   Photoreal iPhone shell + iOS + Instagram chrome. Paper stage (funnel tokens).
   Only the .post-media slot differs between the two pages.
   ========================================================================= */

html, body { min-height: 100%; }
body.pm { overflow-x: hidden; }

/* ------------------------------- stage -------------------------------- */
.sa { position: relative; overflow: hidden; padding: clamp(40px, 7vh, 80px) 16px clamp(48px, 8vh, 88px); }
.sa__glow { position: absolute; left: 50%; top: 18%; width: min(860px, 140vw); height: 720px; transform: translateX(-50%); pointer-events: none; z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(35, 64, 122, 0.13), rgba(35, 64, 122, 0) 70%); }
.sa__intro { position: relative; z-index: 1; text-align: center; margin: 0 auto clamp(26px, 4vh, 40px); }
.sa__intro .eyebrow { margin-bottom: 10px; }
.sa__title { font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.1; }
.stage { position: relative; z-index: 1; display: grid; place-items: center; }
.stage::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 420px; max-width: 90%; height: 60px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(15, 27, 51, 0.38), transparent 70%); filter: blur(10px); z-index: -1; }
.hint { position: relative; z-index: 1; margin: 34px auto 0; text-align: center; font-size: 0.84rem; font-weight: 600; color: var(--ink-3); }

.phone-wrap { position: relative; --w: clamp(330px, calc((100svh - 96px) * 0.4634), 392px); }

/* ------------------------------ iPhone 17 ------------------------------ */
.iphone {
  --r: calc(var(--w) * 0.158);
  position: relative; width: var(--w); aspect-ratio: 392 / 846; border-radius: var(--r); padding: 11px;
  background: linear-gradient(148deg, #6f6a63 0%, #100e0c 18%, #7b756c 38%, #100e0c 58%, #6f6a63 78%, #100e0c 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 0 0 2.5px rgba(0, 0, 0, 0.55),
    0 60px 120px -30px rgba(15, 27, 51, 0.55),
    0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
.iphone::before { content: ""; position: absolute; inset: 8px; border-radius: calc(var(--r) - 8px); background: #000; z-index: 0; }
.iphone::after { content: ""; position: absolute; inset: 11px; border-radius: calc(var(--r) - 11px); z-index: 6; pointer-events: none;
  background: linear-gradient(128deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.04) 26%, transparent 42%); }
.btn-side { position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(90deg, #4a4640, #8a847a); z-index: -1; }
.btn-side.mute { left: -3px; top: 132px; height: 30px; }
.btn-side.vup { left: -3px; top: 186px; height: 58px; }
.btn-side.vdn { left: -3px; top: 258px; height: 58px; }
.btn-side.pwr { right: -3px; top: 208px; height: 92px; }

.screen {
  position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  border-radius: calc(var(--r) - 11px); background: #fff; color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.3;
}
.screen a { color: inherit; }

/* iOS status bar */
.status { position: relative; flex: 0 0 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.island { position: absolute; left: 50%; top: 11px; width: calc(var(--w) * 0.29); height: 33px; transform: translateX(-50%); border-radius: 20px; background: #000; }
.island::after { content: ""; position: absolute; right: 13px; top: 11px; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2b3550, #0a0c12 60%); }
.status__r { display: flex; align-items: center; gap: 6px; }
.status__r svg { display: block; }

/* Instagram top bar */
.ig-top { flex: 0 0 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 16px; }
.ig-logo { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; transform: translateY(2px); }
.ig-top__icons { display: flex; align-items: center; gap: 20px; }
.ig-ico { position: relative; width: 24px; height: 24px; display: block; }
.ig-ico svg { width: 24px; height: 24px; fill: none; stroke: #000; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.ig-badge { position: absolute; top: -8px; right: -11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3040; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid #fff; box-sizing: content-box; }

/* feed */
.feed { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 12px; }
.avatar-ring { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; padding: 2px; background: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.screen img { color: transparent; font-size: 0; }
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #e9e6df; }
.post-who { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.post-handle { display: block; font-size: 13.5px; font-weight: 600; color: #000; }
.post-spons { display: block; font-size: 12px; color: #737373; margin-top: 1px; }
.post-more { width: 24px; height: 24px; display: grid; place-items: center; }
.post-more svg { width: 20px; height: 20px; fill: #000; }

.post-media { position: relative; display: block; width: 100%; overflow: hidden; background: #e9e6df; container-type: inline-size; }

/* sponsored CTA strip */
.cta-strip { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #fafafa; border-bottom: 0.5px solid #dbdbdb; font-size: 14px; font-weight: 600; color: #000; text-decoration: none; }
.cta-strip svg { width: 16px; height: 16px; fill: none; stroke: #000; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cta-strip:hover { background: #f2f2f2; }

/* action row */
.actions { position: relative; display: flex; align-items: center; gap: 13px; padding: 10px 14px 6px; }
.actions .spacer { flex: 1 1 auto; }
.actions svg { width: 23px; height: 23px; display: block; fill: none; stroke: #000; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.likes { padding: 2px 14px 0; font-size: 13.5px; font-weight: 600; }
.caption { padding: 4px 14px 0; font-size: 13.5px; line-height: 1.38; color: #000; }
.caption b { font-weight: 600; margin-right: 4px; }
.caption .more { color: #737373; }
.comments { padding: 5px 14px 0; font-size: 13.5px; color: #737373; }
.stamp { padding: 4px 14px 12px; font-size: 11px; color: #737373; }

/* tab bar + home indicator */
.tabbar { flex: 0 0 auto; display: flex; justify-content: space-around; align-items: center; padding: 10px 10px 4px; border-top: 0.5px solid #dbdbdb; background: #fff; }
.tabbar svg { width: 25px; height: 25px; display: block; fill: none; stroke: #000; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.tabbar .home svg { fill: #000; }
.tabbar .me { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; border: 1.5px solid #000; background: #e9e6df; }
.tabbar .me img { width: 100%; height: 100%; object-fit: cover; }
.homebar-wrap { flex: 0 0 20px; display: grid; place-items: center; background: #fff; }
.homebar { width: 138px; height: 5px; border-radius: 3px; background: #000; }

/* ------------------------------- callout ------------------------------- */
.callout { position: absolute; left: 100%; top: var(--co-top, 60%); width: 230px; margin-left: 6px; transform: translateY(-50%); pointer-events: none; transition: opacity 0.4s var(--ease); }
.callout svg { display: block; width: 120px; height: 70px; overflow: visible; }
.callout .ln { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 160; }
.callout .ar { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.rv.in .callout .ln { animation: coDraw 0.9s 0.35s var(--ease) forwards; }
.rv.in .callout .ar { animation: coFade 0.3s 1.15s ease forwards; }
@keyframes coDraw { to { stroke-dashoffset: 0; } }
@keyframes coFade { to { opacity: 1; } }
.bubble { position: relative; display: inline-block; margin: 2px 0 0 56px; padding: 11px 17px 12px; border-radius: 14px; transform: rotate(-3deg);
  background: linear-gradient(160deg, var(--navy-2), var(--navy-deep)); color: #fff; font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.12rem; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 16px 30px -14px rgba(23, 44, 87, 0.6); }
.bubble::before { content: ""; position: absolute; left: 22px; top: -7px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--navy-2); }

@media (max-width: 980px) {
  .callout { position: static; width: auto; margin: 22px auto 0; transform: none; text-align: center; }
  .callout svg { display: none; }
  .bubble { margin: 0; }
  .bubble::before { left: 50%; margin-left: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .callout .ln { stroke-dashoffset: 0; animation: none !important; }
  .callout .ar { opacity: 1; animation: none !important; }
}

/* ---------------------------- small screens ---------------------------- */
@media (max-width: 460px) {
  .phone-wrap { --w: 320px; } .iphone { --r: 50px; }
  .status { flex-basis: 48px; padding: 4px 24px 0 28px; font-size: 15px; }
  .island { width: 96px; height: 28px; top: 9px; }
  .island::after { top: 9px; right: 10px; width: 10px; height: 10px; }
  .ig-top { flex-basis: 40px; }
  .ig-logo { font-size: 26px; }
  .post-head { padding: 8px 10px; }
  .actions { padding: 8px 12px 4px; gap: 12px; }
  .actions svg { width: 22px; height: 22px; }
  .homebar { width: 112px; }
}
@media (max-width: 340px) {
  .phone-wrap { --w: 292px; } .iphone { --r: 46px; }
}
