/* ==========================================================================
   Eduardo Morán — Psicólogo clínico y psicoterapeuta
   Hoja de estilos principal
   ========================================================================== */

:root {
  --color-primary: #51637D;       /* azul acero medio-oscuro - botones, acentos, CTAs */
  --color-primary-light: #6C84A0; /* azul acero medio */
  --color-accent: #7B93AC;        /* azul acero claro - hover, detalles, resaltes */
  --color-accent-light: #AEC0D2;  /* azul acero muy claro - texto sobre fondos oscuros */
  --color-dark: #263142;          /* azul marino oscuro - header, footer, fondos oscuros */
  --color-teal-logo: #71A5A9;     /* verde-teal exclusivo del isotipo (brote + palito) */
  --color-text: #212B38;
  --color-text-soft: #5B6B7A;
  --color-bg: #F7F9FB;            /* blanco con tinte frío */
  --color-bg-alt: #EBEFF3;
  --color-white: #FFFFFF;
  --shadow-soft: 0 10px 30px rgba(38, 49, 66, 0.08);
  --shadow-strong: 0 20px 50px rgba(38, 49, 66, 0.18);
  --radius: 14px;
  --max-width: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { overflow-x: hidden; width: 100%; }

html { scroll-behavior: auto; } /* Lenis gestiona el scroll suave vía JS */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: 'Manrope', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  color: var(--color-dark);
  line-height: 1.2;
  font-weight: 600;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 14px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 18px;
}

.section-lead {
  color: var(--color-text-soft);
  font-size: 1.08rem;
  max-width: 680px;
  margin-bottom: 48px;
}

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-strong); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--color-white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-3px); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline-dark:hover { background: var(--color-primary); color: var(--color-white); transform: translateY(-3px); }

.cta-group { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(28,43,39,0.07);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-dark);
}

.brand .logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
}

.brand .brand-sub {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-soft);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.92rem;
  padding: 10px 18px;
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  transition: all 0.25s ease;
}
.nav-phone:hover { background: var(--color-primary); color: var(--color-white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--color-dark);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  max-width: 100%;
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 55%, var(--color-primary-light) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(201,162,114,0.18), transparent 55%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 140px 24px 90px;
  width: 100%;
}

.hero-eyebrow {
  color: var(--color-accent-light);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  margin-bottom: 20px;
}

.hero p.subtitle {
  color: rgba(255,255,255,0.86);
  font-size: 1.12rem;
  max-width: 540px;
  margin-bottom: 36px;
}

.hero-figure {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
  box-shadow: var(--shadow-strong);
  /* REVISAR: reemplazar por <img src="assets/eduardo-moran.jpg" alt="Eduardo Morán, psicólogo clínico"> */
}

.hero-badge {
  position: absolute;
  bottom: -24px;
  left: 24px;
  background: var(--color-white);
  color: var(--color-dark);
  padding: 16px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  display: flex;
  gap: 14px;
  align-items: center;
}
.hero-badge strong { display: block; font-size: 1.3rem; font-family: 'Fraunces', serif; color: var(--color-primary); }
.hero-badge span { font-size: 0.78rem; color: var(--color-text-soft); }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 36px 30px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(28,43,39,0.05);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-strong); }

.card .icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--color-text-soft); font-size: 0.96rem; }

/* ---------- Stats ---------- */
.stats-band {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 64px 0;
}
.stats-band .grid-4 { text-align: center; }
.stat strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 2.6rem;
  color: var(--color-accent-light);
}
.stat span { color: rgba(255,255,255,0.72); font-size: 0.88rem; }

/* ---------- Listas con check ---------- */
.check-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 1rem;
  color: var(--color-text);
}
.check-list .mark {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---------- CTA final ---------- */
.cta-final {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
  color: var(--color-white);
  padding: 90px 0;
  text-align: center;
}
.cta-final h2 { color: var(--color-white); margin-bottom: 16px; }
.cta-final p { color: rgba(255,255,255,0.82); max-width: 560px; margin: 0 auto 36px; }
.cta-final .cta-group { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 { color: var(--color-white); font-size: 1rem; margin-bottom: 18px; }
.footer-grid p, .footer-grid a { color: rgba(255,255,255,0.68); font-size: 0.92rem; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--color-accent-light); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Page hero (páginas internas) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  background: linear-gradient(135deg, var(--color-dark), var(--color-primary));
  color: var(--color-white);
  padding: 150px 0 80px;
  text-align: center;
}
.page-hero .eyebrow { color: var(--color-accent-light); }
.page-hero h1 { color: var(--color-white); font-size: clamp(2rem, 4vw, 2.8rem); }

/* ---------- Métodos / pasos ---------- */
.method-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 90px;
}
.method-block:nth-child(even) { direction: rtl; }
.method-block:nth-child(even) > * { direction: ltr; }
.method-visual {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  font-size: 2.4rem;
  box-shadow: var(--shadow-soft);
}
.method-text h3 { font-size: 1.5rem; margin-bottom: 14px; }
.method-text p { color: var(--color-text-soft); }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info .card { margin-bottom: 20px; }
.contact-info .card h3 { display: flex; align-items: center; gap: 12px; }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 420px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; min-height: 420px; }

