/* ============================================================================
   PROYECTO · GRILLA EDITORIAL — sistema nuevo para páginas de caso de estudio.
   Referencias: pda.archi (niveles de lectura + grilla), gretel, motto.
   Tipografías del sitio: display "Geist" · mono "cofo-sans-mono-variable".
   Tema oscuro (fondo Silk + crema). Sin amarillo.
   Aislado en clases .pg-* → no afecta a las otras páginas de proyecto.
   ============================================================================ */
.pg-case {
    --pg-margin: clamp(20px, 5vw, 96px);
    --pg-col-gap: clamp(16px, 2.2vw, 40px);
    --pg-row-gap: clamp(64px, 11vw, 190px);
    --pg-crema: #FFFDF3;
    --pg-mut: rgba(255, 253, 243, 0.56);
    --pg-line: rgba(255, 253, 243, 0.16);
    --pg-ease: cubic-bezier(0.22, 1, 0.36, 1);
    color: var(--pg-crema);
}

/* ── Grilla de 12 columnas ────────────────────────────────────────────── */
.pg {
    max-width: 1680px;
    margin: 0 auto;
    padding: clamp(56px, 8vw, 130px) var(--pg-margin);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--pg-col-gap);
    row-gap: var(--pg-row-gap);
    align-items: start;
}

/* ── Bloques de texto · niveles de lectura ────────────────────────────── */
.pg-text { grid-column: 2 / 9; display: flex; flex-direction: column; }
.pg-text.pg-text--right { grid-column: 6 / 13; }
.pg-text.pg-text--narrow { grid-column: 2 / 8; }

/* Ficha técnica (cliente / año / servicios) */
.pg-meta { grid-column: 10 / 13; display: flex; flex-direction: column; gap: clamp(22px, 2.2vw, 30px); }
.pg-meta .m-k { font-family: "cofo-sans-mono-variable", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pg-mut); display: block; margin-bottom: 8px; }
.pg-meta .m-v { font-family: "Geist", sans-serif; font-weight: 500; font-size: clamp(0.98rem, 1.1vw, 1.1rem); line-height: 1.4; color: var(--pg-crema); }
@media (max-width: 900px) {
    .pg-meta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 26px 48px; }
}

.pg-kicker {
    font-family: "cofo-sans-mono-variable", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pg-mut);
    margin: 0 0 clamp(22px, 2.4vw, 34px);
    display: flex;
    gap: 0.9em;
}
.pg-kicker .pg-num { color: var(--pg-crema); }

/* Nivel 1 — titular de sección (lidera la sección, sin cintillo) */
.pg-h {
    font-family: "Geist", sans-serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 5.6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.038em;
    margin: 0;
    color: var(--pg-crema);
    text-wrap: balance;
}
/* Nivel 2 — bajada / lead */
.pg-lead {
    font-family: "Geist", sans-serif;
    font-weight: 400;
    font-size: clamp(1.3rem, 2.3vw, 1.9rem);
    line-height: 1.28;
    letter-spacing: -0.015em;
    margin: clamp(22px, 2.2vw, 32px) 0 0;
    color: var(--pg-crema);
    max-width: 24ch;
}
.pg-h + .pg-lead { max-width: 30ch; }
/* Nivel 3 — cuerpo */
.pg-body {
    font-family: "Geist", sans-serif;
    font-weight: 300;
    font-size: clamp(1.02rem, 1.2vw, 1.18rem);
    line-height: 1.62;
    letter-spacing: -0.005em;
    margin: clamp(26px, 2.4vw, 36px) 0 0;
    color: var(--pg-mut);
    max-width: 58ch;
}
.pg-body + .pg-body { margin-top: 1.1em; }
.pg-body strong { color: var(--pg-crema); font-weight: 500; }

/* Lista de capacidades (ej. Sistematización / Identidad B2B) */
.pg-list { list-style: none; margin: clamp(30px, 3vw, 44px) 0 0; padding: 0; display: grid; gap: 1px; background: var(--pg-line); border-top: 1px solid var(--pg-line); }
.pg-list li { background: transparent; padding: clamp(18px, 1.8vw, 24px) 0; border-bottom: 1px solid var(--pg-line); }
.pg-list h4 { font-family: "Geist", sans-serif; font-weight: 500; font-size: clamp(1.05rem, 1.4vw, 1.25rem); margin: 0 0 8px; color: var(--pg-crema); }
.pg-list p { font-family: "Geist", sans-serif; font-weight: 300; font-size: clamp(0.98rem, 1.1vw, 1.08rem); line-height: 1.55; margin: 0; color: var(--pg-mut); max-width: 56ch; }

