/* =====================================================================
   In-feed phone mock · shared by static-ad/ and carousel/phone/
   Photoreal iPhone shell + pixel-faithful Instagram chrome.
   EXCLUDED from the global +2px font bump (Instagram sizes stay true).
   The phone is laid out at its natural 392 x 846 and scaled as one unit
   by phone.js so it always fits the viewport (iframe-safe).
   ===================================================================== */

/* ---------- stage (page around the phone) ---------- */
html, body { height: 100%; }
body.sa-body {
  margin: 0; overflow-x: hidden;
  background: #161e2a;
  background-image:
    radial-gradient(60% 50% at 50% 38%, rgba(64, 120, 150, 0.30), transparent 70%),
    radial-gradient(40% 30% at 70% 80%, rgba(168, 86, 91, 0.16), transparent 70%);
  color: #fbf7f2;
}
.sa {
  position: relative; min-height: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px 16px 18px; overflow: hidden;
}
.sa__intro { text-align: center; margin: 0 0 14px; flex: none; }
.sa__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: #ecc077;
}
.sa__eyebrow::before, .sa__eyebrow::after { content: ""; width: 20px; height: 1px; background: currentColor; opacity: .5; }
.sa__title {
  margin: 6px 0 0; font-family: "PT Serif", Georgia, serif; font-weight: 500;
  font-size: 22px; line-height: 1.2; letter-spacing: -.01em; color: #fbf7f2;
}
.sa__hint {
  flex: none; margin: 14px 0 0; font-family: "Poppins", system-ui, sans-serif; font-size: 13px;
  color: rgba(251, 247, 242, .62); text-align: center;
}

/* phone + its floor shadow */
.phone-wrap { position: relative; flex: none; }
.fit { position: relative; }
.fit::after { /* the shadow the phone stands on */
  content: ""; position: absolute; left: 50%; bottom: -14px; width: 92%; height: 36px;
  transform: translateX(-50%); border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(18px); z-index: 0;
}

