/* MAX by MAXIMIZA — maximizatuclinica.com
   Paleta: tinta casi negra, papel cálido, acento vino (#8E1B2B, el de la marca).
   Sin framework: ~600 líneas que se leen y se editan sin build. */

:root {
  --tinta: #14100f;
  --tinta-suave: #4a423e;
  --papel: #fbf8f5;
  --papel-2: #f3ede7;
  --linea: #e2d9d1;
  --vino: #8e1b2b;
  --vino-claro: #b23346;
  --verde: #1f6b5a;
  --ancho: 1180px;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(20, 16, 15, .04), 0 12px 32px rgba(20, 16, 15, .06);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--papel);
  color: var(--tinta);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.12; letter-spacing: -.015em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.16rem; font-family: "Inter", sans-serif; font-weight: 650; letter-spacing: -.01em; }
p { color: var(--tinta-suave); }
a { color: inherit; }

.env { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 24px; }
section { padding: clamp(64px, 9vw, 116px) 0; }
.centro { text-align: center; max-width: 720px; margin: 0 auto; }

.kicker {
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--vino); margin-bottom: 18px;
}
.lead { font-size: 1.12rem; margin-top: 18px; }

/* ── Botones ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: .97rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primario { background: var(--vino); color: #fff; box-shadow: 0 8px 22px rgba(142, 27, 43, .26); }
.btn-primario:hover { background: var(--vino-claro); transform: translateY(-1px); }
.btn-fantasma { border-color: rgba(251, 248, 245, .45); color: #fff; }
.btn-fantasma:hover { background: rgba(251, 248, 245, .12); }
.btn-linea { border-color: var(--linea); background: #fff; }
.btn-linea:hover { border-color: var(--tinta); }

/* ── Encabezado ──────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 245, .86); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
header.pegado { border-color: var(--linea); }
header .env { display: flex; align-items: center; gap: 28px; height: 70px; }
.marca { font-family: "Fraunces", serif; font-size: 1.3rem; font-weight: 600; text-decoration: none; letter-spacing: -.02em; }
.marca span { color: var(--vino); }
nav { display: flex; gap: 26px; margin-left: auto; }
nav a { font-size: .93rem; text-decoration: none; color: var(--tinta-suave); }
nav a:hover { color: var(--tinta); }
header .btn { padding: 11px 20px; font-size: .9rem; }

/* ── Portada ─────────────────────────────────────────────── */
.portada { position: relative; color: #fff; padding: clamp(96px, 14vw, 168px) 0 clamp(72px, 10vw, 120px); overflow: hidden; }
.portada img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 60% 40%;
}
.portada::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(104deg, rgba(14, 11, 10, .92) 0%, rgba(14, 11, 10, .78) 42%, rgba(14, 11, 10, .35) 74%, rgba(14, 11, 10, .1) 100%);
}
.portada .env { position: relative; z-index: 2; }
.portada .kicker { color: #e9b3bb; }
.portada h1 { color: #fff; max-width: 15ch; }
.portada .lead { color: rgba(251, 248, 245, .82); max-width: 54ch; font-size: 1.16rem; }
.acciones { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.puntos { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(251, 248, 245, .18); }
.puntos div { display: flex; align-items: baseline; gap: 10px; color: rgba(251, 248, 245, .9); font-size: .95rem; }
.puntos b { font-family: "Fraunces", serif; color: #e9b3bb; font-size: .9rem; }

/* ── Rejillas ────────────────────────────────────────────── */
.rejilla { display: grid; gap: 22px; margin-top: 52px; }
.col-2 { grid-template-columns: repeat(2, 1fr); }
.col-3 { grid-template-columns: repeat(3, 1fr); }

.tarjeta {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 30px 28px; box-shadow: var(--sombra);
}
.tarjeta h3 { margin-bottom: 10px; }
.tarjeta p { font-size: .97rem; }
.num { font-family: "Fraunces", serif; font-size: .88rem; color: var(--vino); display: block; margin-bottom: 14px; letter-spacing: .04em; }

/* ── El problema (fondo oscuro) ──────────────────────────── */
.oscuro { background: var(--tinta); color: var(--papel); }
.oscuro h2 { color: var(--papel); }
.oscuro p { color: rgba(251, 248, 245, .72); }
.oscuro .kicker { color: #e9b3bb; }
.oscuro .tarjeta { background: rgba(251, 248, 245, .045); border-color: rgba(251, 248, 245, .14); box-shadow: none; }
.oscuro .tarjeta h3 { color: var(--papel); }

.duo { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.duo img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radio); }

/* ── Límites ─────────────────────────────────────────────── */
.limite { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--linea); }
.limite:last-child { border-bottom: 0; }
.limite b { font-family: "Fraunces", serif; color: var(--vino); font-size: .9rem; min-width: 26px; }
.limite p { font-size: .98rem; }
.limite strong { color: var(--tinta); font-weight: 600; }

.blindaje {
  margin-top: 46px; padding: 38px; border-radius: var(--radio);
  background: linear-gradient(135deg, #14100f, #2a1f1d); color: var(--papel);
}
.blindaje h3 { color: #fff; font-family: "Fraunces", serif; font-size: 1.5rem; margin-bottom: 14px; }
.blindaje p { color: rgba(251, 248, 245, .78); max-width: 62ch; }

/* ── Listas sí / no ──────────────────────────────────────── */
.listas { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 48px; }
.lista { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 30px 28px; }
.lista h3 { margin-bottom: 18px; }
.lista li { list-style: none; display: flex; gap: 12px; padding: 11px 0; font-size: .97rem; color: var(--tinta-suave); border-top: 1px solid var(--papel-2); }
.lista li:first-of-type { border-top: 0; }
.marca-si { color: var(--verde); font-weight: 700; }
.marca-no { color: var(--vino); font-weight: 700; }

/* ── Preguntas ───────────────────────────────────────────── */
details {
  border-bottom: 1px solid var(--linea); padding: 20px 0;
}
details summary {
  cursor: pointer; font-weight: 600; font-size: 1.03rem; list-style: none;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--vino); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin-top: 12px; font-size: .98rem; max-width: 72ch; }

/* ── Formulario ──────────────────────────────────────────── */
.solicitud { background: var(--papel-2); }
.caja {
  background: #fff; border: 1px solid var(--linea); border-radius: 18px;
  padding: clamp(28px, 4vw, 46px); box-shadow: var(--sombra); max-width: 760px; margin: 44px auto 0;
}
.barra { display: flex; gap: 8px; margin-bottom: 30px; }
.barra div { height: 4px; flex: 1; background: var(--papel-2); border-radius: 999px; }
.barra div.activo { background: var(--vino); }
.paso { display: none; }
.paso.visible { display: block; animation: entra .3s ease; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.paso h3 { font-family: "Fraunces", serif; font-size: 1.45rem; margin-bottom: 6px; }
.paso > p { font-size: .95rem; margin-bottom: 26px; }

.campo { margin-bottom: 22px; }
.campo label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.campo .nota { font-weight: 400; color: var(--tinta-suave); font-size: .86rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--linea); border-radius: 10px;
  font: inherit; font-size: .97rem; background: #fff; color: var(--tinta);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(142, 27, 43, .35); outline-offset: 1px; border-color: var(--vino); }
textarea { min-height: 96px; resize: vertical; }

.opciones { display: grid; gap: 10px; }
.opciones.dos { grid-template-columns: 1fr 1fr; }
.opcion {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  border: 1px solid var(--linea); border-radius: 10px; cursor: pointer; font-size: .95rem;
  transition: border-color .15s ease, background .15s ease;
}
.opcion:hover { border-color: var(--tinta-suave); }
.opcion input { accent-color: var(--vino); width: 17px; height: 17px; }
.opcion:has(input:checked) { border-color: var(--vino); background: rgba(142, 27, 43, .04); }

.navegacion { display: flex; gap: 12px; margin-top: 32px; }
.navegacion .btn { flex: 1; justify-content: center; }
.error { color: var(--vino); font-size: .9rem; margin-top: 14px; min-height: 20px; }
.trampa { position: absolute; left: -9999px; opacity: 0; }

.gracias { text-align: center; padding: 20px 0; }
.gracias .palomita { font-size: 2.6rem; color: var(--verde); }
.gracias h3 { font-family: "Fraunces", serif; font-size: 1.6rem; margin: 12px 0; }

/* ── Cierre y pie ────────────────────────────────────────── */
.cierre { background: var(--tinta); color: var(--papel); text-align: center; }
.cierre h2 { color: #fff; max-width: 18ch; margin: 0 auto; }
.cierre p { color: rgba(251, 248, 245, .75); max-width: 52ch; margin: 20px auto 34px; }

footer { background: var(--tinta); color: rgba(251, 248, 245, .6); padding: 40px 0; border-top: 1px solid rgba(251, 248, 245, .12); font-size: .9rem; }
footer .env { display: flex; flex-wrap: wrap; gap: 16px 30px; align-items: center; }
footer a { color: rgba(251, 248, 245, .75); }
footer .der { margin-left: auto; }

/* ── Aparición al hacer scroll ───────────────────────────── */
.aparece { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.aparece.visto { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .aparece { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Teléfono ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .col-3, .col-2, .listas, .opciones.dos { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; gap: 32px; }
  .duo img { max-height: 340px; }
  nav { display: none; }
  .portada::after { background: linear-gradient(180deg, rgba(14, 11, 10, .9) 0%, rgba(14, 11, 10, .82) 60%, rgba(14, 11, 10, .72) 100%); }
  .puntos { gap: 12px; }
  .puntos div { width: 100%; }
  footer .der { margin-left: 0; }
}
