/* =====================================================
   ALTIMEA.COM — CASE STUDY STYLESHEET
   Estilos compartidos para todas las páginas de caso de éxito.
   Source: Caso-Belcorp-Mockup.html V2.2 + Handoff V2.2 + DS V2 §11/§12.

   Cada página de caso debe:
     1. Cargar /assets/css/main.css (DS tokens + nav + footer site-wide)
     2. Cargar este archivo
     3. Declarar en su propio <style> un :root LOCAL con 5 vars de accent
        (ver §11.0.1 del DS V2). Ejemplo Belcorp (mint):
          --service-accent:            var(--mint);
          --service-accent-strong:     #3DD8A4;
          --service-accent-soft:       var(--mint-soft);
          --service-accent-rgb:        114, 245, 196;
          --service-accent-strong-rgb: 61, 216, 164;
     4. Declarar --case-hero-photo con la URL de la foto del hero.

   Convención: BEM con modifiers "is-" (.is-primary, .is-service, .is-active).
   ===================================================== */


/* =====================================================
   TOKEN EXTRA — gray-300 (usado por TOC; no estaba en main.css)
   ===================================================== */
:root {
  --gray-300: #CBD5E1;
}


/* =====================================================
   ACCESIBILIDAD — skip link + reduced motion
   ===================================================== */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--blue);
  color: var(--white);
  padding: 8px 16px;
  z-index: 200;
  border-radius: 0 0 4px 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  transform: translateY(-100%);
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* =====================================================
   CASE-PAGE — wrapper de tipografía propia del caso
   Sobreescribe color de párrafo (gray-700 vs navy global)
   y ajusta escala de h1/h2 a la del template editorial.
   ===================================================== */
.case-page p { color: var(--gray-700); }

.case-page h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.02;
}
.case-page h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.6px;
}
.case-page h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.case-page h4 { font-size: 18px; font-weight: 700; }


/* =====================================================
   HIGHLIGHTS — accent textual (sobre claro y sobre oscuro)
   ===================================================== */
.highlight         { color: var(--service-accent-strong); }
.highlight-on-dark { color: var(--service-accent); }


/* =====================================================
   EYEBROW EDITORIAL — usado en cada section-head + hero
   Patrón dual-part: "<eyebrow-path> · <título>" o "01 / Título"
   ===================================================== */
.eyebrow-editorial {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 28px;
}
/* TIER B · brand-anchor — la línea pre-eyebrow ancla siempre en mint
   (Altimea), independientemente del accent del caso. Evita que el
   sistema cromático del caso (violet/azure/coral) se "contagie" a
   elementos estructurales que sólo wayfinding-numeran las secciones. */
.eyebrow-editorial::before {
  content: '';
  width: 36px;
  height: 2px;
  background: var(--mint);
}
.eyebrow-editorial.is-on-dark             { color: var(--white); }
.eyebrow-editorial.is-on-dark::before     { background: var(--mint); }
.eyebrow-editorial.is-centered            { justify-content: center; }
.eyebrow-editorial .eyebrow-path          { color: var(--gray-500); font-weight: 500; }
.eyebrow-editorial.is-on-dark .eyebrow-path { color: var(--text-on-dark-3); }


/* =====================================================
   STICKY TOC — solo desktop ≥1440px
   ===================================================== */
.toc-sticky {
  position: fixed;
  top: 50%;
  left: 32px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  z-index: 40;
  box-shadow: var(--shadow-md);
  display: none;
}
@media (min-width: 1440px) {
  .toc-sticky { display: block; }
}
.toc-sticky ul { display: flex; flex-direction: column; gap: 10px; }
.toc-sticky a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  transition: color 0.2s;
  position: relative;
  padding-left: 14px;
}
.toc-sticky a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 2px;
  background: var(--gray-300);
  transition: width 0.2s, background 0.2s;
}
.toc-sticky a:hover,
.toc-sticky a.is-active {
  color: var(--navy);
  font-weight: 700;
}
.toc-sticky a.is-active::before {
  width: 16px;
  background: var(--service-accent-strong);
}


