/* ==========================================================================
   PASTAS RICARDO
   Hoja de estilos principal
   Mobile-first · sin framework · español · tema claro cálido único
   ========================================================================== */


/* ==========================================================================
   FASE 2 · SISTEMA DE DISEÑO
   --------------------------------------------------------------------------
   Paleta cálida artesanal pedida explícitamente por el brief de marca
   (terracota, crema, trigo, oliva). Se eligieron valores fuera de las
   familias hex genéricas de “beige + latón”: terracota más arcillosa,
   crema más harinosa, tinta umber en lugar de espresso puro.

   Contraste documentado (WCAG AA, calculado por luminancia relativa):
     --tinta        #3f3126 sobre --crema    #f8f0e1  → 11.1:1  (AAA)
     --tinta-suave  #5c4a38 sobre --crema    #f8f0e1  →  7.4:1  (AAA)
     --crema        #f8f0e1 sobre --terracota #a34622 →  5.4:1  (AA)  texto de botón
     --crema        #f8f0e1 sobre --terracota-oscura #843519 → 7.4:1 (AAA)
     --tinta        #3f3126 sobre --trigo    #eedcbb  →  9.3:1  (AAA)
     --tinta-suave  #5c4a38 sobre --trigo    #eedcbb  →  6.3:1  (AA)
     --tinta        #3f3126 sobre --terracota-tinta #f4d9c4 → 9.3:1 (AAA)
     --terracota    #a34622 sobre --crema    #f8f0e1  →  5.4:1  (AA)  acentos
     --oliva        #4e5230 sobre --crema    #f8f0e1  →  7.2:1  (AAA) etiquetas
   ========================================================================== */

:root {
  /* --- Color --- */
  --terracota:        #a34622;  /* acento principal y CTA */
  --terracota-oscura: #843519;  /* hover del CTA */
  --terracota-tinta:  #f4d9c4;  /* banda tonal de Pedidos */
  --crema:            #f8f0e1;  /* fondo de página */
  --crema-clara:      #fcf7ec;  /* tarjetas */
  --trigo:            #eedcbb;  /* bandas secundarias */
  --trigo-suave:      #f1e2c8;  /* marcadores de foto */
  --oliva:            #4e5230;  /* acento secundario profundo */
  --tinta:            #3f3126;  /* texto principal */
  --tinta-suave:      #5c4a38;  /* texto secundario */
  --borde:            #dcc9a8;  /* bordes suaves */
  --linea:            #e6d7ba;  /* separadores */
  --cinta:            #e6d7b0;  /* cinta adhesiva del marco */

  /* --- Tipografía --- */
  --fuente-texto: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --fuente-mano:  "Caveat", "Segoe Script", "Bradley Hand", cursive;

  --paso--1: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --paso-0:  clamp(1.125rem, 1.06rem + 0.35vw, 1.3125rem);   /* cuerpo */
  --paso-1:  clamp(1.375rem, 1.25rem + 0.65vw, 1.75rem);     /* subtítulos */
  --paso-2:  clamp(1.75rem, 1.5rem + 1.3vw, 2.5rem);         /* títulos de tarjeta */
  --paso-3:  clamp(2.25rem, 1.85rem + 2.1vw, 3.375rem);      /* títulos de sección */
  --paso-4:  clamp(2.75rem, 2.05rem + 3.8vw, 4.75rem);       /* hero */

  --interlineado-texto: 1.65;
  --medida: 62ch;

  /* --- Espaciado --- */
  --esp-1: 0.5rem;
  --esp-2: 1rem;
  --esp-3: 1.5rem;
  --esp-4: 2.5rem;
  --esp-5: 4rem;
  --esp-6: 6rem;
  --seccion-pad: clamp(4rem, 9vw, 7rem);

  /* --- Radios (un solo sistema: suave, hecho a mano) --- */
  --radio-s: 10px;
  --radio-m: 16px;
  --radio-l: 22px;

  /* --- Sombras teñidas al tono de fondo (nunca negras puras) --- */
  --sombra-s: 0 1px 2px rgba(63, 49, 38, 0.08), 0 3px 10px rgba(63, 49, 38, 0.06);
  --sombra-m: 0 2px 6px rgba(63, 49, 38, 0.10), 0 14px 30px rgba(63, 49, 38, 0.10);
  --sombra-l: 0 4px 12px rgba(63, 49, 38, 0.12), 0 24px 60px rgba(63, 49, 38, 0.14);

  /* --- Textura de papel (SVG feTurbulence en data-URI, ~1 KB) --- */
  --textura-papel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.5'/%3E%3C/svg%3E");

  /* --- Movimiento --- */
  --rapida: 180ms;
  --media:  320ms;
  --curva:  cubic-bezier(0.22, 0.61, 0.36, 1);
}


