/* ═══════════════════════════════════════════════════
   Dra. Rocío Palacios — Bariatría Clínica
   Minimalismo cálido · mobile-first
   ═══════════════════════════════════════════════════ */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #FAF7F2;
  --cream: #F1EAE0;
  --cream-deep: #E9E0D2;
  --ink: #2E2A26;
  --ink-soft: #5C544B;
  --gold: #B08D57;
  --gold-deep: #8C6F45;
  --sage: #8A9A8B;
  --blush: #E8D5C8;
  --white: #FFFDFA;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.22vw, 1.13rem);
  --step-1: clamp(1.19rem, 1.13rem + 0.33vw, 1.38rem);
  --step-2: clamp(1.43rem, 1.32rem + 0.55vw, 1.75rem);
  --step-3: clamp(1.72rem, 1.54rem + 0.9vw, 2.24rem);
  --step-4: clamp(2.06rem, 1.79rem + 1.36vw, 2.84rem);
  --step-5: clamp(2.47rem, 2.06rem + 2.05vw, 3.65rem);

  --space: clamp(4.5rem, 3.5rem + 5vw, 8rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius-arch: 999px 999px 18px 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 380;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--gold); }

::selection { background: var(--blush); color: var(--ink); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ── Tipografía base ─────────────────────────── */

h1, h2, h3 { font-family: var(--serif); font-weight: 420; line-height: 1.12; letter-spacing: -0.01em; }

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 440;
  color: var(--gold-deep);
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.section { padding-block: var(--space); }
.section--alt { background: var(--cream); }

.section__inner {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section__title {
  font-size: var(--step-4);
  max-width: 21ch;
  margin-bottom: 1.2rem;
}

.section__lead {
  font-size: var(--step-1);
  font-weight: 340;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 2.5rem;
}

/* ── Botones ─────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 560;
  letter-spacing: 0.02em;
  padding: 0.85em 1.9em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-align: center;
}

.btn--primary {
  background: var(--ink);
  color: var(--ivory);
}
.btn--primary:hover {
  background: var(--gold-deep);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -12px rgba(140, 111, 69, 0.55);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(46, 42, 38, 0.28);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  transform: translateY(-2px);
}

.btn--lg { padding: 1em 2.3em; }
.btn--block { display: block; width: 100%; }

/* ── Nav ─────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.nav.is-scrolled {
  border-bottom-color: rgba(176, 141, 87, 0.18);
  box-shadow: 0 8px 30px -20px rgba(46, 42, 38, 0.25);
}

.nav__inner {
  max-width: 1080px;
  margin-inline: auto;
  padding: 0.8rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  margin-right: auto;
}
.nav__brand:hover { color: var(--ink); }

.nav__logo {
  height: 2rem;
  width: auto;
}

.footer__logo {
  height: 2.6rem;
  width: auto;
  margin-bottom: 0.9rem;
}

.nav__name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 440;
  white-space: nowrap;
}
.nav__name em { color: inherit; }

.nav__links { display: none; gap: 1.8rem; }
.nav__links a {
  font-size: var(--step--1);
  font-weight: 520;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.nav__links a:hover { color: var(--gold-deep); }

.nav__cta { padding: 0.62em 1.5em; font-size: var(--step--1); }

@media (min-width: 820px) {
  .nav__links { display: flex; }
}
@media (max-width: 480px) {
  .nav__name { display: none; }
}

/* ── Hero ────────────────────────────────────── */

.hero {
  background: linear-gradient(175deg, var(--cream) 0%, var(--ivory) 62%);
  overflow: hidden;
}

.hero__inner {
  max-width: 1080px;
  margin-inline: auto;
  padding: clamp(3rem, 2rem + 4vw, 5.5rem) var(--gutter) 0;
  display: grid;
  gap: 3rem;
}

.hero__title {
  font-size: var(--step-5);
  max-width: 15ch;
  margin-bottom: 1.4rem;
}

.hero__sub {
  font-size: var(--step-1);
  font-weight: 340;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2.2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.hero__trust {
  font-size: var(--step--1);
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  max-width: 46ch;
  margin-inline: auto;
  text-align: center;
}
.hero__trust::before {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  background: var(--gold);
  opacity: 0.55;
  margin: 0 auto 1.1rem;
}

.hero__figure {
  justify-self: center;
  position: relative;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.hero__frame {
  position: relative;
  width: min(82vw, 420px);
  border-radius: var(--radius-arch);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(46, 42, 38, 0.35);
}
.hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(250, 247, 242, 0.4);
  pointer-events: none;
}
.hero__frame img { width: 100%; height: auto; }

/* aro dorado decorativo concéntrico */
.hero__figure::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1.2px solid var(--gold);
  border-radius: var(--radius-arch);
  opacity: 0.55;
  pointer-events: none;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 2rem;
  }
  .hero__figure { justify-self: end; }
  .hero__actions { justify-content: flex-start; }
  .hero__trust { margin-inline: 0; text-align: left; }
  .hero__trust::before { margin-left: 0; }
}

/* ── Credenciales ────────────────────────────── */

.creds {
  border-block: 1px solid rgba(176, 141, 87, 0.22);
  background: var(--ivory);
}

.creds__list {
  list-style: none;
  max-width: 1080px;
  margin-inline: auto;
  padding: 2rem var(--gutter);
  display: grid;
  gap: 1.6rem;
}

.creds__list li { display: grid; gap: 0.15rem; }

.creds__list strong {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 460;
}

.creds__list span {
  font-size: var(--step--1);
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

@media (min-width: 700px) {
  .creds__list { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
}

/* ── Método ──────────────────────────────────── */

.metodo__steps {
  list-style: none;
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
  counter-reset: paso;
}

.metodo__steps li {
  border-top: 1px solid rgba(176, 141, 87, 0.3);
  padding-top: 1.6rem;
}

.metodo__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-3);
  font-weight: 380;
  color: var(--gold);
  display: block;
  margin-bottom: 0.6rem;
}

.metodo__steps h3 {
  font-size: var(--step-2);
  margin-bottom: 0.6rem;
}

.metodo__steps p {
  color: var(--ink-soft);
  font-weight: 350;
  max-width: 38ch;
}

@media (min-width: 780px) {
  .metodo__steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* ── Tratamientos ────────────────────────────── */

.cards {
  display: grid;
  gap: 1.2rem;
  margin-top: 2.8rem;
}

.card {
  background: var(--white);
  border: 1px solid rgba(176, 141, 87, 0.16);
  border-radius: 18px;
  padding: 1.8rem 1.6rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(176, 141, 87, 0.45);
  box-shadow: 0 22px 44px -26px rgba(46, 42, 38, 0.3);
}

.card h3 {
  font-size: var(--step-1);
  margin-bottom: 0.55rem;
}

.card p {
  font-size: var(--step--1);
  font-weight: 360;
  color: var(--ink-soft);
  line-height: 1.6;
}

@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ── Sobre ───────────────────────────────────── */

.sobre__grid {
  display: grid;
  gap: 3rem;
}

.sobre__figure { justify-self: center; position: relative; }

.sobre__frame {
  width: min(78vw, 380px);
  border-radius: var(--radius-arch);
  overflow: hidden;
  box-shadow: 0 30px 60px -32px rgba(46, 42, 38, 0.35);
}

.sobre__figure::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1.2px solid var(--sage);
  border-radius: var(--radius-arch);
  opacity: 0.5;
  pointer-events: none;
}

.sobre__content p { max-width: 54ch; margin-bottom: 1.1rem; font-weight: 360; }

.sobre__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.35;
  color: var(--gold-deep);
  border-left: 2px solid var(--gold);
  padding-left: 1.2rem;
  margin-top: 2rem;
  max-width: 24ch;
}

