/* ---------- "¿Por qué nosotros?" — enfoque de cámara (js/why.js) ----------
   Papel cálido. La sección mide 100vh + 250vh de pin (móvil, sin JS: + 180vh; BC-B: antes 420vh y 300vh). Dos capas fijas (sticky) a la vez:
   .why__back (bokeh y anillo de diafragma) por DEBAJO del canvas del destello (z-index 1), así el destello
   queda dentro del anillo; .why__pin (título y razones) por ENCIMA (z-index 2).
   La hoja de contactos anterior está en legacy/css/why-contactos.css. */
.why {
  --paper: #f4f2ef;
  --orange: #F35411;
  --why-x: clamp(24px, 10vw, 180px);
  position: relative;
  height: 350vh;
  background: var(--paper);
  color: #0b0909;
}

.why__back,
.why__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
}
.why__pin {
  z-index: 2;
  margin-top: -100vh;
  margin-top: -100lvh;
}

.why__bokeh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.why__title {
  position: absolute;
  left: var(--why-x);
  top: 124px;
  margin: 0;
  font: 500 clamp(16px, 1.2vw, 20px) / 1 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- las razones: enormes, en columna; js/why.js mueve la columna y enfoca la activa ---------- */
.why__list {
  position: absolute;
  left: var(--why-x);
  top: 0;
  /* sin entrar en el anillo de la derecha (ni en el destello, que va en su hueco) */
  width: min(calc(100vw - var(--why-x) - 300px), 16ch);
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 clamp(44px, 7.4vw, 136px) / 1 var(--font-display);
  letter-spacing: -0.025em;
  will-change: transform;
}
.why__item {
  position: relative;
  margin-bottom: 0.15em;
  transform-origin: 0% 50%;
  will-change: transform, filter, opacity;
}
.why__word { display: block; }
.why__spark {
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  margin: 0 0.22em 0.12em 0;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath fill='%23F35411' d='M5 0C5.6 3.6 6.4 4.4 10 5 6.4 5.6 5.6 6.4 5 10 4.4 6.4 3.6 5.6 0 5 3.6 4.4 4.4 3.6 5 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0);
}
/* número y frase de la activa: debajo de la palabra (las palabras ocupan casi todo el ancho) */
.why__meta {
  position: absolute;
  left: 0;
  top: calc(100% + 14px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  letter-spacing: 0;
  opacity: 0;
}
.why__n {
  font: 500 13px / 1 'IBM Plex Mono', monospace;
  letter-spacing: 0.08em;
  color: #b8410e; /* el naranja de marca no llega a 4.5:1 en 13px sobre el papel */
}
.why__text {
  max-width: 28ch;
  font: 400 clamp(15px, 1.2vw, 19px) / 1.45 var(--font-display);
  color: #3a3434;
}

/* ---------- anillo de diafragma: medio fuera de pantalla a la derecha ---------- */
.why__ring {
  position: absolute;
  right: -180px;
  top: 50%;
  width: 420px;
  height: 420px;
  margin-top: -210px;
}
.why__ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.why__ring circle { fill: none; stroke: rgba(11, 9, 9, 0.25); stroke-width: 1; }
.why__ring .tick { stroke: rgba(11, 9, 9, 0.25); stroke-width: 1; }
.why__ring text {
  font: 400 11px / 1 'IBM Plex Mono', monospace;
  fill: #6f6662;
  dominant-baseline: middle;
  transition: fill 0.25s linear;
}
.why__ring text.is-on { fill: var(--orange); }
.why__ring .index { stroke: var(--orange); stroke-width: 2; stroke-linecap: round; }

/* tablet / portátil pequeño: un poco más pequeñas, para que "cualquier formato" quepa en una línea (BC-B) */
@media (min-width: 768px) and (max-width: 1199px) {
  .why__list { font-size: clamp(44px, 5.9vw, 136px); }
}

/* ---------- móvil: pin más corto, razones más pequeñas, sin anillo ---------- */
@media (max-width: 767px) {
  .why { --why-x: 20px; height: 280vh; }
  .why__title { top: 104px; }
  .why__list {
    width: calc(100vw - 40px);
    font-size: clamp(36px, 10vw, 52px);
  }
  .why__ring { display: none; }
}

/* ---------- movimiento reducido: sin pin ni desenfoque; las cuatro en lista, nítidas ---------- */
.why.is-static { height: auto; }
.why.is-static .why__back {
  position: absolute;
  inset: 0;
  height: auto;
}
.why.is-static .why__pin {
  position: relative;
  height: auto;
  margin: 0;
  padding: 180px var(--why-x) 140px;
}
.why.is-static .why__title { position: static; margin-bottom: 48px; }
.why.is-static .why__list { position: static; width: auto; max-width: 16ch; }
.why.is-static .why__item { margin-bottom: 1.1em; }
.why.is-static .why__spark { transform: none; }
.why.is-static .why__meta { position: static; margin-top: 14px; opacity: 1; }
.why.is-static .why__ring { display: none; }

/* ---------- móvil (< 768 px): todo a la vez (js/why.js → .is-quick). Sin pin, sin enfoque, sin bokeh ni anillo:
   lista compacta, cada razón con su estrellita, su título y su frase; separadas por una línea fina ---------- */
.why.is-quick { height: auto; }
.why.is-quick .why__back { display: none; }
.why.is-quick .why__pin {
  position: relative;
  height: auto;
  margin: 0;
  padding: 104px var(--why-x) 88px;
  overflow: visible;
}
.why.is-quick .why__title { position: static; margin-bottom: 28px; }
.why.is-quick .why__list {
  position: static;
  width: auto;
  font: 600 clamp(26px, 8vw, 34px) / 1.05 var(--font-display);
  letter-spacing: -0.02em;
  will-change: auto;
}
.why.is-quick .why__item {
  margin: 0;
  padding: 20px 0;
  border-top: 1px solid rgb(11 9 9 / 0.14);
  will-change: auto;
}
.why.is-quick .why__item:last-child { border-bottom: 1px solid rgb(11 9 9 / 0.14); }
.why.is-quick .why__spark { transform: none; width: 0.5em; height: 0.5em; margin: 0 0.3em 0.1em 0; }
.why.is-quick .why__meta { position: static; margin-top: 10px; opacity: 1; gap: 0; }
.why.is-quick .why__n { display: none; }
.why.is-quick .why__text { max-width: none; font-size: 16px; }
/* AY-C: en móvil, "¿Por qué nosotros?" es el título de la sección (no un rótulo pequeño en mayúsculas) y va encima
   de la lista desde el principio (en absoluto, antes de .is-quick, se dibujaba encima de las razones). Cada razón
   se parte limpia: la estrellita en su columna y las dos líneas alineadas entre sí. */
@media (max-width: 767px) {
  .why .why__title {
    position: static;
    margin: 0 0 28px;
    font: 600 clamp(38px, 11vw, 48px) / 0.98 var(--font-display);
    letter-spacing: -0.03em;
    text-transform: none;
  }
  .why.is-quick .why__word { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
  .why.is-quick .why__spark { align-self: start; margin: 0.28em 0.3em 0 0; } /* (a la altura de la primera línea) */
  .why.is-quick .why__list { font-size: clamp(24px, 7.4vw, 32px); text-wrap: balance; }
}
