/* ==========================================================================
   El Acervo Raíces — hoja de estilos
   Colores sacados del logo y de las mantas tejidas: azul tinta, almagre de los
   zócalos, ocre, verde de la bandera extremeña y el blanco de la cal.
   ========================================================================== */

:root {
  --cal: #fbf7ef;
  --papel: #f3ead9;
  --papel-oscuro: #e3d4b8;
  --tinta: #1c2745;
  --tinta-suave: #4b5270;
  --almagre: #a63f27;
  --almagre-oscuro: #7c2d1b;
  --ocre: #d6a12c;
  --verde: #2d6a43;
  --azulete: #2c5a9c;
  --naranja: #df6f28;

  --f-titulo: "Fraunces", Georgia, "Times New Roman", serif;
  --f-texto: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --f-mano: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --ancho: 1160px;
  --radio: 8px;
  --sombra: 0 1px 2px rgb(28 39 69 / .08), 0 14px 30px -14px rgb(28 39 69 / .35);
  --sombra-suave: 0 1px 2px rgb(28 39 69 / .06), 0 8px 20px -14px rgb(28 39 69 / .3);

  /* Grano de papel muy suave */
  --textura: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .32 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Faja tejida: rayas almagre y naranja con rombos azules y verdes */
  --faja: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='26' viewBox='0 0 36 26'%3E%3Crect width='36' height='26' fill='%23f3ead9'/%3E%3Crect width='36' height='3' fill='%23a63f27'/%3E%3Crect y='3' width='36' height='2' fill='%23df6f28'/%3E%3Crect y='21' width='36' height='2' fill='%23df6f28'/%3E%3Crect y='23' width='36' height='3' fill='%23a63f27'/%3E%3Cpath d='M18 7l9 6-9 6-9-6z' fill='%232c5a9c'/%3E%3Cpath d='M18 10.5l3.5 2.5-3.5 2.5-3.5-2.5z' fill='%23d6a12c'/%3E%3Cpath d='M0 7l9 6-9 6zM36 7l-9 6 9 6z' fill='%232d6a43'/%3E%3Cpath d='M0 11l3 2-3 2zM36 11l-3 2 3 2z' fill='%23f3ead9'/%3E%3C/svg%3E");

  /* Adorno pequeño bajo los títulos */
  --adorno: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='14' viewBox='0 0 84 14'%3E%3Cpath d='M0 7h26M58 7h26' stroke='%23a63f27' stroke-width='2'/%3E%3Cpath d='M26 7l4-3 4 3-4 3zM50 7l4-3 4 3-4 3z' fill='%23a63f27'/%3E%3Cpath d='M34 7l8-6 8 6-8 6z' fill='%232c5a9c'/%3E%3Cpath d='M42 4.5l3 2.5-3 2.5-3-2.5z' fill='%23d6a12c'/%3E%3C/svg%3E");

  color-scheme: light;
}

/* --- Base ---------------------------------------------------------------- */

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

html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font: 400 1.125rem/1.6 var(--f-texto);
  color: var(--tinta);
  background-color: var(--papel);
  background-image: var(--textura);
}

main { overflow-x: clip; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--f-titulo);
  font-optical-sizing: auto;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--almagre); text-underline-offset: .18em; }
a:hover { color: var(--almagre-oscuro); }

:focus-visible {
  outline: 3px solid var(--ocre);
  outline-offset: 3px;
  border-radius: 2px;
}

.saltar {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--tinta);
  color: var(--cal);
  padding: .6rem 1rem;
  border-radius: var(--radio);
}
.saltar:focus { top: 1rem; }

.antetitulo {
  font: 700 .8rem/1.2 var(--f-texto);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--almagre);
  margin: 0 0 .6rem;
}

.entradilla {
  font-size: 1.25rem;
  line-height: 1.55;
}

/* --- Botones ------------------------------------------------------------- */

.botones {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.75rem;
}