/* ---------- iPhone 17 shell ---------- */
.iphone {
  --w: 392px; --r: 62px;
  position: absolute; left: 0; top: 0; z-index: 1;
  width: var(--w); height: 846px; box-sizing: border-box;
  border-radius: var(--r); padding: 11px;
  transform-origin: 0 0;
  background: linear-gradient(148deg, #6f6a63 0%, #2a2724 14%, #100e0c 38%, #1b1916 62%, #7b756c 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    inset 0 0 0 2px rgba(0, 0, 0, .55),
    0 60px 120px -30px rgba(0, 0, 0, .95),
    0 30px 60px -20px rgba(0, 0, 0, .8);
}
.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, .10) 0%, rgba(255, 255, 255, .03) 22%, transparent 40%);
}
.btn-side { position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(90deg, #4a4640, #8a847b); }
.btn-side--mute { left: -3px; top: 132px; height: 30px; }
.btn-side--up   { left: -3px; top: 186px; height: 58px; }
.btn-side--down { left: -3px; top: 258px; height: 58px; }
.btn-side--power { right: -3px; top: 208px; height: 92px; background: linear-gradient(270deg, #4a4640, #8a847b); }

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

/* ---------- iOS chrome ---------- */
.status { flex: none; position: relative; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 44px; box-sizing: border-box; }
.status__time { font-weight: 600; font-size: 17px; letter-spacing: -.2px; }
.status__icons { display: flex; align-items: center; gap: 6px; }
.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, #0a0d14 60%); }
.homebar { position: absolute; left: 50%; bottom: 8px; width: 138px; height: 5px; transform: translateX(-50%); border-radius: 3px; background: #000; z-index: 5; }

/* ---------- Instagram chrome ---------- */
.ig-top { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 14px; }
.ig-logo { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Lobster", cursive; font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -.3px; padding-top: 4px; }
.ig-top__icons { display: flex; align-items: center; gap: 20px; }
.ig-dm { position: relative; display: block; }
.ig-badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; border: 2px solid #fff; background: #ff3040; color: #fff; font-size: 11px; font-weight: 700; line-height: 14px; text-align: center; }

.feed { flex: 1; min-height: 0; overflow: hidden; position: relative; }

.post-head { height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px; }
.avatar-ring { flex: none; width: 36px; height: 36px; border-radius: 50%; padding: 2px; box-sizing: border-box; background: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; box-sizing: border-box; object-fit: cover; object-position: 50% 14%; display: block; }
.post-head__who { flex: 1; min-width: 0; line-height: 16px; }
.post-head__name { display: block; font-weight: 600; font-size: 14px; color: #000; }
.post-head__sub { display: block; font-size: 12px; color: #737373; }
.post-head__more { flex: none; padding: 6px; }

.post-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; background: #161e2a; overflow: hidden; }

.cta-strip { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 14px; background: #fafafa; border-bottom: .5px solid #dbdbdb; font-weight: 600; font-size: 14px; color: #000; cursor: pointer; }
.cta-strip:hover { background: #f2f2f2; }
.cta-strip svg { flex: none; }

.actions { position: relative; height: 46px; display: flex; align-items: center; gap: 16px; padding: 0 12px 0 14px; }
.actions .spacer { flex: 1; }
.actions svg { width: 25px; height: 25px; fill: none; stroke: #000; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; display: block; }
.likes { padding: 0 14px; font-weight: 600; font-size: 14px; }
.caption { padding: 4px 14px 0; font-size: 14px; line-height: 18px; color: #000; }
.caption b { font-weight: 600; }
.caption .more { color: #737373; cursor: pointer; }
.caption__full { display: none; white-space: pre-line; }
.caption.is-open .caption__short { display: none; }
.caption.is-open .caption__full { display: inline; }
.comments { padding: 4px 14px 0; color: #737373; font-size: 14px; }
.stamp { padding: 4px 14px 0; color: #737373; font-size: 11px; letter-spacing: .1px; }

.tabbar { flex: none; height: 82px; box-sizing: border-box; padding: 10px 26px 0; display: flex; justify-content: space-between; align-items: flex-start; border-top: .5px solid #dbdbdb; background: #fff; position: relative; z-index: 3; }
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: #000; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
.tabbar .tab-me { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; border: 1px solid #dbdbdb; box-sizing: border-box; }
.tabbar .tab-me img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- callout (hand-drawn note beside the phone) ---------- */
.callout { position: absolute; left: 100%; width: 210px; margin-left: 6px; pointer-events: none; transition: opacity .35s ease; }
.callout svg { display: block; width: 120px; height: 70px; overflow: visible; }
.callout .ln, .callout .ar { fill: none; stroke: #ecc077; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.callout .ln { stroke-dasharray: 200; stroke-dashoffset: 200; animation: drawLn .9s .35s ease forwards; }
.callout .ar { opacity: 0; animation: fadeAr .3s 1.15s ease forwards; }
.callout .bubble {
  position: relative; display: inline-block; margin: 6px 0 0 34px; padding: 10px 16px 11px; border-radius: 14px;
  background: linear-gradient(135deg, #a5733f, #a8565b); color: #fff; transform: rotate(-3deg);
  font-family: "PT Serif", Georgia, serif; font-style: italic; font-size: 19px; line-height: 1.15; white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .6);
}
@keyframes drawLn { to { stroke-dashoffset: 0; } }
@keyframes fadeAr { to { opacity: 1; } }
@media (max-width: 860px) { .callout { display: none; } }
@media (prefers-reduced-motion: reduce) { .callout .ln { animation: none; stroke-dashoffset: 0; } .callout .ar { animation: none; opacity: 1; } }

/* ---------- Variant B: carousel restyled as Instagram ---------- */
.post-media .cstage { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; aspect-ratio: auto; }
.post-media .cnav {
  position: absolute; top: 50%; z-index: 4; width: 26px; height: 26px; margin-top: -13px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .82); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: pointer; display: grid; place-items: center;
  transition: opacity .2s ease;
}
.post-media .cnav svg { width: 12px; height: 12px; fill: none; stroke: #262626; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.post-media .cnav--prev { left: 8px; }
.post-media .cnav--next { right: 8px; }
.post-media .cnav[disabled] { opacity: 0; pointer-events: none; }
.ig-count { position: absolute; top: 12px; right: 12px; z-index: 4; padding: 3px 8px; border-radius: 12px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 500; line-height: 16px; }
.actions .cdots { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: 4px; margin: 0; }
.actions .cdots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #c7c7c7; cursor: pointer; }
.actions .cdots button.is-on { background: #0095f6; }
.phone-wrap:has(#cprev:not([disabled])) .callout { opacity: 0; }

/* =====================================================================
   The ad creatives (inside the phone, also excluded from the bump).
   Composed at the post's real size: 370 x 462.5 (4:5).
   System B palette: navy #161e2a, paper #fbf7f2, brass #a8565b.
   ===================================================================== */
.cr { position: absolute; inset: 0; overflow: hidden; background: #161e2a; color: #fbf7f2; font-family: "Poppins", system-ui, sans-serif; }
.cr__photo { position: absolute; right: -34px; top: 0; bottom: 0; width: 230px; }
.cr__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.cr__photo::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #161e2a 0%, rgba(22,30,42,.88) 22%, rgba(22,30,42,.2) 58%, rgba(22,30,42,0) 100%),
    linear-gradient(180deg, rgba(22,30,42,0) 40%, rgba(22,30,42,.75) 72%, #161e2a 100%); }
.cr__grain { position: absolute; inset: 0; opacity: .14; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.cr__text { position: absolute; left: 20px; top: 20px; width: 212px; }
.cr__eyebrow { margin: 0 0 9px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: #d4b48c; white-space: nowrap; }
.cr__head { margin: 0; font-family: "PT Serif", Georgia, serif; font-weight: 500; font-size: 21.5px; line-height: 1.1; letter-spacing: -.012em; color: #fff; text-wrap: balance; }
.cr__head em { font-style: italic; color: #f3d39b; }
.cr__sub { margin: 8px 0 0; font-size: 11px; line-height: 1.36; color: rgba(251,247,242,.86); font-weight: 500; max-width: 200px; }
.cr__card { position: absolute; left: 14px; right: 14px; bottom: 12px; padding: 10px 13px 9px; border-radius: 12px;
  background: rgba(251, 247, 242, .97); color: #161e2a; box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); }
.cr__pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cr__pillars li { display: block; padding-bottom: 6px; border-bottom: 1px solid rgba(22,30,42,.09); }
.cr__k { display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 7.5px; letter-spacing: .14em; text-transform: uppercase; color: #a8565b; margin-bottom: 2px; }
.cr__t { display: block; font-family: "PT Serif", Georgia, serif; font-size: 12.5px; line-height: 1.2; color: #161e2a; font-weight: 500; }
.cr__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 1px; }
.cr__date { font-size: 10px; color: #161e2a; white-space: nowrap; }
.cr__date b { font-weight: 600; }
.cr__who { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 7px; letter-spacing: .1em; text-transform: uppercase; color: #646b77; white-space: nowrap; }

