/* Younis Gauguin. One stylesheet for English and Arabic.
   Layout: a film in chapters. A winding road with a stop for each year runs down the story, the ground colour changes with each chapter,
   the works hang on a wall that slides sideways. All sides use inline-start/end so Arabic flips by itself. */

@font-face { font-family: "Literata"; src: url("/fonts/literata.woff2") format("woff2-variations"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Noto Naskh Arabic"; src: url("/fonts/noto-naskh-arabic.woff2") format("woff2-variations"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #17141f;        /* night over the mountain */
  --ink: #efe6d2;       /* limestone */
  --accent: #e9b23c;    /* Gauguin chrome yellow, only on dark grounds */
  --wall: #1d1724;      /* gallery wall, plum */
  --frame: #6b4428;     /* walnut frame */
  --paper: #ece3d0;     /* letter paper */
  --paper-ink: #1d1712;
  --error: #9b2c1a;
  --ok: #2f6b3f;
  --display: "Literata", Georgia, serif;
  --display-weight: 500;
  --body: "Literata", Georgia, serif;
  --gutter-s: max(16px, env(safe-area-inset-left, 0px));
  --gutter-e: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
:lang(ar) {
  --display: "Noto Naskh Arabic", "Geeza Pro", serif;
  --display-weight: 700;
  --body: "Noto Naskh Arabic", "Geeza Pro", "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  transition: background-color .6s ease, color .6s ease;
  overflow-x: clip;
}
body:lang(ar) { font-size: 1.2rem; line-height: 1.9; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 20; background: var(--paper); color: var(--paper-ink); padding: .6rem 1rem; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + .5rem); }
.label { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; margin: 0; }
:lang(ar).label, :lang(ar) .label { font-size: 1rem; letter-spacing: 0; text-transform: none; font-weight: 700; }
.gutter { padding-inline-start: var(--gutter-s); padding-inline-end: var(--gutter-e); }
[dir="rtl"] .gutter { padding-inline-start: var(--gutter-e); padding-inline-end: var(--gutter-s); }

/* ---------- top bar ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); transition: background-color .6s ease; }
.bar {
  position: fixed; top: env(safe-area-inset-top, 0px); inset-inline: 0; z-index: 9;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-block: .35rem;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color .6s ease;
}
.bar a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.bar .sig { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.1rem; white-space: nowrap; }
.bar nav { display: flex; align-items: center; white-space: nowrap; gap: .3rem 1.1rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.bar nav:lang(ar) { font-size: 1rem; letter-spacing: 0; text-transform: none; }
.bar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.bar .lang { border: 1px solid currentColor; padding: 0 .7rem; letter-spacing: 0; text-transform: none; font-size: .95rem; }
.progress { position: fixed; inset-inline: 0; top: env(safe-area-inset-top, 0px); height: 2px; background: var(--accent); transform-origin: left center; transform: scaleX(0); z-index: 11; }
[dir="rtl"] .progress { transform-origin: right center; }

/* ---------- hero ---------- */
/* The photo takes the inline-end side and the words the start side, so the title never covers his face. */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; }
.hero-media { position: absolute; inset-block: 0; inset-inline-end: 0; width: 60%; overflow: hidden; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgb(23 20 31 / .5) 18%, transparent 42%), linear-gradient(0deg, var(--bg) 0%, transparent 22%); }
[dir="rtl"] .hero-media::after { background: linear-gradient(270deg, var(--bg) 0%, rgb(23 20 31 / .5) 18%, transparent 42%), linear-gradient(0deg, var(--bg) 0%, transparent 22%); }
.hero-photo { position: absolute; inset: -8% 0 0; width: 100%; height: 108%; object-fit: cover; object-position: 63% 22%; filter: saturate(.85) contrast(1.05); will-change: transform; max-width: none; }
.hero-text { position: relative; z-index: 1; padding-block: calc(env(safe-area-inset-top, 0px) + 6rem) 3.5rem; max-width: 1200px; width: 100%; margin: 0 auto; }
.hero-text > * { max-width: min(36rem, 44vw); }
.hero h1 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(3.2rem, 8vw, 7.5rem); line-height: .95; margin: .6rem 0 .8rem; letter-spacing: -.025em; }
.hero h1:lang(ar) { line-height: 1.35; letter-spacing: 0; font-size: clamp(3.2rem, 8vw, 7rem); }
.hero h1 span { display: block; }
.hero h1 .g { color: var(--accent); }
.hero .other-name { font-size: clamp(1.5rem, 4.5vw, 2.4rem); margin: 0; text-align: left; }
[dir="rtl"] .hero .other-name { text-align: right; }
.hero .other-name:lang(en) { font-family: "Literata", Georgia, serif; font-weight: 500; }
.hero .other-name:lang(ar) { font-weight: 700; }
.hero .lede { max-width: 31rem; margin: 1.2rem 0 1.8rem; font-size: 1.2rem; }
.hero .credit { font-size: .85rem; margin: 1.6rem 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem; cursor: pointer; min-height: 48px;
  font: 500 .85rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  padding: .9rem 1.4rem; border: 1px solid var(--accent); color: #17141f; background: var(--accent);
  text-decoration: none; transition: transform .25s ease;
}
.btn:lang(ar) { font-size: 1.05rem; letter-spacing: 0; text-transform: none; font-weight: 700; }
.btn:hover { transform: translateY(-2px); }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.cue { display: block; margin-top: 2rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.cue:lang(ar) { font-size: 1rem; letter-spacing: 0; }
.cue i { display: inline-block; width: 1px; height: 2.2rem; background: currentColor; vertical-align: middle; margin-inline-end: .8rem; animation: drip 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0%,100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* ---------- the film voice ---------- */
.film { max-width: 40rem; margin: 0 auto; display: grid; gap: 1.6rem; }
.film p { margin: 0; font-size: clamp(1.3rem, 3.2vw, 1.85rem); line-height: 1.35; font-weight: 300; text-wrap: balance; }
.film p:lang(ar) { font-weight: 400; line-height: 1.75; }
.film p.quiet { font-size: 1.15rem; }

/* ---------- the name ---------- */
.name { padding-block: 9rem; }
.morph { position: relative; height: clamp(7rem, 22vw, 15rem); margin: 2rem auto; max-width: 64rem; }
.morph > span { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .4rem; text-align: center; }
.morph b { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(3.4rem, 15vw, 11rem); line-height: 1.1; }
.morph b:lang(ar) { line-height: 1.6; }
.morph small { font-size: clamp(.9rem, 2vw, 1.2rem); letter-spacing: .2em; text-transform: uppercase; }
.morph small:lang(ar) { letter-spacing: 0; text-transform: none; }
.morph .from { opacity: calc(1 - var(--m, 0)); filter: blur(calc(var(--m, 0) * 8px)); }
.morph .to { opacity: var(--m, 0); color: var(--accent); filter: blur(calc((1 - var(--m, 0)) * 8px)); }

/* ---------- the story road ---------- */
/* The road runs down a narrow rail at the start side. motion.js puts one stop beside each year. */
.story { position: relative; --rail: 96px; --edge: max(var(--gutter-s), calc((100% - 60rem) / 2)); }
.road { position: absolute; top: 0; inset-inline-start: var(--edge); width: var(--rail); height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.road path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; transition: stroke .6s; }
.road .drawn { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .8; }
.road .ghost { opacity: .25; stroke-dasharray: 1 9; }
.road .stop { fill: var(--bg); stroke: var(--ink); stroke-width: 2; transition: fill .4s, stroke .6s; }
.road .stop.on { fill: var(--ink); }
.road #walker { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.chapter { position: relative; z-index: 1; min-height: 88svh; display: grid; align-content: center; gap: .9rem; padding-block: 7rem; padding-inline-start: calc(var(--edge) + var(--rail) + 1.5rem); padding-inline-end: var(--gutter-e); }
[dir="rtl"] .chapter { padding-inline-end: var(--gutter-s); }
.chapter .when { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.chapter .when:lang(ar) { line-height: 1.4; letter-spacing: 0; }
.chapter .inner { max-width: 38rem; display: grid; gap: 1.1rem; min-width: 0; }
.chapter h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.12; margin: 0; text-wrap: balance; }
.chapter h2:lang(ar) { line-height: 1.5; }
.chapter p { margin: 0; }
.chapter figure { margin: .6rem 0 0; }
.chapter figure img { width: 100%; height: auto; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); }
.chapter figcaption { font-size: .9rem; margin-top: .6rem; }
.places { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.places li { border: 1px solid currentColor; padding: .25rem .7rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.places li:lang(ar) { font-size: 1rem; letter-spacing: 0; }

/* ---------- gift and today ---------- */
.gift, .today { padding-block: 8rem 6rem; }
.gift .wrap { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.gift .wrap > * { min-width: 0; }
.gift img { width: 100%; max-width: 380px; justify-self: center; height: auto; border: 12px solid var(--frame); box-shadow: inset 0 0 0 2px rgb(0 0 0 / .3), 0 40px 70px -30px rgb(0 0 0 / .7); }
.gift h2, .today h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 1.2rem; text-wrap: balance; }
.gift h2:lang(ar), .today h2:lang(ar) { line-height: 1.5; }
.gift p { margin: 0 0 1rem; }
.gift .turn { font-family: var(--display); font-size: 1.5rem; color: var(--accent); margin-top: 1.8rem; }
.today .film { text-align: center; justify-items: center; }
.today .film p.strong { font-family: var(--display); font-weight: var(--display-weight); color: var(--accent); }

/* ---------- the wall ---------- */
.works { position: relative; }
.works-pin { position: sticky; top: 0; height: 100lvh; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); padding-top: calc(env(safe-area-inset-top, 0px) + 4.5rem); }
.works-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; max-width: 1400px; width: 100%; margin: 0 auto; }
.works-head h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.1; margin: 0; }
.works-head p { max-width: 26rem; margin: 0; font-size: 1rem; }
.track { display: flex; align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-inline-start: var(--gutter-s); will-change: transform; }
.track::after { content: ""; flex: 0 0 8vw; align-self: stretch; }
.wall-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1rem 1.6rem; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.wall-foot:lang(ar) { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.wall-foot .count { font-variant-numeric: tabular-nums; }
.wall-foot a { text-decoration: underline; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }
.wall-state { padding: 2rem 0; max-width: 30rem; }

/* a painting card, used on the wall and in the collection */
.work { flex: 0 0 auto; width: max-content; min-width: 220px; max-width: min(80vw, 620px); display: grid; gap: .7rem; }
.work > :not(.canvas) { max-width: 100%; }
.work .canvas { all: unset; cursor: zoom-in; display: grid; place-items: center start; }
.work .canvas img { height: clamp(260px, 46vh, 460px); width: auto; max-width: 100%; object-fit: contain; border: 10px solid var(--frame); box-shadow: inset 0 0 0 2px rgb(0 0 0 / .35), 0 40px 50px -30px rgb(0 0 0 / .8); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.work .canvas:hover img, .work .canvas:focus-visible img { transform: translateY(-6px); }
.work .canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.work h3 { font-family: var(--display); font-weight: var(--display-weight); font-size: 1.35rem; margin: 0; line-height: 1.25; }
.work h3:lang(ar) { line-height: 1.6; }
.work .facts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; font-size: .9rem; }
.work .price { font-variant-numeric: tabular-nums; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.chip:lang(ar) { font-size: .95rem; letter-spacing: 0; }
.chip::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.chip.available { color: #8fd19e; }
.chip.reserved { color: var(--accent); }
.chip.sold { color: #e48a7a; }
.ask { justify-self: start; min-height: 44px; background: none; border: 0; border-bottom: 1px solid var(--accent); padding: 0; cursor: pointer; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.ask:lang(ar) { font-size: 1.05rem; letter-spacing: 0; }
.ask:hover { color: var(--accent); }
.work.commission .canvas { cursor: pointer; }
.work.commission .paper { display: grid; place-items: center; text-align: center; padding: 2rem; height: clamp(260px, 46vh, 460px); aspect-ratio: 4 / 5; max-width: 100%; background: var(--paper); color: var(--paper-ink); border: 10px solid var(--frame); }
.work.commission .paper p { margin: 0; font-family: var(--display); font-size: 1.45rem; line-height: 1.3; }
.work.commission .paper p:lang(ar) { line-height: 1.7; }

/* ---------- how buying works ---------- */
.buying { padding-block: 6rem; }
.buying .wrap { max-width: 1100px; margin: 0 auto; }
.buying h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 2.4rem; }
.buying dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 3rem; }
.buying dl > div { border-top: 1px solid color-mix(in oklab, var(--ink) 35%, transparent); padding-top: 1rem; min-width: 0; }
.buying dt { font-family: var(--display); font-size: 1.25rem; margin-bottom: .4rem; }
.buying dd { margin: 0; font-size: 1.02rem; }
.loading { display: block; height: 1em; width: 80%; background: color-mix(in oklab, var(--ink) 12%, transparent); }

/* ---------- ending ---------- */
.ending { padding-block: 9rem 7rem; text-align: center; }
.ending .film { justify-items: center; }
.motto { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.6rem) !important; line-height: 1.3 !important; color: var(--accent); }
.motto:lang(ar) { line-height: 1.8 !important; }

/* ---------- letter and waiting list ---------- */
.letter { background: var(--paper); color: var(--paper-ink); padding-block: 7rem 5rem; color-scheme: light; }
.letter :focus-visible { outline-color: var(--paper-ink); }
.letter .wrap { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 6rem); }
.letter .wrap > * { min-width: 0; }
.letter h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; margin: 0 0 1.2rem; }
.letter h2:lang(ar) { line-height: 1.5; }
.letter .notes { display: grid; gap: 1rem; font-size: 1.02rem; }
.letter .notes p { margin: 0; }
.letter .btn { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.4rem; }
form .full { grid-column: 1 / -1; }
.field { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.field > label, .field > .lbl { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.field > label:lang(ar), .field > .lbl:lang(ar) { font-size: 1rem; letter-spacing: 0; text-transform: none; font-weight: 700; }
input, select, textarea {
  font: 400 1.05rem/1.4 var(--body); color: var(--paper-ink); background: transparent;
  border: 0; border-bottom: 1px solid color-mix(in oklab, var(--paper-ink) 70%, transparent);
  padding: .6rem 0; border-radius: 0; width: 100%; min-height: 44px;
}
select { appearance: none; padding-inline-end: 1.4rem; background: linear-gradient(45deg, transparent 50%, var(--paper-ink) 50%) right .3rem center / 7px 7px no-repeat; }
[dir="rtl"] select { background-position: left .3rem center; }
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--paper-ink); box-shadow: 0 1px 0 0 var(--paper-ink); }
[aria-invalid="true"] { border-bottom-color: var(--error); box-shadow: 0 1px 0 0 var(--error); }
.phone { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .8rem; }
.phone input { direction: ltr; text-align: start; }
.hint { font-size: .9rem; margin: 0; }
.err { font-size: .92rem; color: var(--error); margin: 0; }
.err:empty { display: none; }
.status { font-size: 1rem; margin: 0; }
.status.err { font-weight: 600; }
.sent { display: grid; gap: 1rem; align-content: center; }
.sent h3 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 1.9rem; line-height: 1.3; }
.sent p { margin: 0; }
.waitlist { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid color-mix(in oklab, var(--paper-ink) 30%, transparent); display: grid; gap: .8rem; }
.waitlist h3 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 1.4rem; }
.waitlist form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.waitlist input { direction: ltr; text-align: start; }

