/* ================================================================
   KAVRA · styles.css → APARIENCIA
   ================================================================
   Índice:
     1. Variables (colores, tipografías, medidas)
     2. Base y reset
     3. Utilidades y componentes (botones, títulos, secciones)
     4. Cabecera y navegación
     5. Portada
     6. La marca
     7. Carta
     8. Elaboración
     9. El espacio
    10. Pedidos y reservas (formulario)
    11. Contacto
    12. Pie de página
    13. Panel del pedido y aviso flotante
    14. Animaciones
    15. Responsive (tablet y móvil)
   ================================================================ */


/* ---------- TIPOGRAFÍAS LOCALES ----------
   Las fuentes están guardadas en assets/fonts/ (ya no se piden a Google).
   Son "variables": un solo archivo incluye todos los grosores (300 a 700).
   font-display: swap = mientras carga, muestra una letra parecida
   para que el texto nunca esté invisible. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope.woff2") format("woff2");
}


/* ---------- 1. VARIABLES ----------
   Paleta de marca + variantes de accesibilidad.
   Las variantes "-ink" y "-soft" existen porque el cobre y el oliva
   originales no tienen contraste suficiente para TEXTO pequeño
   (las normas de accesibilidad WCAG piden 4,5:1). Los originales se
   usan en elementos grandes y decorativos. */
:root {
  /* Marca */
  --carbon: #20211F;
  --ivory:  #F1EBDD;
  --copper: #287F83;
  --olive:  #73775D;

  /* Variantes */
  --carbon-2: #2A2B28;      /* Carbón un poco más claro para tarjetas */
  --carbon-3: #363733;      /* Bordes sobre fondo oscuro */
  --ivory-2: #E8E0CE;       /* Marfil algo más oscuro para fondos */
  --copper-ink: #1F6265;    /* Cobre para texto/botones sobre marfil (contraste 5:1) */
  --copper-ink-hover: #17494B;
  --copper-soft: #78B7B5;   /* Cobre para texto pequeño sobre carbón */
  --olive-ink: #5E624A;
  --text-muted: #5F5D56;    /* Texto secundario sobre marfil */
  --text-muted-light: rgba(241, 235, 221, 0.7); /* Texto secundario sobre carbón */

  /* Tipografía */
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Medidas */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);   /* Margen lateral que crece con la pantalla */
  --section-y: clamp(5rem, 10vw, 8.5rem);  /* Espacio vertical de las secciones */
  --header-h: 76px;
  --radius: 2px;                           /* Esquinas casi rectas: más "premium" */
  --ease: cubic-bezier(.2, .7, .2, 1);     /* Curva de animación suave */
}


/* ---------- 2. BASE Y RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);    /* Para que la cabecera fija no tape los títulos */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--carbon);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

/* Cuando el panel del pedido o el menú móvil están abiertos, bloqueamos el scroll */
body.is-locked { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ACCESIBILIDAD: contorno visible al navegar con teclado.
   :focus-visible solo aparece con teclado, no al hacer clic con el ratón. */
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

/* Enlace "Saltar al contenido": fuera de pantalla hasta que recibe el foco */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: .75rem 1.25rem;
  background: var(--carbon);
  color: var(--ivory);
}
.skip-link:focus { top: 1rem; }


/* ---------- 3. UTILIDADES Y COMPONENTES ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;           /* margin-inline = margen izquierdo y derecho */
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--ivory { background: var(--ivory); color: var(--carbon); }
.section--dark  { background: var(--carbon); color: var(--ivory); }

/* Texto pequeño en mayúsculas que va encima de los títulos */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--copper-ink);
  margin-bottom: 1.25rem;
}
/* Una pequeña línea decorativa delante del texto */
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
.eyebrow--light { color: var(--copper-soft); }

.section-title {
  font-size: clamp(2.1rem, 4.5vw, 3.6rem);
  font-weight: 300;
  max-width: 18ch;               /* ch = ancho de un carácter: limita la línea a ~18 letras */
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .section-title { max-width: 22ch; }
.section-head__lead {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--text-muted-light);
}