/* ==========================================================================
   BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* cabecera fija (69px) + respiro */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--crema);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: var(--paso-0);
  line-height: var(--interlineado-texto);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Capa de grano de papel sobre toda la página */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--textura-papel);
  background-size: 240px 240px;
  opacity: 0.05;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1000;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--terracota);
  text-decoration-color: rgba(182, 84, 44, 0.4);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

ul, ol {
  margin: 0;
  padding: 0;
}

[role="list"] {
  list-style: none;
}

/* Foco visible, siempre */
:focus-visible {
  outline: 3px solid var(--terracota);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.contenedor {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.salto-contenido {
  position: absolute;
  top: -100%;
  left: var(--esp-2);
  z-index: 2000;
  background: var(--tinta);
  color: var(--crema);
  padding: var(--esp-1) var(--esp-2);
  border-radius: var(--radio-s);
  text-decoration: none;
}

.salto-contenido:focus {
  top: var(--esp-2);
}

.prosa p {
  max-width: var(--medida);
  color: var(--tinta-suave);
}

.prosa p + p {
  margin-top: 0.25em;
}

.nota-mano {
  font-family: var(--fuente-mano);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
  line-height: 1.2;
  color: var(--terracota);
}

.seccion {
  padding-block: var(--seccion-pad);
  position: relative;
}

.seccion__etiqueta {
  display: inline-block;
  font-size: var(--paso--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oliva);
  margin-bottom: var(--esp-2);
}

/* Subrayado dibujado a mano (trazo irregular) */
.seccion__titulo {
  font-size: var(--paso-3);
  color: var(--tinta);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 9' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5C22 3 45 2 62 4.5 82 7.5 102 5 118 3.5' fill='none' stroke='%23a34622' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 96%;
  background-size: min(7.5ch, 55%) 0.22em;
  padding-bottom: 0.28em;
  margin-bottom: var(--esp-3);
}


/* ==========================================================================
   COMPONENTES (Fase 2)
   ========================================================================== */

.icono {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3.25rem;              /* objetivo táctil ≥ 44 px */
  padding: 0.7em 1.6em;
  border: 2px solid transparent;
  border-radius: var(--radio-m);
  font-family: var(--fuente-texto);
  font-size: var(--paso-0);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--rapida) var(--curva),
              box-shadow var(--rapida) var(--curva),
              background-color var(--rapida) var(--curva),
              border-color var(--rapida) var(--curva);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primario {
  background: var(--terracota);
  color: var(--crema);
  box-shadow: var(--sombra-m);
}

.btn--primario:hover {
  background: var(--terracota-oscura);
  box-shadow: var(--sombra-l);
  transform: translateY(-2px);
}

.btn--secundario {
  background: transparent;
  color: var(--tinta);
  border-color: var(--borde);
}

.btn--secundario:hover {
  border-color: var(--tinta-suave);
  transform: translateY(-2px);
  box-shadow: var(--sombra-s);
}

.btn--claro {
  color: var(--tinta);
  background: rgba(248, 240, 225, 0.35);
  border-color: rgba(63, 49, 38, 0.35);
}

.btn--claro:hover {
  border-color: var(--tinta);
  background: rgba(248, 240, 225, 0.6);
}

.btn--grande {
  min-height: 3.5rem;
  padding: 0.85em 1.9em;
  font-size: var(--paso-1);
}

.btn--nav {
  min-height: 2.75rem;
  padding: 0.5em 1.2em;
  font-size: var(--paso--1);
  flex: none;
}

/* Fotos reales del taller */
.tarjeta__foto,
.hero__foto,
.historia__foto,
.paso__foto {
  position: relative;
  overflow: hidden;
  background: var(--trigo-suave);
}

.tarjeta__foto img,
.hero__foto img,
.historia__foto img,
.paso__foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ==========================================================================
   FASE 3 · CABECERA
   ========================================================================== */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(248, 240, 225, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linea);
}

.cabecera__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--esp-2);
  min-height: 4.25rem;
}

