/* Shared homepage foundation, section layout and responsive overrides.
   Preserve cascade order when editing: later rules refine the saved design. */
:root {
  --paper: #eee8dc;
  --ink: #262820;
  --muted: #66685c;
  --gold: #e8c65a;
  --rule: #d5d2c7;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}
body {
  background: var(--paper);
}
.home-content {
  color: var(--ink);
  font-family: Arial, sans-serif;
}
.home-content * {
  box-sizing: border-box;
}
.home-content [hidden] {
  display: none !important;
}
.home-content button,
.home-content input {
  font: inherit;
}
.home-content button {
  cursor: pointer;
}
.home-content button:focus-visible,
.home-content a:focus-visible,
.home-content input:focus-visible,
.home-content canvas:focus-visible {
  outline: 3px solid #947327;
  outline-offset: 5px;
}
.home-content a {
  color: inherit;
}
.home-content h2,
.home-content h3,
.home-content p,
.home-content figure {
  margin: 0;
}
.home-content h2 {
  font-size: clamp(38px, 5.2vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 500;
  text-wrap: balance;
}
.home-content h3 {
  font-size: clamp(25px, 2.6vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}
.home-content p {
  line-height: 1.65;
}
.home-shell {
  width: min(1280px, 88%);
  margin-inline: auto;
}
.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 15px 24px;
  gap: 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper) !important;
  text-decoration: none;
  font-weight: 500;
  border-radius: 3px;
  transition:
    background 0.2s,
    color 0.2s;
}
.home-button:hover {
  background: #424638;
}
.home-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ribbon-transition {
  position: relative;
  margin-top: -69px;
  overflow: hidden;
  pointer-events: none;
}
.text-loop {
  pointer-events: auto;
}
.text-loop svg {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
}
#original-menu {
  display: block;
  width: 100%;
  height: 650px;
  border: 0;
  background: var(--paper);
  color-scheme: light;
}

