/* ═══════════════════════════════════════════════════════════════════
   AnonimoDsn — Páginas de casos (proyecto-*.html)
   Se suma a interior.css. Cada página define en un <style> corto los
   colores del cliente: --case-hi (destacado), --case-hi-h (hover) y
   --case-dark (fondo de marca). El menú y los botones siguen con el acento del sitio.
   ═══════════════════════════════════════════════════════════════════ */

.pg-h1 em.case-hi { color: var(--case-hi); }
.case-cats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 20px; font: 600 .8125rem var(--font-body); color: var(--case-hi); }
.case-cats span + span::before { content: "·"; margin-right: 14px; color: var(--muted); }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 0; font: 400 .8125rem var(--font-body); color: var(--muted); }
.case-meta li + li::before { content: "·"; margin-right: 14px; opacity: .5; }
.btn-case { background: var(--case-hi); color: var(--case-dark); font-weight: 700; }
.btn-case:hover { background: var(--case-hi-h); color: var(--case-dark); }
.pg-sec .btn-case, .pg-sec .btn-case:hover { color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .btn-case:hover:not(:active) { transform: translateY(-1px); } }
.case-shot { border-color: color-mix(in srgb, var(--case-hi) 30%, transparent); }
.case-shot img { aspect-ratio: auto; height: auto; }

/* Ficha del proyecto: cuatro columnas con línea fina */
.case-ov { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line-strong); }
.case-ov > div { padding: 26px 22px; border-right: 1px solid var(--line); }
.case-ov > div:first-child { padding-left: 0; }
.case-ov > div:last-child { border-right: 0; }
.case-ov .k { display: block; margin-bottom: 8px; font: 600 .8125rem var(--font-body); color: var(--case-hi); }
.case-ov .v { display: block; font: 600 1.05rem/1.35 var(--font-disp); }
.case-ov .v + .v { margin-top: 4px; font: 400 .88rem/1.4 var(--font-body); color: var(--text-2); }
.case-ov .v.hi { color: var(--case-hi); }
.case-ov a { display: inline-block; margin-top: 10px; font: 700 .8rem var(--font-body); color: var(--accent); }
.case-ov a:hover { color: var(--accent-h); }

.case-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.pg-grid--1 { grid-template-columns: minmax(0, 1fr); }
.case-text { color: var(--text-2); font-size: 1.05rem; line-height: 1.8; }
.case-text + .case-text, .case-quote + .case-text { margin-top: 20px; }
.case-text strong { color: var(--text); }
.case-quote { margin-top: 24px; padding: 20px 24px; border-left: 3px solid var(--case-hi); background: color-mix(in srgb, var(--case-hi) 7%, transparent); border-radius: 0 var(--radius) var(--radius) 0; }
.case-quote p { font: italic 500 1.15rem/1.6 var(--font-disp); color: var(--text); }
.case-quote cite { display: block; margin-top: 8px; font: normal 500 .8rem var(--font-body); color: var(--muted); }
.case-label { margin: 0 0 10px; font: 600 .8125rem var(--font-body); color: var(--case-hi); }
.pg-item .n { font: 600 .8125rem var(--font-body); color: var(--case-hi); }
.case-block { margin-top: clamp(28px, 4vw, 48px); }

/* Identidad del cliente */
.logo-box { display: flex; align-items: center; justify-content: center; min-height: 170px; padding: 40px; border-radius: var(--radius-lg); }
.logo-box.dark { background: var(--case-dark); border: 1px solid color-mix(in srgb, var(--case-hi) 18%, transparent); }
.logo-box.light { background: #F4F2EE; border: 1.5px solid rgba(28,43,74,.12); }
.logo-box svg { max-width: 300px; height: auto; }
.colors-row { display: flex; flex-wrap: wrap; gap: 12px; }
.color-swatch { flex: 1; min-width: 120px; border-radius: var(--radius); overflow: hidden; }
.swatch-body { height: 84px; }
.swatch-info { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-top: 0; }
.swatch-name { font-weight: 600; font-size: .85rem; }
.swatch-hex { margin-top: 2px; font: 500 .78rem var(--font-body); color: var(--muted); }
.font-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.font-preview { margin-bottom: 12px; font-size: 2.6rem; line-height: 1.1; }
.font-name { margin-bottom: 4px; font: 600 .8125rem var(--font-body); color: var(--case-hi); }
.font-use { font-size: .85rem; color: var(--text-2); }

/* Marco de navegador con el sitio del cliente */
.web-frame { overflow: hidden; border: 3px solid var(--ink); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 26px 44px -30px rgba(20,35,74,.5); }
.web-bar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: var(--surface2); border-bottom: 1px solid var(--line); }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.url-bar { flex: 1; margin: 0 12px; padding: 4px 12px; border-radius: var(--pill); background: var(--border); font: 500 .78rem var(--font-body); color: var(--muted); }

