/* ============================================================================
   HECHO EN CASA 369 — Sistema de diseño web
   Fuente de verdad: IdentidadVisual.md (paleta, tipografías, composición)
   ========================================================================== */

/* --- 1. Tokens de diseño (paleta oficial) --------------------------------- */
:root {
  /* Paleta cromática (IdentidadVisual.md §2) */
  --fondo:      #F4E5C8;   /* Crema cálido / papel artesanal — fondo general */
  --primario:   #593723;   /* Marrón chocolate — títulos, marcos, texto principal */
  --secundario: #B85438;   /* Terracota horneado — sellos, cintas, encabezados */
  --acento:     #E2A62B;   /* Amarillo mostaza — precios, CTA, rayos decorativos */
  --texto:      #30231C;   /* Café muy oscuro — información, descripciones */
  --oliva:      #687442;   /* Verde oliva — hojas, ramitas, detalles orgánicos */
  --tostado:    #D5B98B;   /* Beige tostado — tarjetas, etiquetas, franjas */
  --claro:      #FFF8E9;   /* Blanco crema — texto sobre áreas oscuras, luz */

  /* Tipografías (IdentidadVisual.md §3): display + script + cuerpo (máx. 3) */
  --font-display: "Bebas Neue", "Anton", "Oswald", "Arial Narrow", sans-serif;
  --font-script:  "Pacifico", "Lobster", "Brush Script MT", cursive;
  --font-body:    "Poppins", "Montserrat", "Nunito", "Segoe UI", sans-serif;

  /* Sombras suaves (nada de sombras duras ni efectos 3D) */
  --sombra-suave: 0 6px 18px rgba(89, 55, 35, 0.14);
  --radio: 18px;
}

/* --- 2. Base -------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--texto);
  background-color: var(--fondo);
  /* Textura de papel artesanal: vetas y manchas cálidas sutiles */
  background-image:
    radial-gradient(ellipse at 18% 8%,  rgba(89, 55, 35, 0.05), transparent 42%),
    radial-gradient(ellipse at 85% 95%, rgba(184, 84, 56, 0.05), transparent 45%),
    radial-gradient(ellipse at 70% 30%, rgba(226, 166, 43, 0.04), transparent 35%),
    repeating-linear-gradient(0deg, rgba(89, 55, 35, 0.012) 0 2px, transparent 2px 5px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--secundario); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--acento); color: var(--texto); }

/* Accesibilidad: foco visible y amable */
:focus-visible {
  outline: 3px dashed var(--secundario);
  outline-offset: 3px;
  border-radius: 4px;
}

.saltar-al-contenido {
  position: absolute; left: -9999px; top: 0;
  background: var(--secundario); color: var(--claro);
  padding: 0.6rem 1.2rem; border-radius: 0 0 12px 0;
  font-weight: 600; z-index: 100;
}
.saltar-al-contenido:focus { left: 0; }

/* --- 3. Tipografía y jerarquía -------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primario);
  line-height: 1.02;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
}

h1 { font-size: clamp(3rem, 10vw, 6.5rem); }
h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); text-align: center; }
h3 { font-size: 1.5rem; }

.sub-script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--secundario);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  line-height: 1.35;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  /* Contraste AA sobre crema: marrón chocolate en lugar de oliva (oliva queda en SVG decorativos) */
  color: var(--primario);
}

.centrado { text-align: center; }

/* --- 4. Elementos gráficos recurrentes ------------------------------------ */

/* Borde cosido / dibujado a mano (irregularidad sutil) */
.borde-cosido {
  border: 2px dashed rgba(89, 55, 35, 0.4);
  border-radius: 26px 18px 28px 16px / 20px 26px 16px 24px;
}

/* Sello circular de precio (doble anillo, ligeramente girado) */
.sello {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  padding: 0.5rem;
  background: var(--secundario);
  color: var(--claro);
  border: 4px solid var(--claro);
  outline: 2px dashed var(--secundario);
  outline-offset: -9px;
  border-radius: 50%;
  transform: rotate(-7deg);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: var(--sombra-suave);
  transition: transform 0.25s ease;
}
.sello:hover { transform: rotate(-3deg) scale(1.05); }
.sello .signo { font-size: 0.95em; }