/* =====================================================
   HERO — Full-bleed photo (editorial)
   La foto se inyecta desde el page-style con --case-hero-photo.
   ===================================================== */
#hero {
  position: relative;
  min-height: 82vh;
  padding: 64px 48px 72px;
  color: var(--white);
  overflow: hidden;
  background-color: var(--navy-deep);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Fallback para páginas que aún declaran --case-hero-photo en el page-style
     pero no han migrado al <img> semántico dentro de .hero-photo (deuda de
     PR #108 / Sonar S6819, queda pendiente la migración del markup en 9
     casos: afp-habitat, belcorp-*, celepsa, manymore-software-factory,
     maquinarias-app-mantenimiento, osiptel-bot-ia, plaza-san-miguel, utp).
     Cuando se complete la migración + se elimine la var, este fallback
     queda inerte (var no declarada → background-image:none, no double-fetch
     en las páginas con <img>). */
  background-image: var(--case-hero-photo, none);
  background-size: cover;
  background-position: center 15%;
}
.hero-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 92% 8%, rgba(var(--service-accent-rgb), 0.22) 0%, transparent 38%),
    linear-gradient(180deg, rgba(6, 13, 31, 0.62) 0%, rgba(6, 13, 31, 0.82) 55%, rgba(6, 13, 31, 0.97) 100%);
}
#hero .hero-grid {
  position: relative;
  z-index: 2;
  max-width: var(--container-wide);
  margin: 0 auto;
  width: 100%;
}

.hero-client-lockup {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(6, 13, 31, 0.35);
  margin-bottom: 28px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
}
.hero-client-lockup a.lockup-ancestor {
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s;
}
.hero-client-lockup a.lockup-ancestor:hover { color: var(--white); }
.hero-client-lockup [aria-current="page"] {
  color: var(--white);
  font-weight: 700;
}
.hero-client-lockup .lockup-brands {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.hero-client-lockup .dot-sep {
  width: 5px;
  height: 5px;
  /* TIER C · neutral — separadores wayfinding, sin carga de identidad. */
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-text { max-width: 880px; }
.hero-text h1 {
  color: var(--white);
  margin: 8px 0 24px;
}
.hero-text h1 .accent-word {
  color: var(--service-accent);
  display: inline;
}
/* Selector con .case-page para superar `.case-page p { color: var(--gray-700) }`
   que de otro modo pinta el subtitle gris oscuro sobre fondo navy. */
.case-page .hero-subtitle {
  font-size: 20px;
  color: var(--text-on-dark-2);
  line-height: 1.55;
  max-width: 720px;
  margin-bottom: 44px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-meta-cell {
  padding: 0 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 140px;
}
@media (min-width: 769px) {
  .hero-meta-cell:first-child { padding-left: 0; }
}
.hero-meta-cell:last-child { border-right: none; }
.hero-meta-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-on-dark-3);
  display: block;
  margin-bottom: 6px;
}
.hero-meta-value {
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }


/* =====================================================
   STATS BAND — 4 métricas grandes (card flotante)
   ===================================================== */
#stats-band {
  background: var(--white);
  padding: 72px 48px 0;
  position: relative;
  z-index: 2;
}
.stats-grid {
  max-width: var(--container-wide);
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.stats-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 48px;
  right: 48px;
  height: 3px;
  /* TIER B · brand anchor — la stripe superior de la stats band ancla
     en mint. La identidad del caso se expresa en .accent-word, .highlight
     y los pillars/results, no en cada decoración estructural. */
  background: var(--mint);
  border-radius: 3px;
}
.stat-cell {
  padding: 0 32px;
  border-right: 1px solid var(--gray-200);
}
.stat-cell:last-child  { border-right: none; }
.stat-cell:first-child { padding-left: 0; }
.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -1.5px;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 10px;
}
.stat-value .unit {
  font-size: 0.55em;
  /* TIER B · brand anchor — las unidades (meses, %, fuentes) son lectura
     repetitiva: ancla en mint para evitar saturación cromática del caso. */
  color: var(--mint-strong); /* editorial accept Gate 5 — identity over WCAG AA */
  margin-left: 4px;
  font-weight: 800;
}
.stat-label {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.4;
}


