/* Sambey QR menu — mirrors the Canva print menu (sky field, orange plates, syrup drip, doodles).
   Colours come from the owner's theme (set as CSS variables by main.js); everything else derives from them. */
:root {
  --sky: #8dc3ea;
  --orange: #f07a1f;
  --navy: #14304e;
  --paper: #fff8ee;
  --white: #ffffff;
  --sky-soft: color-mix(in srgb, var(--sky) 30%, white);
  --navy-soft: color-mix(in srgb, var(--navy) 78%, transparent);
  --rule: color-mix(in srgb, var(--navy) 14%, transparent);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --col: 560px;
  --gutter: 20px;
  --drip: clamp(44px, 12.6vw, 76px);
  --tabs-h: 64px;

  --display: "Fredoka", system-ui, sans-serif;
  --condensed: "Anton", "Arial Narrow", sans-serif;
  --body: "Manrope", system-ui, sans-serif;
}
@supports not (color: color-mix(in srgb, red, blue)) {
  :root { --sky-soft: #e3f0fa; --navy-soft: rgba(20, 48, 78, 0.78); --rule: rgba(20, 48, 78, 0.14); }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--tabs-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
/* Plates bleed off the right edge; clip so the page never scrolls sideways */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }

/* Faint line-doodle wallpaper, same as the print menu */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("assets/img/pattern.webp") 0 0 / 320px auto repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: -1;
}
body.no-pattern::before { display: none; }
body.no-sparkles .sparkle { display: none; }
body.no-motion *, body.no-motion *::before, body.no-motion *::after { animation: none !important; transition: none !important; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--orange); color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow-x: clip;
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(var(--sky), var(--sky)) top / 100% calc(100% - var(--drip) + 1px) no-repeat;
}
.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  max-width: var(--col);
  margin: 0 auto;
  padding: var(--s4) var(--gutter) 0;
  font: 600 12px/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__stage {
  position: relative;
  max-width: var(--col);
  height: clamp(380px, 112vw, 600px);
  margin: 0 auto;
}
.hero__plate {
  position: absolute;
  top: 4%;
  right: -16%;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
}
.hero__bowl { position: absolute; top: 9%; right: -3%; width: 76%; animation: float 6s ease-in-out infinite; }
.hero__doodle { position: absolute; top: 30%; left: 3%; width: 30%; }
.hero__mark { position: absolute; left: 2%; right: 2%; bottom: 2%; transform: rotate(-3deg); }
.hero__mark img { width: 100%; }
/* Text fallback when no wordmark image is chosen: white bubble letters with an orange outline, like the sign */
.hero__text {
  display: block;
  font: 700 clamp(72px, 24vw, 150px)/0.95 var(--display);
  color: var(--white);
  text-transform: uppercase;
  -webkit-text-stroke: 0.14em var(--orange);
  paint-order: stroke fill;
}
.hero__tag {
  max-width: var(--col);
  margin: 0 auto;
  padding: var(--s1) var(--gutter) calc(var(--drip) + var(--s4));
  text-align: center;
  font: 700 15px/1 var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
/* Drips tile at a fixed aspect so they never stretch or shrink on wide screens.
   The shape is a mask, so it follows the theme's sky colour. */
.drip {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--drip);
  background: var(--sky);
  -webkit-mask: url("assets/drip.svg") 0 0 / calc(var(--drip) * 7.94) 100% repeat-x;
  mask: url("assets/drip.svg") 0 0 / calc(var(--drip) * 7.94) 100% repeat-x;
}

.sparkle { position: absolute; fill: var(--white); animation: twinkle 2.8s ease-in-out infinite; }
.sparkle--a { width: 7%; top: 2%; left: 40%; }
.sparkle--b { width: 4.5%; top: 24%; left: 34%; fill: var(--orange); animation-delay: 0.9s; }
.sparkle--c { width: 4%; top: 6%; right: 6%; animation-delay: 1.6s; }