.note {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
.note--light { color: var(--text-muted-light); }

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;              /* Tamaño mínimo cómodo para el dedo en móvil */
  padding: .85rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--copper { background: var(--copper-ink); color: var(--ivory); }
.btn--copper:hover { background: var(--copper-ink-hover); }

.btn--dark { background: var(--carbon); color: var(--ivory); }
.btn--dark:hover { background: var(--carbon-3); }

.btn--outline-light { border-color: rgba(241, 235, 221, .5); color: var(--ivory); background: transparent; }
.btn--outline-light:hover { background: var(--ivory); color: var(--carbon); border-color: var(--ivory); }

.btn--block { width: 100%; }


/* ---------- 4. CABECERA Y NAVEGACIÓN ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;             /* Pegada arriba, a todo lo ancho */
  z-index: 50;
  height: var(--header-h);
  color: var(--ivory);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
/* Añadida por JavaScript al bajar: fondo carbón */
.header.is-scrolled {
  background: rgba(32, 33, 31, .96);
  box-shadow: 0 1px 0 rgba(241, 235, 221, .08);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logotipo tipográfico */
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  margin-right: auto;            /* Empuja todo lo demás hacia la derecha */
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: .32em;
}
.brand__tag {
  margin-top: .35rem;
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--copper-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav__list {
  display: flex;
  gap: 2rem;
}
.nav__link {
  position: relative;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding-block: .5rem;
  opacity: .85;
  transition: opacity .3s;
}
/* Línea cobre animada bajo el enlace */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav__link:hover,
.nav__link.is-current { opacity: 1; }
.nav__link:hover::after,
.nav__link.is-current::after { transform: scaleX(1); }  /* is-current lo pone JavaScript */

.nav__cta { min-height: 42px; padding: .6rem 1.25rem; }

.header__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Botón del carrito */
.cart-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: inherit;
}
.cart-btn__count {
  position: absolute;
  top: 4px; right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--copper);
  color: var(--carbon);
  font-size: .65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  transform: scale(0);           /* Oculto con 0 productos */
  transition: transform .3s var(--ease);
}
.cart-btn.has-items .cart-btn__count { transform: scale(1); }
.cart-btn.bump { animation: bump .4s var(--ease); }

/* Hamburguesa: oculta en ordenador */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child  { top: 25px; }
/* Se convierte en una X cuando el menú está abierto */
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { top: 21px; transform: rotate(-45deg); }


/* ---------- 5. PORTADA ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;            /* svh: altura real en móviles (sin la barra del navegador) */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--ivory);
  background: var(--carbon);     /* Color de respaldo mientras carga la foto */
  overflow: hidden;
  isolation: isolate;            /* Crea una "capa" propia para ordenar foto y degradado */
}
/* Carrusel: todas las fotos están apiladas una encima de otra.
   Solo la que tiene la clase "is-active" es visible (opacity: 1). */
.hero__slides {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);   /* Encuadre: se define en cada foto del HTML */
  opacity: 0;
  transition: opacity 1.6s ease;          /* Duración del fundido */
}
.hero__img.is-active {
  z-index: 1;                             /* La nueva aparece ENCIMA de la que se va */
  opacity: 1;
  animation: heroZoom 4s linear both;     /* Zoom lento mientras está en pantalla (= tiempo por foto) */
}
/* Degradado carbón: oscurece la izquierda y la parte baja para leer el texto */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(32,33,31,.92) 0%, rgba(32,33,31,.65) 40%, rgba(32,33,31,.1) 75%),
    linear-gradient(0deg, rgba(32,33,31,.9) 0%, rgba(32,33,31,0) 35%);
}

.hero__content {
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.hero__content > * { animation: fadeUp 1s var(--ease) both; }
.hero__content > :nth-child(2) { animation-delay: .1s; }   /* Cada elemento aparece un poco después */
.hero__content > :nth-child(3) { animation-delay: .2s; }
.hero__content > :nth-child(4) { animation-delay: .3s; }

.hero__title {
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: .98;
  letter-spacing: -0.025em;
}
.hero__title em {
  font-style: italic;
  color: var(--copper-soft);
}
.hero__lead {
  max-width: 34rem;
  margin: 1.75rem 0 2.5rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: rgba(241, 235, 221, .82);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(241, 235, 221, .18);
  padding-block: 1.5rem 2rem;
  animation: fadeIn 1.2s .5s both;
}
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts strong {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 400;
}
.hero__facts span {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted-light);
}