/* El logotipo es tipografía: la palabra ES la marca */
.marca {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
  color: var(--tinta);
  flex: none;
}

.marca__principal {
  font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.marca__sello {
  font-family: var(--fuente-mano);
  font-size: 1rem;
  font-weight: 600;
  color: var(--terracota);
  transform: rotate(-1deg);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  min-height: 2.75rem;
  padding: 0.4em 0.9em;
  background: transparent;
  border: 2px solid var(--borde);
  border-radius: var(--radio-s);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: var(--paso--1);
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--rapida) var(--curva);
}

.nav-toggle:hover {
  border-color: var(--tinta-suave);
}

.nav-toggle__icono {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 20px;
  height: 14px;
}

.nav-toggle__icono span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--tinta);
  border-radius: 2px;
  transition: transform var(--media) var(--curva), opacity var(--rapida) var(--curva);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icono span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icono span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icono span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Navegación móvil: panel desplegable */
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--crema-clara);
  border-bottom: 1px solid var(--linea);
  box-shadow: var(--sombra-m);
  padding: var(--esp-2) clamp(1.25rem, 5vw, 2.5rem) var(--esp-3);
  opacity: 0;
  transform: translateY(-0.75rem);
  visibility: hidden;
  transition: opacity var(--media) var(--curva),
              transform var(--media) var(--curva),
              visibility var(--media);
}

.nav--abierta {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.nav__lista {
  list-style: none;
  margin-bottom: var(--esp-2);
}

.nav__enlace {
  display: block;
  padding: 0.65em 0.25em;
  color: var(--tinta);
  font-weight: 600;
  font-size: var(--paso-1);
  text-decoration: none;
  border-bottom: 1px dashed var(--linea);
  transition: color var(--rapida) var(--curva);
}

.nav__enlace:hover {
  color: var(--terracota);
}

.nav .btn {
  width: 100%;
}


/* ==========================================================================
   FASE 3 · HERO
   ========================================================================== */

.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--seccion-pad);
  background:
    radial-gradient(90% 60% at 85% 8%, rgba(238, 220, 187, 0.85), transparent 60%),
    radial-gradient(70% 50% at 5% 95%, rgba(244, 217, 196, 0.55), transparent 65%),
    var(--crema);
}

/* Palabras manuscritas gigantes al fondo */
.hero__fondo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
}

.hero__palabra {
  position: absolute;
  font-family: var(--fuente-mano);
  font-weight: 700;
  color: var(--terracota);
  opacity: 0.07;
  white-space: nowrap;
  will-change: transform;
}

.hero__palabra--1 {
  top: -0.35em;
  right: -0.2em;
  font-size: clamp(6rem, 18vw, 13rem);
  transform: rotate(-8deg);
}

.hero__palabra--2 {
  bottom: -0.3em;
  left: -0.25em;
  font-size: clamp(5rem, 16vw, 11rem);
  transform: rotate(4deg);
  color: var(--oliva);
}

.hero__inner {
  position: relative;
  display: grid;
  gap: var(--esp-4);
  align-items: center;
}

.hero__etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--paso--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oliva);
  margin-bottom: var(--esp-2);
}

.hero__etiqueta::before {
  content: "";
  width: 2.2em;
  height: 2px;
  background: var(--oliva);
  opacity: 0.6;
}

.hero__titulo {
  font-size: var(--paso-4);
  max-width: 14ch;
  margin-bottom: var(--esp-2);
}

.hero__titulo em {
  font-style: italic;
  font-weight: 600;
  color: var(--terracota);
}

.hero__sublinea {
  font-size: var(--paso-1);
  line-height: 1.5;
  color: var(--tinta-suave);
  max-width: 38ch;
  margin-bottom: var(--esp-3);
}

.hero__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2);
}

.hero__acciones .btn--secundario {
  background: rgba(252, 247, 236, 0.5);
}

