/* Panadería La Esquinita — papel crema, terracota, serif suave y sombras duras */
:root {
  --cream: #F7EFE0; --paper: #FFF9EE; --wheat: #E7B15D; --crust: #B8602E; --crust-d: #9A4B22; --cocoa: #2D1B12; --olive: #667A3A; --blush: #F2D2B8;
  --f-d: 'Fraunces', Georgia, serif; --f-b: 'DM Sans', system-ui, sans-serif;
  --shadow: 5px 5px 0 var(--cocoa);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--cream); color: var(--cocoa); font: 400 17px/1.6 var(--f-b);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .1 0 0 0 0 .07 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-d); line-height: 1.05; margin: 0; letter-spacing: -.02em; }
em { font-style: italic; color: var(--crust); }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 999px; border: 2px solid var(--cocoa); font: 700 .98rem var(--f-b); text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn-main { background: var(--crust); color: var(--paper); box-shadow: 4px 4px 0 var(--cocoa); }
.btn-main:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--cocoa); }
.btn-dark { background: var(--cocoa); color: var(--cream); }
.btn-dark:hover { background: var(--crust); }
.btn-line { background: transparent; }
.btn-line:hover { background: var(--cocoa); color: var(--cream); }
.btn-block { width: 100%; }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 5px 14px; border-radius: 999px; border: 1.5px dashed var(--crust); color: var(--crust); font: 700 .78rem var(--f-b); letter-spacing: .14em; text-transform: uppercase; }

