/* Beanora: the oxblood and lantern-cream of their logo; every coffee is a postage stamp flown from Thailand. */
:root {
  --paper: #f7ecd2;
  --paper-2: #fbf4e3;
  --paper-3: #eedfbd;
  --ink: #451010;
  --ink-2: #6b2a22;
  --mute: #8a6a5c;
  --line: rgba(69, 16, 16, .18);
  --cream: #f5e3a8;
  --gold: #c9962e;
  --night: #2c0909;
  --ok: #3f6b3a;
  --err: #b0321c;
  --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --sans: "Instrument Sans", "Noto Kufi Arabic", system-ui, sans-serif;
  --hand: var(--sans);
  --brush: var(--serif);
  --r: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
html[lang="ar"] {
  --serif: "Amiri", "Bodoni Moda", serif;
  --sans: "Noto Kufi Arabic", "Instrument Sans", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--ink); color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- wordmark: their logo, a thin Bodoni "Beanora" ---------- */
.wm { direction: ltr; unicode-bidi: isolate; font: 400 1em/1 "Bodoni Moda", serif; letter-spacing: .01em; white-space: nowrap; color: var(--ink); text-decoration: none; }

/* ---------- announcement + header ---------- */
.ann { background: var(--gold); color: var(--night); text-align: center; font: 500 .84rem/1.3 var(--sans); padding: 8px 16px; }
.hdr { position: sticky; top: 0; z-index: 50; background: var(--ink); color: var(--cream); transition: box-shadow .3s; }
.hdr.scrolled { box-shadow: 0 8px 30px rgba(44, 9, 9, .3); }
.hdr .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.hdr .wm { font-size: 1.8rem; color: var(--cream); }
.hdr nav { display: flex; gap: 26px; margin-inline-start: auto; }
.hdr nav a { text-decoration: none; font-size: .95rem; opacity: .8; transition: opacity .2s; }
.hdr nav a:hover, .hdr nav a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.hbtn { background: none; color: var(--cream); border: 1px solid rgba(245, 227, 168, .45); border-radius: 999px; height: 38px; min-width: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 .85rem var(--sans); }
.hbtn:hover { border-color: var(--cream); }
.hbtn.lang { font-family: "Noto Kufi Arabic", var(--sans); }
html[lang="ar"] .hbtn.lang { font-family: "Instrument Sans", sans-serif; }
.bagbtn b { background: var(--cream); color: var(--ink); border-radius: 999px; min-width: 20px; height: 20px; font-size: .72rem; display: inline-grid; place-items: center; padding: 0 6px; transition: transform .3s var(--ease); }
.bagbtn.bump b { transform: scale(1.35); }
@media (max-width: 760px) { .hdr nav { display: none; } .hdr .wrap > a:first-child { margin-inline-end: auto; } .hdr .wm { font-size: 1.6rem; } }

/* ---------- type ---------- */
.eyebrow { font: italic 400 1.05rem var(--serif); color: var(--mute); margin: 0 0 8px; }
.h-xl { font: 400 clamp(2.8rem, 8vw, 6.4rem)/.95 var(--serif); letter-spacing: -.015em; margin: 0; }
.h-l { font: 400 clamp(2rem, 5vw, 3.5rem)/1.02 var(--serif); letter-spacing: -.01em; margin: 0; }
.h-m { font: 400 clamp(1.4rem, 3vw, 2rem)/1.1 var(--serif); margin: 0; }
html[lang="ar"] .h-xl, html[lang="ar"] .h-l, html[lang="ar"] .h-m { line-height: 1.3; letter-spacing: 0; font-weight: 700; }
.hand { font-family: var(--sans); }
.mute { color: var(--mute); }

/* ---------- buttons ---------- */
.btn { --b: var(--ink); --f: var(--cream); appearance: none; border: 1px solid var(--b); background: var(--b); color: var(--f); border-radius: 999px; padding: 14px 26px; font: 500 .95rem var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; white-space: nowrap; transition: transform .2s var(--ease), background .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.line { background: transparent; color: var(--b); }
.btn.line:hover { background: var(--b); color: var(--f); }
.btn.cream { --b: var(--cream); --f: var(--ink); }
.btn:disabled { opacity: .45; transform: none; cursor: not-allowed; }
.btn.wide { width: 100%; }
.btn .arrow { display: none; }

/* ---------- the stamp: a perforated frame around each poster ---------- */
.stamp-frame {
  --hole: 6px;
  position: relative; padding: calc(var(--hole) * 2); background: var(--paper-2);
  -webkit-mask: radial-gradient(circle, transparent calc(var(--hole) - .5px), #000 var(--hole)) calc(var(--hole) * -1) calc(var(--hole) * -1) / calc(var(--hole) * 2.4) calc(var(--hole) * 2.4) round,
                linear-gradient(#000 0 0) content-box;
  mask: radial-gradient(circle, transparent calc(var(--hole) - .5px), #000 var(--hole)) calc(var(--hole) * -1) calc(var(--hole) * -1) / calc(var(--hole) * 2.4) calc(var(--hole) * 2.4) round,
        linear-gradient(#000 0 0) content-box;
  filter: drop-shadow(0 10px 18px rgba(44, 9, 9, .18));
}
.stamp-frame img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ---------- product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 42vw), 1fr)); gap: clamp(18px, 2.6vw, 34px) clamp(12px, 2vw, 26px); }
.pcard { position: relative; text-decoration: none; display: grid; gap: 10px; align-content: start; }
.pcard .ph { position: relative; transition: transform .45s var(--ease); }
.pcard:hover .ph { transform: rotate(-1.5deg) translateY(-4px); }
.pcard .tag { position: absolute; top: 20px; inset-inline-start: 20px; z-index: 2; font: 500 .74rem var(--sans); background: var(--ink); color: var(--cream); border-radius: 999px; padding: 3px 10px; }
.pcard .stamp { position: absolute; z-index: 3; top: 44%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); border: 3px double var(--err); color: var(--err); font: 600 1.2rem var(--serif); padding: 4px 16px; border-radius: 6px; background: rgba(251, 244, 227, .86); white-space: nowrap; }
.pcard h3 { font: 400 1.25rem/1.15 var(--serif); margin: 0; }
html[lang="ar"] .pcard h3 { font-weight: 700; }
.pcard .fl { font-size: .86rem; line-height: 1.3; color: var(--mute); }
.pcard .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard .price { font-weight: 600; }
.pcard .price.soon { font-weight: 400; font-size: .88rem; color: var(--mute); }
.pcard .quick { position: absolute; bottom: 22px; inset-inline-end: 22px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: var(--cream); font-size: 1.4rem; line-height: 1; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(44, 9, 9, .3); transition: transform .2s var(--ease); }
.pcard .quick:hover { transform: scale(1.08); }
.beans { display: inline-flex; gap: 3px; vertical-align: middle; }
.beans i { width: 9px; height: 12px; border-radius: 50%; border: 1.4px solid currentColor; transform: rotate(18deg); opacity: .9; }
.beans i.on { background: currentColor; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 15px; font: 400 .92rem var(--sans); transition: .2s; color: inherit; }
.chip:hover { border-color: currentColor; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---------- sections ---------- */
section { position: relative; }
.pad { padding-block: clamp(64px, 9vw, 120px); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(26px, 4vw, 44px); }
.dark { background: var(--ink); color: var(--cream); }
.dark .eyebrow, .dark .mute { color: rgba(245, 227, 168, .65); }
.dark .chip { border-color: rgba(245, 227, 168, .3); }
.dark .chip[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.dark .pcard .fl { color: rgba(245, 227, 168, .65); }

.marquee { overflow: hidden; background: var(--gold); color: var(--night); padding: 12px 0; white-space: nowrap; }
.marquee .track { display: inline-flex; gap: 30px; animation: mq 60s linear infinite; font: italic 400 clamp(1.2rem, 2.6vw, 1.8rem) var(--serif); }
.marquee .track span::after { content: "✈"; font-style: normal; font-size: .7em; margin-inline-start: 30px; vertical-align: middle; }
@keyframes mq { to { transform: translateX(-50%); } }
html[dir="rtl"] .marquee .track { animation-name: mqr; }
html[dir="rtl"] .marquee .track span::after { display: inline-block; transform: scaleX(-1); }
@keyframes mqr { to { transform: translateX(50%); } }

/* ---------- recipe card (unused until a coffee has one) ---------- */
.recipe { background: var(--paper-2); border: 1px solid var(--ink); border-radius: 14px; padding: clamp(16px, 3vw, 26px); color: var(--ink); }
.recipe h4 { margin: 0 0 12px; font: 400 1.1rem var(--serif); }
.rgrid { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--ink); border-radius: 10px; overflow: hidden; }
.rgrid > div { padding: 10px 6px; text-align: center; border-inline-end: 1px solid var(--ink); }
.rgrid > div:last-child { border: 0; }
.rgrid span { display: block; font-size: .74rem; color: var(--mute); }
.rgrid b { font: 600 1.2rem var(--serif); }
.rtop { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--ink); border-radius: 10px; padding: 10px 16px; margin-bottom: 10px; }
.pours { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 10px; }
.pour { border: 1px solid var(--ink); border-radius: 10px; padding: 10px 6px; text-align: center; }
.pour .cup { width: 34px; height: 30px; margin: 6px auto; border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 9px 9px; position: relative; overflow: hidden; }
.pour .cup i { position: absolute; inset-inline: 0; bottom: 0; height: 0; background: var(--ink-2); transition: height 1.2s var(--ease); }
.pour.on .cup i { height: var(--fill, 60%); }
.pour b { font: 600 1.1rem var(--serif); display: block; }
.pour small, .pour .lbl { display: block; font-size: .78rem; color: var(--mute); }

/* ---------- bag drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.drawer .shade { position: absolute; inset: 0; background: rgba(44, 9, 9, .5); opacity: 0; transition: opacity .35s; }
.drawer .panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100%); background: var(--paper-2); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .45s var(--ease); box-shadow: -20px 0 60px rgba(0, 0, 0, .2); }
html[dir="rtl"] .drawer .panel { transform: translateX(-105%); }
.drawer.open { pointer-events: auto; }
.drawer.open .shade { opacity: 1; }
.drawer.open .panel { transform: none; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer .lines { flex: 1; overflow: auto; padding: 8px 22px; }
.drawer footer { padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 12px; }
.bline { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); align-items: center; }
.bline img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.bline h5 { margin: 0; font: 400 1.05rem/1.2 var(--serif); }
.bline .sub { font-size: .82rem; color: var(--mute); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 32px; height: 32px; border: 0; background: none; font-size: 1.1rem; }
.qty span { min-width: 20px; text-align: center; font-weight: 500; }
.empty { text-align: center; padding: 50px 10px; color: var(--mute); font: italic 400 1.15rem var(--serif); }
.x { background: none; border: 0; font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: .9rem; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 16px; transition: border-color .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--err); }
.field .err { color: var(--err); font-size: .85rem; display: none; }
.field.bad .err { display: block; }
.radio { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: .2s; background: var(--paper-2); }
.radio:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.radio input { accent-color: var(--ink); margin-top: 4px; }
.radio b { display: block; font-weight: 500; }
.radio small { color: var(--mute); }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--cream); padding: 70px 0 34px; }
.foot .wm { color: var(--cream); font-size: clamp(3.4rem, 12vw, 9rem); display: block; line-height: .9; }
.foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-top: 40px; }
.foot a { text-decoration: none; opacity: .75; }
.foot a:hover { opacity: 1; }
.foot .tag { font: italic 400 1.3rem var(--serif); margin: 0 0 6px; }
.foot small { opacity: .55; display: block; margin-top: 34px; line-height: 1.7; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot h6 { font: 400 .85rem var(--sans); opacity: .5; margin: 0 0 12px; }
@media (max-width: 760px) { .foot .cols { grid-template-columns: 1fr 1fr; } .foot .cols > :first-child { grid-column: 1 / -1; } }

.toast { position: fixed; z-index: 95; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 160%); background: var(--ink); color: var(--cream); border-radius: 999px; padding: 12px 20px; font-size: .92rem; transition: transform .45s var(--ease); max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }

/* Only cards fade in, once; sections stay put. */
.reveal { opacity: 0; transition: opacity .7s var(--ease); }
.reveal.in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; }
}
