/* Maquetes del hero de cada servei.
   Tot es veu en l'estat final per defecte (sense JS i amb moviment reduït).
   Les animacions només parteixen d'un estat (fill backwards) i viuen dins de
   prefers-reduced-motion: no-preference. Un sol moment orquestrat per hero. */

.mk { --mk-ac: var(--vine); --mk-on: var(--on-vine); --mk-soft: var(--vine-soft);
  margin: 0; justify-self: center; width: min(100%, 400px); display: grid; justify-items: center;
  position: relative; font-family: var(--f-body); color: var(--ink); }
.mk > [aria-hidden] { max-width: 100%; }
.mk b, .mk strong { font-weight: 700; }
.mk-shadow { box-shadow: 0 1px 2px rgb(44 51 42 / .08), 0 18px 40px -12px rgb(44 51 42 / .22); }

/* ---------- Telèfon ---------- */
/* El notch, la hora i la bateria van en proporció a l'amplada del telèfon (cqi): en un telèfon petit no s'encavalquen.
   A 248 px fan el mateix que abans (70 × 20 el notch, 11 px la lletra). */
.mk-phone { width: 248px; max-width: 100%; aspect-ratio: 9 / 18.4; padding: 9px; border-radius: 40px;
  background: #20261F; position: relative; container-type: inline-size; }
.mk-phone::before { content: ""; position: absolute; top: calc(9px + 3.5cqi); left: 50%; translate: -50% 0; width: 30.4cqi; height: 8.7cqi;
  border-radius: 999px; background: #141812; z-index: 3; }
.mk-screen { position: relative; height: 100%; border-radius: 32px; overflow: hidden; background: var(--paper);
  display: flex; flex-direction: column; }
.mk-status { display: flex; justify-content: space-between; align-items: flex-start; padding: 3.5cqi 9.6cqi 0; height: 17.4cqi; box-sizing: border-box;
  font: 600 max(8px, 4.8cqi)/1 var(--f-body); color: var(--ink); flex: none; }
.mk-status > span { display: flex; align-items: center; height: 8.7cqi; }
.mk-status i { display: inline-block; margin-top: 2.4cqi; width: 7.8cqi; height: 3.9cqi; border-radius: 3px; border: 1.5px solid currentColor; position: relative; }
.mk-status i::after { content: ""; position: absolute; inset: 1.5px 4px 1.5px 1.5px; border-radius: 1px; background: currentColor; }

/* ---------- Botó ---------- */
.mk-btn { display: grid; place-items: center; height: 34px; border-radius: 8px; font: 700 12.5px/1 var(--f-body); }
.mk-btn.is-main { background: var(--mk-ac); color: var(--mk-on); }

/* ---------- Anuncis ---------- */
.mk-ad { width: 100%; max-width: 330px; justify-self: start; border-radius: var(--r-block); background: var(--paper); border: 1px solid var(--line);
  padding: 14px 16px 16px; display: grid; gap: 8px; position: relative; z-index: 1; }
.mk-ad-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.mk-ad-top b { font-weight: 700; color: var(--ink); }
.mk-ad h3, .mk-ad .mk-t { margin: 0; font: 600 16px/1.2 var(--f-body); color: var(--ink); }
.mk-ad p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.mk-ad .mk-btn { justify-self: start; padding-inline: 18px; margin-top: 4px; height: 36px; }
.mk-res { width: 100%; max-width: 280px; justify-self: end; margin-top: -26px; border-radius: var(--r-block); background: var(--ink); color: var(--paper);
  padding: 40px 18px 18px; display: grid; gap: 10px; }
.mk-res-h { font: 700 11px/1 var(--f-body); color: var(--on-dark-2); }
.mk-bar { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-size: 12.5px; }
.mk-bar i { display: block; height: 10px; border-radius: 999px; background: var(--vine); transform-origin: left; width: var(--w); }
.mk-budget { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid #4A5247; font-size: 12.5px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.mk-budget b { color: var(--stamp); }

@media (max-width: 860px) { .mk { width: min(100%, 360px); } }
@media (max-width: 560px) { .mk-phone { width: 228px; } }

/* ---------- Moviment ---------- */
@keyframes mk-rise { from { opacity: 0; translate: 0 10px; } }
@keyframes mk-grow { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: no-preference) {
  .mk-phone, .mk-ads { animation: mk-rise .7s .15s var(--ease-out) backwards; }

  /* Anuncis: l'anunci, després el panell i les barres que creixen */
  .mk-res { animation: mk-rise .6s .7s var(--ease-out) backwards; }
  .mk-bar i { animation: mk-grow .9s var(--ease-out) backwards; animation-delay: calc(1.2s + var(--i) * 160ms); }
  .mk-budget { animation: mk-rise .5s 1.9s var(--ease-out) backwards; }
}

.mk-ads { width: 100%; max-width: 380px; display: grid; }