/* ---------- 6. LA MARCA ---------- */
/* "split" = dos columnas: imagen + texto */
.split {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}
.split__media { position: relative; }
.split__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
/* Sello circular que sobresale de la foto */
.split__badge {
  position: absolute;
  right: -1.5rem;
  bottom: 2.5rem;
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--copper);
  color: var(--carbon);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}
.split__badge strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0;
}

.split__text > p {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--text-muted);
}
.split__text .section-title { margin-bottom: .5rem; }

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(32, 33, 31, .15);
}
.values__num {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--copper-ink);
}
.values h3 { font-size: 1.4rem; margin: .4rem 0 .5rem; }
.values p { font-size: .88rem; color: var(--text-muted); line-height: 1.55; }


/* ---------- 7. CARTA ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 3rem;
}
.filters__btn {
  min-height: 44px;
  padding: .55rem 1.2rem;
  border: 1px solid var(--carbon-3);
  border-radius: 999px;          /* Forma de píldora */
  background: transparent;
  color: var(--text-muted-light);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: all .3s var(--ease);
}
.filters__btn:hover { color: var(--ivory); border-color: var(--olive); }
.filters__btn.is-active {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--carbon);
}

/* Rejilla de productos: auto-fill crea tantas columnas como quepan
   (mínimo 270px cada una). Así se adapta sola a cualquier pantalla. */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.dish {
  display: flex;
  flex-direction: column;
  background: var(--carbon-2);
  border: 1px solid var(--carbon-3);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.dish:hover { border-color: rgba(182, 110, 77, .6); transform: translateY(-4px); }
/* JavaScript añade "is-hidden" a los platos que no son de la categoría elegida */
.dish.is-hidden { display: none; }
.dish.is-entering { animation: fadeUp .5s var(--ease) both; }

.dish__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--carbon-3);
}
.dish__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.dish:hover .dish__media img { transform: scale(1.05); }

.dish__tag {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: .3rem .7rem;
  background: var(--copper-ink);
  color: var(--ivory);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.dish__tag--olive { background: var(--olive-ink); }

.dish__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}
.dish__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.dish__head h3 { font-size: 1.35rem; }
.dish__price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--copper-soft);
  white-space: nowrap;
}
.dish__body p {
  margin: .6rem 0 1.25rem;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--text-muted-light);
}
.dish__add {
  margin-top: auto;              /* Empuja el botón al fondo de la tarjeta */
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .5rem 0;
  border: 0;
  border-bottom: 1px solid var(--copper);
  background: none;
  color: var(--ivory);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .3s, gap .3s var(--ease);
}
.dish__add:hover { color: var(--copper-soft); gap: 1rem; }
.dish__add span { font-size: 1.1rem; font-weight: 400; }


/* ---------- 8. ELABORACIÓN ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: clamp(4rem, 8vw, 6rem);
  counter-reset: none;
}
.step {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(32, 33, 31, .2);
  position: relative;
}
/* Pequeño tramo cobre sobre la línea superior */
.step::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 40px;
  height: 2px;
  background: var(--copper);
}
.step__num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 300;
  color: var(--olive);
  line-height: 1;
}
.step h3 { font-size: 1.45rem; margin: 1rem 0 .6rem; }
.step p { font-size: .9rem; color: var(--text-muted); }

.ingredients {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.ingredients__mosaic {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  height: clamp(380px, 48vw, 560px);
}
.ingredients__mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.ingredients__big { grid-row: span 2; }   /* La foto grande ocupa las dos filas */

.ingredients__title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1.5rem; }
.ingredients__list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding-block: .95rem;
  border-bottom: 1px solid rgba(32, 33, 31, .12);
  font-size: .92rem;
  color: var(--text-muted);
}
.ingredients__list span {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--olive-ink);
  padding-top: .2rem;
}


/* ---------- 9. EL ESPACIO ---------- */
.space-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 4rem;
  align-items: end;
  margin-bottom: 3.5rem;
}
.space-intro > p { color: var(--text-muted-light); max-width: 32rem; }

