/* =========================================================================
   Leocha · Golden Pride (client's choice, 2026-11-20)
   Night and Lion gold for the header, the Home hero, the Moon Bloom band,
   Our story and the footer; the warm silver light ground (--ivory) for the
   Menu and the reading pages. Gold pill buttons, the hatched gold seal, and
   every menu picture on a Night tile. Each drink colour appears only with its
   own drink (set by data-colour).

   Sections: 1 fonts · 2 tokens · 3 base · 4 layout · 5 components · Night ·
   6 header and footer · 7 Home · 7b crest entrance · 7c Moon Bloom 3D · 8 Menu · 9 Order · 10 Our story ·
   11 Visit · 12 Offices and events · 13 404 and QR card ·
   14 Arabic · 15 responsive · 16 reduced motion · 17 print
   ========================================================================= */

/* ---------- 1. Fonts (self-hosted, latin + arabic subsets only) ---------- */
@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/im-fell-english-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/im-fell-english-400i-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/figtree-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Aref Ruqaa"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/aref-ruqaa-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-600-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }

/* ---------- 2. Tokens ---------- */
:root {
  /* brand (from the brief; Ivory changed by the client, 2026-11-20) */
  --night: #0F0D0A;
  --ivory: #E9E6DF;     /* warm silver: the light ground. Change it here and every derived shade follows */
  --gold: #C9A227;      /* Lion gold: on Night text and buttons; on silver only lines, never text */
  --deep: #7A5C10;      /* Deep gold: text, prices, links and the main button on silver (5.0:1, 5.5:1 on cards) */
  --green: #2F6B3F;     /* matcha only */
  --red: #B23A36;       /* hibiscus, strawberry matcha only */
  --blue: #2C5AA0;      /* Moon Bloom before the lemon */
  --purple: #6B47A0;    /* Moon Bloom after the lemon */
  /* derived from the brand colours (logged in PROJECT_LOG.md) */
  --paper: color-mix(in srgb, var(--ivory), #fff 45%);   /* cards and panels on silver */
  --field: color-mix(in srgb, var(--ivory), #fff 70%);   /* form fields */
  --ivory-muted: color-mix(in srgb, var(--ivory) 80%, var(--night)); /* small text on Night */
  --raised: #1D1914;    /* surfaces on Night */
  --ink-muted: #4D463B; /* small text on silver, 7.5:1 */
  --deep-dark: #5E470C; /* button hover on silver */
  --gold-light: color-mix(in srgb, var(--gold), #fff 18%); /* button hover on Night */
  --gold-line: rgb(201 162 39 / .5);
  --line: rgb(15 13 10 / .16);
  --line-strong: rgb(15 13 10 / .3);
  --error: #8E2622;
  --error-bg: #F7E4DF;

  --serif: "IM Fell English", "Aref Ruqaa", Georgia, "Times New Roman", serif;
  --sans: "Figtree", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

  --radius: 10px;       /* fields, panels */
  --radius-card: 14px;  /* menu cards */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* the colour a drink (or family) is allowed to use */
[data-colour] { --c: var(--deep); }
[data-colour="green"] { --c: var(--green); }
[data-colour="red"] { --c: var(--red); }
[data-colour="blue"] { --c: var(--blue); }
[data-colour="purple"] { --c: var(--purple); }

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--ivory); color: var(--night);
  font: 400 17px/1.6 var(--sans); font-synthesis: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body[data-page="story"] { background: var(--night); }   /* Our story is a Night page */
img, svg { display: block; max-width: 100%; height: auto; }
/* Image protection: photos and engravings can't be dragged out, selected, or saved
   by a long press on phones. pointer-events: none lets taps and clicks fall through
   to the link, card or + button around the picture. Every <img> also carries
   draggable="false", and main.js section 13 blocks the right-click menu over
   pictures only. The 3D Moon Bloom is a <canvas>, so it stays interactive. */
img, svg.lc {
  -webkit-user-select: none; user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}
/* A link that holds a picture (header crest, Home doors) would carry it along when dragged */
a:has(img, svg.lc) { -webkit-user-drag: none; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
a { color: var(--deep); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.4vw, 64px); letter-spacing: -.005em; }
h2 { font-size: clamp(32px, 3.6vw, 46px); }
.price, data, .line-total, .order-total strong, output, .hours dd { font-variant-numeric: tabular-nums lining-nums; }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 2px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px;
  background: var(--gold); color: var(--night); border-radius: var(--radius); font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- 4. Layout ---------- */
.wrap { width: min(100% - 40px, 1200px); margin-inline: auto; }
main { display: block; }
.page-head { padding-block: var(--s5) var(--s4); }
.page-head .lede { margin-top: var(--s2); }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-muted); max-width: 46ch; }
.note { font-size: 15px; color: var(--ink-muted); }

/* ---------- 5. Components ---------- */

/* buttons: Golden Pride pills; the main action is Deep gold on silver, Lion gold on Night */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px;
  font-size: 17px; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn svg { width: 22px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--deep); color: var(--ivory); }
