/* Erudito Consulting: portada "vistosa" (4-nov-2026).
   Piezas inspiradas en 21st.dev y rehechas a mano, sin bibliotecas:
   collage editorial, titulares con desenfoque, lista editorial de servicios
   y línea de tiempo al bajar. Los colores salen de base.css.
   Sin JavaScript o con movimiento reducido, todo se ve completo y quieto. */

body { padding-inline: 0; }
.ancho { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 640px) { .ancho { padding-inline: var(--esp-6); } }

h1, h2, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; }
em.acento { font-style: italic; font-weight: 500; color: var(--acento); }

/* ---------- Encabezado ---------- */
.encabezado {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "marca contacto" "menu menu";
  align-items: center; gap: var(--esp-1) var(--esp-4); padding-block: var(--esp-4);
}
.encabezado .marca { grid-area: marca; justify-self: start; }
.encabezado .menu { grid-area: menu; }
.encabezado .boton-contacto { grid-area: contacto; }
.menu ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tinta); font-weight: 700; text-decoration-color: var(--regla); }
.menu a:hover { color: var(--acento); text-decoration-color: currentColor; }
.boton-contacto {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--esp-4); border-radius: 999px;
  background: var(--tinta); color: var(--papel); font-weight: 700; text-decoration: none;
}
.boton-contacto:hover { background: var(--acento); color: var(--sobre-acento); }

/* Botón principal en píldora, como el del collage de referencia */
.boton--pildora { border-radius: 999px; background: var(--tinta); color: var(--papel); padding-inline: 28px; }
.boton--pildora:hover { background: var(--acento); color: var(--sobre-acento); }
.enlace-flecha { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--tinta); text-decoration: none; }
.enlace-flecha span { transition: transform .2s; }
.enlace-flecha:hover { color: var(--acento); }
.enlace-flecha:hover span { transform: translateX(4px); }

/* ---------- Portada: collage editorial ---------- */
.portada { position: relative; overflow: hidden; isolation: isolate; }
.portada::before, .portada::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none;
}
.portada::before { width: 46vmax; height: 46vmax; right: -14vmax; top: -10vmax; background: var(--lavado-1); }
.portada::after { width: 34vmax; height: 34vmax; right: 16vmax; bottom: -18vmax; background: var(--lavado-2); }
.portada .ancho {
  display: grid; gap: var(--esp-7); align-items: center;
  padding-block: var(--esp-6) var(--esp-8);
}
.sobretitulo { font-size: var(--t-1); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--acento); margin: 0 0 var(--esp-4); }
.portada h1 { font-size: clamp(2.7rem, 8.4vw, 5.1rem); line-height: 1.02; max-width: 13ch; margin-bottom: var(--esp-5); }
.entrada { font-size: var(--t-5); line-height: 1.55; color: var(--tinta-2); max-width: 50ch; margin-bottom: var(--esp-6); }

.collage { position: relative; margin: 0 auto; width: min(100%, 380px); padding: 0 12% 16% 0; }
.collage-retrato {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: 28px; background: var(--papel-2); box-shadow: var(--sombra);
}
.collage-libro {
  position: absolute; right: 0; bottom: 0; width: 42%; margin: 0;
  transform: rotate(5deg); transform-origin: 50% 100%;
}
.collage-libro img {
  display: block; width: 100%; height: auto; aspect-ratio: 5 / 8; border-radius: 10px;
  box-shadow: var(--sombra), 0 0 0 6px var(--papel);
}
.collage-nombre {
  position: absolute; left: -6px; bottom: 9%; z-index: 1;
  display: flex; flex-direction: column; line-height: 1.25;
  background: var(--papel); color: var(--tinta); border-radius: 14px; padding: 10px 14px;
  box-shadow: var(--sombra); font-size: var(--t-1); max-width: 62%;
}
.collage-nombre strong { font-size: var(--t-2); }
.collage-nombre span { color: var(--tinta-2); }
.collage-pie { margin-top: var(--esp-4); font-size: var(--t-1); color: var(--tinta-2); max-width: 40ch; }
.collage-pie cite { font-style: italic; color: var(--tinta); }

