/* ============================================================
   Psicología en Línea — página "Nuestro equipo"
   Mobile first: lo de arriba es el celular; el bloque
   @media (min-width: 841px) del final agrega el escritorio.

   Encabezado, menú, CTA final, pie y botón de WhatsApp copian
   los valores de la página principal (sitio/index.html), para
   que el logo quede con el mismo tamaño y en el mismo lugar.
   ============================================================ */

:root {
  --c-ink:    #231F20;
  --c-orange: #FE5400;
  --c-cream:  #EFF0EB;
  --c-bone:   #F9FAF8;

  --display: "Signos Interrogacion", "GC Bargain", "Hanken Grotesk", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;

  /* Grilla: 12 col, gutter 24, márgenes 24 (celular) / 48 (escritorio) */
  --margin-x: 24px;
  --gutter:   24px;
  --max-w:    1440px;

  /* Logo del encabezado en celular: igual que la página principal */
  --nav-pad:  clamp(18px, 4.8vw, 28px);
  --logo-w:   clamp(178px, 48vw, 232px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  font-weight: 500;
  color: var(--c-ink);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.02;
  text-wrap: balance;
}

p { margin: 0; }
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--margin-x);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--c-orange);
  outline-offset: 3px;
}

/* ───── NAV ───── */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-block: var(--nav-pad);
  background: transparent;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img {
  display: block;
  width: var(--logo-w);
  height: auto;
  object-fit: contain;
}
.nav-menu-btn {
  background: none; border: 0; padding: 8px;
  cursor: pointer; color: var(--c-cream);
  display: flex; align-items: center; justify-content: center;
}
.nav-menu-btn svg { width: clamp(34px, 9vw, 42px); height: clamp(34px, 9vw, 42px); display: block; }
.nav a:focus-visible, .nav button:focus-visible { outline-color: var(--c-cream); }

/* ── MENU BACKDROP ── */
.menu-backdrop {
  position: fixed; inset: 0; z-index: 48;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
}

/* ── MENU PANEL GLASS ── */
.menu-panel {
  position: fixed;
  top: 5rem; right: var(--margin-x);
  z-index: 50;
  visibility: hidden;
  width: 90vw; max-width: 440px;
  background: rgba(239, 240, 235, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 6px;
  pointer-events: none;
  box-shadow: 0 12px 48px rgba(0,0,0,0.08);
  overflow: hidden;
  isolation: isolate;
}
.menu-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0) 100%);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
  z-index: -1;
}
/* Abierto sin animación (movimiento reducido); con animación lo maneja GSAP */
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }
.menu-panel.is-open    { visibility: visible; pointer-events: auto; }

/* ── MENU LINKS ── */
.menu-link {
  display: block;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 3.5vw, 30px);
  color: var(--c-orange);
  transition: color .15s;
}
.menu-link:hover,
.menu-link[aria-current="page"] { color: rgba(254,84,0,0.55); }

/* ───── CTAs base ───── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
  border-radius: 999px;
  padding: 16px 30px;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none;
}
.btn-white {
  background: #fff;
  color: var(--c-ink);
}
.btn-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* ───── ENCABEZADO ─────
   Degradé "hero en celular" del sistema de diseño (naranja hasta 50%,
   crema desde 88% y un velo claro encima). El padding de arriba deja
   el lugar que ocupa el nav: 2 × su padding + el alto del logo
   (ancho × 216/457) + aire. */
.team-hero {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, var(--c-orange) 0 50%, rgba(254,84,0,0.98) 58%, rgba(255,151,101,0.74) 70%, var(--c-cream) 88%, var(--c-cream) 100%);
  padding-top: calc(2 * var(--nav-pad) + var(--logo-w) * 0.4726 + 40px);
  padding-bottom: 24px;
  text-align: center;
}
.team-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(254,84,0,0) 0 54%, rgba(239,240,235,0.18) 72%, var(--c-cream) 94%);
  pointer-events: none;
}

.team-hero-head { grid-column: 1 / -1; }

/* Etiqueta sobre el naranja: el formato de la píldora de las notas, con la
   escala de las pestañas del índice de la newsletter ("Por edición") */
