/* ===== Meta Ads page (preview) =====
   Page-specific visuals, loaded after service-page.css on /meta-ads/ only, so the approved
   Google Ads page and homepage are unaffected. Layout and styling only; copy is in the HTML.
   Every animated element's resting style is its finished state, so reduced-motion and no-JS
   visitors see the complete illustration. */

/* ---------- Hero: social feed illustration ---------- */
.mf-visual { max-width: 520px; width: 100%; justify-self: end; }
.mf-stage { position: relative; display: flex; justify-content: center; padding: 6px 0 40px; }
.mf-phone { width: 296px; background: #0f1d16; border-radius: 38px; padding: 11px; box-shadow: 0 34px 70px rgba(0, 0, 0, .38); rotate: 2deg; }
.mf-screen { height: 540px; border-radius: 28px; overflow: hidden; background: var(--paper); position: relative; }
.mf-appbar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--rule); position: relative; z-index: 1; }
.mf-appbar i { width: 64px; height: 9px; border-radius: 5px; background: var(--ink); margin-right: auto; }
.mf-appbar b { width: 18px; height: 18px; border-radius: 50%; background: var(--rule); }
.mf-feed { padding: 10px; display: grid; gap: 10px; transform: translateY(-182px); }
.mf-post { background: #fff; border-radius: 14px; border: 1px solid var(--rule); padding: 10px; }
.mf-organic { height: 172px; display: grid; grid-template-rows: auto 1fr auto; gap: 8px; }
.mf-who { display: flex; align-items: center; gap: 8px; }
.mf-av { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--sage); }
.mf-av-brand { background: linear-gradient(135deg, #1b4f8a, #2f6fb3); }
.mf-lines { display: grid; gap: 4px; flex: 1; }
.mf-lines i, .mf-meta i, .mf-actions i { display: block; height: 7px; border-radius: 4px; background: var(--rule); width: 60%; }
.mf-lines i.s, .mf-meta i.s { width: 38%; height: 6px; }
.mf-meta { display: grid; gap: 5px; }
.mf-img { border-radius: 10px; }
.mf-img-plain { background: linear-gradient(135deg, #d9dccf, #c4c9bb); }
.mf-name b { display: block; font-size: .78rem; color: var(--ink); line-height: 1.2; }
.mf-name small { display: block; font-size: .66rem; color: var(--muted); }
.page-hero .mf-visual p.mf-text { font-size: .76rem; line-height: 1.35; color: var(--ink-soft); margin: 8px 0; }
.mf-img-ad { height: 136px; background: linear-gradient(140deg, #1b4f8a 0%, #2f6fb3 55%, #f08a24 140%); display: grid; place-items: center; }
.mf-drop { width: 34px; height: 34px; background: #fff; border-radius: 50% 0 50% 50%; rotate: -45deg; opacity: .92; }
.mf-ctabar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--paper-alt); }
.mf-url { font-size: .66rem; color: var(--muted); }
.mf-btn { position: relative; font-size: .7rem; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); white-space: nowrap; }
.mf-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.mf-actions i { width: 28px; }
.mf-heart { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.mf-toast { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 12px; background: var(--paper); color: var(--ink); border-radius: 16px; padding: 14px 18px; box-shadow: 0 24px 50px rgba(0, 0, 0, .32); rotate: -1.5deg; z-index: 2; }
.mf-toast .ok { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: .9rem; }
.mf-toast b { display: block; font-size: .98rem; }
.mf-toast small { display: block; font-size: .8rem; color: var(--muted); }
.page-hero .mf-visual p.mf-note { margin-top: 12px; text-align: right; font-size: .8rem; color: var(--sage); }

/* ---------- What's included: cards with small diagrams ---------- */
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bento-card { background: var(--field); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.bento-card.b-wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.bento-body { padding: 22px 24px 26px; }
.bento-body h3 { font-size: 1.28rem; margin-bottom: 8px; color: var(--ink); }
.bento-body p { font-size: .96rem; }
.mi { min-height: 136px; background: var(--paper-alt); border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; }
.b-wide .mi { border-bottom: 0; border-right: 1px solid var(--rule); }
.mi span { font-size: .76rem; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.mi em { flex: none; width: 22px; height: 2px; background: var(--ink); }
.mi span.on, .mi-strategy span:last-child { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* creative */
.mi-creative .tile { width: 150px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 8px; display: grid; gap: 6px; }
.mi-creative .photo { height: 62px; border-radius: 8px; background: linear-gradient(135deg, var(--ink), #3c5a4b); position: relative; }
.mi-creative .photo span { position: absolute; right: 12px; top: 10px; width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%; background: var(--sage); }
.mi-creative i, .mi-landing i, .mi-test i, .mi-report i { display: block; height: 6px; border-radius: 3px; background: var(--rule); width: 85%; }
.mi-creative i.s, .mi-landing i.s, .mi-test i.s, .mi-report i.s { width: 55%; }
/* targeting */
.mi-target { gap: 18px; }
.rings { position: relative; width: 104px; height: 104px; flex: none; }
.rings span { position: absolute; border-radius: 50%; padding: 0; background: transparent; }
.rings .r1 { inset: 0; border: 1.5px dashed var(--muted); }
.rings .r2 { inset: 22px; border: 1.5px solid var(--sage); background: rgba(185, 194, 181, .25); }
.rings .r3 { inset: 42px; border: 0; background: var(--ink); }
.rings .d { position: absolute; width: 8px; height: 8px; border-radius: 50%; }
.rings .d1 { left: 6px; top: 40px; border: 1.5px solid var(--muted); }
.rings .d2 { right: 8px; top: 18px; border: 1.5px solid var(--muted); }
.rings .d3 { left: 46px; bottom: 2px; border: 1.5px solid var(--muted); }
.rings .d4 { left: 30px; top: 30px; background: var(--ink); }
.rings .d5 { right: 28px; bottom: 30px; background: var(--ink); }
.mi-target .legend { display: grid; gap: 8px; }
.mi-target .legend span { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font-size: .74rem; }
.legend b { width: 10px; height: 10px; border-radius: 50%; }
.legend .k1 { border: 1.5px dashed var(--muted); }
.legend .k2 { background: var(--ink); }
/* testing */
.mi-test { gap: 14px; }
.mi-test .ab { position: relative; width: 92px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 26px 8px 10px; display: grid; gap: 5px; }
.mi-test .ab .t { position: absolute; left: 8px; top: 6px; padding: 0 6px; font-size: .68rem; border-radius: 999px; }
.mi-test .ab .bar { display: block; height: 6px; border-radius: 3px; background: var(--sage); width: 35%; margin-top: 4px; }
.mi-test .ab.win { border-color: var(--ink); }
.mi-test .ab.win .t { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mi-test .ab.win .bar { background: var(--ink); width: 85%; }
/* landing page match */
.mi-landing .ad, .mi-landing .page { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 8px; display: grid; gap: 5px; }
.mi-landing .ad { width: 78px; }
.mi-landing .page { width: 100px; }
.mi-landing b { display: block; height: 10px; border-radius: 3px; background: var(--ink); width: 70%; }
.mi-landing .page span { display: block; margin-top: 4px; height: 12px; width: 60%; padding: 0; border: 0; border-radius: 999px; background: var(--ink); }
/* reporting */
.mi-report .sheet { width: min(260px, 100%); background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 8px 12px; }
.mi-report .row { display: grid; grid-template-columns: 1fr 1.4fr 48px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.mi-report .row:last-child { border-bottom: 0; }
.mi-report .row i { width: 100%; }
.mi-report .row b { height: 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--field); }

/* ---------- How it works on forest ---------- */
.svc-dark .timeline::before { background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 75%, var(--sage) 100%); opacity: .55; }
.svc-dark .tl-node { background: var(--ink); border-color: var(--paper); }
.svc-dark .timeline li:last-child .tl-node { background: var(--paper); }
.svc-dark .tl-num { color: var(--paper); }
.svc-dark .timeline p { color: var(--on-dark); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* hero story, about 3s: scroll the feed, reach the sponsored post, tap its quote button, inquiry arrives */
  .js .mf-phone { animation: xaIn .7s cubic-bezier(.16, 1, .3, 1) .1s both, mfFloat 7s ease-in-out 3.2s infinite alternate; }
  .js .mf-feed { animation: mfScroll .9s cubic-bezier(.45, 0, .2, 1) .45s both; }
  .js .mf-ad { animation: mfFocus .8s ease 1.35s both; }
  .js .mf-btn { animation: mfPress .5s ease 1.85s both; }
  .js .mf-btn::after { content: ''; position: absolute; inset: -2px; border-radius: 999px; border: 2px solid var(--sage); opacity: 0; animation: xaRipple 2.2s cubic-bezier(.16, 1, .3, 1) 1.9s backwards; }
  .js .mf-toast { animation: xaFade .7s cubic-bezier(.34, 1.56, .64, 1) 2.25s both, mfFloat 8s ease-in-out 3.4s infinite alternate-reverse; }

  /* card diagrams build once as each card appears; hovers on pointer devices */
  .js .bento-card.reveal.is-visible .mi > * { animation: svBuild .7s cubic-bezier(.16, 1, .3, 1) .3s backwards; }
  .js .bento-card.reveal.is-visible .mi > :nth-child(2) { animation-delay: .42s; }
  .js .bento-card.reveal.is-visible .mi > :nth-child(3) { animation-delay: .54s; }
  .js .bento-card.reveal.is-visible .mi > :nth-child(4) { animation-delay: .66s; }
  .js .bento-card.reveal.is-visible .mi > :nth-child(5) { animation-delay: .78s; }
  .js .bento-card.reveal.is-visible .mi-test .bar { animation: svGrow .9s cubic-bezier(.16, 1, .3, 1) .8s backwards; }
  .js .bento-card.reveal {
    transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1), translate .5s cubic-bezier(.16, 1, .3, 1), box-shadow .5s ease, border-color .4s ease;
    transition-delay: var(--rd, 0ms);
  }
  @media (hover: hover) and (pointer: fine) {
    .bento-card:hover { translate: 0 -6px; box-shadow: 0 20px 40px rgba(31, 58, 46, .12); border-color: var(--sage); }
  }

  /* timeline on forest: the drawn line, filled dots and number emphasis in cream */
  .svc-dark .timeline.is-live::after { background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 75%, var(--sage) 100%); }
  .svc-dark .timeline.is-live li .tl-node { background: var(--ink); }
  .svc-dark .timeline.is-live li.is-reached .tl-node { background: var(--paper); animation: mfPing .9s ease-out; }
  .svc-dark .timeline.is-live .tl-num { color: var(--sage); }
  .svc-dark .timeline.is-live li.is-reached .tl-num { color: var(--paper); }
  @media (max-width: 900px) {
    .svc-dark .timeline.is-live::after { background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 80%, var(--sage) 100%); }
  }
}
@keyframes mfScroll { from { transform: translateY(0); } }
@keyframes mfFocus { 0% { box-shadow: 0 0 0 0 rgba(185, 194, 181, 0); } 35% { box-shadow: 0 0 0 5px rgba(185, 194, 181, .8); } 100% { box-shadow: 0 0 0 0 rgba(185, 194, 181, 0); } }
@keyframes mfPress { from { background: var(--paper-alt); color: var(--ink); scale: 1; } 40% { scale: .92; } to { background: var(--ink); color: var(--paper); scale: 1; } }
@keyframes mfFloat { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@keyframes mfPing { from { box-shadow: 0 0 0 0 rgba(243, 238, 227, .45); } to { box-shadow: 0 0 0 12px rgba(243, 238, 227, 0); } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .mf-visual { justify-self: center; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento-card.b-wide { grid-column: auto; display: flex; }
  .b-wide .mi { border-right: 0; border-bottom: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  /* phones: no continuous float, to save battery */
  .js .mf-phone { animation-name: xaIn, none; }
  .js .mf-toast { animation-name: xaFade, none; }
  .mf-phone { width: 250px; }
  .mf-screen { height: 470px; }
  .mf-toast { padding: 12px 14px; }
  .mf-url { display: none; }
  .mf-ctabar { justify-content: flex-end; }
  .page-hero .mf-visual p.mf-note { text-align: left; }
}
