:root {
  --primary: #7b2cbf;
  --primary-dark: #5f2194;
  --soft: #f7effb;
  --ink: #242129;
  --muted: #665f6b;
  --white: #fff;
  /* Escala única de separación: todas las secciones del sitio la usan,
     y los bloques a sangre completa restan --pad para llegar al borde. */
  --space-section: 3.75rem;   /* separación vertical de cada sección */
  --pad: 1.25rem;             /* margen lateral del contenido */
}

#bienvenida {  
  color:var(--primary);

}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background-color: var(--white);
  background-image:
    radial-gradient(ellipse 34rem 24rem at 2% 18%, rgba(123,44,191,.25), transparent 72%),
    radial-gradient(ellipse 28rem 38rem at 96% 38%, rgba(207,133,232,.25), transparent 70%),
    radial-gradient(ellipse 36rem 25rem at 12% 72%, rgba(95,33,148,.25), transparent 72%),
    radial-gradient(ellipse 30rem 22rem at 88% 92%, rgba(232,170,214,.25), transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: -15px -10px, 12px -18px, -10px 14px, 16px 10px;
  background-size: 103% 103%, 105% 104%, 104% 105%, 103% 104%;
  animation: lava-background 12s ease-in-out infinite alternate;
}

@keyframes lava-background {
  50% {
    background-position: 10px 12px, -14px 8px, 14px -10px, -12px -8px;
    background-size: 106% 105%, 102% 107%, 107% 103%, 105% 106%;
  }
  100% {
    background-position: 22px -14px, -20px 20px, 8px 24px, -24px 14px;
    background-size: 104% 107%, 107% 103%, 103% 108%, 107% 102%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}
a { color: var(--primary); }
img { max-width: 100%; height: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 9999; padding: .7rem 1rem; background: var(--white); }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); border-bottom: 5px solid var(--soft); }
.nav-wrap { max-width: 1320px; margin: auto; padding: .65rem 1.25rem 0; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand img { width: 210px; max-height: 62px; object-fit: contain; }
/* Pestañas tipo carpeta: todas comparten el morado del fondo y lo que las
   separa es la profundidad. La activa queda al frente, al ras del borde
   morado del encabezado; las demás se inclinan hacia atrás y se oscurecen. */
.nav { display: flex; align-self: stretch; align-items: flex-end; gap: .15rem; flex-wrap: wrap; }
.nav a, .nav [aria-current="page"] {
  position: relative;
  text-decoration: none;
  background: var(--soft);
  border-radius: .7rem .7rem 0 0;
  transform-origin: bottom center;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}
/* Las de atrás: más bajas, recostadas y con sombra encima, como si la pestaña
   de enfrente les tapara la luz. */
.nav a {
  z-index: 1;
  padding: .35rem .7rem .45rem;
  color: var(--white);
  background: var(--primary);
  transform: perspective(420px) rotateX(6deg) scale(.985);
  box-shadow: none;
}
.nav a:hover {
  color: var(--white);
  background: var(--primary-dark);
  transform: perspective(420px) rotateX(4deg) scale(.99);
  box-shadow: none;
}
.nav a:focus-visible { z-index: 4; outline: 3px solid var(--primary-dark); outline-offset: 2px; }
/* La de enfrente: más alta, derecha, con brillo arriba y sombra propia hacia
   los lados para despegarla de sus vecinas. */
.nav [aria-current="page"] {
  z-index: 3;
  margin: 0 -.2rem;
  padding: .55rem .95rem .7rem;
  color: var(--primary-dark);
  border-radius: .85rem .85rem 0 0;
  font-weight: 700;
  cursor: default;
  background: var(--soft);
  box-shadow: none;
}
.hero { background: linear-gradient(135deg, #fbf8fc, #efdcf8); }
.hero-grid, .section, .contact-grid { max-width: 1320px; margin: auto; padding: var(--space-section) var(--pad); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 3rem; min-height: 620px; }
.eyebrow { color: var(--primary-dark); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .84rem; }
h1, h2, h3 { line-height: 1.18; }
h1 { font-size: clamp(2.25rem, 6vw, 4.4rem); margin: .5rem 0 1rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.65rem); margin-top: 0; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 690px; }
.portrait { background: var(--white); padding: 1rem; border-radius: 2rem; box-shadow: 0 20px 55px rgba(72,31,89,.16); }
.portrait img { display: block; margin: auto; max-height: 430px; object-fit: contain; }
.presentation-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 3rem; }
.presentation-photo { background: var(--white); padding: 1rem; border-radius: 2rem; box-shadow: 0 20px 55px rgba(72,31,89,.16); }
.presentation-photo img { display: block; width: 100%; max-height: 460px; border-radius: 1.25rem; object-fit: cover; }
.presentation-text h2 { margin-bottom: .75rem; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.button { display: inline-block; padding: .78rem 1.15rem; border-radius: .5rem; background: var(--primary); color: var(--white); text-decoration: none; border: 2px solid var(--primary); font-weight: 700; }
.button:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.button.secondary { background: transparent; color: var(--primary-dark); }
.soft { background: var(--soft); }
/* Flex en vez de grid para que una última fila incompleta quede centrada
   y no recargada a la izquierda. El ancho iguala al de 3 columnas con su gap. */
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; margin-top: 2rem; }
.cards > * { flex: 0 1 calc((100% - 2.5rem) / 3); }
.card { background: var(--white); border: 1px solid #eadff0; border-radius: .85rem; padding: 1.5rem; box-shadow: 0 10px 28px rgba(60,35,70,.07); }
.card h3 { color: var(--primary-dark); }
.includes { background: linear-gradient(135deg, #f7effb, #efdcf8); }
.include-card { text-align: center; }
.include-icon { display: block; font-size: 2.6rem; line-height: 1; margin-bottom: .6rem; }
.include-card h3 { margin: 0 0 .5rem; }
/* Aparición al hacer scroll (se activa con Javascript/animaciones.js) */
.include-card.reveal-init { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.include-card.reveal-init.reveal-in { opacity: 1; transform: none; }
.include-card.reveal-init:nth-child(2) { transition-delay: .08s; }
.include-card.reveal-init:nth-child(3) { transition-delay: .16s; }
.include-card.reveal-init:nth-child(4) { transition-delay: .24s; }
.include-card.reveal-init:nth-child(5) { transition-delay: .32s; }
.include-card.reveal-init:nth-child(6) { transition-delay: .40s; }
/* Movimiento idle de los emojis (escalonado) */
@media (prefers-reduced-motion: no-preference) {
  .include-icon { animation: icon-float 3s ease-in-out infinite; }
  .include-card:nth-child(2) .include-icon { animation-delay: .3s; }
  .include-card:nth-child(3) .include-icon { animation-delay: .6s; }
  .include-card:nth-child(4) .include-icon { animation-delay: .9s; }
  .include-card:nth-child(5) .include-icon { animation-delay: 1.2s; }
  .include-card:nth-child(6) .include-icon { animation-delay: 1.5s; }
}
@keyframes icon-float { 50% { transform: translateY(-6px); } }
.support-section { background: linear-gradient(135deg, #fbf8fc, #f0e2f7); }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; }
.support-card { background: rgba(255,255,255,.9); border: 1px solid #e5d4ed; border-radius: .85rem; padding: 1.5rem; }
.support-card h3 { margin-top: 0; color: var(--primary-dark); }
.support-card ul { margin: 0; padding-left: 1.25rem; }
.support-card li + li { margin-top: .5rem; }
.support-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 1.5rem; padding: 1.25rem 1.5rem; background: var(--white); border-left: 5px solid var(--primary); border-radius: .5rem; }
.social-content { max-width: 1580px; }
.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 500px)); align-items: start; justify-content: center; gap: 1.25rem; margin-top: 2rem; }
.social-card { overflow: hidden; background: var(--white); border: 1px solid #eadff0; border-radius: .85rem; box-shadow: 0 10px 28px rgba(60,35,70,.07); }
.facebook-embed { display: block; width: 100%; max-width: 500px; border: 0; background: #f4f1f5; }
.facebook-embed--post-tall { height: 650px; }
.facebook-embed--video { height: 1100px; }
.facebook-embed--post-short { height: 550px; }
.embed-fallback { margin: 0; padding: 1rem 1.25rem; border-top: 1px solid #eadff0; }
.embed-fallback a { font-weight: 700; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; }
.review-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid #eadff0; border-radius: .85rem; padding: 1.5rem; box-shadow: 0 10px 28px rgba(60,35,70,.07); transition: transform .25s ease, box-shadow .25s ease; }
@media (hover: hover) and (pointer: fine) {
  .review-card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(60,35,70,.14); }
}
@media (prefers-reduced-motion: reduce) {
  .review-card { transition: none; }
}
.stars { margin: 0 0 .75rem; color: #f4a900; font-size: 1.2rem; letter-spacing: .08em; }
.review-card blockquote { margin: 0; color: var(--ink); font-size: 1.08rem; }
.review-author { margin: auto 0 0; padding-top: 1rem; color: var(--muted); font-weight: 700; }
.notice { border-left: 5px solid var(--primary); background: var(--soft); padding: 1.25rem 1.5rem; border-radius: .4rem; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2rem; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin: .8rem 0; }
.form-card label { display: block; margin-top: .9rem; font-weight: 700; }
.form-card input, .form-card textarea, .form-card select { width: 100%; border: 1px solid #cdbed4; border-radius: .45rem; padding: .75rem; font: inherit; }
.form-card textarea { min-height: 120px; resize: vertical; }
.form-card button { margin-top: 1rem; cursor: pointer; }
.map { width: 100%; min-height: 360px; border: 0; display: block; }
/* Carrusel "Elige a tu compañero" */
.carousel { position: relative; display: flex; align-items: center; gap: .75rem; margin-top: 2rem; }
.carousel-viewport { flex: 1; overflow: hidden; border-radius: 1rem; }
.carousel-track { display: flex; margin: 0; padding: 0; list-style: none; transition: transform .6s ease; }
.carousel-slide { flex: 0 0 100%; min-width: 0; }
.companion-card { display: flex; align-items: center; gap: 1.5rem; background: var(--white); border: 1px solid #eadff0; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 10px 28px rgba(60,35,70,.07); }
.companion-card img { flex: 0 0 auto; width: 150px; height: 150px; object-fit: cover; border-radius: .85rem; background: var(--soft); }
.companion-card h3 { margin: 0; color: var(--primary-dark); font-size: clamp(1.3rem, 3vw, 1.8rem); }
.carousel-arrow { flex: 0 0 auto; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 1.4rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(72,31,89,.25); transition: background .2s ease, transform .15s ease; }
.carousel-arrow:hover { background: var(--primary-dark); }
.carousel-arrow:active { transform: scale(.92); }

/* Elegir compañero desde el carrusel */
.companion-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.companion-choose { padding: .5rem .9rem; font-size: .95rem; font-family: inherit; cursor: pointer; }
.companion-card.is-chosen { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(123,44,191,.18), 0 10px 28px rgba(60,35,70,.07); }

/* Compañero elegido, dentro del formulario */
.companion-field { margin-top: .9rem; }
.companion-field-label { display: block; font-weight: 700; }
.companion-empty { display: flex; align-items: center; gap: .85rem; margin: .5rem 0 0; padding: .6rem; color: var(--muted); font-size: .95rem; border: 1px dashed #d9c8e2; border-radius: .6rem; }
.companion-chosen { display: flex; align-items: center; gap: .85rem; margin-top: .5rem; padding: .6rem; background: var(--soft); border: 1px solid #eadff0; border-radius: .6rem; }
.companion-chosen:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* Estas tres son flex, y flex le gana al atributo hidden: hay que apagarlas a mano */
.companion-empty[hidden], .companion-chosen[hidden], .companion-thumb[hidden] { display: none; }
/* Marcador de posición mientras no hay peluche elegido (y respaldo si la foto no carga) */
.companion-thumb { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; font-size: 2rem; line-height: 1; background: var(--white); border-radius: .5rem; }
.companion-photo { flex: 0 0 auto; width: 64px; height: 64px; object-fit: cover; border-radius: .5rem; background: var(--white); }
.companion-change { margin-left: auto; font-size: .92rem; }

@media (prefers-reduced-motion: reduce) {
  .carousel-track { transition: none; }
  .nav a, .nav [aria-current="page"] { transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 500px) {
  .carousel { gap: .4rem; }
  .companion-card { padding: 1rem; gap: 1rem; flex-wrap: wrap; }
  .companion-card img { width: 96px; height: 96px; }
  .carousel-arrow { width: 38px; height: 38px; font-size: 1.2rem; }
  .companion-thumb, .companion-photo { width: 52px; height: 52px; }
  .companion-thumb { font-size: 1.6rem; }
}
.site-footer { background: #241d28; color: #eee8f1; }
/* Franja decorativa que deja ver el degradado del fondo. Antes ocupaba entre
   288px y 512px de alto, el hueco más grande de la página. */
.background-showcase { min-height: clamp(7rem, 16vw, 12rem); }
.footer-wrap { max-width: 1320px; margin: auto; padding: 2rem 1.25rem; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer a { color: #ead5f4; }
.footer-agenda { align-self: center; margin-left: auto; display: inline-flex; align-items: center; gap: .55rem; padding: .7rem .9rem; border: 1px solid rgba(234,213,244,.45); border-radius: .65rem; text-decoration: none; font-weight: 700; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.footer-agenda svg { width: 24px; height: 24px; }
.footer-agenda:hover { color: var(--white); background: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.footer-agenda:focus-visible { outline: 3px solid #ead5f4; outline-offset: 3px; }
.whatsapp { position: fixed; right: 1rem; bottom: 1rem; z-index: 80; width: 56px; height: 56px; border-radius: 50%; background: #25d366; padding: 11px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

@media (max-width: 800px) {
  :root { --space-section: 3.25rem; }
  /* En pantallas angostas estos recuadros salen a sangre completa: restan el
     padding lateral de .section para que su color sí llegue al borde. */
  .notice, .support-cta { margin-inline: calc(var(--pad) * -1); border-radius: 0; }
  .nav-wrap, .contact-grid { display: block; }
  .nav { margin-top: .5rem; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-grid .lead { margin-inline: auto; }
  .actions { justify-content: center; }
  .portrait { max-width: 430px; margin: auto; }
  .support-grid, .social-grid, .review-grid, .presentation-grid { grid-template-columns: 1fr; }
  .cards > * { flex-basis: 100%; }   /* .cards es flex, no grid: una tarjeta por fila */
  .presentation-grid { text-align: center; gap: 1.5rem; }
  .presentation-photo { max-width: 430px; margin-inline: auto; }
  .presentation-text .lead { margin-inline: auto; }
  .social-card { width: min(100%, 500px); margin-inline: auto; }
  .facebook-embed--post-tall { height: min(650px, 130vw); }
  .facebook-embed--video { height: min(1100px, 220vw); }
  .facebook-embed--post-short { height: min(550px, 110vw); }
  .support-cta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 500px) {
  .nav-wrap { text-align: center; }
  .nav { justify-content: center; font-size: .92rem; }
  .nav a, .nav [aria-current="page"] {
    transform: none;
    padding: .28rem .5rem .36rem;
    font-size: .95rem;
    border-radius: .6rem .6rem 0 0;
  }
  .footer-agenda { width: 100%; justify-content: center; margin-left: 0; }
  :root { --space-section: 3rem; --pad: 1rem; }
}

/* ===== Transición con deslizamiento lateral entre páginas ===== */
/* Fallback universal (Firefox y navegadores sin View Transitions):
   el contenido de cada página entra deslizándose desde la derecha. */
@media (prefers-reduced-motion: no-preference) {
  body { overflow-x: clip; }                   /* evita la barra horizontal durante el deslizamiento */
  main { animation: page-enter .8s cubic-bezier(.22, .61, .36, 1) both; }
}

@keyframes page-enter {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Navegadores con View Transitions (Chrome, Edge, Safari):
   la página anterior sale hacia la izquierda y la nueva entra desde la
   derecha; el encabezado con el menú permanece fijo. */
@supports (view-transition-name: none) {
  @view-transition { navigation: auto; }

  main { animation: none; }                    /* la transición nativa se encarga */
  .site-header { view-transition-name: site-header; }

  ::view-transition-old(root) { animation: vt-slide-out .55s cubic-bezier(.55, .06, .68, .19) both; }
  ::view-transition-new(root) { animation: vt-slide-in  .7s  cubic-bezier(.22, .61, .36, 1) both; }
}

@keyframes vt-slide-out { to   { opacity: 0; transform: translateX(-8%); } }
@keyframes vt-slide-in  { from { opacity: 0; transform: translateX(8%); } }

/* Respeta la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation-duration: .001ms !important; }
}