/* Marco de la foto: ligera rotación, cinta adhesiva, sombra suave */
.hero__foto-marco {
  position: relative;
  margin: 0;
  transform: rotate(1.6deg);
  background: var(--crema-clara);
  padding: clamp(0.75rem, 2.5vw, 1.1rem) clamp(0.75rem, 2.5vw, 1.1rem) clamp(2.5rem, 6vw, 3.2rem);
  border-radius: var(--radio-s);
  box-shadow: var(--sombra-l);
  max-width: 30rem;
  width: 100%;
  justify-self: center;
  transition: transform var(--media) var(--curva);
}

.hero__foto-marco:hover {
  transform: rotate(0.6deg) translateY(-4px);
}

.hero__cinta {
  position: absolute;
  width: 7.5rem;
  height: 2rem;
  background: rgba(230, 215, 176, 0.85);
  box-shadow: 0 1px 3px rgba(63, 49, 38, 0.12);
  z-index: 2;
}

.hero__cinta--sup {
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  border-radius: 2px;
}

.hero__foto {
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--radio-s) - 4px);
}

.hero__foto-nota {
  position: absolute;
  bottom: 0.55rem;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--tinta-suave);
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.4rem);
}

/* Vapor decorativo que sube desde el borde inferior */
.hero__vapor {
  position: absolute;
  bottom: 1.5rem;
  right: 12%;
  margin: 0;
  display: flex;
  gap: 1.1rem;
  pointer-events: none;
}

.hero__vapor span {
  width: 8px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(to top, transparent, rgba(63, 49, 38, 0.14), transparent);
  filter: blur(3px);
  animation: vapor 4.2s ease-in-out infinite;
}

.hero__vapor span:nth-child(2) { animation-delay: 1.3s; height: 58px; }
.hero__vapor span:nth-child(3) { animation-delay: 2.6s; }

@keyframes vapor {
  0%, 100% { transform: translateY(6px) scaleY(0.85); opacity: 0; }
  35%      { opacity: 1; }
  50%      { transform: translateY(-10px) scaleY(1.1); }
  75%      { opacity: 0.5; }
}

/* Entrada escalonada del hero (la activa main.js; sin JS todo visible) */
html.js .hero__contenido > *,
html.js .hero__foto-marco {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 700ms var(--curva), transform 700ms var(--curva);
}

html.js .hero--listo .hero__contenido > *,
html.js .hero--listo .hero__foto-marco {
  opacity: 1;
  transform: translateY(0);
}

html.js .hero--listo .hero__etiqueta { transition-delay: 60ms; }
html.js .hero--listo .hero__titulo   { transition-delay: 160ms; }
html.js .hero--listo .hero__sublinea { transition-delay: 260ms; }
html.js .hero--listo .hero__acciones { transition-delay: 360ms; }
html.js .hero--listo .hero__foto-marco { transition-delay: 300ms; }
html.js .hero--listo .hero__foto-marco { transform: rotate(1.6deg); }


/* ==========================================================================
   FASE 3 · TARJETA DE PRODUCTO (ejemplar)
   ========================================================================== */

.tarjeta {
  display: flex;
  flex-direction: column;
  background: var(--crema-clara);
  border: 1px solid var(--linea);
  border-radius: var(--radio-l);
  overflow: hidden;
  box-shadow: var(--sombra-s);
  transition: transform var(--media) var(--curva),
              box-shadow var(--media) var(--curva);
}

.tarjeta:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra-m);
}

.tarjeta__foto {
  aspect-ratio: 4 / 3;
}

.tarjeta__cuerpo {
  padding: var(--esp-2) var(--esp-3) var(--esp-3);
}

.tarjeta__nombre {
  font-size: var(--paso-2);
  margin-bottom: 0.3em;
}

.tarjeta__descripcion {
  color: var(--tinta-suave);
  font-size: var(--paso-0);
  margin: 0;
}

.tarjeta--destacada .tarjeta__nombre::after {
  content: "Los favoritos de la casa";
  display: block;
  font-family: var(--fuente-mano);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--terracota);
  transform: rotate(-1deg);
  margin-top: 0.15em;
}


/* ==========================================================================
   FASE 4 · SECCIONES COMPLETAS
   ========================================================================== */

