/* Kami & Qalam, a fictional paper shop. Concept site by Orvo.
   One stylesheet for both directions: logical properties throughout,
   so the Arabic page only swaps fonts and a few sizes. */

:root {
  color-scheme: light;
  --paper: #eceee9;
  --paper-2: #f6f7f3;
  --paper-3: #e2e5de;
  --ink: #151c3b;
  --ink-2: #444b66;
  --ink-3: #676d86;
  --indigo: #2a3d8f;
  --indigo-2: #3a52a6;
  --indigo-deep: #17214f;
  --seal: #c9381f;
  --line: rgba(21, 28, 59, 0.13);
  --line-strong: rgba(21, 28, 59, 0.26);
  --open: #2f8a55;
  --soon: #b7791f;
  --closed: #c9381f;

  --gutter: 16px;
  --max: 1240px;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --grain: 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='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .11 0 0 0 0 .23 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:lang(ar) {
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Amiri", "Noto Naskh Arabic", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-block-start: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(21, 28, 59, 0.32) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(21, 28, 59, 0.28); border-radius: 10px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: rgba(21, 28, 59, 0.45); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  background-size: 220px 220px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
:lang(ar) body { font-size: 16.5px; line-height: 1.85; }

img { display: block; max-inline-size: 100%; block-size: auto; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }
.section-ws :focus-visible, .order-bar :focus-visible { outline-color: var(--paper); }

.wrap {
  inline-size: 100%;
  max-inline-size: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 56px; } }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; text-wrap: balance; }

h1 {
  font-size: clamp(66px, 11.5vw, 150px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 72;
}
h2 {
  font-size: clamp(40px, 5.4vw, 74px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 72;
}
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; font-variation-settings: "opsz" 24; font-weight: 500; }

:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; font-variation-settings: normal; }
:lang(ar) h1 { font-size: clamp(60px, 10vw, 128px); line-height: 1.25; font-weight: 700; }
:lang(ar) h2 { font-size: clamp(38px, 4.8vw, 64px); line-height: 1.35; font-weight: 700; }
:lang(ar) h3 { font-size: 22px; line-height: 1.5; font-weight: 700; }