.team-tag {
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.25;
  color: var(--c-cream);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 9px 18px;
  margin-bottom: 20px;
}
.team-title {
  color: var(--c-cream);
  font-size: clamp(54px, 14.8vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.team-intro {
  margin: 28px auto 0;
  max-width: 36ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-ink);
  text-wrap: pretty;
}

/* ───── FUNDADOR ─────
   Mismo formato que el bloque del Dr. en la página principal:
   su foto recortada (doctor2.png), no una burbuja. */
.founder {
  padding-block: 8px 24px;
}
.founder-grid { align-items: center; }
.founder-photo {
  order: -1;
  display: flex;
  justify-content: center;
}
.founder-photo img {
  width: 100%;
  max-width: 90%;
  height: auto;
  margin: 0 auto;
}
.founder-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.founder-name {
  color: var(--c-orange);
  font-size: clamp(36px, 9.5vw, 44px);
  line-height: 1.04;
}
.founder-role {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
}
.founder-copy p:not(.founder-role) {
  font-size: 16px;
  line-height: 1.6;
  max-width: 460px;
  text-wrap: pretty;
}

/* ───── ÁREAS DEL EQUIPO ───── */
.team-area { padding-block: 56px 0; }
.team-area:last-of-type { padding-bottom: 24px; }
.team-pair .team-area:last-of-type { padding-bottom: 0; }

.team-area-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.team-area-title {
  color: var(--c-orange);
  font-size: clamp(30px, 8.2vw, 36px);
  line-height: 1;
}
.team-area-intro {
  font-size: 16px;
  line-height: 1.55;
  max-width: 46ch;
  text-wrap: pretty;
}
/* División naranja; entra dibujándose de izquierda a derecha */
.team-rule {
  display: block;
  height: 1px;
  margin: 20px 0 28px;
  background: var(--c-orange);
  transform-origin: left center;
}
.has-anim .team-rule { transform: scaleX(0); }
.has-anim .person { opacity: 0; }
/* Encabezado: entra al cargar, como el titular de la página principal */
.has-anim .team-tag,
.has-anim .team-title,
.has-anim .team-intro { opacity: 0; }

/* Personas. En celular, una por fila: burbuja a la izquierda y el texto a
   la derecha, como la lista de autoría de la newsletter (con descripción,
   tres por fila no dejan lugar para leer). La lista crece hacia abajo. */
.team-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 28px;
}
.person {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: center;
  text-align: left;
  min-width: 0;
}
.person-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
}
/* Sin foto todavía: iniciales en la burbuja */
.person-photo--iniciales {
  display: grid;
  place-items: center;
  background: var(--c-orange);
  color: var(--c-cream);
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1;
}
/* Lugar para un país que todavía no se suma */
.person-photo--pronto {
  display: grid;
  place-items: center;
  border: 2px dotted rgba(35,31,32,0.45);
  color: rgba(35,31,32,0.65);
  font-family: var(--display);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  padding: 0 6px;
}
.person-copy { min-width: 0; }

/* Jerarquía de las filas del índice de la newsletter:
   rótulo en mayúsculas, nombre grande y descripción en negro */
.person-kicker {
  font-family: var(--body);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-orange);
  margin: 0 0 6px;
}
.person-name {
  color: var(--c-orange);
  font-size: 24px;
  line-height: 1.08;
  overflow-wrap: break-word;
}
.person-desc {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--c-ink);
  text-wrap: pretty;
}

