/* Delicias MB · tokens de marca (ver DeliciasMB/.github-private/marca) */
:root {
  --manteca: #FBF2CC;   /* fondo del logo */
  --papel: #FFF9E4;     /* superficies claras */
  --masa: #E2A07D;      /* medialuna del logo */
  --horno: #B8642F;     /* dorado de horno, solo decorativo */
  --membrillo: #8E2236; /* acción: botones y enlaces */
  --cacao: #2E1C15;     /* texto y fondos oscuros */
  --cacao-70: rgba(46, 28, 21, .72);
  --linea: rgba(46, 28, 21, .16);

  --script: "Allura", cursive;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ancho: 1180px;
  --gutter: 16px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--manteca); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--manteca);
  color: var(--cacao);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--membrillo); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--membrillo); outline-offset: 3px; border-radius: 6px; }

.top-inner, .hero-inner, .perks, .shop, .route, .social, .contact-inner, .foot {
  width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--gutter);
}
h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); line-height: 1.08; }
.section-lead { margin-top: 12px; color: var(--cacao-70); max-width: 56ch; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 0; border-radius: 999px;
  background: var(--membrillo); color: var(--papel);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.btn:hover { background: #6f1a2a; }
.btn-small { min-height: 42px; padding: 8px 18px; font-size: .95rem; }
.btn-light { background: var(--papel); color: var(--membrillo); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--papel); box-shadow: inset 0 0 0 2px rgba(255, 249, 228, .7); }
.btn-ghost:hover { background: rgba(255, 249, 228, .12); }

/* Barra superior y encabezado */
.topbar {
  padding: 8px var(--gutter);
  background: var(--cacao); color: var(--manteca);
  text-align: center; font-size: .85rem; font-weight: 600;
}
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 242, 204, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cacao); }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 4px;   /* cuadrada con borde, como la etiqueta */
  background: var(--papel); border: 4px solid var(--masa);
}
.brand-word { font-family: var(--script); font-size: 2rem; line-height: 1; padding-top: 4px; white-space: nowrap; }
.nav { display: none; gap: 28px; margin-left: auto; }
.nav a { color: var(--cacao); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--membrillo); }
@media (min-width: 860px) { .nav { display: flex; } }