/* =====================================================
   SECTION BASE — usa container/container-wide del DS
   ===================================================== */
/* Scope a <main>: la .megamenu del header también es <section>. */
.case-page main section { padding: 112px 48px; }
.case-page .container      { max-width: var(--container);      margin: 0 auto; }
.case-page .container-wide { max-width: var(--container-wide); margin: 0 auto; }
.section-head {
  max-width: 820px;
  margin-bottom: 56px;
}


/* =====================================================
   01 · CONTEXT — Cliente + ficha
   ===================================================== */
#context { background: var(--gray-50); }
.context-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: start;
}
.context-text p {
  font-size: 17px;
  margin-bottom: 18px;
}
.context-text p:last-child { margin-bottom: 0; }

.fact-sheet {
  background: var(--white);
  border: 1px solid var(--gray-200);
  /* TIER C · neutral — la ficha es un componente informativo, no un punto
     de identidad. El border-top 3px se reduce a 1px gray-200 (consistente
     con el resto del border) para no contagiar el accent del caso. */
  border-top: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}
.fact-sheet h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 24px;
}
.fact-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: baseline;
}
.fact-row:last-child { border-bottom: none; }
.fact-key {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gray-500);
}
.fact-value {
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
}
.fact-value small {
  display: block;
  margin-top: 4px;
  color: var(--gray-500);
  font-weight: 500;
}


/* =====================================================
   02 · CHALLENGE — Desafío
   ===================================================== */
#challenge { background: var(--white); }
#challenge .narrative-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 820px;
}
.narrative-lead {
  font-size: 26px;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.35;
  border-left: 4px solid var(--service-accent);
  padding: 6px 0 6px 28px;
}
.narrative-body p {
  font-size: 17px;
  margin-bottom: 18px;
}
.narrative-body p:last-child { margin-bottom: 0; }

.constraint-list {
  margin-top: 24px;
  padding: 24px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}
/* §12.7 — bullet con ::before absolute, NUNCA flex en <li> con inlines mixtos */
.constraint-list li {
  position: relative;
  padding: 10px 0 10px 22px;
  color: var(--gray-700);
  font-size: 15px;
  line-height: 1.6;
}
.constraint-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--service-accent-strong);
}
.constraint-list li strong {
  color: var(--navy);
  font-weight: 700;
}


/* =====================================================
   03 · APPROACH — Enfoque (4 cards horizontales + conector)
   ===================================================== */
#approach { background: var(--gray-50); }
.approach-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  position: relative;
}
.approach-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 8%;
  right: 8%;
  height: 2px;
  /* TIER C · neutral — línea conectora wayfinding (une los 4 pasos),
     no es identidad. Pasa a gray-300 para no saturar la sección. */
  background: var(--gray-300);
  opacity: 0.6;
  z-index: 0;
}
.approach-step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.approach-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* TIER C · neutral — los círculos numerados son wayfinding (paso 01,
     02, 03, 04). Antes eran sólidos en service-accent (loud). Ahora:
     fondo blanco, número navy bold, ring fino. Lectura clara, identidad
     reservada para los momentos fuertes (.accent-word, .result-value). */
  background: var(--white);
  color: var(--navy-deep);
  border: 2px solid var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.approach-step h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.approach-step p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 0;
}


/* =====================================================
   04 · SOLUTION — Pilares + stack técnico sticky
   ===================================================== */
#solution { background: var(--white); }
.solution-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}
.solution-intro {
  font-size: 17px;
  margin-bottom: 0;
}
.solution-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}
.solution-pillar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--service-accent);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.solution-pillar-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--service-accent-soft);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.solution-pillar-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.solution-pillar-text h4 {
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 4px;
}
.solution-pillar-text p {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 0;
  line-height: 1.5;
}

