/* ==========================================================
   La Cocina de Nilsa · estilos
   Mobile-first. Puntos de quiebre: 600px (tablet), 960px (PC).
   ========================================================== */

:root {
  --orange: #ef7f1a;
  --orange-dk: #c9620a;
  --red: #d63a2b;
  --ink: #1c1612;
  --ink-2: #2a221c;
  --cream: #fbf3e8;
  --paper: #fffaf4;
  --muted: #6d6158;
  --line: #eadccb;
  --star: #f5a623;
  --ve-yellow: #f4c300;
  --ve-blue: #00247d;
  --ve-red: #cf142b;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(28, 22, 18, .35);
  --header-h: 64px;
  --gutter: 16px;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* tablero blanco y negro, igual que el papel de sus fotos */
  --checker: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}

@media (min-width: 600px) { :root { --gutter: 28px; --header-h: 72px; } }
@media (min-width: 960px) { :root { --gutter: 40px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* espacio para la barra de pedido en móvil */
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 960px) { body { padding-bottom: 0; } }

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 7vw + .5rem, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw + .8rem, 3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange-dk); margin-bottom: .8em;
}
.eyebrow--light { color: var(--orange); }
.flag {
  width: 22px; height: 14px; border-radius: 3px; flex: none;
  background: linear-gradient(var(--ve-yellow) 0 33.3%, var(--ve-blue) 0 66.6%, var(--ve-red) 0);
}
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.h-small { font-family: var(--f-body); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 1.6em; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.1 var(--f-body); text-decoration: none; text-align: center;
  cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:active { transform: scale(.97); }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; }
