/* Ruceli Huerta · Nutrióloga Clínica — hoja de estilos única del sitio */

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

:root {
  --marfil: #f6f2e8;
  --papel: #fcfaf5;
  --verde: #1e3b2f;
  --verde-medio: #3d6a4d;
  --oliva: #6e8c3a;
  --lima: #dfe9ae;
  --agua: #cfede7;
  --tinta: #1b2420;
  --suave: #56635b;
  --linea: rgba(30, 59, 47, 0.14);
  --error: #a3271d;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ancho: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  color: var(--tinta); background: var(--marfil);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--verde-medio); text-underline-offset: 0.2em; }
a:hover { color: var(--verde); }
:focus-visible { outline: 3px solid var(--oliva); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--verde); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-variation-settings: "opsz" 96; }
h3 { font-size: 1.35rem; line-height: 1.25; }
p { text-wrap: pretty; }

.wrap { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.seccion { padding-block: clamp(4rem, 9vw, 7rem); }
.seccion-papel { background: var(--papel); }
.intro { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.intro p { margin-top: 1rem; color: var(--suave); font-size: 1.12rem; }
.salto {
  position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 1rem;
  background: var(--verde); color: #fff; border-radius: 8px;
}
.salto:focus { top: 1rem; color: #fff; }

/* ── Botones ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.6rem; border-radius: 999px; border: 1.5px solid var(--verde);
  background: var(--verde); color: var(--papel);
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: #16302a; color: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.btn-linea { background: transparent; color: var(--verde); }
.btn-linea:hover { background: var(--verde); color: var(--papel); }
.btn-claro { background: var(--papel); color: var(--verde); border-color: var(--papel); }
.btn-claro:hover { background: #fff; color: var(--verde); }
.btn-ancho { width: 100%; }

/* ── Cabecera ──────────────────────────────────────────────────── */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 242, 232, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.cabecera.con-borde { border-color: var(--linea); }
.cabecera .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.marca { text-decoration: none; color: var(--verde); line-height: 1.1; }
.marca b { display: block; font: italic 500 1.5rem/1 var(--serif); letter-spacing: -0.01em; }
.marca span { white-space: nowrap; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--oliva); }
.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav a:not(.btn) { color: var(--tinta); text-decoration: none; font-size: 0.96rem; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--verde-medio); }
.nav .btn { padding: 0.65rem 1.2rem; font-size: 0.94rem; white-space: nowrap; }

/* ── Inicio ────────────────────────────────────────────────────── */
.inicio { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 6.5rem); }
.inicio .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.lema { font: italic 400 1.15rem var(--serif); color: var(--oliva); margin-bottom: 1.1rem; }
.inicio p.bajada { margin-top: 1.4rem; font-size: 1.2rem; color: var(--suave); max-width: 33rem; }
.acciones { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.1rem; }
.datos { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 1rem 1.6rem; margin-top: 2.6rem; padding: 1.4rem 0 0; border-top: 1px solid var(--linea); list-style: none; }
.datos li { font-size: 0.93rem; color: var(--suave); }
.datos b { display: block; font: 500 1.12rem var(--serif); color: var(--verde); white-space: nowrap; }

