/* ==========================================================
   Dra. Jael Ruth Ojuel — estilos
   Paleta de marca: bordó, rosa empolvado, verde salvia,
   dorado y crema. Tipografía: Poppins.
   ========================================================== */

:root {
  /* Colores de marca */
  --cream: #f7f3ef;      /* fondo general */
  --rose: #d9b6b2;       /* rosa empolvado */
  --wine: #6d303e;       /* bordó: color principal */
  --sage: #9aa89b;       /* verde salvia */
  --charcoal: #302d2d;   /* texto */
  --gold: #c7aa7a;       /* dorado: acentos */

  /* Tonos derivados de la marca (fondos suaves) */
  --rose-soft: #f0e2df;
  --sage-soft: #e7ebe4;
  --muted: #6b6361;
  --line: rgba(48,45,45,.12);

  /* Alias usados en todo el archivo */
  --ink: var(--wine);
  --blue: var(--wine);
  --mist: var(--sage-soft);
  --paper: var(--cream);
  --blush: var(--rose-soft);
  --text: var(--charcoal);

  --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: var(--font);
  --sans: var(--font);

  --wrap: 1140px;
  --radius-lg: 28px;
  --radius-sm: 10px;
  --radius-img: 12px;   /* bordes apenas redondeados: fotos y tarjeta ACIERA */
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.02em;
}
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.ico { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 500 .95rem/1 var(--font);
  padding: 1rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--charcoal); }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(109,48,62,.3); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--cream); color: var(--wine); }
.btn-light:hover { background: var(--gold); color: var(--charcoal); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,243,239,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-color: var(--line); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
}
.brand-mark svg { width: 24px; height: 24px; fill: var(--gold); }
.brand-text { font-weight: 600; font-size: 1.15rem; line-height: 1; letter-spacing: -.01em; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem;
}
.nav a:hover { color: var(--wine); }
.nav .nav-cta {
  background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: 999px;
}
.nav .nav-cta:hover { background: var(--charcoal); color: #fff; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: .6rem; cursor: pointer;
}
.nav-toggle .bar {
  display: block; width: 24px; height: 2px; background: var(--ink);
  margin: 6px 0; transition: transform .25s;
}
.nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(5rem, 9vw, 7.5rem);
  background:
    radial-gradient(60% 70% at 85% 30%, var(--rose-soft) 0%, transparent 70%),
    radial-gradient(40% 50% at 10% 90%, var(--sage-soft) 0%, transparent 70%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero-kicker {
  font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: .01em;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: 1.5rem;
  max-width: 13ch;
}

.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 44ch; margin-bottom: 2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-portrait { margin: 0; justify-self: center; text-align: center; }

/* Foto del hero: mismo formato que la de "Sobre mí" */
.portrait-arch {
  width: min(400px, 80vw);
}
.portrait-arch img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-img);
}

.hero-portrait figcaption {
  margin-top: 1.2rem; display: grid; gap: .1rem;
}
.hero-portrait figcaption strong {
  font-weight: 600; font-size: 1.1rem; color: var(--ink);
}
.hero-portrait figcaption span { color: var(--muted); font-size: .95rem; }

/* Latido animado */
.heartbeat {
  position: absolute; left: 0; bottom: 1.5rem;
  width: 100%; height: 90px;
}
.heartbeat path {
  fill: none; stroke: var(--gold); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1600; stroke-dashoffset: 1600;
  animation: beat 2.6s .4s cubic-bezier(.6,.1,.3,1) forwards;
  vector-effect: non-scaling-stroke;
  opacity: .8;
}
@keyframes beat { to { stroke-dashoffset: 0; } }

/* ---------- Sobre mí ---------- */
.about { padding: clamp(4rem, 9vw, 7rem) 0; }

.about-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-photo {
  position: sticky; top: 110px;
}
.about-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-img);
}

.about-lead {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  max-width: 30ch;
}

.roles {
  list-style: none; padding: 0; margin: 2.5rem 0 0;
  border-top: 1px solid var(--line);
}
.roles li {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.role-title { font-weight: 600; color: var(--ink); }
.role-detail { color: var(--muted); text-align: right; }

/* ---------- Especialidades ---------- */
.services {
  padding: clamp(4rem, 9vw, 7rem) 0;
  background: var(--mist);
}

.section-head { margin-bottom: 3rem; }
.section-head p { color: var(--muted); font-size: 1.15rem; }

.service-list { display: grid; gap: 1.25rem; }

.service {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1.75rem;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius-lg);
}

