/* ============================================================
   CASE STUDY PAGES — Coombo
   Reuses brand tokens from styles.css (load styles.css first).
   ============================================================ */

.chero--orange, .ccta--orange, .cnext--orange, .cdeliverable--orange { --accent: var(--orange); }
.chero--blue,   .ccta--blue,   .cnext--blue,   .cdeliverable--blue   { --accent: var(--blue); }
.chero--green,  .ccta--green,  .cnext--green,  .cdeliverable--green  { --accent: var(--green); }
.chero--pink,   .ccta--pink,   .cnext--pink,   .cdeliverable--pink   { --accent: var(--pink); }
.chero--ink,    .ccta--ink,    .cnext--ink,    .cdeliverable--ink    { --accent: var(--ink); }

.cwrap, .wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ---------- Nav ---------- */
.cnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 40px;
  background: var(--paper);
  border-bottom: var(--bw) solid var(--ink);
}
.cnav__logo { display: inline-flex; align-items: center; line-height: 0; }
.cnav__actions { display: flex; align-items: center; gap: 20px; }
.cnav__back {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.cnav__back:hover { opacity: 0.6; }

/* ---------- Hero ---------- */
.chero {
  background: var(--cream);
  border-bottom: var(--bw) solid var(--ink);
  padding: 64px 0 0;
}
.chero__head { max-width: 1020px; }
.chero__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 24px;
}
.chero__client {
  background: var(--accent);
  color: #fff;
  padding: 5px 14px;
  border: var(--bw) solid var(--ink);
}
.chero--ink .chero__client { color: var(--paper); }
.chero__dot { opacity: 0.4; }
.chero__country { display: inline-flex; align-items: center; gap: 7px; }
.flagdot {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  border: 1px solid rgba(41,41,41,0.25);
  flex: 0 0 auto;
  vertical-align: middle;
  background-size: cover;
  background-position: center;
}
/* Colombia — amarillo, azul, rojo (horizontal 2:1:1) */
.flagdot--co { background-image: linear-gradient(to bottom, #FCD116 0 50%, #003893 50% 75%, #CE1126 75% 100%); }
/* Perú — rojo, blanco, rojo (vertical) */
.flagdot--pe { background-image: linear-gradient(to right, #D91023 0 33.33%, #fff 33.33% 66.66%, #D91023 66.66% 100%); }
/* España — rojo, amarillo, rojo (horizontal 1:2:1) */
.flagdot--es { background-image: linear-gradient(to bottom, #AA151B 0 25%, #F1BF00 25% 75%, #AA151B 75% 100%); }
.chero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 28px;
  text-wrap: balance;
}
.chero__tags { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 56px; }
.chero__sector {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 13px;
  background: var(--ink);
  color: var(--paper);
}
.chero__svc {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 7px 13px;
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  color: var(--ink);
}
.chero__visual { position: relative; }
.chero--orange .chero__media { background: var(--orange); }
.chero--blue .chero__media { background: var(--blue); }
.chero--green .chero__media { background: var(--green); }
.chero--pink .chero__media { background: var(--pink); }
.chero--ink .chero__media { background: var(--ink); }
.chero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 4.5;
  border: var(--bw) solid var(--ink);
  border-bottom: none;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 10px -10px 0 0 rgba(41,41,41,0.06);
}
.chero__media .case__vid {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 116%;
  object-fit: cover;
  object-position: center top;
}
.chero__media .case__tint { position: absolute; inset: 0; z-index: 2; mix-blend-mode: multiply; }
.chero__art { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; transform: scale(1.25); }

/* Encuadre por proyecto: el contenedor es ancho y bajo (16:4.5), así que recorta
   una franja del video. Personalizamos el foco vertical de cada uno para que el
   encuadre evite las caras de las personas (manos, mesa, cajas, documentos). */
.chero__media--corona .case__vid { object-position: center 86%; }      /* manos con el teléfono + cerámica */
.chero__media--bancolombia .case__vid { object-position: center 100%; } /* portátil y mesa en primer plano */
.chero__media--camara .case__vid { object-position: center 100%; }      /* documentos sobre la mesa */
.chero__media--yanbal .case__vid { object-position: center 90%; }       /* cajas y portapapeles del escritorio */
.chero__media--flypass .case__vid { object-position: center 78%; }      /* portátil y manos sobre el sofá */
.chero__media--tandem .case__vid { object-position: center 55%; }       /* vista cenital: documento, manos y marcadores */

/* ---------- Body ---------- */
.cbody { padding: 84px 0; background: var(--paper); }
.cblock {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 0 0 56px;
  margin: 0 0 56px;
  border-bottom: var(--bw) solid rgba(41,41,41,0.12);
}
.cblock:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cblock__label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent, var(--ink));
  padding-top: 8px;
}
.cblock--impact .cblock__label, .cblock--outcome .cblock__label { color: var(--accent, var(--ink)); }
.cblock__content { max-width: 760px; }
.cblock__h {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 20px;
  text-wrap: balance;
}
.cblock__p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
.cblock__p + .cblock__p { margin-top: 18px; }
.cblock__p--lead { font-size: 22px; line-height: 1.55; }
.cblock__p--impact { font-style: italic; }
.cblock__link {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent, var(--ink));
  padding-bottom: 3px;
}
.cblock__link:hover { opacity: 0.65; }

/* ---------- Numbers ---------- */
.cnums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--bw);
  background: var(--ink);
  border: var(--bw) solid var(--ink);
  margin: 0 0 56px;
  box-shadow: var(--shadow-hard);
}
.cnum {
  background: var(--paper);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cnum__v {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 4.5vw, 60px);
  line-height: 0.9;
  color: var(--accent, var(--ink));
  letter-spacing: -0.02em;
}
.cnum__l {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}

