:root {
  --bg: #140B05;
  --bg-2: #1B1008;
  --logo: #211206;
  --surface: #22150C;
  --leather: #5A2C14;
  --cognac: #A0643E;
  --caramel: #CFA27A;
  --cream: #F1E6D8;
  --muted: #9C8674;
  --line: rgba(241, 230, 216, .1);
  --bar-h: 112px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --serif: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; }

.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transform: translateZ(0);
}

.intro { position: relative; height: 250vh; height: 250svh; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--logo);
}
.stage-bg { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; will-change: transform; transform-origin: 50% 100%; }
.stage-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.stage-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--logo) 0%, var(--logo) 40%, rgba(33, 18, 6, .55) 56%, rgba(20, 11, 5, .1) 76%, rgba(20, 11, 5, .35) 90%, var(--bg) 100%);
}
.stage-shade::after {
  content: ''; position: absolute; inset: 0;
  background: var(--bg);
  opacity: var(--fade, 0);
}

.demo-badge {
  position: absolute; z-index: 3;
  top: calc(16px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px; font-weight: 500; letter-spacing: .02em;
  color: var(--caramel);
  padding: 5px 12px 4px;
  border: 1px solid rgba(207, 162, 122, .3);
  border-radius: 999px;
  background: rgba(20, 11, 5, .4);
}

.stage-core {
  position: absolute; inset: 0 0 auto; top: 34%;
  display: flex; flex-direction: column; align-items: center;
  transform: translateY(-50%);
  will-change: transform, opacity;
}
.ring {
  position: absolute; top: 50%; left: 50%;
  width: 250px; height: 250px; margin: -125px 0 0 -125px;
  transform: translateY(-62px) scale(var(--ring, .7));
  opacity: var(--ring-o, .9);
  will-change: transform, opacity;
}
.ring::before, .ring span {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(207, 162, 122, .28);
}
.ring span { inset: 16px; border-color: rgba(207, 162, 122, .12); }
.brand img { width: 132px; height: auto; position: relative; }
.motto {
  margin-top: 26px;
  display: flex; flex-direction: column; align-items: center; line-height: 1.12;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(30px, 9vw, 42px);
  letter-spacing: .01em;
  color: var(--cream);
}
.w { display: inline-block; opacity: var(--o, 1); transform: translateY(var(--y, 0)); will-change: transform, opacity; }

.hint {
  position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; color: var(--muted); text-decoration: none; letter-spacing: .04em;
  opacity: var(--hint, 1);
}
.hint-line { width: 1px; height: 38px; background: rgba(241, 230, 216, .15); position: relative; overflow: hidden; }
.hint-line::after { content: ''; position: absolute; inset: 0; background: var(--caramel); transform: translateY(-100%); }

.bar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(20, 11, 5, .84);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  padding-top: env(safe-area-inset-top);
}
.bar-top {
  display: flex; align-items: center; gap: 16px;
  max-width: 600px; margin: 0 auto; padding: 12px 16px 0;
}
.bar-logo { width: 44px; height: auto; flex: none; opacity: .92; }
.switch {
  flex: 1; position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; border-radius: 999px;
  background: rgba(241, 230, 216, .06);
  border: 1px solid var(--line);
}
.switch-pill {
  position: absolute; top: 4px; bottom: 4px; right: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: var(--cream);
  transition: transform .6s var(--ease-out);
}
.switch[data-on="sweets"] .switch-pill { transform: translateX(-100%); }
.switch button {
  position: relative; z-index: 1;
  padding: 8px 6px 7px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .5s var(--ease);
}
.switch button[aria-selected="true"] { color: var(--bg); }
.switch button:focus-visible, .chip:focus-visible { outline: 1px solid var(--caramel); outline-offset: 3px; }

.chips-wrap { max-width: 600px; margin: 0 auto; }
.chips {
  position: relative;
  display: flex; gap: 22px;
  overflow-x: auto; scrollbar-width: none;
  padding: 12px 16px 0;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; position: relative;
  font-size: 14px; color: var(--muted);
  padding: 2px 0 12px;
  transition: color .5s var(--ease);
}
.chip[aria-current="true"] { color: var(--cream); }
.chip-ink {
  position: absolute; bottom: 0; right: 0;
  height: 2px; border-radius: 2px; background: var(--caramel);
  width: 1px; transform-origin: right;
  transition: transform .6s var(--ease-out);
}
.progress {
  display: block; height: 1px; background: var(--line); position: relative;
}
.progress::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(270deg, var(--cognac), var(--caramel));
  transform-origin: right; transform: scaleX(var(--p, 0));
}

main { max-width: 600px; margin: 0 auto; padding: 0 16px 60px; overflow-x: clip; }
.page[hidden] { display: none; }

.group { padding-top: 54px; scroll-margin-top: calc(var(--bar-h) - 1px); }
.head {
  position: relative;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; min-height: 84px;
}
.num {
  position: absolute; left: -4px; bottom: -14px;
  font-family: var(--serif); font-weight: 500;
  font-size: 118px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(207, 162, 122, .22);
  pointer-events: none; user-select: none;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.head-text { position: relative; }
.kicker {
  display: block; font-family: var(--serif); font-style: italic;
  font-size: 18px; color: var(--caramel); letter-spacing: .02em;
}
.head h2 { font-size: 26px; font-weight: 600; line-height: 1.3; }
.count { position: relative; font-size: 12px; color: var(--muted); padding-bottom: 6px; }

.list { list-style: none; }
.item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 17px 0;
}
.item::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--line);
  transform-origin: right;
}
.item-name { flex: 1; min-width: 0; }
.item-name .ar { font-size: 17px; font-weight: 500; }
.item-name .en { display: block; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); margin-top: 1px; }
.desc { display: block; font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.7; }

