/* ==========================================================================
   Cafetería Pastelería Cediel · v2.0
   Minimalista, tipografía grande y animaciones ligadas al scroll.
   Colores de la marca: burdeos #8C1D2E y crema.
   --------------------------------------------------------------------------
   Reglas de la casa:
   - Sin JavaScript todo se ve: los estados "antes de animar" solo existen
     bajo html.js-anim (la añade v2.js si el usuario no pide menos movimiento).
   - Solo se animan transform y opacity (y filter en la entrada del logo).
   - Fotos (img/fotos/): las de cruasanes, palmeritas y café son de Cediel;
     las de zumo, tarta y pan son ilustrativas (Unsplash y Pexels, créditos
     en el pie). Se mueven solo con transform (escala lenta y paralaje) y
     reservan su hueco con width/height o aspect-ratio (sin saltos).
   - Scroll-driven animations nativas dentro de @supports; si el navegador
     no las soporta, v2.js calcula --p (0 → 1) y se usa el bloque .no-sda.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  /* Solo latín: así los caracteres que no tiene (★, emojis…) no obligan a
     descargarla en los dispositivos que ya usan la fuente del sistema. */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2039-203A, U+20AC, U+2122;
}

:root {
  --burdeos: #8c1d2e;
  --burdeos-hover: #7a1826;
  --vino: #4a0f1a;
  --noche: #2a0910;
  --crema: #fbf3e4;
  --crema-claro: #fffbf3;
  --crema-hondo: #f3e8d4;
  --tinta: #1d1714;
  --tinta-suave: #6b5e56;
  --linea: rgb(29 23 20 / 0.12);
  /* Verde de "Abierto ahora" (un verde botella que casa con el burdeos y la crema).
     #2b6437 sobre #e4ecd9: 5,8:1; #b3dcaa sobre la pastilla de las secciones oscuras: 7,8:1. */
  --verde: #2b6437;
  --verde-fondo: #e4ecd9;
  --verde-claro: #b3dcaa;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-suave: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 3.25rem;
  --margen: clamp(1.25rem, 5vw, 3rem);
  --radio: clamp(1.375rem, 2.6vw, 2rem);
  --ancho: 71.25rem;

  color-scheme: light;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

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

[hidden] { display: none !important; }

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }

main:focus { outline: none; }

::selection { background: var(--burdeos); color: var(--crema-claro); }

:focus-visible {
  outline: 3px solid var(--burdeos);
  outline-offset: 3px;
  border-radius: 0.375rem;
}
.oscuro :focus-visible,
.tile--foto-oscura :focus-visible { outline-color: var(--crema); }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.saltar {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--crema-claro);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.saltar:focus { transform: none; }

.contenedor {
  width: 100%;
  max-width: calc(var(--ancho) + 2 * var(--margen));
  margin-inline: auto;
  padding-inline: max(var(--margen), env(safe-area-inset-left, 0px));
}

/* ---------- Tipografía ---------- */