.space-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.space-gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1;
  background: var(--carbon-3);
}
.space-gallery__item--wide { grid-column: span 2; aspect-ratio: auto; }
.space-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.space-gallery__item:hover img { transform: scale(1.04); }
.space-gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1.25rem 1rem;
  background: linear-gradient(0deg, rgba(32,33,31,.85), transparent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}


/* ---------- 10. PEDIDOS Y RESERVAS ---------- */
.access {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 1.5rem;
  align-items: stretch;
}
.access__card {
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius);
  background: #FBF8F1;
  border: 1px solid var(--ivory-2);
}
.access__card h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.access__card--dark {
  display: flex;
  flex-direction: column;
  background: var(--carbon);
  color: var(--ivory);
  border-color: var(--carbon);
}
.access__card--dark > p { color: var(--text-muted-light); }
.access__list {
  margin: 1.75rem 0 2rem;
  display: grid;
  gap: .6rem;
}
.access__list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
}
.access__list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--copper);
}
.access__actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Formulario */
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
.form__row--3 { grid-template-columns: 1.4fr 1fr 1fr; }

.field { margin-bottom: .5rem; }
.field label {
  display: block;
  margin-bottom: .4rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  border: 1px solid #CFC6B2;
  border-radius: var(--radius);
  background: var(--ivory);
  font-size: 1rem;               /* 16px evita que el iPhone haga zoom al escribir */
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--copper-ink);
  box-shadow: 0 0 0 3px rgba(182, 110, 77, .2);
}
/* aria-invalid lo pone JavaScript cuando un campo tiene un error */
.field [aria-invalid="true"] { border-color: #A23B2A; }
.field__error {
  min-height: 1.3rem;            /* Reserva el espacio para que el formulario no "salte" */
  font-size: .78rem;
  color: #A23B2A;
}
/* Casilla de privacidad (RGPD) */
.consent {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-top: .5rem;
  font-size: .9rem;
  line-height: 1.4;
}
.consent input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: .1rem;
  accent-color: var(--copper-ink);   /* Colorea la casilla con el cobre de la marca */
}
.consent a,
.consent__info a { color: var(--copper-ink); text-decoration: underline; }
.consent [aria-invalid="true"] { outline: 2px solid #A23B2A; outline-offset: 2px; }
.consent__info {
  margin-bottom: 1rem;
  font-size: .75rem;
  line-height: 1.5;
  opacity: .8;
}

.form__status {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--olive-ink);
}
.form__status:empty { display: none; }


/* ---------- 11. CONTACTO ---------- */
.contact {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: stretch;
}
.provisional-badge {
  display: inline-block;
  margin-top: 1.25rem;
  padding: .3rem .75rem;
  border: 1px dashed var(--copper-soft);
  color: var(--copper-soft);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.contact__data {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0 2.5rem;
}
.contact__data dt {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper-soft);
}
.contact__data dd { margin: .2rem 0 0; font-size: 1.05rem; }

.contact__subtitle { font-size: 1.5rem; margin-bottom: 1rem; }
.contact__subtitle span { font-family: var(--font-body); font-size: .8rem; color: var(--text-muted-light); }

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--carbon-3);
  font-size: .9rem;
  color: var(--text-muted-light);
}
.hours li span:last-child { text-align: right; }
/* Día de hoy, marcado por JavaScript */
.hours li.is-today { color: var(--ivory); font-weight: 600; }
.hours li.is-today span:first-child::after {
  content: " · hoy";
  color: var(--copper-soft);
}

/* Mapa provisional */
.map-placeholder {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--carbon-2);
  border: 1px solid var(--carbon-3);
  color: var(--olive);
}
.map-placeholder__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .5;
}
.map-placeholder__pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  color: var(--ivory);
  font-size: .85rem;
}
.map-placeholder__pin strong { letter-spacing: .3em; }
.map-placeholder__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 0 rgba(182, 110, 77, .6);
  animation: pulse 2.4s infinite;
}


