/* Shanasheel — infinite zoom coffee roastery */
:root {
  --night: #0B1026;
  --ink: #1B2347;
  --paper: #EFE6D6;
  --paper-2: #E5D9C4;
  --saffron: #D9922E;
  --teal: #0F3B3A;
  --brass: #C9A24A;
  --focus: #D9922E;
  --fd: 'Changa', 'Tajawal', system-ui, sans-serif;
  --fb: 'Tajawal', system-ui, sans-serif;
}
html { background: var(--night); }
body { font-family: var(--fb); background: var(--night); color: var(--paper); line-height: 1.65; overflow-x: hidden; }
html[lang="en"] body { line-height: 1.55; }

.skip { position: absolute; top: -80px; inset-inline-start: 12px; z-index: 60; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.bar { position: fixed; top: 0; inset-inline: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px clamp(14px, 3vw, 32px); pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand, .pill { background: rgba(11, 16, 38, .78); color: var(--paper); border: 1px solid rgba(239, 230, 214, .22); border-radius: 999px; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px 7px 14px; font-family: var(--fd); font-weight: 600; font-size: 1.08rem; letter-spacing: .01em; }
.brand__mark { width: 18px; height: 21px; color: var(--saffron); }
.bar__end { display: flex; gap: 6px; }
.pill { padding: 7px 14px; font-size: .88rem; font-weight: 500; line-height: 1.4; }
.pill:hover { border-color: var(--saffron); }
@media (max-width: 420px) { .bar__end .pill:first-child { display: none; } .pill { padding: 7px 11px; } }

/* ---------- the dive ---------- */
.dive { position: relative; background: var(--night); }
.dive__canvas, .dive__scrim, .depth, .hint { display: none; }

/* default (no motion yet / no JS): beats as a calm vertical story */
.beats { display: grid; gap: 48px; max-width: 760px; margin: 0 auto; padding: 120px 20px 80px; }
.beat__kicker { margin: 0 0 10px; font-size: .95rem; color: var(--saffron); font-weight: 500; }
.beat__title { margin: 0; font-family: var(--fd); font-weight: 600; font-size: clamp(2rem, 5.2vw, 4.4rem); line-height: 1.22; letter-spacing: -.005em; }
html[lang="en"] .beat__title { line-height: 1.08; letter-spacing: -.02em; }
.beat__sub { margin: 14px 0 0; font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 34em; opacity: .9; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .06em; margin-block: -.06em; }
.wi { display: inline-block; will-change: transform, opacity; }

/* motion mode: pinned stage */
.js-motion .dive__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--night); }
.js-motion .dive__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.js-motion .dive__scrim { display: block; position: absolute; inset: auto 0 0 0; height: 62%; background: linear-gradient(to top, rgba(6, 8, 20, .62), rgba(6, 8, 20, .28) 45%, rgba(6, 8, 20, 0)); pointer-events: none; }
.js-motion .beats { position: absolute; inset: 0; display: block; padding: 0; max-width: none; pointer-events: none; }
.js-motion .beat { position: absolute; inset-inline-start: clamp(20px, 7vw, 112px); bottom: clamp(84px, 13vh, 150px); width: min(620px, calc(100% - 40px)); color: #F7EEDF; text-shadow: 0 2px 22px rgba(0, 0, 0, .35); }
.js-motion .beat--dark { color: var(--ink); text-shadow: 0 1px 20px rgba(255, 246, 230, .55); }
.js-motion .beat--dark .beat__kicker { color: #A4561B; }
.js-motion .beat:not([data-i="0"]) .wi, .js-motion .beat:not([data-i="0"]) .beat__kicker { opacity: 0; }
.js-motion .beat[data-i="7"] { bottom: auto; top: clamp(96px, 16vh, 170px); width: min(470px, calc(100% - 40px)); }

.js-motion .depth { display: flex; flex-direction: column; gap: 14px; position: absolute; inset-inline-end: clamp(14px, 3vw, 36px); top: 50%; transform: translateY(-50%); margin: 0; padding: 0; list-style: none; font-size: .8rem; color: rgba(247, 238, 223, .62); transition: color .4s; }
.depth li { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; justify-content: flex-start; }
.depth i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; transition: transform .35s cubic-bezier(.22, 1, .36, 1), background-color .35s; }
.depth span { opacity: 0; transition: opacity .35s; }
.depth li.is-on { color: #F7EEDF; }
.depth li.is-on i { transform: scale(1.9); background: var(--saffron); }
.depth li.is-on span { opacity: 1; }
.is-light .depth { color: rgba(27, 35, 71, .55); }
.is-light .depth li.is-on { color: var(--ink); }
@media (max-width: 760px) { .depth span { display: none; } .js-motion .depth { gap: 11px; } }

.js-motion .hint { display: flex; align-items: center; gap: 12px; position: absolute; bottom: 26px; inset-inline-start: 50%; transform: translateX(50%); font-size: .85rem; color: rgba(247, 238, 223, .8); }
html[dir="ltr"] .js-motion .hint { transform: translateX(-50%); }
.hint i { width: 1px; height: 28px; background: currentColor; transform-origin: top; animation: drip 1.8s cubic-bezier(.22, 1, .36, 1) infinite; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 760px) {
  .js-motion .beat { bottom: 70px; inset-inline-start: 18px; width: calc(100% - 64px); }
  .js-motion .beat[data-i="7"] { top: 88px; }
  .beat__title { font-size: clamp(1.75rem, 8.4vw, 2.6rem); }
  .beat__sub { font-size: .98rem; }
  .js-motion .hint { bottom: 18px; }
}

/* reduced motion / no GSAP: static storyboard */
.dive--board .beats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 22px; max-width: 1240px; padding: 110px 18px 72px; }
.dive--board .beat__frame { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; border-radius: 18px; margin-bottom: 16px; background: #141a3a; }
.dive--board .beat__title { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.dive--board .beat__sub { font-size: .98rem; }
.dive--board .beat--dark { color: var(--paper); }

/* ---------- menu (the paper) ---------- */
.menu { background: var(--paper); color: var(--ink); padding: clamp(56px, 9vw, 112px) 18px clamp(96px, 12vw, 140px); position: relative; }
.menu::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(27, 35, 71, .05) 1px, transparent 1.2px); background-size: 7px 7px; pointer-events: none; }
.menu__inner { position: relative; max-width: 780px; margin: 0 auto; }
.menu__head { display: flex; gap: 22px; align-items: center; margin-bottom: 30px; }
.menu__stamp { flex: none; width: 92px; height: 92px; color: var(--ink); }
.menu__head h2 { margin: 0; font-family: var(--fd); font-weight: 600; font-size: clamp(2.3rem, 6vw, 3.6rem); line-height: 1.1; }
.menu__lead { margin: 8px 0 0; color: rgba(27, 35, 71, .75); max-width: 32em; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid rgba(27, 35, 71, .2); position: sticky; top: 64px; z-index: 5; background: var(--paper); padding-top: 6px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; font-family: var(--fd); font-size: 1.05rem; font-weight: 500; color: rgba(27, 35, 71, .58); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--saffron); }
.items { list-style: none; margin: 0; padding: 0; min-height: 360px; }
.item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px 18px; padding: 18px 0; border-bottom: 1px dashed rgba(27, 35, 71, .24); }
.item__name { margin: 0; font-family: var(--fd); font-weight: 600; font-size: 1.18rem; line-height: 1.35; }
.item__origin { font-family: var(--fb); font-weight: 500; font-size: .78rem; color: #A4561B; margin-inline-start: 8px; }
.item__desc { margin: 2px 0 0; font-size: .93rem; color: rgba(27, 35, 71, .7); }
.item__price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-size: 1.25rem; line-height: 1; display: grid; place-items: center; }
.qty button.add { background: var(--ink); color: var(--paper); }
.qty button:hover { background: var(--ink); color: var(--paper); }
.qty output { min-width: 24px; text-align: center; font-weight: 700; }
.item.is-in .item__name::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--saffron); margin-inline-start: 8px; vertical-align: middle; }
.menu__note { margin: 22px 0 0; font-size: .9rem; color: rgba(27, 35, 71, .7); }
@media (max-width: 560px) {
  .item { grid-template-columns: 1fr auto; }
  .item__price { grid-column: 1; grid-row: 2; }
  .qty { grid-column: 2; grid-row: 1 / span 2; }
  .menu__stamp { width: 64px; height: 64px; }
}