.antetitulo {
  margin-bottom: 0.875rem;
  color: var(--burdeos);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.3125rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.oscuro .antetitulo { color: rgb(251 243 228 / 0.72); }

.titular {
  font-size: clamp(2.625rem, 1.35rem + 5vw, 5.25rem);
  line-height: 1.03;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.enlace {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  color: var(--burdeos);
  font-weight: 500;
  text-decoration: none;
}
.enlace::after {
  /* Flecha dibujada con bordes: no tiene texto, así que no se lee. */
  content: "";
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.3em;
  border-top: 0.11em solid currentColor;
  border-right: 0.11em solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.enlace:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.enlace:hover::after { transform: translateX(0.2em) rotate(45deg); }
.oscuro .enlace { color: var(--crema); }

/* ---------- Pastillas (botones) ---------- */

.pastilla {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 3rem;
  padding: 0.75em 1.45em;
  border: 0;
  border-radius: 999px;
  background: var(--burdeos);
  color: var(--crema-claro);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  translate: var(--mx, 0px) var(--my, 0px);
  transition: translate 0.35s var(--ease), scale 0.35s var(--ease), background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.pastilla:hover { background: var(--burdeos-hover); scale: 1.03; }
.pastilla:active { scale: 0.97; }

.pastilla--contorno {
  background: transparent;
  color: var(--burdeos);
  box-shadow: inset 0 0 0 1.5px rgb(140 29 46 / 0.55);
}
.pastilla--contorno:hover { background: rgb(140 29 46 / 0.07); box-shadow: inset 0 0 0 1.5px var(--burdeos); }

.pastilla--crema { background: var(--crema); color: var(--burdeos); }
.pastilla--crema:hover { background: var(--crema-claro); }

.pastilla--contorno-crema {
  background: transparent;
  color: var(--crema);
  box-shadow: inset 0 0 0 1.5px rgb(251 243 228 / 0.5);
}
.pastilla--contorno-crema:hover { background: rgb(251 243 228 / 0.08); box-shadow: inset 0 0 0 1.5px var(--crema); }

.pastilla--grande { min-height: 3.5rem; padding-inline: 1.75em; font-size: 1.125rem; }

.pastilla--mini {
  min-height: 2rem;
  padding: 0.3em 0.95em;
  font-size: 0.875rem;
}

.icono {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
}

/* ---------- Distintivo "Abierto ahora" (lo pinta js/main.js) ---------- */

.estado-linea {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
}

.estado {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.4em 0.9em 0.4em 0.8em;
  border-radius: 999px;
  background: rgb(140 29 46 / 0.08);
  color: var(--burdeos);
  font-weight: 600;
}

.estado__punto {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
.estado--cerrado .estado__punto {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.estado__punto::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
}

.estado__detalle { color: var(--tinta-suave); }

/* Abierto: verde. Cerrado: burdeos (en las secciones oscuras, crema). */
.estado--abierto { background: var(--verde-fondo); color: var(--verde); }

.oscuro .estado { background: rgb(251 243 228 / 0.1); color: var(--crema); }
.oscuro .estado--abierto { color: var(--verde-claro); }
.oscuro .estado__detalle { color: rgb(251 243 228 / 0.74); }

/* ==========================================================================
   Cabecera
   ========================================================================== */

.cabecera {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: transform 0.45s var(--ease);
}

/* El desenfoque va en un pseudo-elemento: si lo llevara la cabecera, el panel
   del menú móvil (position: fixed) quedaría atrapado dentro de ella. */
.cabecera::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(251 243 228 / 0.94);
  border-bottom: 1px solid var(--linea);
  transition: opacity 0.35s var(--ease);
}
/* Sobre las secciones oscuras, la barra se oscurece (v2.js añade .cabecera--oscura). */
.cabecera::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(36 8 14 / 0.94);
  border-bottom: 1px solid rgb(251 243 228 / 0.1);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
/* Cristal esmerilado (con respaldo opaco si no hay backdrop-filter). */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .cabecera::before,
  .cabecera::after {
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
  .cabecera::before { background: rgb(251 243 228 / 0.72); }
  .cabecera::after { background: rgb(36 8 14 / 0.72); }
}

.cabecera--oscura:not(.menu-abierto)::after { opacity: 1; }
.cabecera--oscura:not(.menu-abierto)::before { opacity: 0; }
.cabecera--oscura:not(.menu-abierto) .menu-boton { color: var(--crema); }
.cabecera--oscura .pastilla--mini { background: var(--crema); color: var(--burdeos); }
.cabecera--oscura .pastilla--mini:hover { background: var(--crema-claro); }
/* Anillo de foco crema sobre la barra oscura (con el menú móvil abierto el panel es crema: se queda burdeos). */
.cabecera--oscura:not(.menu-abierto) :focus-visible { outline-color: var(--crema); }
@media (min-width: 48em) {
  .cabecera--oscura .nav__lista a:not(.pastilla) { color: rgb(251 243 228 / 0.86); }
  .cabecera--oscura .nav__lista a:not(.pastilla):hover { color: var(--crema); }
}

.cabecera--oculta { transform: translateY(calc(-100% - 2px)); }

.cabecera__barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.75rem;
  max-width: calc(var(--ancho) + 2 * var(--margen));
  min-height: var(--nav-h);
  margin-inline: auto;
  padding-inline: max(var(--margen), env(safe-area-inset-left, 0px));
}

.cabecera__marca {
  display: block;
  margin-right: auto;
  border-radius: 999px;
}
.cabecera__marca img { width: auto; height: 1.875rem; }

.menu-boton { display: none; }

.nav__lista {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__lista a:not(.pastilla) {
  display: inline-block;
  padding-block: 0.4rem;
  color: rgb(29 23 20 / 0.82);
  font-size: 0.875rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: color 0.2s;
}
.nav__lista a:not(.pastilla):hover { color: var(--burdeos); }

/* Sin JavaScript, en móvil: el menú se ve siempre, debajo de la barra. La cabecera
   (una o dos filas, según el ancho) va en el flujo de la página y no fija: así no
   tapa el principio de la portada ni ocupa media pantalla al bajar. */
@media (max-width: 47.99em) {
  html:not(.js) { scroll-padding-top: 1rem; }
  html:not(.js) .cabecera { position: relative; }
  html:not(.js) .cabecera__barra { padding-top: 0.5rem; }
  html:not(.js) .hero__intro { padding-top: clamp(1.5rem, 4vh, 3rem); }
  html:not(.js) .nav { flex-basis: 100%; padding-bottom: 0.6rem; }
  html:not(.js) .nav__lista { gap: 0.1rem 1.1rem; }
  .nav__cta { display: none; }
}

/* Móvil con JavaScript: botón y panel a pantalla completa. */
@media (max-width: 47.99em) {
  .js .menu-boton {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: -0.625rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--tinta);
    cursor: pointer;
  }
  /* El botón está a 4 px del borde de la pantalla: el anillo va hacia dentro para que no se corte. */
  .js .menu-boton:focus-visible { outline-offset: -2px; }

  .menu-boton__icono {
    position: relative;
    width: 1.125rem;
    height: 0.75rem;
  }
  .menu-boton__icono::before,
  .menu-boton__icono::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.35s var(--ease);
  }
  .menu-boton__icono::before { top: 0.125rem; }
  .menu-boton__icono::after { bottom: 0.125rem; }
  .menu-boton[aria-expanded="true"] .menu-boton__icono::before { transform: translateY(0.1875rem) rotate(45deg); }
  .menu-boton[aria-expanded="true"] .menu-boton__icono::after { transform: translateY(-0.1875rem) rotate(-45deg); }

  .js .nav {
    position: fixed;
    inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 0;
    padding: 1rem max(var(--margen), env(safe-area-inset-left, 0px)) 3rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--crema);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .js .nav.abierto {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s var(--ease);
  }

  .js .nav__lista { flex-direction: column; align-items: stretch; gap: 0; }
  .js .cabecera .nav__lista a:not(.pastilla) {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--linea);
    color: var(--tinta);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.028em;
  }

  .menu-abierto::before { background: var(--crema); }
  html:has(.cabecera.menu-abierto) { overflow: hidden; }
}

@media (min-width: 48em) {
  .cabecera__llamar { display: none; }
  .nav__lista { gap: 2rem; }
  .nav__cta { margin-left: 0.25rem; }
}

/* ==========================================================================
   Portada
   ========================================================================== */

.hero {
  position: relative;
  padding-bottom: clamp(2.5rem, 7vw, 5.5rem);
  overflow: hidden; /* respaldo para navegadores sin overflow: clip */
  overflow: clip;
  background: var(--crema);
}

/* La presentación ocupa casi toda la pantalla: la foto asoma por abajo. */
.hero__intro {
  display: grid;
  place-items: center;
  min-height: 76vh;
  min-height: 76svh;
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(1.5rem, 4vh, 3rem)) var(--margen) clamp(2rem, 5vh, 3.5rem);
  background: radial-gradient(60% 55% at 50% 40%, var(--crema-claro) 0%, rgb(255 251 243 / 0) 100%);
  text-align: center;
}

.hero__contenido {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 62rem;
}

.hero__antetitulo {
  margin-bottom: clamp(1.25rem, 3.5vh, 2.25rem);
  color: var(--burdeos);
  font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero__emblema {
  position: relative;
  width: min(80vw, 29rem, 58svh);
}

.hero__marca { position: relative; }

.hero__logo {
  width: 100%;
  filter: drop-shadow(0 1.25rem 2.5rem rgb(140 29 46 / 0.2));
}

/* Óvalos finos que repiten el doble aro del logo. */
.hero__anillos { position: absolute; inset: 0; pointer-events: none; }
.hero__anillos span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% * var(--k));
  aspect-ratio: 800 / 373;
  border: 1px solid rgb(140 29 46 / 0.16);
  border-radius: 50%;
  translate: -50% -50%;
}
.hero__anillos span:nth-child(1) { --k: 1.22; --n: 0; }
.hero__anillos span:nth-child(2) { --k: 1.55; --n: 1; border-color: rgb(140 29 46 / 0.1); }
.hero__anillos span:nth-child(3) { --k: 1.98; --n: 2; border-color: rgb(140 29 46 / 0.06); }

