/* pub-proceso — «De la idea a la venta» (/publicidad/). Fondo arena claro (distinto al blanco de transparencia y al del FAQ).
   Gráfica noche con barras sólidas que suben y una línea lima que las une; debajo las tarjetas (3×2 / 2 col / carrusel).
   Con JS (.is-js) las barras nacen al entrar en pantalla (.is-on); sin JS o con movimiento reducido ya están completas. */

.pubp { --pubp-borde: #E9E1D7; --pubp-gris: #5F595B; position: relative; isolation: isolate; overflow: hidden; background: #F5EFE7; color: var(--ink); }
.pubp::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(rgba(18, 16, 17, .07) 1px, transparent 1.4px) 0 0 / 24px 24px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%); mask-image: linear-gradient(180deg, transparent, #000 40%); }
.pubp__in { max-width: 1320px; margin: 0 auto; padding: clamp(56px, 7vw, 112px) var(--m); }

.pubp__cab { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 12px 48px; margin-bottom: clamp(28px, 3.4vw, 48px); }
.pubp__cab > :not(:last-child) { grid-column: 1; }
.pubp__cab > p:last-child { grid-column: 2; grid-row: 1 / span 2; color: var(--pubp-gris); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.55; }
.pubp__ceja { justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--pubp-borde); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.pubp__ceja::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 91, 35, .16); }
.pubp h2 { max-width: 16ch; font-size: clamp(32px, 4.2vw, 60px); }

