/* ------------------------------------
   1. RESET BÁSICO
------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ------------------------------------
   2. PALETA ESPIRITUAL / VARIABLES
------------------------------------ */
:root {
  --bg-main: #fffaf5;
  --bg-soft: #f7efe8;
  --accent: #c9a264;      /* dorado suave */
  --accent-soft: #e2c9a3;
  --text-main: #4a3b30;   /* café cálido */
  --text-soft: #7a6553;
  --highlight: #9ac7b3;   /* verde sage espiritual */
}

/* ------------------------------------
   3. ESTILOS BASE
------------------------------------ */
body {
  padding-top: 110px; /* ajusta según la altura real del header */
  font-family: "Montserrat", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ------------------------------------
   4. HEADER (logo + marca + menú)
------------------------------------ */
header {
  background: rgba(255, 250, 245, 0.96);
  padding: 1.6rem 2.5rem;
  border-bottom: 1px solid #f0e2d4;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

/* Layout interno del header */
.header-grid {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
}

/* Logo imagen */
.logo img {
  width: 150px;
  height: auto;
  display: block;
  margin-left: 0.5rem;
}

/* Marca (nombre de la terapeuta) */
.brand-name {
  font-family: 'Elegante', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: 0.07em;
  margin-left: 1rem;
  text-transform: none;
  display: flex;
  align-items: center;
}

/* MENÚ */
nav {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
}

nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: color 0.25s ease;
}

nav a:hover {
  color: var(--accent);
}

/* ✨ Beam Glow sutil debajo del texto */
nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 999px;
  animation: underlineGlow 0.5s ease forwards;
}

@keyframes underlineGlow {
  from { opacity: 0; transform: scaleX(0.3); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* ------------------------------------
   5. HERO
------------------------------------ */
.hero {
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 0 1rem;
}

/* Video de fondo en HERO */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg video.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Overlay para legibilidad */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.15)
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  color: #fdf7f0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.hero-content.hero-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 8rem;
  margin-bottom: 1rem;
}

.hero-content p {
  margin-top: 3rem;
  color: var(--bg-soft);
  font-size: 1rem;
  margin-bottom: 4rem;
}

/* Botón global */
button {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  border: none;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

button:hover {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.16);
}

/* ------------------------------------
   6. SECCIONES GENERALES
------------------------------------ */
section {
  padding: 4rem 0;
}

section h3 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  color: var(--text-main);
}

section p.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: 0.5rem auto 2.5rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.section-divider {
  width: 60px;
  height: 2px;
  margin: 0.8rem auto 2.5rem;
  background: linear-gradient(90deg, var(--highlight), var(--accent));
  border-radius: 999px;
}

/* ------------------------------------
   7. GRIDS
------------------------------------ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* Grid 3x3 pantallas grandes (servicios) */
@media (min-width: 1024px) {
  .services .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Imágenes en grids */
.grid-3 img,
.grid-2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SOLO la foto de "Quién soy" usa recorte especial */
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 22px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(201, 162, 100, 0.3); /* línea dorada muy sutil */
}

/* Ajustar espacios en la sección Quién soy */
.about-text h3 {
  margin-bottom: 2.3rem;
}

.about-text h5 {
  margin-bottom: 0.3rem;
  font-size: 1rem;
  color: var(--text-main);
}

.services h3 {
  margin-bottom: 2.4rem;
}

/* ------------------------------------
   8. CARDS (versión final optimizada)
------------------------------------ */

.card {
  background: rgba(255, 255, 255, 0.96);
  border: none;
  padding: 1.8rem 1.6rem;
  border-radius: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;

  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);

  transform: translateY(0) scale(1);
  transition:
    transform 0.22s cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 0.45s ease-out;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(201, 162, 100, 0.22);
}

/* Glow exterior dorado con fade lento */
.card::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    0 0 26px rgba(255, 215, 140, 0.55),
    0 0 60px rgba(255, 230, 170, 0.35);
  transition: opacity 1.8s ease-out;
}