.btn-primary:hover { background: var(--deep-dark); }
.btn-quiet { background: transparent; color: var(--deep); border-color: var(--deep); }
.btn-quiet:hover { background: var(--paper); }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 18px; }
.btn-block { width: 100%; }
.link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--deep); }
.link-btn {
  min-height: 44px; padding: 0; background: none; border: 0; color: var(--deep);
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

/* the gold glint: one sweep on tap, never loops */
.btn-primary::after, .add::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgb(255 240 190 / .85) 50%, transparent 60%) 100% 0 / 300% 100% no-repeat;
  opacity: 0;
}
.glint::after { animation: glint .65s var(--ease); }
@keyframes glint { 0% { opacity: 1; background-position: 100% 0; } 100% { opacity: 1; background-position: 0 0; } }
:dir(rtl).glint::after { animation-name: glint-rtl; }
@keyframes glint-rtl { 0% { opacity: 1; background-position: 0 0; } 100% { opacity: 1; background-position: 100% 0; } }

/* + on every item, in the drink's own colour (gold drinks: Deep gold) */
.add {
  position: relative; flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--c, var(--deep)); color: var(--ivory);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.add svg { width: 22px; }
.add:hover { box-shadow: 0 0 0 4px rgb(201 162 39 / .35); }
.add:active { transform: scale(.94); }
.qty {
  position: absolute; z-index: 2; top: -6px; inset-inline-end: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--night); color: var(--ivory);
  font: 600 12px/22px var(--sans); font-variant-numeric: tabular-nums; text-align: center;
}

/* prices */
.price { font-weight: 600; color: var(--deep); font-size: 18px; white-space: nowrap; }
.price .cur { font-size: .78em; font-weight: 400; }

/* open-now pill */
.pill {
  display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 6px 15px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); font-size: 15px;
}
.pill strong { font-weight: 600; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--deep); flex: none; }
.pill[data-state="soon"] .dot { box-shadow: 0 0 0 3px rgb(122 92 16 / .25); }
.pill[data-state="closed"] .dot { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.pill-dark { background: rgb(15 13 10 / .7); border-color: rgb(201 162 39 / .6); color: var(--ivory); }
.pill-dark .dot { background: var(--gold); box-shadow: 0 0 0 3px rgb(201 162 39 / .22); }

/* arched frame (the doors on Home, Visit) */
.arch { display: block; margin: 0; padding: 6px; border: 1px solid var(--c, var(--gold)); border-radius: 999px 999px 14px 14px; }
.arch img {
  width: 100%; aspect-ratio: 1 / 1.04; object-fit: cover;
  border-radius: 999px 999px 9px 9px; background: var(--night);
}
.arch-sm img { aspect-ratio: 3 / 4; }
.arch-tall img { aspect-ratio: 3 / 4.2; }

/* the gold seal: Golden Pride's signature shape, a hatched gold ring around a round photo */
.seal {
  width: 136px; aspect-ratio: 1; border-radius: 50%; padding: 8px; border: 1.5px solid var(--gold);
  background: repeating-linear-gradient(45deg, rgb(201 162 39 / .55) 0 1px, transparent 1px 4px);
}
.seal img { width: 100%; height: 100%; object-fit: cover; object-position: 46% 60%; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--gold); }

/* a single item shown on its own (Home, Our story) */
.feature-name { font-size: 20px; font-weight: 600; line-height: 1.3; }
.feature-alt { color: var(--ink-muted); font-size: 16px; }
.feature-note { color: var(--ink-muted); font-size: 15px; margin-top: 4px; }
.feature-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: 12px; }

/* quick contact buttons */
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .btn { min-height: 46px; padding: 0 16px; font-size: 16px; }
.quick svg { width: 20px; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: var(--s3); }
.field label { font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-muted); }
.hint { font-size: 15px; color: var(--ink-muted); }
.hint-after { margin: calc(var(--s2) * -1) 0 var(--s3); }
input[type="text"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid var(--ink-muted); border-radius: var(--radius);
  background: var(--field); font-size: 17px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--deep); }
/* Date and time fields: once Tab moves on to the day, year or minutes, Chrome and Edge stop
   matching :focus-visible on the field, so the ring would vanish. :focus-within keeps it. */
input:is([type="date"], [type="time"]):focus-within { outline: 3px solid var(--deep); outline-offset: 0; border-color: var(--deep); }
[aria-invalid="true"] { border-color: var(--error) !important; box-shadow: inset 0 0 0 1px var(--error); }
.error { color: var(--error); font-size: 15px; font-weight: 600; }
.error::before { content: "! "; }
.error-summary { padding: 12px 16px; border-radius: var(--radius); background: var(--error-bg); color: var(--error); font-weight: 600; margin-bottom: var(--s3); }
.notice { padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); margin-top: var(--s2); }
.count {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--deep); color: var(--ivory); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* the demo window */
.demo {
  width: min(560px, 100% - 32px); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 16px;
  background: var(--ivory); color: var(--night); box-shadow: 0 0 0 1px var(--gold), 0 30px 80px rgb(0 0 0 / .45);
}
.demo::backdrop { background: rgb(15 13 10 / .62); }
.demo-in { padding: var(--s3); }
.demo-h { font-size: 34px; margin-bottom: 10px; }
.demo-text { color: var(--ink-muted); }
.demo-msgs { display: grid; gap: 14px; margin-top: var(--s2); }
.demo-msg { margin: 0; }
.demo-msg figcaption { font-size: 14px; font-weight: 600; color: var(--ink-muted); margin-bottom: 6px; }
.demo-msg pre {
  margin: 0; padding: 14px 16px; max-height: 32vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  font: 400 16px/1.6 var(--sans); font-variant-numeric: tabular-nums;
}
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s3); }