/* ── Gráfica: panel noche, barras sólidas con brillo arriba y una sola línea lima que las une ── */
.pubp__graf { --alto: clamp(150px, 15vw, 210px); position: relative; margin-bottom: clamp(14px, 1.6vw, 20px); padding: clamp(22px, 2.6vw, 34px) clamp(18px, 3vw, 44px) 16px; border-radius: clamp(22px, 2.4vw, 30px); background: radial-gradient(60% 120% at 100% 0%, rgba(255, 91, 35, .28), transparent 60%), var(--noche); color: #fff; box-shadow: 0 30px 60px -40px rgba(18, 16, 17, .7); }
.pubp__graf::before { content: ""; position: absolute; left: clamp(18px, 3vw, 44px); right: clamp(18px, 3vw, 44px); top: clamp(22px, 2.6vw, 34px); height: var(--alto); background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 25%); pointer-events: none; }
.pubp__area { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; height: var(--alto); }
.pubp__col { position: relative; display: block; justify-self: center; width: min(46%, 64px); height: var(--h); }
.pubp__col i { position: absolute; inset: 0; border-radius: 10px 10px 3px 3px; background: linear-gradient(180deg, #FF7A45, #FF5B23); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35); transform-origin: bottom; transition: transform .9s var(--ease) calc(.1s + var(--k) * .09s), background-color .3s, box-shadow .3s; }
.pubp__col:nth-of-type(2) i { background: #5A2A1C; } .pubp__col:nth-of-type(3) i { background: #8A3A20; } .pubp__col:nth-of-type(4) i { background: #C24A22; } .pubp__col:nth-of-type(5) i { background: #E85323; }
.pubp__col:nth-of-type(2) i, .pubp__col:nth-of-type(3) i, .pubp__col:nth-of-type(4) i, .pubp__col:nth-of-type(5) i { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .22); }
.pubp__col:nth-of-type(1) i { background: #3D2219; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18); }
.pubp__col:last-child i { background: linear-gradient(180deg, #E0FFA8, #B8E86A); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 0 30px rgba(210, 251, 140, .35); }
.pubp__col.is-act i { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 0 0 2px #fff; }
.pubp__linea { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; transition: opacity .8s ease .9s; }
.pubp__linea polyline { fill: none; stroke: var(--lima); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(210, 251, 140, .55)); }
/* puntos de la línea: arriba de cada barra */
.pubp__col::after { content: ""; position: absolute; left: 50%; top: 0; z-index: 2; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--noche); box-shadow: inset 0 0 0 3px var(--lima); transition: opacity .4s ease calc(.9s + var(--k) * .08s), transform .4s var(--ease) calc(.9s + var(--k) * .08s); }
.pubp__ejes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); }
.pubp__ejes small { color: rgba(255, 255, 255, .62); font-size: 13px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.pubp__meta { position: absolute; left: clamp(18px, 3vw, 44px); top: clamp(22px, 2.6vw, 34px); display: grid; color: rgba(255, 255, 255, .62); font-size: 13px; line-height: 1.3; }
.pubp__meta b { color: var(--lima); font-size: 17px; font-weight: 700; }
.pubp.is-js:not(.is-on) .pubp__col i { transform: scaleY(0); }
.pubp.is-js:not(.is-on) .pubp__col::after { opacity: 0; transform: scale(.4); }
.pubp.is-js:not(.is-on) .pubp__linea { opacity: 0; }

/* ── Tarjetas 3×2 ── */
.pubp__pasos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
.pubp__paso { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: clamp(18px, 2vw, 26px); border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--pubp-borde), 0 20px 40px -34px rgba(18, 16, 17, .45); transition: box-shadow .35s, transform .35s var(--ease), opacity .6s var(--ease) calc(var(--k) * .06s); }
.pubp__paso:hover { transform: translateY(-3px); box-shadow: 0 0 0 1.5px var(--accent), 0 24px 40px -30px rgba(18, 16, 17, .5); }
.pubp__top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pubp__n { font-family: 'Marko Display', var(--f); color: var(--accent); font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pubp__paso:last-child .pubp__n { color: #5E9A16; }
.pubp__cuando { padding: 3px 10px; border-radius: 999px; background: var(--lima); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.pubp__ico { display: grid; place-items: center; width: 38px; height: 38px; margin-left: auto; border-radius: 12px; background: #F7F2EC; color: var(--noche); }
.pubp__paso h3 { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.22; letter-spacing: -.01em; }
.pubp__paso p { color: var(--pubp-gris); font-size: 15px; line-height: 1.5; }
.pubp.is-js:not(.is-on) .pubp__paso { opacity: 0; }
.pubp__avance { display: none; }

@media (max-width: 960px) {
	.pubp__cab { grid-template-columns: minmax(0, 1fr); }
	.pubp__cab > p:last-child { grid-column: 1; grid-row: auto; }
	.pubp__pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Celular: gráfica compacta + carrusel; la barra del paso visible se ilumina ── */
@media (max-width: 767px) {
	.pubp__in { padding-top: 48px; padding-bottom: 44px; }
	.pubp__cab { margin-bottom: 20px; }
	.pubp__cab > p:last-child { font-size: 15.5px; }
	.pubp__graf { --alto: 112px; margin-bottom: 12px; padding: 16px 14px 10px; border-radius: 20px; }
	.pubp__graf::before { left: 14px; right: 14px; top: 16px; }
	.pubp__col { width: 44%; }
	.pubp__col i { border-radius: 6px 6px 2px 2px; }
	.pubp__col::after { width: 10px; height: 10px; margin: -5px 0 0 -5px; }
	.pubp__ejes { margin-top: 6px; padding-top: 6px; }
	.pubp__ejes small { font-size: 11.5px; }
	.pubp__meta { left: 14px; top: 14px; font-size: 11px; }
	.pubp__meta b { font-size: 14px; }
	.pubp__pasos { display: flex; gap: 10px; margin: 0 calc(var(--m) * -1); padding: 2px var(--m) 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--m); scrollbar-width: none; }
	.pubp__pasos::-webkit-scrollbar { display: none; }
	.pubp__paso { flex: 0 0 min(80vw, 320px); scroll-snap-align: start; padding: 18px; }
	.pubp__paso:hover { transform: none; }
	.pubp__n { font-size: 24px; }
	.pubp__paso h3 { font-size: 17px; }
	.pubp__paso p { font-size: 14px; }
	.pubp__avance { display: block; height: 3px; margin-top: 12px; overflow: hidden; border-radius: 3px; background: #E4DBD0; }
	.pubp__avance i { display: block; height: 100%; background: var(--accent); transform: scaleX(var(--p, .17)); transform-origin: left; transition: transform .15s linear; }
}

@media (prefers-reduced-motion: reduce) {
	.pubp *, .pubp *::before, .pubp *::after { transition: none !important; }
}
