/* =========================================================================
   Ad creatives · in-feed phone mock (static ad = Variant A, carousel = Variant B)
   Pitch-side viewer (system A: dark stage, violet accent). The creatives inside
   the phone are Yanely's funnel brand; only the stage uses the pitch palette.
   ========================================================================= */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #0C0B12; --text: #F5F3FB; --text-2: #A7A2BC; --text-3: #8A85A0;
  --accent: #8C73FF; --accent-2: #A895FF; --accent-ink: #0C0B12;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ios: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); overflow-x: hidden;
  background-image: radial-gradient(1200px 700px at 50% -10%, rgba(140,115,255,.12), rgba(140,115,255,0) 70%); }
a { color: inherit; }

/* ---------- stage ---------- */
.sa { position: relative; overflow: hidden; padding: clamp(46px, 7vh, 84px) 16px clamp(56px, 8vh, 96px); }
.sa__glow { position: absolute; left: 50%; top: 46%; width: min(900px, 130vw); height: 760px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(140,115,255,.30), rgba(140,115,255,.08) 55%, rgba(140,115,255,0)); pointer-events: none; }
.sa__intro { position: relative; text-align: center; max-width: 640px; margin: 0 auto clamp(30px, 5vw, 48px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--accent); }
.sa__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -.02em; }
.sa__sub { margin: 14px auto 0; font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 520px; }
.stage { position: relative; display: grid; place-items: center; }
.stage::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 420px; max-width: 80vw; height: 60px; transform: translateX(-50%);
  background: rgba(0,0,0,.85); border-radius: 50%; filter: blur(22px); z-index: 0; }
.phone-wrap { position: relative; z-index: 1; }
.hint { position: relative; z-index: 1; margin: 34px 0 0; text-align: center; font-size: 14px; color: var(--text-3); }