/* ---------- Deliverable mockup (accompanies results) ---------- */
.cdeliverable {
  margin: 4px 0 56px;
  padding: 48px 40px 56px;
  background: var(--accent, var(--ink));
  border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow-hard);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.cdeliverable--pink, .cdeliverable--orange { color: #fff; }
.cdeliverable__label {
  align-self: flex-start;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}
.cdeliverable--pink .cdeliverable__label,
.cdeliverable--orange .cdeliverable__label { color: #fff; }
.cdeliverable__stage {
  position: relative;
  width: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cdeliverable__stage .case__art {
  transform: scale(1.35);
}
@media (max-width: 560px) {
  .cdeliverable { padding: 32px 22px 38px; }
  .cdeliverable__stage { min-height: 200px; }
  .cdeliverable__stage .case__art { transform: scale(1.0); }
}

/* ---------- Project photo (medium figure) ---------- */
.cphoto {
  margin: 4px auto 56px;
  max-width: 780px;
}
.cphoto img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  object-position: center;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow-hard);
  background: var(--paper);
}
.cphoto__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--shadow-hard);
  background: var(--paper);
  overflow: hidden;
}
.cphoto__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  z-index: 1;
}
.cphoto__slide.is-on { opacity: 1; z-index: 2; }
.cphoto__dots {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.cphoto__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: transparent;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  transition: background 0.2s, transform 0.2s;
}
.cphoto__dot.is-on { background: var(--paper); transform: scale(1.15); }
.cphoto__dot:hover { background: rgba(255,255,255,0.6); }
.cphoto__cap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: var(--ink-2);
  text-wrap: pretty;
}
.cphoto__tag {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, var(--ink));
}
@media (max-width: 560px) {
  .cphoto { margin-bottom: 40px; }
}