/* ── Figuras dentro de la grilla ──────────────────────────────────────── */
.pg-fig { grid-column: 1 / -1; margin: 0; overflow: hidden; background: #151515; }
.pg-fig.span-wide  { grid-column: 2 / 12; }
.pg-fig.span-left  { grid-column: 1 / 7; }
.pg-fig.span-right { grid-column: 7 / 13; }
.pg-fig.span-7l    { grid-column: 1 / 8; }
.pg-fig.span-5r    { grid-column: 8 / 13; align-self: end; }
.pg-fig img, .pg-fig video { width: 100%; height: auto; display: block; transition: transform 1.1s var(--pg-ease); }
.pg-fig:hover img, .pg-fig:hover video { transform: scale(1.03); }
.pg-cap { grid-column: 2 / 12; margin: 18px 0 0; font-family: "cofo-sans-mono-variable", monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pg-mut); }
.pg-fig + .pg-cap { margin-top: -24px; }

/* Ilustraciones verticales CONTENIDAS (fix "enorme"): fondo transparente,
   ancho acotado, alto natural. */
.pg-duo {
    grid-column: 1 / -1;
    display: flex;
    gap: clamp(20px, 4vw, 72px);
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
}
.pg-illus { margin: 0; background: transparent; overflow: visible; flex: 0 1 300px; max-width: 300px; text-align: center; }
.pg-illus img { width: 100%; height: auto; max-height: 62vh; object-fit: contain; display: block; margin: 0 auto; }
.pg-illus figcaption { margin-top: 16px; font-family: "cofo-sans-mono-variable", monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pg-mut); }
.pg-illus.pg-illus--wide { flex-basis: 420px; max-width: 420px; }

/* ── Banda full-bleed (rompe el contenedor) ───────────────────────────── */
.pg-band { margin: 0; width: 100%; overflow: hidden; background: #151515; }
.pg-band img, .pg-band video { width: 100%; height: clamp(320px, 62vh, 760px); object-fit: cover; display: block; transition: transform 1.4s var(--pg-ease); }
.pg-band:hover img { transform: scale(1.02); }
.pg-band-cap { max-width: 1680px; margin: 16px auto 0; padding: 0 var(--pg-margin); font-family: "cofo-sans-mono-variable", monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pg-mut); }

/* ── Cita destacada ───────────────────────────────────────────────────── */
.pg-quote { max-width: 1680px; margin: 0 auto; padding: clamp(80px, 14vw, 200px) var(--pg-margin); }
.pg-quote blockquote {
    grid-column: 2 / 11;
    margin: 0; max-width: 20ch;
    font-family: "Geist", sans-serif;
    font-weight: 500;
    font-size: clamp(1.7rem, 4.4vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--pg-crema);
}
.pg-quote .pg-kicker { margin-bottom: clamp(28px, 3vw, 44px); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .pg-text, .pg-text.pg-text--right, .pg-text.pg-text--narrow { grid-column: 1 / -1; }
    .pg-fig.span-left, .pg-fig.span-right, .pg-fig.span-7l, .pg-fig.span-5r, .pg-fig.span-wide { grid-column: 1 / -1; }
    .pg-quote blockquote { grid-column: 1 / -1; max-width: 100%; }
}
@media (max-width: 560px) {
    .pg { row-gap: clamp(48px, 16vw, 90px); }
    .pg-illus { flex-basis: 44%; max-width: 44%; }
    .pg-band img, .pg-band video { height: clamp(240px, 52vh, 420px); }
}
@media (prefers-reduced-motion: reduce) {
    .pg-fig img, .pg-fig video, .pg-band img, .pg-band video { transition: none; }
}

/* ── Line-mask reveal (firma pda.archi) ───────────────────────────────────
   Cada línea del titular se enmascara (overflow:clip) y entra desde abajo
   (translateY 112%) con stagger y easing expo. Lo arma java/line-reveal.js. */
.lr-mask { display: block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; }
@supports not (overflow: clip) { .lr-mask { overflow: hidden; } }
.lr-line {
    display: block;
    transform: translateY(112%);
    transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.lr-in .lr-line { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .lr-line { transform: none !important; transition: none !important; }
}