@media (prefers-reduced-motion: no-preference) {
  .collage-retrato { animation: entra-retrato .9s cubic-bezier(.2, .7, .2, 1) both; }
  .collage-libro { animation: entra-libro 1.1s cubic-bezier(.2, .7, .2, 1) .25s both; }
  .collage-nombre { animation: entra-retrato .9s cubic-bezier(.2, .7, .2, 1) .45s both; }
  .collage-libro img { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
  .collage:hover .collage-libro img { transform: rotate(-3deg) translateY(-6px); }
}
@keyframes entra-retrato { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes entra-libro { from { opacity: 0; transform: rotate(14deg) translate(30px, 30px); } }

/* ---------- Titulares con desenfoque (Blur Reveal) ---------- */
.vr-p { display: inline-block; }
.vv [data-revelar] .vr-p {
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), filter .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.vv [data-revelar]:not(.visto) .vr-p { opacity: 0; filter: blur(12px); transform: translateY(0.28em); }

/* ---------- Secciones y franjas de color ---------- */
.seccion { padding-block: var(--esp-8); }
.franja-papel-2 { background: var(--papel-2); }
.franja-banda { background: var(--banda); color: var(--sobre-banda); }
.cabeza { display: grid; gap: 10px; margin-bottom: var(--esp-6); }
.rotulo { font-size: var(--t-1); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--acento); margin: 0; }
.cabeza h2, .servicios-cabeza h2 { font-size: clamp(2.2rem, 5.6vw, 3.4rem); line-height: 1.05; max-width: 18ch; }
.cabeza .intro { font-size: var(--t-4); color: var(--tinta-2); margin: 6px 0 0; }

/* ---------- Servicios: lista editorial ---------- */
.servicios-tarjeta {
  background: var(--papel); border: 1px solid var(--regla); border-radius: 22px;
  padding: var(--esp-6) 20px var(--esp-5);
}
.servicios-cabeza { display: grid; gap: var(--esp-4); padding-bottom: var(--esp-6); }
.servicios-cabeza .intro { font-size: var(--t-4); color: var(--tinta-2); margin: 0; max-width: 40ch; }
.servicios-lista { counter-reset: servicio; border-top: 1px solid var(--regla); }
.servicio { counter-increment: servicio; border-bottom: 1px solid var(--regla); }
.servicio a {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) 28px; grid-template-areas: "num titulo flecha" ". texto texto";
  align-items: baseline; gap: 4px var(--esp-3); padding-block: var(--esp-5);
  color: var(--tinta); text-decoration: none;
}
.servicio a::before {
  grid-area: num; content: counter(servicio, decimal-leading-zero);
  font-size: var(--t-1); font-weight: 700; color: var(--tinta-2); font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.servicio h3 {
  grid-area: titulo; font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.6rem, 4.2vw, 2.35rem); line-height: 1.12; letter-spacing: -0.01em;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), color .2s;
}
.servicio p { grid-area: texto; margin: 0; color: var(--tinta-2); font-size: var(--t-2); max-width: 46ch; }
.servicio .flecha {
  grid-area: flecha; align-self: center; justify-self: end; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; color: var(--tinta-2); transition: transform .3s cubic-bezier(.2, .7, .2, 1), color .2s, background-color .2s;
}
.servicio .flecha svg { width: 18px; height: 18px; }
.servicio a:hover h3, .servicio a:focus-visible h3 { transform: translateX(10px); color: var(--acento); }
.servicio a:hover .flecha, .servicio a:focus-visible .flecha { color: var(--sobre-acento); background: var(--acento); transform: translateX(2px); }
.servicios-pie { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--esp-2) var(--esp-5); padding-top: var(--esp-5); font-size: var(--t-1); color: var(--tinta-2); }
.servicios-pie p { margin: 0; }