.price {
  flex: none;
  font-family: var(--serif); font-weight: 500; font-size: 24px;
  font-variant-numeric: lining-nums; color: var(--cream);
  display: flex; align-items: baseline; gap: 5px;
}
.price small { font-family: 'IBM Plex Sans Arabic', sans-serif; font-size: 11px; color: var(--muted); }
.price.tbd { color: var(--muted); font-weight: 400; }

.kcal {
  display: inline-block; margin-top: 7px;
  font-size: 11px; color: var(--caramel);
  border: 1px solid rgba(207, 162, 122, .3); border-radius: 999px; padding: 1px 9px 0;
}

.scene {
  position: relative;
  aspect-ratio: 1 / 1.08;
  border-radius: 24px; overflow: hidden;
  background: var(--surface);
  isolation: isolate;
}
.scene-media { position: absolute; inset: -9% 0; will-change: transform; transform: translate3d(0, var(--py, 0px), 0) scale(var(--sc, 1)); }
.scene-media img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 70%; }
.scene::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20, 11, 5, .35) 0%, transparent 20%, transparent 58%, rgba(20, 11, 5, .8) 86%, var(--bg-2) 100%);
}
.scene-top {
  position: absolute; z-index: 2; top: 18px; right: 20px; left: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--serif); font-style: italic; font-size: 16px; color: rgba(241, 230, 216, .75);
}
.scene-info {
  position: absolute; z-index: 2; right: 0; left: 0; bottom: 0;
  padding: 0 22px 22px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.scene-info .ar { font-size: 28px; font-weight: 600; line-height: 1.25; }
.scene-info .en { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--caramel); }
.scene-info .desc { color: rgba(241, 230, 216, .7); }
.scene-info .price { font-size: 30px; }
.curtain {
  position: absolute; inset: 0; z-index: 3;
  background: var(--bg);
  transform-origin: top;
}

.noimg {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(70% 55% at 50% 42%, rgba(160, 100, 62, .35), transparent 70%),
    radial-gradient(120% 80% at 80% 0%, rgba(90, 44, 20, .7), transparent 60%),
    linear-gradient(180deg, #2A170B, var(--bg-2));
  color: var(--caramel);
}
.noimg svg { width: 34%; height: auto; opacity: .85; margin-top: -18%; }

.error { text-align: center; color: var(--caramel); padding: 60px 0; }

.foot {
  text-align: center;
  padding: 80px 16px calc(34px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border-top: 1px solid var(--line);
  background: radial-gradient(90% 60% at 50% 0%, rgba(90, 44, 20, .35), transparent 70%);
}
.foot-logo { width: 96px; height: auto; }
.foot-motto { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--caramel); margin-top: 10px; }
.foot-handle { font-size: 13px; color: var(--muted); text-decoration: none; letter-spacing: .08em; }
.foot-note { font-size: 12px; color: var(--muted); margin-top: 22px; }
.credit {
  margin-top: 6px; text-decoration: none;
  font-size: 12px; color: var(--cream);
  border: 1px solid rgba(241, 230, 216, .18); border-radius: 999px;
  padding: 7px 16px 6px;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
}
.credit:hover { border-color: var(--caramel); background: rgba(207, 162, 122, .08); }

.motion .reveal { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .item::after { transform: scaleX(0); transition: transform 1.2s var(--ease-out); transition-delay: calc(var(--d, 0s) + .15s); }
.motion .item.in::after { transform: scaleX(1); }
.motion .scene.reveal { transform: translate3d(0, 40px, 0); }
.motion .scene.reveal.in { transform: none; }
.motion .curtain { transition: transform 1.3s var(--ease-out) .1s; }
.motion .scene.in .curtain { transform: scaleY(0); }
.motion .scene .scene-info > *, .motion .scene .scene-top { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity .9s var(--ease-out) .7s, transform 1s var(--ease-out) .7s; }
.motion .scene.in .scene-info > *, .motion .scene.in .scene-top { opacity: 1; transform: none; }
.motion .page.enter { animation: page-in .7s var(--ease-out); }
.motion .hint-line::after { animation: drip 2.4s var(--ease) 1.8s infinite; }
.motion .intro-in .brand { animation: logo-in 1.6s var(--ease-out) both; }
.motion .intro-in .motto { animation: rise 1.4s var(--ease-out) .5s both; }
.motion .intro-in .ring span { animation: fade 2.4s var(--ease-out) .3s both; }
.motion .intro-in .demo-badge { animation: fade 1.4s var(--ease-out) 1.2s both; }
.motion .intro-in .hint > * { animation: fade 1.4s var(--ease-out) 1.6s both; }

.still .curtain { display: none; }
.still .intro { height: auto; }
.still .stage { position: relative; }

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes logo-in { from { opacity: 0; filter: blur(8px); transform: scale(.94); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes drip { 0% { transform: translateY(-100%); } 55% { transform: translateY(0); } 100% { transform: translateY(100%); } }

@media (min-width: 720px) {
  .sweets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .sweets-grid .group { padding-top: 36px; }
}