/* Cinta superior */
.topnote { background: var(--cocoa); color: var(--cream); overflow: hidden; white-space: nowrap; font-size: .85rem; padding: 8px 0; }
.topnote-track { display: inline-flex; gap: 28px; animation: slide 38s linear infinite; padding-left: 28px; }
.topnote i { color: var(--wheat); font-style: normal; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Cabecera */
.head { position: sticky; top: 0; z-index: 50; background: rgba(247, 239, 224, .92); backdrop-filter: blur(10px); border-bottom: 2px solid var(--cocoa); }
.head-in { display: flex; align-items: center; gap: 28px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--crust); }
.logo span { display: grid; font: 800 1.4rem/1 var(--f-d); color: var(--cocoa); letter-spacing: -.02em; }
.logo small { font: 500 .68rem var(--f-b); letter-spacing: .18em; text-transform: uppercase; color: var(--crust); margin-top: 4px; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--blush); }
.head-cta { padding: 10px 22px; }
.burger { display: none; width: 44px; height: 44px; border: 2px solid var(--cocoa); border-radius: 12px; background: var(--paper); cursor: pointer; padding: 0; position: relative; }
.burger i { position: absolute; left: 11px; right: 11px; height: 2.5px; background: var(--cocoa); transition: transform .25s; }
.burger i:first-child { top: 16px; } .burger i:last-child { top: 25px; }
.burger[aria-expanded="true"] i:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] i:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Portada */
.hero { padding: clamp(36px, 6vw, 84px) 0 clamp(50px, 7vw, 100px); }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 70px); align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 2px solid var(--cocoa); font-weight: 700; font-size: .9rem; box-shadow: 3px 3px 0 var(--cocoa); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--olive); box-shadow: 0 0 0 4px rgba(102, 122, 58, .25); animation: pulse 2s infinite; }
.dot.closed { background: var(--crust); box-shadow: 0 0 0 4px rgba(184, 96, 46, .25); animation: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(102, 122, 58, 0); } }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5.6rem); font-weight: 800; }
.lead { font-size: 1.18rem; max-width: 34em; margin: 22px 0 30px; color: #5a4332; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.facts { list-style: none; display: flex; gap: clamp(18px, 4vw, 44px); margin: 40px 0 0; padding: 24px 0 0; border-top: 2px dashed rgba(45, 27, 18, .3); flex-wrap: wrap; }
.facts b { display: block; font: 800 2.1rem/1 var(--f-d); color: var(--crust); }
.facts span { font-size: .88rem; color: #5a4332; }
.hero-art { position: relative; }
.scene { width: 100%; height: auto; filter: drop-shadow(10px 12px 0 rgba(45, 27, 18, .9)); }
.sticker { position: absolute; left: -4%; top: 10%; width: 128px; height: 128px; display: grid; place-items: center; border-radius: 50%; background: var(--wheat); border: 3px solid var(--cocoa); transform: rotate(-10deg); box-shadow: 4px 4px 0 var(--cocoa); }
.sticker svg { position: absolute; inset: 4px; width: calc(100% - 8px); animation: spin 18s linear infinite; }
.sticker text { font: 800 12.5px var(--f-b); letter-spacing: .08em; fill: var(--cocoa); }
.sticker b { font-size: 2rem; color: var(--crust); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Secciones */
.sec { padding: clamp(60px, 8vw, 110px) 0; }
.sec-head { max-width: 760px; margin-bottom: 38px; }
.sec-head h2 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); font-weight: 800; }
.sec-head p:last-child { color: #5a4332; margin: 16px 0 0; font-size: 1.1rem; }

/* Carta */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.tab { padding: 11px 26px; border-radius: 999px; border: 2px solid var(--cocoa); background: var(--paper); font: 700 1rem var(--f-b); cursor: pointer; transition: all .2s; }
.tab:hover { background: var(--blush); }
.tab.on { background: var(--cocoa); color: var(--cream); box-shadow: 3px 3px 0 var(--crust); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card { position: relative; padding: 26px 24px 22px; background: var(--paper); border: 2px solid var(--cocoa); border-radius: 26px; box-shadow: var(--shadow); transform: rotate(var(--r, 0deg)); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.card:hover { transform: rotate(0) translateY(-6px); box-shadow: 8px 10px 0 var(--cocoa); }
.card-ico { --ico-bg: var(--blush); width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); border: 2px solid var(--cocoa); margin-bottom: 18px; }
.card-ico.c1 { --ico-bg: #F5E1A4; background: #F5E1A4; } .card-ico.c2 { --ico-bg: #D8E2B4; background: #D8E2B4; } .card-ico.c3 { --ico-bg: #F0C7B4; background: #F0C7B4; }
.card-ico svg { width: 82%; height: 82%; }
.card h3 { font-size: 1.4rem; font-weight: 800; }
.card p { color: #5a4332; font-size: .96rem; margin: 8px 0 18px; flex: 1; }
.tag { position: absolute; top: 18px; right: 18px; padding: 4px 12px; border-radius: 999px; background: var(--wheat); border: 2px solid var(--cocoa); font: 700 .72rem var(--f-b); text-transform: uppercase; letter-spacing: .08em; transform: rotate(4deg); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; border-top: 2px dashed rgba(45, 27, 18, .25); }
.card-foot strong { font: 800 1.45rem var(--f-d); }
.add { padding: 9px 18px; border-radius: 999px; border: 2px solid var(--cocoa); background: var(--cream); font: 700 .9rem var(--f-b); cursor: pointer; transition: all .2s; }
.add:hover { background: var(--crust); color: var(--paper); }
.add.ok { background: var(--olive); color: #fff; }

/* Cinta */
.ribbon { overflow: hidden; background: var(--crust); color: var(--cream); border-block: 3px solid var(--cocoa); transform: rotate(-1.4deg); margin: 20px -2% 20px; padding: 16px 0; white-space: nowrap; }
.ribbon-track { display: inline-flex; gap: 34px; animation: slide 28s linear infinite; font: italic 800 clamp(1.5rem, 3vw, 2.3rem) var(--f-d); }
.ribbon i { font-style: normal; color: var(--wheat); }

/* Obrador */
.obrador { background: var(--cocoa); color: var(--cream); margin-top: 30px; }
.obrador em { color: var(--wheat); }
.obrador .eyebrow { color: var(--wheat); border-color: var(--wheat); }
.obrador-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.obrador h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; margin-bottom: 22px; }
.obrador p { color: #e3d4bd; }
.obrador .btn { margin-top: 18px; }
.day { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 14px; }
.day::before { content: ""; position: absolute; left: 133px; top: 20px; bottom: 20px; border-left: 3px dashed rgba(231, 177, 93, .5); }
.day li { display: grid; grid-template-columns: 124px 1fr; gap: 0; align-items: center; background: rgba(255, 249, 238, .06); border: 2px solid rgba(231, 177, 93, .35); border-radius: 20px; padding: 14px 20px 14px 10px; }
.day time { font: 800 1.6rem var(--f-d); color: var(--wheat); padding-right: 24px; text-align: right; position: relative; }
.day time::after { content: ""; position: absolute; right: -9px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--wheat); border: 3px solid var(--cocoa); }
.day b { display: block; font-family: var(--f-d); font-size: 1.15rem; } .day span { font-size: .93rem; color: #cdbda4; padding-left: 0; }
.day li > div { padding-left: 14px; }

/* Encargos */
.order { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: start; }
.order-box, .order-form { background: var(--paper); border: 2px solid var(--cocoa); border-radius: 26px; box-shadow: var(--shadow); padding: 28px; }
.order-box h3 { font-size: 1.6rem; margin-bottom: 14px; }
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.order-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--cream); border: 2px solid var(--cocoa); border-radius: 16px; }
.order-list b { font-weight: 700; } .order-list small { display: block; color: #7a6350; }
.qty { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--cocoa); border-radius: 999px; background: var(--paper); }
.qty button { width: 30px; height: 30px; border: 0; background: transparent; font: 700 1.1rem var(--f-b); cursor: pointer; border-radius: 50%; }
.qty button:hover { background: var(--blush); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.order-empty { color: #7a6350; padding: 18px; border: 2px dashed rgba(45, 27, 18, .3); border-radius: 16px; text-align: center; margin: 0; }
.order-empty a { color: var(--crust); font-weight: 700; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; padding-top: 18px; border-top: 2px dashed rgba(45, 27, 18, .3); }
.order-total strong { font: 800 2rem var(--f-d); color: var(--crust); }
.order-form { display: grid; gap: 16px; }
.order-form label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.order-form input, .order-form select, .order-form textarea, .news-form input { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--cocoa); background: var(--cream); font: 500 1rem var(--f-b); color: var(--cocoa); }
.order-form input:focus, .order-form select:focus, .order-form textarea:focus, .news-form input:focus { outline: 3px solid var(--wheat); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: .84rem; color: #7a6350; margin: 0; }

/* Horario */
.horario { background: var(--blush); border-block: 3px solid var(--cocoa); }
.horario-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 5vw, 70px); align-items: center; }
.hours h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; margin-bottom: 20px; }
.hours-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; background: var(--paper); border: 2px solid var(--cocoa); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.hours-table th, .hours-table td { padding: 14px 20px; text-align: left; border-bottom: 2px dashed rgba(45, 27, 18, .2); }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-table td { text-align: right; font-weight: 700; }
.hours-table tr.today { background: var(--wheat); }
.hours-table tr.today th::after { content: " · hoy"; font-weight: 500; }
.contact { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.contact b { display: inline-block; min-width: 100px; color: var(--crust); }
.map { border: 3px solid var(--cocoa); border-radius: 30px; overflow: hidden; box-shadow: 8px 8px 0 var(--cocoa); background: #EBD9BC; }
.map svg { width: 100%; height: auto; }

/* Boletín */
.news { background: var(--wheat); padding: clamp(46px, 6vw, 80px) 0; border-bottom: 3px solid var(--cocoa); }
.news-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.news h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 800; } .news em { color: var(--cocoa); text-decoration: underline wavy var(--crust); text-underline-offset: 6px; }
.news p { margin: 12px 0 0; color: #4a321f; }
.news-form { display: flex; gap: 10px; }
.news-form input { flex: 1; }

/* Pie */
.foot { background: var(--cocoa); color: var(--cream); padding: 56px 0 100px; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.foot .logo { color: var(--wheat); } .foot .logo span { color: var(--cream); } .foot .logo small { color: var(--wheat); }
.foot p { color: #cdbda4; margin: 14px 0 0; } .foot b { font-family: var(--f-d); font-size: 1.2rem; } .foot a { text-decoration: none; } .foot a:hover { color: var(--wheat); }
.foot-small { text-align: center; margin: 40px 20px 0 !important; padding-top: 24px; border-top: 1px dashed rgba(231, 177, 93, .35); font-size: .85rem; }

/* Aviso y modal */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); padding: 12px 22px; border-radius: 999px; background: var(--cocoa); color: var(--cream); border: 2px solid var(--wheat); font-weight: 700; opacity: 0; pointer-events: none; transition: all .3s; z-index: 200; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: rgba(45, 27, 18, .6); backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal-card { width: min(520px, 100%); background: var(--paper); border: 3px solid var(--cocoa); border-radius: 26px; box-shadow: 8px 8px 0 var(--crust); padding: 30px; }
.modal-card h3 { font-size: 1.8rem; margin-bottom: 8px; }
.modal-card pre { white-space: pre-wrap; font: 500 .95rem/1.5 var(--f-b); background: var(--cream); border: 2px dashed var(--cocoa); border-radius: 14px; padding: 14px; margin: 14px 0; }

/* Aparición suave */
.js .sec-head, .js .card, .js .order-box, .js .order-form, .js .day li, .js .hours, .js .map { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.js .card { transform: translateY(24px) rotate(var(--r, 0deg)); }
.js .in { opacity: 1 !important; transform: none !important; }
.js .card.in { transform: rotate(var(--r, 0deg)) !important; }
.js .card.in:hover { transform: rotate(0) translateY(-6px) !important; }

@media (max-width: 960px) {
  .hero-in, .obrador-in, .order, .horario-in, .news-in { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .hero-art { max-width: 460px; margin-inline: auto; }
  .nav { position: fixed; inset: 118px 0 auto 0; flex-direction: column; background: var(--cream); padding: 16px 20px 24px; border-bottom: 3px solid var(--cocoa); transform: translateY(-30px); opacity: 0; visibility: hidden; transition: transform .3s, opacity .3s, visibility .3s; margin: 0; z-index: -1; }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { font-size: 1.15rem; }
  .burger { display: block; margin-left: auto; }
  .head-cta { display: none; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .day li { grid-template-columns: 88px 1fr; } .day::before { left: 97px; } .day time { font-size: 1.2rem; padding-right: 18px; }
  .news-form { flex-direction: column; }
  .sticker { width: 96px; height: 96px; left: 0; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