/* ---------- 12. PIE DE PÁGINA ---------- */
.footer {
  background: #191A18;
  color: var(--ivory);
  padding-block: 3.5rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand--footer { margin-right: 0; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.footer__links a { opacity: .75; transition: opacity .3s; }
.footer__links a:hover { opacity: 1; }
.footer__legal {
  width: 100%;
  padding-top: 2rem;
  border-top: 1px solid var(--carbon-3);
  font-size: .78rem;
  color: var(--text-muted-light);
}


/* ---------- 13. PANEL DEL PEDIDO Y AVISO ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 20, 19, .55);
  animation: fadeIn .3s both;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 100;
  width: min(420px, 100%);        /* El menor de los dos: 420px o todo el ancho */
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  color: var(--carbon);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .25);
  animation: slideIn .4s var(--ease) both;
}
.drawer[hidden], .drawer-backdrop[hidden] { display: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--ivory-2);
}
.drawer__head h2 { font-size: 1.8rem; }
.drawer__close {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 2rem;
  line-height: 1;
}

.drawer__items {
  flex: 1;
  overflow-y: auto;               /* Si hay muchos productos, la lista hace scroll */
  padding: .5rem 1.5rem;
}
.drawer__empty {
  flex: 1;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
}
.drawer__empty[hidden] { display: none; }

.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem 1rem;
  align-items: center;
  padding-block: 1rem;
  border-bottom: 1px solid var(--ivory-2);
}
.line__name { font-weight: 600; }
.line__price { font-family: var(--font-display); font-size: 1.05rem; }
.qty {
  justify-self: start;           /* Que no se estire a todo el ancho de la columna */
  display: inline-flex;
  align-items: center;
  border: 1px solid #CFC6B2;
  border-radius: 999px;
}
.qty button {
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  font-size: 1.1rem;
}
.qty output { min-width: 1.5rem; text-align: center; font-weight: 600; }
.line__remove {
  justify-self: end;
  border: 0;
  background: none;
  padding: .4rem 0;
  font-size: .75rem;
  text-decoration: underline;
  color: var(--text-muted);
}

.drawer__foot {
  padding: 1.5rem;
  border-top: 1px solid var(--ivory-2);
  background: #FBF8F1;
}
.drawer__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}
.drawer__total strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; }
.drawer__msg { margin-top: .75rem; font-weight: 600; color: var(--olive-ink); }
.drawer__msg:empty { display: none; }

/* Aviso flotante */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 120;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  background: var(--carbon);
  color: var(--ivory);
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transform: translate(-50%, 150%);   /* Escondido por debajo de la pantalla */
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s;
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }


/* ---------- 14. ANIMACIONES ---------- */
/* Elementos que aparecen al hacer scroll (JavaScript añade "is-visible").
   La clase "js" en <html> la pone JavaScript: si JavaScript fallara,
   el contenido seguiría visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes fadeUp   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes slideIn  { from { transform: translateX(100%); } to { transform: none; } }
@keyframes bump     { 50% { transform: scale(1.2); } }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(182, 110, 77, .6); }
  70%  { box-shadow: 0 0 0 22px rgba(182, 110, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(182, 110, 77, 0); }
}

/* ACCESIBILIDAD: respetar "reducir movimiento" del sistema */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}


/* ================================================================
   15. RESPONSIVE
   Diseñamos para ordenador y, con media queries, adaptamos:
     ≤ 1024px → tablet (menú hamburguesa, algunas columnas se juntan)
     ≤ 640px  → móvil (todo en una columna)
   ================================================================ */

/* ---------- TABLET ---------- */
@media (max-width: 1024px) {
  .nav-toggle { display: block; }

  /* El menú se convierte en un panel a pantalla completa */
  .nav {
    position: fixed;
    inset: 0;
    z-index: -1;                  /* Por debajo de la barra de la cabecera */
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem;
    background: var(--carbon);
    visibility: hidden;           /* Invisible y sin poder recibir el foco */
    opacity: 0;
    transition: opacity .4s var(--ease), visibility .4s;
  }
  .nav.is-open { visibility: visible; opacity: 1; }

  .nav__list { flex-direction: column; gap: .5rem; }
  .nav__link {
    font-family: var(--font-display);
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 300;
    letter-spacing: 0;
    text-transform: none;
  }
  .nav__link::after { display: none; }
  .nav__link.is-current { color: var(--copper-soft); }
  .nav__cta { min-height: 52px; padding-inline: 2rem; }

  .header.menu-open { background: var(--carbon); }

  .split { grid-template-columns: 1fr 1fr; }
  .split__badge { right: 1rem; }
  .values { grid-template-columns: 1fr; gap: 1.25rem; }
  .values li { display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; }
  .values li h3 { margin-top: 0; }
  .values li p { grid-column: 2; }

  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; }
  .ingredients { grid-template-columns: 1fr; }
  .access { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .map-placeholder { min-height: 320px; }
}