/* ---------- Section tabs ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(var(--s2) + env(safe-area-inset-top)) var(--gutter) var(--s2);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
/* Four-plus categories don't fit a phone: the track scrolls and follows the active tab */
.tabs__track {
  display: flex;
  gap: var(--s2);
  max-width: var(--col);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.tabs__track::-webkit-scrollbar { display: none; }
.tab {
  display: grid;
  flex: 1 0 auto;
  place-items: center;
  min-height: 44px;
  padding: 0 var(--s4);
  border-radius: 999px;
  background: var(--sky-soft);
  color: var(--navy);
  font: 700 15px/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease-out;
}
.tab.is-active { background: var(--orange); }

/* ---------- Sections ---------- */
.section { max-width: var(--col); margin: 0 auto; padding: var(--s8) var(--gutter) 0; }
main > .section:first-child { padding-top: var(--s7); }
.section__head { position: relative; margin-bottom: var(--s5); }
.section__head:has(.head__doodle) .title { padding-right: clamp(72px, 22vw, 104px); }
.title {
  font: 700 clamp(44px, 12.4vw, 60px)/0.95 var(--display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.squiggle { display: block; width: 120px; height: 16px; margin-top: var(--s2); fill: none; stroke: var(--orange); stroke-width: 4; stroke-linecap: round; }
.squiggle--white { stroke: var(--white); }
.head__doodle { position: absolute; right: 0; top: -4px; width: clamp(64px, 20vw, 96px); }

/* Prices: one pill style everywhere */
.prices { display: flex; flex-wrap: wrap; gap: 6px; }
.price {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 11px 7px;
  border-radius: 999px;
  background: var(--sky-soft);
  color: var(--navy);
  font: 700 18px/1 var(--display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background-color 0.2s ease-out, transform 0.35s cubic-bezier(.16, 1, .3, 1);
}
.price small { font-size: 10px; letter-spacing: 0.08em; }
.price.is-on { background: var(--orange); transform: scale(1.05); }

/* ---------- Cards (waffles) ---------- */
.sizes {
  display: grid;
  grid-template-columns: repeat(var(--n, 2), 1fr);
  gap: 6px;
  padding: 6px;
  margin-bottom: var(--s7);
  border-radius: 26px;
  background: var(--white);
}
.size {
  min-height: 60px;
  padding: 10px 14px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease-out;
}
.size strong { display: block; font: 700 19px/1 var(--display); }
.size span { display: block; margin-top: 5px; font: 600 12.5px/1.25 var(--body); color: var(--navy-soft); }
.size[aria-checked="true"] { background: var(--orange); }
.size[aria-checked="true"] span { color: var(--navy); }

.flavors { display: grid; gap: var(--s7); }
.flavor {
  display: grid;
  grid-template-columns: 1fr clamp(86px, 25vw, 118px);
  gap: var(--s3);
  align-items: end;
  padding: var(--s5) var(--s3) var(--s5) var(--s5);
  border-radius: 28px;
  background: var(--white);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease-out;
}
.flavor[data-open] { cursor: pointer; }
.flavor[data-open]:active { transform: scale(0.985); }
.flavor--noimg { grid-template-columns: 1fr; padding-right: var(--s5); }
.flavor__name { font: 400 34px/0.95 var(--condensed); letter-spacing: 0.005em; overflow-wrap: anywhere; }
.flavor__desc { margin-top: var(--s2); font: 500 15px/1.4 var(--body); color: var(--navy-soft); }
/* Prices get the full card width so every variant stays on one line on small phones */
.flavor__prices { grid-column: 1 / -1; margin-top: var(--s1); }
/* Photo sticks up out of the card like a sticker */
.flavor__img {
  width: 100%;
  max-height: 176px;
  margin: -46px 0 -4px;
  object-fit: contain;
  object-position: bottom;
  transition: transform 0.35s cubic-bezier(.16, 1, .3, 1);
}
.flavor:hover .flavor__img { transform: rotate(-4deg) translateY(-4px); }

/* ---------- Feature photo (plate + tilted cut-out) ---------- */
.feature { position: relative; margin-bottom: var(--s5); }
.feature__art {
  position: relative;
  width: calc(100% + var(--gutter));
  height: clamp(220px, 62vw, 320px);
}
.feature__plate {
  position: absolute;
  top: 2%;
  right: -12%;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
}
.feature__img {
  position: absolute;
  top: -6%;
  right: 4%;
  width: 60%;
  height: 112%;
  object-fit: contain;
  transform: rotate(-8deg);
}
.feature__label {
  position: absolute;
  left: 0;
  bottom: var(--s3);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font: 600 13px/1 var(--display);
}
.feature__doodle {
  position: absolute;
  left: var(--s2);
  bottom: 62px;
  z-index: 1;
  width: clamp(92px, 27vw, 128px);
}

/* ---------- Lists ---------- */
.list { padding: 0; list-style: none; }
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: var(--s4);
  align-items: baseline;
  padding: var(--s4) 0;
  border-bottom: 1.5px solid var(--rule);
}
.item:first-child { border-top: 1.5px solid var(--rule); }
.item[data-open] { cursor: pointer; }
.item__name { font: 600 18px/1.15 var(--display); overflow-wrap: anywhere; }
.item__price { font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.item__desc { grid-column: 1 / -1; margin-top: 6px; font: 500 15px/1.4 var(--body); color: var(--navy-soft); }
.item .price { font-size: 15px; padding: 6px 9px 5px; }
.item .price.is-on { transform: none; }
.item--pic { grid-template-columns: 56px 1fr auto; align-items: center; column-gap: var(--s3); }
.item--pic .item__desc { grid-column: 2 / -1; }
.item__pic { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--sky-soft); }
.list--big .item { padding: var(--s5) 0; }
.list--big .item__name { font: 400 28px/1 var(--condensed); letter-spacing: 0.005em; }
.list--big .item__price { font-size: 22px; }

/* ---------- Sky blocks (drinks) ---------- */
.section--sky {
  position: relative;
  max-width: none;
  margin-top: 0;
  padding: 0;
  background: var(--sky);
}
.section--sky.is-first { margin-top: var(--s8); }
.section--sky.is-first.has-glass { margin-top: 120px; }
.wave {
  position: absolute;
  top: -34px;
  left: 0;
  width: 100%;
  height: 35px;
  background: var(--sky);
  -webkit-mask: url("assets/wave.svg") 0 0 / 397px 35px repeat-x;
  mask: url("assets/wave.svg") 0 0 / 397px 35px repeat-x;
}
/* A sky block that hands back to paper gets a scalloped bottom edge */
.section--sky:has(+ .section:not(.section--sky)) { margin-bottom: var(--s7); }
.section--sky:has(+ .section:not(.section--sky))::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -34px;
  width: 100%;
  height: 35px;
  background: var(--sky);
  -webkit-mask: url("assets/wave.svg") 0 0 / 397px 35px repeat-x;
  mask: url("assets/wave.svg") 0 0 / 397px 35px repeat-x;
  transform: scaleY(-1);
}
.section--sky .section__inner { position: relative; max-width: var(--col); margin: 0 auto; padding: var(--s3) var(--gutter) 0; }
.section--sky:not(.is-first) .section__inner { padding-top: var(--s7); }
.glass {
  position: absolute;
  top: -104px;
  right: var(--gutter);
  z-index: 1;
  width: clamp(80px, 22vw, 104px);
  transform: rotate(6deg);
}
.section--sky .item { border-color: color-mix(in srgb, var(--navy) 20%, transparent); }
.section--sky .price { background: color-mix(in srgb, var(--white) 55%, transparent); }
.section--sky .price.is-on { background: var(--orange); }

/* ---------- Footer ---------- */
.foot { position: relative; margin-top: var(--s8); background: var(--sky); padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom)); }
.foot.is-joined { margin-top: 0; }
.foot__inner { max-width: var(--col); margin: 0 auto; padding: var(--s6) var(--gutter) 0; font: 500 14px/1.5 var(--body); }
.foot.is-joined .foot__inner { padding-top: var(--s7); }
.foot__bye { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.foot__bye img { width: 56px; }
.foot__bye p { font: 700 30px/1 var(--display); }
.foot__inner p + p { color: var(--navy-soft); }
.foot__admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: var(--s5);
  padding: 0 var(--s4);
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font: 600 14px/1 var(--display);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(.16, 1, .3, 1);
}
.foot__admin:active { transform: scale(0.96); }
.foot__admin svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Detail sheet ---------- */
.sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: var(--col);
  max-height: 90vh;
  margin: 0 auto;
  padding: var(--s5) var(--gutter) calc(var(--s6) + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 30px 30px 0 0;
  background: var(--paper);
  color: var(--navy);
  overflow: auto;
}
.sheet[open] { animation: sheet-up 0.42s cubic-bezier(.16, 1, .3, 1); }
.sheet::backdrop { background: color-mix(in srgb, var(--navy) 55%, transparent); }
.sheet__close {
  position: absolute;
  top: var(--s4);
  right: var(--s4);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}
