/* ct-hero — hero de /contacto/. Fondo propio «sobremesa»: tinta cálida #201A17 con una constelación de burbujas de chat
   y una señal naranja que late desde el celular (distinto a aurora, señal, mira, malla y papel de las otras páginas).
   Escena: chat con Marko dentro de un celular. Todo el movimiento es transform/opacity. */

/* La cabecera es sticky (sólida) o fija (transparente): en ambos casos el padding de 76px de m360.css sobra aquí. */
body:not(.home) main.ct-pag { padding-top: 0; }

.cth { --tel: clamp(250px, 21vw, 300px); position: relative; isolation: isolate; overflow: hidden; background: #201A17; color: #fff; }
.cth__in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 72px); align-items: center; max-width: 1320px; min-height: min(92svh, 860px); margin: 0 auto; padding: clamp(48px, 6vw, 88px) var(--m) clamp(56px, 6vw, 96px); }
/* Cabecera transparente encima: el contenido baja lo que ella ocupa (avisos + barra) */
body:has(.mh--home) .cth__in { padding-top: calc(112px + clamp(28px, 4vw, 64px)); }

/* ── Fondo ── */
.cth__fondo { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cth__fondo > i { position: absolute; display: block; }
/* Burbujas de chat en retícula, más visibles alrededor de la escena */
.cth__burbujas { inset: 0; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23FBF8F4' stroke-opacity='.14' stroke-width='1.2' stroke-linejoin='round'%3E%3Cpath d='M10 12h22a6 6 0 0 1 6 6v8a6 6 0 0 1-6 6H18l-6 5v-5.4A6 6 0 0 1 4 26v-8a6 6 0 0 1 6-6z'/%3E%3Cpath d='M56 54h22a6 6 0 0 1 6 6v6a6 6 0 0 1-6 6h-2v5l-6-5H56a6 6 0 0 1-6-6v-6a6 6 0 0 1 6-6z'/%3E%3C/g%3E%3Ccircle cx='66' cy='22' r='1.4' fill='%23D2FB8C' fill-opacity='.35'/%3E%3Ccircle cx='22' cy='66' r='1.4' fill='%23FF5B23' fill-opacity='.45'/%3E%3C/svg%3E"); background-size: 88px 88px; -webkit-mask-image: radial-gradient(ellipse 55% 70% at 74% 52%, #000 15%, transparent 75%); mask-image: radial-gradient(ellipse 55% 70% at 74% 52%, #000 15%, transparent 75%); animation: cth-deriva 60s linear infinite; }
@keyframes cth-deriva { to { background-position: 88px -88px; } }
/* Brasa naranja detrás del celular: se apaga hacia la tinta, nunca hacia blanco */
.cth__luz { left: 52%; top: 50%; width: min(980px, 90vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 91, 35, .42), rgba(255, 91, 35, .14) 45%, rgba(32, 26, 23, 0) 72%); transform: translate(-20%, -50%); }
.cth__velo { inset: 0; background: linear-gradient(180deg, rgba(18, 16, 17, .7) 0, rgba(18, 16, 17, 0) 220px), linear-gradient(0deg, rgba(18, 16, 17, .55) 0, rgba(18, 16, 17, 0) 160px); }
.cth::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, #FF5B23 30%, #D2FB8C 70%, transparent); }

/* ── Texto ── */
.cth__txt { position: relative; z-index: 2; min-width: 0; }
.cth__txt > * { animation: cth-sube .9s var(--ease) both; }
.cth__txt > :nth-child(2) { animation-delay: .08s; }
.cth__txt > :nth-child(3) { animation-delay: .16s; }
.cth__txt > :nth-child(4) { animation-delay: .24s; }
.cth__txt > :nth-child(5) { animation-delay: .32s; }
@keyframes cth-sube { from { opacity: 0; transform: translate3d(0, 18px, 0); } }

/* Píldora de estado en vivo (la llena ct-hero.js) */
.cth__estado { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 0 0 24px; padding: 8px 16px 8px 12px; border-radius: 999px; background: rgba(251, 248, 244, .06); box-shadow: inset 0 0 0 1px rgba(251, 248, 244, .12); color: rgba(255, 255, 255, .88); font-size: 14px; font-weight: 500; line-height: 1.3; }
.cth__punto { position: relative; flex: none; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.ct--abierto .cth__punto { background: var(--lima); box-shadow: 0 0 12px rgba(210, 251, 140, .8); }
.ct--abierto .cth__punto::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(210, 251, 140, .5); animation: cth-pulso 2s ease-out infinite; }
.ct--cerrado .cth__punto { background: #FF5B23; }
@keyframes cth-pulso { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.8); } }