/* ---------- Cómo trabajo: línea de tiempo ---------- */
.linea { position: relative; display: grid; gap: var(--esp-7); padding-block: var(--esp-3); --avance: 1; }
.linea::before, .linea::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 15px; width: 2px; border-radius: 2px;
}
.linea::before { background: var(--regla); }
.linea::after { background: var(--tinta); transform-origin: top; transform: scaleY(var(--avance)); }
.hito { position: relative; padding-left: 52px; }
.hito::before {
  content: ""; position: absolute; left: 8px; top: 6px; width: 16px; height: 16px; border-radius: 50%; z-index: 1;
  background: var(--papel); box-shadow: 0 0 0 3px var(--tinta);
  transition: background-color .4s, box-shadow .4s;
}
.hito-etiqueta {
  display: inline-block; margin-bottom: var(--esp-3); padding: 4px 12px; border-radius: 999px;
  background: var(--tinta); color: var(--papel); font-size: var(--t-1); font-weight: 700; letter-spacing: .04em;
  transition: background-color .4s, color .4s;
}
.hito h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.1; margin-bottom: var(--esp-2); transition: color .4s; }
.hito p { margin: 0; color: var(--tinta-2); transition: color .4s; }
/* Con movimiento: lo que aún no se alcanza al bajar se ve gris */
.vv .hito:not(.alcanzado)::before { background: var(--regla); box-shadow: 0 0 0 3px var(--regla); }
.vv .hito:not(.alcanzado) .hito-etiqueta { background: var(--papel-2); color: var(--tinta-2); }
.vv .hito:not(.alcanzado) h3, .vv .hito:not(.alcanzado) p { color: color-mix(in srgb, var(--tinta-2) 55%, var(--papel)); }

.nota {
  margin-top: var(--esp-7); padding: var(--esp-4) 20px; background: var(--papel-2);
  border-left: 6px solid var(--tinta); border-radius: 0 var(--radio-m) var(--radio-m) 0;
  font-size: var(--t-2); max-width: 70ch;
}
.nota p { margin: 0; max-width: none; }

/* ---------- Trayectoria (franja de contraste) ---------- */
.franja-banda .rotulo { color: var(--sobre-banda-2); }
.franja-banda .cabeza .intro { color: var(--sobre-banda-2); }
.franja-banda a { color: var(--sobre-banda); }
.franja-banda :focus-visible { outline-color: var(--sobre-banda); }
.trayectoria { border-top: 1px solid var(--banda-regla); }
.tramo { display: grid; gap: 4px var(--esp-6); padding-block: var(--esp-5); border-bottom: 1px solid var(--banda-regla); }
.tramo-fecha { font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--sobre-banda-2); }
.tramo h3 { font-size: var(--t-4); margin-bottom: 4px; }
.tramo p { margin: 0; color: var(--sobre-banda-2); }
.tramo cite { font-style: italic; color: var(--sobre-banda); }

/* ---------- Videos del canal ---------- */
.videos { display: grid; gap: var(--esp-6) var(--esp-5); }
.video a { display: grid; gap: var(--esp-3); color: var(--tinta); text-decoration: none; }
.video-marco { position: relative; overflow: hidden; border-radius: 16px; background: var(--papel-2); box-shadow: var(--sombra); }
.video-marco img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.video-play {
  position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--papel); border-radius: 50%; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .6);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.video-play svg { width: 30px; height: 30px; color: var(--acento); }
.video a:hover .video-play { transform: scale(1.12); }
.video-enlace { font-size: var(--t-1); font-weight: 700; color: var(--acento); }
.video h3 { font-size: var(--t-3); line-height: 1.35; transition: color .2s; }
.video a:hover h3 { color: var(--acento); }
.video a:hover .video-marco img { transform: scale(1.04); }
.videos-nota { margin-top: var(--esp-6); font-size: var(--t-1); color: var(--tinta-2); }

/* ---------- Contacto ---------- */
.contacto { position: relative; overflow: hidden; isolation: isolate; }
.contacto::before {
  content: ""; position: absolute; z-index: -1; width: 40vmax; height: 40vmax; left: -12vmax; bottom: -22vmax;
  border-radius: 50%; filter: blur(70px); opacity: .45; background: var(--lavado-1); pointer-events: none;
}
.contacto h2 { font-size: clamp(2.5rem, 7vw, 4.4rem); line-height: 1.02; max-width: 14ch; }
.contacto-datos { display: grid; gap: var(--esp-2); margin-top: var(--esp-5); font-size: var(--t-2); color: var(--tinta-2); }
.contacto-datos p { margin: 0; }

