@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap');

:root {
  /* brand colors, matching grid-menu.html's palette */
  --maroon: #7a1730;
  --maroon-dark: #5a1023;
  --gold: #e2a83c;
  --gold-light: #f3c96f;
  --cream-alt: #f6ead2;
  --text-dark: #2a1f16;
  --text-muted: #8a7860;
  --line: #ece1cc;
  --shadow: rgba(58, 42, 28, .14);

  --sp-1: clamp(0.3125rem, 0.9vh, 0.5rem);
  --sp-2: clamp(0.5rem, 1.3vh, 0.8125rem);
  --sp-3: clamp(0.8125rem, 1.9vh, 1.3125rem);
  --sp-4: clamp(1.3125rem, 2.8vh, 2.125rem);

  --r-1: 0.6rem;
  --r-2: 1.1rem;
  --r-pill: 999px;

  --fs-tiny: clamp(0.7rem, 1.3vmin, 0.8125rem);
  --fs-sm: clamp(0.8rem, 1.55vmin, 0.9375rem);
  --fs-base: clamp(0.9rem, 1.9vmin, 1.05rem);
  --fs-md: clamp(1rem, 2.3vmin, 1.2rem);
  --fs-lg: clamp(1.3rem, 3.4vmin, 1.9rem);
  --fs-xl: clamp(2rem, 6.4vmin, 3.6rem);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text-dark);
  font-family: "Comfortaa", sans-serif;
  line-height: 1.4;
}

button, a {
  font-family: inherit;
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  background: none;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 2px;
}

/* STAGE — everything lives inside exactly 100dvh, no page scroll. The
   frame's height is capped so on tall/wide screens the composition stays
   a tightly-sized centered "dashboard" instead of stretching into a lot
   of dead whitespace. */
.stage {
  height: 100dvh;
  display: flex;
  /* align-items: center; */
  justify-content: center;
  padding: var(--sp-3) var(--sp-4);
}

.app-frame {
  width: 100%;
  max-width: 78rem;
  /* Capped closer to the (now 2-row, no dock) content's own natural
     height, so tall/wide screens don't center a small composition inside
     a lot of leftover empty frame. */
  /* height: min(100%, 34rem); */
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--sp-3);
}

/* TOP BAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 120px;
  padding-inline: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(2.2rem, 6vh, 3.1rem);
}

.topbar-icons {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
  transition: box-shadow .18s ease, transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.icon-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.icon-btn:hover {
  background: var(--cream-alt);
  border-color: var(--gold);
  color: var(--maroon);
  box-shadow: 0 6px 14px var(--shadow);
  transform: translateY(-1px);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.icon-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* MAIN — the wheel and hero text sit centered as one compact unit. */
.main-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
  min-height: 0;
}

.hero-visual {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-width: 0;
  min-height: 0;
}

.wheel-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  flex: 0 0 auto;
}

/* SPINNING WHEEL — a lazy-susan turntable. .wheel-window is a clipped
   porthole sized to roughly half the screen; only the "current" seat is
   visible, filling the window. .wheel-stop is the ring's rotation center
   (offset --wheel-radius to the left of the window's own center, so the
   anchor seat at angle=90 lands exactly in the middle of the window).
   The other three seats sit off past the window's edge and are fully
   clipped at rest — they only sweep back into view mid-transition, as
   the wheel turns to present the next dish. Because only the active
   seat's own footprint (--preview-size) affects layout — the hidden
   seats are invisible, not just off-canvas — this scales up to "half the
   screen" cleanly without the ring sprawling into neighboring elements. */
.wheel-window {
  position: relative;
  flex: 0 0 auto;
  width: var(--preview-size);
  height: var(--preview-size);
  /* Roughly half the available screen: half the viewport height, but
     capped by width too (80vw) so a narrow-but-tall phone never demands
     a circle wider than its own screen, and capped in absolute terms so
     it can't outgrow the app-frame's own max height. */
  --preview-size: clamp(9rem, min(56vh, 80vw), 40rem);
  /* overflow:hidden is load-bearing, not decorative: without it the 3
     hidden seats aren't just visually stray on wide viewports (≥1920px,
     corner thumbnails) — they can also push the page's real scrollable
     area past the viewport even where nothing looks obviously wrong
     (e.g. 1024x768 measures a real 825px-tall scrollHeight in a 768px
     viewport). This is what makes "only the current dish is visible"
     actually true, not just usually true. */
  border-radius: 50%;
  /* overflow: hidden;
  background: radial-gradient(circle at 32% 26%, var(--cream-alt), #fff 72%);
  box-shadow: 0 1.75rem 3.5rem var(--shadow), inset 0 0 0 1px var(--line); */
}

.wheel-stop {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  /* Derived from --preview-size (not an independent clamp) so the hidden
     seats stay well outside the window's clip circle at every size. */
  --wheel-radius: calc(var(--preview-size) * 1.06);
  transform: translateX(calc(-1 * var(--wheel-radius)));
}

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

.wheel-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--preview-size) * .36);
  height: calc(var(--preview-size) * .36);
  margin: calc(var(--preview-size) * -.18) 0 0 calc(var(--preview-size) * -.18);
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  background: var(--cream-alt);
  border: 3px solid #fff;
  outline: 2px solid var(--line);
  cursor: pointer;
  transition: transform .6s cubic-bezier(.65, 0, .35, 1), box-shadow .3s ease, outline-color .3s ease;
  z-index: 1;
}

.wheel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wheel-item.active {
  outline-color: var(--gold);
  box-shadow: 0 .9rem 1.8rem var(--shadow);
  z-index: 2;
}