p { margin: 0; }
.lede { max-inline-size: 33em; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
:lang(ar) .lede { line-height: 1.85; }

/* ---------- Demo bar + header ---------- */

.demo-bar {
  margin: 0;
  padding: 7px var(--gutter);
  background: var(--ink);
  color: rgba(236, 238, 233, 0.78);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}
.demo-bar a { color: #fff; text-underline-offset: 2px; }

.header-row { display: flex; align-items: center; gap: 24px; min-block-size: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 23px; letter-spacing: -0.02em; font-variation-settings: "opsz" 24; min-block-size: 44px; }
:lang(ar) .brand { letter-spacing: 0; font-weight: 700; font-size: 24px; }
.brand svg { inline-size: 28px; block-size: 28px; flex: none; }
.nav { display: none; gap: 4px; margin-inline-start: auto; }
.nav a, .lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-block-size: 44px; padding-inline: 12px; border-radius: var(--r-sm);
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2);
}
.lang { margin-inline-start: auto; border: 1px solid var(--line-strong); padding-inline: 14px; color: var(--ink); }
.nav + .lang { margin-inline-start: 8px; }
.lang:lang(en) { font-family: "Hanken Grotesk", sans-serif; }
@media (min-width: 640px) { .nav { display: flex; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-block-size: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 8px;
  font: 600 15.5px/1.2 var(--font-body);
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn svg { inline-size: 20px; block-size: 20px; flex: none; }
.btn-ink { background: var(--indigo); color: #fff; }
.btn-line { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-paper { background: var(--paper-2); color: var(--ink); }
.btn-block { inline-size: 100%; }
.btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn[aria-disabled="true"]:active { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: var(--indigo-deep); }
  .btn-line:hover { border-color: var(--ink); }
  .btn-paper:hover { background: #fff; }
  .nav a:hover, .lang:hover { color: var(--ink); background: rgba(21, 28, 59, 0.05); }
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 28px; }
@media (max-width: 480px) { .actions .btn { padding-inline: 16px; font-size: 15px; } }

/* ---------- Status chip ---------- */

.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin-block-end: 22px; padding: 5px 12px 5px 10px;
  border-radius: 999px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.status::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--ink-3); }
.status[data-state="open"]::before { background: var(--open); box-shadow: 0 0 0 3px rgba(47, 138, 85, 0.18); }
.status[data-state="soon"]::before { background: var(--soon); }
.status[data-state="closed"]::before { background: var(--closed); }
.status-plain { margin-block: 0 14px; }

/* ---------- The fold ---------- */

.fold { position: relative; }
.fold-stage {
  position: sticky; inset-block-start: 0;
  block-size: 100vh; block-size: 100svh;
  overflow: hidden;
}
.fold-canvas {
  position: absolute; inset: 0; inline-size: 100%; block-size: 100%;
  opacity: 0; transition: opacity 700ms var(--ease-out);
}
.poster {
  position: absolute; inline-size: auto; max-inline-size: none;
  object-fit: contain;
  inset-inline: 4%; inset-block: 44% 3%;
  inline-size: 92%; block-size: 53%;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.poster-sheet { display: none; }
.motion .poster-sheet { display: block; }
.motion .poster-dragon { display: none; }
.no-gl .poster-sheet { display: none; }
.no-gl .poster-dragon { display: block; }
/* With WebGL the canvas leaves the stage and covers the page, so the finished dragon can fly
   on down it. It is see-through and never takes a click or a tap. */
.fold-canvas.fly { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.gl-on .poster { opacity: 0; }
/* The scene is drawn left-to-right in both languages; keep the poster where the canvas puts the model. */
@media (min-width: 900px) {
  .poster { inset-block: 9% 7%; block-size: 84%; left: 44%; right: auto; inline-size: 54%; }
  .poster:dir(rtl) { left: 2%; }
}

/* Phones: the copy and the paper each get their own space. The slot under the hero copy is where
   the sheet sits at the top of the page. fold.js frames the 3D into its box; until then (or for
   good, with reduced motion or without WebGL) it shows the poster. */
.fold-slot { display: none; }
@media (max-width: 759px) {
  .poster { display: none !important; }
  .beat-hero .beat-inner { flex: 1 0 auto; display: flex; flex-direction: column; align-items: flex-start; }
  .fold-slot {
    display: block; align-self: stretch; flex: 1 0 104px;
    margin-block: 14px calc(var(--chrome, 100px) + 14px);
    background: url(sheet.svg) center / contain no-repeat;
    transition: opacity 400ms ease;
  }
  .gl-on .fold-slot { opacity: 0; }
  html:not(.motion) .fold-slot, .no-gl .fold-slot { background-image: url(dragon.svg); opacity: 1; }
}
/* Short phones: a tighter hero and smaller step cards, so the paper keeps a real space below them. */
@media (max-width: 759px) and (max-height: 760px) {
  .beat-hero { padding-block-start: 14px; }
  .beat-hero .status { margin-block-end: 12px; }
  .beat-hero h1 { font-size: 54px; margin-block-end: 12px; }
  .beat-hero .lede, .beat p { font-size: 16px; }
  .beat-hero .actions { margin-block-start: 16px; }
  .hint-scroll { margin-block-start: 12px; }
  .beat:not(.beat-hero) .beat-inner { padding: 16px 18px 18px; }
  .beat h2 { font-size: 34px; margin-block-end: 10px; }
}
@media (max-width: 389px) {
  .beat-hero .actions { gap: 8px; }
  .beat-hero .actions .btn { padding-inline: 12px; font-size: 14px; }
}

.fold-beats { position: relative; z-index: 1; margin-block-start: -100vh; margin-block-start: -100svh; }
.beat {
  min-block-size: 100vh; min-block-size: 100svh;
  display: flex; flex-direction: column; justify-content: flex-start;
  max-inline-size: var(--max); margin-inline: auto;
  padding: 28px var(--gutter) 0;
}
.motion .beat-last { min-block-size: 150vh; min-block-size: 150svh; }
.beat-inner { max-inline-size: 36rem; position: sticky; inset-block-start: var(--beat-top, 64px); }
.beat-hero .beat-inner { position: static; }
.beat:not(.beat-hero) .beat-inner {
  padding: 20px 22px 22px;
  border-radius: var(--r-lg);
  background: rgba(246, 247, 243, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 40px -26px rgba(21, 28, 59, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.beat h2 { margin-block-end: 14px; }
.beat p { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-inline-size: 30em; }
.beat-hero h1 { margin-block-end: 22px; }
.beat-hero .lede { font-size: 18px; }
.hint-scroll {
  display: flex; align-items: center; gap: 12px;
  margin-block-start: 26px; font-size: 14px !important; color: var(--ink-3) !important;
}
.hint-scroll span { inline-size: 28px; block-size: 1.5px; background: var(--seal); }
html:not(.motion) .hint-scroll, .no-gl .hint-scroll { display: none; }

@media (min-width: 900px) {
  .fold { --beat-top: 30vh; }
  .beat { padding-block: 30vh 0; }
  .beat-inner { max-inline-size: min(34rem, 40vw); }
  .beat:not(.beat-hero) .beat-inner { padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .beat-hero { padding-block-start: 9vh; }
}
/* Reduced motion, no WebGL, no JS: the finished dragon sits beside the hero, and the
   other four beats follow as plain cards instead of scrolling over a still picture. */
html:not(.motion) .fold-stage, .no-gl .fold-stage { position: relative; }
html:not(.motion) .beat, .no-gl .beat { min-block-size: 0; padding-block: 0 16px; }
html:not(.motion) .beat-hero, .no-gl .beat-hero { min-block-size: 100vh; min-block-size: 100svh; }
html:not(.motion) .beat-inner, .no-gl .beat-inner { position: static; }
html:not(.motion) .beat-last, .no-gl .beat-last { padding-block-end: 72px; }
@media (min-width: 900px) {
  html:not(.motion) .fold-beats, .no-gl .fold-beats {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
    max-inline-size: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  }
  html:not(.motion) .beat, .no-gl .beat { max-inline-size: none; margin: 0; padding: 0; }
  html:not(.motion) .beat-hero, .no-gl .beat-hero { grid-column: 1 / -1; padding-block-start: 9vh; }
  html:not(.motion) .beat-last, .no-gl .beat-last { padding-block-end: 0; margin-block-end: 72px; }
  html:not(.motion) .beat:not(.beat-hero) .beat-inner, .no-gl .beat:not(.beat-hero) .beat-inner {
    max-inline-size: none; block-size: 100%; padding: 28px 30px;
    background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .beat:not(.beat-hero) .beat-inner { background: var(--paper-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: 88px; }
@media (min-width: 900px) { .section { padding-block: 128px; } }
.section-head { margin-block-end: 40px; }
.section-head h2 { margin-block-end: 18px; }

/* ---------- Shop ---------- */

.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 1000px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
  .order { position: sticky; inset-block-start: 24px; }
}

.tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  border-block-end: 1px solid var(--line); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
}
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .tabs { margin-inline: 0; padding-inline: 0; } }
.tabs [role="tab"] {
  flex: none; min-block-size: 48px; padding: 0 14px;
  border: 0; background: none; color: var(--ink-3);
  font: 500 16px/1 var(--font-body); cursor: pointer;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 200ms ease, box-shadow 200ms ease;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--indigo); }
@media (hover: hover) and (pointer: fine) { .tabs [role="tab"]:hover { color: var(--ink); } }

.items { list-style: none; margin: 0; padding: 0; }
.item {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: start;
  padding-block: 20px; border-block-end: 1px solid var(--line);
}
.item-name { font-family: var(--font-body); font-size: 17px; font-weight: 600; letter-spacing: 0; line-height: 1.35; margin-block-end: 4px; font-variation-settings: normal; }
.item-desc { font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.item-act { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.price { font-weight: 600; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item > .price { padding-block-start: 1px; }
@media (max-width: 560px) {
  .item { grid-template-columns: 52px minmax(0, 1fr); row-gap: 10px; }
  .item-act { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
}

.add, .step {
  display: inline-flex; align-items: center; justify-content: center;
  min-block-size: 44px; min-inline-size: 44px; padding: 0 14px;
  border: 1.5px solid var(--line-strong); border-radius: 8px; background: transparent;
  font: 600 14.5px/1 var(--font-body); color: var(--ink); cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.add:active, .step:active { transform: scale(0.97); }
.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1.5px solid var(--indigo); border-radius: 8px; }
.stepper .step { border: 0; padding: 0; min-inline-size: 44px; font-size: 18px; color: var(--indigo); }
.stepper output { min-inline-size: 20px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .add:hover { border-color: var(--ink); }
  .stepper .step:hover { background: rgba(42, 61, 143, 0.08); }
}

/* Swatches: small drawings of each product, in CSS. */
.sw { position: relative; inline-size: 52px; block-size: 52px; border-radius: 10px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.sw::before, .sw::after { content: ""; position: absolute; }
.sw-book::before {
  inset: 9px 13px; border-radius: 2px 4px 4px 2px; background-color: var(--c);
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 3px, rgba(255, 255, 255, 0.12) 3px 4px, transparent 4px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.12);
}
.sw-book::after { inset-block: 9px; inset-inline-start: 31px; inline-size: 2px; background: rgba(0, 0, 0, 0.32); }
.sw-kraft::after { inset-block: 18px auto; inset-inline: 17px 15px; inline-size: auto; block-size: 7px; background: rgba(255, 255, 255, 0.7); }
.sw-pen::before {
  inline-size: 7px; block-size: 40px; inset-block-start: 6px; inset-inline-start: 22px;
  border-radius: 4px 4px 2px 2px; background: var(--c); transform: rotate(38deg);
  box-shadow: inset -2px 0 0 rgba(0, 0, 0, 0.18);
}
.sw-pen::after {
  inline-size: 7px; block-size: 9px; inset-block-start: 38px; inset-inline-start: 10px;
  background: #c9a85a; clip-path: polygon(0 0, 100% 0, 50% 100%); transform: rotate(38deg);
}
.sw-glass::before { background: linear-gradient(90deg, rgba(143, 179, 201, 0.5), rgba(143, 179, 201, 0.95)); }
.sw-glass::after { background: #8fb3c9; }
.sw-reed::after { background: #8c6a35; }
.sw-bone::before { inline-size: 9px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.sw-bone::after, .sw-brass::after { display: none; }
.sw-brass::before { inline-size: 9px; border-radius: 1px; background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 5px); background-size: 4px 100%; background-repeat: no-repeat; }
.sw-ink::before { inset: 21px 13px 9px; border-radius: 6px; background: var(--c); box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.18); }
.sw-ink::after { inset: 12px 20px auto; block-size: 10px; border-radius: 2px 2px 0 0; background: #24242a; }
.sw-sumi::before { inset: 10px 18px; border-radius: 3px; background: var(--c); box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.15); }
.sw-sumi::after { display: none; }
.sw-stack::before { inset: 13px 15px 11px 11px; background: var(--c2); transform: rotate(-9deg); box-shadow: -4px 4px 0 var(--c3); }
.sw-stack::after { inset: 11px 11px 13px 15px; background: var(--c); transform: rotate(7deg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.sw-print::after { background-image: radial-gradient(circle, var(--c2) 1.6px, transparent 2px); background-size: 6px 6px; }
.sw-fibre::after { background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px 4px); }
.sw-tape::before { inline-size: 30px; block-size: 30px; inset-block-start: 8px; inset-inline-start: 7px; border-radius: 50%; border: 8px solid var(--c); }
.sw-tape::after { inline-size: 22px; block-size: 22px; inset-block-start: 22px; inset-inline-start: 25px; border-radius: 50%; border: 6px solid var(--c2); }
.sw-card::before { inset: 15px 8px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 4px var(--c), inset 0 0 0 5px rgba(42, 61, 143, 0.35), 0 1px 3px rgba(0, 0, 0, 0.18); }
.sw-cards::after { inset: 11px 12px 19px 4px; border-radius: 2px; background: #e9e3d3; z-index: -1; }
.sw-cards { isolation: isolate; }
.sw-seal::before { inset: 11px; border-radius: 47% 53% 50% 50%; background: var(--c); box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.15); }
.sw-seal::after { inset: 17px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4); }

/* Order panel */
.order {
  padding: 24px; border-radius: var(--r-lg);
  background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line), 0 24px 48px -36px rgba(21, 28, 59, 0.5);
}
.order h3 { margin-block-end: 12px; }
.order-empty { color: var(--ink-3); font-size: 15px; }
.order-lines { list-style: none; margin: 0; padding: 0; }
.order-lines li { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-block-end: 1px dashed var(--line); font-size: 15px; }
.order-total { display: flex; justify-content: space-between; padding-block: 12px 4px; font-size: 17px; }
.field { display: grid; gap: 6px; margin-block-start: 16px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field select, .field input {
  min-block-size: 48px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--ink); font: 16px var(--font-body);
}
.check { display: flex; align-items: center; gap: 10px; min-block-size: 44px; margin-block: 8px 12px; font-size: 15px; cursor: pointer; }
.check input { inline-size: 20px; block-size: 20px; accent-color: var(--indigo); }
.hint { margin-block-start: 10px; font-size: 14px; color: var(--ink-3); }
.order-note { margin-block-start: 8px; font-size: 14px; color: var(--ink-3); }

.order-bar {
  position: fixed; inset-inline: 12px; inset-block-end: max(12px, env(safe-area-inset-bottom));
  z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 14px;
  background: var(--indigo-deep); color: var(--paper-2);
  box-shadow: 0 18px 40px -16px rgba(21, 28, 59, 0.6);
}
:dir(rtl) .order-bar, .order-bar:dir(rtl) { padding: 10px 18px 10px 10px; }
.order-bar-sum { display: grid; line-height: 1.25; font-size: 14px; }
.order-bar-sum strong { font-size: 17px; }
@media (min-width: 1000px) { .order-bar { display: none !important; } }

/* ---------- Workshops ---------- */

.section-ws { background: var(--indigo-deep); color: var(--paper-2); }
.section-ws .lede { color: rgba(236, 238, 233, 0.78); }
.ws-list { display: grid; gap: 16px; }
@media (min-width: 760px) { .ws-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1240px) { .ws-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ws {
  --stub: 78px;
  display: grid; grid-template-columns: var(--stub) minmax(0, 1fr);
  border-radius: var(--r);
  background: var(--paper-2); color: var(--ink);
  -webkit-mask: radial-gradient(circle 9px at var(--stub) 0, transparent 97%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 9px at var(--stub) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 9px at var(--stub) 0, transparent 97%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle 9px at var(--stub) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
}
.ws:dir(rtl) {
  -webkit-mask: radial-gradient(circle 9px at calc(100% - var(--stub)) 0, transparent 97%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 9px at calc(100% - var(--stub)) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 9px at calc(100% - var(--stub)) 0, transparent 97%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle 9px at calc(100% - var(--stub)) 100%, transparent 97%, #000) bottom / 100% 51% no-repeat;
}
.ws-stub {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-block: 24px; border-inline-end: 2px dashed rgba(21, 28, 59, 0.18);
  text-align: center; line-height: 1.1;
}
.ws-day { font-size: 13px; font-weight: 600; color: var(--seal); }
.ws-date { font-family: var(--font-display); font-size: 40px; line-height: 1.05; letter-spacing: -0.03em; font-variation-settings: "opsz" 72; }
:lang(ar) .ws-date { font-family: var(--font-body); font-size: 34px; letter-spacing: 0; font-weight: 500; }
.ws-month { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.ws-body { display: flex; flex-direction: column; padding: 22px 20px 20px; min-inline-size: 0; }
.ws-body h3 { margin-block-end: 6px; }
.ws-when { font-size: 14.5px; font-weight: 500; color: var(--ink-2); margin-block-end: 10px; }
.ws-desc { font-size: 15px; line-height: 1.5; color: var(--ink-3); margin-block-end: 18px; }
.ws-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-block: auto 14px; }
.ws-price { font-weight: 600; font-size: 17px; }
.seats { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.seat-dots {
  display: inline-block; inline-size: calc(var(--n) * 9px); block-size: 8px; color: var(--indigo);
  background: radial-gradient(circle at 4px 4px, transparent 2.3px, currentColor 2.6px 3.5px, transparent 3.8px) 0 0 / 9px 8px repeat-x;
}
.seat-dots i { display: block; inline-size: calc(var(--t) * 9px); block-size: 100%; background: radial-gradient(circle at 4px 4px, currentColor 3.5px, transparent 3.8px) 0 0 / 9px 8px repeat-x; }
.seat-dots:dir(rtl) { background-position: right 0 top 0; }
.seat-dots:dir(rtl) i { background-position: right 0 top 0; }
.seats-low { color: var(--seal); font-weight: 600; }
.seats-low .seat-dots { color: var(--seal); }
.ws-book { flex: 1; background: var(--indigo); color: #fff; padding-inline: 16px; }
.ws-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.ws-book { flex: 1 1 170px; white-space: nowrap; }
.ws-seats { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.ws-seats select { min-block-size: 48px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: 600 16px var(--font-body); }
@media (hover: hover) and (pointer: fine) { .ws-book:hover { background: var(--indigo-2); } }
.ws-note { margin-block-start: 32px; color: rgba(236, 238, 233, 0.78); font-size: 16px; }
.ws-note a { color: #fff; font-weight: 600; text-underline-offset: 3px; display: inline-flex; min-block-size: 44px; align-items: center; }

/* ---------- Visit ---------- */

.visit { display: grid; gap: 44px; }
@media (min-width: 900px) { .visit { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; } }
.visit-col h3 { margin-block-end: 14px; }
.hours { inline-size: 100%; border-collapse: collapse; font-size: 15.5px; }
.hours th, .hours td { padding: 11px 0; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; }
.hours th { font-weight: 500; padding-inline-end: 12px; }
.hours td { text-align: end; color: var(--ink-2); white-space: nowrap; }
.hours tr[aria-current="date"] th, .hours tr[aria-current="date"] td { color: var(--indigo); font-weight: 600; }
address { font-style: normal; font-size: 18px; line-height: 1.55; }
.small-note { margin-block-start: 12px; font-size: 15px; color: var(--ink-3); }
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 20px; }
.notes { margin: 0; display: grid; gap: 16px; }
.notes dt { font-weight: 600; font-size: 15.5px; }
.notes dd { margin: 2px 0 0; font-size: 15px; color: var(--ink-3); }

/* ---------- Footer ---------- */

.site-footer { padding-block: 32px 40px; border-block-start: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.footer-brand svg { inline-size: 22px; block-size: 22px; flex: none; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.footer-links a { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 8px; font-size: 14.5px; color: var(--ink-2); text-underline-offset: 3px; }
/* Phones: an empty ledge above the footer where the paper dragon lands */
.perch { display: none; }
@media (max-width: 759px) {
  .site-footer { border-block-start: 0; padding-block-start: 0; }
  .perch { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; min-block-size: 132px; padding-block-end: 12px; margin-block-end: 28px; border-block-end: 1px solid var(--line); }
  .perch-note { max-inline-size: 21ch; padding-block: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); text-underline-offset: 3px; transition: opacity 600ms ease, visibility 600ms; }
  .perch-spot { flex: none; inline-size: 112px; block-size: 92px; margin-block-end: -12px; touch-action: manipulation; }
  html.motion:not(.no-gl) .perch:not(.landed) .perch-note { opacity: 0; visibility: hidden; }
  html:not(.motion) .perch-spot, .no-gl .perch-spot { background: url(perch.webp) center bottom -5px / contain no-repeat; }
  [dir="rtl"] .perch-spot { transform: scaleX(-1); }
}
body.has-bar { padding-block-end: 84px; }
@media (min-width: 1000px) { body.has-bar { padding-block-end: 0; } }