/* ---------- Bordes de papel rasgado (bandas) ---------- */
.borde-rasgado {
  position: absolute;
  left: 0;
  right: 0;
  height: 16px;
  z-index: 3;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 1600px 16px;
}

.borde-rasgado--sup {
  top: -15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 16' preserveAspectRatio='none'%3E%3Cpath d='M0,16 L0,10 C40,6 80,12 120,8 C180,3 240,11 300,7 C360,3 420,10 480,6 C540,2 600,9 660,5 C720,2 780,10 840,6 C900,2 960,9 1020,5 C1080,1 1140,10 1200,6 C1260,2 1320,11 1380,7 C1440,3 1500,10 1560,6 L1600,8 L1600,16 Z' fill='%23eedcbb'/%3E%3C/svg%3E");
}

.borde-rasgado--inf {
  bottom: -15px;
  transform: scaleY(-1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 16' preserveAspectRatio='none'%3E%3Cpath d='M0,16 L0,9 C50,4 100,12 150,7 C210,2 270,11 330,6 C390,2 450,10 510,5 C570,1 630,9 690,4 C750,1 810,10 870,5 C930,1 990,9 1050,4 C1110,0 1170,9 1230,5 C1290,1 1350,10 1410,6 C1470,2 1530,9 1590,5 L1600,7 L1600,16 Z' fill='%23eedcbb'/%3E%3C/svg%3E");
}

/* ---------- Historia ---------- */
.historia__overline {
  transform: rotate(-2deg);
  margin-bottom: 0.2em;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem);
}

.historia__grid {
  display: grid;
  gap: var(--esp-4);
}

.historia__firma {
  margin-top: var(--esp-3);
  transform: rotate(-1.5deg);
}

.historia__firma::before {
  content: "\00B7\0020";
}

/* Tarjeta de receta de la abuela */
.receta {
  position: relative;
  margin: var(--esp-3) 0;
  padding: var(--esp-3) var(--esp-3) var(--esp-2);
  background: var(--crema-clara);
  border: 1px dashed var(--borde);
  border-radius: var(--radio-s);
  box-shadow: var(--sombra-s);
  transform: rotate(-0.8deg);
  max-width: 24rem;
}

.receta__titulo {
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.7rem);
  margin-bottom: var(--esp-1);
}

.receta__lista {
  list-style: none;
  margin-bottom: var(--esp-1);
}

.receta__lista li {
  position: relative;
  padding-left: 1.5em;
  color: var(--tinta-suave);
  font-size: var(--paso-0);
  line-height: 1.5;
}

.receta__lista li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.55em;
  width: 0.9em;
  height: 2px;
  background: var(--terracota);
  border-radius: 2px;
  transform: rotate(-2deg);
}

.receta__nota {
  font-family: var(--fuente-mano);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--oliva);
  margin: 0;
  transform: rotate(-0.5deg);
}

/* Marco de foto de Historia: apilado, cinta, ligera contra-rotación */
.historia__foto-marco {
  position: relative;
  margin: 0;
  transform: rotate(-1.4deg);
  background: var(--crema-clara);
  padding: clamp(0.7rem, 2vw, 1rem) clamp(0.7rem, 2vw, 1rem) clamp(2.2rem, 5vw, 2.8rem);
  border-radius: var(--radio-s);
  box-shadow: var(--sombra-m);
  max-width: 26rem;
  width: 100%;
  justify-self: center;
  transition: transform var(--media) var(--curva);
}

.historia__foto-marco::before {
  content: "";
  position: absolute;
  inset: 0.6rem -0.6rem -0.6rem 0.6rem;
  background: var(--trigo);
  border-radius: var(--radio-s);
  box-shadow: var(--sombra-s);
  z-index: -1;
}

.historia__foto-marco:hover {
  transform: rotate(-0.5deg) translateY(-4px);
}

.historia__cinta {
  position: absolute;
  width: 6.5rem;
  height: 1.8rem;
  background: rgba(230, 215, 176, 0.85);
  box-shadow: 0 1px 3px rgba(63, 49, 38, 0.12);
  z-index: 2;
}