.sheet__close svg { width: 20px; height: 20px; fill: none; stroke: var(--navy); stroke-width: 2.6; stroke-linecap: round; }
/* Orange plate behind the cut-out, like the print menu */
.sheet__art {
  position: relative;
  height: min(44vh, 340px);
  background: radial-gradient(circle at 50% 58%, var(--orange) 0 37%, transparent 37.5%);
}
.sheet__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sheet__title { margin-top: var(--s4); padding-right: 52px; font: 400 40px/1 var(--condensed); overflow-wrap: anywhere; }
.sheet__desc { margin-top: var(--s2); font: 500 16px/1.45 var(--body); color: var(--navy-soft); }
.sheet__prices { margin-top: var(--s4); }
.sheet__prices .price { font-size: 22px; padding: 11px 16px 10px; }

/* ---------- Tablet: wider column, two-up cards, split sections ---------- */
@media (min-width: 600px) {
  :root { --col: 760px; --gutter: 32px; }
  .tabs__track { max-width: 560px; }
  .hero__tag { font-size: 17px; }

  .flavors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7) var(--s5); }
  /* Side-by-side cards: names line up across the row regardless of cup height */
  .flavor__text { align-self: start; }

  /* Photo left, list right */
  .section.has-feature:not(.section--cards) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: var(--s7);
    align-items: center;
  }
  .section.has-feature:not(.section--cards) > .section__head { grid-column: 1 / -1; }
  .section.has-feature:not(.section--cards) .feature { margin-bottom: 0; }
  .section.has-feature:not(.section--cards) .feature__art { width: 100%; }

  /* Sky block with a glass: title and glass left, list right */
  .section--sky.is-first.has-glass { margin-top: var(--s8); }
  .section--sky.has-glass .section__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    grid-template-rows: auto 1fr;
    column-gap: var(--s7);
  }
  .section--sky.has-glass .section__head { grid-column: 1; grid-row: 1; }
  .section--sky.has-glass .title { font-size: clamp(30px, 5.2vw, 46px); }
  .section--sky.has-glass .glass { position: static; grid-column: 1; grid-row: 2; align-self: start; justify-self: start; margin: var(--s2) 0 0 var(--s4); width: 132px; }
  .section--sky.has-glass .list { grid-column: 2; grid-row: 1 / -1; }
  .section--sky.has-glass .sizes { grid-column: 2; }
}