/* ---------- iPhone 17 shell ---------- */
.iphone { --w: 392px; --r: 62px; position: relative; width: var(--w); aspect-ratio: 392 / 846; border-radius: var(--r); padding: 11px;
  background: linear-gradient(148deg, #6f6a63, #100e0c 30%, #7b756c 52%, #100e0c 74%, #6f6a63);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), inset 0 0 0 2px rgba(0,0,0,.6), 0 60px 120px -30px rgba(0,0,0,.95), 0 30px 60px -30px rgba(0,0,0,.95); }
.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), rgba(255,255,255,0) 28%, rgba(255,255,255,0) 70%, rgba(255,255,255,.05)); }
.btn-side { position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(90deg, #4c4842, #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%; border-radius: calc(var(--r) - 11px); overflow: hidden; background: #fff; color: #000;
  display: flex; flex-direction: column; font-family: var(--ios); }

/* iOS chrome */
.status { flex: none; height: 54px; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.island { position: absolute; left: 50%; top: 11px; width: 116px; height: 33px; transform: translateX(-50%); background: #000; border-radius: 20px; }
.island::after { content: ""; position: absolute; right: 13px; top: 11px; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2b3a55, #0a0d14 70%); }
.sys { display: flex; gap: 6px; align-items: center; }
.homebar { flex: none; height: 26px; display: grid; place-items: center; background: #fff; }
.homebar::before { content: ""; width: 138px; height: 5px; border-radius: 3px; background: #000; }

/* Instagram chrome */
.ig-top { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 2px 16px 6px; }
.ig-logo { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive; font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.ig-icons { display: flex; gap: 20px; align-items: center; }
.ig-dm { position: relative; }
.ig-badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; border-radius: 9px; background: #ff3040; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.feed { flex: 1; overflow: hidden; }
.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; }
.who { flex: 1; line-height: 1.2; }
.who b { font-size: 14px; font-weight: 600; }
.who span { display: block; font-size: 12px; color: #737373; }
.dots3 { font-size: 18px; letter-spacing: 1px; font-weight: 700; padding: 0 4px; }
.post-media { position: relative; display: block; width: 100%; aspect-ratio: 1080 / 1350; background: #eee; 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: .5px solid #dbdbdb;
  font-size: 14px; font-weight: 600; color: #000; text-decoration: none; }
.cta-strip svg { width: 16px; height: 16px; }
.actions { position: relative; display: flex; align-items: center; gap: 15px; padding: 9px 13px 4px; }
.actions svg { width: 25px; height: 25px; fill: none; stroke: #000; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.actions .spacer { flex: 1; }
.likes { padding: 2px 14px 0; font-size: 14px; font-weight: 600; }
.caption { padding: 4px 14px 0; font-size: 14px; line-height: 1.35; }
.caption b { font-weight: 600; margin-right: 4px; }
.caption .more { color: #737373; }
.comments { padding: 4px 14px 0; font-size: 14px; color: #737373; }
.stamp { padding: 4px 14px 8px; font-size: 11.5px; color: #737373; }
.tabbar { flex: none; display: flex; justify-content: space-around; align-items: center; height: 50px; border-top: .5px solid #dbdbdb; background: #fff; }
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: #000; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar .me { width: 27px; height: 27px; border-radius: 50%; overflow: hidden; border: 1px solid #dbdbdb; }
.tabbar .me img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Variant B: carousel restyled as Instagram ---------- */
.post-media .cstage { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; overflow: hidden; touch-action: pan-y; user-select: none; background: #000; }
.ctrack { display: flex; height: 100%; transition: transform .45s cubic-bezier(.66, 0, .2, 1); will-change: transform; }
.ctrack.no-anim { transition: none; }
.cslide { min-width: 100%; height: 100%; }
.cslide img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; pointer-events: none; }
.post-media .cnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.82); box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; transition: opacity .2s; }
.post-media .cnav::before { content: ""; position: absolute; inset: 0; margin: auto; width: 7px; height: 7px; border-top: 2px solid #262626; border-right: 2px solid #262626; }
.post-media .cnav--prev { left: 8px; } .post-media .cnav--prev::before { transform: rotate(-135deg); margin-left: 10px; }
.post-media .cnav--next { right: 8px; } .post-media .cnav--next::before { transform: rotate(45deg); margin-right: 10px; }
.post-media .cnav[disabled] { opacity: 0; pointer-events: none; }
.ig-count { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 12px; }
.actions .cdots { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%); display: flex; gap: 4px; }
.actions .cdots button { width: 6px; height: 6px; border-radius: 50%; border: 0; padding: 0; background: #c7c7c7; cursor: pointer; }
.actions .cdots button.is-on { background: #0095F6; }

/* ---------- the callout ---------- */
.callout { position: absolute; left: 100%; top: var(--cy, 62%); width: 250px; margin-left: 4px; pointer-events: none; transition: opacity .3s var(--ease); }
.callout svg { display: block; width: 130px; height: 90px; overflow: visible; }
.callout .ln { fill: none; stroke: var(--accent-2); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 220; stroke-dashoffset: 220; }
.callout .ar { fill: none; stroke: var(--accent-2); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.rv.in .callout .ln, .callout.in .ln { animation: draw .9s .35s var(--ease) forwards; }
.rv.in .callout .ar, .callout.in .ar { animation: fadeIn .3s 1.15s forwards; }
.bubble { position: relative; display: inline-block; margin: 6px 0 0 70px; padding: 12px 18px; border-radius: 16px; transform: rotate(-3deg);
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font-family: var(--display); font-weight: 700; font-size: 19px; white-space: nowrap;
  box-shadow: 0 16px 40px -14px rgba(140,115,255,.7); opacity: 0; }
.bubble::before { content: ""; position: absolute; left: 22px; top: -9px; border: 9px solid transparent; border-top: 0; border-bottom-color: var(--accent-2); }
.rv.in .bubble, .callout.in .bubble { animation: fadeIn .35s 1.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
.phone-wrap:has(#cprev:not([disabled])) .callout { opacity: 0; }
@media (max-width: 980px) {
  .callout { position: static; width: auto; margin: 26px auto 0; text-align: center; }
  .callout svg { display: none; }
  .bubble { margin: 0; transform: rotate(-2deg); opacity: 1; animation: none !important; }
  .bubble::before { left: 50%; margin-left: -9px; }
}
@media (prefers-reduced-motion: reduce) {
  .callout .ln { stroke-dashoffset: 0; animation: none !important; } .callout .ar, .bubble { opacity: 1; animation: none !important; }
  .ctrack { transition: none; }
}

/* ---------- clean carousel viewer (carousel/index.html) ---------- */
.car__viewer { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.car__viewer .cstage { position: relative; width: min(90vw, 430px); aspect-ratio: 1080 / 1350; overflow: hidden; border-radius: 22px; background: #05070c; touch-action: pan-y; user-select: none;
  box-shadow: 0 34px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(168,149,255,.14); }
.car__viewer .cnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(168,149,255,.45); padding: 0;
  background: rgba(12,11,18,.45); backdrop-filter: blur(8px); cursor: pointer; transition: opacity .2s, background .2s; }
.car__viewer .cnav::before { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border-top: 2.5px solid #F5F3FB; border-right: 2.5px solid #F5F3FB; }
.car__viewer .cnav--prev { left: 14px; } .car__viewer .cnav--prev::before { transform: rotate(-135deg); margin-left: 17px; }
.car__viewer .cnav--next { right: 14px; } .car__viewer .cnav--next::before { transform: rotate(45deg); margin-right: 17px; }
.car__viewer .cnav[disabled] { opacity: 0; pointer-events: none; }
.car__viewer .cdots { display: flex; gap: 9px; }
.car__viewer .cdots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,.22); transition: background .25s, transform .25s; }
.car__viewer .cdots button.is-on { background: var(--accent-2); transform: scale(1.3); }
.car__caption { margin: 36px auto 0; max-width: 520px; background: rgba(255,255,255,.04); border: 1px solid rgba(168,149,255,.16); border-radius: 16px; padding: 22px 24px; }
.car__caplabel { margin: 0 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); }
.car__captext { margin: 0; font-size: 15.5px; line-height: 1.62; color: #d6d2e6; white-space: pre-line; }

/* footer (brand only) */
.brandfoot { display: flex; align-items: center; justify-content: center; gap: 10px; height: 72px; border-top: 1px solid rgba(255,255,255,.06); color: var(--text-2); font-family: var(--display); font-weight: 600; font-size: 16px; }
.brandfoot svg { width: 24px; height: 24px; }

/* reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
html:not(.js) .rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

@media (max-width: 460px) {
  .iphone { --w: 320px; --r: 50px; }
  .status { padding: 4px 22px 0 26px; font-size: 14px; }
  .island { width: 96px; height: 28px; top: 9px; }
}
@media (max-width: 360px) { .iphone { --w: 290px; --r: 46px; } }

/* ---- mobile hardening (references/mobile.md) ---- */
img, svg, video, canvas, iframe { max-width: 100%; }
p, li, h1, h2, h3, h4 { overflow-wrap: anywhere; }