/* Cinta de marca (extremos en pico, estilo etiqueta artesanal) */
.cinta {
  display: inline-block;
  background: var(--secundario);
  color: var(--claro);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.55rem 2.2rem;
  clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%, 8% 50%);
  box-shadow: var(--sombra-suave);
}

/* Separador punteado (líneas ornamentales de menú) */
.separador-punteado {
  border: 0;
  border-top: 2px dotted rgba(89, 55, 35, 0.35);
  margin: 1.1rem 0;
}

/* Rayos decorativos (motivo mostaza) */
.rayos {
  position: relative;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--acento);
  display: inline-block;
}
.rayos::before, .rayos::after {
  content: "";
  position: absolute; inset: 50% auto auto 50%;
  width: 9px; height: 9px;
  background: var(--acento);
  border-radius: 2px;
}
.rayos::before { transform: translate(-50%, -50%) translate(15px, -6px) rotate(45deg); }
.rayos::after  { transform: translate(-50%, -50%) translate(-17px, 7px) rotate(45deg); }

/* --- 5. Botones (CTA mostaza / secundario) -------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  border: 2.5px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none !important;
}
.btn-primario {
  background: var(--acento);
  color: var(--texto);
  /* Sombra suave (guía: evitar sombras duras) */
  box-shadow: 0 3px 10px rgba(89, 55, 35, 0.25);
}
.btn-primario:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(89, 55, 35, 0.28);
  filter: brightness(0.95);
}
.btn-contorno {
  background: transparent;
  color: var(--primario);
  border-color: var(--primario);
}
.btn-contorno:hover {
  background: var(--primario);
  color: var(--claro);
  transform: translateY(-2px);
}

/* --- 6. Cabecera ---------------------------------------------------------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 229, 200, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 2px dashed rgba(89, 55, 35, 0.25);
}
.cabecera-contenido {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.marca-mini { display: flex; align-items: center; gap: 0.7rem; }
.marca-mini .cinta { padding: 0.45rem 1.6rem; font-size: 0.95rem; }

.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primario);
  padding: 0.25rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--secundario); text-decoration: none; }

/* --- 7. Hero -------------------------------------------------------------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 1.25rem 3rem;
  position: relative;
  text-align: center;
}
.hero-decor { position: absolute; opacity: 0.55; pointer-events: none; }
.hero-decor.izq { left: 1rem; top: 12%; transform: rotate(-14deg); }
.hero-decor.der { right: 1rem; bottom: 10%; transform: rotate(160deg) scaleX(-1); }
.hero-decor.movil { display: none; }

.hero .eyebrow { margin-bottom: 0.6rem; }
.hero h1 { margin: 0.2rem 0 0.3rem; }
.hero .sub-script { margin-bottom: 2rem; }

/* Marco de fotografía protagonista (reemplazar por foto real) */
.marco-foto {
  position: relative;
  max-width: 640px;
  margin: 0 auto 2.2rem;
  /* Degradado 100% de la paleta oficial (rgba de claro/tostado/terracota) */
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 248, 233, 0.9), transparent 55%),
    linear-gradient(160deg, rgba(255, 248, 233, 0.75) 0%, var(--tostado) 50%, rgba(184, 84, 56, 0.35) 100%);
  border: 4px solid var(--claro);
  outline: 2px dashed rgba(89, 55, 35, 0.45);
  outline-offset: -12px;
  border-radius: 30px 20px 32px 18px / 24px 30px 18px 26px;
  box-shadow: var(--sombra-suave);
  padding: clamp(2.5rem, 8vw, 4rem) 1rem;
}
.marco-foto .emoji-grande { font-size: clamp(4.5rem, 16vw, 7.5rem); line-height: 1; }
.marco-foto .nota-foto {
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primario);
  opacity: 0.75;
}
.marco-foto .sello {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 118px;
  height: 118px;
  font-size: 1.5rem;
  z-index: 2;
}
.marco-foto .cinta-mini {
  position: absolute;
  left: 50%;
  top: -16px;
  transform: translateX(-50%) rotate(-2deg);
  z-index: 2;
  white-space: nowrap;
}

.ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- 8. Sección productos (sistema de menú: foto izq · nombre centro · precio der) --- */
.productos {
  background: var(--tostado);
  background-image: repeating-linear-gradient(0deg, rgba(89,55,35,0.02) 0 2px, transparent 2px 6px);
  border-top: 2px dashed rgba(89, 55, 35, 0.3);
  border-bottom: 2px dashed rgba(89, 55, 35, 0.3);
  padding: clamp(3rem, 7vw, 4.5rem) 1.25rem;
}
.productos-interior { max-width: 900px; margin: 0 auto; }
.productos h2 { margin-bottom: 0.2rem; }
/* Contraste AA sobre fondo tostado: marrón chocolate en lugar de terracota (≈2.6:1 → ≈7:1) */
.productos .sub-script { text-align: center; margin-bottom: 2.2rem; color: var(--primario); }

.lista-productos { display: grid; gap: 0.4rem; }

.fila-producto {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 0.25rem;
}
.fila-producto .foto-mini {
  width: 104px;
  height: 84px;
  border-radius: 16px 12px 18px 10px;
  border: 3px solid var(--claro);
  outline: 2px dashed rgba(89, 55, 35, 0.4);
  outline-offset: -7px;
  background: linear-gradient(150deg, rgba(255, 248, 233, 0.85), var(--tostado));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  box-shadow: 0 3px 10px rgba(89, 55, 35, 0.12);
}
.fila-producto .datos h3 { font-size: clamp(1.35rem, 4vw, 1.7rem); letter-spacing: 0.06em; }
.fila-producto .datos p {
  font-size: 0.92rem;
  color: var(--texto);
  opacity: 0.92;
  max-width: 46ch;
}
.fila-producto .sello {
  width: 92px;
  height: 92px;
  font-size: 1.15rem;
}

.nota-pendiente {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.85;
}

/* --- 9. Nosotros ---------------------------------------------------------- */
.nosotros {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 4.5rem) 1.25rem;
  text-align: center;
}

/* Marco artesanal para el logo conceptual (foto del concepto, enmarcada) */
.marco-logo {
  margin: 2rem auto 0;
  max-width: 400px;
  background: var(--claro);
  border: 4px solid var(--claro);
  outline: 2px dashed rgba(89, 55, 35, 0.4);
  outline-offset: -10px;
  border-radius: 26px 18px 28px 16px / 20px 26px 16px 24px;
  padding: 0.8rem;
  box-shadow: var(--sombra-suave);
  transform: rotate(-1.2deg);
}
.marco-logo img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: var(--claro);
}
.marco-logo figcaption {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primario);
  opacity: 0.8;
}

.nosotros .marco-historia {
  margin-top: 1.6rem;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  background: rgba(255, 248, 233, 0.55);
}
.nosotros .marco-historia p { margin-bottom: 0.8rem; }
.decor-nosotros { display: flex; justify-content: center; gap: 1.4rem; margin-top: 1.6rem; opacity: 0.8; }

/* --- 10. Llamada a la acción ---------------------------------------------- */
.cta-seccion {
  background:
    radial-gradient(circle at 20% 20%, rgba(226, 166, 43, 0.18), transparent 40%),
    var(--primario);
  color: var(--claro);
  padding: clamp(3rem, 7vw, 4.5rem) 1.25rem;
  text-align: center;
}
.cta-seccion h2 { color: var(--claro); }
.cta-seccion .sub-script { color: var(--acento); }
.cta-seccion .rayos { margin-bottom: 0.55rem; }
.cta-seccion p { max-width: 52ch; margin: 0.6rem auto 1.8rem; color: var(--claro); opacity: 0.95; }
.cta-seccion .btn-primario { box-shadow: 0 4px 0 rgba(0,0,0,0.25); }

/* --- 11. Contacto ---------------------------------------------------------- */
.contacto {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 4.5rem) 1.25rem;
}
.contacto h2 { margin-bottom: 0.2rem; }
.contacto .sub-script { text-align: center; margin-bottom: 2.2rem; }