.solution-stack {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  position: sticky;
  top: 100px;
}
.solution-stack h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 20px;
}
.stack-group {
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}
.stack-group:last-child { border-bottom: none; }
.stack-group-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--blue-a11y);
  margin-bottom: 10px;
}
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stack-tag {
  display: inline-flex;
  padding: 5px 12px;
  background: var(--blue-soft);
  color: var(--blue-a11y);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}


/* =====================================================
   05 · RESULTS — Resultados (dark, con radial decorativo)
   ===================================================== */
#results {
  background: var(--navy-deep);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
#results::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--service-accent-rgb), 0.08) 0%, transparent 60%);
  z-index: 0;
}
#results .section-head,
#results .results-wrap { position: relative; z-index: 1; }
#results h2 {
  color: var(--white);
  max-width: 720px;
}
#results .section-head p {
  color: var(--text-on-dark-2);
  font-size: 18px;
  max-width: 680px;
  margin-top: 12px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.result-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  position: relative;
}
.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--service-accent);
  border-radius: 2px;
}
.result-value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--service-accent);
  margin-bottom: 12px;
}
.result-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  margin-bottom: 8px;
}
/* Scopear con .case-page para evitar que `.case-page p { color: gray-700 }`
   gane por specificity y deje las descripciones ilegibles sobre navy. */
.case-page .result-note {
  font-size: 13px;
  color: var(--text-on-dark-3);
  line-height: 1.5;
}

.results-extra {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.result-extra-item {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  align-items: flex-start;
}
.result-extra-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  /* TIER B · brand anchor — el check ✓ de los wins extra es una marca de
     "validación Altimea". Se mantiene en mint estable para todos los casos. */
  background: var(--mint);
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-extra-check svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.case-page .result-extra-item p {
  color: var(--text-on-dark-2);
  font-size: 15px;
  margin-bottom: 0;
  line-height: 1.5;
}
.result-extra-item strong { color: var(--white); font-weight: 700; }


/* =====================================================
   06 · TESTIMONIAL — Pullquote editorial
   ===================================================== */
#testimonial {
  background: var(--navy-deep);
  padding: 140px 40px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}
#testimonial::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at center, rgba(var(--service-accent-rgb), 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.quote-mark {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 220px;
  line-height: 1;
  color: var(--service-accent);
  opacity: 0.18;
  font-weight: 700;
  user-select: none;
  pointer-events: none;
}
.quote-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
  /* Padding-top para despegar el eyebrow "06 / La voz del cliente" del
     glifo gigante de comillas que vive en posición absoluta arriba. */
  padding-top: 96px;
}
#testimonial blockquote {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.6px;
  margin-top: 40px;
  margin-bottom: 36px;
}
.quote-attribution {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.attribution-source {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--service-accent);
}
.attribution-source::before,
.attribution-source::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--service-accent);
  opacity: 0.6;
}
.attribution-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--white);
  letter-spacing: 0.3px;
}
.attribution-role {
  font-size: 13px;
  color: var(--text-on-dark-3);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}


/* =====================================================
   07 · SERVICES USED — Chips de servicios
   ===================================================== */
#services-used { background: var(--gray-50); }
.services-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-pill);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  transition: border-color 0.2s, color 0.2s;
}
.service-chip.is-primary {
  background: var(--service-accent-soft);
  border-color: var(--service-accent-strong);
}
.service-chip .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
}
.service-chip.is-primary .chip-dot {
  background: var(--service-accent-strong);
}
.service-chip .chip-arrow {
  font-size: 12px;
  color: var(--gray-400);
  transition: transform 0.2s, color 0.2s;
}
@media (hover: hover) {
  .service-chip:hover {
    border-color: var(--blue);
    color: var(--blue-a11y);
  }
  .service-chip:hover .chip-arrow {
    color: var(--blue);
    transform: translateX(2px);
  }
}


/* =====================================================
   08 · RELATED — Casos relacionados
   ===================================================== */