.historia__cinta--sup {
  top: -0.7rem;
  right: 12%;
  transform: rotate(4deg);
  border-radius: 2px;
}

.historia__foto {
  aspect-ratio: 3 / 4;
  border-radius: calc(var(--radio-s) - 4px);
}

.historia__foto-nota {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--tinta-suave);
  font-size: 1.25rem;
}

/* ---------- Productos ---------- */
.productos {
  position: relative;
  background: var(--trigo);
}

.productos__encabezado {
  max-width: 40rem;
  margin-bottom: var(--esp-4);
}

.productos__intro {
  color: var(--tinta-suave);
  font-size: var(--paso-1);
  line-height: 1.5;
}

.productos__rejilla {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--esp-3);
}

.productos__cta {
  margin-top: var(--esp-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--esp-2);
  text-align: center;
}

.productos__nota {
  transform: rotate(-1deg);
}

/* Tarjeta destacada (ejemplar) */
.tarjeta--destacada {
  border-color: var(--borde);
}

.tarjeta--destacada .tarjeta__nombre::after {
  content: "Los favoritos de la casa";
  display: block;
  font-family: var(--fuente-mano);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--terracota);
  transform: rotate(-1deg);
  margin-top: 0.15em;
}

/* ---------- Proceso ---------- */
.proceso__overline {
  transform: rotate(-1.5deg);
  margin-bottom: 0.2em;
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.75rem);
}

.proceso__encabezado {
  margin-bottom: var(--esp-4);
}

.proceso__pasos {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--esp-4);
  counter-reset: paso;
}

.paso {
  position: relative;
  display: grid;
  gap: var(--esp-2);
  align-items: start;
}

.paso__foto {
  aspect-ratio: 16 / 10;
  border-radius: var(--radio-m);
  transition: transform var(--media) var(--curva), box-shadow var(--media) var(--curva);
}

.paso:hover .paso__foto {
  transform: translateY(-4px) rotate(0.4deg);
  box-shadow: var(--sombra-m);
}

.paso__texto {
  position: relative;
  padding-left: 3.4rem;
}

.paso__numero {
  position: absolute;
  left: 0;
  top: -0.15em;
  font-family: var(--fuente-mano);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--terracota);
  transform: rotate(-4deg);
}

.paso__nombre {
  font-size: var(--paso-1);
  margin-bottom: 0.2em;
}

.paso__descripcion {
  color: var(--tinta-suave);
  margin: 0;
  max-width: 46ch;
}

/* ---------- Pedidos (banda tonal terracota, mismo tema claro) ---------- */
.pedidos {
  position: relative;
  background:
    radial-gradient(80% 60% at 80% 0%, rgba(163, 70, 34, 0.12), transparent 60%),
    var(--terracota-tinta);
}

.pedidos .borde-rasgado--sup {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 16' preserveAspectRatio='none'%3E%3Cpath d='M0,16 L0,10 C40,6 80,12 120,8 C180,3 240,11 300,7 C360,3 420,10 480,6 C540,2 600,9 660,5 C720,2 780,10 840,6 C900,2 960,9 1020,5 C1080,1 1140,10 1200,6 C1260,2 1320,11 1380,7 C1440,3 1500,10 1560,6 L1600,8 L1600,16 Z' fill='%23f4d9c4'/%3E%3C/svg%3E");
}

.pedidos .borde-rasgado--inf {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 16' preserveAspectRatio='none'%3E%3Cpath d='M0,16 L0,9 C50,4 100,12 150,7 C210,2 270,11 330,6 C390,2 450,10 510,5 C570,1 630,9 690,4 C750,1 810,10 870,5 C930,1 990,9 1050,4 C1110,0 1170,9 1230,5 C1290,1 1350,10 1410,6 C1470,2 1530,9 1590,5 L1600,7 L1600,16 Z' fill='%23f4d9c4'/%3E%3C/svg%3E");
}

.pedidos__inner {
  position: relative;
  text-align: center;
  max-width: 46rem;
}

.pedidos__overline {
  transform: rotate(-2deg);
  margin-bottom: 0.2em;
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.75rem);
}

.pedidos .seccion__titulo {
  background-position: 50% 96%;
}