.red-contacto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1.2rem;
}
.tarjeta-contacto {
  background: rgba(255, 248, 233, 0.6);
  border: 2px dashed rgba(89, 55, 35, 0.35);
  border-radius: 20px 14px 22px 12px / 16px 22px 12px 18px;
  padding: 1.3rem 1.1rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tarjeta-contacto:hover { transform: translateY(-4px); box-shadow: var(--sombra-suave); }
.tarjeta-contacto .icono { font-size: 1.9rem; margin-bottom: 0.4rem; }
.tarjeta-contacto .etiqueta {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oliva);
}
.tarjeta-contacto .dato { color: var(--texto); font-weight: 500; margin-top: 0.15rem; }

/* --- 12. Pie de página ----------------------------------------------------- */
.pie {
  background: var(--tostado);
  border-top: 2px dashed rgba(89, 55, 35, 0.3);
  padding: 2.6rem 1.25rem 2.2rem;
  text-align: center;
}
.pie .cinta { font-size: 1.25rem; margin-bottom: 1.1rem; }
.pie p { color: var(--texto); opacity: 0.92; }
.pie .mini { font-size: 0.78rem; opacity: 0.7; margin-top: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* --- 13. Animaciones sutiles (con preferencia reducida) -------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sello:hover, .btn:hover, .tarjeta-contacto:hover { transform: none; }
}

/* --- 14. Responsividad ----------------------------------------------------- */
@media (max-width: 760px) {
  .cabecera-contenido { justify-content: center; }
  .nav { justify-content: center; gap: 1rem; }

  .hero-decor.izq, .hero-decor.der { display: none; }

  .fila-producto {
    grid-template-columns: 76px 1fr;
    gap: 0.8rem;
    padding: 1rem 0.1rem;
  }
  .fila-producto .foto-mini { width: 76px; height: 66px; font-size: 1.9rem; }
  .fila-producto .sello { grid-column: 1 / -1; justify-self: end; width: 84px; height: 84px; font-size: 1.05rem; }

  .marco-foto .sello { width: 100px; height: 100px; font-size: 1.3rem; right: 8px; bottom: -16px; }
  .marca-mini .cinta { font-size: 0.8rem; padding: 0.4rem 1.2rem; }
}

@media (max-width: 420px) {
  h1 { font-size: 2.9rem; }
  .ctas .btn { width: 100%; text-align: center; }
}

/* --- 15. Menú en fotos, equipo y QR ---------------------------------------- */
.menu-titulo {
  text-align: center;
  margin: 2.6rem 0 1.2rem;
}
.galeria-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}
.item-menu {
  background: var(--claro);
  border: 4px solid var(--claro);
  outline: 2px dashed rgba(89, 55, 35, 0.4);
  outline-offset: -8px;
  border-radius: 20px 14px 22px 12px / 16px 22px 12px 18px;
  padding: 0.6rem;
  box-shadow: var(--sombra-suave);
}
.item-menu img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.item-menu figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primario);
  opacity: 0.8;
  text-align: center;
}
.equipo {
  margin-top: 1.4rem;
  font-size: 0.92rem;
  color: var(--texto);
  opacity: 0.9;
}
.qr-instagram {
  width: 128px;
  height: 128px;
  margin: 0.8rem auto 0;
  border: 3px solid var(--claro);
  outline: 2px dashed rgba(89, 55, 35, 0.4);
  outline-offset: -6px;
  border-radius: 12px;
}

/* --- 16. Fotos reales de producto y WhatsApp flotante ---------------------- */
/* Fotos reales dentro del marco del hero */
.marco-foto { padding: 0.9rem; }
.marco-foto img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 20px 14px 22px 12px;
  display: block;
}
/* Fotos reales en las filas de producto */
.fila-producto .foto-mini { overflow: hidden; }
.fila-producto .foto-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 9px 14px 7px;
}
.fila-producto .foto-mini .emoji { font-size: 2.4rem; line-height: 1; }

/* Botón flotante de WhatsApp */
.wa-flotante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 60;
  transition: transform 0.2s ease;
}
.wa-flotante:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
@media (prefers-reduced-motion: reduce) { .wa-flotante:hover { transform: none; } }