/* Glow interno elegante */
.card:hover h4,
.card:hover p {
  text-shadow: 0 0 5px rgba(255, 220, 160, 0.30);
  color: var(--text-main);
}

/* Hover: solo luz dorada */
.card:hover {
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.12),
    0 0 22px rgba(252, 209, 128, 0.45),
    0 0 40px rgba(255, 230, 170, 0.30);
}

.card:hover::before {
  border-color: transparent !important;
  box-shadow: none;
}

.card:hover::after {
  opacity: 1;
}

/* ------------------------------------
   ANIMACIONES LATERALES + POP REAL
------------------------------------ */

/* entran desde lados + ligeramente más pequeñas */
.card.fade-section:nth-child(odd) {
  transform: translateX(-40px) scale(0.97);
}

.card.fade-section:nth-child(even) {
  transform: translateX(40px) scale(0.97);
}

/* ya en vista: normal */
.card.fade-section.in-view {
  transform: translateX(0) scale(1);
}

/* POP suave en hover */
.card.fade-section.in-view:hover {
  transform: translateX(0) translateY(-4px) scale(1.03);
}

/* ------------------------------------
   9. FOOTER
------------------------------------ */
footer {
  text-align: center;
  padding: 2.5rem 0;
  border-top: 1px solid #f0e2d4;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: #fffaf7;
}

/* ------------------------------------
   10. UTILIDADES
------------------------------------ */
.center-btn {
  display: block;
  margin: 1.5rem auto 0;
  padding: 1rem 2.3rem;
  border-radius: 999px;
}

.center-text {
  text-align: center;
}

/* Contacto: títulos centrados, contenido alineado a la izquierda */
.contact .grid-2 > div {
  text-align: center;
}

.contact .grid-2 > div p {
  text-align: left;
  width: 100%;
  margin: 0 auto;
}

