/* Fundación Sophia Behrens · Inicio
   Garabatos, íconos de línea, fotos de la presentación institucional y
   apariciones al hacer scroll (agregado el 2026-10-13).
   Todo lo que se mueve depende de .anima, así que quien pide menos
   movimiento lo ve ya resuelto. */

main { overflow-x: clip; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Garabato: un SVG en trazo; color = currentColor, grosor = --grosor */
.garabato {
  display: block;
  overflow: visible;
  fill: none;
  stroke-width: var(--grosor, 5);
  pointer-events: none;
}

/* ---------- Apariciones al hacer scroll ----------
   main.js pone data-aparece en antetítulos, títulos, tarjetas…
   y alterna .is-visto: aparece al entrar y se desvanece al salir. */
.anima [data-aparece] {
  opacity: 0;
  transition:
    opacity .7s ease,
    transform .9s cubic-bezier(.22, .8, .24, 1),
    filter .8s ease,
    clip-path 1.1s cubic-bezier(.65, 0, .35, 1);
}
.anima [data-aparece].is-visto {
  opacity: 1;
  transform: none;
  filter: none;
  transition-delay: var(--retraso, 0ms);
}
.anima [data-aparece="sube"] { transform: translateY(42px); }
.anima [data-aparece="izq"] { transform: translateX(-70px); }
.anima [data-aparece="der"] { transform: translateX(70px); }
.anima [data-aparece="desenfoque"] { filter: blur(12px); transform: scale(.96); }
.anima [data-aparece="pop"] {
  transform: scale(.3) rotate(-25deg);
  transition-timing-function: ease, cubic-bezier(.34, 1.56, .64, 1);
}
.anima [data-aparece="barrido"] { opacity: 1; clip-path: inset(0 100% 0 0); }
.anima [data-aparece="barrido"].is-visto { clip-path: inset(0 0 0 0); }

/* Antetítulo: entra desde la izquierda con las letras juntándose */
.anima .antetitulo[data-aparece] {
  letter-spacing: .5em;
  transform: translateX(-40px);
  transition:
    opacity .6s ease,
    transform .8s cubic-bezier(.22, .8, .24, 1),
    letter-spacing 1s cubic-bezier(.22, .8, .24, 1);
}
.anima .antetitulo[data-aparece].is-visto { letter-spacing: .16em; transform: none; }

/* Trazo que se dibuja: cada línea del símbolo lleva pathLength="1" */
.anima .garabato[data-trazo] {
  stroke-dasharray: 1 1.02;
  stroke-dashoffset: 1.01;
  opacity: 0;
  transition:
    stroke-dashoffset 1.5s cubic-bezier(.65, 0, .35, 1) var(--retraso, 0ms),
    opacity .2s linear var(--retraso, 0ms);
}
.anima .garabato[data-trazo].is-visto { stroke-dashoffset: 0; opacity: 1; }

/* ---------- 02 Nuestra historia ---------- */
.historia__linea { position: relative; width: fit-content; }
.historia__chispas {
  position: absolute;
  left: 100%;
  top: -.06em;
  width: .48em;
  height: .48em;
  margin-left: .1em;
  color: var(--dorado);
}
.historia__firma-trazo {
  position: absolute;
  right: -3%;
  bottom: -.3em;
  width: 52%;
  height: .26em;
  color: var(--dorado);
  --grosor: 4;
}

/* ---------- 02a Antes de la fundación ---------- */
.antes {
  position: relative;
  background: var(--crema);
  padding: clamp(24px, 4vw, 64px) 0 clamp(72px, 9vw, 130px);
  overflow: hidden;
}
.antes__mancha { position: absolute; pointer-events: none; }
.antes__mancha--1 {
  left: -7vw;
  top: 36%;
  width: 30vw;
  height: 30vw;
  color: var(--rosa);
  transform: rotate(20deg);
}
.antes__mancha--2 {
  right: -8vw;
  bottom: -7vw;
  width: 26vw;
  height: 26vw;
  color: #dfe7f5;
  transform: rotate(-30deg);
}
.antes__cabecera {
  position: relative;
  max-width: 1280px;
  margin: 0 auto clamp(20px, 3vw, 40px);
  padding: 0 var(--lateral);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.antes__cabecera .titulo-seccion { max-width: 760px; }
.antes__bajada { max-width: none; }
.antes__pista {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0px, 1vw, 16px);
}
.antes__fila {
  --tam: clamp(150px, 19vw, 320px);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  width: max-content;
  margin: 0;
  padding: 56px var(--lateral);
  list-style: none;
  will-change: transform;
}
.antes__foto,
.antes__garabato {
  flex: none;
  transform: translateY(var(--y, 0));
}
.antes__foto img {
  display: block;
  width: var(--tam);
  height: auto;
  /* --gris lo pone main.js: la foto está en blanco y negro en los bordes
     de la pantalla y se llena de color al acercarse al centro */
  filter: grayscale(var(--gris, 0)) drop-shadow(0 18px 26px rgba(33, 46, 83, .18));
  transition: transform .5s cubic-bezier(.22, .8, .24, 1);
}
.antes__foto:nth-child(odd) img { transform: rotate(-3deg); }
.antes__foto:nth-child(even) img { transform: rotate(3deg); }
.antes__foto img:hover { transform: rotate(0) scale(1.05); }
.antes__foto--chica img { width: calc(var(--tam) * .78); }
.antes__foto--alta img { width: calc(var(--tam) * .8); }
.antes__garabato .garabato {
  width: calc(var(--tam) * .42);
  height: calc(var(--tam) * .42);
  --grosor: 4.5;
}
.antes__garabato--ancho .garabato {
  width: calc(var(--tam) * .6);
  height: calc(var(--tam) * .35);
  --grosor: 9;
}
/* Sin animación, cada fila se recorre con el dedo o la rueda */
html:not(.anima) .antes__fila {
  width: auto;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
html:not(.anima) .antes__foto { scroll-snap-align: center; }

/* ---------- 03 Por qué existimos ---------- */
.porque__rayitas {
  position: absolute;
  left: -46px;
  top: -40px;
  width: 54px;
  height: 45px;
  transform: rotate(-30deg);
  color: var(--coral);
  --grosor: 4;
}
.porque__estrella {
  position: absolute;
  left: -58px;
  top: 12%;
  width: 46px;
  height: 46px;
  color: var(--azul);
  --grosor: 5;
}
.porque__onda {
  position: absolute;
  right: 2%;
  bottom: 40px;
  width: 120px;
  height: 24px;
  color: var(--coral);
  --grosor: 5;
}
@media (max-width: 899.98px) {
  .porque__estrella { left: auto; right: 64px; top: -40px; }
  .porque__rayitas { left: -8px; }
  .porque__onda { display: none; }
}

/* ---------- 05 Franja emocional: dibujos de línea a los costados ---------- */
.franja { position: relative; overflow: hidden; }
.franja__contenido { position: relative; z-index: 1; }
.franja__dibujo { position: absolute; pointer-events: none; }
.franja__dibujo img { display: block; width: 100%; height: auto; }
.franja__dibujo--1 { left: 6%; top: 15%; width: clamp(130px, 13vw, 210px); }
.franja__dibujo--2 { left: 10%; bottom: 13%; width: clamp(110px, 10vw, 170px); }
.franja__dibujo--3 { right: 7%; top: 14%; width: clamp(110px, 10vw, 170px); }
.franja__dibujo--4 { right: 9%; bottom: 12%; width: clamp(110px, 10vw, 170px); }
.franja__dibujo--1 img { transform: rotate(-6deg); }
.franja__dibujo--2 img { transform: rotate(5deg); }
.franja__dibujo--3 img { transform: rotate(8deg); }
.franja__dibujo--4 img { transform: rotate(-5deg); }
.franja__corazon {
  position: absolute;
  left: 21%;
  top: 42%;
  width: 64px;
  height: 64px;
  color: var(--coral);
  --grosor: 5;
}
.franja__chispas {
  position: absolute;
  right: 22%;
  top: 46%;
  width: 54px;
  height: 54px;
  color: var(--dorado);
}
@media (max-width: 1299.98px) {
  .franja__corazon,
  .franja__chispas { display: none; }
}
@media (max-width: 1099.98px) {
  .franja__dibujo--1 { left: 3%; }
  .franja__dibujo--2 { left: 3%; }
  .franja__dibujo--3 { right: 3%; }
  .franja__dibujo--4 { right: 3%; }
}
@media (max-width: 999.98px) {
  .franja__dibujo--2,
  .franja__dibujo--4 { display: none; }
  .franja__dibujo--1 { left: 3%; top: 26px; width: 96px; }
  .franja__dibujo--3 { right: 4%; top: 30px; width: 78px; }
}

/* ---------- 06 Súmate ---------- */
.sumate__contenedor { position: relative; }
.sumate__familia {
  position: absolute;
  right: 3%;
  top: -10px;
  width: clamp(170px, 17vw, 250px);
  height: auto;
  pointer-events: none;
}
.sumate__camino {
  position: absolute;
  right: calc(3% + clamp(170px, 17vw, 250px) + 10px);
  top: 60px;
  width: 190px;
  height: 78px;
  color: var(--coral);
  --grosor: 4;
}
@media (max-width: 1099.98px) { .sumate__camino { display: none; } }
@media (max-width: 899.98px) { .sumate__familia { display: none; } }
/* El óvalo va detrás de la palabra y con aire alrededor, para no tocar las letras */
.rodeo { position: relative; display: inline-block; isolation: isolate; margin-left: .32em; }
.rodeo__trazo {
  position: absolute;
  z-index: -1;
  left: -10%;
  top: -30%;
  width: 126%;
  height: 160%;
  color: var(--dorado);
  --grosor: 3.5;
}

/* ---------- 07 Eventos ---------- */
.eventos__onda {
  width: 112px;
  height: 22px;
  margin-top: -2px;
  color: var(--dorado);
  --grosor: 5;
}

/* ---------- 08 Llamado final ---------- */
.dona__firma {
  width: min(260px, 70%);
  height: 52px;
  margin-top: -6px;
  color: var(--crema);
  --grosor: 4;
}

/* =====================================================================
   Páginas internas (Nosotros, Qué hacemos, Súmate, Empresas, Dona,
   Contacto y legales). Las clases las pone js/apariciones.js.
   ===================================================================== */

/* ---------- Portada: entra sola al cargar la página ---------- */
@keyframes entra-antetitulo { from { opacity: 0; transform: translateX(-40px); letter-spacing: .5em; } }
@keyframes entra-sube { from { opacity: 0; transform: translateY(44px); } }
@keyframes entra-pop { from { opacity: 0; transform: scale(.3) rotate(-30deg); } }
@keyframes entra-mancha { from { opacity: 0; transform: scale(.55); } }
@keyframes entra-foto {
  from { opacity: 0; transform: scale(1.06); clip-path: inset(100% 0 0 0 round 40px 40px 200px 40px); }
  to { clip-path: inset(0 0 0 0 round 40px 40px 200px 40px); }
}
.anima .legal__portada { animation: entra-sube 1s cubic-bezier(.22, .8, .24, 1) .05s backwards; }
.anima .ph .antetitulo { animation: entra-antetitulo 1s cubic-bezier(.22, .8, .24, 1) .1s backwards; }
.anima .ph__titulo,
.anima .legal h1 { animation: entra-sube 1s cubic-bezier(.22, .8, .24, 1) .22s backwards; }
.anima .ph__bajada,
.anima .legal__intro { animation: entra-sube .9s cubic-bezier(.22, .8, .24, 1) .42s backwards; }
.anima .ph__acciones { animation: entra-sube .9s cubic-bezier(.22, .8, .24, 1) .58s backwards; }
.anima .ph__foto { animation: entra-foto 1.3s cubic-bezier(.65, 0, .35, 1) .15s backwards; }
.anima .ph__sticker { animation: entra-pop .8s cubic-bezier(.34, 1.56, .64, 1) 1.1s backwards; }
.anima .ph__iconos img { animation: entra-pop .8s cubic-bezier(.34, 1.56, .64, 1) backwards; }
.anima .ph__iconos img:nth-child(1) { animation-delay: .3s; }
.anima .ph__iconos img:nth-child(2) { animation-delay: .5s; }
.anima .ph__iconos img:nth-child(3) { animation-delay: .7s; }
.anima .ph__mancha,
.anima .legal__mancha { animation: entra-mancha 1.6s cubic-bezier(.22, .8, .24, 1) backwards; }

/* Garabatos de la portada */
.ph__trazo { width: min(230px, 60%); height: 46px; margin: -10px 0 -6px; color: var(--coral); --grosor: 4; }
.ph__estrella {
  position: absolute;
  left: 49%;
  top: 15%;
  width: 44px;
  height: 44px;
  color: var(--azul);
  --grosor: 5;
}
@media (max-width: 899.98px) { .ph__estrella { display: none; } }

/* ---------- Garabato bajo cada título de sección ---------- */
.cabecera__trazo { margin-top: -6px; }
.cabecera__trazo--dorado { color: var(--dorado); }
.cabecera__trazo--coral { color: var(--coral); }
.cabecera__trazo--onda { width: 104px; height: 20px; --grosor: 5.5; }
.cabecera__trazo--firma { width: 220px; height: 44px; --grosor: 4; margin-top: -10px; }
.cabecera__trazo--zigzag { width: 74px; height: 36px; --grosor: 5; }
.cierre__trazo { width: 240px; height: 48px; margin-top: -18px; color: var(--crema); --grosor: 4; }

/* Dibujo de línea de la presentación junto a algunos títulos (solo en pantallas anchas) */
.cabecera__dibujo {
  position: absolute;
  right: 2%;
  top: -12px;
  width: clamp(130px, 13vw, 200px);
  height: auto;
  pointer-events: none;
}
@media (max-width: 899.98px) { .cabecera__dibujo { display: none; } }

/* ---------- Pasos en círculo: entran uno tras otro ----------
   Con animación (no transición) para no pisar el efecto al pasar el mouse */
@keyframes entra-paso { from { opacity: 0; transform: translateY(50px) scale(.7); } }
.anima [data-aparece-grupo]:not(.is-visto) > li { opacity: 0; }
.anima [data-aparece-grupo].is-visto > li {
  animation: entra-paso .9s cubic-bezier(.34, 1.4, .64, 1) backwards;
  animation-delay: calc(var(--n, 0) * 140ms);
}

/* ---------- Qué hacemos · garabato dentro de cada círculo de pasos ----------
   (la opción C del borrador _borrador-pasos-circulos.html) */
.paso__trazo { width: 46px; height: 46px; margin-bottom: 4px; --grosor: 5; }
.pasos--circulos li:has(.paso__trazo)::before { width: 28px; height: 28px; font-size: 14px; }

/* ---------- Inicio · tarjeta "Para empresas": correo debajo del botón ---------- */
.tarjeta p.tarjeta__correo { margin: -6px 0 0; font-size: 14px; color: var(--gris); }
.tarjeta__correo a { color: var(--azul); font-weight: 600; overflow-wrap: anywhere; }

/* Scroll fluido: en pantallas táctiles las fotos de "Antes" van sin sombra difuminada
   (redibujarla en cada movimiento es lo que más traba en celulares) */
@media (hover: none), (max-width: 899.98px) {
  .antes__foto img { filter: grayscale(var(--gris, 0)); }
}

/* ---------- Dona · Paso 3: adjuntar el comprobante de pago ---------- */
.comprobante { position: relative; display: flex; flex-direction: column; gap: 10px; margin: 4px 0 6px; }
.comprobante__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.comprobante__zona {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border: 2px dashed #d9b3a7; border-radius: 18px;
  background: #fff; cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.comprobante__zona:hover { border-color: var(--coral); background: #fffaf7; }
.comprobante__input:focus-visible + .comprobante__zona { outline: 2px solid var(--dorado); outline-offset: 3px; }
.comprobante__icono { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--rosa); color: var(--coral); }
.comprobante__texto { flex: 1; display: flex; flex-direction: column; gap: 3px; font: 400 14px/1.4 var(--sans); color: var(--gris); }
.comprobante__texto strong { font: 700 16px/1.3 var(--sans); color: var(--azul); }
.comprobante__boton { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--azul); color: var(--crema); font: 700 14px/1 var(--sans); }
.comprobante--listo .comprobante__zona { display: none; }
.comprobante.es-error .comprobante__zona { border-color: #c0392b; background: #fff5f3; }
.comprobante__vista {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 18px; background: #f1f8f1; border: 1.5px solid #9cc9a0;
}
.comprobante__vista[hidden] { display: none; }
.comprobante__miniatura { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #fff; }
.comprobante__miniatura[hidden], .comprobante__pdf[hidden] { display: none; }
.comprobante__pdf { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 10px; background: var(--coral-fuerte); color: #fff; font: 700 15px/1 var(--sans); }
.comprobante__nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/1.3 var(--sans); color: var(--azul); }
.comprobante__nombre::before { content: '✓ '; color: #2e7d32; }
.comprobante__cambiar { flex: none; cursor: pointer; font: 700 14px/1 var(--sans); color: var(--coral); text-decoration: underline; }
@media (max-width: 520px) {
  .comprobante__zona { flex-wrap: wrap; }
  .comprobante__boton { width: 100%; text-align: center; }
}
