/* ============================================
   LA CARTE — RECIPE HUB
   ============================================ */

body.hub-page .cover-hero-snap + .hub-inner > .carte__course:first-child {
  padding-top: clamp(2.5rem, 4vw, 4rem);
}

/* On small screens, the photo comes before the menu. */
.carte__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.carte__menu {
  order: 2;
  width: min(100%, 32rem);
  text-align: center;
}

/*
  The dish photo as a framed print: a quiet raised-stone mat lifted off
  the ground by a two-layer shadow (contact + ambient, like the content
  cards). No coloured frame — on this dark ground the silhouette comes
  from the mat step and the shadow, finished by a barely-there cream
  edge (the same quiet hairline the nav border uses). Hovering or
  focusing a dish only brightens that edge and settles the shadow a
  little deeper; the photo swap itself is the feedback.
  Widths include the frame, so the print stays at or below the 400px
  thumbnails' native resolution.
*/
.carte__preview {
  order: 1;
  width: min(100%, 16.5rem);
  padding: 0.75rem;
  background: var(--bg-raised);
  border: 1px solid rgba(236, 228, 212, 0.1);
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(236, 228, 212, 0.12),
    0 3px 8px rgba(0, 0, 0, 0.28),
    0 16px 32px rgba(0, 0, 0, 0.22);
  transition:
    border-color 260ms ease,
    box-shadow 260ms ease;
}

.carte__layout:has(.carte__dish:hover, .carte__dish:focus-visible) .carte__preview {
  border-color: rgba(236, 228, 212, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(236, 228, 212, 0.16),
    0 4px 10px rgba(0, 0, 0, 0.3),
    0 20px 40px rgba(0, 0, 0, 0.26);
}

/* A more relaxed menu heading, while keeping Palatino. */
body.hub-page .carte__course .hub-section__header h2 {
  font-variant: normal;
  font-style: italic;
  letter-spacing: 0.08em;
}

.carte__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.carte__list li {
  margin: 1.2rem 0;
}

/* The link fits the text instead of filling the whole menu row. */
.carte__dish {
  display: inline-flex;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  padding: 0;
  color: var(--text);
  line-height: 1.4;
}

.carte__dish:hover,
.carte__dish:focus-visible {
  color: var(--text);
}

.carte__dish-name,
.carte__dish-desc {
  display: block;
  max-width: 100%;
}

.carte__dish-name {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  letter-spacing: 0.06em;
}

.carte__dish:hover .carte__dish-name,
.carte__dish:focus-visible .carte__dish-name {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.carte__dish-desc {
  margin-top: 0.15rem;
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

/* The photo itself: square crop, corners eased to nest inside the mat. */
.carte__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
}

@media (min-width: 1001px) {
  .carte__layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .carte__menu {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  /*
    Sticky within this course's layout: once the course ends,
    the photo leaves with it. Two thirds of the former size, so the
    print renders at or below the 400px thumbs' native width.
  */
  .carte__preview {
    position: sticky;
    top: clamp(5.5rem, 12vh, 8rem);
    grid-column: 2;
    grid-row: 1;
    width: min(100%, 20.5rem, 41vh);
    justify-self: center;
  }

  .carte__menu:only-child {
    grid-column: 1 / -1;
  }
}

/* Reverse the columns for every second course on desktop. */
@media (min-width: 1001px) {
  .carte__course:nth-of-type(even) .carte__menu:not(:only-child) {
    grid-column: 2;
  }

  .carte__course:nth-of-type(even) .carte__preview {
    grid-column: 1;
  }
}