.cth h1 { max-width: 12ch; font-family: 'Marko Display', var(--f) !important; font-weight: 800 !important; font-size: clamp(44px, 6vw, 92px); line-height: 1 !important; letter-spacing: .004em !important; word-spacing: -.06em; text-transform: lowercase; color: #fff; text-wrap: balance; }
.cth__lead { max-width: 40ch; margin-top: 22px; color: rgba(255, 255, 255, .76); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; }

.cth__acc { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cth__cta { gap: 10px; min-height: 58px; box-shadow: 0 16px 36px -14px rgba(255, 91, 35, .85); }
.cth__cta:hover { box-shadow: 0 20px 40px -14px rgba(255, 91, 35, .95); }
.cth__sec { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 0 26px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(251, 248, 244, .35); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .3s, box-shadow .3s, color .3s, transform .3s var(--ease); }
.cth__sec svg { transition: transform .3s var(--ease); }
.cth__sec:hover { background: #FBF8F4; box-shadow: inset 0 0 0 1.5px #FBF8F4; color: #121011; transform: translateY(-2px); }
.cth__sec:hover svg { transform: translateY(3px); }
.cth a:focus-visible { outline: 2px solid var(--lima); outline-offset: 4px; }

.cth__datos { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 12px clamp(20px, 3vw, 44px); margin: 44px 0 0; padding: 24px 0 0; border-top: 1px solid rgba(251, 248, 244, .12); list-style: none; }
.cth__datos li { display: grid; gap: 4px; min-width: 0; }
.cth__datos span { color: rgba(255, 255, 255, .55); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.cth__datos a, .cth__datos b { color: #fff; font-size: 15.5px; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.cth__datos a { justify-self: start; background: linear-gradient(var(--lima), var(--lima)) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease), color .3s; }
.cth__datos a:hover { color: var(--lima); background-size: 100% 1.5px; }

/* ── Escena ── */
.cth__escena { position: relative; height: clamp(560px, 46vw, 660px); min-width: 0; }
.cth__ondas { position: absolute; left: 60%; top: 50%; width: 0; height: 0; }
.cth__ondas i { position: absolute; left: -260px; top: -260px; width: 520px; height: 520px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 140, 100, .45); opacity: 0; transform: scale(.3); animation: cth-onda 6s cubic-bezier(.2, .6, .35, 1) infinite; will-change: transform, opacity; }
.cth__ondas i:nth-child(2) { animation-delay: 2s; }
.cth__ondas i:nth-child(3) { animation-delay: 4s; }
@keyframes cth-onda { 0% { opacity: 0; transform: scale(.3); } 15% { opacity: .8; } 100% { opacity: 0; transform: scale(1.1); } }

.cth__tel { position: absolute; left: 60%; top: 50%; z-index: 2; width: var(--tel); aspect-ratio: 9 / 18.5; padding: 9px; border-radius: calc(var(--tel) * .16); background: linear-gradient(160deg, #3d3532, #121011 40%, #2c2522); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 50px 90px -30px #000, 0 0 0 1px rgba(0, 0, 0, .6); transform: translate(-50%, -50%) rotate(3deg); animation: cth-tel 1.1s var(--ease) .2s both; }
@keyframes cth-tel { from { opacity: 0; transform: translate(-50%, -44%) rotate(8deg) scale(.95); } }
.cth__pantalla { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: calc(var(--tel) * .13); background: #F4F1EC; color: #121011; font-size: 12.5px; line-height: 1.38; }

.cth__cab { display: flex; align-items: center; gap: 8px; padding: 30px 12px 10px 8px; background: #121011; color: #fff; }
.cth__cab img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px var(--lima); }
.cth__atras { flex: none; opacity: .8; }
.cth__quien { flex: 1; display: grid; line-height: 1.2; min-width: 0; }
.cth__quien b { font-size: 13.5px; font-weight: 600; }
.cth__quien small { color: var(--lima); font-size: 11px; transition: color .3s; }
.cth__llamar { flex: none; opacity: .8; }

/* Hilo: el fondo lleva un patrón tenue de puntos como papel de chat */
.cth__hilo { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; padding: 12px 10px; overflow: hidden; background: radial-gradient(rgba(18, 16, 17, .07) 1px, transparent 1.3px) 0 0 / 14px 14px; }
.cth__dia { align-self: center; margin-bottom: auto; padding: 3px 10px; border-radius: 8px; background: rgba(18, 16, 17, .06); color: rgba(18, 16, 17, .6); font-size: 10.5px; font-weight: 600; }
.cth__m { position: relative; max-width: 84%; margin: 0; padding: 7px 10px 6px; border-radius: 14px; box-shadow: 0 1px 1.5px rgba(18, 16, 17, .12); animation: cth-pop .45s cubic-bezier(.2, 1.25, .4, 1) both; transform-origin: 0 100%; }
.cth__m small { display: inline-flex; align-items: center; gap: 3px; float: right; margin: 6px 0 -3px 10px; color: rgba(18, 16, 17, .5); font-size: 9.5px; }
.cth__m--el { align-self: flex-start; border-bottom-left-radius: 4px; background: #fff; }
.cth__m--yo { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--lima); transform-origin: 100% 100%; }
@keyframes cth-pop { from { opacity: 0; transform: translateY(8px) scale(.9); } }
/* Doble palomita: gris al enviar, naranja al leer */
.cth__vistos { position: relative; width: 14px; height: 8px; }
.cth__vistos::before, .cth__vistos::after { content: ""; position: absolute; top: 0; width: 4px; height: 7px; border: solid rgba(18, 16, 17, .45); border-width: 0 1.6px 1.6px 0; transform: rotate(40deg); transition: border-color .4s; }
.cth__vistos::before { left: 2px; }
.cth__vistos::after { left: 6px; }
.cth__vistos.is-leido::before, .cth__vistos.is-leido::after { border-color: #E64A1A; }
/* «escribiendo…» */
.cth__m--puntos { display: inline-flex; gap: 4px; padding: 10px 12px; }
.cth__m--puntos i { width: 6px; height: 6px; border-radius: 50%; background: rgba(18, 16, 17, .4); animation: cth-salta 1.1s ease-in-out infinite; }
.cth__m--puntos i:nth-child(2) { animation-delay: .15s; }
.cth__m--puntos i:nth-child(3) { animation-delay: .3s; }
@keyframes cth-salta { 30% { transform: translateY(-4px); background: rgba(18, 16, 17, .7); } }

.cth__redactar { display: flex; align-items: center; gap: 6px; padding: 8px 8px 14px; background: #F4F1EC; }
.cth__campo { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; height: 34px; padding: 0 12px; border-radius: 999px; background: #fff; color: #121011; font-size: 12px; white-space: nowrap; overflow: hidden; }
.cth__campo > span { overflow: hidden; } /* al escribir, JS lo desplaza para que se vea el final */
.cth__campo em { position: absolute; left: 12px; color: rgba(18, 16, 17, .4); font-style: normal; }
.cth__campo.is-escribe em { display: none; }
.cth__cursor { flex: none; width: 1.5px; height: 14px; margin-left: 1px; background: #FF5B23; opacity: 0; }
.cth__campo.is-escribe .cth__cursor { opacity: 1; animation: cth-cursor 1s steps(1) infinite; }
@keyframes cth-cursor { 50% { opacity: 0; } }
.cth__enviar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #FF5B23; color: #fff; transition: transform .25s var(--ease); }
.cth__enviar.is-envia { transform: scale(.85) rotate(-12deg); }

/* Fichas flotantes */
.cth__chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px; background: #FBF8F4; color: #121011; box-shadow: 0 24px 44px -18px rgba(0, 0, 0, .7); font-size: 13.5px; font-weight: 600; animation: cth-flota 7s ease-in-out infinite alternate; }
.cth__chip--a { right: -2%; top: 24%; }
.cth__chip--a i { width: 8px; height: 8px; border-radius: 50%; background: #FF5B23; box-shadow: 0 0 0 4px rgba(255, 91, 35, .18); }
.cth__chip--b { left: 2%; top: 22%; display: grid; gap: 1px; padding: 12px 16px; background: var(--lima); animation-delay: -3s; }
.cth__chip--b small { color: rgba(18, 16, 17, .72); font-size: 12px; font-weight: 500; }
@keyframes cth-flota { to { transform: translateY(-10px); } }

/* Marko saluda junto al celular */
.cth__marko { position: absolute; left: -6%; bottom: 2%; z-index: 4; width: clamp(160px, 13.5vw, 205px); height: auto; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .5)); transform-origin: 50% 100%; animation: cth-marko 1s var(--ease) .5s both, cth-saluda 5s ease-in-out 1.6s infinite; }
@keyframes cth-marko { from { opacity: 0; transform: translateY(30px) rotate(-8deg); } }
@keyframes cth-saluda { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(3deg) translateY(-6px); } }

/* Fuera de pantalla o con el cursor encima: quieto */
.cth.is-pausado :is(.cth__escena, .cth__fondo) *, .cth.is-pausado :is(.cth__escena, .cth__fondo) *::before, .cth.is-pausado :is(.cth__escena, .cth__fondo) *::after { animation-play-state: paused !important; }

/* ── Laptop chica / tablet ── */
@media (max-width: 1100px) {
	.cth__datos { grid-template-columns: repeat(2, minmax(0, max-content)); }
	.cth__datos li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
	.cth__in { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 8px; }
	.cth h1 { max-width: 14ch; }
	.cth__escena { height: 520px; max-width: 560px; width: 100%; margin: 0 auto; }
	.cth__luz { left: 50%; top: 72%; transform: translate(-50%, -50%); }
	.cth__burbujas { -webkit-mask-image: radial-gradient(ellipse 80% 45% at 50% 75%, #000 15%, transparent 75%); mask-image: radial-gradient(ellipse 80% 45% at 50% 75%, #000 15%, transparent 75%); }
}
/* ── Móvil: escena compacta (celular más chico, Marko a la izquierda, una sola ficha) ── */
@media (max-width: 600px) {
	.cth { --tel: 212px; }
	.cth__in { padding-bottom: 28px; }
	.cth__estado { margin-bottom: 18px; font-size: 13px; }
	.cth__lead { margin-top: 16px; }
	.cth__acc { margin-top: 26px; }
	.cth__acc > * { flex: 1 1 100%; min-height: 54px; }
	.cth__datos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 28px; padding-top: 18px; gap: 12px 16px; }
	.cth__datos a, .cth__datos b { font-size: 14.5px; }
	.cth__escena { height: 420px; margin-top: 12px; }
	.cth__tel { left: 60%; }
	.cth__ondas { left: 60%; }
	.cth__ondas i { left: -190px; top: -190px; width: 380px; height: 380px; }
	.cth__pantalla { font-size: 11px; }
	.cth__cab { padding-top: 24px; }
	.cth__marko { left: -4%; width: 138px; bottom: 0; }
	.cth__chip--a { display: none; }
	.cth__chip--b { left: 0; top: 10%; padding: 9px 12px; font-size: 12.5px; }
	.cth__datos { display: none; } /* en móvil los datos están justo abajo, en «Canales» */
}

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