/* «مقهى نموذج» Namoothaj Café: a SAMPLE design by Khalesni, for a made-up café.
   It has its own warm coffee palette and display font on purpose, to show a style that is
   different from Khalesni's own site. Khalesni's colours appear only in the sample banner
   and the demo note, because those are Khalesni speaking.
   The idea: a café's own paper. The coffee sits on a printed menu card, the sweets are chalked on
   the board (they change every day), and the staff leave short notes in Ruqaa, the hand people
   actually write in here.
   Type scale (five sizes): 14 / 17 / 22 / 32–48 / 44–80 px. Spacing runs on a 4 px grid.
   Contrast (WCAG): espresso on cream 14:1; mocha on cream 6.7:1; caramel-ink on cream 5.1:1;
   gold on espresso 8.8:1; espresso on caramel 5.7:1; latte on espresso 11:1. */

:root {
  --espresso: #2B1B12;
  --roast: #4B2E1F;
  --mocha: #6F4A33;
  --caramel: #C98A3D;
  --caramel-ink: #8C5A1E;
  --gold: #E3B57C;
  --cream: #F6EEE3;
  --latte: #E7D6C1;
  --foam: #FFFBF6;
  --rule: rgba(43, 27, 18, 0.16);      /* hairlines on light paper */
  --rule-dark: rgba(246, 238, 227, 0.2); /* hairlines on espresso */
  --k-ink: #06323A;   /* Khalesni: sample banner and demo note only */
  --k-teal: #0E6670;
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", "Geeza Pro", Tahoma, Arial, sans-serif;
  --display: "Reem Kufi", "IBM Plex Sans Arabic", "Geeza Pro", sans-serif;
  --hand: "Aref Ruqaa", "Reem Kufi", "Geeza Pro", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--espresso);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0 0 0.5em; font-family: var(--display); font-weight: 700; line-height: 1.3; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, dl { margin: 0; padding: 0; list-style: none; }
a { color: var(--caramel-ink); text-underline-offset: 0.25em; }
:focus-visible { outline: 3px solid var(--espresso); outline-offset: 3px; }
.sample-banner :focus-visible, .cafe-hero :focus-visible, .menu-board :focus-visible, .order-band :focus-visible, .cafe-footer :focus-visible { outline-color: var(--cream); }
[id] { scroll-margin-top: 84px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100;
  padding: 0.75rem 1rem; border-radius: 4px; background: var(--espresso); color: var(--cream);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* The staff's handwriting: short notes only, never anything you need in order to buy */
.hand { font-family: var(--hand); font-weight: 400; font-size: 1.375rem; line-height: 1.5; color: var(--caramel-ink); }

/* ---------- Sample banner (Khalesni's note) ---------- */
.sample-banner { background: var(--k-ink); color: #fff; font-size: 0.875rem; }
.banner-inner { display: flex; align-items: center; gap: 0.75rem; padding-block: 0.5rem; }
.banner-inner img { flex: none; width: 32px; height: 32px; padding: 4px; border-radius: 8px; background: #fff; }
.banner-inner p { flex: 1; margin: 0; line-height: 1.5; }
.banner-inner p span { display: block; font-size: 0.875em; opacity: 0.88; }
.banner-inner a {
  flex: none;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}
.banner-inner a:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Header: a plain bar on the café's own paper ---------- */
.cafe-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
}
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.cafe-logo { display: inline-flex; align-items: center; gap: 0.75rem; margin-inline-end: auto; color: var(--espresso); text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--espresso); color: var(--gold); }
.logo-mark svg { width: 34px; height: 34px; }
.logo-text b { display: block; font-family: var(--display); font-size: 1.375rem; line-height: 1.15; }
.logo-text small { display: block; margin-top: 0.25rem; color: var(--mocha); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.2em; line-height: 1.2; }
.cafe-header nav ul { display: flex; gap: 0.25rem; }
.cafe-header nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.75rem;
  color: var(--roast); font-weight: 600; text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; transition: text-decoration-color 0.25s var(--ease), color 0.25s var(--ease);
}
.cafe-header nav a:hover { color: var(--espresso); text-decoration-color: var(--caramel); }
@media (max-width: 640px) { .cafe-header nav { display: none; } }