.skip-home {
  position: absolute;
  left: 20px;
  top: 12px;
  z-index: 20;
  padding: 12px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-150%);
}
.skip-home:focus {
  transform: none;
}
@media (min-width: 1500px) {
  .text-loop {
    height: 160px;
  }
  .ribbon-transition {
    margin-top: -80px;
  }
}
@media (max-width: 900px) {
  .home-shell {
    width: 88%;
  }
}
@media (max-width: 600px) {
  .home-shell {
    width: calc(100% - 40px);
  }
  .home-content h2 {
    font-size: 43px;
  }
  .text-loop {
    height: 112px;
    min-width: 760px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
  .ribbon-transition {
    margin-top: -56px;
    padding-bottom: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .home-content *,
  .home-content *::before,
  .home-content *::after {
    transition: none !important;
    animation: none !important;
  }
}
/* Keep the saved desktop artwork layout, fit its canvas to a phone. */
@container (max-width:600px) {
  .stage .brand {
    width: min(340px, 100%);
  }
  .stage .brand img {
    width: 100% !important;
    height: auto !important;
    translate: 0 16px !important;
  }
  .stage h1 {
    height: auto !important;
  }
}
html[data-reduce-motion] {
  scroll-behavior: auto;
}
html[data-reduce-motion] .home-content * {
  transition: none !important;
  animation: none !important;
}

/* Embedded menu frame: the responsive chapter rules below refine its size. */
@media (max-width: 700px) {
  .original-menu-frame {
    margin-inline: -12px;
  }
  #original-menu {
    height: 990px;
  }
}

@container (min-width:601px) and (max-width:900px) {
  .stage .brand {
    width: 310px;
  }
  .stage .brand img {
    width: 310px !important;
    height: auto !important;
    translate: 0 33px !important;
  }
  .stage .site-header nav {
    gap: 24px;
  }
  .stage .site-header nav a {
    font-size: 15px;
  }
}
/* The Hero is a complete first screen. The wave belongs to the next section. */
.ribbon-transition {
  margin: 0;
  padding: 0 0 20px;
  overflow-x: clip;
  overflow-y: visible;
  z-index: 1;
}
.text-loop {
  width: 100%;
  min-width: 0;
  height: 160px;
  position: relative;
  left: auto;
  transform: none;
}
.text-loop svg {
  overflow: visible;
}
.original-menu-chapter {
  width: 100%;
  height: 100svh;
  min-height: 720px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #eee8dc;
  padding: 30px clamp(20px, 3vw, 64px) 22px;
  scroll-margin-top: -28px;
}
.book-chapter-heading {
  position: relative;
  top: clamp(8px, 1vw, 20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.book-chapter-heading h2 {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.04em;
}
.original-menu-frame {
  position: relative;
  top: clamp(-12px, -0.6vw, -6px);
  min-width: 0;
  min-height: 0;
  margin: 10px 0 0;
}
.original-menu-frame #original-menu {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: transparent;
}
@media (max-width: 1000px) {
  .original-menu-chapter {
    padding-inline: 24px;
  }
}
@media (max-width: 700px) {
  :root {
    --mobile-section-gap: 112px;
  }
  .ribbon-transition {
    margin: 0;
    padding: 0 0 10px;
  }
  .text-loop {
    height: 140px;
    min-width: 0;
    left: auto;
    transform: none;
  }
  .original-menu-chapter {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto;
    padding: 0 16px;
  }
  .original-menu-frame {
    top: 0;
    height: calc((100vw - 32px) * 0.75 + 32px);
    margin-top: 24px;
  }
  .book-chapter-heading {
    top: 0;
    gap: 18px;
  }
  .book-chapter-heading h2 {
    font-size: 28px;
    max-width: 300px;
  }
}

/* The media ends beneath the deepest inward curve. Clip the source video's
   narrow letterbox bars inside this layer, without cropping Hero content. */
.stage {
  overflow: visible;
}
.stage > .hero-media {
  position: absolute;
  inset: 0 0 auto;
  height: calc(100% + var(--hero-wave-depth, 80px));
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
}
.stage > .hero-media > video {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  transform: scale(1.03);
  transform-origin: center;
}
.stage > .shade {
  height: calc(100% + var(--hero-wave-depth, 80px));
}

/* Selection introduction and specialty menu. */
.book-chapter-heading .book-chapter-intro {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 660px;
  margin-top: 10px;
}
@media (max-width: 700px) {
  .book-chapter-heading .book-chapter-intro {
    font-size: 12px;
    max-width: 440px;
  }
  .book-chapter-heading {
    align-items: flex-start;
  }
}

/* Match the curved transition to the guide and specialty showcase below it. */
.ribbon-transition {
  --paper: #eee8dc;
  padding-bottom: 0;
}

/* A compact guide introduces the full selection before the specialty book. */
.book-chapter-heading > div:first-child {
  min-width: 0;
  flex: 1;
}
/* Give each section one explicit gap, without stacking adjacent padding. */
.selection-bridge {
  background: #eee8dc;
  color: var(--ink);
  padding-block: 147px 116px;
  scroll-margin-top: -28px;
}
.dish-gallery {
  --gallery-height: clamp(400px, 42vw, 600px);
  width: 100%;
  position: relative;
  isolation: isolate;
  overflow: visible;
}
.dish-gallery-mount {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  overflow: visible;
}
.dish-gallery-fallback {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--gallery-height) * 0.12071);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: calc(var(--gallery-height) * 0.2)
    max(20px, calc((100% - var(--gallery-height) * 0.466667) / 2)) 30px;
  height: 100%;
  scrollbar-width: thin;
}
.dish-gallery-fallback figure {
  flex: 0 0 calc(var(--gallery-height) * 0.466667);
  scroll-snap-align: center;
}
.dish-gallery-fallback img {
  display: block;
  width: 100%;
  aspect-ratio: 7/9;
  object-fit: cover;
  border-radius: 14px;
}
.dish-gallery[data-gallery-ready] .dish-gallery-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.dish-gallery:not([data-gallery-ready]) .dish-gallery-mount {
  pointer-events: none;
}
.selection-invitation {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 12px;
}
.selection-invitation h2 {
  font-size: clamp(34px, 4vw, 58px);
  letter-spacing: -0.045em;
  line-height: 1.12;
}
.selection-invitation > p {
  max-width: 520px;
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: balance;
}
.selection-invitation .home-button {
  min-width: 218px;
  margin-top: 27px;
  min-height: 54px;
  padding: 14px 26px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 4px;
}
.specialty-scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 30px;
  text-decoration: none;
  font-size: 13px;
  color: var(--muted) !important;
}
.specialty-scroll-link:hover {
  color: var(--ink) !important;
}
.specialty-scroll-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}
.specialty-scroll-link:hover svg {
  transform: translateY(3px);
}
@media (max-width: 700px) {
  .book-chapter-heading {
    display: block;
  }
  .selection-bridge {
    padding-block: 168px calc(var(--mobile-section-gap) * 1.75);
  }
  .dish-gallery {
    --gallery-height: clamp(160px, 44vw, 240px);
  }
  .dish-gallery-fallback {
    gap: 12px;
    padding-inline: 16px;
  }
  .dish-gallery:not([data-gallery-ready]) {
    height: calc(var(--gallery-height) + 64px);
  }
  .selection-invitation {
    margin-top: 4px;
  }
  .selection-invitation h2 {
    font-size: 34px;
  }
  .selection-invitation > p {
    font-size: 15px;
    max-width: 340px;
    margin-top: 15px;
  }
  .selection-invitation .home-button {
    margin-top: 24px;
  }
  .specialty-scroll-link {
    margin-top: 22px;
    font-size: 12px;
    gap: 8px;
  }
}

