/* TORTILLERÍA DANI — La banda transportadora */
:root {
  --cream: #fcf9f2;
  --paper: #f3ead8;
  --kraft: #d9b98a;
  --brown: #4a2c17;
  --brown-2: #7a4a28;
  --fire: #e8731a;
  --dough: #f4e3c1;
  --chalk-bg: #2c3a33;
  --pad: clamp(18px, 5vw, 72px);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Nunito", system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--cream); color: var(--brown); font-family: var(--sans); font-size: 17px; line-height: 1.55;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--fire); outline-offset: 3px; }
::selection { background: var(--fire); color: #fff; }

h1, h2, h3 { font-family: var(--serif); font-weight: 800; line-height: 1.02; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 6.4vw, 4.2rem); overflow-wrap: break-word; }
h2 span, h1 em { color: var(--fire); font-style: normal; }
.eyebrow { font-family: var(--hand); font-size: 1.5rem; font-weight: 700; color: var(--fire); margin-bottom: 6px; }

/* ===== NAV ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 60px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 0 var(--pad);
  background: rgba(252, 249, 242, .9); backdrop-filter: blur(8px); border-bottom: 1px dashed var(--kraft);
}
.nav__brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.nav__brand b { color: var(--fire); }
.nav__links { display: flex; gap: 26px; font-weight: 600; font-size: .95rem; }
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--fire); transform: scaleX(0); transition: transform .25s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); }
@media (max-width: 760px) { .nav__links { display: none; } }

.btn { display: inline-block; background: var(--brown); color: var(--cream); font-weight: 800; padding: 12px 22px; border-radius: 999px; transition: transform .2s var(--ease), background .2s; }
.btn:hover { background: var(--fire); transform: scale(1.06); }
.btn--sm { padding: 8px 18px; font-size: .9rem; }

/* ===== HERO ===== */
.hero {
  min-height: 100svh; padding: 100px 0 0; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(ellipse at 50% 20%, #fff 0, var(--cream) 60%);
}
.hero__copy { text-align: center; padding: 0 var(--pad); max-width: 1000px; margin: 0 auto; position: relative; z-index: 3; }
.chip { display: inline-block; background: var(--fire); color: #fff; font-weight: 800; padding: 6px 16px; border-radius: 999px; transform: rotate(-3deg); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 10.5vw, 7.4rem); }
.hero__deal { margin-top: 18px; font-family: var(--serif); font-weight: 600; font-size: clamp(1.3rem, 4vw, 2.5rem); line-height: 1.15; }
.deal__price { display: inline-block; background: var(--brown); color: var(--dough); padding: 2px 16px 6px; border-radius: 14px; transform: rotate(-2deg); animation: pop 2.4s ease-in-out infinite; }
.hero__sub { margin-top: 16px; max-width: 46ch; margin-inline: auto; font-size: 1.05rem; color: var(--brown-2); }
@keyframes pop { 0%, 100% { transform: rotate(-2deg) scale(1); } 50% { transform: rotate(-1deg) scale(1.05); } }

/* línea de producción */
.line { position: relative; height: 190px; margin-top: 28px; }
.machine { position: absolute; left: 0; bottom: 50px; width: 130px; z-index: 4; }
.machine__top { display: flex; gap: 8px; padding: 6px 10px; background: var(--brown-2); border-radius: 12px 12px 0 0; }
.machine__top i { width: 12px; height: 12px; border-radius: 50%; background: var(--dough); animation: blink 1.6s infinite; }
.machine__top i:nth-child(2) { animation-delay: .5s; background: var(--fire); }
.machine__top i:nth-child(3) { animation-delay: 1s; }
.machine__body { height: 84px; background: linear-gradient(#8a5630, var(--brown)); border-radius: 0 0 8px 0; position: relative; }
.machine__slot { position: absolute; right: -2px; bottom: 6px; width: 20px; height: 18px; background: #1c0e05; border-radius: 4px 0 0 4px; box-shadow: 0 0 14px var(--fire) inset; }
@keyframes blink { 50% { opacity: .25; } }
.belt { position: absolute; left: 0; right: 0; bottom: 34px; height: 18px; background: var(--brown); z-index: 2; }
.belt::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.12) 22px 26px); animation: belt 1.2s linear infinite; }
@keyframes belt { to { background-position: 26px 0; } }
.rollers { position: absolute; left: 0; right: 0; bottom: 14px; height: 20px; display: flex; justify-content: space-around; overflow: hidden; z-index: 2; }
.rollers i { width: 20px; height: 20px; border-radius: 50%; background: var(--brown-2); border: 4px solid var(--brown); position: relative; animation: spin 2s linear infinite; }
.rollers i::after { content: ""; position: absolute; inset: 2px 7px; background: var(--kraft); }
@keyframes spin { to { transform: rotate(360deg); } }
.line::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--paper); border-top: 4px solid var(--kraft); }

/* tortillas flotando de un extremo al otro */
.tort {
  position: absolute; left: 0; bottom: 56px; width: 64px; height: 64px; border-radius: 50%; z-index: 3;
  background:
    radial-gradient(circle at 24% 30%, #b8743a 0 4px, transparent 5px),
    radial-gradient(circle at 62% 22%, #a2622c 0 5px, transparent 6px),
    radial-gradient(circle at 74% 62%, #b8743a 0 4px, transparent 5px),
    radial-gradient(circle at 36% 72%, #a2622c 0 5px, transparent 6px),
    radial-gradient(circle at 50% 50%, #f9ecd0, var(--dough) 70%, #e2c48b);
  box-shadow: 0 3px 0 rgba(74,44,23,.25), inset 0 0 0 2px rgba(122,74,40,.18);
  transform: translateX(-100px);
  animation: travel 12.8s linear infinite, bob 1.6s ease-in-out infinite;
  animation-delay: var(--d), var(--d);
}
@keyframes travel { from { left: 110px; opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } to { left: 100%; opacity: 0; } }
@keyframes bob { 0%, 100% { margin-bottom: 0; rotate: -4deg; } 50% { margin-bottom: 10px; rotate: 6deg; } }
@media (max-width: 600px) { .machine { width: 90px; } .tort { width: 48px; height: 48px; } @keyframes travel { from { left: 80px; opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } to { left: 100%; opacity: 0; } } }

/* ===== SECCIONES ===== */
.section { padding: clamp(64px, 10vw, 130px) var(--pad); max-width: 1280px; margin: 0 auto; }
.head { margin-bottom: clamp(28px, 5vw, 56px); }
.section--belt { max-width: none; padding-inline: 0; }
.section--belt .head { padding-inline: var(--pad); max-width: 1280px; margin-inline: auto; }

/* ===== BANDA DE PRODUCTOS ===== */
.conveyor {
  overflow-x: auto; scroll-snap-type: x proximity; padding: 24px var(--pad) 70px; scrollbar-width: none; position: relative;
  background: linear-gradient(to bottom, transparent calc(100% - 52px), var(--brown) calc(100% - 52px) calc(100% - 34px), var(--paper) calc(100% - 34px));
}
.conveyor::-webkit-scrollbar { display: none; }
.conveyor__track { display: flex; gap: 24px; width: max-content; padding-right: var(--pad); }
.pack {
  position: relative; width: clamp(240px, 70vw, 300px); flex: none; scroll-snap-align: center;
  background: #fff; border: 2px solid var(--brown); border-radius: 22px; padding: 22px;
  box-shadow: 6px 6px 0 var(--brown); display: flex; flex-direction: column; gap: 8px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.pack:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 8px 14px 0 var(--fire); }
.pack__tag { align-self: flex-start; font-family: var(--hand); font-weight: 700; font-size: 1.25rem; background: var(--dough); padding: 0 12px; border-radius: 8px; transform: rotate(-2deg); }
.pack__tort {
  width: 120px; height: 120px; margin: 8px auto; border-radius: 50%; transition: transform .6s var(--ease);
  background:
    radial-gradient(circle at 26% 32%, #b8743a 0 6px, transparent 7px),
    radial-gradient(circle at 64% 24%, #a2622c 0 7px, transparent 8px),
    radial-gradient(circle at 72% 64%, #b8743a 0 6px, transparent 7px),
    radial-gradient(circle at 38% 74%, #a2622c 0 7px, transparent 8px),
    radial-gradient(circle at 50% 50%, #f9ecd0, var(--dough) 70%, #e2c48b);
  box-shadow: 0 4px 0 rgba(74,44,23,.22);
}
.pack__tort--l { width: 150px; height: 150px; margin-block: 0; }
.pack__tort--s { width: 90px; height: 90px; margin-block: 14px; }
.pack__tort--t { width: 110px; height: 110px; border-radius: 48%; box-shadow: 0 10px 0 #d9bd85, 0 12px 0 rgba(74,44,23,.25); margin-bottom: 18px; }
.pack:hover .pack__tort { transform: rotate(40deg) scale(1.08); }
.pack h3 { font-size: 1.7rem; }
.pack p { color: var(--brown-2); font-size: .98rem; }
.pack__price { font-family: var(--serif); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--fire) !important; margin-top: auto; }
.pack__price small { display: block; font-family: var(--sans); font-weight: 600; font-size: .85rem; color: var(--brown-2); }
.hint { text-align: center; font-family: var(--hand); font-size: 1.3rem; color: var(--brown-2); margin-top: -34px; position: relative; }

/* humito */
.steam { position: absolute; top: -6px; left: 0; right: 0; height: 80px; pointer-events: none; display: flex; justify-content: center; gap: 26px; opacity: 0; transition: opacity .3s; }
.steam i {
  width: 26px; height: 60px; border-radius: 50%; background: rgba(120, 100, 80, .35); filter: blur(10px);
  animation: steam 2.4s ease-in infinite; transform: translateY(20px) scale(.6);
}
.steam i:nth-child(2) { animation-delay: .7s; height: 72px; }
.steam i:nth-child(3) { animation-delay: 1.4s; }
.pack:hover .steam, .pack:focus-within .steam, .pack.on .steam { opacity: 1; }
@keyframes steam { 0% { transform: translateY(24px) scale(.6); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-46px) scale(1.5); opacity: 0; } }

/* ===== RINCÓN CASERO ===== */
.rincon {
  background: var(--paper); border: 2px dashed var(--kraft); border-radius: 32px; padding: clamp(24px, 5vw, 64px);
  display: grid; grid-template-columns: .9fr 1.4fr; gap: clamp(24px, 5vw, 64px); align-items: center;
  background-image: repeating-linear-gradient(45deg, transparent 0 18px, rgba(217,185,138,.18) 18px 20px);
}
.rincon__head p:last-child { margin-top: 14px; color: var(--brown-2); max-width: 36ch; }
.rincon__items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.home { background: var(--cream); border-radius: 22px; padding: 22px 16px; text-align: center; border: 2px solid var(--brown); }
.home h3 { font-size: 1.2rem; margin: 10px 0 6px; }
.home p { font-size: .92rem; color: var(--brown-2); }
.icon { width: 96px; height: 96px; display: block; margin: 0 auto; }
.sway { transform-origin: 50% 90%; animation: sway 3.2s ease-in-out infinite; }
.sway--b { animation-delay: -1s; animation-duration: 3.8s; }
.sway--c { animation-delay: -2s; animation-duration: 2.8s; }
@keyframes sway { 0%, 100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(7deg) translateY(-6px); } }
@media (max-width: 900px) { .rincon { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .rincon__items { grid-template-columns: 1fr; } .home { display: grid; grid-template-columns: 90px 1fr; text-align: left; column-gap: 14px; align-items: center; } .home .icon { grid-row: span 2; width: 80px; height: 80px; } .home h3 { margin: 0; } }

/* ===== QUESOS ===== */
.cheeses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 3px solid var(--brown); border-bottom: 3px solid var(--brown); }
.cheese { padding: 32px 24px; text-align: center; border-right: 2px dashed var(--kraft); transition: background .25s; }
.cheese:last-child { border-right: 0; }
.cheese:hover { background: var(--paper); }
.cheese h3 { font-size: 1.9rem; margin-top: 14px; }
.cheese p { color: var(--brown-2); }
.cheese__icon { display: block; width: 92px; height: 72px; margin: 0 auto; transition: transform .3s var(--ease); background: #f3c94a; position: relative; }
.cheese:hover .cheese__icon { transform: rotate(-6deg) scale(1.08); }
.cheese__icon--asadero { clip-path: polygon(0 100%, 0 30%, 100% 0, 100% 100%); background: radial-gradient(circle at 30% 70%, #d9a824 0 7px, transparent 8px), radial-gradient(circle at 65% 55%, #d9a824 0 5px, transparent 6px), #f3c94a; }
.cheese__icon--oreado { border-radius: 50%; width: 80px; height: 80px; background: radial-gradient(circle at 50% 50%, #f1e1b4 0 55%, #e0c27d 56%); box-shadow: inset 0 -8px 0 rgba(122,74,40,.2); margin-bottom: -8px; }
.cheese__icon--fresco { border-radius: 14px 14px 30px 30px; background: linear-gradient(#fff, #f2eede); border: 3px solid var(--kraft); }
@media (max-width: 700px) { .cheeses { grid-template-columns: 1fr; } .cheese { border-right: 0; border-bottom: 2px dashed var(--kraft); padding: 24px 12px; } .cheese:last-child { border-bottom: 0; } }

/* ===== PIZARRÓN ===== */
.board__frame {
  position: relative; background: var(--chalk-bg); color: #f3f1e6; border: 14px solid var(--brown-2); border-radius: 10px;
  box-shadow: 0 0 0 4px var(--brown), 0 20px 40px rgba(74,44,23,.3), inset 0 0 60px rgba(0,0,0,.35);
  padding: clamp(24px, 5vw, 60px); max-width: 860px; margin: 0 auto;
  background-image: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.07), transparent 60%);
}
.board__new { font-family: var(--hand); font-size: 2rem; color: #ffd37a; transform: rotate(-4deg); display: inline-block; }
.board__frame h2 { font-family: var(--hand); font-weight: 700; font-size: clamp(2.6rem, 9vw, 5.4rem); color: #fff; line-height: .95; letter-spacing: 0; margin-bottom: 10px; }
.board__lead { font-family: var(--hand); font-size: 1.6rem; line-height: 1.2; color: #d8d6c8; max-width: 34ch; margin-bottom: 20px; }
.board__list li { display: flex; align-items: baseline; gap: 10px; font-family: var(--hand); font-size: clamp(1.5rem, 4vw, 2.1rem); padding: 4px 0; opacity: 0; transform: translateX(-24px); }
.board__list i { flex: 1; border-bottom: 3px dotted rgba(243,241,230,.5); }
.board__list b { color: #ffd37a; font-weight: 700; }
.board.in .board__list li { animation: chalk .6s var(--ease) forwards; }
.board.in .board__list li:nth-child(2) { animation-delay: .15s; }
.board.in .board__list li:nth-child(3) { animation-delay: .3s; }
.board.in .board__list li:nth-child(4) { animation-delay: .45s; }
@keyframes chalk { to { opacity: 1; transform: none; } }
.chalkbtn { display: inline-block; margin-top: 22px; font-family: var(--hand); font-size: 1.7rem; border: 3px solid #f3f1e6; padding: 4px 22px; border-radius: 40px 14px 36px 12px; transition: background .2s, color .2s, transform .2s var(--ease); }
.chalkbtn:hover { background: #f3f1e6; color: var(--chalk-bg); transform: rotate(-2deg) scale(1.05); }
html:not(.js) .board__list li { opacity: 1; transform: none; }

/* ===== CIERRE ===== */
.close { padding: clamp(48px, 8vw, 100px) var(--pad) 32px; }
.wrap { position: relative; max-width: 960px; margin: 0 auto; padding-top: 70px; }
.wrap__flap {
  position: absolute; top: 0; left: 0; right: 0; height: 90px; background: var(--kraft); z-index: 1;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 96% 100%, 92% 40%, 88% 100%, 84% 40%, 80% 100%, 76% 40%, 72% 100%, 68% 40%, 64% 100%, 60% 40%, 56% 100%, 52% 40%, 48% 100%, 44% 40%, 40% 100%, 36% 40%, 32% 100%, 28% 40%, 24% 100%, 20% 40%, 16% 100%, 12% 40%, 8% 100%, 4% 40%, 0 100%);
  filter: drop-shadow(0 4px 0 rgba(74,44,23,.25));
}
.wrap__twine { position: absolute; top: 0; bottom: 0; left: 50%; width: 8px; margin-left: -4px; z-index: 3; background: repeating-linear-gradient(0deg, #a77b45 0 6px, #8a6232 6px 9px); box-shadow: 1px 0 0 rgba(0,0,0,.15); }
.wrap__label {
  position: relative; background: var(--kraft); padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px); border-radius: 0 0 24px 24px;
  background-image: repeating-linear-gradient(0deg, rgba(74,44,23,.05) 0 2px, transparent 2px 6px);
  box-shadow: 0 14px 0 rgba(74,44,23,.18);
}
.wrap__label > * { position: relative; z-index: 4; }
.wrap__label .eyebrow { color: var(--brown); }
.wrap__label h2 { background: var(--cream); display: inline-block; padding: 8px 20px 12px; border-radius: 12px; border: 2px solid var(--brown); transform: rotate(-1.5deg); font-size: clamp(2rem, 7vw, 4.4rem); margin-bottom: 26px; }
.wrap__label dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 28px; }
.wrap__label dt { font-family: var(--hand); font-size: 1.5rem; font-weight: 700; }
.wrap__label dd { font-weight: 600; background: var(--cream); display: inline-block; padding: 6px 12px; border-radius: 8px; }
.close__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.bigbtn {
  flex: 1 1 240px; text-align: center; font-family: var(--serif); font-weight: 800; font-size: clamp(1.2rem, 4vw, 1.7rem);
  padding: 22px 20px; border-radius: 20px; border: 3px solid var(--brown); box-shadow: 0 6px 0 var(--brown);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.bigbtn--wa { background: var(--fire); color: #fff; }
.bigbtn--map { background: var(--cream); }
.bigbtn:hover, .bigbtn:focus-visible { transform: scale(1.06) translateY(-3px); box-shadow: 0 10px 0 var(--brown); }
.bigbtn:active { transform: scale(.97) translateY(4px); box-shadow: 0 2px 0 var(--brown); }
.close__legal { text-align: center; margin-top: 44px; font-size: .9rem; color: var(--brown-2); }

/* ===== REVEAL ===== */
.js .fade { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .fade.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .fade { opacity: 1; transform: none; }
  .tort { display: none; }
  .board__list li { opacity: 1; transform: none; }
}
