:root {
  --tinta: #14261c;
  --verde: #0f3d28;
  --hoja: #1f6b45;
  --crema: #f3ecdf;
  --papel: #fffdf8;
  --tomate: #9f2d24;
  --tomate-claro: #c4453a;
  --maiz: #e2b43a;
  --linea: #e4d9c6;
  --suave: #3e5148;
  --sombra: 0 18px 50px rgba(20, 38, 28, 0.08);
  --ancho: 1120px;
  --fuente: Outfit, "Segoe UI", sans-serif;
  --display: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 1.05rem;
  line-height: 1.5;
  background-color: var(--crema);
  background-image: radial-gradient(rgba(20, 38, 28, 0.045) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  padding-bottom: 92px;
}

body.lista-abierta { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

h1, h2, .marca strong, .grupo h3, .pasos h3, .promesa h3 {
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.03em;
}

.saltar {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--verde);
  color: var(--papel);
  padding: 10px 14px;
  border-radius: 10px;
}

.saltar:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--tomate-claro);
  outline-offset: 3px;
}

.toldo {
  height: 16px;
  background: repeating-linear-gradient(
    90deg,
    var(--tomate) 0 22px,
    var(--crema) 22px 34px,
    var(--verde) 34px 56px,
    var(--crema) 56px 68px
  );
}

.envoltorio {
  width: min(var(--ancho), calc(100% - 32px));
  margin-inline: auto;
}

.barra {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 236, 223, 0.92);
  backdrop-filter: blur(12px);
}

.barra.con-sombra { box-shadow: 0 8px 24px rgba(20, 38, 28, 0.06); }

.barra-interna {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  width: min(var(--ancho), calc(100% - 32px));
  margin-inline: auto;
}

.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.marca svg { width: 42px; height: 42px; flex: none; }

.marca strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1;
}

.marca small {
  display: block;
  margin-top: 3px;
  color: var(--suave);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: none;
  gap: 6px;
  align-items: center;
}

.nav a.btn { color: var(--papel); }

.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.nav a:hover { background: rgba(15, 61, 40, 0.06); }

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--papel);
}

.menu-icono,
.menu-icono::before,
.menu-icono::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--tinta);
  position: relative;
}

.menu-icono::before,
.menu-icono::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icono::before { top: -5px; }
.menu-icono::after { top: 5px; }

.menu-etiqueta { font-weight: 600; font-size: 0.92rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
}

.btn-verde { background: var(--verde); color: var(--papel); }
.btn-verde:hover { background: #145238; }

.btn-papel {
  background: transparent;
  color: var(--verde);
  border: 1.5px solid var(--verde);
}

.btn-tomate { background: var(--tomate); color: var(--papel); }
.btn-tomate:hover { background: #841f19; }

.btn.apagado { opacity: 0.45; }

button:disabled { opacity: 0.45; cursor: not-allowed; }

.hero { padding: 36px 0 12px; }

.hero-cuerpo {
  display: grid;
  gap: 28px;
  align-items: end;
}

.ceja {
  margin-bottom: 12px;
  color: var(--verde);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.7rem, 8vw, 5.5rem);
  line-height: 0.95;
}

h1 em {
  font-style: italic;
  font-weight: 560;
  color: var(--tomate);
}

.bajada {
  max-width: 38rem;
  margin-top: 18px;
  color: var(--suave);
  font-size: 1.12rem;
}

.hero-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.ticket {
  position: relative;
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: 22px;
  box-shadow: var(--sombra);
  padding: 34px 22px 18px;
}

.ticket-cinta {
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 11px;
  border-radius: 0 0 3px 3px;
  background: repeating-linear-gradient(90deg, var(--tomate-claro) 0 12px, var(--crema) 12px 24px);
}

.ticket-cabeza {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--linea);
}

.ticket-cabeza strong {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 560;
}

.ticket-cabeza span {
  color: var(--suave);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket ul {
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.ticket li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--linea);
}

.ticket li span { color: var(--suave); font-size: 0.92rem; }

.ticket-pie {
  margin-top: 12px;
  color: var(--suave);
  font-size: 0.92rem;
}

.cinta {
  margin-top: 42px;
  overflow: hidden;
  border-block: 1px solid var(--linea);
  background: rgba(255, 253, 248, 0.7);
}

.cinta-pista {
  display: flex;
  gap: 28px;
  width: max-content;
  padding: 12px 0;
  animation: correr 28s linear infinite;
}