/* Rotating tabletop: an actual annulus, rather than a distorted card carousel. */
.dish-gallery {
  height: var(--table-height, 480px);
  min-height: 0;
}
.dish-gallery-mount {
  height: 100%;
}
.rotating-table {
  position: relative;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.dish-gallery[data-gallery-ready] .rotating-table {
  opacity: 1;
}
.rotating-table canvas {
  display: block;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  max-width: 100%;
  outline-offset: -4px;
}
.rotating-table canvas[data-dragging] {
  cursor: grabbing;
}
.rotating-table canvas:focus-visible {
  outline: 2px solid #947327;
}
.selection-bridge[data-table-ready] {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.selection-bridge[data-table-ready] > .dish-gallery,
.selection-bridge[data-table-ready] > .selection-invitation {
  grid-column: 1;
  grid-row: 1;
}
.selection-bridge[data-table-ready] > .selection-invitation {
  z-index: 1;
  margin-top: var(--table-copy-top);
  width: min(620px, calc(100% - 40px));
  padding-inline: 0;
  pointer-events: none;
}
.selection-bridge[data-table-ready] > .selection-invitation a {
  pointer-events: auto;
}
.selection-bridge[data-table-ready] .selection-invitation h2 {
  font-size: clamp(30px, 3.1vw, 48px);
  letter-spacing: -0.04em;
}
.selection-bridge[data-table-ready] .selection-invitation > p {
  margin-top: 15px;
  max-width: 500px;
}
.selection-bridge[data-table-ready] .selection-invitation .home-button {
  margin-top: 23px;
  border-radius: 40px;
  min-height: 52px;
}
@media (max-width: 700px) {
  .selection-bridge[data-table-ready] > .selection-invitation {
    width: calc(100% - 36px);
  }
  .selection-bridge[data-table-ready] .selection-invitation h2 {
    font-size: clamp(25px, 6.8vw, 30px);
  }
  .selection-bridge[data-table-ready] .selection-invitation > p {
    max-width: 330px;
    font-size: 14px;
    margin-top: 12px;
  }
  .selection-bridge[data-table-ready] .selection-invitation .home-button {
    margin-top: 18px;
  }
  .selection-bridge[data-table-ready] .specialty-scroll-link {
    margin-top: 16px;
  }
}

/* Lift the dish orbit without clipping any plate or moving the fixed invitation. */
.selection-bridge[data-table-ready] > .dish-gallery {
  transform: translateY(-42px);
}
@media (max-width: 700px) {
  .selection-bridge[data-table-ready] > .dish-gallery {
    transform: translateY(-28px);
  }
}
