:root {
  --ink: #1A2420;
  --paper: #F3EEE4;
  --clay: #C65A32;
  --ticket: #E4B15A;
  --anden: #3E6B58;
  --line: rgba(26, 36, 32, 0.18);
  --display: "Anybody", "Arial Narrow", sans-serif;
  --body: "Literata", Georgia, serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
}
.regla { order: 1; }
.top { order: 2; }
main { order: 4; flex: 1 0 auto; }
.pie { order: 5; }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--anden); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.pie :focus-visible, .hero :focus-visible, .aviso :focus-visible { outline-color: var(--ticket); }
::selection { background: var(--ticket); color: var(--ink); }

.skip {
  position: absolute;
  left: 0.6rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.8rem;
  z-index: 50;
}
.skip:focus { top: 0.6rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ancho { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.ceja {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--anden);
}
h1, h2, h3, .precio, .pie-marca, .btn, nav a, .marca, .regla, summary, .fila b, .filtros button {
  font-family: var(--display);
}
h1 {
  margin: 0.15rem 0 0.7rem;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
h3 { margin: 0 0 0.3rem; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }

.regla {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0;
  padding: 0.28rem 1rem;
  background: var(--ink);
  color: var(--ticket);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  padding: 0.55rem 1rem;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 20;
}
.marca {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.marca small {
  display: block;
  margin-top: 0.18rem;
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0;
}
.tel {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
nav { display: flex; gap: 0.15rem 1rem; margin-left: auto; }
nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--clay); }

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.btn:hover { background: #111814; color: var(--paper); }
.btn-linea { background: transparent; color: var(--ink); }
.btn-linea:hover { background: var(--ink); color: var(--paper); }
.btn-wa { background: var(--anden); border-color: #2d5344; color: var(--paper); }
.btn-wa:hover { background: #2d5344; color: var(--paper); }
button.nav-btn { display: none; }
.acciones { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.hero {
  display: grid;
  background: var(--ink);
  color: var(--paper);
}
.boleta {
  margin: 1rem;
  padding: 1.4rem 1.2rem 1.3rem 1.7rem;
  background: var(--paper);
  color: var(--ink);
  -webkit-mask-image: radial-gradient(circle at 0 12px, transparent 9px, #000 10px);
  mask-image: radial-gradient(circle at 0 12px, transparent 9px, #000 10px);
  -webkit-mask-size: 100% 24px;
  mask-size: 100% 24px;
  -webkit-mask-repeat: repeat-y;
  mask-repeat: repeat-y;
}
.sello {
  display: inline-block;
  margin: 0 0 0.8rem;
  padding: 0.15rem 0.45rem;
  background: var(--ticket);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.desde { margin: 0; font-family: var(--display); font-weight: 500; }
.precio-grande {
  margin: 0.1rem 0 0.6rem;
  color: var(--clay);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  letter-spacing: -0.045em;
  line-height: 0.84;
}
.precio-grande small {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: 0;
}
.hero-foto { position: relative; min-height: 240px; }
.hero-foto img { width: 100%; height: 320px; object-fit: cover; }
.hero-foto figcaption, .nota-foto {
  font-size: 0.78rem;
  line-height: 1.35;
}
.hero-foto figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.45rem 0.7rem;
  background: rgba(26, 36, 32, 0.9);
  color: var(--paper);
}

.bloque { padding: 2.8rem 0; }
.bloque + .bloque { border-top: 1px solid var(--line); }
.lead { max-width: 62ch; font-size: 1.15rem; }

.tablero { border-top: 2px solid var(--ink); }
.fila {
  display: grid;
  gap: 0.2rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.fila b { font-weight: 700; font-size: 1.2rem; }
.precio { font-weight: 700; font-size: 1.35rem; letter-spacing: -0.03em; }

.ruta-grid, .visita-grid, .catalogo-layout, .dos {
  display: grid;
  gap: 1.2rem;
}
.paradas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 0.2rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}
.paradas li {
  position: relative;
  flex: 1 1 88px;
  margin: 0;
  padding: 1rem 0.6rem 0 0;
  font-family: var(--display);
  font-weight: 500;
}
.paradas li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
}
.paradas li::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--ticket);
}
.oficio {
  display: grid;
  gap: 1rem;
  margin: 0;
}
.oficio div { border-top: 3px solid var(--ink); padding-top: 0.55rem; }
.oficio dt { font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.oficio dd { margin: 0.3rem 0 0; }

.foto-bloque { position: relative; }
.foto-bloque figcaption {
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 0.82rem;
}

details { border-bottom: 1px solid var(--line); padding: 0.35rem 0; }
summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.15rem;
}
details p { margin-top: 0; max-width: 68ch; }

.prosa { width: min(74ch, 100%); }
.prosa h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
.prosa h2 { font-size: 1.55rem; margin-top: 1.6rem; }
.tabla-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 1rem; }
.tabla th, .tabla td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--line);
}
.tabla th { font-family: var(--display); font-weight: 500; }

.item {
  display: grid;
  gap: 0.8rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.item[hidden] { display: none !important; }
.meta { margin: 0.2rem 0; font-size: 0.98rem; }
.nota-foto { margin: 0.3rem 0 0; }

.filtros { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }
.filtros button {
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.filtros button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.busca { display: block; max-width: 420px; font-family: var(--display); font-weight: 500; }
.busca input, .campo input, .campo select, .campo textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  min-height: 44px;
  padding: 0.45rem 0.55rem;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.campo textarea { min-height: 120px; }
.campo { display: block; margin-top: 0.75rem; font-family: var(--display); font-weight: 500; }

.pedido {
  border: 2px solid var(--ink);
  padding: 0.9rem;
  background: #f7f3ea;
}
.pedido h2 { font-size: 1.6rem; }
.pedido ul { list-style: none; margin: 0.4rem 0; padding: 0; }
.pedido li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--line);
}
.pedido li button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--anden);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.pedido .precio { margin: 0.3rem 0 0.6rem; }

.mapa { aspect-ratio: 16 / 10; background: #ddd5c6; border: 2px solid var(--ink); }
.mapa iframe { width: 100%; height: 100%; border: 0; }

.pie {
  background: var(--ink);
  color: var(--paper);
  padding: 2rem 0 2.5rem;
}
.pie a { color: var(--ticket); }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.pie-grid { display: grid; gap: 1.2rem; }
.pie-marca { margin: 0 0 0.4rem; font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; }
.pie-tit { margin: 0 0 0.3rem; font-family: var(--display); font-weight: 700; color: var(--ticket); }
.pie p { margin: 0.3rem 0; }
.pie-links { list-style: none; margin: 0; padding: 0; }
.pie-links a { display: inline-flex; min-height: 44px; align-items: center; }
.creditos {
  margin-top: 1.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(243, 238, 228, 0.25);
  font-size: 0.82rem;
}

.aviso {
  order: 3;
  position: static;
  z-index: 40;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 2px solid var(--ticket);
}
.aviso p { margin: 0; font-size: 0.92rem; }
.aviso a { color: var(--ticket); }
.aviso[hidden] { display: none; }

@media (min-width: 720px) {
  .fila { grid-template-columns: 1.3fr 0.7fr 1.2fr auto auto; align-items: center; }
  .item { grid-template-columns: 240px 1fr; align-items: start; }
  .oficio { grid-template-columns: 1fr 1fr 1fr; }
  .pie-grid { grid-template-columns: 1.2fr 1fr 1fr 0.8fr; }
  .dos { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(300px, 0.92fr) 1.08fr;
    min-height: calc(100svh - 7rem);
  }
  .boleta { margin: 1.4rem; display: flex; flex-direction: column; justify-content: center; }
  .hero-foto img { height: 100%; min-height: 560px; }
  .ruta-grid, .visita-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}
@media (min-width: 980px) {
  .catalogo-layout { grid-template-columns: 1fr 300px; align-items: start; }
  .pedido { position: sticky; top: 5.2rem; }
}
@media (max-width: 800px) {
  .top {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }
  .marca { grid-column: 1; grid-row: 1; }
  button.nav-btn { display: inline-flex; grid-column: 2; grid-row: 1; margin: 0; }
  .top .btn-wa { grid-column: 3; grid-row: 1; }
  .tel { grid-column: 1 / -1; grid-row: 2; }
  nav { grid-column: 1 / -1; grid-row: 3; margin-left: 0; }
  .con-js nav { display: none; flex-direction: column; }
  .con-js nav.abierto { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