/* ---------- Night: header, phone bar, footer, the Home hero, the Moon Bloom band, Our story ---------- */
:is(.night, .site-header, .actionbar, .site-footer) { background: var(--night); color: var(--ivory); }
:is(.night, .site-header, .actionbar, .site-footer) :focus-visible { outline-color: var(--gold); }
.night :is(h1, h2) { color: var(--gold); }
.night :is(.lede, .note, .feature-alt, .feature-note) { color: var(--ivory-muted); }
.night a:not(.btn) { color: var(--gold); }
:is(.night, .site-header, .actionbar) .btn-primary { background: var(--gold); color: var(--night); }
:is(.night, .site-header, .actionbar) .btn-primary:hover { background: var(--gold-light); }
:is(.night, .site-header, .actionbar) .btn-quiet { color: var(--gold); border-color: rgb(201 162 39 / .6); }
:is(.night, .site-header, .actionbar) .btn-quiet:hover { background: var(--raised); }
:is(.night, .site-header, .actionbar) .count { background: var(--night); color: var(--gold); }
.night .price { color: var(--gold); }
.night .add { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); }
.night .qty { background: var(--gold); color: var(--night); }

/* ---------- 6. Header and footer (identical on every page) ---------- */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgb(201 162 39 / .3); }
.header-in { position: relative; display: flex; align-items: center; gap: var(--s2); min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; text-decoration: none; min-height: 44px; }
.brand-mark { width: 40px; }
.brand-word { width: 112px; }
.nav ul { display: flex; gap: 2px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px;
  color: var(--ivory); text-decoration: none; font-weight: 600; font-size: 16px;
}
.nav a:hover { background: var(--raised); }
.nav a[aria-current="page"] { color: var(--gold); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.lang-btn {
  min-width: 52px; min-height: 44px; padding: 0 14px; border: 1px solid rgb(201 162 39 / .6); border-radius: 999px;
  background: none; color: var(--gold); font-weight: 600; font-size: 16px;
}
.lang-btn[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--sans); }
.lang-btn:hover { background: var(--raised); }
.cart-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--gold); color: var(--night); font-weight: 600; text-decoration: none;
}
.cart-link:hover { background: var(--gold-light); }
.cart-link .count { background: var(--night); color: var(--gold); }
.burger { width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: none; color: var(--ivory); border-radius: 999px; }
.burger svg { width: 26px; }

.site-footer { padding-block: var(--s6) var(--s4); margin-top: var(--s7); border-top: 1px solid rgb(201 162 39 / .3); }
body[data-page="story"] .site-footer { margin-top: 0; }
.footer-in { display: grid; gap: var(--s4); }
.footer-brand img:first-child { width: 56px; }
.footer-brand img + img { width: 150px; margin-top: 12px; }
.footer-city { color: var(--ivory-muted); margin-top: 6px; }
.footer-h { font: 600 16px/1.3 var(--sans); color: var(--gold); margin-bottom: 12px; }
.hours { display: grid; gap: 6px; }
.hours-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; }
.site-footer .hours dt { color: var(--ivory-muted); }
.site-footer .pill { margin-top: var(--s2); }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--ivory); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-nav a[aria-current="page"] { color: var(--gold); }
.honesty { border-top: 1px solid rgb(201 162 39 / .35); padding-top: var(--s3); color: var(--ivory-muted); font-size: 15px; display: grid; gap: 4px; }
.honesty bdi { white-space: nowrap; }   /* "Salty webs." never splits across two lines in the Arabic line */

/* phone action bar: WhatsApp and the order, one tap away */
.actionbar {
  position: fixed; z-index: 30; inset-inline: 0; bottom: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgb(201 162 39 / .4);
}
.actionbar-in { display: flex; gap: 10px; max-width: 640px; margin-inline: auto; }
.actionbar .btn { min-height: 52px; }
.ab-wa { flex: none; width: 56px; padding: 0; }
.ab-wa svg { width: 26px; }
.ab-order { flex: 1; justify-content: flex-start; padding: 0 20px; }
.ab-total { font-variant-numeric: tabular-nums; font-weight: 400; margin-inline-start: auto; }
.ab-total .cur { font-size: .85em; }

/* ---------- 7. Home ---------- */
/* hero: the crest over the night leaves (photo 01), Golden Pride */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: var(--s3) var(--s6); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(15 13 10 / .42), rgb(15 13 10 / .7) 48%, var(--night) 94%),
    url("../img/photos/01-leaves-at-night-800.webp") center top / cover no-repeat;
}
.hero-in { display: grid; gap: var(--s5); }
.hero-text { display: grid; justify-items: center; text-align: center; }
.hero-crest { width: 168px; }
.hero h1 { max-width: 15ch; margin-top: 12px; }
.hero .lede { margin-top: 14px; max-width: 34ch; }
.hero .pill { margin-top: var(--s3); }
.hero-actions { margin-top: var(--s3); }
.hero .quick { margin-top: 12px; justify-content: center; }
.hero-lead { margin: 0; display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 18px; align-items: center; width: min(100%, 440px); margin-inline: auto; }
.hero-lead .feature-name { font: 400 30px/1.08 var(--serif); color: var(--gold); }
.hero-lead .feature-alt { margin-top: 4px; }

