/* =========================================================
   MARTI ENCINAS — Portfolio design system
   Grid: 12 columns · 120px side margins · 24px gutter
   ========================================================= */

:root {
  --blue: #0764FF; /* contraste AA: 4.67:1 sobre --bg, 4.91:1 con texto blanco */
  --blue-dark: #0051D8; /* hover, mismo tono */
  --bg: #FBF9F5;
  --white: #FFFFFF;
  --ink: #000000;
  --sub: #444444;
  --rule: #E6E0D6;
  --ph: #F1ECE4;
  --helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --margin: 120px;
  --gutter: 24px;
  /* Espaciado estándar entre elementos relacionados: título → subtítulo, back → título,
     imagen → texto, padding vertical del header */
  --space-s: 12px;

  /* ---------- TYPE SCALE (desktop) ---------- */
  --h1: 48px;      --h1-lh: 56px;     /* título de página */
  --h2: 28px;      --h2-lh: 32px;     /* secciones (Experience, Education…) */
  --h3: 24px;      --h3-lh: 32px;     /* puestos en About */
  --h4: 18px;      --h4-lh: 24px;     /* títulos de cards, "Or find me on" */
  --h5: 16px;      --h5-lh: 20px;     /* small titles */
  --lead: 22px;    --lead-lh: 30px;   /* intro paragraph */
  --body: 18px;    --body-lh: 26px;   /* running text */
  --small: 16px;   --small-lh: 24px;  /* short text, inputs, buttons */
  --caption: 14px; --caption-lh: 16px;/* back links, small buttons */
  --label: 12px;   --label-lh: 18px;  /* mono labels: dates, breadcrumbs, chips */
  --micro: 11px;   --micro-lh: 14px;  /* mono tags, meta */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--helvetica);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }

/* ---------- Typography: elements + classes ---------- */
h1, .h1 { font-family: var(--helvetica); font-weight: 700; font-size: var(--h1); line-height: var(--h1-lh); }
h2, .h2 { font-family: var(--helvetica); font-weight: 700; font-size: var(--h2); line-height: var(--h2-lh); }
h3, .h3 { font-family: var(--helvetica); font-weight: 700; font-size: var(--h3); line-height: var(--h3-lh); }
h4, .h4 { font-family: var(--helvetica); font-weight: 700; font-size: var(--h4); line-height: var(--h4-lh); }
h5, .h5 { font-family: var(--helvetica); font-weight: 700; font-size: var(--h5); line-height: var(--h5-lh); }
.lead   { font-weight: 300; font-size: var(--lead);  line-height: var(--lead-lh); }
.body   { font-weight: 300; font-size: var(--body);  line-height: var(--body-lh); }
.small  { font-weight: 300; font-size: var(--small); line-height: var(--small-lh); }
.label  { font-family: var(--mono); font-weight: 300; font-size: var(--label); line-height: var(--label-lh); color: var(--sub); }
.micro  { font-family: var(--mono); font-weight: 300; font-size: var(--micro); line-height: var(--micro-lh); color: var(--sub); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; }

/* ---------- Header ---------- */
.header {
  background: var(--white);
  min-height: 100px; /* logo 76px + --space-s arriba y abajo (crece si el nav es más alto, ej. mobile) */
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-s) var(--margin) var(--space-s) 123px;
}
.header-left { display: flex; align-items: flex-start; gap: 16px; }
.logo { display: block; width: 160px; } /* tamaño real del SVG: 160x76 */
.logo svg { display: block; width: 100%; height: auto; overflow: visible; }
.nav { display: flex; gap: 16px; }

/* ---------- Line button: nav, category tabs, links ---------- */
.btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: var(--small);
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover, .btn:focus-visible, .btn.active { background: var(--blue); color: var(--white); outline: none; }
.btn:active { transform: translateY(1px); }
.nav .btn { width: 110px; justify-content: center; border: 1px solid var(--blue); } /* navbar: outline completo */
.nav .btn + .btn { width: 111px; }

/* ---------- Solid button (.cta) ---------- */
.cta {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--helvetica);
  font-weight: 500;
  font-size: var(--small);
  line-height: 1;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cta[disabled] { opacity: .6; cursor: default; }
