/* Solprisoft: estilos propios sobre el kit (assets/system.css). Solo piezas que el kit no trae:
   el logo, las ventanas y móviles que enmarcan las capturas, las páginas de flujo libre (listados,
   proyecto, artículo, contacto) y las portadas generadas de los artículos. */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Logo: el molinillo de seis aspas y "Solpri" + "soft" ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 20px/1 var(--font-display); letter-spacing: -0.02em; }
.logo__mark { width: 30px; height: 30px; flex: none; transition: transform 600ms cubic-bezier(0.23, 1, 0.32, 1); }
.logo__word > span { font-weight: 300; font-style: italic; }
@media (hover: hover) and (pointer: fine) { .logo:hover .logo__mark { transform: rotate(60deg); } }
.logo--footer { font-size: 28px; }
.logo--footer .logo__mark { width: 40px; height: 40px; }
@media (prefers-reduced-motion: reduce) { .logo__mark { transition: none; } }

/* ---------- Capturas: ventana de navegador y móvil ---------- */
.win { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--bg);
       border: 1px solid color-mix(in oklab, var(--ink) 14%, transparent); }
.win__bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; background: var(--surface);
            border-bottom: 1px solid color-mix(in oklab, var(--ink) 10%, transparent); }
.win__bar i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in oklab, var(--ink) 18%, transparent); }
.win__bar i:nth-child(1) { background: #F04A2A; } .win__bar i:nth-child(2) { background: #F7B21B; } .win__bar i:nth-child(3) { background: #8BC926; }
.win__url { margin-left: 10px; font: 400 13px/1 var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win img { display: block; width: 100%; height: auto; max-width: none; }
.device { position: relative; display: block; aspect-ratio: 390 / 844; padding: 7px; border-radius: 34px; background: #121212; border: 1px solid #2c2c2c; }
.device img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: top; border-radius: 27px; }
.stage > .device { position: absolute; }

/* ---------- Home: hero ---------- */
.hero__media.shots { background: var(--surface); }
.shots .stage > .at-corner { --ax: 48px; --ay: 48px; width: 1100px; }
.shots .stage > .at-over { --bx: 40px; --by: 40px; width: 210px; }
.shots .ly-float { bottom: var(--s-7); left: var(--s-8); }
@media (max-width: 1279px) { .shots .stage > .at-over { display: none; } }
@media (max-width: 1023px) {
  .shots .stage > .at-corner { --ax: 24px; --ay: 24px; width: 1000px; }
  .hero--split .hero__media { max-height: 520px; }
}
@media (max-width: 639px) {
  .shots .stage > .at-corner { width: 560px; }
  .shots .ly-float { left: var(--s-4); bottom: var(--s-4); width: calc(100% - 2 * var(--s-4)); }
}
.close__word { font-size: min(260px, (100vw - 2 * var(--gut)) / 5); line-height: 1.12; }
@media (max-width: 639px) { .close__word { line-height: 1.1; } }

/* ---------- Tarjetas de proyecto ---------- */
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--s-7); }
.pgrid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-8); }
.pcard { display: grid; gap: var(--s-4); align-content: start; color: inherit; text-decoration: none; }
.pcard__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r-lg); background: color-mix(in oklab, var(--c, var(--surface)) 22%, var(--bg)); }
.pcard__media .win { position: absolute; left: 24px; top: 24px; width: calc(100% + 120px); }
.pcard__media .device { position: absolute; right: 20px; bottom: -40px; width: 34%; }
.pgrid--two .pcard__media { aspect-ratio: 16 / 10; }
.pgrid--two .pcard__media .win { left: 40px; top: 40px; width: calc(100% + 40px); }
.pgrid--two .pcard__media .device { width: 22%; right: 40px; bottom: -60px; }
.pcard__media img { transition: transform 600ms cubic-bezier(0.23, 1, 0.32, 1); }
@media (hover: hover) and (pointer: fine) { .pcard:hover .pcard__media img { transform: scale(1.025); } }
.pcard__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-3); }
.pcard__head h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; margin: 0; }
.pcard p { margin: 0; max-width: 52ch; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-label); font-weight: 500; color: var(--muted); white-space: nowrap; }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--action)); }
@media (max-width: 1279px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .pgrid, .pgrid--two { grid-template-columns: minmax(0, 1fr); } }

/* home: la sección de proyectos y la del blog, una pantalla cada una */
#proyectos .pcard__media { aspect-ratio: 5 / 4; }
@media (min-width: 1024px) and (max-width: 1279px) { #proyectos .pgrid .pcard:nth-child(n+3) { display: none; } }
@media (max-width: 639px) { #proyectos .pgrid .pcard:nth-child(n+3), #blog-home .bgrid .bcard:nth-child(n+3) { display: none; } }

/* ---------- Tarjetas de artículo ---------- */
.bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); row-gap: var(--s-8); margin-top: var(--s-7); }
.bcard { display: grid; gap: var(--s-3); align-content: start; color: inherit; text-decoration: none; }
.bcard h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; margin: var(--s-2) 0 0; }
.bcard p { margin: 0; color: var(--ink); }
.bcard__meta { font-size: var(--t-small); color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .bcard:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; } .bcard:hover .cover__mark { transform: rotate(30deg) scale(1.04); } }
@media (max-width: 1023px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .bgrid { grid-template-columns: minmax(0, 1fr); } }