.boton {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem 1.35rem;
  border: 2px solid var(--almagre);
  border-radius: 999px;
  background: var(--almagre);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.boton:hover {
  background: var(--almagre-oscuro);
  border-color: var(--almagre-oscuro);
  color: #fff;
}

.boton--linea {
  background: transparent;
  border-color: var(--tinta);
  color: var(--tinta);
}
.boton--linea:hover {
  background: var(--tinta);
  border-color: var(--tinta);
  color: var(--cal);
}

.icono {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex: none;
}
.icono .relleno { fill: currentColor; stroke: none; }

/* --- Adornos tejidos ----------------------------------------------------- */

.faja {
  height: 26px;
  background-image: var(--faja);
  background-size: 36px 26px;
  background-repeat: repeat-x;
}

/* Zócalo de almagre, como las casas encaladas del pueblo */
.zocalo {
  position: relative;
  padding-bottom: calc(clamp(3.5rem, 8vw, 6rem) + 20px);
}
.zocalo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 20px;
  background: linear-gradient(var(--ocre) 0 3px, var(--almagre) 3px);
}

/* --- Cabecera ------------------------------------------------------------ */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(243 234 217 / .95);
  border-bottom: 1px solid var(--papel-oscuro);
}
@supports (backdrop-filter: blur(6px)) {
  .cabecera {
    background: rgb(243 234 217 / .86);
    backdrop-filter: blur(8px);
  }
}
.cabecera::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(var(--almagre) 0 2px, var(--ocre) 2px 3px, var(--verde) 3px 4px, var(--azulete) 4px 6px);
}

.cabecera__dentro {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: .55rem 1rem;
}

.marca {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--tinta);
  text-decoration: none;
}
.marca:hover { color: var(--tinta); }
.marca img {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 2px 3px rgb(28 39 69 / .25));
}
.marca__nombre {
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: .95;
}
.marca__nombre small {
  display: block;
  font-family: var(--f-mano);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--almagre);
  margin-top: .1rem;
}

.menu__lista {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu__lista a {
  display: block;
  padding: .35rem 0;
  color: var(--tinta);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.menu__lista a:hover {
  color: var(--almagre);
  border-bottom-color: var(--almagre);
}

.menu__boton { display: none; }

@media (max-width: 820px) {
  .js .menu__boton {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .9rem;
    border: 2px solid var(--tinta);
    border-radius: 999px;
    background: transparent;
    color: var(--tinta);
    font: 700 1rem/1 var(--f-texto);
    cursor: pointer;
  }
  .menu__hamburguesa,
  .menu__hamburguesa::before,
  .menu__hamburguesa::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s;
  }
  .menu__hamburguesa { position: relative; }
  .menu__hamburguesa::before,
  .menu__hamburguesa::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .menu__hamburguesa::before { top: -6px; }
  .menu__hamburguesa::after { top: 6px; }
  .menu[data-abierto="true"] .menu__hamburguesa { background: transparent; }
  .menu[data-abierto="true"] .menu__hamburguesa::before { transform: translateY(6px) rotate(45deg); }
  .menu[data-abierto="true"] .menu__hamburguesa::after { transform: translateY(-6px) rotate(-45deg); }

  .js .menu__lista {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: .5rem 1rem 1rem;
    background: var(--cal);
    border-bottom: 1px solid var(--papel-oscuro);
    box-shadow: 0 16px 24px -16px rgb(28 39 69 / .35);
  }
  .js .menu[data-abierto="true"] .menu__lista { display: flex; }
  .js .menu__lista a {
    padding: .85rem 0;
    border-bottom: 1px dashed var(--papel-oscuro);
  }
  .js .menu__lista li:last-child a { border-bottom: 0; }

  /* Sin JavaScript el menú se queda visible y se reparte en varias líneas */
  html:not(.js) .cabecera__dentro { flex-wrap: wrap; }
  html:not(.js) .menu__lista { flex-wrap: wrap; gap: .25rem 1.2rem; }
}

/* --- Portada ------------------------------------------------------------- */

.portada {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) 1rem clamp(3.5rem, 8vw, 6rem);
}

.portada h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.015em;
  margin-bottom: 1.1rem;
}
.portada h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--almagre);
}

.a-mano {
  font-family: var(--f-mano);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  line-height: 1.15;
  color: var(--verde);
  transform: rotate(-1.5deg);
  transform-origin: left center;
  margin-bottom: 1.1rem;
}

.portada .entradilla {
  max-width: 34rem;
  color: var(--tinta-suave);
}

