/* ==========================================================
   Tortillería Dani USA — Diseño 2 "Mercado sonorense"
   Paleta: papel crema · rojo chile · verde nopal · maíz
   Tipos: Bricolage Grotesque (títulos) + DM Sans (texto)
   ========================================================== */

:root {
  --papel: #fbf5e9;
  --papel-2: #f4ead6;
  --tinta: #231a12;
  --tinta-2: #5b4a3a;
  --chile: #c4361b;
  --chile-oscuro: #9a2812;
  --nopal: #1f5c3f;
  --nopal-oscuro: #164530;
  --maiz: #f2c14e;
  --maiz-claro: #f8dc93;
  --tostado: #c98a1a;
  --linea: #e3d5ba;

  --f-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, sans-serif;
  --r: 20px;
  --r-lg: 32px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--f-body);
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.02; letter-spacing: -.02em; margin: 0; }
section[id] { scroll-margin-top: 5rem; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

:focus-visible { outline: 3px solid var(--chile); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--tinta); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { left: .5rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: .8rem 1.5rem; border-radius: 999px;
  font: 700 1rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 42px; padding: .55rem 1.1rem; font-size: .95rem; }
.btn-red { background: var(--chile); color: #fff; box-shadow: 0 4px 0 var(--chile-oscuro); }
.btn-red:hover { background: #d3401f; }
.btn-green { background: var(--nopal); color: #fff; box-shadow: 0 4px 0 var(--nopal-oscuro); }
.btn-green:hover { background: #246b49; }
.btn-yellow { background: var(--maiz); color: var(--tinta); box-shadow: 0 4px 0 var(--tostado); }
.btn-yellow:hover { background: var(--maiz-claro); }
.btn-outline { border-color: var(--tinta); color: var(--tinta); }
.btn-outline:hover { background: var(--tinta); color: var(--papel); }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--nopal); }

/* ---------- Topbar + Header ---------- */
.topbar { background: var(--tinta); color: var(--maiz-claro); text-align: center; font-size: .9rem; }
.topbar p { margin: 0; padding: .5rem 1rem; }
.topbar a { color: #fff; font-weight: 700; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  background: rgba(251,245,233,.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-color: var(--linea); box-shadow: 0 6px 24px rgba(35,26,18,.06); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-text { font: 700 1.2rem/1 var(--f-display); letter-spacing: -.01em; }
.brand-text b { color: var(--chile); font-weight: 800; }
.brand-text small { font: 700 .7rem/1 var(--f-body); letter-spacing: .12em; background: var(--nopal); color: #fff; padding: .2rem .4rem; border-radius: 4px; vertical-align: middle; }
.site-header nav { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); }
.site-header nav a:not(.btn) { text-decoration: none; font-weight: 500; position: relative; padding: .3rem 0; }
.site-header nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--chile);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.site-header nav a:not(.btn):hover::after { transform: scaleX(1); }
@media (max-width: 720px) {
  .site-header nav a:not(.btn) { display: none; }
  .brand-text small { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.1rem;
  font: 700 .8rem/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--nopal);
}
.kicker-light { color: var(--maiz); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chile); box-shadow: 0 0 0 4px rgba(196,54,27,.18); }
.hero h1 { font-size: clamp(2.7rem, 6.6vw, 5.4rem); font-weight: 800; }
.hl { color: var(--chile); position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .22em; z-index: -1;
  background: var(--maiz); border-radius: 999px; transform: rotate(-1.5deg);
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--tinta-2); max-width: 34rem; margin: 1.4rem 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.facts { list-style: none; padding: 1.6rem 0 0; margin: 2.4rem 0 0; display: flex; gap: clamp(1.2rem, 4vw, 3rem); border-top: 2px dashed var(--linea); }
.facts strong { display: block; font: 800 clamp(1.9rem, 3vw, 2.4rem)/1 var(--f-display); color: var(--tinta); }
.facts span { font-size: .9rem; color: var(--tinta-2); }

.hero-art { position: relative; justify-self: center; width: min(100%, 470px); }
.arch {
  aspect-ratio: 4 / 5; border-radius: 999px 999px var(--r-lg) var(--r-lg); overflow: hidden;
  background: var(--maiz); border: 8px solid #fff; box-shadow: 0 30px 60px -20px rgba(35,26,18,.35);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 4%; left: -12%; width: 150px; height: 150px;
  border-radius: 50%; background: var(--chile); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(196,54,27,.35);
}
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 22s linear infinite; }
.badge text { fill: #fff; font: 700 15.5px var(--f-body); letter-spacing: 3px; }
.badge span { font: 800 1.6rem/1 var(--f-display); color: var(--maiz); }
.hero-tag {
  position: absolute; right: -4%; bottom: 18%; padding: 1rem 1.3rem; border-radius: var(--r);
  background: #fff; text-align: center; box-shadow: 0 16px 40px -10px rgba(35,26,18,.3); transform: rotate(3deg);
}
.hero-tag small { display: block; font-size: .78rem; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .1em; }
.hero-tag strong { font: 800 2.2rem/1.05 var(--f-display); color: var(--nopal); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { width: min(82%, 400px); margin-top: 1rem; }
  .badge { width: 120px; height: 120px; left: -8%; }
  .badge text { font-size: 18px; }
}

/* ---------- Marquesina ---------- */
.marquee { background: var(--nopal); color: #fff; overflow: hidden; padding: 1.1rem 0; transform: rotate(-1.2deg); margin: 0 -1rem; }
.marquee-track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.marquee ul { list-style: none; display: flex; margin: 0; padding: 0; }
.marquee li { font: 700 clamp(1.15rem, 2vw, 1.5rem)/1 var(--f-display); white-space: nowrap; padding: 0 1.4rem; display: flex; align-items: center; gap: 2.8rem; }
.marquee li::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--maiz); margin-left: 1.4rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.head h2 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 800; }
.head p:last-child { color: var(--tinta-2); font-size: 1.1rem; margin: 1rem 0 0; }

/* ---------- Menú ---------- */
.menu-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; align-items: stretch; }
.card {
  position: relative; background: #fff; border: 2px solid var(--linea); border-radius: var(--r-lg);
  padding: 1.5rem 1.2rem 1.4rem; display: flex; flex-direction: column; text-align: center;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--tinta); box-shadow: 0 6px 0 var(--tinta); }