@media (min-width: 900px) {
  .sobre__grid {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
    gap: 4rem;
  }
}

/* ── Consulta / precios ──────────────────────── */

.precios {
  display: grid;
  gap: 1.4rem;
  margin-top: 2.8rem;
}

.precio {
  background: var(--white);
  border: 1px solid rgba(176, 141, 87, 0.18);
  border-radius: 22px;
  padding: 2.2rem 1.9rem;
}

.precio h3 { font-size: var(--step-2); margin-bottom: 1rem; }

.precio__monto {
  font-family: var(--serif);
  font-size: var(--step-4);
  font-weight: 440;
  line-height: 1;
}
.precio__monto span {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 520;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.precio__detalle {
  font-size: var(--step--1);
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  margin: 0.4rem 0 1.4rem;
}

.precio ul {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.6rem;
}
.precio ul li {
  font-size: var(--step--1);
  font-weight: 380;
  color: var(--ink-soft);
  padding-left: 1.4rem;
  position: relative;
}
.precio ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.precio__anticipo {
  font-size: var(--step--1);
  border-top: 1px solid rgba(176, 141, 87, 0.25);
  padding-top: 1.1rem;
  color: var(--ink-soft);
}
.precio__anticipo strong { color: var(--gold-deep); font-weight: 640; }

.consulta__como {
  margin-top: 3rem;
  background: var(--ivory);
  border: 1px solid rgba(176, 141, 87, 0.2);
  border-radius: 22px;
  padding: 2rem 1.9rem;
}

.consulta__como h3 {
  font-size: var(--step-2);
  margin-bottom: 1.2rem;
}

.consulta__como ol {
  list-style: none;
  counter-reset: paso;
  display: grid;
  gap: 0.9rem;
}
.consulta__como ol li {
  counter-increment: paso;
  font-weight: 370;
  color: var(--ink-soft);
  padding-left: 2.4rem;
  position: relative;
}
.consulta__como ol li::before {
  content: counter(paso, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05em;
  color: var(--gold);
}

@media (min-width: 720px) {
  .precios { grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
  .consulta__como ol { grid-template-columns: repeat(2, 1fr); gap: 1.1rem 2.5rem; }
}

/* ── Agenda ──────────────────────────────────── */

.agenda { text-align: center; }

.agenda__inner .section__title,
.agenda__inner .section__lead { margin-inline: auto; }

.agenda__grupos {
  display: grid;
  gap: 1.2rem;
  margin-block: 2.4rem 2rem;
  text-align: center;
}

.agenda__grupo {
  background: var(--white);
  border: 1px solid rgba(176, 141, 87, 0.18);
  border-radius: 22px;
  padding: 1.9rem 1.6rem;
}

.agenda__grupo h3 {
  font-size: var(--step-2);
  margin-bottom: 0.35rem;
}

.agenda__precio {
  font-size: var(--step--1);
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 1.3rem;
}

.agenda__botones {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
}

.agenda__horarios {
  font-size: var(--step--1);
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  line-height: 2;
}

.agenda__nota { font-size: 0.95em; }

@media (min-width: 640px) {
  .agenda__grupos { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin-inline: auto; }
  .agenda__botones { flex-direction: row; justify-content: center; }
}

/* ── FAQ ─────────────────────────────────────── */

.faq__inner { max-width: 760px; }

.faq__list { margin-top: 2.4rem; display: grid; gap: 0; }

.faq__list details {
  border-bottom: 1px solid rgba(176, 141, 87, 0.25);
}
.faq__list details:first-child { border-top: 1px solid rgba(176, 141, 87, 0.25); }

.faq__list summary {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 440;
  padding: 1.3rem 2.4rem 1.3rem 0.2rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: color 0.25s ease;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary:hover { color: var(--gold-deep); }

.faq__list summary::after {
  content: "+";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.4em;
  font-weight: 300;
  color: var(--gold);
  transition: transform 0.3s var(--ease);
}
.faq__list details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq__list details p {
  padding: 0 0.2rem 1.5rem;
  color: var(--ink-soft);
  font-weight: 370;
  max-width: 60ch;
}

/* ── Footer ──────────────────────────────────── */

.footer {
  background: var(--ink);
  color: rgba(250, 247, 242, 0.85);
}

.footer__inner {
  max-width: 1080px;
  margin-inline: auto;
  padding: 3.5rem var(--gutter) 6rem;
  display: grid;
  gap: 2.5rem;
}


.footer__name {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 440;
  color: var(--ivory);
}
.footer__name em { color: var(--gold); }

.footer__desc {
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.55);
  margin-top: 0.3rem;
}

.footer__info p, .footer__legal p { font-size: var(--step--1); font-weight: 350; margin-bottom: 0.9rem; }

.footer a { color: rgba(250, 247, 242, 0.85); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(176, 141, 87, 0.6); }
.footer a:hover { color: var(--gold); }

.footer__legal { color: rgba(250, 247, 242, 0.55); }

@media (min-width: 780px) {
  .footer__inner { grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding-bottom: 3.5rem; }
}

/* ── Sticky CTA móvil ────────────────────────── */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 0.8rem var(--gutter) calc(0.8rem + env(safe-area-inset-bottom));
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(176, 141, 87, 0.25);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}
.sticky-cta.is-visible { transform: translateY(0); }

@media (min-width: 820px) {
  .sticky-cta { display: none; }
}

/* ── Animaciones reveal ──────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