/* Acuarela viva: el único efecto ambiental de la página, tomado del logotipo */
.acuarela { position: absolute; inset: -10% -5% 0 35%; pointer-events: none; filter: url(#papel-acuarela) blur(26px); opacity: 0.9; }
.acuarela i { position: absolute; border-radius: 50%; animation: deriva 26s ease-in-out infinite alternate; }
.acuarela i:nth-child(1) { width: 46%; aspect-ratio: 1; left: 12%; top: 6%; background: var(--agua); }
.acuarela i:nth-child(2) { width: 34%; aspect-ratio: 1; right: 4%; top: 30%; background: var(--lima); animation-delay: -9s; }
.acuarela i:nth-child(3) { width: 30%; aspect-ratio: 1; left: 30%; bottom: 0; background: #e3f1d9; animation-delay: -17s; }
@keyframes deriva {
  from { transform: translate3d(-3%, 2%, 0) scale(1); }
  to   { transform: translate3d(5%, -4%, 0) scale(1.12); }
}

.retrato { position: relative; justify-self: center; width: min(86%, 23rem); margin: 3rem 0; }
.retrato img { position: relative; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 12%; border-radius: 50%; box-shadow: 0 30px 60px -30px rgba(30, 59, 47, 0.45); }
.plato { position: absolute; inset: -12.5%; color: var(--oliva); animation: girar 140s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.retrato figcaption {
  position: absolute; left: -1.6rem; bottom: 0.4rem; padding: 0.7rem 1.1rem;
  background: var(--papel); border-radius: 0.9rem; box-shadow: 0 14px 30px -14px rgba(30, 59, 47, 0.35);
  font-size: 0.88rem; color: var(--suave); line-height: 1.3;
}
.retrato figcaption b { display: block; font: 500 1.05rem var(--serif); color: var(--verde); }

/* ── Programas ─────────────────────────────────────────────────── */
.programas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: stretch; }
.programa {
  position: relative; display: flex; flex-direction: column;
  padding: 2.2rem 1.9rem 1.9rem; border-radius: 1.5rem;
  background: var(--papel); border: 1px solid var(--linea);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.programa:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(30, 59, 47, 0.4); }
.programa h3 { font-size: 1.9rem; }
.programa .para { margin-top: 0.5rem; font: italic 400 1.12rem/1.35 var(--serif); color: var(--oliva); }
.programa .cuando { margin-top: 1rem; color: var(--suave); font-size: 1rem; }
.programa ul { margin: 1.4rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--linea); list-style: none; font-size: 0.95rem; }
.programa li { padding-left: 1.3rem; position: relative; margin-bottom: 0.45rem; }
.programa li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--oliva); }
.precio { margin-top: auto; padding-top: 1.7rem; display: flex; align-items: baseline; gap: 0.6rem; }
.precio b { font: 400 2.5rem/1 var(--serif); color: var(--verde); font-variation-settings: "opsz" 144; }
.precio span { font-size: 0.9rem; color: var(--suave); }
.programa .btn { margin-top: 1.3rem; }
.programa.destacado { background: var(--verde); border-color: var(--verde); color: #e9efe6; }
.programa.destacado h3, .programa.destacado .precio b { color: #fff; }
.programa.destacado .para { color: var(--lima); }
.programa.destacado .cuando, .programa.destacado .precio span { color: #c3d1c5; }
.programa.destacado ul { border-color: rgba(255, 255, 255, 0.18); }
.programa.destacado li::before { background: var(--lima); }
.sello { align-self: flex-start; margin: -0.6rem 0 0.9rem; padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--lima); color: var(--verde); font-size: 0.78rem; font-weight: 700; }
.nota { margin-top: 1.6rem; font-size: 0.93rem; color: var(--suave); max-width: 46rem; }

/* ── Cómo funciona ─────────────────────────────────────────────── */
.pasos { list-style: none; padding: 0; counter-reset: paso; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1rem; }
.pasos li { counter-increment: paso; position: relative; padding-top: 3.1rem; font-size: 0.97rem; color: var(--suave); }
.pasos li::before {
  content: counter(paso); position: absolute; top: 0; left: 0;
  width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--marfil); border: 1.5px solid var(--oliva); color: var(--verde);
  font: 500 1.05rem var(--serif);
}
.pasos li::after { content: ""; position: absolute; top: 1.15rem; left: 2.8rem; right: -0.5rem; border-top: 1.5px dotted var(--oliva); opacity: 0.6; }
.pasos li:last-child::after { display: none; }
.pasos b { display: block; font: 500 1.08rem/1.25 var(--serif); color: var(--verde); margin-bottom: 0.3rem; }

/* ── Bloques de dos columnas ───────────────────────────────────── */
.dos { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.dos > div > p { margin-top: 1.1rem; color: var(--suave); }
.firma { margin-top: 1.6rem; font: italic 500 1.5rem var(--serif); color: var(--verde); }
.tarjetas { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.tarjeta { padding: 1.7rem; border-radius: 1.3rem; background: var(--papel); border: 1px solid var(--linea); }
.seccion-papel .tarjeta { background: var(--marfil); }
.tarjeta p { margin-top: 0.6rem; color: var(--suave); font-size: 0.98rem; }
.lista { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
.lista li { padding: 1.15rem 0; border-top: 1px solid var(--linea); }
.lista b { display: block; font: 500 1.15rem var(--serif); color: var(--verde); }
.lista span { color: var(--suave); font-size: 0.97rem; }

/* ── Preguntas ─────────────────────────────────────────────────── */
.preguntas { max-width: 48rem; }
.preguntas details { border-top: 1px solid var(--linea); }
.preguntas details:last-child { border-bottom: 1px solid var(--linea); }
.preguntas summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.25rem 0; cursor: pointer; list-style: none;
  font: 500 1.18rem/1.3 var(--serif); color: var(--verde);
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: "+"; flex-shrink: 0; font: 300 1.7rem/1 var(--sans); color: var(--oliva); transition: transform 0.3s var(--ease); }
.preguntas details[open] summary::after { transform: rotate(45deg); }
.respuesta { padding: 0 2.5rem 1.4rem 0; color: var(--suave); }
.respuesta p + p, .respuesta ul { margin-top: 0.7rem; }
.respuesta ul { padding-left: 1.2rem; }
.respuesta li { margin-bottom: 0.3rem; }

/* ── Cierre y pie ──────────────────────────────────────────────── */
.cierre { background: var(--verde); color: #dfe8e0; text-align: center; }
.cierre h2 { color: #fff; max-width: 30rem; margin-inline: auto; }
.cierre p { margin: 1rem auto 0; max-width: 32rem; }
.cierre .acciones { justify-content: center; }
.cierre .btn-linea { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.cierre .btn-linea:hover { background: #fff; color: var(--verde); }
.pie { background: #16302a; color: #b9c7bc; font-size: 0.9rem; padding-block: 2.6rem; }
.pie .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.pie a { color: #e3ebe4; }
.pie ul { list-style: none; padding: 0; }
.pie li { margin-bottom: 0.4rem; }
.pie .marca b, .pie .marca { color: #fff; }
.pie small { display: block; margin-top: 0.9rem; font-size: 0.82rem; line-height: 1.5; }

/* ── Diálogo de compra ─────────────────────────────────────────── */
dialog {
  width: min(100% - 1.5rem, 30rem); max-height: calc(100dvh - 1.5rem); margin: auto; padding: 0; border: none;
  border-radius: 1.5rem; background: var(--papel); color: var(--tinta);
  box-shadow: 0 40px 80px -30px rgba(15, 30, 24, 0.6); overflow: auto;
}
dialog::backdrop { background: rgba(22, 48, 42, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog[open] { animation: subir 0.35s var(--ease); }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } }
.dialogo { padding: 2rem 1.8rem 1.8rem; }
.dialogo h2 { font-size: 1.7rem; }
.dialogo .resumen { margin: 0.5rem 0 1.4rem; color: var(--suave); }
.cerrar { position: absolute; top: 0.9rem; right: 0.9rem; width: 2.4rem; height: 2.4rem; border: none; border-radius: 50%; background: transparent; color: var(--suave); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cerrar:hover { background: var(--marfil); color: var(--verde); }

.campo { margin-bottom: 1rem; }
.campo label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; font-weight: 600; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"] {
  width: 100%; padding: 0.8rem 0.95rem; border-radius: 0.75rem;
  border: 1.5px solid var(--linea); background: #fff; color: var(--tinta); font: inherit;
}
.campo input:focus-visible { outline: none; border-color: var(--verde-medio); box-shadow: 0 0 0 4px rgba(110, 140, 58, 0.2); }
.campo small { display: block; margin-top: 0.3rem; font-size: 0.82rem; color: var(--suave); }
.casilla { display: flex; gap: 0.65rem; align-items: flex-start; margin-bottom: 0.7rem; font-size: 0.9rem; color: var(--suave); cursor: pointer; }
.casilla input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--verde); }
.aviso { padding: 0.8rem 1rem; margin-bottom: 1rem; border-radius: 0.75rem; background: #fbeae7; color: var(--error); font-size: 0.93rem; }
.aviso.ok { background: #e7f1df; color: var(--verde); }
.candado { margin-top: 0.9rem; font-size: 0.82rem; color: var(--suave); text-align: center; }

/* ── Página de agenda ──────────────────────────────────────────── */
.hoja { max-width: 40rem; margin: clamp(1.5rem, 5vw, 3.5rem) auto; padding: clamp(1.6rem, 4vw, 2.8rem); background: var(--papel); border: 1px solid var(--linea); border-radius: 1.6rem; }
.hoja h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.hoja section > p { margin-top: 0.8rem; color: var(--suave); }
.hoja .pila + p { margin-top: 1.4rem; font-size: 0.93rem; }
.hoja h2 { font-size: 1.25rem; margin: 2rem 0 0.8rem; }
.dias { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.2rem 0.1rem 0.8rem; scrollbar-width: thin; }
.dia, .hora, .modo {
  border: 1.5px solid var(--linea); background: #fff; color: var(--tinta);
  font: inherit; cursor: pointer; transition: all 0.2s var(--ease);
}
.dia { flex: 0 0 3.9rem; padding: 0.55rem 0; border-radius: 0.9rem; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.dia small { font-size: 0.72rem; color: var(--suave); text-transform: capitalize; }
.dia b { font: 500 1.3rem var(--serif); }
.horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); gap: 0.55rem; }
.hora { padding: 0.7rem 0.3rem; border-radius: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; animation: subir 0.3s var(--ease) backwards; }
.modos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.modo { padding: 1rem; border-radius: 0.9rem; text-align: left; }
.modo b { display: block; font: 500 1.1rem var(--serif); color: var(--verde); }
.modo span { font-size: 0.88rem; color: var(--suave); }
.dia:hover, .hora:hover, .modo:hover { border-color: var(--verde-medio); }
.dia[aria-pressed="true"], .hora[aria-pressed="true"], .modo[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: #fff; }
.dia[aria-pressed="true"] small, .modo[aria-pressed="true"] span, .modo[aria-pressed="true"] b { color: #fff; }
.vacio { padding: 1rem; border: 1px dashed var(--linea); border-radius: 0.75rem; color: var(--suave); text-align: center; font-size: 0.95rem; }
.ficha { margin-top: 1.6rem; border: 1px solid var(--linea); border-radius: 1.1rem; background: #fff; }
.ficha div { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--linea); }
.ficha div:last-child { border-bottom: none; }
.ficha dt { color: var(--suave); font-size: 0.93rem; }
.ficha dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pila { display: grid; gap: 0.7rem; margin-top: 1.5rem; }

/* ── Páginas legales ───────────────────────────────────────────── */
.legal { max-width: 46rem; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
.legal h2 { font-size: 1.4rem; margin: 2.2rem 0 0.7rem; }
.legal p, .legal li { color: #3c4841; }
.legal p + p { margin-top: 0.8rem; }
.legal ul { padding-left: 1.3rem; margin-top: 0.6rem; }
.legal li { margin-bottom: 0.35rem; }
.legal .fecha { color: var(--suave); margin-top: 0.6rem; }

/* ── Responsivo ────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav a:not(.btn) { display: none; }
  .inicio .wrap, .dos { grid-template-columns: 1fr; }
  .acuarela { inset: 30% -20% 0 -20%; }
  .retrato { width: min(70%, 19rem); margin: 3.2rem auto 2rem; }
  .programas { grid-template-columns: 1fr; max-width: 30rem; }
  .pasos { grid-template-columns: 1fr; gap: 0; }
  .pasos li { padding: 0 0 1.6rem 3.4rem; min-height: 3.4rem; }
  .pasos li::after { top: 2.6rem; bottom: 0.2rem; left: 1.12rem; right: auto; border-top: none; border-left: 1.5px dotted var(--oliva); }
  .pie .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .tarjetas, .lista, .modos, .datos { grid-template-columns: 1fr; }
  .nav .btn { padding: 0.55rem 0.95rem; font-size: 0.88rem; }
  .marca b { font-size: 1.3rem; }
  .retrato figcaption { left: -1.4rem; }
  .respuesta { padding-right: 0; }
  .ficha div { flex-direction: column; gap: 0.1rem; }
  .ficha dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