.doors { padding-block: var(--s6) var(--s4); }
.door-list { display: grid; gap: 0; margin-top: var(--s3); }
.door {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--s2);
  align-items: start; padding-block: var(--s2); border-top: 1px solid var(--line); color: inherit; text-decoration: none;
}
.door .arch { grid-row: 1 / 3; padding: 4px; }
.door-name { font: 400 28px/1.15 var(--serif); align-self: end; padding-top: 10px; }
.door-text { color: var(--ink-muted); font-size: 16px; margin-top: 4px; }
.door:hover .door-name { color: var(--deep); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

.bloom { padding-block: var(--s6); overflow: hidden; }
.bloom-in { display: grid; gap: var(--s4); align-items: center; }
.bloom-stage {
  position: relative; width: min(100%, 380px); aspect-ratio: 1; margin-inline: auto; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgb(201 162 39 / .7);
  box-shadow: inset 0 0 0 7px var(--night), inset 0 0 0 8px rgb(201 162 39 / .3);
  background: radial-gradient(closest-side, rgb(44 90 160 / .42), rgb(44 90 160 / .08) 70%, transparent);
}
.bloom-stage img { width: 64%; margin-top: 6%; }
.bloom h2 { font-size: clamp(40px, 5vw, 60px); }
.bloom-alt { color: var(--ivory-muted); font-size: 18px; margin-top: 4px; }
.bloom-lede { color: var(--ivory-muted); font-size: 18px; max-width: 36ch; margin-top: var(--s2); }
.bloom .feature-row { justify-content: flex-start; gap: var(--s3); margin-top: var(--s3); }
.bloom .price { font-size: 22px; }
.bloom .add { background: var(--blue); color: var(--ivory); }
.bloom .link { margin-top: var(--s2); }

.teaser { text-align: center; padding-block: var(--s6) var(--s4); }
.teaser-crest { width: 200px; margin: 0 auto var(--s2); }
.teaser p { max-width: 46ch; margin: 12px auto 0; color: var(--ink-muted); font-size: 18px; }

/* ---------- 7b. The crest entrance (Home only, once per visit, about 3.2 s) ----------
   Shown only under html.intro, which boot.js adds before the first paint (never
   without JavaScript). The page is painted underneath from the first frame and nothing
   waits for it; the overlay is fixed, so it causes no layout shift. If main.js never
   runs, the overlay still fades out by itself at 3.2 s.
   Build 0–1.4 s (mane, then face, then eye) · Hold 1.4–2.3 s (hatching, "Leocha") ·
   Strike 2.3–2.8 s (glint, the eye catches the light) · Out 2.8–3.2 s.
   Reduced motion (html.intro-still): the finished crest for 0.5 s, then gone. */
@property --hatch { syntax: "<number>"; inherits: true; initial-value: 1; }
.entrance { display: none; }
html.intro .entrance {
  position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--night); color: var(--ivory);
  animation: entrance-out .4s var(--ease) 2.8s forwards;
}
html.intro .entrance.is-skipped { animation: entrance-skip .3s ease forwards; }
html.intro-still .entrance { animation: entrance-skip .01s linear .5s forwards; }
.entrance-mark { position: relative; width: min(58vw, 300px); aspect-ratio: 1; }
.entrance-mark svg { width: 100%; height: 100%; }
.entrance-word { width: min(48vw, 220px); }
.entrance-skip {
  position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); inset-inline-end: 20px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgb(201 162 39 / .6);
  background: transparent; color: var(--gold); font-weight: 600; font-size: 15px;
}
.entrance-skip:hover { background: var(--raised); }
.entrance-skip:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
/* Skip leaves the moment the overlay starts to fade (or is skipped): it has no job then, and
   half-faded gold over the page behind would fail contrast for that 0.4 s */
html.intro .entrance-skip { animation: lc-skip-hide 0s linear 2.8s forwards; }
html.intro .entrance.is-skipped .entrance-skip { visibility: hidden; }
@keyframes lc-skip-hide { to { visibility: hidden; } }