/* ---------- Buttons ---------- */
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: transform 0.3s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.c-btn svg { flex: none; }
.c-btn-caramel { background: var(--caramel); color: var(--espresso); }
.c-btn-caramel:hover { background: #D99B4D; color: var(--espresso); }
.c-btn-ghost { border-color: rgba(246, 238, 227, 0.45); color: var(--cream); }
.c-btn-ghost:hover { border-color: var(--cream); background: rgba(246, 238, 227, 0.1); color: var(--cream); }
.c-btn-dark { background: var(--espresso); color: var(--cream); }
.c-btn-dark:hover { background: var(--roast); color: var(--cream); }
.c-btn-outline { border-color: rgba(43, 27, 18, 0.3); color: var(--espresso); }
.c-btn-outline:hover { border-color: var(--espresso); background: var(--foam); color: var(--espresso); }
.c-btn-sm { min-height: 44px; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.c-btn:active { transform: translateY(1px); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .c-btn:hover { transform: translateY(-1px); } }

/* ---------- Hero ---------- */
.cafe-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem);
  background: var(--espresso);
  color: var(--cream);
}
.cafe-hero-inner { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .cafe-hero-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 4rem; } }
.kicker {
  display: flex; align-items: center; gap: 0.5rem; max-width: 30rem; margin-bottom: 1.5rem;
  color: var(--gold); font-size: 0.9375rem; font-weight: 600; line-height: 1.6;
}
.kicker svg { flex: none; }
.kicker::after { content: ""; flex: 1; min-width: 2rem; height: 1px; margin-inline-start: 0.5rem; background: var(--rule-dark); }
.cafe-hero h1 { margin-bottom: 0.25em; color: var(--cream); font-size: clamp(2.75rem, 1.5rem + 5.6vw, 5rem); line-height: 1.2; }
.en-line { margin-bottom: 1.5rem; color: var(--gold); font-size: 1.125rem; }
.cafe-lead { max-width: 32rem; color: var(--latte); font-size: 1.125rem; }
.cafe-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0; }
@media (max-width: 520px) { .cafe-actions { display: grid; } }

/* Three plain facts under a hairline, like the foot of a printed menu */
.hero-facts { display: flex; flex-wrap: wrap; max-width: 34rem; padding-top: 1rem; border-top: 1px solid var(--rule-dark); font-size: 0.875rem; font-weight: 600; line-height: 1.5; }
.hero-facts li { padding-inline: 1rem; border-inline-start: 1px solid var(--rule-dark); }
.hero-facts li:first-child { padding-inline-start: 0; border-inline-start: 0; }
.hero-facts span { display: block; color: var(--gold); font-weight: 500; }

/* The cup on its saucer: flat shapes in the palette, nothing glowing or floating */
/* Phones: a 3:2 strip, cup on the left, the note on the right. Desktop: a square beside the words. */
.cafe-art { position: relative; order: -1; justify-self: start; width: min(100%, 380px); aspect-ratio: 3 / 2; }
@media (min-width: 900px) { .cafe-art { order: 0; width: min(100%, 400px); aspect-ratio: 1; } }
.art-disc { position: absolute; bottom: 0; inset-inline-end: 4%; width: 64%; aspect-ratio: 1; border-radius: 50%; background: var(--roast); }
.art-cup { position: absolute; bottom: 4%; inset-inline-end: 5%; width: 56%; height: auto; aspect-ratio: 1; color: var(--latte); }
@media (min-width: 900px) {
  .art-disc { width: 86%; }
  .art-cup { inset-inline-end: 10%; width: 74%; }
}
.bean { position: absolute; width: 5%; color: var(--caramel); }
.b1 { top: 8%; inset-inline-end: 2%; transform: rotate(-25deg); }
.b2 { bottom: 30%; inset-inline-start: 4%; width: 4%; color: var(--gold); transform: rotate(30deg); }
.b3 { bottom: 2%; inset-inline-start: 18%; width: 4.5%; transform: rotate(60deg); }
@media (max-width: 899px) { .b2 { display: none; } }
.art-note {
  position: absolute; top: 8%; inset-inline-start: 0; margin: 0;
  max-width: 34%; color: var(--gold); font-size: 1.125rem; line-height: 1.45; transform: rotate(-4deg);
}
.art-note svg { width: 48px; height: 33px; margin-top: 0.25rem; margin-inline-start: 1.5rem; color: var(--gold); }
@media (min-width: 900px) { .art-note { top: 0; max-width: 36%; font-size: 1.25rem; } }