/* ------------------------------------
   11. RESPONSIVE (MÓVILES)
------------------------------------ */
@media (max-width: 768px) {

  .hero {
    height: 80vh;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .header-grid {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  /* Orden visual móvil */
  .logo {
    order: 1;
  }

  .brand-name {
    order: 2;
    margin-top: 0.5rem;
  }

  nav {
    order: 4;
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* =============================
   ANIMACIÓN SCROLL QUIÉN SOY
   ============================= */

/* Estado base: escondida y abajo */
.about .container {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition:
    opacity 0.45s ease-out,
    transform 0.50s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Cuando la sección entra en vista */
.about.fade-section.in-view .container {
  opacity: 1;
  transform: translateY(0) scale(1);
}


/* Opcional: un poquito más suave en móviles */
@media (max-width: 768px) {
  .fade-section {
    transform: translateY(18px);
  }
}

/* -----------------------------------------
   HEADER: ocultar al bajar / mostrar al subir
------------------------------------------ */

/* Estado normal del header */
header {
  transition: transform 0.35s ease, opacity 0.35s ease;
}

/* Oculto (al bajar) */
.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* Visible (al subir) */
.header-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Tipografía unificada espiritual + elegante */
.brand-name,
section h3,
.card h4 {
  font-family: 'Marcellus', serif;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

/* Los párrafos y textos normales siguen en Montserrat */
.card p,
section p,
.about-text p {
  font-family: "Montserrat", sans-serif;
  margin-bottom: 1.6rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}


/* --- Mejora visual de la sección ¿Quién soy? --- */

/* Fondo suave para toda la sección */
.about {
  background: linear-gradient(180deg, #fffaf5 0%, #f7efe8 100%);
  position: relative;
}

/* Convertir el contenido en una “tarjeta” grande */
.about .container {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 3rem 3rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

/* Luces suaves tipo aura espiritual */
.about .container::before,
.about .container::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
}

.about .container::before {
   display: none;
}

.about .container::after {
  display: none; 
}

/* --- Scroll Reveal: animación escalonada de título, texto y foto (Sección Quién Soy) --- */
/* --- Scroll Reveal: animación escalonada de título, texto y foto (Sección Quién Soy) --- */

/* 1) ESTADO BASE: todo oculto y un poco desplazado */
.about-text h3,
.about-text h5,
.about-text p {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Foto: oculta y desde la derecha */
.about-photo img {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 2) ESTADO GENERAL CUANDO LA SECCIÓN ESTÁ EN VISTA (sin delays aún) */
.about.fade-section.in-view .about-text h3,
.about.fade-section.in-view .about-text h5,
.about.fade-section.in-view .about-text p {
  opacity: 1;
  transform: translateY(0);
}

.about.fade-section.in-view .about-photo img {
  opacity: 1;
  transform: translateX(0);
}

/* 3) DELAYS CUANDO VAS HACIA ABAJO (scrolling-down)
      Orden: título → nombre → párrafos → foto  */

body.scrolling-down .about.fade-section.in-view .about-text h3 {
  transition-delay: 0.35s;
}

body.scrolling-down .about.fade-section.in-view .about-text h5 {
  transition-delay: 0.55s;
}

body.scrolling-down .about.fade-section.in-view .about-text p:nth-of-type(1) {
  transition-delay: 0.75s;
}

body.scrolling-down .about.fade-section.in-view .about-text p:nth-of-type(2) {
  transition-delay: 0.95s;
}

body.scrolling-down .about.fade-section.in-view .about-text p:nth-of-type(3) {
  transition-delay: 1.15s;
}

body.scrolling-down .about.fade-section.in-view .about-text p:nth-of-type(4) {
  transition-delay: 1.30s;
}

body.scrolling-down .about.fade-section.in-view .about-photo img {
  transition-delay: 1.60s;
}

/* 4) DELAYS CUANDO VAS HACIA ARRIBA (scrolling-up)
      Foto primero → luego párrafos → luego título/nombre  */

body.scrolling-up .about.fade-section.in-view .about-photo img {
  transition-delay: 0.35s;
}

body.scrolling-up .about.fade-section.in-view .about-text p:nth-of-type(1) {
  transition-delay: 0.65s;
}

body.scrolling-up .about.fade-section.in-view .about-text p:nth-of-type(2) {
  transition-delay: 0.85s;
}

body.scrolling-up .about.fade-section.in-view .about-text p:nth-of-type(3) {
  transition-delay: 1.05s;
}

body.scrolling-up .about.fade-section.in-view .about-text p:nth-of-type(4) {
  transition-delay: 1.25s;
}

body.scrolling-up .about.fade-section.in-view .about-text h3 {
  transition-delay: 1.45s;
}

body.scrolling-up .about.fade-section.in-view .about-text h5 {
  transition-delay: 1.65s;
}



/* --- Responsive: ajustes móviles para la sección Quién Soy --- */
@media (max-width: 768px) {
  .about .container {
    padding: 2.4rem 1.8rem;
    
  }

  .about-text {
    text-align: center;
  }

  .about-text h3::after {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Sección de servicios con curva orgánica arriba */
.services {
  position: relative;
  background: linear-gradient(to bottom, #fffaf5 0%, #f7efe8 100%);
  padding-top: 5rem;      /* un poco más de aire */
  padding-bottom: 5rem;
}

/* Por si alguna tarjeta se acercara mucho a los bordes */
.services .container {
  position: relative;
  z-index: 1;
}

/* Curva orgánica ARRIBA solo en SERVICES (desktop) */
.services {
  clip-path: ellipse(130% 100% at 50% 0%);
}

/* En móvil: curva más suave para que no se vea exagerada */
@media (max-width: 768px) {
  .services {
    clip-path: ellipse(300% 100% at 50% 0%);
  }
}

/* =============================
   ANIMACIÓN SCROLL QUIÉN SOY
   ============================= */

/* Estado base: escondida y abajo */
.about .container {
  opacity: 0;
  transform: translateY(70px) scale(0.94);
  transition:
    opacity 0.5s ease-out,
    transform 0.55s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Cuando la sección entra en vista */
.about.fade-section.in-view .container {
  opacity: 1;
  transform: translateY(0) scale(1);
}

