/* Plantilla de caso de portafolio (prefijo cs-). Usa la portada oscura y las secciones de las interiores. */

/* Portada: el nombre del cliente grande y el resultado como subtítulo dentro del mismo H1. */
.cs-h { display: grid; gap: 10px; }
.cs-name { font-size: clamp(3rem, 6.4vw, 6rem); letter-spacing: -0.05em; line-height: .95; }
.cs-claim { font-size: clamp(1.5rem, 2.3vw, 2.25rem); letter-spacing: -0.028em; line-height: 1.12; text-wrap: balance; }
.cs-inline { color: #dfe65a; text-decoration: underline; text-underline-offset: 3px; }
.cs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 8px 28px; margin-top: 22px; }
.cs-facts dt { font-size: .8125rem; color: var(--soft); }
.cs-facts dd { margin: 2px 0 0; font-size: var(--t-small); font-weight: 600; }

/* Mosaico de portada: la tienda real con dos resultados que flotan encima */
html:not(.ph-oscura) .cs-stage { flex-direction: column; gap: 14px; }
.cs-win { width: min(100%, 600px); padding: 0 8px 8px; border-radius: 16px; box-shadow: 0 24px 60px rgba(29, 42, 61, .2); }
.cs-win img { aspect-ratio: 1200 / 660; }
.cs-chip { position: absolute; z-index: 4; display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 18px 10px 10px; border-radius: 16px; box-shadow: 0 16px 40px rgba(29, 42, 61, .22); }
.cs-chip b { display: block; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.cs-chip span:last-child { color: var(--ui-soft); font-size: .875rem; line-height: 1.25; }
.cs-chip-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--lime); color: var(--on-lime); }
.cs-chip-ico svg { width: 20px; height: 20px; }
.cs-chip-1 { left: clamp(10px, 2vw, 28px); top: clamp(56px, 6vw, 90px); }
.cs-chip-2 { right: clamp(10px, 2vw, 28px); bottom: clamp(52px, 5vw, 78px); }
.cs-cap { max-width: 36em; font-size: .875rem; line-height: 1.35; color: #4f5c70; text-align: center; }
.cs-3d { width: clamp(84px, 8vw, 124px); right: clamp(10px, 1.6vw, 24px); top: clamp(8px, 1.2vw, 18px); }

/* Resultados */
.cs-proof { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.cs-proof .stat { grid-column: span 3; }
.cs-proof .stat-big { grid-column: span 6; grid-row: span 2; }
.cs-vs { display: flex; align-self: stretch; gap: 14px; height: 100%; min-height: 220px; }
.cs-vs-col { flex: 1; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
.cs-vs-bar { position: relative; display: block; align-self: end; height: var(--h); min-height: 10px; border-radius: 10px 10px 4px 4px; background: rgba(255, 255, 255, .22); transform-origin: 50% 100%; }
.cs-vs-col.is-now .cs-vs-bar { background: var(--lime); }
.cs-vs-bar b { position: absolute; left: 0; right: 0; top: 10px; text-align: center; font-size: 1.5rem; font-weight: 600; color: var(--on-lime); }
.cs-vs-col small { font-size: .8125rem; line-height: 1.25; color: #c8d1dc; text-align: center; }
.cs-speed .rings { align-items: center; }
.cs-arrow svg { width: 22px; height: 22px; color: var(--soft); }
.cs-ring-before { stroke: #c2362f; }
.cs-fine { margin-top: 14px; }

/* El desafío: precio que baja con la cantidad */
.cs-challenge .tile-p + .tile-p { margin-top: 12px; }
.cs-art { margin-top: 0; }
.cs-volume { width: min(100%, 460px); padding: 20px 22px; font-size: 1rem; }
.cs-vol-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cs-vol-h b { font-weight: 600; }
.cs-eg { flex: none; padding: 2px 9px; border-radius: 999px; background: var(--ui-line); color: var(--ui-soft); font-size: .75rem; font-weight: 600; }
.cs-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 6px; border-radius: 999px; background: var(--ui-line); }
.cs-qty-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ui-bg); }
.cs-qty-btn svg { width: 18px; height: 18px; }
.cs-qty-n { font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cs-tiers { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.cs-tiers li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--ui-line); color: var(--ui-soft); transition: background-color .3s ease, color .3s ease; }
.cs-tiers li.is-on { background: var(--lime); color: var(--on-lime); }
.cs-tiers li b { font-weight: 600; }
.cs-vol-rows { display: grid; gap: 4px; margin-top: 14px; }
.cs-vol-rows p { display: flex; align-items: center; gap: 10px; font-size: .9375rem; }
.cs-vol-rows svg { width: 18px; height: 18px; color: var(--brand); }

/* Qué hicimos */
.cs-work .ticks { margin-top: 12px; font-size: var(--t-body); gap: 8px; }
.cs-work .ticks li { align-items: flex-start; line-height: 1.35; }
.cs-work .ticks svg { margin-top: .2em; }
.t-navy .ticks svg { color: var(--lime); }
.cs-work.wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--tile-pad); align-items: center; }
.cs-work.wide .tile-art { margin-top: 0; }
.cs-flow { width: 100%; }
.cs-art-sm { min-height: 0; margin-top: 22px; }
.cs-work-3d { width: clamp(76px, 7vw, 110px); right: 18px; top: 18px; }
.t-navy.cs-work .tile-copy { padding-right: clamp(70px, 7vw, 110px); }
.cs-collections { width: 100%; }
.cs-col-h { font-weight: 600; margin-bottom: 10px; }
.cs-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cs-col-grid span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #f0f3f1; font-weight: 500; }
.cs-col-grid svg { width: 18px; height: 18px; color: #5f6800; }
.cs-lcp { width: 100%; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.cs-lcp-k { font-size: .875rem; color: #c8d1dc; margin-bottom: 10px; }
.cs-lcp-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px; align-items: center; gap: 10px; padding: 6px 0; font-size: .9375rem; }
.cs-lcp-row b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cs-lcp-track { height: 12px; border-radius: 12px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.cs-lcp-bar { display: block; width: var(--w); height: 100%; border-radius: 12px; background: var(--lime); transform-origin: left center; }
.cs-lcp-bar.is-before { background: #f87171; }
.cs-channels { display: grid; gap: 8px; width: 100%; margin: 0; list-style: none; }
.cs-channels li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--ui-line); }
.cs-channels li span:last-child { font-size: .875rem; color: var(--ui-soft); line-height: 1.25; }
.cs-channels b { display: block; font-size: .9375rem; color: var(--ui-ink); }
.cs-ch-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--lime); color: var(--on-lime); }
.cs-ch-ico svg { width: 17px; height: 17px; }
.cs-channels li.cs-eg-row { justify-content: flex-end; padding: 0; background: none; font-size: .75rem; font-weight: 600; color: var(--ui-soft); }
.cs-mail { width: min(100%, 460px); padding: 18px 20px; }
.cs-mail-top { display: flex; justify-content: space-between; align-items: center; }
.cs-mail-from { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #0b3d91; }
.cs-mail-from::before { content: ''; width: 26px; height: 26px; border-radius: 50%; background: #0b3d91; }
.cs-mail-s { display: block; margin-top: 10px; font-size: 1.25rem; letter-spacing: -0.015em; }
.cs-mail-btns { display: flex; gap: 8px; margin-top: 12px; }
.cs-mail-btns span { padding: 8px 16px; border-radius: 999px; background: #c2410c; color: #ffffff; font-weight: 600; font-size: .875rem; }
.cs-mail-btns span + span { background: #0b3d91; }
.cs-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.cs-track li { display: grid; justify-items: center; gap: 6px; font-size: .75rem; color: var(--ui-soft); text-align: center; }
.cs-track svg { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--ui-line); }
.cs-track li.is-done svg { background: #178a45; color: #ffffff; }
.cs-track li.is-now svg { background: var(--lime); color: var(--on-lime); }
.cs-track li.is-now { color: var(--ui-ink); font-weight: 600; }

/* Catálogo */
.cs-cat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.cs-cat-item { gap: 0; transition: translate .18s var(--ease-out), background-color .25s ease; }
.cs-cat-item:hover { translate: 0 -4px; }
.cs-cat-n { font-size: .875rem; font-weight: 600; color: var(--soft); margin-bottom: 14px; }
.t-lime .cs-cat-n { color: var(--on-lime); }
.cs-cat-item .ico-box { background: var(--lime); color: var(--on-lime); }
.t-lime.cs-cat-item .ico-box { background: var(--navy); color: var(--lime); }
.cs-cat-item h3 { margin-top: 18px; font-size: clamp(1.25rem, 1.05rem + .6vw, 1.625rem); font-weight: 600; letter-spacing: -0.022em; line-height: 1.15; }
.cs-cat-item p { margin-top: 8px; color: var(--soft); line-height: 1.4; }
.t-lime.cs-cat-item p { color: #2c3a4f; }
.cs-cat-3d { width: clamp(70px, 6.4vw, 96px); right: 14px; top: 12px; }

/* Más proyectos */
#cs-mas .rail-nav .more { color: var(--brand); }

/* Modo oscuro: mini interfaces dentro de mosaicos oscuros */
html.dark .t-white .cs-col-grid span { background: var(--surface); color: var(--ink); }
html.dark .t-white .cs-col-grid svg, html.dark .cs-vol-rows svg { color: var(--lime); }

@media (max-width: 1023px) {
  .cs-proof .stat { grid-column: span 6; }
  .cs-proof .stat-big { grid-column: 1 / -1; grid-row: auto; }
  .cs-work.wide { grid-template-columns: minmax(0, 1fr); }
  .cs-cat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .cs-name { font-size: clamp(2.75rem, 13vw, 3.5rem); }
  .cs-claim { font-size: clamp(1.25rem, 5.6vw, 1.5rem); }
  .cs-proof .stat-big { grid-template-columns: minmax(0, 1fr); }
  .cs-vs { min-height: 150px; height: 150px; }
  .cs-chip { padding: 6px 12px 6px 6px; gap: 8px; }
  .cs-chip b { font-size: 1.0625rem; }
  .cs-chip span:last-child { font-size: .75rem; }
  .cs-chip-ico { width: 30px; height: 30px; }
  .cs-chip-1 { top: 14px; left: 8px; }
  .cs-chip-2 { bottom: 64px; right: 8px; }
  .cs-cat { grid-template-columns: minmax(0, 1fr); }
  .cs-track li { font-size: .6875rem; }
}

/* Ajustes tras la primera revisión */
#cs-catalogo .sec-head > div { max-width: 66rem; }
.cs-actions { margin-top: 22px; }
@media (max-width: 720px) {
  .cs-cap { display: none; }
  html:not(.ph-oscura) .cs-stage { padding-bottom: 72px; }
  .cs-chip-2 { bottom: 14px; }
}