.btn--sm { min-height: 44px; padding: 8px 18px; font-size: .95rem; }
.btn--orange { background: var(--orange); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost-dark { border-color: var(--ink); color: var(--ink); }
@media (hover: hover) {
  .btn--orange:hover { background: var(--orange-dk); }
  .btn--dark:hover { background: var(--ink-2); }
  .btn--ghost:hover { background: #fff; color: var(--ink); }
  .btn--ghost-dark:hover { background: var(--ink); color: #fff; }
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
@media (max-width: 420px) { .cta-row .btn { flex: 1 1 100%; } }

/* ---------- header ---------- */
.header {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  background: rgba(28, 22, 18, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  color: #fff;
  padding-top: env(safe-area-inset-top, 0px);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand__name { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; line-height: 1; }
.brand__name em { font-style: normal; color: var(--orange); }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 12px; margin-right: -8px;
  background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: fixed; left: 0; right: 0;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px var(--gutter) 24px;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.08);
  transform: translateY(-110%); visibility: hidden;
  transition: transform .25s ease, visibility .25s;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.nav.is-open { transform: none; visibility: visible; }
.nav a { padding: 14px 4px; font-weight: 500; font-size: 1.1rem; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav a.nav__cta { margin-top: 12px; border: 0; padding: 14px 18px; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav {
    position: static; flex-direction: row; align-items: center; gap: 4px;
    padding: 0; background: none; border: 0; transform: none; visibility: visible;
    max-height: none; overflow: visible;
  }
  .nav a { border: 0; padding: 10px 12px; font-size: .98rem; border-radius: 999px; }
  .nav a:not(.btn):hover { background: rgba(255,255,255,.08); }
  .nav a.nav__cta { margin: 0 0 0 8px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(120% 80% at 90% 10%, #3a2a1e 0%, var(--ink) 60%);
  color: #fff;
  padding: 40px 0 56px;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px;
  background: var(--checker); opacity: .9;
}
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero .eyebrow { color: #ffd2a6; }
.hero h1 .hl { color: var(--orange); white-space: nowrap; }
.lead { font-size: clamp(1.05rem, .6vw + .95rem, 1.25rem); color: rgba(255,255,255,.82); max-width: 34em; }

.badges { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  font-size: .9rem; font-weight: 500;
}
.badge--star span { color: var(--star); }
#open-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9a8f86; }
#open-badge[data-state="open"]::before { background: #34c759; box-shadow: 0 0 0 4px rgba(52,199,89,.25); }
#open-badge[data-state="closed"]::before { background: var(--red); }

.hero__media {
  position: relative;
  display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px;
  aspect-ratio: 1 / 1; max-width: 560px; width: 100%; margin-inline: auto;
}
.tile { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--ink-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile--a { grid-row: 1 / 3; }
.tile--a img, .dish--wide img { object-position: center 85%; }
.sticker {
  position: absolute; left: -6px; bottom: 18px;
  display: grid; place-items: center; text-align: center;
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--orange); color: #fff; box-shadow: var(--shadow);
  transform: rotate(-10deg); line-height: 1.05;
}
.sticker strong { font-family: var(--f-display); font-size: 1.9rem; }
.sticker span { font-size: .7rem; letter-spacing: 1px; color: #fff3c4; }
.sticker small { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }

@media (min-width: 600px) {
  .hero { padding: 64px 0 80px; }
  .sticker { width: 124px; height: 124px; left: -18px; }
  .sticker strong { font-size: 2.3rem; }
}
@media (min-width: 960px) {
  .hero { padding: 88px 0 104px; }
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}

/* ---------- marquee ---------- */
.marquee { background: var(--orange); color: var(--ink); overflow: hidden; padding: 14px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span {
  font-family: var(--f-display); font-weight: 800; font-size: clamp(1.1rem, 2vw + .5rem, 1.6rem);
  padding: 0 22px; white-space: nowrap; display: inline-flex; align-items: center; gap: 22px;
}
.marquee span::after { content: "✦"; font-size: .7em; color: #fff; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- secciones ---------- */
.section { padding: 64px 0; }
.section--tight { padding: 56px 0; }
.section--cream { background: var(--cream); }
.section--dark { background: var(--ink); color: #fff; }
.section__head { max-width: 680px; margin-bottom: 32px; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section__head--row h2 { margin: 0; }
.section__sub { color: var(--muted); font-size: 1.05rem; }
@media (min-width: 960px) { .section { padding: 96px 0; } .section__head { margin-bottom: 44px; } }

/* ---------- especialidades ---------- */
.dishes { display: grid; gap: 16px; grid-template-columns: 1fr; }
.dish {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--ink); color: #fff; min-height: 300px;
  box-shadow: var(--shadow); isolation: isolate;
}
.dish img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.dish::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(18,12,8,.55) 60%, rgba(18,12,8,.92) 100%);
}
.dish__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; }
.dish__body h3 { font-size: 1.35rem; margin-bottom: .25em; }
.dish__body p { margin: 0; color: rgba(255,255,255,.85); font-size: .95rem; }
@media (hover: hover) { .dish:hover img { transform: scale(1.05); } }

@media (min-width: 600px) {
  .dishes { grid-template-columns: repeat(2, 1fr); }
  .dish { min-height: 340px; }
  .dish--wide { grid-column: 1 / -1; min-height: 420px; }
}
@media (min-width: 960px) {
  .dishes { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 300px; }
  .dish, .dish--wide { min-height: 0; }
  .dish--wide { grid-column: span 2; grid-row: span 2; }
  .dish--wide .dish__body h3 { font-size: 2rem; }
}

/* ---------- carta ---------- */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: 4px var(--gutter) 12px; margin: 0 calc(var(--gutter) * -1) 16px;
  scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; scroll-snap-align: start;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font: 700 .95rem var(--f-body); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
@media (min-width: 960px) { .tabs { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }

.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .menu { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .menu { grid-template-columns: repeat(3, 1fr); } }

.item {
  display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px;
  padding: 12px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--line);
}
.item[hidden] { display: none; }
.item img, .item__ph {
  width: 72px; height: 72px; border-radius: 10px; object-fit: cover;
}
.item__ph {
  display: grid; place-items: center; font-size: 2rem;
  background: var(--cream); border: 2px dashed var(--line);
}
.item__txt { min-width: 0; }
.item h3 { font-family: var(--f-body); font-weight: 700; font-size: 1rem; margin: 0 0 2px; }
.item p { margin: 0; font-size: .87rem; color: var(--muted); line-height: 1.4; }
.item__price { font-weight: 700; font-size: 1.02rem; color: var(--orange-dk); white-space: nowrap; }

.menu__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
@media (max-width: 420px) { .menu__cta .btn { flex: 1 1 100%; } }

/* ---------- nosotros ---------- */
.about { display: grid; gap: 32px; align-items: center; }
.about__photo { margin: 0; border-radius: var(--radius); overflow: hidden; max-width: 380px; width: 100%; justify-self: center; position: relative; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.about__photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: var(--checker);
}
.about__copy p { color: rgba(255,255,255,.82); font-size: 1.08rem; max-width: 36em; }
.pills { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); font-size: .92rem; }
.pills li:first-child { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
@media (min-width: 800px) { .about { grid-template-columns: minmax(280px, 400px) 1fr; gap: 64px; } }

/* ---------- reseñas ---------- */
.reviews { display: grid; gap: 16px; grid-template-columns: 1fr; }
.score {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 28px; border-radius: var(--radius); background: var(--orange); color: #fff;
}
.score strong { font-family: var(--f-display); font-size: 4rem; line-height: 1; }
.score .stars { color: #fff3c4; font-size: 1.4rem; letter-spacing: 3px; }
.score p { margin: 4px 0 16px; font-weight: 500; }
.review {
  margin: 0; padding: 26px; border-radius: var(--radius); background: var(--cream);
  display: flex; flex-direction: column; gap: 8px;
}
.review .stars { color: var(--star); letter-spacing: 2px; }
.review p { font-family: var(--f-display); font-size: 1.45rem; font-weight: 600; line-height: 1.25; margin: 0; flex: 1; }
.review footer { font-size: .9rem; color: var(--muted); font-weight: 500; }
@media (min-width: 600px) { .reviews { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .reviews { grid-template-columns: 1.1fr 1fr 1fr 1fr; } }

/* ---------- instagram ---------- */
.ig { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ig a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--ink-2); }
.ig img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .2s; }
@media (hover: hover) { .ig a:hover img { transform: scale(1.06); opacity: .9; } }
@media (min-width: 600px) { .ig { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1000px) { .ig { grid-template-columns: repeat(6, 1fr); } }

/* ---------- visítanos ---------- */
.visit { display: grid; gap: 32px; }
.hours { border-collapse: collapse; width: 100%; max-width: 420px; }
.hours th, .hours td { padding: 9px 0; border-bottom: 1px dashed var(--line); text-align: left; font-weight: 500; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--orange-dk); font-weight: 700; }
.hours tr.is-today th::after { content: " · hoy"; font-weight: 500; font-size: .85em; }
.visit__map {
  border-radius: var(--radius); overflow: hidden; min-height: 320px;
  background: var(--cream); border: 1px solid var(--line);
}
.visit__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
@media (min-width: 900px) { .visit { grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: stretch; } .visit__map { min-height: 460px; } }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 48px 0 32px; position: relative; }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 12px; background: var(--checker); }
.footer__inner { display: grid; gap: 24px; }
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__brand img { border-radius: 50%; }
.footer__brand p { margin: 0; }
.footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__links a { display: inline-block; padding: 10px 0; text-decoration: none; font-weight: 500; }
.footer__links a:hover { color: var(--orange); }
.footer__copy { margin: 0; font-size: .85rem; color: rgba(255,255,255,.5); }
@media (min-width: 800px) { .footer__inner { grid-template-columns: 1fr auto; align-items: center; } .footer__copy { grid-column: 1 / -1; } }

/* ---------- barra de pedido (móvil y tablet) ---------- */
.orderbar {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  display: flex; gap: 8px;
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: rgba(28, 22, 18, .96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 -8px 24px -12px rgba(0,0,0,.5);
}
.orderbar a {
  display: grid; place-items: center; min-height: 52px; min-width: 56px;
  border-radius: 14px; text-decoration: none; color: #fff; background: rgba(255,255,255,.1);
  -webkit-tap-highlight-color: transparent;
}
.orderbar a svg { width: 24px; height: 24px; }
.orderbar__main { flex: 1; background: var(--orange) !important; font-weight: 700; font-size: 1.05rem; }
@media (min-width: 960px) { .orderbar { display: none; } }

/* ---------- accesibilidad y casos especiales ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* teléfonos muy chicos (iPhone SE 1ª gen, Android básicos) */
@media (max-width: 360px) {
  .brand__name { font-size: 1rem; }
  .item { grid-template-columns: 56px 1fr; }
  .item img, .item__ph { width: 56px; height: 56px; }
  .item__price { grid-column: 2; }
  .hero h1 .hl { white-space: normal; }
}
/* teléfono acostado: hero más compacto */
@media (max-height: 500px) and (orientation: landscape) {
  .hero__media { max-width: 360px; }
}
/* navegadores sin aspect-ratio (Safari < 15) */
@supports not (aspect-ratio: 1 / 1) {
  .hero__media { height: 90vw; max-height: 560px; }
  .ig a { height: 0; padding-bottom: 100%; position: relative; }
  .ig img { position: absolute; inset: 0; }
}
@media print {
  .header, .orderbar, .marquee, .visit__map, .nav-toggle { display: none !important; }
  body { padding: 0; }
}