.cover { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r-lg); background: var(--surface); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--mark { background: color-mix(in oklab, var(--c) 16%, var(--bg)); }
.cover__mark { position: absolute; width: 78%; aspect-ratio: 1; right: -18%; top: -22%; transition: transform 800ms cubic-bezier(0.23, 1, 0.32, 1); }
.cover--hero { aspect-ratio: 21 / 8; }
@media (prefers-reduced-motion: reduce) { .cover__mark { transition: none; } }

/* ---------- Páginas de flujo libre (listados, proyecto, artículo, contacto) ---------- */
main > section.flow.flow { height: auto; min-height: 0; padding: calc(var(--nav) + var(--s-8)) 0 var(--s-9); display: block; }
main > section.flow.flow + section.flow.flow { padding-top: 0; }
main > section.flow.flow > .wrap { height: auto; display: block; }
.page-head { display: grid; gap: var(--s-5); max-width: 860px; }
.page-head h1 { font: var(--display-weight) var(--t-h2)/1.08 var(--font-display); letter-spacing: var(--display-tracking); margin: 0; }
.page-head .t-lead { margin: 0; max-width: 62ch; }
.crumbs { font-size: var(--t-small); color: var(--muted); display: flex; gap: var(--s-2); flex-wrap: wrap; }
.crumbs a { color: inherit; }
.crumbs a:hover { color: var(--ink); }

/* proyecto */
.p-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.p-hero > .page-head { grid-column: span 7; }
.p-hero > .p-facts { grid-column: 9 / -1; }
.p-facts { display: grid; gap: var(--s-4); margin: 0; }
.p-facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--s-3); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.p-facts dt { color: var(--muted); font-size: var(--t-small); }
.p-facts dd { margin: 0; }
.p-stage { position: relative; margin-top: var(--s-8); border-radius: var(--r-lg); overflow: hidden; background: color-mix(in oklab, var(--c, var(--surface)) 20%, var(--bg)); padding: clamp(24px, 5vw, 64px) clamp(24px, 5vw, 64px) 0; }
.p-stage .win { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.p-stage--phones { display: flex; gap: clamp(16px, 4vw, 48px); justify-content: center; padding-bottom: clamp(24px, 5vw, 64px); }
.p-stage--phones .device { width: min(42%, 280px); }
.p-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--gutter); align-items: start; }
.p-shots > .p-phones { margin-top: 0; justify-content: center; align-self: stretch; align-content: center; }
.p-shots > .p-phones:only-child { grid-column: 1 / -1; }
.p-shots > .p-phones .device { width: min(46%, 220px); }
.p-shots .win { width: 100%; }
.p-phones { display: flex; flex-wrap: wrap; gap: var(--gutter); margin-top: var(--gutter); padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface); }
.p-phones .device { width: min(100%, 240px); }
.p-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--s-9); }
.p-body > .prose { grid-column: 1 / span 7; }
.p-body > aside { grid-column: 9 / -1; display: grid; gap: var(--s-4); align-content: start; }
.p-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--s-7); }
@media (max-width: 1023px) {
  .p-hero > .page-head, .p-hero > .p-facts, .p-body > .prose, .p-body > aside { grid-column: 1 / -1; }
  .p-shots { grid-template-columns: minmax(0, 1fr); }
  .p-next { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) { .p-next { grid-template-columns: minmax(0, 1fr); } }

/* artículo */
.article { max-width: 760px; }
.article .cover { margin: var(--s-7) 0 var(--s-8); }
.article-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--t-small); color: var(--muted); }
.article-wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.article-wrap > .article { grid-column: 1 / span 8; }
.article-wrap > aside { grid-column: 10 / -1; display: grid; gap: var(--s-5); align-content: start; position: relative; }
@media (max-width: 1023px) { .article-wrap > .article, .article-wrap > aside { grid-column: 1 / -1; } }

.prose { font-size: 18px; line-height: 1.7; color: var(--ink); }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font: var(--display-weight) 30px/1.2 var(--font-display); letter-spacing: -0.02em; margin-top: 1.8em; }
.prose h3 { font: 500 21px/1.3 var(--font-text); margin-top: 1.5em; }
.prose a { color: var(--action); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li::marker { color: var(--muted); }
.prose li + li { margin-top: .4em; }
.prose blockquote { border-left: 3px solid var(--action); padding-left: var(--s-5); color: var(--muted); }
.prose code { font: 0.9em var(--font-mono); background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.prose img { border-radius: var(--r-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 500; }

.side-box { padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: var(--s-3); }
.side-box h2, .side-box h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin: 0; }
.side-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }

/* paginación */
.pager { display: flex; gap: var(--s-3); margin-top: var(--s-8); flex-wrap: wrap; }

/* contacto */
.contact-wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); margin-top: var(--s-8); }
.contact-wrap > form { grid-column: 1 / span 7; }
.contact-wrap > aside { grid-column: 9 / -1; }
@media (max-width: 1023px) { .contact-wrap > form, .contact-wrap > aside { grid-column: 1 / -1; } }
.notice { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: color-mix(in oklab, #8BC926 18%, var(--bg)); }
.notice--err { background: color-mix(in oklab, #F04A2A 14%, var(--bg)); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* filtro de categorías del blog */
.cats { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.cats a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--t-small); transition: background-color 150ms ease, border-color 150ms ease; }
.cats a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .cats a:not([aria-current]):hover { border-color: var(--ink); } }
.cats a:active { transform: scale(0.97); }

/* pie sin cierre (páginas interiores que ya cierran con su propio contacto) */
footer.closing.closing--plain { height: auto; min-height: 0; }
footer.closing.closing--plain > .wrap { height: auto; }
