/* MK7 Beanz: kraft paper, espresso ink, and the hand-lettered notes from their spec cards. */
@property --sheet-paper { syntax: "<color>"; inherits: true; initial-value: #e7ddcc; }
:root {
  --paper: #e7ddcc;
  --paper-2: #efe7d9;
  --paper-3: #ddd0bb;
  --ink: #2a1c12;
  --ink-2: #4b3829;
  --mute: #7d6d5d;
  --line: rgba(42, 28, 18, .16);
  --roast: #6a3b1e;
  --crema: #c08a4e;
  --night: #16100b;
  --ok: #3f6b3a;
  --err: #a2381f;
  --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --hand: "Patrick Hand SC", "Comic Sans MS", cursive;
  --brush: "Permanent Marker", var(--hand);
  --sans: "Jost", "Noto Kufi Arabic", system-ui, sans-serif;
  --r: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
html[lang="ar"] {
  --serif: "Aref Ruqaa", "Bodoni Moda", serif;
  --hand: "Noto Kufi Arabic", "Patrick Hand SC", sans-serif;
  --sans: "Noto Kufi Arabic", "Jost", 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;
}
/* paper grain over everything, drawn once */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
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(--paper); }
:focus-visible { outline: 2px solid var(--roast); outline-offset: 3px; }

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

/* ---------- wordmark: Bodoni caps with a coffee bean in the A ---------- */
.wm { direction: ltr; unicode-bidi: isolate; font-family: "Bodoni Moda", serif; font-weight: 600; letter-spacing: .01em; line-height: .9; white-space: nowrap; color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; }
.wm .a { position: relative; display: inline-block; }
.wm .a::after {
  content: ""; position: absolute; left: 50%; top: 60%; width: .17em; height: .26em; transform: translate(-50%, -50%) rotate(28deg);
  background: currentColor; border-radius: 50%;
  -webkit-mask: radial-gradient(ellipse 18% 60% at 50% 50%, transparent 92%, #000 100%); mask: radial-gradient(ellipse 18% 60% at 50% 50%, transparent 92%, #000 100%);
}
.wm.ghost { color: rgba(42, 28, 18, .42); }

/* ---------- announcement + header ---------- */
.ann { background: var(--ink); color: var(--paper); text-align: center; font: 400 .82rem/1.3 var(--hand); letter-spacing: .06em; padding: 8px 16px; }
.hdr { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.hdr.scrolled { border-color: var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.hdr .wm { font-size: 1.55rem; }
.hdr nav { display: flex; gap: 22px; margin-inline-start: auto; }
.hdr nav a { text-decoration: none; font: 400 1.02rem var(--hand); letter-spacing: .05em; position: relative; }
.hdr nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; background: var(--ink); transform: scaleX(0); transition: transform .35s var(--ease); transform-origin: left; border-radius: 2px; }
.hdr nav a:hover::after, .hdr nav a[aria-current]::after { transform: scaleX(1); }
.hbtn { background: none; border: 1.5px solid var(--ink); 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.lang { font-family: "Noto Kufi Arabic", var(--sans); }
html[lang="ar"] .hbtn.lang { font-family: "Jost", sans-serif; }
.bagbtn b { background: var(--ink); color: var(--paper); 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 .wm { font-size: 1.3rem; margin-inline-end: auto; }
}

/* ---------- type ---------- */
.eyebrow { font: 400 .95rem var(--hand); letter-spacing: .12em; color: var(--mute); text-transform: uppercase; }
.h-xl { font: 500 clamp(2.6rem, 8vw, 6.6rem)/.92 var(--serif); letter-spacing: -.01em; margin: 0; }
.h-l { font: 500 clamp(2rem, 5vw, 3.6rem)/1 var(--serif); margin: 0; }
.h-m { font: 500 clamp(1.4rem, 3vw, 2rem)/1.1 var(--serif); margin: 0; }
html[lang="ar"] .h-xl, html[lang="ar"] .h-l { line-height: 1.25; }
.hand { font-family: var(--hand); }
.mute { color: var(--mute); }

/* ---------- buttons ---------- */
.btn { --b: var(--ink); appearance: none; border: 1.5px solid var(--b); background: var(--b); color: var(--paper); border-radius: 999px; padding: 14px 26px; font: 500 .92rem var(--sans); letter-spacing: .04em; 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(--ink); }
.btn.line:hover { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: .45; transform: none; cursor: not-allowed; }
.btn.wide { width: 100%; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
html[lang="ar"] .btn .arrow { transform: scaleX(-1); }
html[lang="ar"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }

/* ---------- the spec sheet: bag on paper with hand notes ---------- */
.sheet { position: relative; display: grid; grid-template-columns: 1fr minmax(240px, 400px) 1fr; align-items: center; gap: clamp(8px, 2vw, 28px); }
.sheet .col { display: grid; gap: clamp(18px, 3.2vw, 40px); }
.sheet .col.l { justify-items: end; text-align: end; }
.sheet .col.r { justify-items: start; text-align: start; }
.bagstage { position: relative; aspect-ratio: 3 / 4.1; }
.bagstage .bagimg { position: absolute; bottom: 0; left: 50%; translate: -50% 0; height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 100%), linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 100%), linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-composite: intersect;
  transition: opacity .55s var(--ease), transform .7s var(--ease); }
.bagstage .bagimg.out { opacity: 0; transform: translateY(18px) scale(.97); }
.bagstage .bagimg.pack { -webkit-mask-image: none; mask-image: none; height: 96%; filter: drop-shadow(0 26px 30px rgba(42, 28, 18, .22)); }
.bagstage .bagimg.photo { inset: 0; translate: none; width: 100%; object-fit: cover; border-radius: var(--r); -webkit-mask-image: none; mask-image: none; box-shadow: 0 30px 60px rgba(42, 28, 18, .2); }
.note { position: relative; max-width: 220px; font: 400 clamp(.95rem, 1.5vw, 1.12rem)/1.15 var(--hand); letter-spacing: .03em; text-transform: uppercase; }
html[lang="ar"] .note { text-transform: none; line-height: 1.5; }
.note .k { display: inline-block; padding: 4px 10px 2px; background: rgba(42, 28, 18, .08); border-radius: 3px 8px 4px 9px; transform: rotate(-2deg); margin-bottom: 6px; }
.note .v { display: block; color: var(--ink-2); }
.note ul { list-style: none; padding: 0; margin: 0; }
.note li::before { content: "• "; }
.note .crown { display: block; width: 26px; height: 18px; margin-bottom: 2px; }
.col.l .note .crown { margin-inline-start: auto; }
.note .doodle { width: 34px; height: 34px; display: inline-block; vertical-align: middle; margin-inline-start: 6px; opacity: .85; }
.note svg.arr { position: absolute; width: 70px; height: 46px; top: 50%; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.col.l .note svg.arr { inset-inline-start: calc(100% + 4px); }
.col.r .note svg.arr { inset-inline-end: calc(100% + 4px); transform: scaleX(-1); }
html[dir="rtl"] .col.l .note svg.arr { transform: scaleX(-1); }
html[dir="rtl"] .col.r .note svg.arr { transform: none; }
.note svg.arr path { stroke-dasharray: 140; stroke-dashoffset: 140; transition: stroke-dashoffset 1s var(--ease) .25s; }
.note.in svg.arr path { stroke-dashoffset: 0; }
.note { opacity: 0; transform: translateY(8px) rotate(-1deg); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.note.in { opacity: 1; transform: none; }
.note.swap { opacity: 0; transform: translateY(-6px) rotate(1deg); transition-duration: .25s; }
.beans { display: inline-flex; gap: 4px; vertical-align: middle; }
.beans i { width: 13px; height: 17px; border-radius: 50%; border: 1.6px solid var(--ink); transform: rotate(18deg); position: relative; }
.beans i.on { background: var(--ink); }
.beans i::after { content: ""; position: absolute; left: 50%; top: 12%; bottom: 12%; width: 1.4px; background: var(--paper); transform: translateX(-50%) rotate(-12deg); border-radius: 2px; }
.beans i:not(.on)::after { background: var(--ink); }
@media (max-width: 860px) {
  .sheet { grid-template-columns: 1fr 1fr; }
  .sheet .bagstage { grid-column: 1 / -1; grid-row: 1; width: min(78vw, 360px); justify-self: center; }
  .sheet .col.l, .sheet .col.r { justify-items: start; text-align: start; }
  .note svg.arr { display: none; }
  .note { max-width: none; }
  .col.l .note .crown { margin-inline-start: 0; }
}

/* ---------- product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 44vw), 1fr)); gap: clamp(12px, 2vw, 26px); }
.pcard { position: relative; text-decoration: none; display: grid; gap: 10px; }
.pcard .ph { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--paper-2); isolation: isolate; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pcard .ph img.bag { position: absolute; bottom: 0; left: 50%; translate: -50% 0; width: auto; height: 92%; max-width: 100%; object-fit: contain; transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%), linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%), linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%); mask-composite: intersect; }
.pcard:hover .ph img { transform: scale(1.04) rotate(-.6deg); }
.pcard .ph img.bag.pack { -webkit-mask-image: none; mask-image: none; height: 86%; bottom: 4%; filter: drop-shadow(0 14px 14px rgba(42, 28, 18, .2)); }
.pcard:hover .ph img.bag { transform: translateY(-6px) rotate(-1.5deg); }
.pcard .tag { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; font: 400 .78rem var(--hand); letter-spacing: .08em; background: var(--paper); border-radius: 999px; padding: 4px 10px; text-transform: uppercase; }
.pcard .stamp { position: absolute; z-index: 3; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); border: 3px solid var(--err); color: var(--err); font: 400 1.4rem var(--brush); padding: 4px 14px; border-radius: 8px; background: rgba(239, 231, 217, .78); letter-spacing: .04em; white-space: nowrap; }
.pcard h3 { font: 500 1.22rem/1.15 var(--serif); margin: 0; }
.pcard .fl { font: 400 .95rem/1.2 var(--hand); color: var(--ink-2); letter-spacing: .03em; }
.pcard .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard .price { font-weight: 500; }
.pcard .price.soon { font: 400 .9rem var(--hand); color: var(--mute); }
.pcard .quick { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); font-size: 1.4rem; line-height: 1; display: grid; place-items: center; transform: scale(.6); opacity: 0; transition: .3s var(--ease); }
.pcard:hover .quick, .pcard:focus-within .quick { transform: none; opacity: 1; }
@media (hover: none) { .pcard .quick { transform: none; opacity: 1; } }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 15px; font: 400 .95rem var(--hand); letter-spacing: .04em; transition: .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- sections ---------- */
section { position: relative; }
.pad { padding-block: clamp(64px, 10vw, 130px); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(26px, 4vw, 46px); }

.marquee { overflow: hidden; border-block: 1.5px solid var(--ink); padding: 14px 0; white-space: nowrap; }
.marquee .track { display: inline-flex; gap: 34px; animation: mq 46s linear infinite; font: italic 500 clamp(1.4rem, 3vw, 2.2rem) var(--serif); }
.marquee .track span::after { content: "✦"; font-style: normal; font-size: .6em; margin-inline-start: 34px; vertical-align: middle; color: var(--crema); }
@keyframes mq { to { transform: translateX(-50%); } }
html[dir="rtl"] .marquee .track { animation-name: mqr; }
@keyframes mqr { to { transform: translateX(50%); } }

/* ---------- recipe card (their xBloom cards) ---------- */
.recipe { background: var(--paper-2); border: 2px solid var(--ink); border-radius: 14px; padding: clamp(16px, 3vw, 26px); color: var(--ink); position: relative; }
.recipe h4 { margin: 0 0 12px; font: 400 .95rem var(--hand); letter-spacing: .2em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.recipe h4::after { content: ""; flex: 1; height: 1.5px; background: var(--ink); }
.rgrid { display: grid; grid-template-columns: repeat(5, 1fr); border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; }
.rgrid > div { padding: 10px 6px; text-align: center; border-inline-end: 1.5px solid var(--ink); }
.rgrid > div:last-child { border: 0; }
.rgrid span { display: block; font: 400 .72rem var(--hand); letter-spacing: .08em; color: var(--ink-2); text-transform: uppercase; }
.rgrid b { font: 600 1.2rem var(--serif); }
.rtop { display: flex; justify-content: space-between; gap: 12px; border: 1.5px solid var(--ink); border-radius: 10px; padding: 10px 16px; margin-bottom: 10px; align-items: center; }
.rtop b { font: 600 1.35rem var(--serif); }
.pours { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 10px; }
.pour { border: 1.5px solid var(--ink); border-radius: 10px; padding: 10px 6px; text-align: center; position: relative; overflow: hidden; }
.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(--roast); transition: height 1.2s var(--ease); }
.pour.on .cup i { height: var(--fill, 60%); }
.pour b { font: 600 1.2rem var(--serif); display: block; }
.pour small { display: block; font: 400 .82rem var(--hand); color: var(--ink-2); }
.pour .lbl { font: 400 .78rem var(--hand); letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 520px) { .rgrid { grid-template-columns: repeat(3, 1fr); } .rgrid > div:nth-child(3) { border-inline-end: 0; } .rgrid > div:nth-child(-n+3) { border-bottom: 1.5px solid var(--ink); } .pours { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } }

/* ---------- bag drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.drawer .shade { position: absolute; inset: 0; background: rgba(22, 16, 11, .45); 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, .18); }
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: 80px; object-fit: contain; background: var(--paper); border-radius: 10px; }
.bline h5 { margin: 0; font: 500 1.02rem/1.2 var(--serif); }
.bline .sub { font: 400 .85rem var(--hand); color: var(--mute); }
.qty { display: inline-flex; align-items: center; border: 1.5px 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: 400 1.1rem var(--hand); }
.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: 400 .95rem var(--hand); letter-spacing: .05em; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; background: var(--paper-2); border: 1.5px 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: 1.5px 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(--paper); padding: 70px 0 34px; margin-top: 0; }
.foot .wm { color: var(--paper); font-size: clamp(2.6rem, 9vw, 7.5rem); }
.foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-top: 40px; }
.foot a { text-decoration: none; opacity: .8; }
.foot a:hover { opacity: 1; }
.foot .tag { font: 400 1.1rem var(--brush); letter-spacing: .08em; opacity: .85; }
.foot small { opacity: .6; 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 .9rem var(--hand); letter-spacing: .14em; text-transform: uppercase; opacity: .55; 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%, 140%); background: var(--ink); color: var(--paper); 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); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .note { opacity: 1; transform: none; }
  .note svg.arr path { stroke-dashoffset: 0; }
}
