/* ============================================================
   PLANTILLA DE CASO DE ESTUDIO (se añade a v2.css)
   Estructura de cada proyecto:
   portada > nombre y descripción > 01 Contexto y objetivos > 02 Mi papel > 03 Proceso creativo > 04 Galería > 05 Resultado final > siguiente proyecto
   ============================================================ */

.v2-case .container { width: 100%; max-width: 1228px; padding-left: clamp(18px, 3vw, 24px); padding-right: clamp(18px, 3vw, 24px); box-sizing: border-box; }
.v2-cs-wrap { max-width: 1228px; margin: 0 auto; padding: 0 clamp(18px, 3vw, 24px); box-sizing: border-box; }
a.v2-nav-label { text-decoration: none; transition: color .2s ease; }
a.v2-nav-label:hover { color: var(--v2-lilac-2); }

/* ---- portada: migas, categoría, nombre, descripción e imagen grande ---- */
.v2-cs-cover { padding: clamp(112px, 10vw, 150px) 0 0; }
.v2-cs-crumb { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 500 14px/1 var(--v2-display); color: var(--v2-ink-3); }
.v2-cs-crumb a { color: var(--v2-ink-2); text-decoration: none; transition: color .2s ease; }
.v2-cs-crumb a:hover { color: var(--v2-lilac-2); }
.v2-cs-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 84px); align-items: end; margin: clamp(22px, 3vw, 40px) 0 clamp(28px, 4vw, 56px); }
.v2-cs-kicker { margin: 0; font: 500 clamp(14px, 1.2vw, 17px)/1.3 var(--v2-display); color: var(--v2-lilac); }
.v2-cs-title { margin: 14px 0 0; font: 600 clamp(34px, 4.6vw, 68px)/1.02 var(--v2-display); letter-spacing: -0.03em; color: #fff; text-wrap: balance; }
.v2-cs-lede { margin: 0; max-width: 31em; font: 400 clamp(15px, 1.15vw, 17px)/1.6 var(--v2-display); color: var(--v2-ink-2); }
.v2-cs-lede strong { color: #fff; font-weight: 500; }
.v2-cs-lede a { color: var(--v2-lilac-2); text-decoration-color: rgb(230 214 255 / 40%); text-underline-offset: .18em; }
.v2-cs-hero { margin: 0; overflow: hidden; border-radius: clamp(26px, 3.2vw, 44px); background: #131317; border: 1px solid var(--v2-line); background-clip: padding-box; }
.v2-cs-hero img, .v2-cs-hero video { display: block; width: 100%; height: auto; max-height: 82vh; object-fit: cover; }
.v2-cs-videonote, .v2-case .video-nota { margin: 14px 4px 0; font: 400 14px/1.5 var(--v2-display); color: var(--v2-ink-3); }

/* ---- secciones numeradas: etiqueta a la izquierda y contenido a la derecha ---- */
.v2-cs-sec { padding: clamp(56px, 8vw, 120px) 0 0; }
.v2-cs-row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(18px, 4vw, 72px); align-items: start; border-top: 1px solid var(--v2-line); padding-top: clamp(22px, 2.6vw, 36px); }
.v2-cs-label { display: flex; align-items: baseline; gap: 12px; }
.v2-cs-num { font: 500 13px/1 var(--v2-display); letter-spacing: .08em; color: var(--v2-lilac); }
.v2-cs-h2 { margin: 0; font: 500 clamp(20px, 1.7vw, 26px)/1.2 var(--v2-display); letter-spacing: -0.018em; color: #fff; }
.v2-cs-body > *:first-child { margin-top: 0; }
.v2-cs-body p { margin: 0 0 1.1em; max-width: 36em; font: 400 clamp(15px, 1.15vw, 17px)/1.62 var(--v2-display); color: var(--v2-ink-2); }
.v2-cs-body p strong { color: #fff; font-weight: 500; }
.v2-cs-body a { color: var(--v2-lilac-2); }

.v2-cs-goals { list-style: none; margin: clamp(22px, 2.6vw, 34px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: goal; }
.v2-cs-goals li { counter-increment: goal; padding: 22px 22px 24px; border-radius: 22px; border: 1px solid var(--v2-line); background: rgb(246 242 255 / 4%); }
.v2-cs-goals li::before { content: "0" counter(goal); display: block; margin-bottom: 14px; font: 500 13px/1 var(--v2-display); letter-spacing: .08em; color: var(--v2-lilac); }
.v2-cs-goals p { margin: 0; font: 400 16px/1.5 var(--v2-display); color: var(--v2-ink); }
.v2-cs-goals-title { margin: clamp(26px, 3vw, 40px) 0 0; font: 500 13px/1 var(--v2-display); letter-spacing: .14em; text-transform: uppercase; color: var(--v2-ink-3); }

.v2-cs-body p.v2-cs-role { margin: 0 0 clamp(20px, 2.4vw, 30px); max-width: 26em; font: 500 clamp(18px, 1.5vw, 22px)/1.3 var(--v2-display); letter-spacing: -0.01em; color: #fff; }
.v2-cs-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-cs-pills span { display: inline-flex; align-items: center; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid rgb(246 242 255 / 18%); background: rgb(246 242 255 / 4%); font: 500 14px/1 var(--v2-display); color: var(--v2-ink-2); }
.v2-cs-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(20px, 2.4vw, 30px); }

/* galería y resultados: reutilizan los bloques propios de cada proyecto, a la anchura de la plantilla */
.v2-cs-gal { padding-top: clamp(22px, 3vw, 40px); }
.v2-cs-gal .project-gallery { padding-top: 0; padding-bottom: 0; }
.v2-cs-result { padding-top: clamp(14px, 2vw, 24px); }
.v2-cs-result > section { border-top: 0 !important; }

/* galería genérica para proyectos nuevos (los proyectos ya hechos usan la suya) */
.v2-cs-grid { max-width: 1228px; box-sizing: border-box; margin: 0 auto; padding: 0 clamp(18px, 3vw, 24px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 16px); }
.v2-cs-grid figure { margin: 0; overflow: hidden; border-radius: clamp(18px, 2vw, 28px); background: #131317; background-clip: padding-box; }
.v2-cs-grid figure.is-wide { grid-column: 1 / -1; }
.v2-cs-grid img, .v2-cs-grid video { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .v2-cs-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- más proyectos: fila pequeña de 3 relacionados ---- */
.v2-cs-related { padding: clamp(64px, 8vw, 120px) 0 clamp(36px, 5vw, 70px); }
.v2-rel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(18px, 2.4vw, 30px); padding-top: clamp(22px, 2.6vw, 36px); border-top: 1px solid var(--v2-line); }
.v2-rel-h2 { margin: 0; font: 500 clamp(19px, 1.5vw, 22px)/1.2 var(--v2-display); letter-spacing: -0.018em; color: #fff; }
.v2-rel-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.v2-rel-link { display: block; color: inherit; text-decoration: none; }
.v2-rel-link:focus-visible { outline: 2px solid var(--v2-lilac); outline-offset: 4px; border-radius: 18px; }
.v2-rel-media { aspect-ratio: 16 / 10; overflow: hidden; border-radius: clamp(16px, 1.6vw, 22px); background: #1b1722; background-clip: padding-box; }
.v2-rel-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s var(--v2-ease); }
.v2-rel-link:hover .v2-rel-media img, .v2-rel-link:focus-visible .v2-rel-media img { transform: scale(1.05); }
.v2-rel-text { margin-top: 12px; }
.v2-rel-cat { margin: 0; font: 500 12.5px/1.3 var(--v2-display); color: var(--v2-lilac); }
.v2-rel-title { margin: 6px 0 0; font: 500 clamp(16px, 1.2vw, 18px)/1.2 var(--v2-display); letter-spacing: -0.01em; color: #fff; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: .14em; transition: text-decoration-color .3s ease; }
.v2-rel-link:hover .v2-rel-title, .v2-rel-link:focus-visible .v2-rel-title { text-decoration-color: rgb(246 242 255 / 70%); }
@media (max-width: 520px) { .v2-more-txt { display: none; } .v2-rel-h2 { white-space: nowrap; } }
.v2-rel-nojs a { color: var(--v2-lilac-2); }

.v2-cs-body-end { margin-left: auto; max-width: calc(100% - clamp(18px, 4vw, 72px) - 300px); }
@media (max-width: 900px) {
  .v2-cs-body-end { max-width: none; margin-left: 0; }
  .v2-cs-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .v2-cs-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .v2-cs-goals { grid-template-columns: minmax(0, 1fr); }
  .v2-rel-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .v2-rel-link { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; align-items: center; }
  .v2-rel-text { margin-top: 0; }
  .v2-rel-media { aspect-ratio: 4 / 3; }
  .v2-rel-head .v2-projects-all { height: 36px; padding: 0 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .v2-rel-media img { transition: none; } }

/* ---- Fit Bites: pantallas del móvil en fila y lista de funciones a dos columnas ---- */
.v2-cs-phones { max-width: 1228px; box-sizing: border-box; margin: 0 auto; padding: 0 clamp(18px, 3vw, 24px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); align-items: start; }
.v2-cs-phones figure { margin: 0; }
.v2-cs-phones img { display: block; width: 100%; height: auto; border-radius: clamp(18px, 2.2vw, 30px); border: 1px solid var(--v2-line); background: #131317; }
.v2-cs-phones figcaption { margin-top: 12px; font: 500 14px/1 var(--v2-display); color: var(--v2-ink-3); }
.v2-cs-goals-two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.v2-cs-goals-two li::before { content: none; }
.v2-cs-goals-two li { padding: 20px 22px; }
.v2-cs-goals-two p { font-size: 15px; line-height: 1.55; color: var(--v2-ink-2); }
.v2-cs-goals-two strong { color: #fff; font-weight: 500; }
.v2-cs-body code { padding: 1px 6px; border-radius: 6px; background: rgb(246 242 255 / 8%); font-size: .9em; }
@media (max-width: 700px) { .v2-cs-phones { grid-template-columns: minmax(0, 1fr); max-width: 420px; } .v2-cs-goals-two { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   Fit Bites (página de caso): pasos del CRUD con código, tablas y muestras de color
   ===================================================================== */
.v2-cs-steps { list-style: none; margin: 0; padding: 0; }
.v2-cs-step { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(16px, 3vw, 44px); align-items: start; padding: clamp(24px, 3vw, 40px) 0; border-top: 1px solid var(--v2-line); }
.v2-cs-step:first-child { border-top: 0; padding-top: 0; }
.v2-cs-verb { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; color: var(--v2-lilac); }
.v2-cs-verb b { padding: 6px 10px; border-radius: 999px; border: 1px solid rgb(201 168 251 / 30%); font-weight: 600; color: #fff; background: rgb(168 85 247 / 14%); }
.v2-cs-step h3 { margin: 0; font: 600 clamp(20px, 1.8vw, 26px)/1.15 var(--v2-display); letter-spacing: -0.02em; color: #fff; }
.v2-cs-step .v2-cs-text { margin: 12px 0 0; font: 400 clamp(15px, 1.1vw, 16.5px)/1.6 var(--v2-display); color: var(--v2-ink-2); }
.v2-cs-code { margin: 0; padding: clamp(16px, 1.8vw, 22px); border-radius: 18px; background: #0d0a16; border: 1px solid var(--v2-line); overflow-x: auto; font: 400 clamp(12px, .95vw, 13.5px)/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e9e1fb; tab-size: 2; }
.v2-cs-code code { font: inherit; background: none; padding: 0; border: 0; border-radius: 0; color: inherit; }
.v2-cs-code .k { color: #c9a8fb; }
.v2-cs-code .s { color: #c6e35b; }
.v2-cs-code .d { color: #7f7897; }
.v2-cs-codenote { margin: 10px 0 0; font: 400 13px/1.4 var(--v2-display); color: var(--v2-ink-3); }

.v2-cs-tablewrap { margin-top: clamp(18px, 2.4vw, 30px); overflow-x: auto; border-radius: clamp(18px, 2vw, 26px); border: 1px solid var(--v2-line); background: #131317; background-clip: padding-box; }
.v2-cs-table { width: 100%; min-width: 560px; border-collapse: collapse; font: 400 clamp(14px, 1.05vw, 15.5px)/1.5 var(--v2-display); color: var(--v2-ink-2); }
.v2-cs-table th { padding: 16px clamp(14px, 1.8vw, 24px); text-align: left; font: 500 12px/1.2 var(--v2-display); letter-spacing: .12em; text-transform: uppercase; color: var(--v2-ink-3); background: rgb(246 242 255 / 3%); }
.v2-cs-table td { padding: clamp(13px, 1.4vw, 18px) clamp(14px, 1.8vw, 24px); vertical-align: top; border-top: 1px solid var(--v2-line); }
.v2-cs-table td:first-child { color: #fff; font-weight: 500; white-space: nowrap; }
.v2-cs-table code { font: 500 .9em ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--v2-lilac-2, #d9bdff); }
.v2-cs-sw { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border-radius: 50%; vertical-align: -2px; border: 1px solid rgb(255 255 255 / 25%); }
.v2-cs-figure { margin: clamp(22px, 3vw, 36px) 0 0; overflow: hidden; border-radius: clamp(22px, 2.6vw, 36px); border: 1px solid var(--v2-line); background: #131317; background-clip: padding-box; }
.v2-cs-figure img { display: block; width: 100%; height: auto; }
.v2-cs-figure + .v2-cs-caption, .v2-cs-caption { margin: 12px 0 0; font: 400 13px/1.4 var(--v2-display); color: var(--v2-ink-3); }
.v2-cs-timeline { list-style: none; margin: clamp(22px, 2.6vw, 34px) 0 0; padding: 0; display: grid; gap: 0; }
.v2-cs-timeline li { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: clamp(14px, 3vw, 40px); padding: clamp(16px, 2vw, 24px) 0; border-top: 1px solid var(--v2-line); }
.v2-cs-timeline li:first-child { border-top: 0; padding-top: 0; }
.v2-cs-when { font: 500 14px/1.4 var(--v2-display); color: var(--v2-lilac); }
.v2-cs-timeline p { margin: 0; font: 400 clamp(15px, 1.1vw, 16.5px)/1.6 var(--v2-display); color: var(--v2-ink-2); }
.v2-cs-timeline strong { color: #fff; font-weight: 500; }
@media (max-width: 760px) {
  .v2-cs-step { grid-template-columns: minmax(0, 1fr); }
  .v2-cs-timeline li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}


/* =====================================================================
   Visor de código ("El esqueleto, por dentro"): panel oscuro con pestañas, interruptor de comentarios y etiquetas CRUD
   ===================================================================== */
.cv-wrap { margin-top: clamp(22px, 3vw, 40px); }
.cv { border-radius: clamp(18px, 2vw, 26px); background: #17131f; color: #e9e4f5; overflow: hidden; border: 1px solid rgb(255 255 255 / 8%); }
.cv-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px clamp(14px, 2vw, 22px); border-bottom: 1px solid rgb(255 255 255 / 8%); }
.cv-tabs { display: flex; gap: 6px; }
.cv-tab, .cv-archivo, .cv-chip, .cv-copiar { font: 500 13px/1 var(--v2-display); color: #cfc8e2; background: transparent; border: 1px solid rgb(255 255 255 / 16%); border-radius: 999px; height: 34px; padding: 0 14px; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.cv-tab:hover, .cv-archivo:hover, .cv-chip:hover, .cv-copiar:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.cv-tab[aria-selected="true"] { background: #f1ebff; color: #1d1530; border-color: #f1ebff; }
.cv-acciones { display: flex; align-items: center; gap: 14px; }
.cv-interruptor { display: inline-flex; align-items: center; gap: 9px; font: 500 13px/1 var(--v2-display); color: #cfc8e2; cursor: pointer; user-select: none; }
.cv-interruptor input { position: absolute; opacity: 0; pointer-events: none; }
.cv-pista { position: relative; width: 34px; height: 20px; border-radius: 999px; background: rgb(255 255 255 / 18%); transition: background .2s ease; }
.cv-pista::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.cv-interruptor input:checked + .cv-pista { background: #7c3aed; }
.cv-interruptor input:checked + .cv-pista::after { transform: translateX(14px); }
.cv-interruptor input:focus-visible + .cv-pista, .cv-tab:focus-visible, .cv-archivo:focus-visible, .cv-chip:focus-visible, .cv-copiar:focus-visible, .cv-pre:focus-visible { outline: 2px solid #c9a8fb; outline-offset: 2px; }
.cv-archivos, .cv-crud { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px clamp(14px, 2vw, 22px) 0; }
.cv-archivo { height: 30px; font-size: 12.5px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.cv-archivo i { font: 600 9.5px/1 var(--v2-display); letter-spacing: .08em; font-style: normal; margin-left: 6px; padding: 3px 5px; border-radius: 5px; background: rgb(201 168 251 / 22%); color: #e3d3ff; }
.cv-archivo[aria-pressed="true"] { background: rgb(201 168 251 / 20%); border-color: rgb(201 168 251 / 60%); color: #fff; }
.cv-chip b { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 5px; font-size: 11px; color: #17131f; }
.cv-chip-c b { background: #7ddf9a; } .cv-chip-r b { background: #7cc4ff; } .cv-chip-u b { background: #ffc46b; } .cv-chip-d b { background: #ff8b8b; }
.cv-chip[aria-pressed="true"] { background: rgb(255 255 255 / 14%); border-color: rgb(255 255 255 / 55%); color: #fff; }
.cv-caja { margin: 14px 0 0; max-height: min(560px, 70vh); overflow: auto; border-top: 1px solid rgb(255 255 255 / 8%); }
.cv-pre { margin: 0; padding: 16px 0 18px; font: 400 12.5px/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; tab-size: 4; white-space: pre; width: max-content; min-width: 100%; box-sizing: border-box; }
.cv-pre code { display: block; font: inherit; }
.cv-l { display: block; padding: 0 22px 0 0; border-left: 3px solid transparent; }
.cv-l::before { content: attr(data-n); display: inline-block; width: 52px; padding-right: 16px; text-align: right; color: #6f6888; user-select: none; }
.cv-op-c { border-left-color: #7ddf9a; background: rgb(125 223 154 / 7%); } .cv-op-r { border-left-color: #7cc4ff; background: rgb(124 196 255 / 7%); }
.cv-op-u { border-left-color: #ffc46b; background: rgb(255 196 107 / 7%); } .cv-op-d { border-left-color: #ff8b8b; background: rgb(255 139 139 / 7%); }
.cv-activa.cv-op-c { background: rgb(125 223 154 / 20%); } .cv-activa.cv-op-r { background: rgb(124 196 255 / 20%); }
.cv-activa.cv-op-u { background: rgb(255 196 107 / 20%); } .cv-activa.cv-op-d { background: rgb(255 139 139 / 20%); }
.cv-apagada { opacity: .35; }
.cv-c { color: #8e88a8; font-style: italic; } .cv-k { color: #c9a8fb; } .cv-s { color: #f2b98d; } .cv-n { color: #ffd479; }
.cv-t { color: #86d0ff; } .cv-a { color: #e8c6ff; }
.cv-pie { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; margin: 0; padding: 12px clamp(14px, 2vw, 22px) 16px; border-top: 1px solid rgb(255 255 255 / 8%); font: 400 13px/1.5 var(--v2-display); color: #a9a2c0; }
.cv-pie a { color: #d9c8ff; text-decoration: underline; text-underline-offset: .18em; }
@media (max-width: 700px) { .cv-pre { font-size: 11.5px; } .cv-l::before { width: 38px; padding-right: 10px; } }