/* ───── CTA FINAL ───── */
.cta {
  background: linear-gradient(
    to bottom,
    var(--c-cream)  0%,
    var(--c-cream)  8%,
    var(--c-orange) 55%,
    var(--c-orange) 100%
  );
  padding-top: 175px;
  padding-bottom: 56px;
}
.cta-grid { align-items: center; }
.cta-title {
  color: #fff;
  font-size: clamp(28px, 7.5vw, 44px);
  line-height: 1.05;
  text-align: center;
}
.cta-action {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.cta .btn-white { padding: 20px 36px; font-size: 17px; }

/* ───── FOOTER ───── */
.footer {
  background: var(--c-orange);
  color: #fff;
  padding-block: 56px 24px;
}
.footer-grid {
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { grid-column: 1; }
.footer-logo { display: none; }
.footer-logo-mobile {
  display: block;
  width: clamp(160px, 45vw, 220px);
  height: auto;
  object-fit: contain;
}
.footer-nav { display: none; }
.footer-social { grid-column: 2; }

.footer-nav h4, .footer-social h4 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.footer-nav ul, .footer-social ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 15px;
}
.footer-nav a, .footer-social a {
  transition: color .2s;
  display: inline-flex; align-items: center; gap: 10px;
}
.footer-nav a:hover, .footer-social a:hover { color: rgba(255,255,255,0.6); }
.footer-social a svg { width: 18px; height: 18px; flex-shrink: 0; }

.footer-bottom {
  padding-top: 28px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.footer-bottom .dot { opacity: 0.5; }

/* ───── WHATSAPP FLOTANTE ───── */
.wa-fab {
  position: fixed;
  right: 16px; bottom: 16px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-orange);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 40;
  transition: transform .15s ease, box-shadow .2s ease;
}
.wa-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 32px rgba(254,84,0,.4);
}
.wa-fab svg { width: 26px; height: 26px; color: #fff; }


/* ───────────────────────────── */
/* ESCRITORIO                    */
/* ───────────────────────────── */
@media (min-width: 841px) {
  :root {
    --margin-x: 48px;
    --nav-pad:  32px;
  }

  .grid { grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }

  .nav-logo img { height: 135px; width: auto; }
  .nav-menu-btn svg { width: 36px; height: 36px; }

  /* Encabezado: degradé "hero" del sistema de diseño */
  .team-hero {
    background: linear-gradient(180deg, var(--c-orange) 0 58%, rgba(255,151,101,0.72) 78%, var(--c-cream) 100%);
    padding-top: 230px;
    padding-bottom: 104px;
    text-align: left;
  }
  .team-hero::after { display: none; }
  .team-tag { font-size: 17px; padding: 11px 22px; margin-bottom: 28px; }
  .team-title {
    font-size: clamp(56px, 8.4vw, 128px);
    letter-spacing: -0.01em;
  }
  /* La bajada, alineada a la izquierda con el título */
  .team-intro-wrap { grid-column: 1 / span 6; }
  .team-intro {
    margin: 32px 0 0;
    max-width: 520px;
    font-size: 18px;
  }

  .founder { padding-block: 32px 24px; }
  .founder-copy {
    grid-column: 2 / span 5;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
  }
  .founder-photo { grid-column: 7 / -1; order: 0; }
  .founder-photo img { max-width: 100%; }
  .founder-name { font-size: clamp(44px, 4.6vw, 64px); }

  .team-area { padding-block: 112px 0; }
  .team-area-title { font-size: clamp(36px, 3.6vw, 52px); }
  .team-area-intro { font-size: 17px; }
  .team-rule { margin: 28px 0 40px; }

  /* Clínica y Educativa comparten la fila: cada una en su mitad */
  .team-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: calc(var(--gutter) * 3);
    align-items: start;
  }

  /* 2 a 1: Educativa (2) + Operativa (1) comparten la fila (Alvi, 4-11).
     Clínica y Newsletter van solas, cada una en su fila. Así las 2 de
     Educativa entran en una fila y "Área operativa" en una línea */
  .team-pair--3-1 { grid-template-columns: 2fr 1fr; }

  /* En escritorio, cada persona es una columna centrada */
  .team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 56px var(--gutter);
  }
  .person {
    flex: 0 0 256px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
  }
  .person-photo { width: 132px; }
  .person-photo--iniciales { font-size: 46px; }
  .person-photo--pronto { font-size: 16px; padding: 0 10px; }
  .person-copy { margin-top: 22px; }
  .person-kicker { font-size: 13px; margin-bottom: 10px; }
  .person-name { font-size: 30px; }
  .person-desc { margin-top: 12px; font-size: 15px; max-width: 32ch; margin-inline: auto; }

  .cta {
    padding-top: 220px;
    padding-bottom: 100px;
  }
  .cta-title {
    grid-column: 1 / span 7;
    font-size: clamp(36px, 4.6vw, 64px);
    text-align: left;
  }
  .cta-action {
    grid-column: 9 / -1;
    justify-content: flex-end;
    margin-top: 0;
  }

  .footer { padding-block: 80px 32px; }
  .footer-grid { gap: var(--gutter); padding-bottom: 56px; }
  .footer-brand { grid-column: 1 / span 5; }
  .footer-logo {
    display: block;
    width: clamp(190px, 22vw, 338px);
    height: auto;
    object-fit: contain;
  }
  .footer-logo-mobile { display: none; }
  .footer-nav { display: block; grid-column: 6 / span 4; }
  .footer-social { grid-column: 10 / span 3; }

  .wa-fab {
    right: 24px; bottom: 24px;
    width: 64px; height: 64px;
  }
  .wa-fab svg { width: 30px; height: 30px; }
}
