/* ============================================================
   Daniela Trujillo Huerta — Psicóloga
   Sistema visual: humanista / cálido · crema + salvia + terracota
   ============================================================ */

:root {
  --cream: #faf1ec;
  --cream-deep: #f1e3d8;
  --sage: #4c7f79;
  --sage-dark: #33564f;
  --sage-pale: #dfe9e6;
  --tan: #b99b7d;
  --rose: #c99383;
  --rose-pale: #f3e3dd;
  --ink: #2f2a26;
  --ink-muted: #6b6259;
  --white: #ffffff;
  --line: #e6d9cd;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-script: "Pacifico", "Segoe Script", cursive;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 16px;
  --radius-lg: 26px;
  --shadow: 0 24px 60px -24px rgba(51, 86, 79, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 200ms;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--sage-dark);
  color: var(--white);
  padding: 12px 18px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.08rem; color: var(--ink-muted); max-width: 46em; }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: 0.8em;
}

.accent-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--rose);
  margin: 18px 0;
}
.accent-line::before, .accent-line::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--line);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--sage), var(--sage-dark));
  color: var(--white);
  box-shadow: 0 12px 28px -12px rgba(51, 86, 79, 0.55);
}
.btn-primary:hover { box-shadow: 0 16px 32px -12px rgba(51, 86, 79, 0.65); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--sage); color: var(--sage-dark); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { color: var(--sage-dark); }
.btn-lg { padding: 15px 30px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 241, 236, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand img {
  height: 46px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 8px;
}
.main-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.main-nav a:hover { background: var(--sage-pale); color: var(--sage-dark); }
.main-nav a[aria-current="page"] {
  background: var(--sage);
  color: var(--white);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 0 8px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (Inicio) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 90px;
  background:
    radial-gradient(48% 60% at 92% 0%, rgba(76,127,121,0.14), transparent 65%),
    radial-gradient(40% 45% at 4% 100%, rgba(201,147,131,0.14), transparent 60%),
    var(--cream);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero .eyebrow {
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero-lead { font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 40px; }

.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding: 24px 0 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--sage-dark); }
.hero-stats span { color: var(--ink-muted); font-size: 0.85rem; }

.hero-portrait {
  position: relative;
}
.hero-portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 46px 24px 20px;
  background: linear-gradient(180deg, transparent, rgba(30, 41, 38, 0.78) 65%);
}
.hero-portrait-caption strong { display: block; font-family: var(--font-display); color: var(--white); font-size: 1.15rem; }
.hero-portrait-caption span { font-size: 0.85rem; color: #dbe6e3; }

/* ---------- Page hero (subpáginas) ---------- */
.page-hero {
  padding: 56px 0 44px;
  text-align: center;
  background:
    radial-gradient(50% 70% at 50% 0%, rgba(76,127,121,0.12), transparent 65%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}
.page-hero .kicker { justify-content: center; }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lead { margin: 0 auto; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--cream-deep); }
.section-sage {
  background: var(--sage-dark);
  color: var(--white);
}
.section-sage h2, .section-sage h3 { color: var(--white); }
.section-sage .kicker { color: var(--rose-pale); }
.section-sage .lead { color: #d8e6e2; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

/* Misión / visión / valores resumen (Inicio) */
.mvv {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.mvv h3 { font-size: 1rem; color: var(--sage-dark); margin-bottom: 8px; }
.mvv p { font-size: 0.92rem; color: var(--ink-muted); margin: 0; }

.portrait-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.portrait-frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Valores — tarjetas expandidas */
.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
}
.value-card h3 { color: var(--sage-dark); margin-bottom: 10px; font-size: 1.02rem; }
.value-card p { color: var(--ink-muted); font-size: 0.88rem; margin: 0; }

/* Audience */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.audience-cards { display: grid; gap: 18px; }
.audience-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 24px;
}
.audience-card h3 { color: var(--white); }
.audience-card p { color: #d8e6e2; margin: 0; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sage-pale);
  color: var(--sage-dark);
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.service-card p { color: var(--ink-muted); font-size: 0.95rem; }
.card-link {
  color: var(--sage-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.card-link:hover { color: var(--sage); }

/* Credentials */
.credentials-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  margin-top: 36px;
  align-items: start;
}
.credentials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.credentials-list li {
  padding-left: 28px;
  position: relative;
  color: var(--ink);
}
.credentials-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage), var(--rose));
}
.highlight-card {
  background: var(--sage-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.highlight-card h3 { color: var(--rose-pale); }
.highlight-card p { color: #d8e6e2; margin: 0; }

/* Testimonials */
.testimonios-wrap { text-align: center; max-width: 640px; }
.testimonios-wrap .lead { margin-inline: auto; }

/* Ubicación */
.info-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 20px; }
.info-list li { display: grid; gap: 4px; }
.info-list strong { color: var(--sage-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.info-list span, .info-list a { color: var(--ink-muted); }
.info-list a { color: var(--sage-dark); text-decoration: none; font-weight: 600; }

.map-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--white);
}
.map-card-embed {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--cream-deep);
}
.map-card-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(28%) sepia(22%) hue-rotate(130deg) saturate(85%) brightness(1.03) contrast(0.96);
}
.map-card-embed::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(51,86,79,0.12);
}
.map-card-body {
  padding: 24px 26px 28px;
  display: grid;
  gap: 16px;
  background: var(--sage-dark);
}
.map-card-body p { margin: 0; color: #dbe6e3; }
.map-card-body .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,0.38);
}
.map-card-body .btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* Contacto */
.contact-wrap { text-align: center; max-width: 620px; }
.contact-wrap .lead { margin-inline: auto; }
.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 34px;
}
.social-row { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.social-row a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
}
.social-row a:hover { color: var(--sage-dark); border-color: var(--sage-dark); }

/* Footer */
.site-footer {
  background: var(--sage-dark);
  color: #cfe0dc;
  padding: 44px 0;
}
.footer-inner { text-align: center; display: grid; gap: 14px; justify-items: center; }
.footer-brand img { height: 40px; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-note, .footer-credit { font-size: 0.85rem; margin: 0; }
.footer-credit { color: #9fb8b3; }

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.6);
  z-index: 90;
  transition: transform var(--dur) var(--ease);
}
.whatsapp-fab:hover { transform: scale(1.08); }

/* ---------- Reveal-on-scroll (gated, non-intrusive) ---------- */
.reveal {
  opacity: 1;
  transform: none;
}
.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 560ms var(--ease), transform 560ms var(--ease);
}
.js-reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal-ready .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-2, .audience-grid, .credentials-grid, .hero-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(3, 1fr); }
  .mvv { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .hero-portrait { max-width: 380px; margin: 0 auto; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .header-actions .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 56px; }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px 24px;
    gap: 6px;
  }
  .site-header.nav-open .main-nav a { padding: 10px 14px; }
}