@media (max-width: 960px) {
  .case-ov { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-ov > div:nth-child(2) { border-right: 0; }
  .case-ov > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .case-ov > div:nth-child(3) { padding-left: 0; }
  .case-two { grid-template-columns: minmax(0, 1fr); }
  .colors-row { flex-direction: column; }
}
@media (max-width: 480px) {
  .case-ov { grid-template-columns: minmax(0, 1fr); }
  .case-ov > div { border-right: 0; padding-left: 0; }
  .case-ov > div + div { border-top: 1px solid var(--line); }
}

/* Cabecera con el fondo de marca del cliente y enlace de vuelta al portafolio */
.case-hero { background: linear-gradient(135deg, color-mix(in srgb, var(--case-dark) 60%, #000) 0%, var(--case-dark) 50%, color-mix(in srgb, var(--case-dark) 80%, #000) 100%); }
.case-hero::before { background: radial-gradient(50% 70% at 90% 0%, color-mix(in srgb, var(--case-hi) 14%, transparent), transparent 70%); }
.nav-back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1.5px solid var(--border); border-radius: var(--pill); font: 600 .8rem var(--font-body); color: var(--muted); transition: color .25s, border-color .25s; }
.nav-back:hover { color: var(--accent); border-color: var(--accent-line); }
@media (max-width: 768px) { .nav-back { display: none; } }

#overview.pg-sec { padding: clamp(28px, 4vw, 44px) 0; border-top: 0; }
#overview.pg-sec::before, #overview.pg-sec::after { content: none; }

/* Familia Viña: chips de tecnología y captura del sitio */
.tech-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-pill { padding: 6px 14px; border: 1.5px solid var(--line-strong); border-radius: 99px; font: 600 .8rem var(--font-body); color: var(--text-2); }
.tech-pill.hl { border-color: color-mix(in srgb, var(--case-hi) 45%, transparent); color: var(--case-hi); }
.web-frame > img, .web-frame > picture img { display: block; width: 100%; max-height: 600px; object-fit: cover; object-position: top; }
.pg-stats + .pg-stats { margin-top: -1px; }
.pg-stack { display: grid; gap: 12px; }

/* Antes/después: "después" encima, recortado desde --pos; el rango oculto da teclado y lector */
.ba-labels { display: flex; justify-content: space-between; gap: 16px; }
.ba-stage { --pos: 50%; position: relative; touch-action: pan-y; cursor: ew-resize; user-select: none; }
.ba-stage img { display: block; width: 100%; height: auto; pointer-events: none; }
.ba-after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.ba-handle { position: absolute; inset: 0; transform: translateX(var(--pos)); pointer-events: none; }
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(20,35,74,.3); }
.ba-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 0; display: grid; place-items: center; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; color: #111; font: 700 .9rem/1 var(--font-body); box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.ba-stage:has(.ba-range:focus-visible) .ba-handle::after { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Ronda 2 (11 nov 2026): el color del cliente vive en la portada oscura y en sus muestras; como texto sobre papel usa el acento del sitio */
.pg-sec { --case-hi: var(--accent); --case-hi-h: var(--accent-h); }
.case-hero .tag-hs { margin-bottom: 18px; }
.case-hero .case-shot { position: relative; }
.case-hero .case-shot .tag-hs { position: absolute; left: 14px; bottom: 14px; z-index: 2; margin: 0; --h: clamp(44px, 4vw, 60px); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/playfair-display.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../fonts/inter.woff2') format('woff2'); }