/* Portada: bloque de color como en las tiendas de barrio */
.hero { background: var(--membrillo); color: var(--papel); overflow: hidden; }
.hero-inner {
  display: grid; gap: 36px; align-items: center;
  padding-block: clamp(36px, 7vw, 88px);
  position: relative;
}
@media (min-width: 880px) { .hero-inner { grid-template-columns: 1.2fr .8fr; gap: 48px; } }
.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.02; letter-spacing: -.015em;
  max-width: 13ch;
}
.lead { margin-top: 20px; font-size: clamp(1.08rem, 1.7vw, 1.25rem); color: rgba(255, 249, 228, .86); max-width: 40ch; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.badge-wrap { position: relative; justify-self: center; width: min(380px, 78vw); order: -1; }
@media (min-width: 880px) { .badge-wrap { order: 0; } }
.badge-wrap::before {
  content: ""; position: absolute; inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 160, 125, .55), transparent 68%);
}
.badge {
  position: relative;
  /* Como la etiqueta de los productos: cuadrada, marco color masa e interior con lunares */
  aspect-ratio: 1; border-radius: 8px;
  background-color: var(--papel); color: var(--cacao);
  background-image: radial-gradient(circle, rgba(226, 160, 125, .45) 1.6px, transparent 2.2px);
  background-size: 34px 34px; background-position: 17px 17px;
  border: clamp(18px, 5vw, 28px) solid var(--masa);
  box-shadow: inset 0 0 0 2px rgba(255, 249, 228, .7), 0 30px 60px -20px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: horneado 1.1s cubic-bezier(.2, .8, .2, 1) both;
}
.badge-word { font-family: var(--script); font-size: clamp(3.4rem, 12vw, 5.4rem); line-height: .8; }
.badge-mb { margin: .02em 0 .16em .35em; }
.badge img { width: 34%; height: auto; }
.stamp {
  position: absolute; right: -4%; bottom: 4%;
  width: 8rem; aspect-ratio: 1; white-space: nowrap;
  display: grid; place-items: center; text-align: center;
  border-radius: 50%;
  background: var(--masa); color: var(--cacao);
  font-family: var(--serif); font-size: .9rem; line-height: 1.2;
  transform: rotate(-12deg);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
}
@keyframes horneado {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* Beneficios */
.perks {
  list-style: none; margin-block: 0; padding-block: 36px;
  display: grid; gap: 22px 32px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border-bottom: 1px solid var(--linea);
}
.perks li { display: flex; gap: 14px; align-items: flex-start; }
.perks svg {
  flex: none; width: 30px; height: 30px; margin-top: 2px;
  fill: none; stroke: var(--membrillo); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.perks strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.1rem; line-height: 1.3; }
.perks span { display: block; font-size: .92rem; color: var(--cacao-70); }

.ribbon { background: var(--masa); color: var(--cacao); overflow: hidden; padding: 14px 0; }
.ribbon-track { display: flex; width: max-content; animation: cinta 60s linear infinite; }
.ribbon-set { display: flex; align-items: center; gap: 22px; padding-right: 22px; }
.ribbon-set span { font-family: var(--serif); font-size: 1.3rem; white-space: nowrap; }
.ribbon-set img { width: 30px; height: auto; }
@keyframes cinta { to { transform: translateX(-50%); } }

/* Tienda */
.shop { padding-block: clamp(56px, 8vw, 96px); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  min-height: 42px; padding: 8px 18px;
  border: 1.5px solid var(--linea); border-radius: 999px;
  background: var(--papel);
  font-weight: 600; font-size: .95rem;
}
.chip:hover { border-color: var(--membrillo); }
.chip[aria-pressed="true"] { background: var(--cacao); border-color: var(--cacao); color: var(--manteca); }
.chip { display: inline-flex; align-items: center; gap: 8px; }
.chip-n {
  min-width: 24px; padding: 1px 7px; border-radius: 999px;
  background: var(--manteca); color: var(--cacao);
  font-size: .8rem; font-weight: 700; text-align: center;
}
.chip[aria-pressed="true"] .chip-n { background: var(--masa); color: var(--cacao); }

.products {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.prod {
  display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
  background: var(--papel);
  border: 1px solid var(--linea);
}
.prod-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.prod-ph {
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; text-align: center;
}
.prod-ph span { font-family: var(--script); font-size: 2.3rem; line-height: 1; }
.prod-ph img { width: 54px; height: auto; }
.ph-membrillo { background: #f3d9c4; color: var(--membrillo); }
.ph-masa { background: #f6e0b8; color: var(--cacao); }
.ph-cacao { background: #ead7c0; color: var(--cacao); }
.prod-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.prod-fam { font-size: .8rem; font-weight: 600; color: var(--horno); }
.prod h3 { font-size: 1.25rem; line-height: 1.2; }
.prod-det { font-size: .93rem; color: var(--cacao-70); }


/* Cómo trabajamos */
.route { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--linea); }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 28px; counter-reset: paso; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps li { counter-increment: paso; position: relative; }
.steps li::before {
  content: counter(paso);
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 16px;
  border-radius: 50%;
  background: var(--masa); color: var(--cacao);
  font-family: var(--serif); font-size: 1.4rem;
}
@media (min-width: 760px) {
  .steps li:not(:last-child)::after {
    content: ""; position: absolute; top: 26px; left: 68px; right: -24px;
    border-top: 2px dashed var(--masa);
  }
}
.steps h3 { font-size: 1.35rem; }
.steps p { margin-top: 6px; color: var(--cacao-70); max-width: 30ch; }

/* Habilitación bromatológica */
.habilitacion { background: var(--papel); border-block: 1px solid var(--linea); }
.hab-inner {
  width: 100%; max-width: var(--ancho); margin-inline: auto; padding: clamp(48px, 7vw, 80px) var(--gutter);
  display: grid; gap: 28px 48px; align-items: center;
}
@media (min-width: 760px) { .hab-inner { grid-template-columns: auto 1fr; } }
.hab-qr {
  justify-self: center;
  display: block; width: 220px; padding: 14px;
  background: #fff; border-radius: 20px;
  border: 2px solid var(--masa);
  box-shadow: 0 0 0 8px var(--manteca);
}
.hab-qr img { display: block; width: 100%; height: auto; }
.hab-text .btn { margin-top: 24px; }
.hab-note { margin-top: 14px; font-size: .92rem; color: var(--cacao-70); }
.foot a { color: var(--cacao-70); }

/* Instagram */
.social { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--linea); }
.social-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.ig-grid {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 900px) { .ig-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; } }
.ig-grid a { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--papel); }
.ig-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.ig-grid a:hover img { transform: scale(1.04); }
.ig-grid a.is-reel::after {
  content: ""; position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}
@media (prefers-reduced-motion: reduce) { .ig-grid img { transition: none; } }

/* Contacto */
.contact { background: var(--cacao); color: var(--manteca); }
.contact-inner { padding-block: clamp(56px, 8vw, 96px); }
.contact h2 { color: var(--papel); }
.contact .section-lead { color: rgba(251, 242, 204, .78); }
.people { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 640px) { .people { grid-template-columns: 1fr 1fr; max-width: 720px; } }
.person {
  display: flex; flex-direction: column; gap: 2px;
  padding: 22px 26px; border-radius: 20px;
  background: rgba(251, 242, 204, .07);
  border: 1px solid rgba(251, 242, 204, .2);
  color: var(--papel); text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.person:hover { border-color: var(--masa); background: rgba(226, 160, 125, .12); }
.person:focus-visible, .ig a:focus-visible, .hero :focus-visible { outline-color: var(--masa); }
.person-name { font-family: var(--script); font-size: 2.6rem; line-height: 1.1; }
.person-phone { font-size: 1.15rem; font-weight: 500; letter-spacing: .02em; }
.ig { margin-top: 28px; color: rgba(251, 242, 204, .78); }
.ig a { color: var(--masa); font-weight: 600; }

/* Pie */
.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  padding-block: 28px 36px;
  font-size: .9rem; color: var(--cacao-70);
}
.foot-word { font-family: var(--script); font-size: 1.9rem; color: var(--cacao); }

@media (max-width: 420px) {
  .top .btn-small { padding-inline: 14px; font-size: .9rem; }
  .brand-word { font-size: 1.75rem; }
  .brand-mark { width: 38px; height: 38px; }
  .stamp { width: 7rem; font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge { animation: none; }
  .ribbon-track { animation: none; }
}

/* Catálogo en celular: dos columnas */
@media (max-width: 560px) {
  .products { grid-template-columns: 1fr 1fr; gap: 12px; }
  .prod { border-radius: 16px; }
  .prod-ph span { font-size: 1.4rem; }
  .prod-ph img { width: 40px; }
  .prod-body { padding: 12px 12px 14px; }
  .prod-fam { display: none; }
  .prod h3 { font-size: 1.05rem; }
  .prod-det { font-size: .85rem; }
}