footer { background: var(--paper); color: var(--paper-ink); padding-block: 2rem 3rem; }
footer .wrap { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid color-mix(in oklab, var(--paper-ink) 25%, transparent); padding-top: 1.5rem; font-size: .9rem; }

/* ---------- the collection page ---------- */
.collection { padding-block: calc(env(safe-area-inset-top, 0px) + 7rem) 6rem; min-height: 70vh; }
.collection .wrap { max-width: 1300px; margin: 0 auto; }
.collection h1 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.1; margin: 0 0 1rem; }
.collection .intro { max-width: 34rem; margin: 0 0 2rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 3rem; }
.filters button { min-height: 44px; padding: 0 1.1rem; border: 1px solid currentColor; background: none; cursor: pointer; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.filters button:lang(ar) { font-size: 1rem; letter-spacing: 0; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 3.5rem 2.5rem; align-items: start; }
.grid .work { width: auto; max-width: none; min-width: 0; }
.grid .work .canvas img { width: 100%; height: auto; }

/* ---------- painting detail ---------- */
dialog.detail { width: min(1200px, 100vw); max-width: 100vw; height: min(900px, 100dvh); max-height: 100dvh; padding: 0; border: 0; background: var(--wall); color: #efe6d2; }
dialog.detail::backdrop { background: rgb(10 8 14 / .78); }
.detail .in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); height: 100%; }
.detail .view { position: relative; overflow: hidden; background: #0f0c13; display: grid; grid-template-rows: 1fr auto; min-height: 0; }
.detail .stage { all: unset; position: relative; overflow: hidden; cursor: zoom-in; display: grid; place-items: center; min-height: 0; }
.detail .stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .35s ease; }
.detail .stage.zoomed { cursor: zoom-out; }
.detail .stage.zoomed img { transform: scale(2.4); }
.detail .thumbs { display: flex; gap: .5rem; padding: .7rem; overflow-x: auto; }
.detail .thumbs button { all: unset; cursor: pointer; flex: 0 0 64px; height: 64px; outline-offset: 2px; }
.detail .thumbs button[aria-current="true"] { outline: 2px solid var(--accent); }
.detail .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail .info { padding: 4.2rem 2rem 2rem; overflow-y: auto; display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
.detail h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.2; margin: 0; }
.detail h2:lang(ar) { line-height: 1.6; }
.detail .other { margin: -.4rem 0 0; font-size: 1.15rem; }
.detail dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.4rem; }
.detail dt { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; align-self: center; }
.detail dt:lang(ar) { font-size: 1rem; letter-spacing: 0; }
.detail dd { margin: 0; font-variant-numeric: tabular-nums; }
.detail .bigprice { font-family: var(--display); font-size: 2rem; color: var(--accent); margin: 0; font-variant-numeric: tabular-nums; }
.detail .close { position: absolute; top: .8rem; inset-inline-end: .8rem; z-index: 2; min-width: 44px; min-height: 44px; background: #17141f; color: #efe6d2; border: 1px solid #efe6d2; cursor: pointer; font-size: 1.3rem; }
.detail .zoomhint { font-size: .85rem; margin: 0; }

/* ---------- reveal: only what starts below the first screen waits ---------- */
.rv { transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.rv.pre { opacity: 0; transform: translateY(28px); }

@media (max-width: 760px) {
  body { font-size: 1.05rem; }
  .bar nav .wide { display: none; }
  .story { --rail: 40px; --edge: var(--gutter-s); }
  .chapter { padding-block: 5rem; padding-inline-start: calc(var(--edge) + var(--rail) + .9rem); min-height: 75svh; }
  .chapter .when { font-size: 2.4rem; }
  .hero { min-height: 0; align-items: start; }
  .hero-media { position: relative; inset: auto; width: 100%; height: 62svh; }
  .hero-media::after, [dir="rtl"] .hero-media::after { background: linear-gradient(180deg, rgb(23 20 31 / .35) 0%, transparent 22%, transparent 62%, var(--bg) 100%); }
  .hero-photo { object-position: 63% 18%; }
  .hero-text { margin-top: -4.5rem; padding-block: 0 3rem; }
  .hero-text > * { max-width: 100%; }
  .hero h1, .hero h1:lang(ar) { font-size: clamp(3rem, 15vw, 4.6rem); }
  .gift .wrap, .letter .wrap { grid-template-columns: 1fr; }
  form { grid-template-columns: 1fr; }
  .work .canvas img, .work.commission .paper { height: clamp(220px, 42vh, 380px); }
  .bar nav { gap: .2rem .8rem; font-size: .72rem; letter-spacing: .1em; }
  .bar .sig { font-size: .98rem; }
  .detail .in { grid-template-columns: 1fr; grid-template-rows: 55% 45%; }
  .detail .info { padding: 1.4rem var(--gutter-e) 2rem var(--gutter-s); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .rv, .work .canvas img, .detail .stage img { transition: none; }
  .rv.pre { opacity: 1; transform: none; }
  .cue i { animation: none; }
  .morph { height: auto; display: grid; gap: 1.5rem; }
  .morph > span { position: static; }
  .morph .from, .morph .to { opacity: 1; filter: none; }
  .wall-hint { visibility: hidden; }
  .road .drawn { stroke-dashoffset: 0; }
  .road .stop { fill: var(--ink); }
  .works { height: auto !important; }
  .works-pin { position: static; height: auto; padding-block: 6rem 2rem; }
  .track { transform: none !important; overflow-x: auto; padding-block: 2rem; }
}