#related { background: var(--white); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-color 0.3s ease;
}
.related-card-client {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
}
.related-card h3 {
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 0;
}
.related-card p {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 0;
  line-height: 1.6;
}
.related-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}
.related-card-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.related-card-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 1.4;
}
.related-card-pill.is-service {
  background: var(--service-accent-soft);
  color: var(--service-accent-strong); /* editorial accept Gate 5 — identity over WCAG AA (mint-strong sobre mint-soft) */
}
.related-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: gap 0.2s ease, color 0.2s ease;
}
.related-card-arrow .arrow-glyph {
  display: inline-block;
  transition: transform 0.2s ease;
}
@media (hover: hover) {
  .related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--service-accent);
  }
  .related-card:hover .related-card-arrow {
    color: var(--service-accent-strong);
    gap: 10px;
  }
  .related-card:hover .related-card-arrow .arrow-glyph {
    transform: translateX(2px);
  }
}

.related-cta-row {
  text-align: center;
  margin-top: 48px;
}


/* =====================================================
   09 · CTA FINAL (case-page)
   ===================================================== */
.case-page #cta-final {
  background: var(--navy-deep);
  color: var(--white);
  text-align: center;
  padding: 128px 48px;
}
.case-page #cta-final h2 {
  color: var(--white);
  max-width: 720px;
  margin: 0 auto 20px;
}
.case-page #cta-final p {
  color: var(--text-on-dark-2);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.case-page #cta-final p.cta-micro {
  margin: 40px auto 0;
  font-size: 13px;
  color: var(--text-on-dark-3);
  letter-spacing: 0.5px;
}

/* CTA final · highlight de texto en mint (color de marca para el cierre).
   El cromatismo del caso (violet/mint/azure/etc) aplica al storytelling;
   la frase de cierre "¿tienes...?" cierra siempre con el mint Altimea para
   marcar la transición de "caso" a "acción comercial". El span del H2 en
   #results sigue usando el accent del caso porque pertenece al storytelling. */
.case-page #cta-final .highlight-on-dark { color: var(--mint); }

/* CTA dark + footer dark se tocan: sin gap blanco entre ambos. */
body.case-page > .site-footer { margin-top: 0; }

/* Restaurar color de texto del footer (override de .case-page p). */
.case-page .site-footer-brand p,
.case-page .site-footer-brand address { color: var(--text-on-dark-2); }


