/* La carta: the restaurant menu page. Builds on styles.css (tokens, header, pills, note, footer). */

html.carta { scroll-padding-top: 8.5rem; }
.carta body { background: var(--hueso); }

/* ---------- Hero on café ---------- */

.c-hero {
  position: relative;
  overflow: hidden;
  background: var(--cafe);
  color: var(--hueso);
  padding: calc(var(--top-h) + clamp(2rem, 6vw, 3.5rem)) var(--gutter) clamp(3rem, 8vw, 5rem);
}
.c-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 6vw, 3rem);
  justify-items: center;
  max-width: 74rem;
  margin-inline: auto;
  text-align: center;
}
.c-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--arena);
  font-size: var(--step--1);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: var(--palma);
  text-underline-offset: 0.4em;
}
.c-back:hover { color: var(--hueso); }
.c-hero__title {
  font-size: min(6rem, calc((100vw - 2 * var(--gutter)) / (9 * var(--adv))));
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}
.c-hero__line { margin-top: 1rem; font-size: var(--step-1); font-weight: 400; color: var(--hueso); }
.c-hero__note { margin: 1rem auto 0; max-width: 34ch; color: var(--arena); font-size: var(--step--1); line-height: 1.6; }
.c-hero__photo {
  width: min(78vw, 22rem);
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border-radius: 50% 50% 1.25rem 1.25rem / 37.5% 37.5% 1.25rem 1.25rem;
  background: var(--cafe-deep);
  box-shadow: 0 30px 60px -30px rgba(20, 10, 4, 0.75);
}
.c-hero__photo img { width: 100%; height: 100%; object-fit: cover; animation: drift 18s ease-in-out infinite alternate; }
.palm--c-hero { right: -14vw; bottom: -6svh; height: min(70svh, 36rem); opacity: 0.22; }

/* ---------- Section links: one row that scrolls sideways on phones ---------- */

.c-nav {
  position: sticky;
  top: var(--top-h);
  z-index: 40;
  background: var(--hueso);
  box-shadow: 0 1px 0 var(--line-light);
}
.c-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0 auto;
  padding: 0.55rem var(--gutter);
  max-width: 74rem;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.c-nav ul::-webkit-scrollbar { display: none; }
.c-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--tierra-ink);
  font-size: var(--step--1);
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.c-nav a:hover { color: var(--cafe); }
.c-nav a.is-active { background: var(--crema); color: var(--cafe); font-weight: 500; }

/* ---------- Sections ---------- */

.c-sec {
  position: relative;
  display: grid;
  gap: clamp(2rem, 6vw, 3.5rem);
  max-width: 74rem;
  margin-inline: auto;
  padding: clamp(3.5rem, 9vw, 6rem) var(--gutter);
  color: var(--cafe);
}
.c-sec + .c-sec:not(.c-sec--cafe):not(.c-sec--note) { border-top: 1px solid var(--line-light); }
.c-sec__body--narrow { max-width: 40rem; }

.c-sec--cafe {
  max-width: none;
  background: var(--cafe);
  color: var(--hueso);
  padding-inline: max(var(--gutter), calc((100vw - 74rem) / 2));
}
.c-sec--note { display: grid; place-items: center; }

.c-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.c-head__title {
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.c-head--sub { margin-top: clamp(2.25rem, 6vw, 3rem); }
.c-head--sub .c-head__title { font-size: var(--step-2); }
.c-head__price {
  font-size: var(--step-2);
  font-weight: 500;
  color: var(--tierra);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.c-head__price small { font-size: var(--step--1); font-weight: 400; margin-right: 0.3em; }
.c-lead { margin-top: 1rem; max-width: 44ch; color: var(--tierra-ink); font-size: var(--step-1); font-weight: 300; line-height: 1.55; }

/* Proteins and kids' dishes: options, not priced rows */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  background: var(--crema);
  color: var(--cafe);
  font-size: var(--step-0);
  font-weight: 400;
}

/* Priced rows: name, a dotted leader, the price */
.menu { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.menu li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-light);
}
.menu li:first-child { border-top: 1px solid var(--line-light); }
.menu__name {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: var(--step-1);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.menu__name small { font-size: var(--step--1); font-weight: 300; color: var(--tierra-ink); letter-spacing: 0; }
.menu__name em {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  background: var(--crema);
  color: var(--tierra-ink);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.menu__price {
  flex: none;
  font-size: var(--step-1);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--tierra);
}

.c-sec--cafe .menu li, .c-sec--cafe .menu li:first-child { border-color: var(--line-dark); }
.c-sec--cafe .menu__name small { color: var(--arena); }
.c-sec--cafe .menu__price { color: var(--palma); }

/* Photos: rounded frames with the page's soft shadow */
.c-photos { display: grid; gap: 1rem; align-content: start; }
.c-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--crema);
  box-shadow: 0 26px 50px -30px rgba(59, 33, 20, 0.55);
}
.c-photo img { width: 100%; height: 100%; object-fit: cover; }
.c-photo--tall { aspect-ratio: 4 / 5; }
.c-photo--wide { aspect-ratio: 4 / 3; }
.c-photo:not(.c-photo--tall):not(.c-photo--wide) { aspect-ratio: 1; }
.c-photo figcaption {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.4em 0.85em;
  border-radius: 999px;
  background: rgba(249, 241, 232, 0.92);
  color: var(--cafe);
  font-size: 0.8125rem;
  font-weight: 500;
}

.note--picada { width: min(100%, 40rem); }
.note--picada .c-head { margin-top: clamp(1.4rem, 4vw, 1.9rem); }
.note--picada .c-lead { color: var(--tierra-ink); }

/* Gentle arrival for photos and the note; content is visible without it */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity 0.8s var(--ease-out), translate 0.9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; translate: 0 0; }

.c-foot-logo { display: block; width: min(80vw, 30rem); }
.c-foot-logo img { width: 100%; height: auto; }

/* ---------- Larger screens ---------- */

@media (min-width: 48rem) {
  .c-hero__inner { grid-template-columns: 1.1fr 0.9fr; justify-items: start; align-items: center; text-align: left; }
  .c-hero__title { font-size: min(6rem, 8.5vw); }
  .c-hero__note { margin-inline: 0; }
  .c-hero__photo { justify-self: center; width: min(32vw, 24rem); }
  .c-sec--split { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .c-sec--flip > .c-photos { order: -1; }
  .c-sec--flip { grid-template-columns: 0.85fr 1.15fr; }
  .c-sec--pair { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
  .menu--two { columns: 2; column-gap: 2.5rem; }
  .menu--two li { break-inside: avoid; }
  .menu--two li:first-child { border-top: 0; }
  .menu--two { border-top: 1px solid var(--line-light); }
  .c-photos { position: sticky; top: calc(var(--top-h) + 5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: 0 0; }
}

@media (min-width: 48rem) {
  .carta .foot__facts { grid-template-columns: repeat(3, 1fr); }
}
