/*
 * Four full-screen pages. The pager is the only thing that scrolls; the
 * browser snaps to one page per swipe (scroll-snap-stop: always), so the
 * visitor always lands on a page, never between two.
 */
.pager {
  position: fixed;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  outline: none;
}

.pager::-webkit-scrollbar {
  display: none;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--header-space) var(--gutter) calc(env(safe-area-inset-bottom) + 22px);
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Content arrives together with the scene (js/pager.js sets .is-active) */
.js .page [data-enter] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .page.is-active [data-enter] {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}

.js .page.is-active [data-enter] ~ [data-enter] {
  transition-delay: 0.4s;
}

/* ---------- 1. Landing (cookie) ---------- */
.page--landing {
  align-items: center;
  padding-top: calc(env(safe-area-inset-top) + 6svh);
  text-align: center;
}

.landing__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Empty boxes the size of the logo parts: the logo itself is in .brand */
.landing__icon {
  height: clamp(96px, 17svh, 150px);
  aspect-ratio: 420 / 443;
}

.landing__name {
  width: clamp(200px, 62vw, 280px);
  aspect-ratio: 600 / 165;
}

.landing__slogan {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(20px, 5.6vw, 24px);
  font-weight: 700;
  line-height: 1.5;
  text-shadow: var(--glow);
}

.landing__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3.5svh, 30px);
  width: 100%;
  margin-top: auto;
}

/* Scroll hint: text in the middle, a double arrow on each side */
.landing__cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 13.5px;
  line-height: 1.8;
}

.landing__cue .icon {
  width: 18px;
  height: 18px;
  color: var(--accent-ink);
  animation: nudge 1.8s ease-in-out infinite;
}

/* ---------- 2. Why us (kitchen) ---------- */
.page--why {
  justify-content: space-between;
}

/* Shorter screens crop the scene so the cookie sits low: keep the icons
   off it by placing them right under the sentence. */
@media (min-aspect-ratio: 11 / 20) {
  .page--why {
    justify-content: flex-start;
    gap: clamp(16px, 3svh, 26px);
  }
}

.why__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.statement {
  font-size: clamp(19px, 5.4vw, 23px);
  font-weight: 600;
  line-height: 1.85;
  text-shadow: var(--glow);
}

.words-ready .statement .word {
  opacity: 0.22;
  transition: opacity 0.35s ease;
}

.words-ready .statement .word.is-lit {
  opacity: 1;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.highlight__icon {
  display: grid;
  place-items: center;
  width: clamp(50px, 8svh, 60px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient-accent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--accent-shadow);
}

.highlight__icon .icon {
  width: 46%;
  height: 46%;
}

.highlight__label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: var(--glow);
}

/* ---------- 3. Menu (house): 2-column grid ---------- */
.page--menu {
  gap: clamp(12px, 2.5svh, 22px);
}

.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* An odd last product sits centred on its own row */
.products > .product:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 6px);
}

.product {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 22px;
}

.product__image {
  width: 100%;
  height: clamp(78px, 14.5svh, 150px);
  object-fit: cover;
  border-radius: 15px;
  background: var(--gradient-soft);
}

.product__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 4px 2px;
}

.product__name {
  font-family: var(--font-display);
  font-size: clamp(14.5px, 4vw, 17px);
  font-weight: 800;
  line-height: 1.35;
}

.product__price {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.45);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--accent-ink);
}

/* ---------- 4. Custom orders and contact (window) ---------- */
.page--contact {
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.page--contact .section-intro {
  align-items: center;
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.contact__lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ---------- Motion ---------- */
@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .page [data-enter] {
    transform: none;
    transition: opacity 0.3s ease;
  }

  .landing__cue .icon {
    animation: none;
  }
}