.portada__foto {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 520px;
  margin: 0;
  justify-self: center;
}
/* La manta tejida asomando detrás de la foto */
.portada__foto::before {
  content: "";
  position: absolute;
  inset: 7% -5% -6% 9%;
  z-index: -1;
  background-image: var(--faja);
  background-size: 36px 26px;
  border-radius: 4px;
  box-shadow: var(--sombra);
  transform: rotate(-4deg);
}
.portada__foto img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 10px solid var(--cal);
  border-radius: 4px;
  box-shadow: var(--sombra);
  transform: rotate(1.5deg);
}
.portada__foto figcaption {
  position: absolute;
  left: -.5rem;
  bottom: -1.1rem;
  padding: .3rem 1rem .4rem;
  background: var(--cal);
  border-radius: 3px;
  box-shadow: var(--sombra-suave);
  font: 700 1.4rem/1.1 var(--f-mano);
  color: var(--tinta);
  transform: rotate(-3deg);
}

@media (max-width: 820px) {
  .portada { grid-template-columns: 1fr; }
  .portada__foto { max-width: 440px; }
}

/* --- Secciones ----------------------------------------------------------- */

.seccion {
  padding: clamp(3.5rem, 8vw, 6rem) 1rem;
}
.seccion--cal {
  background-color: var(--cal);
  background-image: var(--textura);
}
.seccion__dentro {
  max-width: var(--ancho);
  margin: 0 auto;
}

.seccion h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 1.4rem;
}

.seccion h2::after {
  content: "";
  display: block;
  width: 84px;
  height: 14px;
  margin-top: 1rem;
  background-image: var(--adorno);
}

.titulo-seccion {
  max-width: 40rem;
  margin: 0 auto 2.75rem;
  text-align: center;
}
.titulo-seccion h2 { margin-bottom: 0; }
.titulo-seccion h2::after { margin-inline: auto; }
.titulo-seccion__intro {
  margin-top: 1.1rem;
  color: var(--tinta-suave);
}

/* Recuadros con pespunte, como un parche cosido */
.definicion::before,
.paso::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed rgb(166 63 39 / .45);
  border-radius: 5px;
  pointer-events: none;
}

/* --- Nosotras ------------------------------------------------------------ */

.nosotras {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.nosotras__texto p { max-width: 38rem; }
.nosotras__texto p:not(.entradilla):not(.antetitulo):not(.firma) { color: var(--tinta-suave); }

.firma {
  font: 700 2rem/1 var(--f-mano);
  color: var(--almagre);
  transform: rotate(-2deg);
  transform-origin: left center;
  margin-top: 1.5rem;
}

.definicion {
  position: relative;
  padding: 2.4rem 2.2rem;
  background: var(--papel);
  border-radius: var(--radio);
  box-shadow: var(--sombra-suave);
}
.definicion__palabra {
  font: italic 700 2.6rem/1 var(--f-titulo);
  margin-bottom: .35rem;
}
.definicion__origen {
  font-size: .95rem;
  color: var(--almagre);
  margin-bottom: 1rem;
}
.definicion__texto {
  font-family: var(--f-titulo);
  font-size: 1.15rem;
  line-height: 1.5;
}
.definicion hr {
  width: 60px;
  margin: 1.3rem 0;
  border: 0;
  border-top: 2px solid var(--ocre);
}

@media (max-width: 820px) {
  .nosotras { grid-template-columns: 1fr; }
}

/* --- Piezas -------------------------------------------------------------- */

.filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 2.25rem;
}
.filtro {
  padding: .5rem 1.1rem;
  border: 2px solid var(--tinta);
  border-radius: 999px;
  background: transparent;
  color: var(--tinta);
  font: 500 1rem/1.2 var(--f-texto);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.filtro:hover { background: rgb(28 39 69 / .08); }
.filtro[aria-pressed="true"] {
  background: var(--tinta);
  color: var(--cal);
}

.piezas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-flow: dense;
  gap: 1.6rem;
}

.pieza {
  display: flex;
  flex-direction: column;
  background: var(--cal);
  border: 1px solid var(--papel-oscuro);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra-suave);
}
.pieza[hidden] { display: none; }

.pieza__foto {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  background: var(--papel-oscuro);
  overflow: hidden;
  cursor: zoom-in;
}
.pieza__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.pieza__foto:hover img { transform: scale(1.04); }
.pieza__foto:focus-visible { outline-offset: -4px; }

.pieza[data-ref="recuerdo-pintado"] img { object-position: 18% 50%; }
.pieza[data-ref="bolitas-lana"] img { object-position: 50% 80%; }

/* Etiqueta colgada: cuando haya tienda, aquí puede ir el precio */
.pieza__etiqueta {
  position: absolute;
  top: 14px;
  left: 10px;
  padding: .3rem .85rem .35rem 1.4rem;
  background: var(--ocre);
  color: var(--tinta);
  font: 700 1.15rem/1 var(--f-mano);
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  transform: rotate(-4deg);
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / .25));
}
.pieza__etiqueta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--cal);
}