/* ---------- Otros proyectos ---------- */
.proyectos { display: grid; gap: 20px; }
.proyecto {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--esp-3);
  background: var(--papel-2); border-radius: 22px; padding: var(--esp-6) var(--esp-5);
}
.proyecto h3 { font-family: var(--serif); font-weight: 600; font-size: 1.75rem; line-height: 1.1; }
.proyecto p { margin: 0; color: var(--tinta-2); }
.proyecto .proyecto-sub { font-weight: 700; color: var(--tinta); }
.proyecto .boton { margin-top: auto; }
.proyecto--calido { background: var(--calido); color: var(--sobre-calido); }
.proyecto--calido p, .proyecto--calido .proyecto-sub { color: var(--sobre-calido); }
.proyecto--calido :focus-visible { outline-color: var(--sobre-calido); }

/* ---------- Pie ---------- */
.pie { padding-block: 0 56px; }
.pie-dentro { border-top: 1px solid var(--regla); padding-top: var(--esp-6); }
.pie { color: var(--tinta-2); font-size: var(--t-1); }
.pie p { max-width: 80ch; margin-bottom: var(--esp-2); }
.pie a { color: var(--tinta-2); display: inline-block; padding-block: 10px; }
.pie a:hover { color: var(--acento); }
/* Redes del pie (11-nov-2026): íconos de 24 px con área táctil de 44 px; el texto queda para lectores de pantalla */
.pie-redes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: -10px; }
.pie .pie-redes a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; color: var(--tinta-2); border-radius: 8px; }
.pie .pie-redes a:hover { color: var(--acento); }
.pie .pie-redes a.pie-red-texto { min-width: 0; padding-inline: 10px; }
.red-icono { width: 24px; height: 24px; fill: currentColor; }
.texto-red { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Pantallas medianas y anchas ---------- */
@media (min-width: 640px) {
  .encabezado { grid-template-columns: auto 1fr auto; grid-template-areas: "marca menu contacto"; column-gap: var(--esp-5); }
  .encabezado .menu { justify-self: end; }
  .menu ul { gap: 0 var(--esp-5); }
  .servicios-tarjeta { padding: var(--esp-7) var(--esp-7) var(--esp-5); }
  .servicio a { grid-template-columns: 3.4rem minmax(0, 1fr) 36px; }
  .proyectos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proyecto { padding: var(--esp-6); }
  .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tramo { grid-template-columns: 12rem minmax(0, 1fr); align-items: baseline; }
  .tramo-fecha { white-space: nowrap; }
}
@media (min-width: 900px) {
  .portada .ancho { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--esp-8); padding-block: 56px var(--esp-9); }
  .collage { margin: 0 0 0 auto; }
  .seccion { padding-block: var(--esp-9); }
  .cabeza { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: var(--esp-2) var(--esp-7); align-items: end; }
  .cabeza .rotulo { grid-column: 1 / -1; }
  .cabeza .intro { margin: 0; }
  .servicios-cabeza { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); align-items: end; gap: var(--esp-3) var(--esp-7); }
  .servicios-cabeza .rotulo { grid-column: 1 / -1; }
  .servicio a {
    grid-template-columns: 3.4rem minmax(0, 1.1fr) minmax(0, 1fr) 36px; grid-template-areas: "num titulo texto flecha";
    align-items: center; padding-block: var(--esp-6);
  }
  .servicio a::before { align-self: center; }

  /* Línea al centro y pasos que alternan de lado */
  .linea { gap: var(--esp-8); }
  .linea::before, .linea::after { left: 50%; margin-left: -1px; }
  .hito { width: 50%; padding-left: 0; padding-right: 64px; text-align: right; }
  .hito::before { left: auto; right: -8px; }
  .hito:nth-child(even) { margin-left: 50%; padding-right: 0; padding-left: 64px; text-align: left; }
  .hito:nth-child(even)::before { right: auto; left: -8px; }
  .hito p { margin-left: auto; max-width: 40ch; }
  .hito:nth-child(even) p { margin-left: 0; }

  .videos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contacto .ancho { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--esp-7); align-items: end; }
  .contacto .cabeza { margin-bottom: 0; grid-template-columns: 1fr; }
  .contacto .cabeza .rotulo { grid-column: auto; }
  .contacto .cabeza .intro { margin-top: var(--esp-3); }
}
@media print {
  .menu, .boton-contacto { display: none; }
  .portada::before, .portada::after, .contacto::before { display: none; }
  .franja-banda { background: none; color: var(--tinta); }
}