/* ---------- Sections ---------- */
.cafe-section { padding-block: clamp(4rem, 2.5rem + 6vw, 7.5rem); }
.cafe-section.alt { background: var(--foam); }

/* Section heads: a numbered caption, the name, and a hairline that runs to the far margin */
.c-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0.5rem 1.25rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); padding-bottom: 1rem; border-bottom: 1px solid var(--rule);
}
.c-num { font-family: var(--display); font-size: 1.375rem; font-weight: 600; line-height: 1; color: var(--caramel-ink); }
.c-head h2 { margin: 0; font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); line-height: 1.2; }
.c-head .example-note { grid-column: 1 / -1; }
@media (min-width: 820px) {
  .c-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .c-head .example-note { grid-column: auto; align-self: end; }
}
h2 [lang="en"], h3 [lang="en"] { font-family: var(--font); font-weight: 500; color: var(--caramel-ink); }
h2 [lang="en"] { margin-inline-start: 0.5em; font-size: 0.45em; }
h3 [lang="en"] { margin-inline-start: 0.5em; font-size: 0.6em; }
.example-note {
  max-width: 22rem; margin: 0; padding-inline-start: 0.75rem; border-inline-start: 3px solid var(--caramel);
  color: var(--roast); font-size: 0.875rem; line-height: 1.6;
}
.example-note span { display: block; }

/* ---------- Menu: a printed card for the coffee, the board for the sweets ---------- */
.menu-grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 820px) { .menu-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; } }
.menu-col { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.menu-col h3 { margin-bottom: 0.5rem; font-size: 1.75rem; }
.menu-card { padding-inline: 0; }
.menu-card h3 { padding-bottom: 0.75rem; border-bottom: 2px solid var(--espresso); }

.menu-list li {
  display: grid; grid-template-columns: auto minmax(1.5rem, 1fr) auto; column-gap: 0.5rem; align-items: baseline;
  padding-block: 1.25rem; border-bottom: 1px solid var(--rule);
}
.menu-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.menu-list b { font-family: var(--display); font-size: 1.375rem; font-weight: 600; line-height: 1.4; }
.menu-list .leader { align-self: end; margin-bottom: 0.5rem; border-bottom: 2px dotted rgba(43, 27, 18, 0.35); }
.menu-list .price { display: grid; justify-items: end; color: var(--espresso); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price em { color: var(--mocha); font-size: 0.75rem; font-style: normal; font-weight: 600; line-height: 1.4; }
.menu-list small, .menu-list p { grid-column: 1 / -1; }
.menu-list small { color: var(--caramel-ink); font-size: 0.875rem; font-weight: 600; line-height: 1.4; }
.menu-list p { margin: 0.25rem 0 0; color: var(--mocha); font-size: 0.9375rem; line-height: 1.6; }
.menu-list .item-note { margin-top: 0.5rem; color: var(--caramel-ink); font-size: 1.25rem; line-height: 1.4; transform: rotate(-2deg); transform-origin: right; }

/* The board: espresso, chalk-coloured type, the sweets of the day */
.menu-board { border-radius: 4px; background: var(--espresso); color: var(--cream); }
.menu-board h3 { margin-bottom: 0; font-family: var(--hand); font-size: 2.25rem; font-weight: 700; line-height: 1.3; color: var(--cream); }
.menu-board h3 [lang="en"] { color: var(--gold); font-size: 0.45em; }
.menu-board .board-note { margin: 0 0 0.5rem; color: var(--gold); font-size: 1.25rem; transform: rotate(-2deg); transform-origin: right; }
.menu-board .menu-list li { border-bottom-color: var(--rule-dark); }
.menu-board .menu-list .leader { border-bottom-color: rgba(227, 181, 124, 0.45); }
.menu-board .menu-list .price { color: var(--cream); }
.menu-board .price em, .menu-board .menu-list small { color: var(--gold); }
.menu-board .menu-list p { color: var(--latte); }

/* ---------- Hours and location ---------- */
.visit-grid { display: grid; gap: 3rem; }
@media (min-width: 820px) { .visit-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4rem; align-items: start; } }
.visit-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-bottom: 1rem; font-size: 1.75rem; }
.visit-card h3 svg { color: var(--caramel-ink); }
.hours { border-top: 2px solid var(--espresso); }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 600; text-align: end; }
.hours-note { margin: 1rem 0 0; transform: rotate(-2deg); transform-origin: right; }
.small-note { color: var(--mocha); font-size: 0.875rem; }
.visit-card .small-note:last-child { margin: 0.75rem 0 0; }
.map { position: relative; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 1rem; border-radius: 4px; }
.map svg { width: 100%; height: 100%; }
.map-tag { position: absolute; top: 0.75rem; inset-inline-start: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 4px; background: var(--foam); color: var(--roast); font-size: 0.75rem; font-weight: 700; line-height: 1.4; }
.address { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }

