/* ─────────────────────────────────────────────────────────────
 * Carta · Terra Meiga · estilos
 * Tema oscuro atmosférico, acento cobre, totalmente responsive.
 * ───────────────────────────────────────────────────────────── */

:root {
  --bg:          #0c0a07;
  --bg-up:       #141110;
  --bg-card:     #1c1815;
  --bg-elev:     #221d17;

  --copper:       #c46a32;
  --copper-light: #e08750;
  --copper-deep:  #8a4019;
  --copper-glow:  rgba(196, 106, 50, 0.18);

  --ink:        #ede2c4;
  --ink-soft:   rgba(237, 226, 196, 0.78);
  --ink-mute:   rgba(237, 226, 196, 0.55);
  --ink-faint:  rgba(237, 226, 196, 0.32);

  --rule:        rgba(196, 106, 50, 0.22);
  --rule-faint:  rgba(237, 226, 196, 0.08);

  --font-serif: 'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --content-max: 1180px;
  --gutter:      clamp(20px, 4vw, 56px);
  --section-gap: clamp(56px, 8vw, 110px);

  --nav-h: 60px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle film grain on the entire page — adds warmth and texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScyODAnIGhlaWdodD0nMjgwJz48ZmlsdGVyIGlkPSduJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC44NScgbnVtT2N0YXZlcz0nMicgc3RpdGNoVGlsZXM9J3N0aXRjaCcvPjxmZUNvbG9yTWF0cml4IHZhbHVlcz0nMCAwIDAgMCAwLjkgMCAwIDAgMCAwLjg1IDAgMCAwIDAgMC43NSAwIDAgMCAwLjA2IDAnLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0nMTAwJScgaGVpZ2h0PScxMDAlJyBmaWx0ZXI9J3VybCgjbiknLz48L3N2Zz4=");
  mix-blend-mode: overlay;
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─────────────────────────────────────────────────────────────
 * HERO
 * ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 80px var(--gutter) 60px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(80% 60% at 50% 25%, rgba(196,106,50,0.10) 0%, transparent 60%),
    radial-gradient(140% 90% at 50% 0%, #1d1a14 0%, #0a0907 65%, #060403 100%);
}

/* Modo embebido: cuando la carta se sirve dentro de un iframe
   (p.ej. en una página de WordPress), el hero a pantalla completa
   obliga al usuario a hacer scroll antes de ver el primer plato.
   En ese contexto reducimos el hero a una franja compacta. */
body.embedded .hero {
  min-height: 0;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 72px);
}
body.embedded .hero-logo {
  width: min(60vw, 360px);
}
body.embedded .hero-scroll {
  display: none;
}
body.embedded .menu {
  padding-top: clamp(40px, 6vw, 72px);
}

.hero-stars {
  position: absolute; inset: 0; z-index: -1;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0MDAnIGhlaWdodD0nNDAwJz48ZyBmaWxsPScjZWRlMmM0JyBvcGFjaXR5PScwLjY1Jz48Y2lyY2xlIGN4PSc0MCcgY3k9JzUyJyByPScwLjYnLz48Y2lyY2xlIGN4PScxOTgnIGN5PSczNCcgcj0nMC44NScvPjxjaXJjbGUgY3g9JzI4MicgY3k9JzExMCcgcj0nMC40NScvPjxjaXJjbGUgY3g9Jzk2JyBjeT0nMTQ4JyByPScwLjcnLz48Y2lyY2xlIGN4PScyNTInIGN5PScyMjAnIHI9JzAuNTUnLz48Y2lyY2xlIGN4PSc0NCcgY3k9JzI1MCcgcj0nMC45NScvPjxjaXJjbGUgY3g9JzE3OCcgY3k9JzI5OCcgcj0nMC40NScvPjxjaXJjbGUgY3g9JzMwNicgY3k9JzI3MCcgcj0nMC41NScvPjxjaXJjbGUgY3g9JzEyOCcgY3k9JzcyJyByPScwLjM4Jy8+PGNpcmNsZSBjeD0nMTU4JyBjeT0nMjAwJyByPScwLjQyJy8+PGNpcmNsZSBjeD0nMzUwJyBjeT0nMTgwJyByPScwLjYnLz48Y2lyY2xlIGN4PSczNzAnIGN5PSczNDAnIHI9JzAuNCcvPjxjaXJjbGUgY3g9JzIyMCcgY3k9JzM3MCcgcj0nMC41Jy8+PC9nPjwvc3ZnPg==");
  background-size: 400px 400px;
  opacity: 0.55;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 880px;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 28px;
  opacity: 0;
  animation: fadeUp 1.1s 0.1s ease-out forwards;
}

.hero-logo {
  margin: 0 auto;
  width: min(78vw, 540px);
  height: auto;
  filter: drop-shadow(0 0 36px rgba(196, 106, 50, 0.35));
  opacity: 0;
  animation: fadeUp 1.3s 0.25s ease-out forwards;
}

.hero-tagline {
  margin: 32px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-wrap: balance;
  opacity: 0;
  animation: fadeUp 1.1s 0.55s ease-out forwards;
}

.hero-meta {
  margin: 28px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
  opacity: 0;
  animation: fadeUp 1.1s 0.8s ease-out forwards;
}
.hero-meta .dot {
  width: 4px; height: 4px; border-radius: 50%; background: var(--copper);
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 1.1s 1s ease-out forwards;
}
.hero-scroll::after {
  content: '';
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--copper), transparent);
  animation: pulseDown 2.4s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseDown {
  0%,100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50%     { transform: scaleY(1);   opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────
 * NAV — sticky, appears after scrolling past hero
 * ───────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 10, 7, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-faint);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-brand {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
}
.nav-brand img { height: 28px; width: auto; }
.nav-brand span { display: none; }
@media (min-width: 720px) {
  .nav-brand span { display: inline; }
}

.nav-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 4px;
  scroll-padding: 24px;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--copper);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 12px; right: 12px;
  height: 1px;
  background: var(--copper);
}

