:root {
  --carbon: #101114;
  --carbon-2: #1E2127;
  --blanco: #FFFFFF;
  --escarcha: #F3F5F7;
  --gris-frio: #D9DDE2;
  --hielo: #A8C8DD;
  --hielo-profundo: #4F7590;
  --texto-suave: #545B66;
  --corte: 14px;
  --display: "Chakra Petch", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--carbon);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--hielo-profundo); outline-offset: 3px; }
.contenedor { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* Encabezado */
.encabezado { background: var(--carbon); color: var(--blanco); }
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.marca { display: inline-flex; }
.marca svg { height: 30px; width: auto; }
.ayuda { font-weight: 500; text-decoration: none; color: var(--gris-frio); font-size: 0.97rem; }
.ayuda:hover { color: var(--blanco); }
@media (max-width: 480px) { .solo-amplio { display: none; } }

/* Portada */
.portada { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem); }
.portada .contenedor { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 860px) { .portada .contenedor { grid-template-columns: 1fr 1.05fr; gap: 3rem; } }
.portada h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.3rem, 7.2vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  max-width: 13ch;
}
.portada p { margin: 0 0 1.75rem; color: var(--texto-suave); max-width: 40ch; font-size: 1.12rem; }
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.6rem;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.01em;
  background: var(--carbon); color: var(--blanco); text-decoration: none; border: 0; cursor: pointer;
  clip-path: polygon(var(--corte) 0, 100% 0, 100% calc(100% - var(--corte)), calc(100% - var(--corte)) 100%, 0 100%, 0 var(--corte));
}
.boton:hover { background: var(--carbon-2); }
.portada-imagen { margin-inline: -0.5rem; }

/* Paquetes */
.paquetes { background: var(--escarcha); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.paquetes h2, .pasos h2, .preguntas h2 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: 1.1; margin: 0 0 0.5rem;
}
.nota { margin: 0 0 2rem; color: var(--texto-suave); max-width: 52ch; }
.rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
@media (min-width: 760px) { .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }

/* Ficha de paquete: el borde se dibuja con dos capas recortadas en diagonal */
.ficha {
  --c: 18px;
  background: var(--gris-frio);
  padding: 1px;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.ficha-interior {
  background: var(--blanco);
  height: 100%;
  display: flex; flex-direction: column;
  clip-path: inherit;
  padding: 0.4rem 0.9rem 1rem;
}
.ficha img { aspect-ratio: 1072 / 776; width: 100%; object-fit: contain; margin-bottom: 0.4rem; }
.cantidad { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; margin: 0; }
.cantidad strong {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 7vw, 2.9rem); line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cantidad span { font-weight: 500; color: var(--texto-suave); }
.precio { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 0.35rem 0 1rem; }
.precio small { font-family: var(--body); font-weight: 500; color: var(--texto-suave); font-size: 0.85rem; }
.ficha .boton { margin-top: auto; width: 100%; min-height: 46px; --corte: 10px; font-size: 1rem; }

/* Pasos */
.pasos { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.lista-pasos { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.5rem; counter-reset: paso; }
@media (min-width: 760px) { .lista-pasos { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }
.lista-pasos li { counter-increment: paso; border-top: 2px solid var(--carbon); padding-top: 1rem; }
.lista-pasos li::before {
  content: counter(paso);
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--hielo-profundo);
  display: block; margin-bottom: 0.6rem;
}
.lista-pasos h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 0 0 0.35rem; }
.lista-pasos p { margin: 0; color: var(--texto-suave); }

/* Preguntas */
.preguntas { background: var(--escarcha); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.preguntas .contenedor { max-width: 760px; }
details { border-bottom: 1px solid var(--gris-frio); }
details:first-of-type { border-top: 1px solid var(--gris-frio); margin-top: 1.5rem; }
summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 1.12rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 0.25rem; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--carbon); border-bottom: 2px solid var(--carbon);
  transform: translateY(-70%) rotate(45deg);
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { margin: 0 0 1.2rem; color: var(--texto-suave); max-width: 60ch; }

/* Pie */
.pie { background: var(--carbon); color: var(--gris-frio); padding: 2.5rem 0; font-size: 0.95rem; }
.pie .contenedor { display: grid; gap: 1rem; }
.pie svg { height: 26px; width: auto; }
.pie p { margin: 0; max-width: 62ch; }

/* Hoja de compra */
dialog.hoja {
  border: 0; padding: 0; margin: auto auto 0; width: min(560px, 100%); max-width: 100%;
  background: var(--blanco); color: var(--carbon);
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px);
}
@media (min-width: 640px) { dialog.hoja { margin: auto; clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px); } }
dialog.hoja::backdrop { background: rgba(16, 17, 20, 0.62); }
dialog.hoja[open] { animation: subir 220ms ease-out; }
@keyframes subir { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.hoja[open] { animation: none; } }
.hoja form { padding: 1.6rem 1.4rem 1.8rem; display: grid; gap: 0.9rem; }
.hoja-cabeza { display: flex; align-items: center; gap: 1rem; }
.hoja-cabeza img { width: 92px; }
.hoja h2 { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; margin: 0; }
.hoja .precio { margin: 0.2rem 0 0; }
label { font-weight: 600; }
.ayuda-campo { margin: -0.5rem 0 0; color: var(--texto-suave); font-size: 0.95rem; }
input[type="text"] {
  width: 100%; min-height: 52px; padding: 0 1rem; font: 600 1.15rem/1 var(--display); letter-spacing: 0.04em;
  border: 2px solid var(--gris-frio); background: var(--escarcha); color: var(--carbon);
}
input[type="text"]:focus { border-color: var(--hielo-profundo); outline: none; background: var(--blanco); }
input[aria-invalid="true"] { border-color: #B3261E; }
.error { color: #B3261E; font-weight: 500; margin: -0.4rem 0 0; min-height: 1.4em; }
.metodos { border: 0; padding: 0; margin: 0; min-width: 0; }
.metodos legend { font-weight: 600; padding: 0; margin-bottom: 0.5rem; }
.opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.opciones label { position: relative; font-weight: 600; }
.opciones input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opciones span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 50px; padding: 0.3rem 0.4rem; line-height: 1.15;
  font-family: var(--display); font-size: 0.98rem;
  background: var(--escarcha); border: 2px solid var(--gris-frio); color: var(--texto-suave);
}
.opciones input:checked + span { background: var(--blanco); border-color: var(--carbon); color: var(--carbon); }
.opciones input:focus-visible + span { outline: 3px solid var(--hielo-profundo); outline-offset: 2px; }
.acciones { display: grid; gap: 0.6rem; margin-top: 0.3rem; }
.boton-secundario {
  background: none; border: 0; cursor: pointer; font: 500 1rem var(--body); color: var(--texto-suave);
  min-height: 44px; text-decoration: underline; text-underline-offset: 3px;
}

/* Añadidos para el sitio final */
picture { display: block; }
.precio-consulta { font-family: var(--body); font-weight: 600; font-size: 0.95rem; color: var(--texto-suave); }
.marca img { height: 30px; width: auto; }
.pie .logo-pie { height: 26px; width: auto; }
.hoja-img { width: 92px; flex-shrink: 0; }
.ficha-wrap > .ficha { height: 100%; }