.cta.primary  { background: var(--blue); color: var(--white); }
.cta.primary:hover  { background: var(--blue-dark); }
.cta.upwork   { background: #14A800; color: var(--white); }
.cta.upwork:hover   { background: #108A00; }
.cta.linkedin { background: #0A66C2; color: var(--white); }
.cta.linkedin:hover { background: #004182; }
.cta.email    { background: var(--ink); color: var(--white); }
.cta.email:hover    { background: #333333; }
.cta.email.copied   { background: var(--blue); }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.ic-check, .cta.email.copied .ic-copy { display: none; }
.cta.email.copied .ic-check { display: block; }

/* ---------- Motif: >>> + title whose 1px line grows into a box ---------- */
.motif { display: flex; align-items: flex-start; gap: 9px; }
/* >>> : caja de 22x14 con 3 triángulos de 18x10; en hover la caja se llena de azul y los triángulos pasan a blanco */
.arrows {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 14px;
  margin-top: 9.5px; /* centrado en la línea de 33px del .boxline */
  color: var(--blue);
  flex-shrink: 0;
  transition: color .2s ease;
}
.arrows::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  opacity: 0;
  transition: opacity .2s ease;
}
.arrows svg { position: relative; display: block; width: 18px; height: 10px; fill: currentColor; }
.boxline {
  position: relative;
  display: inline-block;
  height: 33px;
  font-family: var(--helvetica);
  font-weight: 700;
  font-size: var(--h5);
  line-height: 33px;
  color: var(--ink);
  white-space: nowrap;
  transition: color .15s ease;
}
.boxline::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--blue);
  transition: height .3s cubic-bezier(.2, .8, .2, 1);
}
.boxline > span { position: relative; }

.hl { text-decoration: none; color: inherit; outline: none; }
.hl:hover .arrows, .hl:focus-visible .arrows, .is-on .arrows { color: var(--white); }
.hl:hover .arrows::before, .hl:focus-visible .arrows::before, .is-on .arrows::before { opacity: 1; }
.hl:hover .boxline::before, .hl:focus-visible .boxline::before, .is-on .boxline::before { height: 100%; }
.hl:hover .boxline, .hl:focus-visible .boxline { color: var(--white); transition: color .15s ease .12s; }
.is-on .boxline { color: var(--white); }

/* ---------- Section head (About, Case study) ---------- */
.sec-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--blue); }
.sec-head .arrows { margin-top: 0; align-self: center; }

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-weight: 300; font-size: var(--label); line-height: var(--label-lh); color: var(--sub); }
.crumbs a { text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.crumbs a:hover { color: var(--blue); border-color: var(--blue); }

/* ---------- Entry animation ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: fadeUp .5s ease both; }
.stagger > *:nth-child(2) { animation-delay: .08s; }
.stagger > *:nth-child(3) { animation-delay: .16s; }
.stagger > *:nth-child(4) { animation-delay: .24s; }
.stagger > *:nth-child(5) { animation-delay: .32s; }
.stagger > *:nth-child(n+6) { animation-delay: .4s; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* =========================================================
   HOME
   ========================================================= */
.home {
  width: 960px;
  margin-left: calc(50% - 478px);
  padding: 57px 0 119px;
  display: grid;
  grid-template-columns: 496px 464px;
  row-gap: 100px;
}
/* Presentación arriba de las categorías: mismo título + subtítulo que el resto de las páginas */
.home-intro { grid-column: 1 / -1; margin-top: -24px; text-align: center; } /* debajo de las cards: 100px de row-gap → 76px */
.home-intro .case-lead { margin: 0 auto; max-width: none; font-weight: 300; }
.home-intro .case-lead .co-link { font-weight: 400; }
.home-cell { display: flex; align-items: flex-start; gap: var(--space-s); }
.home-img { width: 180px; height: 180px; flex-shrink: 0; }
.home-img img { width: 100%; height: 100%; object-fit: contain; }
.home-info { margin-top: 30px; }
.home-text { display: flex; flex-direction: column; align-items: flex-start; }
.home-sub { font-family: var(--mono); font-weight: 300; font-size: var(--micro); line-height: var(--micro-lh); color: var(--sub); margin-top: 4px; white-space: nowrap; }

/* =========================================================
   ABOUT
   ========================================================= */
.about { padding: 72px var(--margin) 120px; display: flex; flex-direction: column; gap: 88px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.bio { font-weight: 300; font-size: var(--body); line-height: var(--body-lh); margin-top: var(--space-s); max-width: 720px; }
.bio strong { font-weight: 700; }

.entry { display: flex; flex-direction: column; gap: 12px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.entry-date { font-family: var(--mono); font-weight: 300; font-size: var(--label); line-height: var(--label-lh); color: var(--sub); display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.dash { margin: 0 8px; }
.now { background: var(--blue); color: var(--white); font-family: var(--mono); font-weight: 400; font-size: var(--micro); line-height: 1; padding: 4px 6px; }
.entry-co { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--helvetica); font-weight: 400; font-size: var(--caption); line-height: 22px; color: var(--ink); margin-top: 6px; }
/* Empresa con link: texto azul subrayado + flecha triangular a 45° */
.co-link { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue); transition: color .15s ease, border-color .15s ease; }
.co-link:hover, .co-link:focus-visible { color: var(--blue-dark); border-color: var(--blue-dark); }
.co-link .ext { width: 8px; height: 8px; fill: currentColor; flex-shrink: 0; }
.co-note { color: var(--sub); }
/* Línea con link debajo del subtítulo de un proyecto (ej. sitio en vivo) */
.case-note { font-weight: 300; font-size: var(--small); line-height: var(--small-lh); margin-top: var(--space-s); max-width: 720px; }
.case-note .co-link { font-weight: 400; }
.entry-desc { max-width: 720px; font-weight: 300; font-size: var(--body); line-height: var(--body-lh); }

.stack { row-gap: 88px; }
.stack > section { grid-column: span 6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; }
.chip { font-family: var(--mono); font-weight: 300; font-size: var(--label); line-height: 1; padding: 9px 12px; white-space: nowrap; border: 1px solid var(--rule); }

/* =========================================================
   CONTACT
   ========================================================= */
.page-contact main { display: flex; align-items: flex-start; justify-content: center; padding: 57px 20px 119px; } /* mismo arranque que la home */
/* Una columna: form arriba; otros canales abajo, separados con su propio título */
.contact-card { width: 100%; max-width: 420px; }
.reach { margin-top: 48px; }
.reach-title { margin-bottom: var(--space-s); }
.contact-title { font-size: var(--h2); line-height: var(--h2-lh); }
.form { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.form input, .form textarea {
  width: 100%;
  font-family: var(--helvetica);
  font-weight: 400;
  font-size: var(--small);
  line-height: 22px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 11px 12px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form textarea { resize: vertical; min-height: 88px; }
.form input::placeholder, .form textarea::placeholder { color: #6F6A63; } /* 5.4:1 sobre blanco (WCAG AA) */
.form input:focus, .form textarea:focus { border-color: var(--blue); box-shadow: inset 0 -1px 0 var(--blue); }
.form input:user-invalid { border-color: #D93025; }
.form .cta { margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.sent { display: none; margin-top: 28px; padding: 20px; background: var(--white); border-left: 3px solid var(--blue); }
.sent strong { display: block; font-size: var(--h5); margin-bottom: 4px; }
.sent p { font-weight: 300; font-size: var(--small); line-height: var(--small-lh); color: var(--sub); }
.contact-card.is-sent .form { display: none; }
.contact-card.is-sent .sent { display: block; }
.direct { display: flex; flex-direction: column; gap: 10px; }

/* =========================================================
   WORK LISTING
   ========================================================= */
.listing, .case { padding: 56px var(--margin) 120px; }
.listing .case-head { margin-top: 0; }
.cats { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.cats .btn { height: 38px; font-size: var(--caption); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 56px; margin-top: 56px; }
.pcard { display: block; }
.pcard-media { aspect-ratio: 16 / 9; background: var(--white); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pcard-media img { width: 100%; height: 100%; object-fit: contain; padding: 28px; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.pcard:hover .pcard-media img, .pcard:focus-visible .pcard-media img { transform: scale(1.04); }
.ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--ph); font-family: var(--mono); font-weight: 300; font-size: var(--label); color: #8F8A82; text-align: center; padding: 16px; }
.pcard-body { margin-top: 20px; }
.pcard .boxline, .home .boxline { font-size: var(--h4); } /* títulos de ítems = h4 */
.pcard-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.pcard-sum { font-weight: 300; font-size: var(--small); line-height: var(--small-lh); margin-top: 10px; }
.pcard-tags { font-family: var(--mono); font-weight: 300; font-size: var(--micro); line-height: var(--micro-lh); color: var(--sub); margin-top: 12px; }

/* =========================================================
   CASE STUDY
   ========================================================= */
.case-head { margin-top: var(--space-s); max-width: 880px; }
/* Título en caja negra con letra blanca (también el de Contact) */
.case-title, .contact-title { display: inline-block; background: var(--ink); color: var(--white); padding: 0 10px; letter-spacing: -.5px; }
.case-lead { font-weight: 300; font-size: var(--body); line-height: var(--body-lh); margin-top: var(--space-s); max-width: 720px; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: 48px; }
.gallery figure { background: var(--white); aspect-ratio: 4 / 3; overflow: hidden; }
.gallery figure.full { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: contain; padding: 40px; }

.case-body { margin-top: 96px; display: flex; flex-direction: column; gap: 64px; }
.case-sec { max-width: 720px; }
.case-sec h2 { font-size: var(--h3); line-height: 33px; }
.case-sec p { font-weight: 300; font-size: var(--body); line-height: var(--body-lh); margin-top: 16px; }

.proto { margin-top: 96px; }
.proto-frame { margin-top: 24px; aspect-ratio: 16 / 9; background: var(--white); border: 1px solid var(--rule); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.proto-frame iframe { width: 100%; height: 100%; border: 0; }
.proto-frame p { font-family: var(--mono); font-weight: 300; font-size: var(--label); color: var(--sub); }
.proto-frame .cta { width: auto; padding: 0 24px; }

.case-next { margin-top: 120px; padding-top: 24px; border-top: 1px solid var(--blue); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
/* <<< : mismos triángulos y hover que >>>, espejados */
.back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 400; font-size: var(--caption); line-height: var(--caption-lh); text-decoration: none; color: var(--sub); transition: color .2s ease; }
.back .arrows { margin-top: 0; color: var(--sub); } /* gris en reposo; en hover toma el estado azul de .hl */
.back:hover { color: var(--blue); }
.next { display: flex; flex-direction: column; align-items: flex-end; }

/* ---------- 404 ---------- */
.notfound { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; padding: 80px var(--margin); }
.notfound p { font-weight: 300; font-size: var(--body); line-height: var(--body-lh); }
.notfound .cta { width: auto; padding: 0 24px; }

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 1024px) {
  :root {
    --margin: 30px;
    --h1: 36px;   --h1-lh: 44px;
    --h2: 24px;   --h2-lh: 28px;
    --h3: 20px;   --h3-lh: 28px;
    --lead: 18px; --lead-lh: 26px;
    --body: 16px; --body-lh: 24px;
  }
  .header { padding: var(--space-s) 30px; }
  .nav .btn, .nav .btn + .btn { width: 118px; padding: 0; justify-content: center; }

  .home { width: auto; margin-left: 0; padding: 40px 30px 60px; grid-template-columns: 1fr; row-gap: 40px; }
  .home-intro { margin-top: 0; }
  .home-img { width: 140px; height: 140px; }
  .home-info { margin-top: 20px; }

  .about { padding: 48px 30px 80px; gap: 64px; }
  .entry { padding: 24px 0; }
  .stack { row-gap: 64px; }
  .stack > section { grid-column: 1 / -1; }

  .page-contact main { align-items: stretch; padding: 40px 30px 32px; }
  .contact-card { display: flex; flex-direction: column; align-items: stretch; }
  .contact-title { align-self: flex-start; }
  .reach { margin-top: 48px; }

  .listing, .case { padding: 40px 30px 80px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; margin-top: 40px; }
  .case-body, .proto { margin-top: 72px; }
}

/* =========================================================
   PHONE
   ========================================================= */
@media (max-width: 600px) {
  :root {
    --margin: 20px;
    --h1: 30px;   --h1-lh: 36px;
    --h2: 22px;   --h2-lh: 26px;
  }
  .header { padding: var(--space-s) 20px; }
  .nav { flex-direction: column; gap: 8px; }
  .nav .btn, .nav .btn + .btn { width: 120px; height: 38px; font-size: var(--caption); }

  .home { padding: 24px 20px 40px; row-gap: 24px; }
  .home-img { width: 110px; height: 110px; }
  .home-info { margin-top: 12px; }
  .home-sub { white-space: normal; }

  .about { padding: 32px 20px 64px; gap: 56px; }
  .chip { padding: 8px 10px; }

  .page-contact main { padding: 24px 20px 24px; }
  .form { gap: 10px; margin-top: 20px; }
  .form textarea { min-height: 72px; }
  .direct { gap: 8px; }
  .cta { height: 46px; }

  .listing, .case { padding: 28px 20px 64px; }
  .cats { flex-wrap: nowrap; overflow-x: auto; margin-right: -20px; padding-right: 20px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cards { grid-template-columns: 1fr; row-gap: 40px; }
  .gallery { grid-template-columns: 1fr; gap: 12px; }
  .gallery figure.full { aspect-ratio: 4 / 3; }
  .gallery img { padding: 24px; }
  .case-next { flex-direction: column; align-items: flex-start; }
  .next { align-items: flex-start; }
}

/* ---------- Behance covers ---------- */
.pcard-media img.cover { object-fit: cover; padding: 0; }
.cards-4-3 .pcard-media { aspect-ratio: 4 / 3; } /* todas las categorías menos Game UX/UI */
.gallery figure.hero { grid-column: 1 / -1; aspect-ratio: 404 / 316; }
.gallery img.cover { object-fit: cover; padding: 0; }
/* Ancho completo con la proporción propia de la imagen, sin recortes (capturas, renders, láminas) */
.gallery figure.wide { grid-column: 1 / -1; aspect-ratio: auto; }
.gallery figure.wide img { height: auto; object-fit: initial; padding: 0; }
.gallery figure.wide video { display: block; width: 100%; height: auto; } /* animaciones (en lugar de GIF pesados) */

/* Galería de placas (posts de redes): grilla de 4; .half = 2 columnas, .wide = ancho completo.
   Las imágenes van en su proporción, sin recortes. 2 columnas en mobile. */
.gallery.plates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery.plates figure { aspect-ratio: auto; background: none; }
.gallery.plates figure.half { grid-column: span 2; }
.gallery.plates img { height: auto; object-fit: initial; padding: 0; }
@media (max-width: 600px) {
  .gallery.plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Process Motion: grilla de 2 columnas con espacio chico. Los dos banners de LinkedIn se apilan
   al lado del post cuadrado y se recortan solo abajo (zona blanca, debajo de los botones)
   para que juntos midan lo mismo que el cuadrado. */
.gallery.pm-grid { gap: 16px; align-items: stretch; } /* 16px: máximo para que los banners no recorten los botones */
.gallery.pm-grid figure { aspect-ratio: auto; background: none; }
.gallery.pm-grid img { height: auto; object-fit: initial; padding: 0; }
.pm-banners { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.pm-banners figure { min-height: 0; overflow: hidden; }
/* contorno sutil para separar las piezas claras del fondo */
.gallery.pm-grid figure { outline: 1px solid #F1F1F1; outline-offset: -1px; }
.gallery.pm-grid > figure { align-self: start; }
.pm-banners figure:first-child { flex: 866 1 0; }   /* 1945x896, contenido hasta y=855 */
.pm-banners figure:last-child { flex: 1039 1 0; }   /* 1945x1195, contenido hasta y=1021 */
.gallery.pm-grid .pm-banners img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 600px) {
  .gallery.pm-grid { grid-template-columns: 1fr; }
  .pm-banners figure { flex: none !important; }
  .gallery.pm-grid .pm-banners img { height: auto; }
}

/* ---------- Accesibilidad ---------- */
/* Foco de teclado siempre visible (WCAG 2.4.7). Los elementos con relleno en hover lo suman. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, video:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px;
}
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Botón para pausar lo que se mueve solo (WCAG 2.2.2): rotación de la home y videos en loop */
.motion-toggle { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-weight: 400;
  font-size: var(--micro); line-height: 1; color: var(--sub); background: none; border: 0; padding: 6px 0; cursor: pointer; }
.motion-toggle:hover { color: var(--blue); }
.motion-toggle svg { width: 8px; height: 8px; fill: currentColor; }
.home-intro .motion-toggle { margin-top: var(--space-s); }
.video-wrap { position: relative; }
.video-wrap .motion-toggle { position: absolute; right: 12px; bottom: 12px; padding: 6px 8px; background: rgba(255,255,255,.92); color: var(--ink); }