.disc {
  --d: calc(110px * var(--s));
  width: var(--d); height: var(--d); margin: 0 auto 1.2rem; flex: none; position: relative;
  border-radius: 50%; align-self: center;
  background:
    radial-gradient(circle at 30% 35%, var(--tostado) 0 3px, transparent 4px),
    radial-gradient(circle at 65% 28%, var(--tostado) 0 2px, transparent 3px),
    radial-gradient(circle at 60% 66%, var(--tostado) 0 4px, transparent 5px),
    radial-gradient(circle at 35% 72%, rgba(201,138,26,.7) 0 2px, transparent 3px),
    radial-gradient(circle, var(--maiz-claro) 0 55%, var(--maiz) 100%);
  box-shadow: inset 0 0 0 3px rgba(201,138,26,.25);
}
/* espacio reservado para que todos los títulos alineen */
.card .disc { margin-top: calc(110px - var(--d)); }
.card h3 { font-size: 1.45rem; font-weight: 700; }
.gr { margin: .3rem auto .6rem; font-weight: 700; font-size: .85rem; color: var(--nopal); background: #e6efe9; padding: .15rem .6rem; border-radius: 999px; }
.use { margin: 0 0 1rem; color: var(--tinta-2); font-size: .92rem; flex: 1; }
.price { margin: 0; font: 800 2.3rem/1 var(--f-display); color: var(--chile); }
.price sup { font-size: .5em; vertical-align: .7em; margin-right: .1em; }
.card-feature { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.card-feature .use { color: #d8c9b4; }
.card-feature .price { color: var(--maiz); }
.card-feature .gr { background: rgba(255,255,255,.12); color: var(--maiz-claro); }
.card-feature:hover { box-shadow: 0 6px 0 var(--chile); }
.ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--chile); color: #fff; font: 700 .72rem/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase;
  padding: .45rem .8rem; border-radius: 999px; white-space: nowrap;
}
.menu-foot {
  margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.4rem; border-radius: var(--r); background: var(--papel-2);
}
.menu-foot p { margin: 0; color: var(--tinta-2); }
.menu-foot b { color: var(--tinta); }
@media (max-width: 1020px) { .menu-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .menu-grid { grid-template-columns: repeat(2, 1fr); } .card-feature { grid-column: 1 / -1; } }

/* ---------- Banda foto ---------- */
.photo-band { position: relative; width: min(1180px, 100% - 2.5rem); margin: 0 auto; }
.photo-band img { width: 100%; height: auto; border-radius: var(--r-lg); }
.photo-quote {
  position: relative; z-index: 1; margin: -1.2rem 0 0 auto; width: fit-content;
  max-width: 24rem; background: var(--maiz); padding: 1.3rem 1.6rem; border-radius: var(--r);
  transform: rotate(-2deg); box-shadow: 0 16px 40px -12px rgba(35,26,18,.35);
}
.photo-quote p { margin: 0; font: 800 clamp(1.2rem, 2.2vw, 1.6rem)/1.15 var(--f-display); }

/* ---------- Recetario ---------- */
.recetario { padding-top: clamp(4rem, 8vw, 6rem); }
@media (max-width: 600px) {
  .facts { gap: 1rem; }
  .facts span { font-size: .8rem; }
  .hero-tag { right: -2%; }
  .badge { left: -4%; }
  .photo-quote { margin: -1rem auto 0; }
}
.tabs { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.tabs button {
  min-height: 46px; padding: .6rem 1.3rem; border-radius: 999px; cursor: pointer;
  font: 700 1rem/1 var(--f-body); color: var(--tinta);
  background: transparent; border: 2px solid var(--tinta);
  transition: background-color .2s, color .2s;
}
.tabs button:hover { background: var(--papel-2); }
.tabs button[aria-selected="true"] { background: var(--tinta); color: var(--maiz); }
.panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; animation: fade .4s var(--ease); }
.panel[hidden] { display: none; }
.recipe { background: #fff; border-radius: var(--r); padding: 1.6rem; border-top: 6px solid var(--chile); }
.recipe:nth-child(3n+2) { border-top-color: var(--nopal); }
.recipe:nth-child(3n+3) { border-top-color: var(--maiz); }
.recipe h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: .8rem; }
.recipe p, .recipe li { color: var(--tinta-2); font-size: .98rem; }
.recipe .ing { margin: 0 0 .8rem; }
.recipe b { color: var(--tinta); }
.recipe ol { margin: 0; padding: 0; list-style: none; counter-reset: paso; }
.recipe li { counter-increment: paso; position: relative; padding-left: 2.2rem; margin-bottom: .55rem; }
.recipe li::before {
  content: counter(paso); position: absolute; left: 0; top: .05rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--papel-2); color: var(--tinta); font: 700 .8rem/1 var(--f-body);
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Contacto ---------- */
.contact { background: var(--nopal); color: #fff; padding: clamp(4rem, 9vw, 7rem) 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.contact h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; }
.info { margin: 2rem 0; display: grid; gap: 1.1rem; }
.info div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.18); }
.info dt { font: 700 .78rem/1.8 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--maiz); }
.info dd { margin: 0; font-size: 1.1rem; }
.info a { font-weight: 700; }
.map { border-radius: var(--r-lg); overflow: hidden; border: 6px solid rgba(255,255,255,.15); min-height: 380px; }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--tinta); color: #cbbca6; padding: 1.8rem 0; font-size: .92rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }
.foot p { margin: 0; }
.foot-brand { font: 700 1.1rem/1 var(--f-display); color: #fff; }
.foot-brand b { color: var(--maiz); }

/* ---------- Botón flotante WhatsApp ---------- */
.fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: #1fa855; color: #fff;
  box-shadow: 0 10px 24px rgba(31,168,85,.45); transition: transform .2s var(--ease);
}
.fab:hover { transform: scale(1.08); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