/* Build: every crest line has pathLength="1", so a dash of 1 offset by 1 is a hidden line */
html.intro:not(.intro-still) .entrance :is(#lc-mane use, #lc-face [pathLength], #lc-eye [pathLength]) {
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: lc-draw .6s cubic-bezier(.45, .05, .3, 1) forwards;
}
html.intro:not(.intro-still) .entrance #lc-mane .r2 { animation-delay: .18s; }   /* back ring first */
html.intro:not(.intro-still) .entrance #lc-mane .r3 { animation-delay: .36s; }
html.intro:not(.intro-still) .entrance #lc-face [pathLength] { animation-duration: .65s; animation-delay: .7s; }
html.intro:not(.intro-still) .entrance #lc-eye [pathLength] { animation-duration: .45s; animation-delay: .95s; }
/* Hold: the hatching and fills fade in, then the name rises */
html.intro:not(.intro-still) .entrance .lc { --hatch: 0; animation: lc-hatch .6s ease 1.4s forwards; }
html.intro:not(.intro-still) .entrance :is(.h, .ir, .pu, .dt) { opacity: 0; animation: lc-fade .55s ease 1.4s forwards; }
html.intro:not(.intro-still) .entrance-word { opacity: 0; transform: translateY(8px); animation: lc-rise .7s var(--ease) 1.55s forwards; }
/* Strike: a gold glint across the crest's lines (the crest as a luminance mask), and the eye's catchlight */
.entrance-glint {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(110deg, transparent 38%, rgb(255 238 180 / .95) 50%, transparent 62%) 120% 0 / 250% 100% no-repeat;
  -webkit-mask: url("../img/brand/crest.svg") center / contain no-repeat;
  mask: url("../img/brand/crest.svg") center / contain no-repeat luminance;
}
html.intro:not(.intro-still) .entrance-glint { animation: lc-glint .5s ease-in-out 2.3s forwards; }
html.intro:not(.intro-still) .entrance .sh { opacity: 0; animation: lc-shine .4s ease-out 2.45s forwards; }

@keyframes lc-draw { to { stroke-dashoffset: 0; } }
@keyframes lc-hatch { to { --hatch: 1; } }
@keyframes lc-fade { to { opacity: 1; } }
@keyframes lc-rise { to { opacity: 1; transform: none; } }
@keyframes lc-glint { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 1; background-position: -20% 0; } }
@keyframes lc-shine { 0% { opacity: 0; stroke-width: 1; } 45% { opacity: 1; stroke: #FFF2C4; stroke-width: 4.4; } 100% { opacity: 1; stroke-width: 2.4; } }
@keyframes entrance-out { to { opacity: 0; visibility: hidden; } }
@keyframes entrance-skip { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }

/* the crest's own drawing rules, moved out of crest.svg so the page needs no inline styles */
/* CREST:START (written by tools/site/build-pages.mjs from crest.svg; do not edit) */
.lc{--sw:1.6;--l:var(--brand-line,#C9A227);--g:var(--brand-ground,#0F0D0A);--p:var(--brand-pupil,#0F0D0A);--s:var(--brand-shine,#C9A227);fill:none;stroke:var(--l);stroke-linecap:round;stroke-linejoin:round}.lc path{stroke-width:var(--sw)}.lc .g{fill:var(--g)}.lc .h{fill:url(#lc-h);stroke:none;opacity:var(--hatch,1)}.lc .f{fill:var(--l);stroke:none}.lc .t{stroke-width:calc(var(--sw)*.6)}.lc .w{stroke-width:calc(var(--sw)*1.35)}.lc .r1{--sw:1.05}.lc .r2{--sw:1.2}.lc .r3{--sw:1.4}.lc .e{fill:var(--g)}.lc .ir{fill:var(--l);fill-opacity:.5;stroke:none}.lc .pu{fill:var(--p);stroke:none}.lc .sh{stroke:var(--s);stroke-width:2.4}.lc .dt{stroke-width:2.3}
.lc .lc-s1{stroke:var(--l);stroke-width:0.8;stroke-linecap:butt}
.lc .lc-s2{fill:var(--g);stroke-width:var(--sw)}
.lc .lc-s3{opacity:var(--hatch,1)}
.lc .lc-s4{stroke-width:calc(var(--sw)*.55)}
.lc .lc-s5{stroke:none}
/* CREST:END */

/* ---------- 7c. The Moon Bloom in 3D (assets/js/bloom3d.js) ----------
   The still engraving shows until the first 3D frame is drawn, and stays wherever 3D
   cannot run or motion is reduced. The lemon button and hint appear only with 3D. */
.bloom-visual { display: grid; justify-items: center; gap: var(--s2); }
.bloom-still { transition: opacity .5s var(--ease); }
.bloom-3d {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity .5s var(--ease);
  cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent;
}
.bloom-3d:active { cursor: grabbing; }
.bloom-3d canvas { display: block; width: 100%; height: 100%; }
.bloom-3d:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
.bloom-stage.is-3d .bloom-3d { opacity: 1; }
.bloom-stage.is-3d .bloom-still { opacity: 0; }
.lemon-btn { min-height: 46px; }
.lemon-btn svg { width: 20px; }
.night .lemon-btn[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: var(--ivory); }
.bloom-hint { font-size: 14px; color: var(--ivory-muted); margin-top: -6px; }

/* ---------- 8. Menu ---------- */
.jump { margin-top: var(--s3); }
.jump ul { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px; color: var(--night); text-decoration: none; font-weight: 600;
}
.jump a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.jump a:hover { background: var(--paper); }

.family { padding-block: var(--s5); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 8px); }
.family-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; margin-bottom: var(--s3); }
.family-icon { width: 30px; color: var(--c); }
.family-head p { grid-column: 1 / -1; color: var(--ink-muted); margin-top: 6px; }
.family-photo { grid-column: 1 / -1; margin: var(--s2) 0 0; padding: 5px; border: 1px solid var(--gold-line); border-radius: var(--radius-card); background: var(--paper); }
.family-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 62%; border-radius: 10px; background: var(--night); }

/* every card the same: a 96 x 128 picture (photo or menu engraving) on a Night tile.
   Cards keep their own height (no stretching to the card beside them). */
.cards { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.card {
  position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px;
  padding: 14px; background: var(--paper); border: 1px solid var(--gold-line); border-radius: var(--radius-card);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease), box-shadow .4s var(--ease);
}
.card.is-tilting { transition-duration: .14s, .3s; box-shadow: 0 22px 34px -22px rgb(15 13 10 / .45); }
.card-photo {
  margin: 0; width: 96px; aspect-ratio: 3 / 4; align-self: start; overflow: hidden;
  border-radius: 9px; background: var(--night); box-shadow: 0 0 0 1px var(--gold); transform: translateZ(22px);
}
.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-img.is-engraving { object-fit: contain; }
.card-body { display: flex; flex-direction: column; min-width: 0; min-height: 128px; transform: translateZ(10px); }
.card-name { font: 600 18px/1.3 var(--sans); }
.card-alt { color: var(--ink-muted); font-size: 15px; margin-top: 2px; }
.card-note { color: var(--ink-muted); font-size: 15px; line-height: 1.45; margin-top: 6px; }
.card-price { margin-top: auto; padding-top: 10px; min-height: 48px; display: flex; align-items: flex-end; padding-inline-end: 60px; }
.card .add { position: absolute; bottom: 14px; inset-inline-end: 14px; transform: translateZ(30px); }
.card .add:active { transform: translateZ(30px) scale(.94); }
.menu-foot { padding-block: var(--s3) 0; }

/* ---------- 9. Order ---------- */
/* The empty state and the order form both start hidden and main.js shows one after the
   first paint. A screen-high main keeps the footer below the fold until then, so nothing
   visible jumps when the order appears (Lighthouse CLS was 0.38 without it). */
body[data-page="order"] main { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); }
.order .page-head { padding-bottom: var(--s3); }
.order-form { display: grid; gap: var(--s5); align-items: start; }
.lines { border-top: 2px solid var(--night); }
.line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px 14px; align-items: center;
  padding-block: 14px; border-bottom: 1px solid var(--line);
}
.line-name { font-weight: 600; font-size: 17px; border-inline-start: 3px solid var(--c); padding-inline-start: 10px; }
.line-unit { display: block; font-weight: 400; color: var(--ink-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--field); }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--deep); border-radius: 999px; }
.stepper button svg { width: 18px; }
.stepper output { min-width: 28px; text-align: center; font-weight: 600; }
.line-total { min-width: 5.2ch; text-align: end; font-weight: 600; }
.line-remove { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-muted); border-radius: 999px; }
.line-remove svg { width: 18px; }
.line-remove:hover { background: var(--paper); color: var(--night); }
.order-total { display: flex; justify-content: space-between; align-items: baseline; padding-block: var(--s2) 6px; font-size: 20px; font-weight: 600; }
.order-total strong { font-size: 26px; }
.order-total .cur { font-size: 16px; font-weight: 400; }
.order-side { display: grid; gap: var(--s3); }
.order-side .field { margin-bottom: 0; }
.pickup { margin: 0; padding: 0; border: 0; min-width: 0; }
.pickup legend { padding: 0; font-weight: 600; font-size: 20px; margin-bottom: 10px; }
.pickup .note { margin-bottom: 10px; }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--field); cursor: pointer;
}
.choice input { width: 20px; height: 20px; accent-color: var(--deep); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--deep); background: var(--paper); box-shadow: inset 0 0 0 1px var(--deep); }
.slot { display: grid; gap: 6px; margin-top: 4px; }
.slot label { font-weight: 600; font-size: 15px; }
.order-empty { text-align: center; padding-block: var(--s3) var(--s5); display: grid; justify-items: center; gap: 10px; }
.order-empty img { width: 180px; }
.order-empty-h { font-size: 22px; font-weight: 600; }
.order-empty .btn { margin-top: var(--s2); }

