/* MENVA — home (owned by one helper in the "wave" build; see the plan)
   Header pill, the customer-only home page rhythm, the uniform restaurant card, the share band, footer link.
   Loaded after style.css and hero.css, so equal-specificity rules here win. Animate transform/opacity only. */

/* ═══ Header: "For restaurants" pill (every page) ═══
   MENVA pages: accent outline. A restaurant's own page (body[data-theme] is that restaurant): a neutral
   ink outline, so the pill never fights the restaurant's accent. */
.topbar nav { gap: 12px; }
.topbar-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--ease-fast), transform var(--dur-fast) var(--ease-out);
}
.topbar-pill:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.topbar-pill:active { transform: scale(0.97); }
body:not([data-theme="default"]) .topbar-pill {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}
body:not([data-theme="default"]) .topbar-pill:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
@media (max-width: 400px) {
  .topbar-pill { padding: 0 14px; }
  .topbar nav { gap: 8px; }
}

/* ═══ Home: one rhythm ═══
   Every section is spaced by --home-gap, and starts with the same eyebrow + serif heading. */
.home {
  --home-gap: var(--space-16);
  max-width: 1120px; /* matches the header and footer, so the edges line up */
  padding-bottom: var(--home-gap);
}
@media (min-width: 860px) { .home { --home-gap: var(--space-20); } }
.home > section + section { margin-top: var(--home-gap); }

/* The hero loses its proof row (that moved to /for-restaurants): drop that grid area and the
   padding the next section's gap now replaces. */
.home-hero { grid-template-areas: "copy" "stage" "beats"; padding-bottom: 0; }
@media (min-width: 860px) {
  .home-hero {
    grid-template-areas:
      "copy stage"
      "beats stage";
    padding-bottom: 0;
  }
}

.home h2 {
  font-size: var(--text-2xl);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.home-menus-head { margin-bottom: var(--space-6); }
.home-menus-head .overline,
.share-copy .overline { display: block; margin-bottom: var(--space-2); }
.home-menus { scroll-margin-top: var(--space-4); }
.home-menus h2:focus { outline: none; }

/* ═══ Restaurant cards: one design for all ═══ */
.menu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}
@media (min-width: 860px) {
  .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
}

.menu-card {
  position: relative; /* the "Explore menu" link stretches over the whole card */
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
}
.menu-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.menu-card:focus-within { border-color: var(--accent); }

/* A card nested in the MENVA page keeps its own restaurant tokens in light mode (tokens.css), but its
   [data-theme="gauchos"] block would also beat the inherited dark tokens: restate the dark values. */
html[data-mode="dark"] .menu-card[data-theme="gauchos"] {
  --paper: #17140F; --surface: #1D1A14; --surface-2: #241F18; --line: #352E24;
  --ink: #F1EAE0; --muted: #B4A896; --stage: #1D1A14;
}

/* Brand zone: tinted by the restaurant's own tokens; grows so the dish photos line up across cards */
.menu-card-brand {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface-2);
  border-radius: var(--radius);
}
.menu-card-title { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; font-family: var(--font-display); font-weight: 400; }
.menu-card-name { font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.1; }
.menu-card-logo { display: block; height: auto; flex: none; }
.menu-card-logo--round { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.menu-card-logo--wide { width: min(100%, 168px); }
.menu-card-logo--haute-dolci { width: min(100%, 250px); } /* a long, thin wordmark */
html[data-mode="dark"] .menu-card-logo--wide { filter: brightness(0) invert(0.93); } /* dark-ink mark → one flat light colour on the dark card */
.menu-card-quote { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.25; color: var(--ink); max-width: 28ch; }
.menu-card-where {
  margin-top: auto;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-card-dishes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-card-dishes li { position: relative; z-index: 1; min-width: 0; } /* above the stretched card link */
.menu-card-dishes a {
  display: block;
  min-height: 44px;
  border-radius: var(--radius-sm);
  transition: transform 120ms var(--ease-out);
}
.menu-card-dishes a:active { transform: scale(0.97); }
.menu-card-photo {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--stage) center / cover no-repeat;
  transition: transform var(--dur-fast) var(--ease-out);
}
.menu-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.menu-card-dishes a:hover img { transform: scale(1.04); }
@media (hover: hover) and (pointer: fine) {
  .menu-card-photo { transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); }
}
.menu-card-dish {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
  min-height: 2.6em; /* two lines, so every card's photo row and brand zone line up */
  font-size: var(--text-xs);
  line-height: 1.3;
  color: var(--ink);
}

/* "Explore menu": the quiet text link; its ::after is the whole-card tap target */
.menu-card-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
}
.menu-card-more svg { width: 18px; height: 18px; flex: none; transition: transform var(--ease-fast); }
.menu-card:hover .menu-card-more svg { transform: translateX(3px); }
.menu-card-more::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.menu-card-more:focus-visible { outline: none; }
.menu-card-more:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-lg); }

/* ═══ Share moment: a slim band with a Table Card miniature ═══ */
.share-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-6);
  padding: 0 var(--space-6) 0 var(--space-6);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.share-copy { padding: var(--space-6) 0; max-width: 34ch; }
.share-copy p:not(.overline) { margin-top: var(--space-2); font-size: var(--text-sm); line-height: 1.55; color: var(--muted); }
@media (min-width: 860px) {
  .share-band { grid-template-columns: auto auto; justify-content: center; gap: var(--space-16); }
}

/* The miniature: a 9:16 Table Card in Haute Dolci's own tokens (its blush band / after-hours plum),
   the card's top part shown and the rest cropped by the band, like a card peeking out of a pocket. */
.tc {
  --tc-w: 150px;
  width: var(--tc-w);
  aspect-ratio: 9 / 16;
  margin: var(--space-6) 0 calc(var(--space-12) * -1);
  display: flex;
  flex-direction: column;
  padding: 10px 10px 0;
  background: var(--brand-band, var(--surface-2));
  color: var(--brand-band-ink, var(--ink));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-display);
}
@media (min-width: 860px) { .tc { --tc-w: 160px; } }
.tc-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tc-logo { width: 78%; height: auto; }
html[data-mode="dark"] .tc-logo { filter: brightness(0) invert(0.93); }
.tc-pill {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tc-line { margin-top: 12px; font-size: 21px; font-weight: 300; line-height: 1.02; letter-spacing: -0.02em; }
.tc-line em { font-style: normal; font-weight: 500; color: var(--accent); }
.tc-dish { width: 122%; max-width: none; height: auto; margin: 4px 0 0 -11%; }
.tc-name { margin-top: 2px; font-size: 10px; font-weight: 500; }
.tc-stub {
  display: flex;
  justify-content: space-between;
  margin: auto -10px 0;
  padding: 7px 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ═══ Footer link ═══ */
.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}
.footer-link:hover { text-decoration-color: var(--accent); }
@media (max-width: 768px) {
  footer { row-gap: 0; }
}

/* ═══ Arrival: fade + rise, once (js/app.js initMotion adds .is-in). Content is visible without JS. ═══ */
html.js-motion .home-menus-head,
html.js-motion .menu-card,
html.js-motion .share-band {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), border-color var(--ease-fast), box-shadow var(--ease-fast);
  transition-delay: calc(var(--i, 0) * 60ms), calc(var(--i, 0) * 60ms), 0s, 0s;
}
html.js-motion .home-menus-head.is-in,
html.js-motion .menu-card.is-in,
html.js-motion .share-band.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .menu-card-photo, .menu-card-photo img, .menu-card-more svg, .menu-card-dishes a, .topbar-pill { transition: none !important; transform: none !important; }
}
