/* Local fonts (latin subset, no external domains). */
@font-face { font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url("fuentes/lora-600.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 500; font-display: swap; src: url("fuentes/lora-500i.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fuentes/nunito.woff2") format("woff2"); }

:root {
  --crema: #FBF5EA;
  --papel: #FFFDF8;
  --tinta: #22304A;
  --suave: #56607A;
  --oro: #B7832F;
  --oro-hondo: #8E6420;
  --oro-noche: #7A551B;
  --oro-claro: #F3E3C3;
  --linea: #E7D8BC;
  --verde: #1E8C4E;
  --rojo: #A33A2A;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Nunito", "Segoe UI", Roboto, Arial, sans-serif;
  --base: 1.1875rem;
  --radio: 18px;
}
html.letra-grande { --base: 1.375rem; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font: 400 var(--base)/1.65 var(--sans);
}
img, svg, canvas { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
h3 { font-size: 1.25em; margin-top: 1.6em; color: var(--oro-hondo); }
p { margin: 0 0 1em; }
a { color: var(--oro-hondo); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.envoltura { max-width: 46rem; margin: 0 auto; padding-inline: 1.25rem; }
.antetitulo { font-weight: 800; font-size: .8em; letter-spacing: .08em; text-transform: uppercase; color: var(--oro-hondo); margin-bottom: .6em; }

/* large buttons: this audience is older */
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .7; }
.btn-principal, .btn-secundario, .btn-compartir, .btn-audio, .btn-voz {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 3.4rem; padding: .7em 1.4em; border-radius: 999px;
  font-weight: 800; font-size: 1em; text-decoration: none; border: 2px solid transparent;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn-principal { background: var(--tinta); color: #fff; }
.btn-principal:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(34, 48, 74, .7); }
.btn-secundario { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.btn-secundario:hover { background: var(--tinta); color: #fff; }
.btn-compartir { background: var(--tinta); color: #fff; }
.btn-compartir:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(34, 48, 74, .7); }
.btn-compartir svg, .btn-voz svg, .btn-audio svg { width: 1.35em; height: 1.35em; fill: currentColor; flex: none; }

/* bar */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .6rem 1.25rem;
  background: rgba(251, 245, 234, .88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.barra.con-borde { border-bottom-color: var(--linea); }
.marca { display: flex; align-items: center; gap: .5rem; color: var(--tinta); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.marca svg { width: 2.2rem; height: 2.2rem; }
.m-fondo { fill: var(--oro-claro); }
.m-llama { fill: var(--oro); transform-origin: 32px 40px; animation: llama 3.2s ease-in-out infinite; }
@keyframes llama { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.06, .96) rotate(-2deg); } }
.btn-letra { display: flex; align-items: center; gap: .35rem; min-height: 2.8rem; padding: 0 .9rem; border-radius: 999px; background: var(--papel); border: 1.5px solid var(--linea); color: var(--tinta); font-weight: 700; font-size: .9rem; }
.btn-letra .grande { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1; }
.btn-letra[aria-pressed="true"] { background: var(--tinta); color: #fff; border-color: var(--tinta); }

/* hero with an animated sunrise */
.hero { position: relative; overflow: hidden; padding: clamp(2.2rem, 8vw, 6rem) 1.25rem clamp(2rem, 5vw, 3.5rem); isolation: isolate; }
.cielo { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #F6E7CC 0%, #FAEFDD 45%, var(--crema) 100%); }
.sol {
  position: absolute; left: 50%; top: 72%; width: min(110vw, 900px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 214, 140, .95) 0%, rgba(247, 196, 110, .55) 22%, rgba(243, 227, 195, 0) 60%);
  animation: respira 7s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes respira { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .9; } 50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } }
.rayos {
  position: absolute; left: 50%; top: 72%; width: 120vmax; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 236, 200, .55) 0deg 4deg, rgba(255, 236, 200, 0) 4deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .5) 25%, transparent 55%);
  mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .5) 25%, transparent 55%);
  will-change: transform;
}
/* the rays only turn where there is machine to spare: fine pointer (desktop) */
@media (pointer: fine) and (min-width: 700px) {
  .rayos { animation: gira 120s linear infinite; }
}
@keyframes gira { to { transform: translate(-50%, -50%) rotate(360deg); } }
.hero.fuera .rayos, .hero.fuera .sol { animation-play-state: paused; }
#chispas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-contenido { max-width: 44rem; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(1.9em, 7vw, 3.1em); margin-bottom: .45em; }
.hero h1 .palabra { display: inline-block; }
.bajada { font-size: 1.05em; color: var(--suave); max-width: 36rem; margin: 0 auto 1.4em; }
/* starting state of the entrance animation; app.js drops the class when it ends, or if GSAP is missing */
html.anim .hero .antetitulo, html.anim .hero h1, html.anim .bajada, html.anim .buscador, html.anim .ir-temas { opacity: 0; }

.buscador {
  text-align: left; background: var(--papel); border: 1.5px solid var(--linea); border-radius: calc(var(--radio) + 6px);
  padding: .9rem 1rem 1rem; box-shadow: 0 30px 60px -40px rgba(142, 100, 32, .55);
}
.buscador label { display: block; font-weight: 800; font-size: 1.05em; margin: 0 .5rem .3rem; }
.buscador textarea {
  width: 100%; resize: vertical; min-height: 5.4rem; border: 0; background: transparent; color: var(--tinta);
  font: 500 1.05em/1.5 var(--sans); padding: .4rem .5rem; margin-bottom: .5rem;
}
.buscador textarea::placeholder { color: #6B6B6B; }
.buscador textarea:focus { outline: none; }
.buscador:focus-within { border-color: var(--oro-hondo); box-shadow: 0 0 0 4px rgba(183, 131, 47, .35), 0 30px 60px -40px rgba(142, 100, 32, .55); }
.buscador-acciones { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.buscador-acciones .btn-principal { flex: 1 1 14rem; }
.btn-voz { background: var(--oro-claro); color: var(--tinta); }
.btn-voz.escuchando { background: var(--rojo); color: #fff; animation: late 1.2s ease-in-out infinite; }
@keyframes late { 50% { box-shadow: 0 0 0 10px rgba(163, 58, 42, .15); } }
.aviso, .nota-voz { margin: .8rem .3rem 0; font-weight: 700; color: var(--oro-noche); }
.nota-privada { margin: .8rem .3rem 0; font-size: .78em; color: var(--suave); line-height: 1.5; }

/* Back to what they already asked for: the first thing a returning visitor sees */
.retomar { margin: 0 auto 1.6rem; max-width: 34rem; padding: 1.1rem 1.2rem; border-radius: var(--radio); background: var(--oro-claro); text-align: left; }
.retomar p { margin-bottom: .9rem; font-size: 1.05em; }
.retomar-acciones { display: flex; flex-wrap: wrap; gap: .7rem; }
.nota-seguir { margin: .8rem .3rem 0; font-size: .85em; color: var(--suave); }
.dudoso { margin: 1rem .2rem 0; padding-top: .9rem; border-top: 1px dashed var(--linea); }
.dudoso p { font-weight: 800; margin-bottom: .5rem; }
.dudoso .chips { flex-direction: row; flex-wrap: wrap; }
.dudoso .chip { width: auto; }
.ir-temas { display: inline-flex; align-items: center; gap: .35em; min-height: 3rem; margin-top: 1.1rem; font-weight: 700; color: var(--oro-hondo); text-decoration: none; }
.ir-temas:hover { text-decoration: underline; }
.ir-temas svg { width: 1.3em; height: 1.3em; fill: currentColor; }

/* topics */
.temas { padding: 3.5rem 0 2rem; scroll-margin-top: 5rem; }
.temas h2 { text-align: center; margin-bottom: 1.4em; }
.categorias { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.categoria { background: var(--papel); border: 1.5px solid var(--linea); border-radius: var(--radio); padding: 1.1rem 1.1rem .8rem; }
.categoria h3 { margin: 0 0 .6rem; font-size: 1.15em; display: flex; align-items: center; gap: .5rem; }
.categoria h3 svg { width: 1.6rem; height: 1.6rem; fill: var(--oro); flex: none; }
.esqueleto { min-height: 12rem; border-radius: var(--radio); background: linear-gradient(90deg, var(--papel) 0%, #FFF8EC 50%, var(--papel) 100%); background-size: 200% 100%; border: 1.5px solid var(--linea); animation: brilla 1.6s linear infinite; }
@keyframes brilla { to { background-position: -200% 0; } }
.reintentar { grid-column: 1 / -1; text-align: center; }
.chips { display: flex; flex-direction: column; gap: .45rem; }
.chip {
  text-align: left; width: 100%; min-height: 3rem; padding: .55rem .9rem; border-radius: 12px;
  border: 1.5px solid transparent; background: var(--crema); color: var(--tinta); font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.chip::after { content: "\203A" / ""; font-size: 1.4em; line-height: 1; color: var(--oro-hondo); transition: transform .2s; }
.chip:hover { background: var(--oro-claro); transform: translateX(3px); }
.chip:hover::after { transform: translateX(3px); }
.parecidas .chips { flex-direction: row; flex-wrap: wrap; }
.parecidas .chip { width: auto; }

/* the reading */
.lectura { position: relative; overflow: hidden; padding: 3rem 0 3.5rem; background: linear-gradient(180deg, var(--crema), var(--papel) 30%, var(--papel)); border-block: 1px solid var(--linea); scroll-margin-top: 4rem; }
.alba { position: absolute; left: 50%; top: -6rem; width: min(90vw, 44rem); aspect-ratio: 2 / 1; transform: translateX(-50%); pointer-events: none; opacity: .9;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 214, 140, .75) 0%, rgba(247, 196, 110, .35) 35%, rgba(243, 227, 195, 0) 70%); }
.lectura .envoltura { position: relative; }
.lectura h2 { font-size: clamp(1.9rem, 5.5vw, 2.6rem); }
.compartido { display: inline-block; margin-bottom: 1rem; padding: .35em .9em; border-radius: 999px; background: var(--oro-claro); color: var(--oro-noche); font-weight: 800; font-size: .85em; }
.versiculos { margin: 1.4rem 0 1.6rem; display: grid; gap: 1.1rem; }
.versiculo { margin: 0; padding: 1.3rem 1.4rem; background: var(--oro-claro); border-radius: var(--radio); position: relative; overflow: hidden; }
.versiculo p { font: italic 500 1.2em/1.55 var(--serif); margin: 0 0 .5em; }
.versiculo cite { font-style: normal; font-weight: 800; font-size: .85em; color: var(--oro-hondo); }
.versiculo::before { content: "\201C"; position: absolute; right: .6rem; top: -1.4rem; font: 600 7rem/1 var(--serif); color: rgba(183, 131, 47, .18); }
.reflexion { font-size: 1.05em; }
.oracion { font: 500 1.12em/1.7 var(--serif); padding-left: 1rem; background: linear-gradient(var(--oro), var(--oro)) left top / 3px 100% no-repeat; }
.cuenta-tuyo { margin-top: 1.6rem; padding: 1.1rem 1.2rem; border-radius: var(--radio); background: var(--oro-claro); }
.cuenta-tuyo p { margin-bottom: .8rem; }

/* The quiet help line. Shown only on the two despair topics. Deliberately plain: a
   person who is already low does not need a red alarm box, they need a number. */
.linea-ayuda {
  margin: 1.4rem 0 0; padding: .9rem 1.1rem; border-radius: var(--radio);
  background: var(--crema); border: 1.5px solid var(--linea);
  font-size: .95em; color: var(--suave); line-height: 1.6;
}
.linea-ayuda a { color: var(--tinta); font-weight: 800; white-space: nowrap; }

.audio-bloque { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.btn-audio { background: var(--oro-hondo); color: #fff; min-width: 11rem; }
.btn-audio:hover { background: var(--oro-noche); }
.btn-audio.cargando { opacity: .85; }
.btn-audio .i-pausa, .btn-audio[aria-pressed="true"] .i-play { display: none; }
.btn-audio[aria-pressed="true"] .i-pausa { display: block; }
.audio-progreso { flex: 1 1 8rem; height: .5rem; background: var(--oro-claro); border-radius: 999px; overflow: hidden; }
#audio-barra { height: 100%; width: 0; background: var(--oro-hondo); transition: width .3s linear; }

.lectura-acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.parecidas { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px dashed var(--linea); }
.parecidas p { font-weight: 700; }

/* crisis */
.crisis { padding: 2.5rem 0; background: #FFF1EC; border-block: 2px solid var(--rojo); scroll-margin-top: 4rem; }
.crisis h2 { color: var(--rojo); }
.lineas { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.lineas li { min-width: 0; }
.lineas a { display: flex; align-items: center; gap: .8rem; min-height: 3.6rem; padding: .8rem 1rem; background: #fff; border-radius: 14px; border: 2px solid #F1C7BB; text-decoration: none; color: var(--tinta); font-size: 1.02em; }
.lineas a:hover { border-color: var(--rojo); }
.lineas .tel-icono { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--rojo); display: grid; place-items: center; }
.lineas .tel-icono svg { width: 1.4rem; height: 1.4rem; fill: #fff; }
.lineas .tel-texto { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.3; }
.lineas .tel-texto small { font-size: .82em; color: var(--suave); }
.lineas strong { color: var(--rojo); font-size: 1.35em; white-space: nowrap; }
@media (max-width: 480px) {
  /* On a narrow screen the number drops to its own line, aligned with the text, so the name is not squeezed. */
  .lineas a { flex-wrap: wrap; row-gap: .2rem; }
  .lineas .tel-texto { flex: 1 1 0; min-width: 0; }
  .lineas strong { flex: 1 0 100%; padding-left: 3.4rem; }
}
.crisis-nota { font-size: .9em; color: var(--suave); }

/* today */
.hoy { padding: 2rem 0 3rem; }
.hoy-caja { background: var(--tinta); color: #F7EEDC; border-radius: calc(var(--radio) + 6px); padding: clamp(1.6rem, 5vw, 2.6rem); position: relative; overflow: hidden; }
.hoy-caja::after { content: ""; position: absolute; right: -6rem; top: -6rem; width: 18rem; height: 18rem; border-radius: 50%; background: radial-gradient(circle, rgba(247, 196, 110, .45), transparent 65%); }
.hoy .antetitulo { color: #F0C77E; }
.hoy blockquote { margin: 0 0 1rem; font: italic 500 1.25em/1.55 var(--serif); }
.hoy blockquote cite { display: block; margin-top: .4em; font: normal 800 .7em var(--sans); color: #F0C77E; }
.hoy .btn-secundario { color: #F7EEDC; border-color: #F7EEDC; position: relative; z-index: 1; }
.hoy .btn-secundario:hover { background: #F7EEDC; color: var(--tinta); }

/* sign up */
.recibir { padding: 1rem 0 4rem; }
.recibir-caja { background: var(--papel); border: 1.5px solid var(--linea); border-radius: calc(var(--radio) + 6px); padding: clamp(1.4rem, 5vw, 2.4rem); }
#form-contacto { display: grid; gap: .8rem; }
#form-contacto label { font-weight: 700; }
#form-contacto input[type="email"] { font: inherit; min-height: 3.4rem; padding: .6rem 1rem; border-radius: 12px; border: 1.5px solid var(--linea); background: #fff; color: var(--tinta); width: 100%; }
#form-contacto input:focus { border-color: var(--oro-hondo); outline: none; box-shadow: 0 0 0 4px rgba(183, 131, 47, .35); }
#form-contacto input[aria-invalid="true"] { border-color: var(--rojo); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400 !important; font-size: .85em; color: var(--suave); }
.check input { width: 1.5rem; height: 1.5rem; margin-top: .15rem; accent-color: var(--tinta); flex: none; }
.estado { margin: 0; font-weight: 700; }
.estado.ok { color: var(--verde); }
.estado.mal { color: var(--rojo); }
.exito { display: flex; align-items: center; gap: 1rem; padding: .5rem 0; }
.exito svg { flex: none; width: 3.6rem; height: 3.6rem; }
.exito circle { fill: var(--verde); }
.exito path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.exito p { margin: 0; font-size: 1.05em; }

.pie { padding: 2.5rem 0 3rem; background: #F3EADA; font-size: .85em; color: var(--suave); }

/* long-form pages: privacy, 404 */
.texto { padding: 3rem 0 4rem; }
.texto h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.texto h2 { font-size: 1.35rem; margin-top: 2em; }
.texto ul { padding-left: 1.2rem; }
.texto li { margin-bottom: .5em; }
.no-existe { padding: 4rem 0; text-align: center; }
.no-existe h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }

@media (max-width: 600px) {
  .barra { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(251, 245, 234, .96); }
  .buscador-acciones .btn-voz { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .lectura-acciones > * { flex: 1 1 100%; }
  .audio-bloque .btn-audio { flex: 1 1 100%; }
  .cuenta-tuyo .btn-principal { width: 100%; }
}
@media (max-width: 420px) {
  .hero { padding-top: 1.4rem; padding-bottom: 1.6rem; }
  .hero h1 { font-size: 1.85em; margin-bottom: .35em; }
  .bajada { font-size: .95em; margin-bottom: 1em; }
  .buscador { padding: .7rem .75rem .8rem; }
  .buscador textarea { min-height: 4.4rem; }
  .ir-temas { margin-top: .7rem; }
}
/* Short phones (360x640): the search button has to be visible without scrolling. */
@media (max-width: 420px) and (max-height: 700px) {
  .hero { padding-top: 1rem; padding-bottom: 1.2rem; }
  .hero .antetitulo { margin-bottom: .3em; }
  .hero h1 { font-size: 1.7em; margin-bottom: .3em; }
  .bajada { font-size: .9em; margin-bottom: .6em; }
  .buscador label { margin-bottom: .1rem; }
  .buscador textarea { min-height: 3.3rem; }
  .buscador-acciones { gap: .5rem; }
}
@media (max-width: 360px) {
  .btn-letra-texto { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.audio-bloque[hidden] { display: none; }