.pieza__mas {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: rgb(28 39 69 / .85);
  color: var(--cal);
  font: 700 .85rem/1.3 var(--f-texto);
}

.pieza__cuerpo {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.35rem;
}
.pieza__tipo {
  font: 700 .75rem/1.2 var(--f-texto);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: .35rem;
}
.pieza h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.pieza__cuerpo p:not(.pieza__tipo) {
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--tinta-suave);
}
.pieza__enlace {
  margin-top: auto;
  padding-top: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.pieza__enlace::after {
  content: " →";
  transition: margin-left .2s;
}
.pieza__enlace:hover { text-decoration: underline; }

@media (min-width: 600px) {
  .pieza--ancha { grid-column: span 2; }
  .pieza--ancha .pieza__foto { aspect-ratio: 3 / 2; }
}

.piezas__mas {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--tinta-suave);
}
.piezas__mas a { font-weight: 700; }

/* --- El oficio ----------------------------------------------------------- */

.pasos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: paso;
}
.paso {
  position: relative;
  padding: 2.2rem 2rem 2.3rem;
  background: var(--papel);
  border-radius: var(--radio);
  box-shadow: var(--sombra-suave);
}
.paso__numero {
  display: block;
  font: italic 600 3.4rem/1 var(--f-titulo);
  color: var(--almagre);
  margin-bottom: .6rem;
}
.paso h3 {
  font-size: 1.45rem;
  margin-bottom: .6rem;
}
.paso p { color: var(--tinta-suave); }

.tecnicas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .7rem 1.6rem;
  list-style: none;
  margin: 2.8rem 0 0;
  padding: 0;
  font-family: var(--f-titulo);
  font-size: 1.15rem;
  font-style: italic;
}
.tecnicas li {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.tecnicas li::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--ocre);
  transform: rotate(45deg);
}

@media (max-width: 820px) {
  .pasos { grid-template-columns: 1fr; gap: 1.1rem; }
  .paso {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1.2rem;
    padding: 1.7rem 1.6rem;
  }
  .paso__numero {
    grid-row: span 2;
    margin-bottom: 0;
    font-size: 2.8rem;
  }
}

/* --- Dicho --------------------------------------------------------------- */

.dicho {
  background: var(--tinta);
  color: var(--cal);
}
.dicho__texto {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 1.25rem;
  text-align: center;
}
.dicho__texto p {
  font: italic 500 clamp(1.9rem, 4.6vw, 3.3rem)/1.2 var(--f-titulo);
  text-wrap: balance;
}

/* --- El pueblo ----------------------------------------------------------- */