.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table td { padding: 12px 0; border-bottom: 1px solid var(--color-bg-alt); font-size: 0.95rem; }
.schedule-table td:last-child { text-align: right; font-weight: 700; color: var(--color-primary); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 120px; }
  .hero-figure { order: -1; max-width: 360px; margin: 0 auto 20px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .method-block, .method-block:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-links, .nav-phone { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    box-shadow: var(--shadow-soft);
  }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero-inner { padding: 120px 20px 70px; }
}

/* ==========================================================================
   MOVIMIENTO — aurora, reveals, cursor magnético, header dinámico, marquee
   ========================================================================== */

/* ---------- Aurora animada en el hero ---------- */
.hero { isolation: isolate; }
.hero .aurora {
  position: absolute;
  inset: -20%;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}
.hero .aurora span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}
.hero .aurora span:nth-child(1) {
  width: 46%; height: 46%; top: -8%; left: -6%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  animation: drift1 22s ease-in-out infinite;
}
.hero .aurora span:nth-child(2) {
  width: 38%; height: 38%; bottom: -12%; right: 0%;
  background: radial-gradient(circle, var(--color-primary-light) 0%, transparent 70%);
  animation: drift2 26s ease-in-out infinite;
}
.hero .aurora span:nth-child(3) {
  width: 28%; height: 28%; top: 30%; right: 20%;
  background: radial-gradient(circle, var(--color-accent-light) 0%, transparent 70%);
  animation: drift3 18s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(5%, 8%) scale(1.15); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-6%, -6%) scale(1.1); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-4%, 5%) scale(0.9); }
}
.hero .noise-grain {
  position: absolute; inset: 0; z-index: 1;
  opacity: 0.045; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Reveal on scroll (controlado por GSAP) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
}
.reveal-fade { opacity: 0; }
.reveal-left { opacity: 0; transform: translateX(-40px); }
.reveal-right { opacity: 0; transform: translateX(40px); }
.reveal-scale { opacity: 0; transform: scale(0.9); }
/* fallback: si JS no carga, el contenido sigue visible */
.no-js .reveal, .no-js .reveal-fade, .no-js .reveal-left,
.no-js .reveal-right, .no-js .reveal-scale { opacity: 1; transform: none; }

/* ---------- Header dinámico al hacer scroll ---------- */
.site-header {
  transition: padding 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.site-header.scrolled {
  box-shadow: 0 8px 24px rgba(28,43,39,0.08);
  background: rgba(251, 248, 243, 0.98);
}
.site-header.scrolled .nav { padding: 12px 24px; }

/* ---------- Botones magnéticos ---------- */
.btn { will-change: transform; }
.magnetic-wrap { display: inline-flex; }

/* ---------- Cursor personalizado ---------- */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  display: none;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  display: none;
}
.cursor-ring.hover { width: 60px; height: 60px; border-color: var(--color-primary); }
@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-ring { display: block; }
}

/* ---------- Marquee de palabras clave ---------- */
.marquee {
  overflow: hidden;
  background: var(--color-dark);
  padding: 22px 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marquee-scroll 28s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 48px;
}
.marquee-track span strong { color: var(--color-accent-light); font-weight: 600; }
.marquee-track .dot { color: var(--color-accent); }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Texto hero animado por palabras ---------- */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.split-word span { display: inline-block; will-change: transform; }

/* ---------- Tilt sutil en tarjetas ---------- */
.card { transform-style: preserve-3d; }

@media (prefers-reduced-motion: reduce) {
  .hero .aurora span, .marquee-track { animation: none !important; }
  .reveal, .reveal-fade, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important; transform: none !important;
  }
}

/* ---------- Icono WhatsApp inline (botones) ---------- */
.ico-wa {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 9998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 14px 34px rgba(0,0,0,0.3); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
.wa-float .wa-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.55;
  animation: wa-pulse 2.2s ease-out infinite;
  z-index: -1;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}
.wa-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--color-dark);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.wa-float:hover .wa-tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .wa-float .wa-ping { animation: none; }
}

@media (max-width: 680px) {
  .wa-float { bottom: 18px; right: 18px; width: 54px; height: 54px; }
  .wa-float svg { width: 28px; height: 28px; }
  .wa-tooltip { display: none; }
}
