/* =========================================================================
   In-feed phone mock (references/in-feed-phone-mock.md): a photoreal iPhone
   running a pixel-faithful Instagram feed. Shared by static-ad/ and
   carousel/phone/ so the two shells can never drift.
   Human Blueprint skin: a deep navy-ink stage, Indri's navy as the glow,
   the optimal-zone green as a quiet second light.
   ========================================================================= */
html { background: #0b131c; }
body { background: #0b131c; color: #fff; }
body::before { background: radial-gradient(55% 48% at 64% 34%, rgba(11, 76, 140, 0.55), transparent 70%), radial-gradient(40% 36% at 12% 92%, rgba(46, 115, 86, 0.16), transparent 70%), linear-gradient(180deg, #0d1722, #0a1118) !important; }
body::after { opacity: 0.5; }

/* ---- stage + layout ---- */
.sa { position: relative; overflow: hidden; min-height: calc(100vh - 54px); min-height: calc(100svh - 54px); display: grid; align-items: center; padding: clamp(40px, 6vh, 72px) 0 clamp(48px, 7vh, 80px); }
.sa__grid { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "spec" "copy"; justify-items: center; row-gap: clamp(28px, 5vh, 44px); }
.sa__head { grid-area: head; text-align: center; max-width: 560px; }
.sa__head .eyebrow { color: #9ec3ea; margin-bottom: 14px; }
.sa__title { color: #fff; font-size: clamp(30px, 2.6vw, 38px); line-height: 1.1; }
.sa__lead { margin: 14px 0 0; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, 0.7); }
.stage { grid-area: stage; position: relative; display: grid; place-items: center; }
.stage::after { content: ""; position: absolute; left: 50%; bottom: -22px; width: 420px; max-width: 90vw; height: 60px; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.75), transparent 70%); filter: blur(8px); z-index: 0; }
.phone-wrap { position: relative; z-index: 1; }

/* a short spec list: what the creative is, where it goes, how it stays on-policy (under the title on desktop, under the phone on mobile) */
.sa__spec { grid-area: spec; width: 100%; max-width: 560px; }
.spec { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; text-align: left; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.spec li { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.spec i { display: block; font-style: normal; font-family: var(--display); font-stretch: 125%; font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #9ec3ea; }
.spec span { display: block; margin-top: 3px; font-size: 18px; line-height: 1.45; color: rgba(255, 255, 255, 0.86); }
.hint { margin: 18px 0 0; font-size: 16px; color: rgba(255, 255, 255, 0.6); }
/* "wide" = side by side: any frame 960+ wide, or a landscape frame 880+ wide (the pitch-site lightbox is
   about 922 x 599 in a 1024 x 768 window). Keep these two queries in step with WIDE in the pages' fit(). */
@media (width < 880px), (width < 960px) and (aspect-ratio < 4/3) { .sa__spec { display: flex; flex-direction: column; } .hint { order: -1; margin: 0 0 22px; text-align: center; } }

/* the ad's primary text in full, under the phone */
.sa__copy { grid-area: copy; width: 100%; max-width: 620px; }
.ptext { border-radius: 20px; padding: 24px 26px 26px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); }
.ptext__label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 0 0 14px; font-family: var(--display); font-stretch: 125%; font-size: 14px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #9ec3ea; }
.ptext__label span { color: rgba(255, 255, 255, 0.5); letter-spacing: 0.12em; white-space: nowrap; }
.ptext__body { margin: 0; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, 0.86); white-space: pre-line; }

@media (min-width: 960px), (min-width: 880px) and (min-aspect-ratio: 4/3) {
  .sa__grid { grid-template-columns: minmax(0, 330px) auto; grid-template-areas: "head stage" "spec stage" "copy copy"; justify-content: center; column-gap: 40px; row-gap: 24px; }
  .sa__head { justify-self: start; align-self: end; text-align: left; }
  .sa__spec { justify-self: start; align-self: start; }
  .sa__copy { margin-top: clamp(32px, 6vh, 64px); }
  .stage { padding-right: 232px; } /* room for the callout, keeps the group balanced */
}
@media (min-width: 1200px) {
  .sa__grid { grid-template-columns: minmax(0, 440px) auto; column-gap: clamp(56px, 5vw, 88px); }
}

/* ---- iPhone 17 shell ---- */
/* the whole phone scales as one (zoom, set by fit() on each page) so the Instagram chrome keeps its real
   proportions at every size: the action row never slips under the tab bar and the dots never meet the icons */
.iphone { --w: 392px; --r: 62px; position: relative; width: var(--w); max-width: calc(100vw - 32px); aspect-ratio: 392 / 846; border-radius: var(--r); padding: 11px; zoom: var(--z, 1);
  background: linear-gradient(148deg, #6f6a63, #100e0c 28%, #7b756c 52%, #100e0c 76%, #6f6a63);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 0 0 2px rgba(0, 0, 0, 0.6), 0 60px 120px -30px rgba(0, 0, 0, 0.95), 0 30px 60px -20px rgba(0, 0, 0, 0.7); }
.iphone::before { content: ""; position: absolute; inset: 8px; border-radius: calc(var(--r) - 8px); background: #000; }
.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.12), rgba(255, 255, 255, 0) 34%); }
.btn-side { position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(90deg, #4a4640, #8a847a); }
.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: 2; height: 100%; display: flex; flex-direction: column; border-radius: calc(var(--r) - 11px); overflow: hidden; background: #fff; color: #000; line-height: 1.3;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.status { position: relative; flex: none; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.island { position: absolute; left: 50%; top: 11px; width: 116px; height: 33px; transform: translateX(-50%); border-radius: 20px; background: #000; }
.island::after { content: ""; position: absolute; right: 22px; top: 11px; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2b3a55, #05070c 70%); }
.status .sys { display: flex; align-items: center; gap: 6px; }
.status svg { display: block; }
/* the feed scrolls inside the phone, like the real app (scrollbar hidden) */
.feed { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; }
.feed::-webkit-scrollbar { display: none; }
.feed > * { flex: none; }
.ig-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 14px 8px; }
.ig-logo { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive; font-size: 30px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.ig-top .ic { display: flex; gap: 20px; align-items: center; }
.ig-dm { position: relative; display: block; }
.ig-badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3040; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.avatar-ring { width: 36px; height: 36px; border-radius: 50%; padding: 2px; background: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); flex: none; }
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; object-fit: cover; display: block; }
.post-who { flex: 1; min-width: 0; line-height: 1.2; }
.post-who b { display: block; font-size: 13.5px; font-weight: 600; }
.post-who span { font-size: 12px; color: #737373; }
.post-media { position: relative; display: block; aspect-ratio: 4 / 5; background: #f2f2f2; overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cta-strip { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: #fafafa; border-bottom: 0.5px solid #dbdbdb; font-size: 14px; font-weight: 600; color: #000; animation: ctaLive 0.45s ease 2.4s forwards; }
.cta-strip svg { stroke: currentColor; }
/* Instagram tints the sponsored bar after a moment of dwell */
@keyframes ctaLive { to { background: #0095f6; color: #fff; border-bottom-color: #0095f6; } }
.actions { position: relative; display: flex; align-items: center; gap: 16px; padding: 10px 14px 6px; }
.actions svg { width: 25px; height: 25px; fill: none; stroke: #000; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.actions .spacer { flex: 1; }
.caption { margin: 0; padding: 4px 14px 0; font-size: 13.5px; line-height: 1.38; }
.caption b { font-weight: 600; }
.caption .full { display: none; white-space: pre-line; }
.caption.open .full { display: inline; }
.caption.open .first, .caption.open .more { display: none; }
.caption .more { border: 0; padding: 0; background: none; font: inherit; color: #737373; cursor: pointer; }
.addc { display: flex; align-items: center; gap: 8px; padding: 8px 14px 14px; font-size: 13.5px; color: #737373; }
.addc img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.tabbar { flex: none; display: flex; justify-content: space-around; align-items: center; height: 50px; border-top: 0.5px solid #dbdbdb; background: #fff; }
.tabbar svg { width: 25px; height: 25px; fill: none; stroke: #000; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.tabbar .me { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid #000; }
.homebar { flex: none; height: 22px; display: grid; place-items: center; background: #fff; }
.homebar i { width: 138px; height: 5px; border-radius: 3px; background: #000; }

/* ---- the callout (hand-drawn note at the thing to click) ---- */
.callout { position: absolute; left: 100%; top: var(--cy, 62%); width: 220px; margin-left: 8px; pointer-events: none; transition: opacity 0.3s ease; }
.callout svg { display: block; width: 120px; height: 70px; overflow: visible; }
.callout .ln { fill: none; stroke: #9ec3ea; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 220; stroke-dashoffset: 220; }
.callout .ar { fill: none; stroke: #9ec3ea; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.js .rv.in .callout .ln { animation: drawLn 0.8s var(--ease) 0.35s forwards; }
.js .rv.in .callout .ar { animation: fadeAr 0.3s ease 1.15s forwards; }
html:not(.js) .callout .ln { stroke-dashoffset: 0; }
html:not(.js) .callout .ar { opacity: 1; }
@keyframes drawLn { to { stroke-dashoffset: 0; } }
@keyframes fadeAr { to { opacity: 1; } }
.bubble { position: relative; display: inline-block; margin: 6px 0 0 40px; padding: 12px 18px; border-radius: 16px; background: linear-gradient(150deg, #0b4c8c, #00396f); color: #fff; font-family: var(--display); font-stretch: 112%; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; white-space: nowrap; transform: rotate(-3deg); box-shadow: 0 0 0 1px rgba(158, 195, 234, 0.25), 0 20px 40px -20px rgba(0, 0, 0, 0.7); }
.bubble::before { content: ""; position: absolute; left: 22px; top: -9px; border: 9px solid transparent; border-top: 0; border-bottom-color: #0b4c8c; }

/* ---- the footer, on the dark stage ---- */
.ffoot { background: #0a1118; }
.ffoot::before { background: linear-gradient(180deg, rgba(10, 17, 24, 0), #0a1118); }
.ffoot .wordmark { color: rgba(255, 255, 255, 0.78); }

.js .iphone { max-width: none; } /* fit() sizes it; a vw cap inside a zoomed box would shrink it twice */

/* short, wide frames (the pitch-site lightbox): tighter padding so the whole phone fits */
@media (min-width: 960px) and (max-height: 780px), (min-width: 880px) and (min-aspect-ratio: 4/3) and (max-height: 780px) { .sa { padding: 20px 0 22px; } .sa__lead, .hint { display: none; } .sa__grid { row-gap: 20px; } }

@media (width < 880px), (width < 960px) and (aspect-ratio < 4/3) {
  .callout { position: static; width: auto; margin: 22px auto 0; text-align: center; }
  .callout svg { display: none; }
  .bubble { margin: 0; }
  .bubble::before { left: 50%; margin-left: -9px; }
}
/* phones: a 360 wide shell, then fit() zooms it to the screen (0.99 at 390, 0.8 at 320) */
@media (max-width: 460px) { .iphone { --w: 360px; --r: 57px; } .status { padding: 5px 27px 0 31px; } .island { width: 106px; height: 31px; } .ig-top { padding: 2px 14px 6px; } .post-head { padding: 7px 12px; } }
@media (prefers-reduced-motion: reduce) {
  .callout .ln { stroke-dashoffset: 0; animation: none !important; }
  .callout .ar { opacity: 1; animation: none !important; }
  .cta-strip { animation: none; }
}