/* ---------- 10. Our story (Night) ---------- */
.story-head { text-align: center; display: grid; justify-items: center; }
.story-crest { width: 168px; margin-bottom: var(--s2); }
.story-head .lede { margin-inline: auto; }
.chapter { display: grid; gap: var(--s4); padding-block: var(--s5); border-top: 1px solid rgb(201 162 39 / .25); scroll-margin-top: calc(var(--header-h) + 8px); }
.chapter-art { margin: 0; justify-self: center; width: min(100%, 340px); }
.chapter-text h2 { margin-bottom: var(--s2); }
.chapter-body { font-size: 19px; line-height: 1.75; max-width: 36em; }
.chapter-plate { margin: var(--s3) 0 0; width: min(62%, 240px); padding: 5px; border: 1px solid var(--gold); border-radius: 999px 999px 14px 14px; }
.chapter-plate img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 9px 9px; }
.poured { margin-top: var(--s3); padding: var(--s2); background: var(--raised); border: 1px solid rgb(201 162 39 / .35); border-radius: var(--radius-card); max-width: 460px; }
.poured-h { font-size: 14px; font-weight: 600; color: var(--ivory-muted); margin-bottom: 10px; }
.poured-in { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: start; }
.poured-in > img { width: 84px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--gold); background: var(--night); }
.poured-in > img.is-engraving { object-fit: contain; }
.story-end { text-align: center; padding-block: var(--s5) var(--s6); border-top: 1px solid rgb(201 162 39 / .25); display: grid; justify-items: center; gap: 12px; }
.story-end p { color: var(--ivory-muted); font-size: 18px; }
.story-end .btn { margin-top: var(--s2); }