/* ---------- Showcase (live embed) ---------- */
.cshow {
  background: var(--cream);
  border-top: var(--bw) solid var(--ink);
  padding: 72px 0;
}
.cshow__head { max-width: 760px; margin: 0 0 32px; }
.cshow__cap {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
  color: var(--ink);
  margin: 14px 0 0;
  text-wrap: balance;
}
.cshow__browser {
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-hard-lg);
  overflow: hidden;
}
.cshow__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--paper);
  border-bottom: var(--bw) solid var(--ink);
}
.cshow__dots { display: inline-flex; gap: 7px; flex: 0 0 auto; }
.cshow__dots i {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: inline-block;
}
.cshow__dots i:nth-child(1) { background: var(--orange); }
.cshow__dots i:nth-child(2) { background: var(--accent, var(--pink)); }
.cshow__dots i:nth-child(3) { background: var(--green); }
.cshow__url {
  flex: 1 1 auto;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--cream);
  border: 1px solid rgba(41,41,41,0.18);
  border-radius: 999px;
  padding: 5px 14px;
  text-align: center;
}
.cshow__open {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.cshow__open:hover { opacity: 0.6; }
.cshow__viewport {
  position: relative;
  width: 100%;
  height: 620px;
  background: var(--paper);
}
.cshow__viewport iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 560px) {
  .cshow__viewport { height: 460px; }
  .cshow__open { display: none; }
}

/* ---------- CTA ---------- */
.ccta {
  position: relative;
  overflow: hidden;
  background: var(--accent, var(--orange));
  color: var(--paper);
  border-top: var(--bw) solid var(--ink);
  padding: 96px 0;
  text-align: center;
}
.ccta--pink, .ccta--orange { color: #fff; }
.ccta__h {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.02;
  margin: 0 0 14px;
  position: relative;
  z-index: 2;
}
.ccta__p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 19px;
  margin: 0 auto 32px;
  max-width: 44ch;
  position: relative;
  z-index: 2;
}
.ccta__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.ccta .pill--orange { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ccta .pill--ghost { background: transparent; color: #fff; border-color: #fff; }
.ccta .pill--ghost:hover { background: rgba(255,255,255,0.12); }

/* En fondos oscuros (ink), el botón primario no puede ser ink sobre ink:
   se invierte a blanco con texto oscuro para no perderse. */
.ccta--ink .pill--orange { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.ccta--ink .pill--orange:hover { box-shadow: 4px 4px 0 0 var(--orange); }

/* ---------- Next project ---------- */
.cnext {
  display: block;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-top: var(--bw) solid var(--ink);
  padding: 44px 0;
  transition: background .25s;
}
.cnext:hover { background: #1c1c1c; }
/* La barra "Siguiente proyecto" siempre es negra; si el caso es ink, su
   accent (etiqueta + flecha) sería negro sobre negro: lo pasamos a naranja. */
.cnext--ink { --accent: var(--orange); }
.cnext .wrap { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 18px; }
.cnext__label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.cnext__client {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cnext__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.1;
  color: var(--paper);
}
.cnext__arrow { font-size: 32px; line-height: 1; color: var(--accent); }

/* ---------- Footer ---------- */
.cfooter {
  background: var(--ink);
  color: var(--paper);
  padding: 40px 0;
  border-top: var(--bw) solid var(--paper);
}
.cfooter .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cfooter__copy {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  opacity: 0.7;
}

/* ---------- Missing ---------- */
.cmiss { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; padding: 40px; }
.cmiss h1 { font-family: var(--font-display); font-weight: 900; font-size: 40px; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cblock { grid-template-columns: 1fr; gap: 14px; }
  .cblock__label { padding-top: 0; }
  .chero__media { aspect-ratio: 16 / 7.5; }
  .cnext .wrap { grid-template-columns: 1fr auto; row-gap: 6px; }
  .cnext__title { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .cwrap, .wrap, .cnav { padding-left: 20px; padding-right: 20px; }
  .cnav { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .cnav__logo img { height: 44px !important; }
  .cnav__actions { gap: 10px; }
  .cnav__back { display: none; }
  .cnav .pill { padding: 9px 13px; font-size: 12px; }
  .lang-toggle button { font-size: 12px !important; }
  .chero__art { transform: scale(1.1); }
  .cblock__p { font-size: 17px; }
  .cblock__p--lead { font-size: 19px; }
}
@media (max-width: 380px) {
  .cnav__actions { gap: 8px; }
  .cnav .pill { padding: 8px 11px; font-size: 11px; }
  .cnav__logo img { height: 38px !important; }
}