.pueblo {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.pueblo__texto p:not(.entradilla):not(.antetitulo) { color: var(--tinta-suave); }
.pueblo__texto p { max-width: 38rem; }

/* Placa de azulejo, como las de los nombres de las calles */
.azulejo {
  justify-self: center;
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  padding: 14px;
  background-color: #fdfcf8;
  background-image:
    linear-gradient(135deg, rgb(255 255 255 / .8), transparent 40%),
    linear-gradient(rgb(28 39 69 / .08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(28 39 69 / .08) 1px, transparent 1px);
  background-size: 100% 100%, 50% 33.334%, 50% 33.334%;
  border-radius: 6px;
  box-shadow: var(--sombra), inset 0 0 0 1px rgb(28 39 69 / .08);
  transform: rotate(1.5deg);
}
.azulejo__marco {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.5rem 1rem;
  border: 4px solid var(--azulete);
  outline: 1.5px solid var(--azulete);
  outline-offset: 5px;
  border-radius: 3px;
  color: var(--azulete);
  text-align: center;
  background:
    radial-gradient(circle at 0 0, var(--azulete) 0 18px, transparent 19px),
    radial-gradient(circle at 100% 0, var(--azulete) 0 18px, transparent 19px),
    radial-gradient(circle at 0 100%, var(--azulete) 0 18px, transparent 19px),
    radial-gradient(circle at 100% 100%, var(--azulete) 0 18px, transparent 19px);
}
.azulejo__adorno {
  width: 84px;
  height: 14px;
  margin-bottom: 1.2rem;
  background: var(--azulete);
  -webkit-mask: var(--adorno) center / contain no-repeat;
  mask: var(--adorno) center / contain no-repeat;
}
.azulejo__nombre {
  font: italic 700 clamp(2rem, 4vw, 2.5rem)/1.05 var(--f-titulo);
  margin-bottom: 1rem;
}
.azulejo__pequeno {
  font: 700 .8rem/1.3 var(--f-texto);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.azulejo__fiesta {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1.5px solid var(--azulete);
  font: 700 1.35rem/1.1 var(--f-mano);
}

@media (max-width: 820px) {
  .pueblo { grid-template-columns: 1fr; }
}

/* --- Contacto ------------------------------------------------------------ */

.contacto {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 1.6rem;
}
.tarjeta {
  position: relative;
  padding: 2rem 1.9rem;
  background: var(--papel);
  border-radius: var(--radio);
  box-shadow: var(--sombra-suave);
}
.tarjeta h3 {
  font-size: 1.45rem;
  margin-bottom: .7rem;
}
.tarjeta p { color: var(--tinta-suave); }

.tarjeta--destacada {
  background: var(--tinta);
  color: var(--cal);
}
.tarjeta--destacada p { color: rgb(251 247 239 / .85); }
.tarjeta--destacada .boton--linea {
  border-color: var(--cal);
  color: var(--cal);
}
.tarjeta--destacada .boton--linea:hover {
  background: var(--cal);
  color: var(--tinta);
}

@media (max-width: 900px) {
  .contacto { grid-template-columns: 1fr 1fr; }
  .tarjeta--destacada { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .contacto { grid-template-columns: 1fr; }
}

/* --- Pie ----------------------------------------------------------------- */

.pie {
  background: var(--tinta);
  color: var(--papel);
}
.pie a { color: var(--ocre); }
.pie a:hover { color: #f0c35e; }

.pie__dentro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 3.5rem 1rem 2.5rem;
}
.pie__marca {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}
.pie__marca img { flex: none; }
.pie__marca p { margin-bottom: .4rem; color: rgb(243 234 217 / .8); }
.pie__nombre {
  font: 700 1.5rem/1.1 var(--f-titulo);
  color: var(--cal) !important;
}

.glosario__titulo {
  font: 700 .8rem/1.2 var(--f-texto);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ocre);
  margin-bottom: .8rem;
}
.glosario dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .35rem 1.5rem;
  margin: 0;
}
.glosario dl div {
  display: flex;
  align-items: baseline;
  gap: .5rem;
}
.glosario dt {
  font: 700 1.35rem/1.2 var(--f-mano);
  color: var(--ocre);
}
.glosario dd {
  margin: 0;
  font-size: .98rem;
  color: rgb(243 234 217 / .8);
}

.pie__legal {
  margin: 0;
  padding: 1.1rem 1rem 1.4rem;
  border-top: 1px solid rgb(243 234 217 / .15);
  text-align: center;
  font-size: .9rem;
  color: rgb(243 234 217 / .65);
}

@media (max-width: 760px) {
  .pie__dentro { grid-template-columns: 1fr; }
}

/* --- Visor de fotos ------------------------------------------------------ */

.visor {
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: var(--cal);
  overflow: hidden;
}
.visor[open] {
  display: grid;
  place-items: center;
}
.visor::backdrop { background: rgb(15 20 38 / .9); }

.visor__figura {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  max-width: min(92vw, 1000px);
  margin: 0;
}
.visor__img {
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  max-height: 78dvh;
  border: 8px solid var(--cal);
  border-radius: 4px;
  background: var(--cal);
}
.visor__pie {
  font: 700 1.6rem/1.2 var(--f-mano);
  text-align: center;
}

.visor__boton {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0 0 4px;
  border: 0;
  border-radius: 50%;
  background: var(--cal);
  color: var(--tinta);
  font: 400 2rem/1 var(--f-texto);
  cursor: pointer;
  box-shadow: 0 4px 14px rgb(0 0 0 / .35);
}
.visor__boton:hover { background: var(--ocre); }
.visor__boton[hidden] { display: none; }
.visor__cerrar { top: 16px; right: 16px; }
.visor__anterior { left: 16px; top: 50%; margin-top: -24px; }
.visor__siguiente { right: 16px; top: 50%; margin-top: -24px; }

@media (max-width: 600px) {
  .visor__anterior,
  .visor__siguiente { top: auto; bottom: 20px; margin-top: 0; }
  .visor__anterior { left: calc(50% - 60px); }
  .visor__siguiente { right: calc(50% - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