/* ---------- 11. Visit ---------- */
.visit-hero { display: grid; gap: var(--s4); padding-block: var(--s5) var(--s4); }
.where { font: 400 32px/1.2 var(--serif); margin-top: 6px; }
.visit .pill { margin-top: var(--s3); }
.visit-text > .note { margin-top: var(--s2); max-width: 46ch; }
.reach { margin-top: var(--s4); scroll-margin-top: calc(var(--header-h) + 16px); }
.h-small { font: 600 20px/1.3 var(--sans); margin-bottom: 12px; }
.visit-photo { width: min(100%, 420px); justify-self: center; }
.hours-card { padding: var(--s4) var(--s3); background: var(--paper); border: 1px solid var(--gold-line); border-radius: var(--radius-card); max-width: 720px; }
.hours-card h2 { margin-bottom: var(--s3); }
.hours-lg { gap: 0; font-size: 18px; }
.hours-lg .hours-row { padding-block: 12px; border-bottom: 1px solid var(--line); }
.hours-lg dd { font-weight: 600; }
.hours-card .note { margin-top: var(--s2); }
.ahead { padding-block: var(--s5) 0; display: grid; gap: 12px; justify-items: start; }
.ahead p { color: var(--ink-muted); font-size: 18px; max-width: 46ch; }
.ahead .btn { margin-top: var(--s1); }

/* ---------- 12. Offices and events ---------- */
.events { display: grid; gap: var(--s5); padding-top: var(--s5); align-items: start; }
.events-intro .lede { margin-top: var(--s2); }
.notice-strong { margin-top: var(--s3); font-weight: 600; font-size: 18px; border-inline-start: 3px solid var(--deep); padding-inline-start: 12px; }
.events-art { margin: var(--s4) 0 0; width: min(70%, 300px); }
.events-form { padding: var(--s4) var(--s3); background: var(--paper); border: 1px solid var(--gold-line); border-radius: var(--radius-card); }
.events-form h2 { margin-bottom: var(--s3); }
.field-row { display: grid; gap: 0 var(--s2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.field-narrow { max-width: 220px; }

/* ---------- 13. 404 and QR table card ---------- */
.not-found { text-align: center; padding-block: var(--s5) 0; display: grid; justify-items: center; gap: var(--s2); }
.not-found img { width: 200px; }
.not-found .lede { margin-inline: auto; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: var(--s2); }

.qr-page .page-head .btn { margin-top: var(--s3); }
.qr-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s4); padding-bottom: var(--s4); }
.qr-card {
  width: min(100%, 360px); aspect-ratio: 105 / 148; padding: 28px 30px;   /* not %: that follows the row's width */
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
  background: var(--night); color: var(--ivory); border-radius: 14px; box-shadow: 0 0 0 1px var(--gold), 0 18px 40px rgb(15 13 10 / .3);
  print-color-adjust: exact; -webkit-print-color-adjust: exact;
}
.qr-crest { width: 34%; }
.qr-word { width: 44%; }
.qr-lines { display: grid; gap: 2px; }
.qr-scan { font: 400 28px/1.15 var(--serif); color: var(--gold); }   /* Arabic line: Aref Ruqaa through --serif */
/* Dark modules on the Ivory panel (the brand's light ground), with a 4-module quiet zone
   drawn into the SVG, so the code scans on any printer */
.qr-code { width: 48%; aspect-ratio: 1; background: var(--ivory); border-radius: 3px; }
.qr-code svg { width: 100%; height: 100%; }
.qr-url { font-size: 12px; color: var(--ivory-muted); letter-spacing: .02em; }

/* ---------- 14. Arabic (right to left) ---------- */
:lang(ar) { line-height: 1.8; }
:lang(ar) :is(h1, h2, .door-name, .where, .qr-scan, .demo-h, .hero-lead .feature-name) { line-height: 1.45; }
html:lang(ar) h1 { font-size: clamp(36px, 5vw, 60px); }
:lang(ar) .chapter-body { font-size: 20px; line-height: 1.95; }
:lang(ar) .card-name, :lang(ar) .feature-name { line-height: 1.5; }
:lang(en) .card-alt, :lang(en) .feature-alt { line-height: 1.5; }
.card-alt:lang(ar), .feature-alt:lang(ar) { font-size: 16px; }
/* a name in the other language lines up under the page's own (left in English, right in Arabic) */
html[dir="ltr"] :is(.card-alt, .feature-alt, .bloom-alt span, .honesty p) { text-align: left; }
html[dir="rtl"] :is(.card-alt, .feature-alt, .bloom-alt span, .honesty p) { text-align: right; }
.bloom-alt span { display: block; }
.hero-text .feature-alt { text-align: inherit; }
bdi { unicode-bidi: isolate; }

