/* SocialBlink — página de Contacto.
   Idea: escribirle a Jesús es una conversación. El personaje «escribe» (los *** de su bocadillo),
   pregunta en burbujas y al final el visitante tiene su mensaje listo para WhatsApp, correo o copiar. */

/* ---------- Cabecera con la escena del bocadillo ---------- */
.ct-hero { padding-block: clamp(2rem, 6vh, 4rem) clamp(3rem, 7vw, 6rem); overflow-x: clip; }
.ct-hero__grid { display: grid; gap: 2rem; align-items: center; }
.ct-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3.5rem, .5rem + 7.4vw, 8.5rem); line-height: .86; letter-spacing: -.055em;
}
.ct-title__word { white-space: nowrap; }
.ct-hero .lead { margin-top: 1.5rem; }
.ct-hero__art { margin: 0 -2vw 0 0; }
.scene { display: block; width: 100%; height: auto; overflow: visible; }
.ct-ast, .ct-pupil, .ct-wink, .ct-hand, .ct-spark, .ct-logo__pupil, .ct-logo__wink { transform-box: fill-box; transform-origin: 50% 50%; }
.ct-spark { transform-origin: 0% 100%; }
.ct-hand { transform-origin: 50% 100%; }
#ct-pupil-r { scale: 1 0; }   /* el otro ojo: guiñado; se abre de vez en cuando */
@media (min-width: 960px) {
  .ct-hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: var(--gutter); }
}
/* El vapor del café sube y se desvanece */
.ct-steam path { stroke-dasharray: .32 1; stroke-dashoffset: .32; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ct-steam path { animation: ct-steam 3.4s linear infinite; }
  .ct-steam path:nth-child(2) { animation-delay: 1.1s; }
  .ct-steam path:nth-child(3) { animation-delay: 2.2s; }
  .ct-spark { animation: ct-spark 3.2s ease-in-out infinite; }
  #ct-spark-2 { animation-delay: .25s; }
}
@keyframes ct-steam { 0% { stroke-dashoffset: .32; opacity: 0; } 25% { opacity: .9; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes ct-spark { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.25) rotate(-8deg); } }

/* ---------- Conversación ---------- */
.ct-talk { padding-block: var(--section-space); background: var(--cream-deep); scroll-margin-top: var(--header-h); }
.ct-talk__grid { display: grid; gap: 2.5rem; }
.ct-talk__lead { margin-top: 1.25rem; max-width: 30ch; font-size: var(--t-lead); line-height: 1.4; }
.ct-progress { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.ct-progress li {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .85rem .3rem .4rem; border: 2px solid var(--ink); border-radius: 999px;
  font-size: .875rem; font-weight: 600; opacity: .4;
  transition: opacity 300ms, background-color 300ms;
}
.ct-progress li::before { content: ""; width: 1rem; height: 1rem; border: 2px solid currentColor; border-radius: 50%; transition: background-color 300ms; }
.ct-progress li.is-now { opacity: 1; background: var(--orange); }
.ct-progress li.is-done { opacity: 1; }
.ct-progress li.is-done::before { background: var(--ink); }
.ct-nojs { margin-top: 1.5rem; font-weight: 600; }
.js .ct-nojs { display: none; }
@media (min-width: 960px) {
  .ct-talk__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--gutter); align-items: start; }
  .ct-talk__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.chat { display: none; overflow: hidden; background: var(--white); border: 2px solid var(--ink); border-radius: 1.75rem; box-shadow: 0 30px 60px -32px rgba(18, 21, 29, .4); }
.js .chat { display: block; }
.chat__head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.1rem; background: var(--cream); border-bottom: 2px solid var(--ink); }
.chat__avatar { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--orange); color: var(--ink); }
.chat__avatar svg { width: 62%; height: 62%; }
.chat__who { display: grid; min-width: 0; line-height: 1.25; }
.chat__who b { font-weight: 600; }
.chat__who small { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); }
.chat__who small::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--orange); }
.chat__restart { margin-left: auto; min-height: 2.5rem; padding: 0 .9rem; border: 2px solid var(--ink); border-radius: 999px; background: transparent; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.chat__log {
  display: grid; gap: .85rem; align-content: start; min-height: 27rem; padding: 1.5rem 1.15rem 1.75rem;
  background-image: radial-gradient(rgba(18, 21, 29, .07) 1px, transparent 1.3px); background-size: 18px 18px;
}
.turn { display: grid; gap: .55rem; justify-items: start; }
.js .turn:not(.is-shown) { display: none; }

.bubble {
  max-width: min(88%, 30rem); padding: .75rem 1.05rem;
  border-radius: 1.25rem 1.25rem 1.25rem .35rem; background: var(--cream-deep);
  line-height: 1.4; transform-origin: 0 100%;
  animation: ct-bubble 450ms var(--ease-spring) both;
}
.bubble--note { background: transparent; border: 1.5px dashed rgba(18, 21, 29, .3); font-size: .9rem; }
.bubble--out {
  justify-self: end; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem;
  border-radius: 1.25rem 1.25rem .35rem 1.25rem; background: var(--ink); color: var(--cream); transform-origin: 100% 100%;
}
.bubble--out span { overflow-wrap: anywhere; }
.bubble__edit { padding: 0; border: 0; background: none; color: inherit; font-size: .75rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; opacity: .7; cursor: pointer; }
.bubble__edit:hover { opacity: 1; }
.turn.is-active .bubble--out { display: none; }
.turn:not(.is-active) .reply, .turn:not(.is-active) [data-brief-note] { display: none; }
@keyframes ct-bubble { from { opacity: 0; transform: translateY(8px) scale(.9); } }

.typing { display: inline-flex; gap: .3rem; padding: .55rem .95rem .3rem; border-radius: 1.25rem 1.25rem 1.25rem .35rem; background: var(--cream-deep); animation: ct-bubble 300ms var(--ease-out) both; }
.typing span { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--orange); animation: ct-dot 900ms ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: .12s; }
.typing span:nth-child(3) { animation-delay: .24s; }
@keyframes ct-dot { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-5px) rotate(40deg); } }