/* ---------- Wide tablet and up: side-by-side hero (wordmark left, bowl right) ---------- */
@media (min-width: 700px) {
  .hero__stage { height: clamp(420px, 46vw, 620px); }
  .hero__plate { top: 2%; right: 0; width: 46%; }
  .hero__bowl { top: 7%; right: 1%; width: 44%; }
  .hero__doodle { top: 8%; left: 38%; width: 12%; }
  .hero__mark { left: 0; right: auto; bottom: 12%; width: 54%; transform: rotate(-4deg); }
  .hero__tag { margin-top: -4.5%; padding-left: calc(var(--gutter) + 4%); text-align: left; font-size: 18px; }
  .sparkle--a { width: 3.4%; top: 12%; left: 26%; }
  .sparkle--b { width: 2.2%; top: 58%; left: 50%; }
  .sparkle--c { width: 2.2%; top: 4%; right: 3%; }
}

/* ---------- Desktop: four cards in a row, heading and size switch on one line ---------- */
@media (min-width: 1024px) {
  :root { --col: 1120px; --gutter: 48px; }

  .section--cards.has-variants { display: grid; grid-template-columns: 1fr minmax(0, 440px); column-gap: var(--s7); align-items: end; }
  .section--cards.has-variants .section__head { margin-bottom: var(--s7); }
  .section--cards.has-variants .sizes { margin-bottom: var(--s7); }
  .section--cards > .feature, .section--cards > .flavors { grid-column: 1 / -1; }
  .flavors { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s5); margin-top: var(--s5); }

  /* Tall cards: photo on top, then name, description, prices */
  .flavor { grid-template-columns: 1fr; align-items: start; align-content: start; padding: 0 18px 22px; }
  .flavor--noimg { padding-top: 22px; }
  /* Same-height photo frame so every name starts on one line */
  .flavor__img { order: -1; width: 100%; height: 210px; max-height: none; margin: -70px 0 var(--s3); object-position: center bottom; }
  .flavor__prices { margin-top: var(--s3); }
  .flavor .price { font-size: 17px; padding: 8px 10px 7px; }

  .section.has-feature:not(.section--cards) { column-gap: var(--s8); }
  .feature__art { height: 380px; }

  .section--sky.has-glass .glass { width: 150px; }
  .section--sky.has-glass .title { font-size: 60px; }
  /* Plain lists run two columns across the wide block */
  .section--sky:not(.has-glass) .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s7); }
  .section--sky:not(.has-glass) .item:nth-child(2) { border-top: 1.5px solid color-mix(in srgb, var(--navy) 20%, transparent); }

  /* Sheet becomes a centred card instead of a bottom sheet */
  .sheet { inset: 0; height: fit-content; margin: auto; max-height: 86vh; border-radius: 30px; }
  .sheet[open] { animation: sheet-pop 0.32s cubic-bezier(.16, 1, .3, 1); }
}

/* ---------- Motion: the hero and doodles stay gently alive ---------- */
.doodle { animation: wiggle 3.2s ease-in-out infinite; transform-origin: 50% 90%; }

@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes wiggle { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.55); opacity: 0.6; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