/* ---------- 15. Responsive ---------- */
@media (max-width: 899px) {
  body { padding-bottom: 76px; }                  /* room for the action bar */
  html { scroll-padding-bottom: 88px; }           /* a focused control never lands under the bar */
  body[data-page="order"] { padding-bottom: 0; }
  body[data-page="order"] .actionbar { display: none; }
  .cart-link { display: none; }                    /* the action bar carries the order on phones */
  .brand-word { width: 100px; }
  /* without JavaScript the page list stays a visible row */
  html:not(.js) .header-in { flex-wrap: wrap; padding-bottom: 8px; }
  html:not(.js) .nav { order: 3; width: 100%; overflow-x: auto; }
  .js .nav {
    display: none; position: absolute; top: 100%; inset-inline: -20px; z-index: 25;
    background: var(--night); border-bottom: 1px solid rgb(201 162 39 / .4); box-shadow: 0 18px 30px -18px rgb(0 0 0 / .6);
  }
  .js .nav.is-open { display: block; }
  .js .nav ul { flex-direction: column; padding: 8px 20px 20px; }
  .js .nav a { min-height: 54px; font-size: 19px; border-bottom: 1px solid rgb(201 162 39 / .2); border-radius: 0; }
  .js .nav a[aria-current="page"] { text-underline-offset: 6px; }
  .site-footer { padding-bottom: var(--s5); }
}
@media (max-width: 520px) {
  .line { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name name name" "step total remove"; }
  .line-name { grid-area: name; }
  .stepper { grid-area: step; justify-self: start; }
  .line-total { grid-area: total; }
  .line-remove { grid-area: remove; }
  .quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .quick .btn { width: 100%; padding: 0 8px; gap: 6px; font-size: 15px; }
  .visit .quick { grid-template-columns: 1fr; }
}
@media (min-width: 640px) {
  .door-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
  .door { grid-template-columns: 1fr; grid-template-rows: none; border-top: 0; padding: 0; text-align: center; }
  .door .arch { grid-row: auto; padding: 6px; }
  .door-name { padding-top: var(--s2); }
  .door-text { max-width: 30ch; margin-inline: auto; }
}
@media (min-width: 900px) {
  .actionbar { display: none; }
  .burger { display: none; }
  .hero { padding-block: var(--s6) var(--s7); }
  .hero::before {
    background:
      linear-gradient(90deg, rgb(15 13 10 / .9) 10%, rgb(15 13 10 / .55) 60%, rgb(15 13 10 / .75)),
      linear-gradient(180deg, transparent 70%, var(--night)),
      url("../img/photos/01-leaves-at-night-1600.webp") center / cover no-repeat;
  }
  .hero-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s6); align-items: center; }
  .hero-text { justify-items: start; text-align: start; }
  .hero-crest { width: 136px; }
  .hero .quick { justify-content: flex-start; }
  .hero-lead { grid-template-columns: 1fr; justify-items: center; text-align: center; width: 100%; max-width: 380px; }
  .hero-lead .seal { width: min(100%, 340px); padding: 12px; }
  .hero-lead .feature-row { justify-content: center; gap: var(--s3); }
  .hero-lead .feature-alt { text-align: center !important; }
  .bloom { padding-block: var(--s7); }
  .bloom-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); }
  .bloom-stage { margin-inline: 0 auto; justify-self: center; }
  .doors { padding-block: var(--s7) var(--s5); }
  .footer-in { grid-template-columns: 1.1fr 1.4fr 1fr; }
  .honesty { grid-column: 1 / -1; }
  .order-form { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: var(--s6); }
  .order-side { position: sticky; top: calc(var(--header-h) + 24px); }
  .chapter { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6); align-items: center; padding-block: var(--s6); }
  .chapter.is-flipped .chapter-art { order: 2; }
  .visit-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--s6); align-items: center; padding-block: var(--s6); }
  .visit-photo { justify-self: end; }
  .events { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s6); padding-top: var(--s6); }
  .events-intro { position: sticky; top: calc(var(--header-h) + 24px); }
  .events-form { padding: var(--s5); }
}
@media (min-width: 1100px) {
  .nav a { padding: 0 14px; }
  /* menu: the family's name (and picture) beside a two-column list */
  .family { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--s6); align-items: start; }
  .family-head { position: sticky; top: calc(var(--header-h) + 32px); margin-bottom: 0; }
  .family-img { aspect-ratio: 4 / 3; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 16. Reduced motion: no tilt, no glint, no smooth scrolling ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  /* the entrance overlay keeps its 0.5 s exit (html.intro-still): no movement, just gone */
  *:not(.entrance), *::before, *::after { animation: none !important; transition: none !important; }
  .card { transform: none !important; }
}

/* ---------- 17. Print: the QR table card on A6, one side per page ---------- */
@media print {
  @page { size: A6; margin: 0; }
  body { background: #fff; padding: 0; }
  .site-header, .site-footer, .actionbar, .skip, .no-print { display: none !important; }
  .qr-page { width: auto; }
  .qr-cards { display: block; padding: 0; }
  .qr-card { width: 105mm; height: 148mm; aspect-ratio: auto; border-radius: 0; box-shadow: none; padding: 11mm 10mm; break-inside: avoid; page-break-inside: avoid; }
}