.hero__texto {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__titular {
  margin-top: clamp(1.75rem, 5vh, 3rem);
  font-size: clamp(2.75rem, 1.4rem + 5.4vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.042em;
  text-wrap: balance;
}
.hero__titular span { color: var(--burdeos); }

.hero__entradilla {
  max-width: 30rem;
  margin-top: 1.1rem;
  color: var(--tinta-suave);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.hero__acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
}

/* El distintivo "Abierto / Cerrado ahora" aparece cuando se ejecuta js/main.js
   (después del primer pintado). Con JavaScript se le guarda el hueco desde el
   principio para que la portada no dé un salto al aparecer: una línea, o dos en
   pantallas muy estrechas, donde "Cerrado ahora · Abre el lunes a las 7:00" no cabe. */
.hero__estado-hueco { width: 100%; }
.js .hero__estado-hueco { min-height: calc(1.5rem + 2.25rem); }
@media (max-width: 22.49em) {
  .js .hero__estado-hueco { min-height: calc(1.5rem + 4rem); }
}
.hero__estado { justify-content: center; margin-top: 1.5rem; }

/* ---------- La foto de la portada ---------- */

/* Foto propia (cruasanes de la vitrina). El original solo tiene 1152 px de
   ancho: el marco usa su mismo encuadre (1:1 en móvil, 16:9 desde 40em) y,
   como mucho, el ancho del contenido (71,25rem), así no se amplía de más y se
   ve nítida. Si la pantalla es baja, el marco se estrecha en vez de recortar. */
.escena {
  --foto-margen: clamp(0.5rem, 1.25vw, 1rem);
  --escena-ancho: min(100%, 82vh);
  margin: 0;
  padding-inline: max(var(--foto-margen), env(safe-area-inset-left, 0px));
}

.escena__marco {
  position: relative;
  width: var(--escena-ancho);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radio);
  overflow: hidden; /* respaldo para navegadores sin overflow: clip */
  overflow: clip;
  /* Color medio de la foto: así no hay un hueco blanco mientras carga. */
  background: #a47d52;
  transform-origin: 50% 30%;
}

.escena__marco picture { display: block; height: 100%; }

.escena__foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

@media (min-width: 40em) {
  .escena { --escena-ancho: min(100%, var(--ancho), (100vh - var(--nav-h) - 2rem) * 16 / 9); }
  .escena__marco { aspect-ratio: 16 / 9; }
}
/* Con svh (alto de pantalla sin las barras del navegador del móvil), si lo hay.
   Va en @supports porque una variable CSS no tiene "respaldo" por repetición. */
@supports (height: 1svh) {
  .escena { --escena-ancho: min(100%, 82svh); }
  @media (min-width: 40em) {
    .escena { --escena-ancho: min(100%, var(--ancho), (100svh - var(--nav-h) - 2rem) * 16 / 9); }
  }
}

/* Nota bajo una foto: pequeña y discreta, pero visible. */
.foto-nota {
  margin-top: 0.7rem;
  color: var(--tinta-suave);
  font-size: 0.8125rem;
  letter-spacing: 0;
}
.escena .foto-nota {
  width: var(--escena-ancho);
  margin-inline: auto;
  padding-inline: calc(var(--radio) * 0.5);
  text-align: right;
}

/* ==========================================================================
   La idea (sección fija con frases que se encienden)
   ========================================================================== */

.frase {
  position: relative;
  background: var(--noche);
  color: var(--crema);
}

.frase__fijo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: calc(var(--ancho) + 2 * var(--margen));
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(5rem, 12vh, 8rem) max(var(--margen), env(safe-area-inset-left, 0px));
}

.frase__lineas {
  font-size: clamp(2.5rem, 0.6rem + 9.4vw, 9.5rem);
  line-height: 0.98;
  letter-spacing: -0.052em;
}
.frase__linea { display: block; }
.frase__linea:last-child { color: #e7a5ae; }

.frase__cierre {
  max-width: 30rem;
  margin-top: clamp(2rem, 5vh, 3rem);
  color: rgb(251 243 228 / 0.72);
  font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.625rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   La carta
   ========================================================================== */

.carta { padding-block: clamp(5.5rem, 13vw, 10rem) clamp(4rem, 9vw, 7rem); }

.cabeza {
  max-width: 50rem;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
  text-align: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  padding: 0;
  list-style: none;
}
.chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--crema-claro);
  box-shadow: inset 0 0 0 1px rgb(140 29 46 / 0.2);
  color: var(--burdeos);
  font-size: 0.9375rem;
  font-weight: 500;
}
.chip--lleno { background: var(--burdeos); box-shadow: none; color: var(--crema-claro); }

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.tile {
  --pad: clamp(1.625rem, 3.2vw, 2.5rem);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 17rem;
  padding: var(--pad);
  border-radius: var(--radio);
  background: var(--crema-claro);
  isolation: isolate;
  transition: translate 0.5s var(--ease);
}

/* Sombra en un pseudo-elemento: al pasar el ratón solo cambia su opacidad. */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  box-shadow: 0 1.5rem 3rem -1rem rgb(74 15 26 / 0.22);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover { translate: 0 -0.3rem; }
  .tile:hover::after { opacity: 1; }
}

.tile h3 {
  font-size: clamp(1.75rem, 1.25rem + 1.7vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.034em;
}
.tile__texto p:not(.tile__eti),
.tile__pie {
  max-width: 24rem;
  margin-top: 0.6rem;
  color: var(--tinta-suave);
  font-size: 1.0625rem;
  line-height: 1.45;
}

.tile__eti {
  margin-bottom: 0.45rem;
  color: var(--burdeos);
  font-size: 0.9375rem;
  font-weight: 600;
}

.tile__lista {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}
.tile__lista li {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgb(140 29 46 / 0.07);
  color: var(--burdeos);
  font-size: 0.9375rem;
  font-weight: 500;
}

.ilus {
  width: clamp(10rem, 54%, 14rem);
  height: auto;
  aspect-ratio: 1;
  margin: auto -0.5rem -0.25rem auto;
  padding-top: 1rem;
  overflow: visible;
  color: var(--burdeos);
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Tarjetas con foto ----------
   El texto arriba y la foto debajo, a sangre hasta los bordes de la tarjeta.
   La parte alta de la foto se funde con el fondo (máscara), así todas las
   fotos, claras u oscuras, entran igual en la cuadrícula. */
.tile--foto { padding-bottom: 0; }
.tile__media {
  position: relative;
  z-index: -1;
  flex: 1 0 auto;
  min-height: var(--foto-min, 16rem);
  margin: 0.25rem calc(-1 * var(--pad)) 0;
  border-radius: 0 0 var(--radio) var(--radio);
  overflow: hidden; /* respaldo para navegadores sin overflow: clip */
  overflow: clip;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 4.5rem);
  mask-image: linear-gradient(to bottom, transparent 0, #000 4.5rem);
}
.tile__foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--foto-pos, 50% 65%);
  transition: scale 0.9s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile__foto { scale: 1.035; }
}