.pedidos__texto {
  color: var(--tinta-suave);
  font-size: var(--paso-1);
  line-height: 1.5;
  max-width: 44ch;
  margin-inline: auto;
  margin-bottom: var(--esp-3);
}

.pedidos__acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--esp-2);
  margin-bottom: var(--esp-4);
}

.pedidos__info {
  display: grid;
  gap: var(--esp-3);
  text-align: left;
  margin-bottom: var(--esp-3);
}

.pedidos__columna {
  background: rgba(252, 247, 236, 0.55);
  border: 1px dashed rgba(92, 74, 56, 0.3);
  border-radius: var(--radio-m);
  padding: var(--esp-3);
  transition: transform var(--media) var(--curva), box-shadow var(--media) var(--curva);
}

.pedidos__columna:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-s);
}

.pedidos__subtitulo {
  font-size: var(--paso-1);
  color: var(--tinta);
}

.pedidos__columna p {
  color: var(--tinta-suave);
  margin: 0;
}

.pedidos__nota {
  transform: rotate(-1deg);
}

/* Sello estampado giratorio */
.sello {
  width: 6.5rem;
  height: 6.5rem;
  margin: 0 auto var(--esp-2);
  color: var(--terracota);
  opacity: 0.9;
}

.sello svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sello__giro {
  transform-origin: 60px 60px;
  animation: sello-gira 40s linear infinite;
}

.sello__texto {
  font-family: var(--fuente-texto);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  fill: var(--terracota);
}

.sello__r {
  font-family: var(--fuente-texto);
  font-size: 44px;
  font-weight: 700;
  fill: var(--terracota);
}

@keyframes sello-gira {
  to { transform: rotate(360deg); }
}

/* ---------- Pie de página ---------- */
.pie {
  background: var(--crema);
  border-top: 1px solid var(--linea);
  padding-top: var(--esp-5);
}

.pie__inner {
  display: grid;
  gap: var(--esp-3);
  padding-bottom: var(--esp-4);
}

.pie__marca {
  position: relative;
}

.pie__sello {
  width: 3.25rem;
  height: 3.25rem;
  color: var(--terracota);
  opacity: 0.85;
  margin-bottom: var(--esp-1);
  transform: rotate(-4deg);
}

.pie__nombre {
  font-size: var(--paso-2);
  font-weight: 700;
  margin: 0;
}

.pie__lema {
  margin: 0.1em 0 0;
  transform: rotate(-1deg);
}

.pie__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2) var(--esp-3);
}

.pie__nav a {
  color: var(--tinta);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color var(--rapida) var(--curva), border-color var(--rapida) var(--curva);
}

.pie__nav a:hover {
  color: var(--terracota);
  border-bottom-color: var(--terracota);
}

.pie__contacto p {
  margin: 0 0 0.3em;
}

.pie__enlace {
  font-weight: 700;
  font-size: var(--paso-1);
}

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

.pie__legal {
  border-top: 1px dashed var(--linea);
  padding-block: var(--esp-2);
  color: var(--tinta-suave);
  font-size: var(--paso--1);
}

.pie__legal p {
  margin: 0;
}

/* ---------- CTA fijo en móvil (solo aparece con JS) ---------- */
.cta-fijo {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  padding: var(--esp-1) var(--esp-2) calc(var(--esp-1) + env(safe-area-inset-bottom, 0px));
  background: rgba(248, 240, 225, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--linea);
  transform: translateY(110%);
  transition: transform var(--media) var(--curva);
}

.cta-fijo--visible {
  transform: translateY(0);
}

.cta-fijo__boton {
  width: 100%;
}


/* ==========================================================================
   REVELADO AL HACER SCROLL (lo activa main.js; sin JS todo visible)
   Basado en animación con fill-mode para no pelear con los :hover de CSS.
   ========================================================================== */

html.js .revelar {
  opacity: 0;
}

html.js .revelar--visible {
  animation: sube 620ms var(--curva) both;
  animation-delay: var(--retardo, 0ms);
}

