/* ponytail: explicit grid column prevents legacy space-between from sizing the track to its captions. */
/* ponytail: one real aspect-ratio frame; no legacy percentage-height motion wrappers. */
:is(#proyectos,#initial-proyectos) .project-art .landing-preview { position: relative; inline-size: min(440px,calc((100vw - 260px)/2)); max-inline-size: 100%; height: auto; aspect-ratio: 960 / 622; flex: none; margin-inline: auto; }
:is(#proyectos,#initial-proyectos) .project-art .landing-preview > :is(img,video) { max-width: none; max-height: none; position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 5px; }
.landing-preview video { opacity: 0; pointer-events: none; }
.landing-preview[data-playing="true"] video { opacity: 1; }
/* ponytail: contain letterboxes must not expose a second poster behind the active video. */
.landing-preview[data-playing="true"] > img { visibility: hidden; }
:is(#proyectos,#initial-proyectos) .work-card > .project-visual { position: relative; inline-size: 100%; min-inline-size: 0; box-sizing: border-box; align-self: stretch; }
.preview-toggle { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #ffffff80; border-radius: 50%; background: #101312e6; color: #fff; cursor: pointer; }
.preview-toggle[hidden] { display: none; }
.preview-toggle:focus-visible { outline: 3px solid var(--primario); outline-offset: 3px; }
.preview-toggle svg { width: 22px; height: 22px; }
.preview-toggle .preview-play,.preview-toggle[aria-pressed="true"] .preview-pause { display: none; }
.preview-toggle[aria-pressed="true"] .preview-play { display: block; }
@media (max-width: 900px) {
  .m-layout :is(#proyectos,#initial-proyectos) .published-grid .work-card .project-visual { height: auto; flex: 0 0 auto; grid-template-columns: minmax(0,1fr); justify-content: stretch; justify-items: stretch; grid-template-rows: minmax(30px,auto) auto minmax(36px,auto); }
  .m-layout :is(#proyectos,#initial-proyectos) .published-grid .work-card .project-visual .project-art { display: block; inline-size: 100%; min-inline-size: 0; justify-self: stretch; height: auto; min-height: 0; padding: 0; flex: none; }
  .m-layout :is(#proyectos,#initial-proyectos) .project-art .landing-preview { inline-size: 100%; height: auto; aspect-ratio: 960 / 622; }
}
@media (prefers-reduced-motion: reduce) { .landing-preview video,.preview-toggle { display: none; } .landing-preview[data-playing] > img { visibility: visible; } }

/* ponytail: one desktop header grid replaces project-specific art padding, without changing the approved mobile grid. */
@media (min-width:901px) {
  #proyectos .published-grid .work-card > .project-visual { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:30px auto 36px; gap:12px; align-content:start; block-size:max-content; align-self:start; justify-content:stretch; min-height:0; padding:24px 28px; }
  #proyectos .published-grid .work-card .project-art { display:block; min-height:0; height:auto; padding:0; flex:none; min-width:0; }
  #proyectos .published-grid .work-card .project-copy { display:flex; flex-direction:column; padding:32px; }
  #proyectos .published-grid .work-card .project-status { min-height:2.8em; }
  #proyectos .published-grid .work-card h3 { font-size:clamp(1.6rem,2.6vw,2.05rem); line-height:1.1; min-height:2.2em; }
  #proyectos .published-grid .work-card .project-stack { margin-top:auto; }
}