.tile--bolleria { --foto-min: 17rem; --foto-pos: 50% 80%; }
.tile--bolleria h3 { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.25rem); letter-spacing: -0.045em; }
.tile--cafe { --foto-pos: 50% 58%; }
/* Zumo: foto vertical; en una y dos columnas se le da más alto para que se vea el vaso entero. */
.tile--zumo { --foto-min: 23rem; --foto-pos: 50% 40%; }
.tile--tarta { --foto-pos: 50% 74%; }
.tile--pan { --foto-pos: 50% 60%; }

/* Café: la única foto oscura, en una tarjeta oscura. */
.tile--foto-oscura { background: var(--noche); color: var(--crema); }
.tile--foto-oscura .tile__texto p:not(.tile__eti) { color: rgb(251 243 228 / 0.76); }
.tile--foto-oscura .tile__media {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 3.5rem);
  mask-image: linear-gradient(to bottom, transparent 0, #000 3.5rem);
}

.tile--oscuro { background: var(--vino); color: var(--crema); }
.tile--oscuro .tile__eti { color: rgb(251 243 228 / 0.72); }
.tile--oscuro .tile__pie { color: rgb(251 243 228 / 0.76); }
.tile--sin { min-height: 0; justify-content: space-between; gap: 1.25rem; }
.tile--sin h3 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); }

.nota-carta {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--tinta-suave);
  font-size: 0.9375rem;
  text-align: center;
  text-wrap: balance;
}
.nota-carta span { display: inline-block; }

/* Colocación por áreas: el orden del HTML (el de lectura en móvil) no cambia. */
.tile--bolleria { grid-area: bol; }
.tile--cafe { grid-area: caf; }
.tile--zumo { grid-area: zum; }
.tile--tarta { grid-area: tar; }
.tile--pan { grid-area: pan; }
.tile--tostada { grid-area: tos; }
.tile--sin { grid-area: sin; }
.bento {
  grid-template-areas: "bol" "caf" "zum" "tar" "pan" "tos" "sin";
}

@media (min-width: 40em) {
  .tile { min-height: 21rem; }
  .tile--sin { min-height: 0; }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "bol bol"
      "caf zum"
      "tar pan"
      "tos sin";
  }
  .tile--bolleria { --foto-min: 22rem; }
}

/* Escritorio: la bollería grande con el zumo (foto vertical) al lado; debajo,
   las tres fotos en fila con el café (la oscura) en el centro, y al final las
   tostadas (dibujo) junto a "Sin gluten". */
@media (min-width: 64em) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
      "bol bol bol bol zum zum"
      "bol bol bol bol zum zum"
      "tar tar caf caf pan pan"
      "tos tos sin sin sin sin";
  }
  .tile--bolleria { --foto-min: 22rem; }
  .tile--foto:not(.tile--bolleria) { --foto-min: 18rem; }
  /* "Sin gluten": el titular arriba a la izquierda y el texto abajo a la derecha. */
  .tile--sin .tile__pie { align-self: flex-end; max-width: 21rem; text-align: right; }
}

/* ==========================================================================
   Opiniones
   ========================================================================== */

.opiniones { padding-block: clamp(5.5rem, 13vw, 10rem); }
/* Justo después de la carta (las dos son crema), menos aire arriba: el hueco
   entre la nota de la carta y "Opiniones" ya lo da el final de la carta. */
.carta + .opiniones { padding-top: clamp(2.5rem, 6vw, 5rem); }
.opiniones .cabeza { margin-bottom: clamp(2rem, 4vw, 3rem); }

.nota {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(3rem, 7vw, 5rem);
  text-align: center;
}