.nav-filter {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  transition: all 0.15s;
}
.nav-filter:hover, .nav-filter.active {
  border-color: var(--copper);
  color: var(--copper);
}

/* Selector de idioma — segmentado ES · EN */
.lang-switch {
  flex-shrink: 0;
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}
.lang-opt {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0 11px;
  height: 34px;
  min-width: 38px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  transition: color 0.15s, background 0.15s;
}
.lang-opt + .lang-opt { border-left: 1px solid var(--rule); }
.lang-opt:hover { color: var(--ink); }
.lang-opt.active {
  background: var(--copper);
  color: #fff8e6;
}
@media (max-width: 600px) {
  .lang-opt { padding: 0 9px; min-width: 34px; height: 32px; }
}

/* ─────────────────────────────────────────────────────────────
 * FILTER BAR — slides in below nav when toggled
 * ───────────────────────────────────────────────────────────── */

.filter-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 49;
  background: var(--bg-up);
  border-bottom: 1px solid var(--rule-faint);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.filter-bar.open {
  max-height: 200px;
  padding: 14px 0;
}
.filter-bar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.filter-bar-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: 4px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.filter-chip:hover { color: var(--ink); border-color: var(--copper-light); }
.filter-chip.active {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff8e6;
}
.filter-bar-clear {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 6px;
}
.filter-bar-clear:hover { color: var(--copper); }

/* ─────────────────────────────────────────────────────────────
 * MAIN MENU
 * ───────────────────────────────────────────────────────────── */

.menu {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-gap) var(--gutter) 80px;
  position: relative;
  z-index: 2;
}

.section {
  scroll-margin-top: calc(var(--nav-h) + 24px);
  margin-bottom: var(--section-gap);
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 24px;
  align-items: baseline;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.section-ordinal {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(72px, 12vw, 132px);
  line-height: 0.78;
  color: var(--copper);
  letter-spacing: -0.04em;
  grid-row: 1 / span 2;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.section-meta {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.section-note {
  grid-column: 2;
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-soft);
  text-wrap: pretty;
  max-width: 64ch;
}

/* item grid */

.items {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 56px;
}

@media (min-width: 720px) {
  .section[data-cols="2"] .items,
  .section[data-cols="3"] .items {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .section[data-cols="3"] .items {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* item */

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-faint);
  align-items: baseline;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.item > div:first-child { min-width: 0; }

.item.dim {
  opacity: 0.18;
  filter: saturate(0.4);
}

.item-name {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.item-al {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--copper);
  vertical-align: 1px;
  white-space: nowrap;
}

.item-desc {
  grid-column: 1 / -1;
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
  text-wrap: pretty;
  max-width: 56ch;
}

.item-extra {
  display: inline-block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  font-style: normal;
}

.item-price {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--copper);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.item-price.mp {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* chuletones featured block */

.chuletones {
  grid-column: 1 / -1;
  background:
    linear-gradient(180deg, rgba(196,106,50,0.06), rgba(196,106,50,0.02));
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px clamp(20px, 3vw, 32px) 18px;
  margin-bottom: 28px;
  position: relative;
}
.chuletones-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chuletones-label::before, .chuletones-label::after {
  content: '';
  height: 1px;
  background: var(--rule);
}
.chuletones-label::after { flex: 1; }
.chuletones-items {
  list-style: none; padding: 0; margin: 0;
}
.chuletones-items .item {
  border-bottom-color: rgba(196,106,50,0.12);
}
.chuletones-items .item:last-child { border-bottom: 0; }

/* ─────────────────────────────────────────────────────────────
 * FOOTER — notes + allergens
 * ───────────────────────────────────────────────────────────── */

.foot {
  background: var(--bg-up);
  border-top: 1px solid var(--rule-faint);
  padding: 60px var(--gutter) 40px;
  position: relative;
  z-index: 2;
}
.foot-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.foot-notes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 36px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}
@media (min-width: 720px) {
  .foot-notes { grid-template-columns: 1fr 1fr; gap: 16px 56px; }
}
.foot-notes p { margin: 0; max-width: 52ch; }
.foot-notes p::before {
  content: '·';
  color: var(--copper);
  margin-right: 8px;
  font-weight: bold;
}

.foot-allergens {
  border-top: 1px solid var(--rule-faint);
  padding-top: 28px;
}
.foot-allergens-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 14px;
}
.foot-allergens-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 24px;
  font-size: 12.5px;
  color: var(--ink-mute);
}
@media (min-width: 720px) { .foot-allergens-list { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .foot-allergens-list { grid-template-columns: repeat(7, 1fr); } }
.foot-allergens-list li {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-sans);
}
.foot-allergens-list li .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--copper);
  min-width: 1.5em;
}

.foot-meta {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-faint);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ─────────────────────────────────────────────────────────────
 * Animation — first section gets a soft entrance; others stay visible.
 * Triggered by adding `.is-in` via JS (so no-JS pages stay readable).
 * ───────────────────────────────────────────────────────────── */

.reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.pending {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────
 * Responsive tweaks
 * ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .section-ordinal {
    grid-row: auto;
    font-size: 64px;
    line-height: 0.9;
    margin-bottom: -8px;
  }
  .section-note { grid-column: 1; }
  .nav-inner { gap: 12px; }
  .item { padding: 12px 0; }
  .item-name { font-size: 16.5px; }
  .menu { padding-top: clamp(48px, 10vw, 80px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}