/* ---------- visit ---------- */
.visit { background: var(--teal); color: var(--paper); padding: clamp(56px, 8vw, 96px) 18px; }
.visit__inner { max-width: 1040px; margin: 0 auto; }
.visit h2 { margin: 0 0 28px; font-family: var(--fd); font-weight: 600; font-size: clamp(1.9rem, 4.4vw, 3rem); }
.visit__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
.visit h3 { margin: 0 0 6px; font-family: var(--fd); font-weight: 500; color: var(--brass); font-size: 1.1rem; }
.visit p { margin: 0; }
.visit__social { display: flex; gap: 18px; margin-top: 30px !important; }
.visit__social a { color: var(--paper); text-underline-offset: 5px; text-decoration-color: var(--brass); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 22px 18px 96px; background: var(--night); color: rgba(239, 230, 214, .7); font-size: .88rem; }
.foot p { margin: 0; }
.foot a { color: var(--paper); text-underline-offset: 4px; }

/* ---------- cart bar + sheet ---------- */
.cartbar { position: fixed; bottom: 16px; inset-inline: 0; display: flex; justify-content: center; z-index: 45; pointer-events: none; transform: translateY(140%); transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.cartbar.is-on { transform: none; }
.cartbar__btn { pointer-events: auto; display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 10px 12px 10px 22px; box-shadow: 0 14px 40px rgba(11, 16, 38, .35); font-weight: 500; }
html[dir="rtl"] .cartbar__btn { padding: 10px 22px 10px 12px; }
.cartbar__count { width: 30px; height: 30px; border-radius: 50%; background: var(--saffron); color: var(--ink); display: grid; place-items: center; font-weight: 700; }
.cartbar__total { font-variant-numeric: tabular-nums; }

.sheet { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 22px; padding: 26px 22px 22px; background: var(--paper); color: var(--ink); overflow: auto; }
.sheet::backdrop { background: rgba(8, 11, 28, .6); }
.sheet h2 { margin: 0 0 16px; font-family: var(--fd); font-weight: 600; font-size: 1.6rem; }
.sheet__close { position: absolute; top: 12px; inset-inline-end: 12px; margin: 0; }
.sheet__close button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(27, 35, 71, .25); background: transparent; font-size: 1.3rem; line-height: 1; }
.lines { list-style: none; margin: 0 0 8px; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(27, 35, 71, .22); }
.sheet__total { display: flex; justify-content: space-between; font-size: 1.1rem; margin: 10px 0 18px; }
.seg { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { margin-bottom: 8px; font-weight: 500; }
.seg label { display: flex; align-items: center; gap: 8px; border: 1.5px solid rgba(27, 35, 71, .3); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.seg input { accent-color: var(--saffron); }
.field { display: grid; gap: 6px; margin-bottom: 12px; font-size: .92rem; font-weight: 500; }
.field input, .field select { border: 1.5px solid rgba(27, 35, 71, .28); border-radius: 12px; padding: 11px 13px; background: #F7F1E6; font-weight: 400; }
.btn { display: flex; justify-content: center; align-items: center; width: 100%; margin-top: 8px; padding: 14px 18px; border-radius: 14px; border: 0; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 1rem; text-decoration: none; }
.btn--wa { background: #1F7A4D; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid rgba(27, 35, 71, .3); }
.bubble { background: #DCF2D9; border-radius: 16px 16px 4px 16px; padding: 14px 16px; margin-bottom: 8px; }
.bubble pre { margin: 0; white-space: pre-wrap; font-family: var(--fb); font-size: .95rem; line-height: 1.6; }