.nota__cifra {
  color: var(--burdeos);
  font-size: clamp(5.5rem, 3rem + 10vw, 11rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.nota__estrellas { margin-top: 1rem; }
.nota__estrellas svg { width: 8.5rem; height: auto; }
.nota__vacias { fill: rgb(140 29 46 / 0.16); }
.nota__llenas { fill: var(--burdeos); }

.nota__total {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--tinta-suave);
  font-size: 1.0625rem;
  text-wrap: balance;
}
.nota__aviso { color: var(--tinta); font-weight: 500; }

.resenas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.resena figure {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  height: 100%;
  margin: 0;
  padding: clamp(1.625rem, 3.2vw, 2.5rem);
  border-radius: var(--radio);
  background: var(--crema-claro);
}

.resena__estrellas {
  color: var(--burdeos);
  font-size: 1rem;
  letter-spacing: 0.12em;
  line-height: 1;
}
.resena__vacia { color: rgb(140 29 46 / 0.22); }
.sin-corte { white-space: nowrap; }

.resena blockquote {
  margin: 0;
  text-wrap: pretty;
  font-size: clamp(1.125rem, 1.02rem + 0.4vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -0.016em;
}
.resena--larga blockquote {
  max-width: 52rem;
  font-size: clamp(1.3125rem, 0.95rem + 1.5vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.026em;
}
/* Comillas decorativas: el texto alternativo vacío ("") evita que se lean. */
.resena--larga figure { position: relative; }
.resena--larga figure::before {
  content: "\201C" / "";
  position: absolute;
  top: clamp(0.5rem, 1.5vw, 1rem);
  right: clamp(1.25rem, 3vw, 2.25rem);
  color: rgb(140 29 46 / 0.14);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(7rem, 5rem + 6vw, 11rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.resena figcaption {
  margin-top: auto;
  color: var(--tinta);
  font-size: 0.9375rem;
  font-weight: 600;
}
.resena figcaption span { color: var(--tinta-suave); font-weight: 400; }

/* La opinión larga va destacada a lo ancho; las otras tres, en fila. */
@media (min-width: 56em) {
  .resenas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .resena--larga { grid-column: 1 / -1; }
  .resena--larga figure { padding: clamp(2.25rem, 4.5vw, 3.75rem); }
}

.opiniones__pie {
  max-width: 44rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  color: var(--tinta-suave);
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: center;
}
.opiniones__enlaces {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2rem;
  margin-top: 1.25rem;
  font-size: 1.0625rem;
}

/* ==========================================================================
   Horario y dirección
   ========================================================================== */

.visita {
  padding-block: clamp(5.5rem, 13vw, 9rem);
  background: var(--vino);
  color: var(--crema);
}

.visita__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 4rem);
  align-items: start;
}

.visita .estado-linea { margin-top: 1.75rem; }

.visita__direccion {
  margin-top: 1.75rem;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem);
  font-style: normal;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.visita__direccion span { display: block; }
.visita__direccion span + span { color: rgb(251 243 228 / 0.74); }

.visita__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* Correo de contacto, debajo de los botones. La dirección es larga: en el HTML lleva
   <wbr> antes de la @ para que, si no cabe, se parta por ahí y no a mitad de palabra. */
.visita__correo {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.5rem;
  color: rgb(251 243 228 / 0.8);
  font-size: 1.0625rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}
.visita__correo .icono { margin-top: 0.15em; }
.visita__correo span { min-width: 0; }
.visita__correo a {
  color: var(--crema);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(251 243 228 / 0.45);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s;
}
.visita__correo a:hover { text-decoration-color: currentColor; }

.visita__horario {
  padding: clamp(1.625rem, 3.2vw, 2.5rem);
  border-radius: var(--radio);
  background: rgb(251 243 228 / 0.06);
  box-shadow: inset 0 0 0 1px rgb(251 243 228 / 0.12);
}
.visita__horario h3 {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.horario {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.0625rem;
}
.horario th,
.horario td {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgb(251 243 228 / 0.14);
  font-weight: 500;
  text-align: left;
}
.horario td {
  color: rgb(251 243 228 / 0.8);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.horario tr:last-child > * { border-bottom: 0; }
.horario .es-hoy th,
.horario .es-hoy td { color: var(--crema); font-weight: 700; }
.hoy {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--crema);
  color: var(--vino);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: 0.1em;
}

@media (min-width: 56em) {
  .visita__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .visita__horario { margin-top: 2.5rem; }
}

/* ==========================================================================
   Pie
   ========================================================================== */

.pie {
  padding: clamp(3rem, 6vw, 4.5rem) max(var(--margen), env(safe-area-inset-left, 0px)) calc(2rem + env(safe-area-inset-bottom, 0px));
  background: var(--crema-hondo);
  color: var(--tinta-suave);
  font-size: 0.875rem;
  line-height: 1.55;
}

.pie__grid {
  display: grid;
  gap: 2rem;
  max-width: var(--ancho);
  margin-inline: auto;
}

.pie__marca img { width: 6.5rem; margin-bottom: 0.75rem; }
.pie__titulo {
  margin-bottom: 0.5rem;
  color: var(--tinta);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
}
.pie address { font-style: normal; }
.pie p + p, .pie address + p { margin-top: 0.35rem; }
.pie ul { margin: 0; padding: 0; list-style: none; }
.pie li + li { margin-top: 0.35rem; }
.pie a { color: var(--tinta-suave); text-decoration: none; }
.pie a:hover { color: var(--burdeos); text-decoration: underline; text-underline-offset: 0.2em; }

.pie__base {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: var(--ancho);
  margin: 2.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--linea);
}

/* Créditos de las fotos: plegados por defecto (funciona sin JavaScript). */
.creditos { max-width: 40rem; }
.creditos summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  border-radius: 0.375rem;
  cursor: pointer;
  list-style: none;
}
.creditos summary::-webkit-details-marker { display: none; }
.creditos summary::after {
  /* Flecha dibujada con bordes: no tiene texto, así que no se lee. */
  content: "";
  width: 0.4em;
  height: 0.4em;
  margin-top: -0.2em;
  border-right: 0.1em solid currentColor;
  border-bottom: 0.1em solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.creditos[open] summary::after { margin-top: 0.15em; transform: rotate(-135deg); }
.creditos summary:hover { color: var(--burdeos); }
.creditos__cuerpo { padding-top: 0.75rem; }
.creditos ul { margin: 0.6rem 0; }
.creditos li + li { margin-top: 0.2rem; }
.creditos a { text-decoration: underline; text-decoration-color: rgb(107 94 86 / 0.4); text-underline-offset: 0.18em; }

@media (min-width: 40em) {
  .pie__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64em) {
  .pie__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* Pie de las páginas legales: la página actual, y el enlace a los créditos de la portada. */
.pie a[aria-current="page"] { color: var(--tinta); font-weight: 600; }
.pie__creditos {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  border-radius: 0.375rem;
}
.pie__creditos::after {
  /* Flecha dibujada con bordes: no tiene texto, así que no se lee. */
  content: "";
  width: 0.4em;
  height: 0.4em;
  border-top: 0.1em solid currentColor;
  border-right: 0.1em solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.pie__creditos:hover::after { transform: translateX(0.15em) rotate(45deg); }

/* ==========================================================================
   Páginas legales (aviso-legal.html y privacidad.html)
   Una sola columna tranquila (unos 68 caracteres por línea), título grande y
   el texto legal tal cual. Los datos del titular, en una tarjeta.
   ========================================================================== */

.legal {
  padding-block:
    calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(3rem, 8vw, 6.5rem))
    clamp(5rem, 11vw, 8.5rem);
}
/* Sin JavaScript, en móvil, la cabecera va en el flujo de la página (ver "Cabecera"). */
@media (max-width: 47.99em) {
  html:not(.js) .legal { padding-top: clamp(2rem, 8vw, 3rem); }
}

.legal-articulo {
  max-width: 68ch;
  margin-inline: auto;
}

.legal-cabeza {
  margin-bottom: clamp(2.25rem, 5vw, 3.25rem);
  padding-bottom: clamp(2rem, 4.5vw, 3rem);
  border-bottom: 1px solid var(--linea);
}
.legal-cabeza .antetitulo { margin-bottom: 0.75rem; }

.legal-titulo {
  font-size: clamp(2.5rem, 1.75rem + 3.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

.legal-fecha {
  margin-top: 1.25rem;
  color: var(--tinta-suave);
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
}

.legal-cuerpo {
  line-height: 1.62;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.legal-cuerpo p + p { margin-top: 1em; }
.legal-cuerpo strong { font-weight: 600; }

.legal-cuerpo h2 {
  margin: clamp(2.75rem, 5.5vw, 3.75rem) 0 0.875rem;
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  line-height: 1.2;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.legal-cuerpo > :first-child { margin-top: 0; }
.legal-num { color: var(--burdeos); font-variant-numeric: tabular-nums; }

.legal-cuerpo a {
  color: var(--burdeos);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(140 29 46 / 0.38);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s;
}
.legal-cuerpo a:hover { text-decoration-color: currentColor; }

/* "En pocas palabras" (privacidad): el resumen, en una tarjeta clara y un poco más grande. */
.legal-resumen {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 1.25rem;
  background: var(--crema-claro);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.5;
  letter-spacing: -0.014em;
}
.legal-resumen strong { color: var(--burdeos); }

/* Datos del titular: etiqueta encima en móvil; en dos columnas desde 40em. */
.legal-datos {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 1.5rem 0 0;
  padding: 0.25rem clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 1.25rem;
  background: var(--crema-claro);
  line-height: 1.5rem;
}
.legal-datos dt {
  padding-top: 0.875rem;
  color: var(--tinta-suave);
  font-size: 0.9375rem;
  font-weight: 500;
}
.legal-datos dd {
  margin: 0;
  padding: 0.125rem 0 0.875rem;
  border-bottom: 1px solid var(--linea);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.legal-datos dd:last-of-type { border-bottom: 0; }
@media (min-width: 40em) {
  .legal-datos { grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr); }
  .legal-datos dt,
  .legal-datos dd {
    padding-block: 0.875rem;
    border-bottom: 1px solid var(--linea);
  }
  .legal-datos dt { padding-right: 1.5rem; }
  .legal-datos dt:last-of-type,
  .legal-datos dd:last-of-type { border-bottom: 0; }
}

/* ==========================================================================
   Página de error 404 (404.html)
   nginx la sirve en cualquier URL que no exista, a cualquier profundidad
   (/lo-que-sea/otra-cosa): por eso su HTML usa rutas absolutas (/css/…).
   El "404" va dentro de un óvalo doble, como el del logotipo.
   ========================================================================== */

.error {
  display: grid;
  place-items: center;
  min-height: 86vh;
  min-height: 86svh;
  padding-block:
    calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(2.5rem, 7vh, 5rem))
    clamp(4rem, 10vh, 7rem);
  overflow: hidden; /* respaldo para navegadores sin overflow: clip */
  overflow: clip;
  background: radial-gradient(60% 55% at 50% 38%, var(--crema-claro) 0%, rgb(255 251 243 / 0) 100%);
  text-align: center;
}
/* Sin JavaScript, en móvil, la cabecera va en el flujo de la página (ver "Cabecera"). */
@media (max-width: 47.99em) {
  html:not(.js) .error { padding-top: clamp(2rem, 8vw, 3rem); }
}

.error__contenido {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.error__emblema {
  position: relative;
  display: grid;
  place-items: center;
  width: min(70vw, 21rem);
  aspect-ratio: 800 / 373;
  margin-bottom: clamp(2.25rem, 6vh, 3.5rem);
}

.error__anillos { position: absolute; inset: 0; pointer-events: none; }
.error__anillos span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% * var(--k));
  aspect-ratio: 800 / 373;
  border: 1px solid rgb(140 29 46 / 0.16);
  border-radius: 50%;
  translate: -50% -50%;
}
.error__anillos span:nth-child(1) { --k: 1; --n: 0; border: 2px solid rgb(140 29 46 / 0.55); }
.error__anillos span:nth-child(2) { --k: 0.93; --n: 0; border-color: rgb(140 29 46 / 0.3); }
.error__anillos span:nth-child(3) { --k: 1.32; --n: 1; border-color: rgb(140 29 46 / 0.12); }
.error__anillos span:nth-child(4) { --k: 1.72; --n: 2; border-color: rgb(140 29 46 / 0.07); }

.error__cifra {
  position: relative;
  color: var(--burdeos);
  font-size: clamp(4.25rem, 2.5rem + 7vw, 7rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.05em;
}

.error__titulo {
  font-size: clamp(2.5rem, 1.45rem + 4.4vw, 4.75rem);
  line-height: 1.03;
  letter-spacing: -0.042em;
  text-wrap: balance;
}
.error__titulo span { color: var(--burdeos); }

.error__texto {
  max-width: 31rem;
  margin-top: 1.1rem;
  color: var(--tinta-suave);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.error__acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(1.75rem, 4vh, 2.25rem);
}

.error__estado { justify-content: center; margin-top: 1.5rem; }

/* ==========================================================================
   MOVIMIENTO
   Todo lo que sigue solo se aplica con html.js-anim (JS activo y sin
   "reducir movimiento").
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Entrada de la portada ---------- */

@keyframes cediel-logo {
  from { opacity: 0; transform: scale(0.9); filter: blur(18px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes cediel-subir {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: none; }
}
@keyframes cediel-anillo {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: none; }
}

.js-anim .hero__logo { animation: cediel-logo 1.6s var(--ease-suave) 0.1s both; }
.js-anim .hero__anillos span { animation: cediel-anillo 2s var(--ease-suave) calc(0.35s + var(--n) * 0.16s) both; }
.js-anim .hero__antetitulo { animation: cediel-subir 1.1s var(--ease-suave) 0.3s both; }
.js-anim .hero__titular { animation: cediel-subir 1.2s var(--ease-suave) 0.5s both; }
.js-anim .hero__entradilla { animation: cediel-subir 1.2s var(--ease-suave) 0.62s both; }
.js-anim .hero__acciones { animation: cediel-subir 1.2s var(--ease-suave) 0.74s both; }
.js-anim .hero__estado { animation: cediel-subir 1.2s var(--ease-suave) 0.86s both; }

/* ---------- Páginas legales: solo un fundido suave al abrir (el texto no se mueve con el scroll) ---------- */

@keyframes cediel-aparecer {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: none; }
}
.js-anim .legal-cabeza { animation: cediel-aparecer 0.9s var(--ease-suave) 0.05s backwards; }
.js-anim .legal-cuerpo { animation: cediel-aparecer 0.9s var(--ease-suave) 0.2s backwards; }

/* ---------- Página 404: la misma entrada que la portada, más corta ---------- */

.js-anim .error__cifra { animation: cediel-logo 1.3s var(--ease-suave) 0.05s both; }
.js-anim .error__anillos span { animation: cediel-anillo 1.8s var(--ease-suave) calc(0.2s + var(--n) * 0.16s) both; }
.js-anim .error__titulo { animation: cediel-subir 1.1s var(--ease-suave) 0.3s both; }
.js-anim .error__texto { animation: cediel-subir 1.1s var(--ease-suave) 0.42s both; }
.js-anim .error__acciones { animation: cediel-subir 1.1s var(--ease-suave) 0.54s both; }
.js-anim .error__estado { animation: cediel-subir 1.1s var(--ease-suave) 0.66s both; }

/* ---------- Aparición al entrar en pantalla (IntersectionObserver) ---------- */

.js-anim [data-revelar] {
  opacity: 0;
  transform: translateY(2.5rem);
  transition:
    opacity 0.9s var(--ease) calc(var(--i, 0) * 90ms),
    transform 1.2s var(--ease-suave) calc(var(--i, 0) * 90ms),
    translate 0.5s var(--ease);
}
.js-anim [data-revelar].is-in { opacity: 1; transform: none; }

/* Escalonado por filas: cada tarjeta aparece por su cuenta al entrar en pantalla y
   solo se retrasan (90 ms por puesto) las que comparten fila con otra. En una
   sola columna no hay retraso. */
@media (min-width: 40em) and (max-width: 63.99em) {
  .tile--zumo, .tile--pan, .tile--sin { --i: 1; }
}
@media (min-width: 64em) {
  .tile--zumo, .tile--cafe, .tile--sin { --i: 1; }
  .tile--pan { --i: 2; }
}
@media (min-width: 56em) {
  .resena:nth-child(3) { --i: 1; }
  .resena:nth-child(4) { --i: 2; }
}

.js-anim .chip {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease-suave);
}
.js-anim .is-in .chip { opacity: 1; transform: none; }
.js-anim .is-in .chip:nth-child(1) { transition-delay: 0.25s; }
.js-anim .is-in .chip:nth-child(2) { transition-delay: 0.33s; }
.js-anim .is-in .chip:nth-child(3) { transition-delay: 0.41s; }
.js-anim .is-in .chip:nth-child(4) { transition-delay: 0.49s; }

/* Ilustraciones que se dibujan solas (pathLength="1" en cada trazo). */
.js-anim .ilus {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1.02;
  transition: stroke-dashoffset 2s var(--ease) calc(0.3s + var(--i, 0) * 90ms);
}
.js-anim .is-in .ilus { stroke-dashoffset: 0; }

/* Estrellas de la nota media. */
.js-anim .nota__estrellas { opacity: 0; transform: scale(0.94); transition: opacity 0.8s var(--ease) 0.35s, transform 1s var(--ease-suave) 0.35s; }
.js-anim .is-in .nota__estrellas { opacity: 1; transform: none; }

/* Punto de "Abierto ahora": late dos veces y se para (termina antes de 5 s). */
@keyframes cediel-latido {
  0% { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.8); }
}
.js-anim .estado--abierto .estado__punto::after { animation: cediel-latido 1.8s var(--ease) 1s 2; }

/* Menú móvil: los enlaces entran escalonados. */
@media (max-width: 47.99em) {
  /* .js.js-anim: si main.js no llega a cargar, v2.js quita "js" y la lista vuelve a verse. */
  .js.js-anim .nav__lista li {
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease-suave);
  }
  .js.js-anim .nav.abierto .nav__lista li { opacity: 1; transform: none; }
  .js.js-anim .nav.abierto .nav__lista li:nth-child(2) { transition-delay: 0.04s; }
  .js.js-anim .nav.abierto .nav__lista li:nth-child(3) { transition-delay: 0.08s; }
  .js.js-anim .nav.abierto .nav__lista li:nth-child(4) { transition-delay: 0.12s; }
}

/* ---------- Sección fija: se activa si hay hueco vertical ---------- */

@media (min-height: 31rem) {
  .js-anim .frase { height: 320vh; }
  .js-anim .frase__fijo {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    min-height: 0;
  }
}

/* ---------- Animaciones ligadas al scroll (nativas) ---------- */

@keyframes cediel-emblema-sale {
  to { opacity: 0; transform: translateY(-6vh) scale(0.8); }
}
@keyframes cediel-anillos-sale {
  to { opacity: 0; transform: scale(1.35); }
}
@keyframes cediel-texto-sale {
  to { opacity: 0; transform: translateY(-3vh); }
}
@keyframes cediel-linea {
  from { opacity: 0.22; transform: translateY(0.14em); }
  to { opacity: 1; transform: none; }
}
@keyframes cediel-cierre {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: none; }
}
@keyframes cediel-marco {
  from { transform: scale(0.9); }
  to { transform: none; }
}
@keyframes cediel-foto-lenta {
  from { transform: translateY(-2%) scale(1.12); }
  to { transform: translateY(2%) scale(1.04); }
}
@keyframes cediel-foto-entra {
  from { transform: scale(1.12); }
  to { transform: none; }
}
@keyframes cediel-flotar {
  from { transform: translateY(0.9rem); }
  to { transform: translateY(-0.9rem); }
}

@supports (animation-timeline: view()) {
  /* Portada: ligada al scroll de la página (la portada empieza arriba del todo). */
  .js-anim.sda .hero__emblema,
  .js-anim.sda .hero__anillos,
  .js-anim.sda .hero__texto {
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: scroll(root block);
  }
  .js-anim.sda .hero__emblema { animation-name: cediel-emblema-sale; animation-range: 0px 60vh; }
  .js-anim.sda .hero__anillos { animation-name: cediel-anillos-sale; animation-range: 0px 50vh; }
  .js-anim.sda .hero__texto { animation-name: cediel-texto-sale; animation-range: 20vh 70vh; }

  /* La foto de la portada crece hasta su tamaño y se acerca despacio. */
  .js-anim.sda .escena { view-timeline: --cediel-escena block; }
  .js-anim.sda .escena__marco {
    animation: cediel-marco linear both;
    animation-timeline: --cediel-escena;
    animation-range: cover 0% cover 50%;
  }
  .js-anim.sda .escena__foto {
    animation: cediel-foto-lenta linear both;
    animation-timeline: --cediel-escena;
    animation-range: cover 0% cover 100%;
  }

  /* Fotos de la carta: se asientan (1,12 → 1) al entrar. */
  .js-anim.sda .tile__media { view-timeline: --cediel-tile block; }
  .js-anim.sda .tile__foto {
    animation: cediel-foto-entra linear both;
    animation-timeline: --cediel-tile;
    animation-range: entry 0% cover 55%;
  }

  @media (min-height: 31rem) {
    .js-anim.sda .frase { view-timeline: --cediel-frase block; }
    .js-anim.sda .frase__linea,
    .js-anim.sda .frase__cierre {
      animation: cediel-linea linear both;
      animation-timeline: --cediel-frase;
    }
    .js-anim.sda .frase__linea:nth-child(1) { animation-range: contain 0% contain 15%; }
    .js-anim.sda .frase__linea:nth-child(2) { animation-range: contain 15% contain 30%; }
    .js-anim.sda .frase__linea:nth-child(3) { animation-range: contain 30% contain 45%; }
    .js-anim.sda .frase__linea:nth-child(4) { animation-range: contain 45% contain 60%; }
    .js-anim.sda .frase__cierre { animation-name: cediel-cierre; animation-range: contain 58% contain 74%; }
  }

  .js-anim.sda .tile .ilus {
    animation: cediel-flotar linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
  }
}

/* ---------- Respaldo sin scroll-driven animations: v2.js escribe --p ---------- */

.js-anim.no-sda .hero__emblema {
  --k: min(1, calc(var(--p, 0) / 0.6));
  opacity: calc(1 - var(--k));
  transform: translateY(calc(var(--k) * -6vh)) scale(calc(1 - var(--k) * 0.2));
}
.js-anim.no-sda .hero__anillos {
  --k: min(1, calc(var(--p, 0) / 0.5));
  opacity: calc(1 - var(--k));
  transform: scale(calc(1 + var(--k) * 0.35));
}
.js-anim.no-sda .hero__texto {
  --k: clamp(0, calc((var(--p, 0) - 0.2) / 0.5), 1);
  opacity: calc(1 - var(--k));
  transform: translateY(calc(var(--k) * -3vh));
}

@media (min-height: 31rem) {
  .js-anim.no-sda .frase__linea,
  .js-anim.no-sda .frase__cierre {
    --k: clamp(0, calc((var(--p, 0) - var(--a)) / 0.15), 1);
    opacity: calc(0.22 + var(--k) * 0.78);
    transform: translateY(calc((1 - var(--k)) * 0.14em));
  }
  .js-anim.no-sda .frase__cierre { opacity: var(--k); transform: translateY(calc((1 - var(--k)) * 1.5rem)); }
  .frase__linea:nth-child(1) { --a: 0; }
  .frase__linea:nth-child(2) { --a: 0.15; }
  .frase__linea:nth-child(3) { --a: 0.3; }
  .frase__linea:nth-child(4) { --a: 0.45; }
  .frase__cierre { --a: 0.58; }
}

.js-anim.no-sda .escena__marco {
  --k: min(1, calc(var(--p, 0) / 0.5));
  transform: scale(calc(0.9 + var(--k) * 0.1));
}
.js-anim.no-sda .escena__foto {
  transform: translateY(calc(-2% + var(--p, 0) * 4%)) scale(calc(1.12 - var(--p, 0) * 0.08));
}
/* Fotos de la carta sin scroll-driven: se asientan una vez, al aparecer. */
.js-anim.no-sda .tile__foto {
  transform: scale(1.12);
  transition: transform 1.8s var(--ease-suave) 0.1s, scale 0.9s var(--ease);
}
.js-anim.no-sda .is-in .tile__foto { transform: none; }

/* ---------- Reducir movimiento: todo quieto y visible ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  [data-revelar], .chip, .ilus, .nota__estrellas, .nav__lista li { opacity: 1 !important; transform: none !important; }
  .ilus { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .frase { height: auto !important; }
  .frase__fijo { position: static !important; height: auto !important; min-height: 100svh; }
  .frase__linea, .frase__cierre, .hero__emblema, .hero__anillos, .hero__texto { opacity: 1 !important; transform: none !important; }
  .escena__marco, .escena__foto, .tile__foto { transform: none !important; }
  .pastilla, .tile { translate: none !important; }
  .tile__foto { scale: none !important; }
}

/* ==========================================================================
   IMPRESIÓN (y "Guardar como PDF")
   Todo quieto, visible y en tinta sobre blanco. Fuera la navegación, los
   botones, la decoración y las fotos (gastan tinta y no aportan en papel).
   La cifra de la nota media la deja en su valor final v2.js (beforeprint).
   ========================================================================== */

@media print {
  @page { margin: 1.5cm; }

  html { overflow: visible !important; scroll-padding-top: 0; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }
  body { background: #fff; color: #000; font-size: 11pt; }

  .saltar,
  .cabecera,
  .hero__anillos,
  .hero__acciones,
  .escena,
  .tile__media,
  .ilus,
  .nota-carta span,
  .visita__acciones,
  .creditos, .pie__creditos,
  .error__acciones, .error__anillos,
  .estado-linea, .hoy { display: none !important; } /* "Abierto ahora" y "Hoy" caducan en el papel */

  /* Lo que en pantalla aparece o se mueve con el scroll, aquí se ve siempre y en su sitio. */
  [data-revelar], .chip, .nota__estrellas,
  .hero__logo, .hero__emblema, .hero__texto, .hero__antetitulo, .hero__titular, .hero__entradilla, .hero__estado,
  .frase__linea, .frase__cierre, .legal-cabeza, .legal-cuerpo,
  .error__cifra, .error__titulo, .error__texto {
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
    filter: none !important;
  }

  /* Secciones oscuras: sin fondo y con texto oscuro (el fondo no se imprime). */
  .hero, .hero__intro, .oscuro, .tile, .resena figure, .visita__horario, .pie, .estado, .hoy, .chip { background: none !important; }
  .oscuro, .oscuro *, .tile--oscuro, .tile--oscuro *, .tile--foto-oscura, .tile--foto-oscura * { color: var(--tinta) !important; }
  .oscuro .antetitulo, .tile--oscuro .tile__eti { color: var(--burdeos) !important; }
  .chip--lleno { color: var(--burdeos); }
  .chip, .tile, .resena figure, .visita__horario { border: 1px solid #c9bfb6; }
  .horario th, .horario td { border-bottom-color: #c9bfb6; }

  /* Medidas de papel. */
  .hero { padding-bottom: 0; }
  .hero__intro { min-height: 0; padding: 0 0 1.5rem; }
  .hero__emblema { width: 13rem; }
  .hero__titular { margin-top: 1rem; font-size: 2.5rem; }
  .frase { height: auto !important; }
  .frase__fijo { position: static !important; height: auto !important; min-height: 0 !important; padding-block: 1.5rem; }
  .frase__lineas { font-size: 2.5rem; }
  .carta, .opiniones, .carta + .opiniones, .visita { padding-block: 1.5rem; }
  .cabeza { margin-bottom: 1.5rem; }
  .titular { font-size: 2.25rem; }
  .tile, .tile--sin { min-height: 0; padding: 1.25rem; }
  .tile h3, .tile--bolleria h3, .tile--sin h3 { font-size: 1.5rem; }
  .nota { margin-bottom: 1.5rem; }
  .nota__cifra { font-size: 4rem; }
  .resena--larga figure::before { display: none; }
  .resena--larga blockquote { font-size: 1.25rem; }
  .resena__vacia { color: #c9bfb6 !important; }
  .horario .es-hoy th, .horario .es-hoy td { font-weight: 500; }
  .pie { padding: 1.5rem 0 0; }
  .pie__grid { gap: 1rem 2rem; }
  .pie__base { margin-top: 1rem; }

  /* Páginas legales. */
  .legal { padding: 0 0 1.5rem; }
  .legal-articulo { max-width: none; }
  .legal-cabeza { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom-color: #c9bfb6; }
  .legal-titulo { font-size: 2rem; }
  .legal-cuerpo h2 { margin-top: 1.5rem; font-size: 1.25rem; }
  .legal-resumen, .legal-datos { background: none !important; border: 1px solid #c9bfb6; }
  .legal-datos dt, .legal-datos dd { border-bottom-color: #c9bfb6; }

  /* Página 404. */
  .error { min-height: 0; padding: 0 0 1.5rem; background: none; }
  .error__emblema { margin-bottom: 1rem; }
  .error__titulo { font-size: 2rem; }

  .tile, .resena, .visita__horario, .opiniones__pie, .pie__grid > *,
  .legal-resumen, .legal-datos { break-inside: avoid; }
  h2, h3, .antetitulo { break-after: avoid; }
}