/* ---------- MÓVIL ---------- */
@media (max-width: 640px) {
  :root { --header-h: 66px; }

  .brand__name { font-size: 1.4rem; }
  .brand__tag { font-size: .5rem; letter-spacing: .28em; }

  .hero__img { object-position: var(--pos-movil, var(--pos, center)); }
  .hero::after {
    background: linear-gradient(0deg, rgba(32,33,31,.95) 0%, rgba(32,33,31,.7) 45%, rgba(32,33,31,.25) 100%);
  }
  .hero__actions .btn { flex: 1; }   /* Botones a todo el ancho, repartidos */
  .hero__facts { gap: .5rem; }
  .hero__facts span { font-size: .62rem; letter-spacing: .08em; }

  .split { grid-template-columns: 1fr; }
  .split__media img { aspect-ratio: 4 / 3; }
  .split__badge { width: 96px; height: 96px; bottom: -1.5rem; }
  .split__badge strong { font-size: 1.3rem; }

  .menu-grid { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters__btn { flex-shrink: 0; }

  .steps { grid-template-columns: 1fr; }
  .ingredients__mosaic { height: 420px; grid-template-columns: 1fr 1fr; grid-template-rows: 3fr 2fr; }
  .ingredients__big { grid-row: auto; grid-column: span 2; }
  .ingredients__list li { grid-template-columns: 1fr; gap: .2rem; }

  .space-intro { grid-template-columns: 1fr; }
  .space-gallery { grid-template-columns: 1fr 1fr; }
  .space-gallery__item--wide { grid-column: span 2; aspect-ratio: 16 / 10; }

  .form__row,
  .form__row--3 { grid-template-columns: 1fr; }
  .access__actions .btn { flex: 1; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
}


/* ---------- PÁGINAS LEGALES (privacidad, aviso legal, cookies) ---------- */
.legal {
  padding-top: calc(var(--header-h) + 3rem);  /* Deja sitio a la cabecera fija */
  min-height: 100vh;
}
.legal__inner { max-width: 760px; }           /* Líneas más cortas = más fáciles de leer */
.legal h1 { margin-bottom: .5rem; }
.legal h2 {
  margin: 2.5rem 0 .75rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
}
.legal p,
.legal li { line-height: 1.7; }
.legal p + p { margin-top: .75rem; }
.legal ul { padding-left: 1.2rem; list-style: disc; }
.legal a:not(.btn) { color: var(--copper-ink); text-decoration: underline; }
.legal .btn { margin-top: 2.5rem; }
.legal__updated { font-size: .85rem; color: var(--text-muted); }
.legal__note {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--copper-ink);
  background: rgba(32, 33, 31, .05);
  font-size: .9rem;
}
.legal__back {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .8;
}
.legal__back:hover { opacity: 1; }
/* Datos que hay que rellenar en cada cliente: resaltados en amarillo */
mark.rellenar {
  background: #FFE38A;
  color: var(--carbon);
  padding: 0 .25em;
}

/* Tabla de la página de cookies */
.legal__table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;     /* Une los bordes de las celdas */
  font-size: .85rem;
}
.legal__table th,
.legal__table td {
  padding: .6rem .75rem;
  border: 1px solid #CFC6B2;
  text-align: left;
  vertical-align: top;
}
.legal__table th { background: rgba(32, 33, 31, .06); }
@media (max-width: 640px) {
  .legal__table { display: block; overflow-x: auto; }  /* En móvil se desliza de lado */
}