/* Obstetricia como servicio central: ocupa más presencia */
.service-featured {
  background: var(--ink);
  color: #f3e6e3;
  padding: 2.75rem 2rem;
}
.service-featured h3 { color: #fff; font-size: 1.6rem; }
.service-featured .service-icon { background: rgba(255,255,255,.08); }
.service-featured .service-icon svg { stroke: var(--gold); }
.service-featured .tags li { background: rgba(255,255,255,.1); color: #fff; }

.service-icon {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--blush);
  display: grid; place-items: center;
}
.service-icon svg {
  width: 44px; height: 44px;
  fill: none; stroke: var(--wine); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}

.service-body p { margin-bottom: 1.2rem; }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li {
  font-size: .82rem; font-weight: 500;
  padding: .4rem .85rem; border-radius: 999px;
  background: var(--mist); color: var(--ink);
}

/* ---------- Cita ---------- */
.quote { padding: clamp(4rem, 9vw, 6.5rem) 0; text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 820px; }
.quote p {
  font-style: italic; font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  line-height: 1.35; color: var(--ink);
  max-width: none; margin-bottom: 1rem;
}
.quote cite { font-style: normal; color: var(--gold); font-weight: 600; }

/* ---------- Conferencias ---------- */
.talks {
  padding: clamp(4rem, 9vw, 7rem) 0;
  background: var(--wine);
  color: #f1e3df;
}
.talks h2 { color: #fff; }

.talks-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.topics {
  list-style: none; padding: 0; margin: 1.5rem 0 2.25rem;
}
.topics li {
  position: relative;
  padding: .7rem 0 .7rem 2rem;
  font-size: 1.1rem; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.topics li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 28s-11-6.6-11-15a6 6 0 0 1 11-3.3A6 6 0 0 1 27 13c0 8.4-11 15-11 15z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 28s-11-6.6-11-15a6 6 0 0 1 11-3.3A6 6 0 0 1 27 13c0 8.4-11 15-11 15z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.talks-card {
  background: var(--paper);
  color: var(--text);
  border-radius: var(--radius-img);
  padding: 2.5rem 2.25rem;
  text-align: center;
}
.talks-card-title {
  font-weight: 600; font-size: 1.3rem; line-height: 1.3;
  color: var(--ink); margin-inline: auto;
}
.talks-card p { margin-inline: auto; }

.yt-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; color: var(--wine); text-decoration: none;
  margin-top: .5rem;
}
.yt-link:hover { text-decoration: underline; }

/* ---------- Contacto ---------- */
.contact { padding: clamp(4rem, 9vw, 7rem) 0; }

.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact-list { margin: 2rem 0; display: grid; gap: 1.25rem; }
.contact-list dt { font-size: .9rem; color: var(--muted); }
.contact-list dd { margin: 0; font-size: 1.15rem; font-weight: 600; }
.contact-list dd a { color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-list dd a:hover { color: var(--gold); }

.socials { display: flex; flex-wrap: wrap; gap: .75rem; }
.socials a {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--rose-soft); color: var(--wine);
  transition: background-color .2s, color .2s;
}
.socials a:hover { background: var(--ink); color: #fff; }
.socials svg { width: 22px; height: 22px; fill: currentColor; }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.contact-form h3 { margin-bottom: 1.25rem; }

.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-weight: 500; font-size: .95rem; color: var(--ink); }
.field input,
.field select,
.field textarea {
  font: inherit; color: var(--text);
  padding: .85rem 1rem;
  border: 1.5px solid #e3d7d0;
  border-radius: var(--radius-sm);
  background: var(--paper);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.field textarea { resize: vertical; }

.form-error { color: var(--wine); font-weight: 500; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-size: .92rem; color: var(--muted);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.to-top { color: var(--ink); font-weight: 500; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 25px -8px rgba(0,0,0,.35);
}
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .talks-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .hero-portrait { order: -1; }
  .portrait-arch { width: min(340px, 80vw); }
  .hero h1 { max-width: 14ch; }

  .about-photo { position: static; max-width: 320px; margin-inline: auto; }

  .talks-card { max-width: 420px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { margin-top: 1rem; text-align: center; border: 0; }

  .service { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.75rem 1.5rem; }
  .service-icon { width: 68px; height: 68px; }
  .service-icon svg { width: 34px; height: 34px; }

  .roles li { grid-template-columns: 1fr; gap: .15rem; }
  .role-detail { text-align: left; }

  .heartbeat { height: 60px; bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .heartbeat path { animation: none; stroke-dashoffset: 0; }
  * { transition: none !important; }
}