/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .stat-cell:nth-child(2) { border-right: none; }
  .stat-cell:nth-child(3) { padding-left: 0; }

  .context-grid { grid-template-columns: 1fr; gap: 40px; }

  #challenge .narrative-grid { gap: 32px; }

  /* En mobile (≤1024) los 4 enfoques apilados en 1 sola columna y centrados.
     Originalmente se apilaba en 2x2 pero las cards quedaban muy estrechas
     en iPhone para el contenido (número grande + h3 + p). */
  .approach-steps { grid-template-columns: 1fr; gap: 20px; justify-items: center; }
  .approach-steps::before { display: none; }
  .approach-step { text-align: center; max-width: 480px; }

  .solution-grid  { grid-template-columns: 1fr; gap: 40px; }
  .solution-stack { position: static; }

  .results-grid   { grid-template-columns: 1fr; }
  .results-extra  { grid-template-columns: 1fr; }

  .related-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Eyebrow breadcrumb wrap-friendly en mobile (mismo patrón que case-index
     y service-page, evita partir palabras como "ÉXITO" en iPhone). */
  .eyebrow-editorial {
    flex-wrap: wrap;
    gap: 8px 12px;
    letter-spacing: 1.5px;
    font-size: 11px;
    margin-bottom: 20px;
  }
  .eyebrow-editorial::before { width: 24px; }

  .case-page main section { padding: 80px 24px; }

  #hero { min-height: 72vh; padding: 56px 24px 56px; }
  .hero-text h1 { font-size: clamp(32px, 8vw, 48px); }
  .hero-client-lockup {
    row-gap: 8px;
    padding: 10px 16px;
    font-size: 11px;
    letter-spacing: 1.2px;
  }
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .hero-meta-cell {
    padding: 12px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
  }
  .hero-meta-cell:nth-child(2n) { border-right: none; }
  .hero-meta-cell:nth-last-child(-n+2) { border-bottom: none; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }

  #stats-band { padding: 48px 24px 0; }
  .stats-grid { grid-template-columns: 1fr; padding: 32px 24px; row-gap: 24px; }
  .stats-grid .stat-cell {
    padding: 20px 0;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }
  .stats-grid .stat-cell:last-child  { border-bottom: none; padding-bottom: 0; }
  .stats-grid .stat-cell:first-child { padding-top: 0; }

  #testimonial { padding: 80px 24px; }
  .quote-mark  { font-size: 140px; top: 20px; }
  #testimonial blockquote { font-size: 24px; margin-top: 32px; margin-bottom: 28px; }

  /* Overlay más opaco en el hero del case-study para mejorar contraste de
     lectura sin recurrir a filter:blur() (caro en GPU mobile). Sube de
     0.45→0.65 arriba y 0.94→0.96 abajo, llevando el contraste con texto
     blanco de ~4:1 a ~7:1 (WCAG AAA para body text grande). */
  .hero-overlay {
    background:
      radial-gradient(circle at 92% 8%, rgba(var(--service-accent-rgb), 0.18) 0%, transparent 38%),
      linear-gradient(180deg, rgba(6, 13, 31, 0.65) 0%, rgba(6, 13, 31, 0.85) 55%, rgba(6, 13, 31, 0.96) 100%);
  }

  /* "Referencia en entrevista pública" en mobile: línea mint solo ARRIBA
     (no a ambos lados). Stack vertical para más respiro. */
  .attribution-source {
    flex-direction: column;
    gap: 8px;
    letter-spacing: 1.2px;
  }
  .attribution-source::after { display: none; }
  .attribution-source::before { width: 36px; }

  /* Hero breadcrumb: ocultar el nivel intermedio "Casos de éxito" en mobile
     (demasiado largo junto al nombre del cliente). Queda: Altimea · Cliente. */
  .hero-client-lockup .lockup-section,
  .hero-client-lockup .lockup-section + .dot-sep,
  .hero-client-lockup .dot-sep:has(+ .lockup-section) {
    display: none;
  }
  /* Ocultar también las marcas (Ésika · L'Bel · Cyzone) en mobile. */
  .hero-client-lockup .lockup-brands,
  .hero-client-lockup .lockup-brands + .dot-sep,
  .hero-client-lockup .dot-sep:has(+ .lockup-brands) {
    display: none;
  }

  .case-page #cta-final { padding: 96px 24px; }
}


/* =====================================================
   GEO — CAPA GENERATIVE ENGINE OPTIMIZATION
   case-tldr + faq-section: reutilizables en todos los
   casos de éxito que reciban capa GEO.
   ===================================================== */

/* ── TL;DR quotable aside ── */
.case-tldr {
  border-top:    1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  background:    var(--gray-50);
  padding: 28px 40px;
}
.case-tldr p {
  max-width: 860px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--navy);
}

/* ── FAQ accordion ── */
.faq-section {
  padding: 96px 40px;
  max-width: var(--container-wide);
  margin: 0 auto;
}
.faq-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--navy);
  margin-bottom: 40px;
}
.faq-item {
  border-bottom: 1px solid var(--gray-200);
}
.faq-item:first-of-type {
  border-top: 1px solid var(--gray-200);
}
.faq-item > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 400;
  color: var(--service-accent);
  transition: transform 0.2s ease;
  line-height: 1;
}
.faq-item[open] > summary::after {
  transform: rotate(45deg);
}
.faq-item > p {
  padding: 0 0 20px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--gray-700);
  max-width: 720px;
}

@media (max-width: 768px) {
  .case-tldr { padding: 24px; }
  .faq-section { padding: 64px 24px; }
  .faq-item > summary { font-size: 15px; }
}