.cinta span {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cinta span::before {
  content: "·";
  margin-right: 28px;
  color: var(--tomate);
}

@keyframes correr {
  to { transform: translateX(-50%); }
}

.seccion { padding: 64px 0; }

.seccion-cabeza {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; }

.seccion-cabeza p { max-width: 40rem; color: var(--suave); }

.herramientas { display: grid; gap: 12px; margin-bottom: 18px; }

.buscar {
  display: grid;
  gap: 6px;
}

.buscar span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--suave);
}

.buscar input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--linea);
  border-radius: 14px;
  background: var(--papel);
}

.filtros {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filtros::-webkit-scrollbar { display: none; }

.filtro {
  flex: none;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
}

.filtro[aria-pressed="true"] {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--papel);
}

.surtido-rejilla { display: grid; gap: 18px; }

.grupo {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 12px;
}

.grupo h3 { font-size: 1.55rem; margin-bottom: 12px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.item {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #d9cdb8;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
}

.item[aria-pressed="true"] {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--papel);
}

.sin-busca {
  padding: 18px;
  border: 1px dashed var(--linea);
  border-radius: 16px;
  color: var(--suave);
}

.hoja {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: 22px;
  box-shadow: var(--sombra);
  padding: 16px;
}

.hoja-tope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.hoja h2 { font-size: 1.8rem; }

#conteo-hoja {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--maiz);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: 0.15em;
}

.cerrar {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
}

#lista {
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

#lista li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 4px 4px 4px 12px;
  border-radius: 12px;
  background: var(--crema);
}

.quitar {
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tomate);
  font-size: 0.85rem;
  font-weight: 700;
}

.lista-vacia { color: var(--suave); margin: 12px 0 16px; }

.hoja-acciones { display: grid; gap: 8px; }
#copiar { min-width: 148px; }

.nota {
  margin-top: 10px;
  color: var(--suave);
  font-size: 0.88rem;
}

.velo {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20, 38, 28, 0.45);
}

.ver-lista {
  position: fixed;
  z-index: 35;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  box-shadow: var(--sombra);
}

.ver-lista span {
  min-width: 1.6rem;
  height: 1.6rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--maiz);
  color: var(--tinta);
  font-size: 0.85rem;
}

body.lista-abierta .ver-lista { display: none; }

.anuncio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.promesas, .pasos {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promesa, .pasos li {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: 22px;
  padding: 18px;
}

.promesa span, .pasos li > span {
  display: block;
  margin-bottom: 8px;
  color: var(--tomate);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3rem;
}

.promesa h3, .pasos h3 { font-size: 1.45rem; margin-bottom: 6px; }

.promesa p, .pasos p { color: var(--suave); }

.contacto {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 22px;
  background: var(--verde);
  color: var(--papel);
}

.dato { display: grid; gap: 2px; }
.dato span {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}
.dato strong { font-size: 1.15rem; }

.nota-js {
  margin: 16px auto;
  width: min(var(--ancho), calc(100% - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff4d2;
}

.pie {
  padding: 28px 0 36px;
  border-top: 1px solid var(--linea);
}

.pie-interno {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  align-items: center;
}

.pie nav { display: flex; gap: 14px; }
.pie a { text-decoration: none; font-weight: 600; }
.pie p { color: var(--suave); font-size: 0.92rem; }

.pagina-404 { padding-bottom: 0; }

.error-cuerpo {
  width: min(720px, calc(100% - 32px));
  margin: 12vh auto;
}

.error-cuerpo h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
.error-cuerpo .bajada { margin-bottom: 22px; }

@media (max-width: 860px) {
  .nav.abierto {
    display: flex;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--papel);
    border: 1px solid var(--linea);
    border-radius: 18px;
    box-shadow: var(--sombra);
  }

  .hoja {
    position: fixed;
    z-index: 50;
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-height: min(78vh, 640px);
    overflow: auto;
    transform: translateY(120%);
    visibility: hidden;
  }

  .hoja.abierta {
    transform: none;
    visibility: visible;
  }
}

@media (min-width: 861px) {
  body { padding-bottom: 0; }

  .menu-btn { display: none; }

  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .hero-cuerpo { grid-template-columns: 1.15fr 0.85fr; gap: 40px; }

  .surtido-rejilla {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .hoja {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 112px);
    overflow: auto;
    transform: none;
    visibility: visible;
  }

  .cerrar { display: none; }
  .ver-lista { display: none; }
  .velo { display: none !important; }

  .promesas, .pasos { grid-template-columns: repeat(3, 1fr); }
  .pasos { grid-template-columns: repeat(3, 1fr); }
  .promesas { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 861px) and (max-width: 1040px) {
  .promesas { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .cinta-pista {
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
    padding-inline: 16px;
  }

  .cinta-pista span:nth-child(n + 8) { display: none; }
}