.reply { justify-self: stretch; display: flex; align-items: center; gap: .5rem; margin: .25rem 0 0; padding: 0; border: 0; animation: ct-bubble 450ms var(--ease-out) 80ms both; }
.reply__input { flex: 1; min-width: 0; min-height: 3rem; padding: .7rem 1.1rem; background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; font: inherit; }
textarea.reply__input { min-height: 6.5rem; border-radius: 1.1rem; resize: vertical; }
.reply__input:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.reply__send { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--orange); color: var(--ink); cursor: pointer; transition: transform 250ms var(--ease-spring); }
.reply__send svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.reply__send:hover { transform: translateX(3px); }
.reply--area { display: grid; }
.reply__row { display: flex; justify-content: flex-end; gap: .5rem; }
.reply--chips { flex-wrap: wrap; justify-content: flex-end; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font-weight: 600; cursor: pointer; transition: background-color 200ms, transform 300ms var(--ease-spring); }
.chip input:checked + span { background: var(--orange); }
.chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 3px; }
.chip span:active { transform: scale(.95); }
.chip--soft span { border-style: dashed; }
.reply__done, .reply__skip { min-height: 2.75rem; padding: 0 1.2rem; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; cursor: pointer; }
.reply__done { background: var(--ink); color: var(--cream); }
.reply__skip { background: transparent; color: var(--ink); }
.reply.is-nudge { animation: ct-nudge 420ms var(--ease-out); }
@keyframes ct-nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* La carta final */
.letter { justify-self: stretch; padding: 1rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 1.4rem; animation: ct-bubble 500ms var(--ease-spring) 100ms both; }
.letter__text { display: block; width: 100%; padding: .9rem 1rem; background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 1rem; font: inherit; line-height: 1.5; resize: vertical; }
.letter__text:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.letter__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.letter__msg { min-height: 1.4em; margin-top: .5rem; font-size: .9rem; font-weight: 600; color: var(--orange-ink); }
.letter__pending { font-size: .875rem; }

/* ---------- Canales directos ---------- */
.ct-channels { padding-block: var(--section-space); scroll-margin-top: var(--header-h); }
.ct-cards { display: grid; gap: 1rem; }
@media (min-width: 860px) { .ct-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ct-card { min-height: 17rem; } }
.ct-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-content: start; gap: .5rem; min-height: 12.5rem; padding: 1.5rem;
  border: 2px solid var(--ink); border-radius: 1.5rem;
  transition: transform 450ms var(--ease-spring), box-shadow 300ms;
}
.ct-card::before {   /* un lente gigante en la esquina */
  content: ""; position: absolute; z-index: -1; right: -3.5rem; bottom: -3.5rem;
  width: 11rem; aspect-ratio: 1; border: 1.3rem solid currentColor; border-radius: 50%; opacity: .12;
  transition: transform 600ms var(--ease-spring);
}
.ct-card--wa { background: var(--orange); color: var(--ink); }
.ct-card--mail { background: var(--ink); color: var(--cream); }
.ct-card--ig { background: var(--white); color: var(--ink); }
.ct-card__icon { width: 3.25rem; height: 3.25rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ct-card--wa .ct-card__icon circle, .ct-card__dot { fill: currentColor; stroke: none; }
.ct-card__name { margin-top: auto; padding-top: 2rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 1.4rem + 1.8vw, 2.9rem); line-height: 1; letter-spacing: -.04em; }
.ct-card__value { font-weight: 600; overflow-wrap: anywhere; }
.ct-card__value a { text-underline-offset: .2em; }
.ct-card__value.is-pending { color: inherit; opacity: .7; }
.ct-card__row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.ct-card__go { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; }
.ct-card__go svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 300ms var(--ease-out); }
.ct-card__go:hover svg { transform: translateX(4px); }
.ct-card__copy { min-height: 2.25rem; padding: 0 .9rem; border: 2px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; }
@media (hover: hover) {
  .ct-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 24px 40px -24px rgba(18, 21, 29, .5); }
  .ct-card:hover::before { transform: scale(1.25) rotate(20deg); }
}
.js .ct-card { opacity: 0; transform: translateY(2rem); transition: opacity 600ms var(--ease-out) calc(var(--i) * 90ms), transform 800ms var(--ease-spring) calc(var(--i) * 90ms), box-shadow 300ms; }
.js .ct-cards.is-in .ct-card { opacity: 1; transform: none; }
@media (hover: hover) { .js .ct-cards.is-in .ct-card:hover { transform: translateY(-6px) rotate(-1deg); transition-delay: 0s; } }

@media (prefers-reduced-motion: reduce) {
  .js .ct-card { opacity: 1; transform: none; }
}