@keyframes sube {
  from { opacity: 0; transform: translateY(1.5rem); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ==========================================================================
   PANTALLAS MÁS GRANDES (solo min-width: móvil primero)
   ========================================================================== */

@media (min-width: 40rem) {
  .productos__rejilla {
    grid-template-columns: repeat(2, 1fr);
  }

  .proceso__pasos {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--esp-4) var(--esp-3);
  }

  .pedidos__info {
    grid-template-columns: 1fr 1fr;
  }

  /* Escalonado de tarjetas y pasos */
  .productos__rejilla > .tarjeta:nth-child(2),
  .proceso__pasos > .paso:nth-child(2) { --retardo: 90ms; }
  .productos__rejilla > .tarjeta:nth-child(3),
  .proceso__pasos > .paso:nth-child(3) { --retardo: 180ms; }
  .productos__rejilla > .tarjeta:nth-child(4),
  .proceso__pasos > .paso:nth-child(4) { --retardo: 270ms; }
  .productos__rejilla > .tarjeta:nth-child(5),
  .proceso__pasos > .paso:nth-child(5) { --retardo: 90ms; }
  .productos__rejilla > .tarjeta:nth-child(6),
  .proceso__pasos > .paso:nth-child(6) { --retardo: 180ms; }
  .productos__rejilla > .tarjeta:nth-child(7) { --retardo: 270ms; }
  .productos__rejilla > .tarjeta:nth-child(8) { --retardo: 90ms; }
  .productos__rejilla > .tarjeta:nth-child(9) { --retardo: 180ms; }
  .productos__rejilla > .tarjeta:nth-child(10) { --retardo: 270ms; }
  .productos__rejilla > .tarjeta:nth-child(11) { --retardo: 90ms; }
  .productos__rejilla > .tarjeta:nth-child(12) { --retardo: 180ms; }
  .productos__rejilla > .tarjeta:nth-child(13) { --retardo: 270ms; }
}

@media (min-width: 48rem) {
  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    display: flex;
    align-items: center;
    gap: var(--esp-2);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .nav__lista {
    display: flex;
    align-items: center;
    gap: var(--esp-2);
    margin: 0;
  }

  .nav__enlace {
    border: 0;
    padding: 0.35em 0;
    font-size: var(--paso-0);
    position: relative;
  }

  .nav__enlace::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--terracota);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--rapida) var(--curva);
  }

  .nav__enlace:hover::after {
    transform: scaleX(1);
  }

  .nav .btn {
    width: auto;
  }

  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--esp-5);
  }

  .hero__foto-marco {
    justify-self: end;
  }

  .historia__grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--esp-5);
  }

  .historia__foto-marco {
    justify-self: end;
  }

  .paso {
    grid-template-columns: none;
  }

  /* CTA fijo solo en móvil */
  .cta-fijo {
    display: none;
  }

  .pie__inner {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 64rem) {
  .productos__rejilla {
    grid-template-columns: repeat(3, 1fr);
  }

  /* La destacada abre la rejilla a lo ancho */
  .tarjeta--destacada {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .tarjeta--destacada .tarjeta__foto {
    aspect-ratio: 4 / 3;
    flex: 0 0 46%;
  }

  .tarjeta--destacada .tarjeta__cuerpo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--esp-4);
  }

  .tarjeta--destacada .tarjeta__nombre {
    font-size: var(--paso-3);
  }

  /* Proceso: 4 columnas con línea de secado punteada */
  .proceso__pasos {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--esp-3);
  }

  .proceso__pasos .paso:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 5.5rem;
    left: calc(100% - var(--esp-3) / 2 - 1.6rem);
    width: calc(var(--esp-3) + 1.2rem);
    border-top: 3px dashed rgba(92, 74, 56, 0.35);
    transform: translateY(-50%);
  }

  .proceso__pasos .paso:nth-child(odd) .paso__foto {
    transform: rotate(-0.7deg);
  }

  .proceso__pasos .paso:nth-child(even) .paso__foto {
    transform: rotate(0.7deg);
  }

  .proceso__pasos .paso:hover .paso__foto {
    transform: rotate(0deg) translateY(-4px);
  }
}


/* ==========================================================================
   MOVIMIENTO REDUCIDO: todo quieto, todo visible
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  html.js .hero__contenido > *,
  html.js .hero__foto-marco,
  html.js .revelar,
  html.js .revelar--visible {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .sello__giro {
    animation: none;
  }

  .hero__vapor {
    display: none;
  }
}