.wheel-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* 2.75rem (44px) tap targets throughout this row, per the standard
   minimum comfortable touch-target size. */
.wheel-arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.05rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: box-shadow .18s ease, transform .18s ease, color .18s ease, border-color .18s ease;
}

.wheel-arrow:hover {
  box-shadow: 0 6px 14px var(--shadow);
  color: var(--maroon);
  border-color: var(--maroon);
}

.wheel-dots {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* A small round thumbnail of the dish inside a larger invisible hit
   area, so the tap target stays a comfortable 2.75rem (44px) even
   though the thumbnail itself sits smaller and inset within it. */
.wheel-dot {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: .3rem;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.wheel-dot img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  outline: 2px solid var(--line);
  outline-offset: -1px;
  opacity: .55;
  transform: scale(.72);
  transition: opacity .2s ease, transform .2s ease, outline-color .2s ease;
}

.wheel-dot:hover img {
  opacity: .8;
  outline-color: var(--gold-light);
}

.wheel-dot.active img {
  opacity: 1;
  transform: scale(1);
  outline-color: var(--maroon);
}

.hero-text {
  min-width: 0;
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.hero-eyebrow {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--maroon);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.hero-title {
  margin: 0;
  font-weight: 500;
  font-size: var(--fs-lg);
  color: var(--text-dark);
  line-height: 1.15;
}

.hero-title strong {
  display: block;
  font-weight: 700;
  font-size: var(--fs-xl);
  color: var(--maroon);
  letter-spacing: -.01em;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-1);
}

.hero-meta {
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.hero-meta b {
  color: var(--gold);
}

.hero-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: #fff;
  background: var(--maroon);
  padding: .65rem 1.35rem;
  border-radius: var(--r-pill);
  box-shadow: 0 .6rem 1.4rem rgba(122, 23, 48, .3);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.hero-order:hover {
  background: var(--maroon-dark);
  transform: translateY(-2px);
  box-shadow: 0 .9rem 1.8rem rgba(122, 23, 48, .38);
}

/* HERO DETAIL — the dish info that used to live in a separate floating
   card now flows as part of .hero-text itself, split into sections by
   thin rules instead of a bordered box. */
.hero-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp-1) 0;
}

.hero-rating {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--maroon-dark);
}

.hero-rating span {
  color: var(--gold);
}

.hero-desc {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.55;
}

.hero-feedback {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
  background: var(--cream-alt);
  border: 0;
  border-radius: var(--r-pill);
  padding: .4rem .85rem;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.feedback-btn:hover {
  background: var(--gold-light);
  color: var(--maroon-dark);
  transform: translateY(-1px);
}

.hero-ingredients {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-detail-label {
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  font-size: var(--fs-tiny);
  letter-spacing: .06em;
  margin-right: .5em;
}

/* RESPONSIVE — always exactly 100dvh, never a page/section scroll, on
   any viewport. Below 760px the layout switches from side-by-side to a
   stacked column; below 560px every section additionally tightens its
   own spacing/typography and the hero text sheds its lowest-priority
   detail content, so the whole stack still fits a short phone screen
   without ever needing to scroll. */
@media (max-width: 760px) {
  .app-frame {
    gap: var(--sp-3);
  }

  .main-row {
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-3);
    padding: 0;
  }

  .hero-visual {
    flex-direction: column;
    gap: var(--sp-2);
    text-align: center;
  }

  .hero-links {
    justify-content: center;
  }

  .hero-feedback {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .stage {
    padding: var(--sp-2);
  }

  .app-frame {
    gap: var(--sp-2);
  }

  .topbar-icons {
    gap: .4rem;
  }

  .wheel-controls {
    gap: var(--sp-2);
  }

  .hero-title {
    font-size: clamp(1.05rem, 4.4vmin, 1.3rem);
  }

  .hero-title strong {
    font-size: clamp(1.4rem, 7vmin, 2rem);
  }

  .hero-links {
    flex-wrap: wrap;
    gap: var(--sp-2);
  }

  .hero-order {
    padding: .5rem 1.1rem;
  }

  /* The wheel is the star of a phone-sized screen — full "half the
     screen" size — so the supporting detail copy is dropped entirely
     rather than squeezed; "Order Food" covers that need. */
  .hero-divider,
  .hero-rating,
  .hero-desc,
  .hero-feedback,
  .hero-ingredients {
    display: none;
  }
}

/* Short-viewport safety net (e.g. a phone in landscape) that the
   width-keyed breakpoints above wouldn't otherwise catch. */
@media (max-height: 620px) {
  .hero-divider,
  .hero-rating,
  .hero-desc,
  .hero-feedback,
  .hero-ingredients {
    display: none;
  }

  .hero-meta {
    display: none;
  }
}

/* Very short (landscape-phone) heights: the wheel and spacing shrink
   further so the hero-text row still has room. Arrow/dot tap targets
   only come down to 2.2rem (35px) here rather than all the way to the
   44px baseline — an intentional trade-off against the harder "must fit
   without scrolling" constraint at this extreme a height. */
@media (max-height: 460px) {
  .wheel-window {
    --preview-size: clamp(6.5rem, min(26vh, 60vw), 11rem);
  }

  .wheel-column {
    gap: var(--sp-1);
  }

  .wheel-controls {
    gap: var(--sp-1);
  }

  .wheel-arrow {
    width: 2.2rem;
    height: 2.2rem;
    font-size: .95rem;
  }

  .wheel-dot {
    width: 2.2rem;
    height: 2.2rem;
  }

  .hero-visual {
    gap: var(--sp-1);
  }

  .hero-text {
    gap: var(--sp-1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wheel-item {
    transition: none;
  }
}