/* ---------- Order band ---------- */
.order-band { padding-block: clamp(3rem, 2rem + 4vw, 5rem); background: var(--roast); color: var(--cream); }
.order-inner { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 820px) { .order-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; } }
.order-band h2 { margin-bottom: 0.25em; color: var(--cream); font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); }
.order-band h2 [lang="en"] { color: var(--gold); }
.order-band p { margin: 0; color: var(--latte); }
.order-band .order-note { margin-top: 0.75rem; color: var(--gold); transform: rotate(-2deg); transform-origin: right; }
.order-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 520px) { .order-actions { display: grid; } }

/* ---------- Demo note (Khalesni's note) ---------- */
.demo-note { padding-block: clamp(2.5rem, 2rem + 3vw, 4rem); }
.demo-card {
  display: flex; align-items: flex-start; gap: 1rem; max-width: 52rem; margin-inline: auto;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  border: 2px dashed rgba(6, 50, 58, 0.25); border-radius: 16px; background: #fff; color: var(--k-ink);
}
.demo-card img { flex: none; width: 44px; height: 44px; }
.demo-card h2 { font-family: var(--font); font-size: 1.25rem; color: var(--k-ink); }
.demo-card h2 [lang="en"] { display: block; margin: 0.25em 0 0; color: #46636A; font-size: 0.75em; }
.demo-card p { color: #46636A; }
.demo-en { font-size: 0.9375rem; }
.k-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.5rem 1.25rem; border-radius: 999px; background: var(--k-teal); color: #fff; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; }
.k-btn:hover { background: #0A4F57; color: #fff; }
.k-btn .k-nw { white-space: nowrap; }
@media (max-width: 520px) { .demo-card { flex-direction: column; } }

/* ---------- Footer: the name returns, large ---------- */
.cafe-footer { padding-block: 3rem 2rem; background: var(--espresso); color: var(--latte); font-size: 0.875rem; }
.cafe-footer p { margin: 0; }
.footer-name {
  margin-bottom: 1.5rem !important; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule-dark);
  font-family: var(--display); font-size: clamp(3rem, 1.5rem + 7vw, 6.5rem); font-weight: 700; line-height: 1.1; color: var(--cream);
}
.cafe-footer p > span { display: block; margin-top: 0.25rem; opacity: 0.9; }
.cafe-footer a { color: var(--gold); }
@media (max-width: 819px) { .cafe-footer { padding-bottom: 6rem; } }

/* ---------- Sticky order bar on phones (cafe.js hides it while another order button is on screen) ---------- */
.order-bar {
  position: fixed; z-index: 50; inset-inline: 16px; bottom: 16px;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 54px;
  border-radius: 999px; background: var(--caramel); color: var(--espresso); font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(43, 27, 18, 0.55);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), visibility 0s;
}
.order-bar.is-hidden { transform: translateY(calc(100% + 24px)); opacity: 0; visibility: hidden; transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), visibility 0s 0.35s; }
@media (min-width: 820px) { .order-bar { display: none; } }

/* Scroll reveal (only when ../script.js runs and motion is allowed): a short rise, once */
.reveal-ready [data-reveal] { transition: opacity 0.6s var(--ease) var(--rd, 0s), translate 0.6s var(--ease) var(--rd, 0s); }
.reveal-ready [data-reveal]:not(.is-in) { opacity: 0; translate: 0 16px; }
[data-reveal="1"] { --rd: 0.08s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-ready [data-reveal] { opacity: 1 !important; translate: none !important; }
}
@media print {
  .reveal-ready [data-reveal] { opacity: 1 !important; translate: none !important; }
  .order-bar { display: none; }
  .cafe-header { position: static; }
}
