/* ==========================================================================
   Turath Conservation — design tokens and site styles (prototype)
   Colour family: deep teal (type), coral stone (reading surfaces), timber, oxide (attention / active control only).
   ========================================================================== */
:root {
  --teal: #123F43;
  --stone: #F4EEE2;
  --timber: #704A35;
  --oxide: #B66C50;
  --paper: #EBE2CF;          /* warm paper spread, one step deeper than stone */
  --stone-line: #D8CDB8;     /* hairlines on stone */
  --ink: var(--teal);
  --ink-muted: rgba(18, 63, 67, .72);
  --ink-faint: rgba(18, 63, 67, .5);
  --focus: var(--oxide);

  --font-display: "Spectral", "Iowan Old Style", Georgia, serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", system-ui, sans-serif;

  --measure: 64ch;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 64px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) { :root { color-scheme: light; } } /* stone surfaces are the brand; no dark theme in the prototype */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--stone); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.55; min-height: 100dvh; }
[lang="ar"], html[dir="rtl"] body { font-family: var(--font-arabic); }
html[dir="rtl"] body { font-size: 1.125rem; line-height: 1.85; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { text-decoration-color: var(--oxide); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure, dl, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* --------------------------------------------------------------- Type */
.h-display { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.5rem, 4.6vw + 1rem, 5.4rem); line-height: 1.02; letter-spacing: -.012em; text-wrap: balance; }
.h-title   { font-family: var(--font-display); font-weight: 300; font-size: clamp(2.1rem, 3.4vw + .8rem, 4rem); line-height: 1.06; letter-spacing: -.01em; text-wrap: balance; }
.h-section { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 1.3vw + 1rem, 2.1rem); line-height: 1.15; text-wrap: balance; }
html[dir="rtl"] .h-display, html[dir="rtl"] .h-title, html[dir="rtl"] .h-section { font-family: var(--font-arabic); font-weight: 500; letter-spacing: 0; }
html[dir="rtl"] .h-display { font-size: clamp(2.1rem, 4vw + .8rem, 4.4rem); line-height: 1.25; }
html[dir="rtl"] .h-title { font-size: clamp(1.9rem, 3vw + .6rem, 3.4rem); line-height: 1.3; }
html[dir="rtl"] .h-section { line-height: 1.5; }
.eyebrow { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
html[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: .9375rem; }
.eyebrow [lang="ar"] { font-family: var(--font-arabic); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; vertical-align: -.05em; }
.eyebrow__sep { opacity: .5; margin: 0 .25em; }
.lede { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 1vw + .8rem, 1.45rem); color: var(--ink-muted); margin-top: 1.1rem; }
html[dir="rtl"] .lede { font-family: var(--font-arabic); font-style: normal; }
.prose, .prose-lead { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
.prose-lead { font-family: var(--font-display); font-size: clamp(1.2rem, 1.1vw + .85rem, 1.6rem); line-height: 1.4; font-weight: 300; }
html[dir="rtl"] .prose-lead { font-family: var(--font-arabic); font-weight: 400; line-height: 1.8; }
.note { font-size: .9rem; color: var(--ink-muted); max-width: var(--measure); margin-top: 2.5rem; }
.pending-text { color: var(--oxide); }

/* ----------------------------------------------------------- Buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.35em; border: 1px solid var(--teal); border-radius: var(--radius); background: var(--teal); color: var(--stone); text-decoration: none; font-weight: 500; font-size: .95rem; line-height: 1; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.btn:hover { background: #0d3134; }
.btn--ghost { background: transparent; color: var(--teal); }
.btn--ghost:hover { background: rgba(18,63,67,.06); border-color: var(--oxide); }
.btn--small { padding: .55em .9em; font-size: .85rem; }
.btn:focus-visible { outline-color: var(--oxide); }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin-top: 1.9rem; }
.link-arrow { text-decoration: none; border-bottom: 1px solid var(--oxide); padding-bottom: .05em; }
.link-arrow:hover { color: var(--oxide); }

/* ------------------------------------------------------------ Header */
.skip { position: absolute; inset-inline-start: 1rem; top: -3rem; background: var(--teal); color: var(--stone); padding: .5rem .8rem; z-index: 100; }
.skip:focus { top: .5rem; }
.private-banner { background: var(--oxide); color: #fff; font-size: .8rem; padding: .35rem var(--gutter); text-align: center; }
.site-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); padding: 0 var(--gutter); background: var(--stone); border-bottom: 1px solid transparent; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand__symbol { width: 34px; height: 32px; }
.brand__word { display: flex; flex-direction: column; line-height: 1; }
.brand__ar { font-family: var(--font-arabic); font-weight: 600; font-size: 1.05rem; }
.brand__latin { font-family: var(--font-sans); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .2em; }
.nav-list { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.8rem); }
.nav-list a { text-decoration: none; font-size: .95rem; padding: .35em 0; border-bottom: 1px solid transparent; }
.nav-list a:hover, .nav-list a[aria-current="page"] { border-bottom-color: var(--oxide); }
.nav-list__tools { display: flex; align-items: center; gap: .9rem; margin-inline-start: .5rem; padding-inline-start: 1rem; border-inline-start: 1px solid var(--stone-line); }
.lang-switch { font-weight: 500; }
html[dir="ltr"] .lang-switch { font-family: var(--font-arabic); }
html[dir="rtl"] .lang-switch { font-family: var(--font-sans); }
.motion-toggle { background: transparent; border: 1px solid var(--stone-line); border-radius: 999px; padding: .3em .75em; font-size: .78rem; cursor: pointer; }
.motion-toggle[aria-pressed="false"] { border-color: var(--oxide); color: var(--oxide); }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--stone-line); border-radius: var(--radius); padding: .45em .8em; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-list { display: none; position: absolute; top: var(--header-h); inset-inline: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--stone); border-bottom: 1px solid var(--stone-line); padding: .5rem var(--gutter) 1rem; }
  .nav-list.is-open { display: flex; }
  .nav-list li a { display: block; padding: .7em 0; font-size: 1.05rem; }
  .nav-list__tools { border: 0; padding: .6rem 0 0; margin: 0; justify-content: space-between; }
}

/* ------------------------------------------------------------ Layout */
.section { padding: clamp(3rem, 7vw, 6.5rem) var(--gutter); }
.section--page { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.section__head { max-width: var(--measure); margin-bottom: 2.5rem; }
.section__lead { margin-top: .6rem; color: var(--ink-muted); }
.page-head { max-width: 52rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.page-head__lead { margin-top: 1.2rem; font-size: 1.15rem; color: var(--ink-muted); max-width: var(--measure); }
.page-head .eyebrow { margin-top: 1.2rem; }
.section--intro { padding-top: clamp(3.5rem, 8vw, 7rem); }

/* ------------------------------------------------------------ Figures */
.fig { display: grid; gap: .55rem; }
.fig .pic { width: 100%; }
.fig figcaption { font-size: .85rem; line-height: 1.45; color: var(--ink-muted); }
html[dir="rtl"] .fig figcaption { font-size: .92rem; line-height: 1.7; }
.fig__label { color: var(--oxide); font-weight: 500; }
.fig__caption { color: var(--ink); }
.fig__credit { display: block; color: var(--ink-faint); font-size: .8em; margin-top: .15rem; }
.fig--small .pic { width: min(100%, 420px); }      /* workshop photographs stay small and sharp */
.fig--small .pic img { image-rendering: auto; max-height: 420px; width: auto; }
.plates { display: grid; gap: 2rem var(--gutter); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; margin-top: 2rem; }
.plates--row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pending { display: inline-block; width: 1.6em; height: 0; vertical-align: middle; margin-inline-start: .4em; border-top: 2px dotted var(--oxide); }

/* ------------------------------------------------------------- Scene */
.scene { position: relative; background: var(--stone); }
.arrival { display: grid; min-height: calc(100svh - var(--header-h)); }
.arrival__type { padding: clamp(2.5rem, 6vh, 5rem) var(--gutter) clamp(2rem, 5vh, 3rem); align-self: center; max-width: 40rem; }
.arrival__type .h-display { margin-top: 1.3rem; }
.scroll-hint { margin-top: clamp(2rem, 6vh, 4rem); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); display: flex; align-items: center; gap: .6rem; }
html[dir="rtl"] .scroll-hint { letter-spacing: 0; text-transform: none; }
.scroll-hint__line { width: 2.2rem; height: 1px; background: var(--oxide); }

/* Stills (base experience + reduced motion) */
.stills { display: grid; gap: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2rem, 5vw, 4rem); }
.arrival--still { grid-template-columns: 1fr; }
.still--detail .pic--desktop { display: none; }
.still { padding: 0 var(--gutter); }
.still .pic { width: 100%; }
@media (min-width: 900px) {
  .arrival--still { grid-template-columns: 38% 1fr; align-items: center; }
  .still--detail { padding-inline-start: 0; }
  .still--detail .pic--phone { display: none; }
  .still--detail .pic--desktop { display: block; }
}
.still--plate { margin: 0; }

/* Track + stage (motion) */
.track { position: relative; height: calc((100svh - var(--header-h)) * 4.6); }
.stage { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); overflow: hidden; background: var(--stone); isolation: isolate; }
.layer { position: absolute; inset: 0; }
.layer--photo { z-index: 2; clip-path: inset(0 0 0 38%); will-change: transform, clip-path; }
html[dir="rtl"] .layer--photo { clip-path: inset(0 38% 0 0); }
.layer--photo .pic { position: absolute; left: 0; top: 0; width: 1000px; max-width: none; transform-origin: 0 0; will-change: transform; }
.layer--photo .pic img { width: 1000px; max-width: none; height: auto; background: none !important; }
.layer--type { z-index: 3; display: grid; align-items: center; pointer-events: none; }
.layer--type .arrival__type { pointer-events: auto; width: 38%; max-width: none; }
.layer--caption { z-index: 3; display: flex; align-items: flex-end; padding: 0 var(--gutter) 1.1rem; pointer-events: none; opacity: 0; }
.stage-caption { font-size: .85rem; color: var(--stone); background: rgba(18,63,67,.82); padding: .45rem .7rem; border-radius: var(--radius); max-width: 34rem; }
.stage-caption__credit { display: block; opacity: .75; font-size: .85em; }
.layer--paper { z-index: 1; background: var(--paper); transform: translate3d(0, 100%, 0); will-change: transform; padding: clamp(1rem, 3vh, 2.5rem) var(--gutter); overflow: hidden; }
@media (max-width: 899px) {
  .layer--photo, html[dir="rtl"] .layer--photo { clip-path: inset(50% 0 0 0); }
  .layer--type { align-items: start; }
  .layer--type .arrival__type { width: 100%; align-self: start; padding-top: clamp(1.2rem, 4vh, 2.5rem); }
  .layer--type .h-display { margin-top: .8rem; }
  .layer--type .cta-row { margin-top: 1.2rem; }
  .layer--type .scroll-hint { display: none; }
}

/* The paper spread */
.paper { background: var(--paper); }
.spread { height: 100%; display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; gap: 1rem var(--gutter); align-content: start; }
.plate { display: grid; gap: .5rem; }
.plate__frame { position: relative; width: 100%; background: none; }
.plate__frame .pic { width: 100%; }
.plate__frame--slot { background: transparent; }
.plate__caption { font-size: .82rem; line-height: 1.4; color: var(--ink-muted); }
.plate--slot { width: 62%; justify-self: end; }
html[dir="rtl"] .plate--slot { justify-self: start; }
.plate--relief .plate__frame { aspect-ratio: 3 / 2; }
.observation { max-width: 40ch; }
.observation__text { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.4; }
html[dir="rtl"] .observation__text { font-family: var(--font-arabic); line-height: 1.8; font-size: 1.05rem; }
.observation__num { display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; border: 1px solid var(--oxide); border-radius: 50%; color: var(--oxide); font-family: var(--font-sans); font-size: .72em; margin-inline-end: .5em; vertical-align: .1em; }
.observation__status { font-size: .78rem; color: var(--oxide); margin-top: .5rem; }
.observation .btn { margin-top: .9rem; }
.observation--stage { opacity: 0; }
.plate--relief { opacity: 0; }
@media (min-width: 900px) {
  .spread { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; align-content: center; gap: 1.2rem calc(var(--gutter) * 1.2); max-width: 1480px; margin: 0 auto; }
  .plate--slot { width: 100%; grid-column: 1; grid-row: 1; align-self: end; }
  .plate--relief { grid-column: 2; grid-row: 1; align-self: end; }
  .observation--stage { grid-column: 2; grid-row: 2; }
}
/* stills version of the plate spread */
.still--plate { display: grid; gap: 1.5rem var(--gutter); padding: clamp(1.5rem, 4vw, 3rem) var(--gutter); }
@media (min-width: 900px) { .still--plate { grid-template-columns: 3fr 2fr; align-items: end; } }
.paper--inline { display: grid; gap: 1.5rem var(--gutter); padding: clamp(1.2rem, 3vw, 2.5rem); margin-top: 2rem; }
@media (min-width: 900px) { .paper--inline { grid-template-columns: 3fr 2fr; align-items: end; } }

/* Annotation line */
.ann { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ann__line { fill: none; stroke: var(--oxide); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ann--static .ann__line { stroke-dashoffset: 0; }
.ann__end { fill: var(--oxide); r: 3px; opacity: 0; }
.ann--static .ann__end { opacity: 1; }
.ann__num { position: absolute; transform: translate(.6rem, -1.5rem); display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--paper); border: 1px solid var(--oxide); color: var(--oxide); font-size: .7rem; font-family: var(--font-sans); opacity: 0; }
html[dir="rtl"] .ann__num { transform: translate(.6rem, -1.5rem); } /* photographs keep their orientation in both languages */
.ann--static + .ann__num, .is-drawn .ann__num { opacity: 1; }
.inspect-link { margin-top: .9rem; }
.js .inspect-link { display: none; }

/* Inspect dialog */
.inspect { border: 0; padding: 0; max-width: min(96vw, 1400px); width: 96vw; background: var(--paper); color: var(--ink); }
.inspect::backdrop { background: rgba(18,63,67,.6); }
.inspect__inner { display: grid; gap: 1rem; padding: 1rem clamp(1rem, 3vw, 2rem) 1.5rem; }
.inspect__bar { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; }
.inspect__title { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
html[dir="rtl"] .inspect__title { font-family: var(--font-arabic); }
.inspect__toggle { font-size: .9rem; display: inline-flex; gap: .4em; align-items: center; }
.inspect__toggle input { accent-color: var(--oxide); }
.inspect__frame { position: relative; max-height: 70vh; display: grid; justify-content: center; }
.inspect__frame .pic img { max-height: 70vh; width: auto; max-width: 100%; }
.inspect__frame .pic { width: auto; }
.inspect__frame .ann, .inspect__frame .ann__num { transition: opacity .2s; }
.inspect.hide-ann .ann, .inspect.hide-ann .ann__num { opacity: 0; }
.inspect__text { max-width: 60ch; }

/* ---------------------------------------------------------- Expertise */
.section--expertise { display: grid; grid-template-columns: 1fr; position: relative; }
.margin-rule { display: none; }
@media (min-width: 900px) {
  .section--expertise { grid-template-columns: 3rem 1fr; }
  .margin-rule { display: block; position: relative; }
  .margin-rule__line { position: sticky; top: calc(var(--header-h) + 2rem); display: block; width: 1.5px; height: 40vh; background: var(--oxide); transform-origin: top; transform: scaleY(0); transition: transform 1.1s var(--ease); }
  .is-visible .margin-rule__line { transform: scaleY(1); }
}
.expertise { display: grid; gap: 2.5rem var(--gutter); }
@media (min-width: 1100px) { .expertise { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } .expertise .section__head { grid-column: 1 / -1; } }
.service-list { display: grid; }
.service-list__item { border-top: 1px solid var(--stone-line); }
.service-list__item:last-child { border-bottom: 1px solid var(--stone-line); }
.service-list__link { display: grid; grid-template-columns: 3rem 1fr; gap: .2rem 1rem; padding: 1.1rem 0; text-decoration: none; position: relative; }
.service-list__link::before { content: ""; position: absolute; inset-inline-start: -1.25rem; top: 1.1rem; bottom: 1.1rem; width: 1.5px; background: var(--oxide); transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease); }
.service-list__link:hover::before, .service-list__link:focus-visible::before { transform: scaleY(1); }
.service-list__n { font-size: .8rem; color: var(--oxide); padding-top: .35em; grid-row: 1 / 3; }
.service-list__title { font-family: var(--font-display); font-size: 1.35rem; }
html[dir="rtl"] .service-list__title { font-family: var(--font-arabic); font-weight: 500; }
.service-list__summary { color: var(--ink-muted); font-size: .95rem; }
.materials__lead { color: var(--ink-muted); margin-bottom: 1rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.tab { background: transparent; border: 1px solid var(--stone-line); border-radius: 999px; padding: .5em 1em; cursor: pointer; font-size: .9rem; }
.tab[aria-selected="true"] { border-color: var(--oxide); color: var(--oxide); }
.tab:hover { border-color: var(--teal); }
.materials__panels { min-height: 0; }
.plates--stacked { display: grid; gap: 1.5rem var(--gutter); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 0; min-height: 360px; align-items: start; }
.plate--material .pic { width: 100%; max-width: 420px; }

/* -------------------------------------------------------------- Index */
.index { display: grid; gap: 2.5rem var(--gutter); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.index--page { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.index__link { display: grid; gap: .9rem; text-decoration: none; }
.index__image .pic { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper); }
.index__image img { width: 100%; height: 100%; object-fit: cover; }
.index__meta { display: grid; gap: .15rem; }
.index__title { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; }
html[dir="rtl"] .index__title { font-family: var(--font-arabic); font-weight: 500; }
.index__line { font-size: .9rem; color: var(--ink-muted); }
.index__key { color: var(--ink-faint); margin-inline-end: .3em; }
.index__role { color: var(--ink); }
.index__status { font-size: .75rem; color: var(--oxide); }
.section__more { margin-top: 2.5rem; }

/* ------------------------------------------------------------- Invite */
.section--invite { background: var(--paper); }
.invite { max-width: var(--measure); }
.invite .prose-lead { margin-top: 1rem; }

/* ------------------------------------------------------------- Footer */
.site-footer { border-top: 1px solid var(--stone-line); padding: 2.5rem var(--gutter) 3rem; font-size: .9rem; color: var(--ink-muted); }
.site-footer__inner { display: grid; gap: .8rem; max-width: 70rem; }
.site-footer__brand { color: var(--ink); font-weight: 500; }
.site-footer__brand [lang="ar"] { font-family: var(--font-arabic); font-weight: 600; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: .5rem; }
.site-footer__nav a { text-decoration: none; }

/* ------------------------------------------------------------ Project */
.project__head { display: grid; }
.project__lead-image .pic { aspect-ratio: 16 / 9; overflow: hidden; }
.project__lead-image img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .project__lead-image .pic { aspect-ratio: 21 / 9; } }
.project__intro { padding: clamp(2rem, 5vw, 4rem) var(--gutter) 0; max-width: 56rem; }
.project__intro .h-title { margin-top: .8rem; }
.project__scope { margin-top: 1.4rem; font-family: var(--font-display); font-size: clamp(1.2rem, 1vw + .9rem, 1.55rem); line-height: 1.35; max-width: var(--measure); }
html[dir="rtl"] .project__scope { font-family: var(--font-arabic); line-height: 1.8; }
.project__credit { margin-top: .8rem; color: var(--ink-muted); max-width: var(--measure); }
.project__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem var(--gutter); margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--stone-line); font-size: .95rem; }
.project__meta dt { color: var(--ink-faint); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .2rem; }
html[dir="rtl"] .project__meta dt { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.project__note { margin-top: 1.5rem; font-size: .9rem; color: var(--ink-muted); max-width: var(--measure); padding-inline-start: 1rem; border-inline-start: 1.5px solid var(--oxide); }
.project__status { margin-top: 1rem; font-size: .85rem; }
.project__body { display: grid; gap: 2rem var(--gutter); padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); }
.project__body--thin { max-width: 60rem; }
@media (min-width: 1000px) { .project__body { grid-template-columns: 14rem minmax(0, 1fr); } }
.project__toc { font-size: .9rem; }
.project__toc ol { display: grid; gap: .4rem; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.project__toc a { text-decoration: none; color: var(--ink-muted); }
.project__toc a:hover { color: var(--oxide); }
.project__sections { display: grid; gap: clamp(3rem, 6vw, 5rem); max-width: 60rem; }
.project__section .prose { margin-top: 1rem; font-size: 1.08rem; }
.needs { margin-top: 1rem; font-size: .85rem; color: var(--oxide); border: 1px dotted var(--oxide); padding: .6rem .9rem; border-radius: var(--radius); max-width: var(--measure); }
.needs ul { list-style: disc; padding-inline-start: 1.2em; margin-top: .2rem; }
.project__enquire { padding-top: 1rem; border-top: 1px solid var(--stone-line); }

/* ---------------------------------------------------------- Expertise page */
.services { display: grid; gap: clamp(3rem, 6vw, 5rem); }
.service { display: grid; grid-template-columns: 1fr; gap: 1.5rem var(--gutter); position: relative; padding-inline-start: 1.5rem; }
.service__rule { position: absolute; inset-inline-start: 0; top: .4rem; bottom: 0; width: 1.5px; background: var(--oxide); transform: scaleY(0); transform-origin: top; transition: transform 1s var(--ease); }
.is-visible .service__rule { transform: scaleY(1); }
.service__n { font-size: .8rem; color: var(--oxide); }
.service__summary { margin-top: .5rem; color: var(--ink-muted); }
.service__qa { display: grid; gap: 1.2rem; max-width: 60ch; }
.service__qa dt { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: .25rem; }
html[dir="rtl"] .service__qa dt { font-family: var(--font-arabic); font-weight: 500; }
@media (min-width: 1000px) { .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } .service .plates--row { grid-column: 1 / -1; } }

/* ------------------------------------------------------------ Approach */
.steps { display: grid; gap: clamp(3rem, 6vw, 5rem); }
.step { display: grid; gap: 1.5rem var(--gutter); position: relative; padding-inline-start: 1.5rem; }
.step__rule { position: absolute; inset-inline-start: 0; top: .4rem; bottom: 0; width: 1.5px; background: var(--oxide); transform: scaleY(0); transform-origin: top; transition: transform 1s var(--ease); }
.is-visible .step__rule { transform: scaleY(1); }
.step__n { font-size: .8rem; color: var(--oxide); }
.step__text .prose { margin-top: .8rem; }
.step__record { margin-top: 1.2rem; padding: .8rem 1rem; background: var(--paper); border-radius: var(--radius); max-width: 48ch; }
.step__record dt { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
html[dir="rtl"] .step__record dt { letter-spacing: 0; text-transform: none; }
.step__case { margin-top: 1rem; font-size: .95rem; color: var(--ink-muted); max-width: 52ch; }
@media (min-width: 900px) { .step { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }

/* ------------------------------------------------------------ Practice */
.prose--columns { display: grid; gap: 2.5rem var(--gutter); max-width: none; }
.prose--columns section { max-width: 52ch; }
.prose--columns .h-section { margin-bottom: .8rem; }
@media (min-width: 1000px) { .prose--columns { grid-template-columns: repeat(3, 1fr); } }
.people { margin-top: clamp(3rem, 6vw, 5rem); }
.people__list { display: grid; gap: 1.5rem var(--gutter); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1.5rem; }
.person { border-top: 1px solid var(--stone-line); padding-top: 1rem; }
.person__name { font-family: var(--font-display); font-size: 1.3rem; }
html[dir="rtl"] .person__name { font-family: var(--font-arabic); font-weight: 500; }
.person__role { color: var(--oxide); font-size: .9rem; margin-top: .2rem; }
.person__summary { margin-top: .5rem; color: var(--ink-muted); font-size: .95rem; }

/* ------------------------------------------------------------- Contact */
.enquiry { display: grid; gap: 1.2rem var(--gutter); max-width: 46rem; grid-template-columns: 1fr 1fr; }
.enquiry__row { display: grid; gap: .35rem; grid-column: 1 / -1; }
.enquiry__row--half { grid-column: span 1; }
@media (max-width: 640px) { .enquiry__row--half { grid-column: 1 / -1; } }
.enquiry label { font-size: .9rem; color: var(--ink-muted); }
.enquiry input, .enquiry textarea, .enquiry select { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--stone-line); border-radius: var(--radius); padding: .7em .8em; width: 100%; }
.enquiry input:focus, .enquiry textarea:focus, .enquiry select:focus { outline: 2px solid var(--oxide); outline-offset: 1px; border-color: var(--oxide); }
.enquiry [aria-invalid="true"] { border-color: var(--oxide); }
.enquiry__hp { position: absolute; left: -9999px; }
.enquiry__status { grid-column: 1 / -1; min-height: 1.5em; }
.enquiry__status.is-error { color: var(--oxide); }
.enquiry__status.is-ok { color: var(--teal); font-family: var(--font-display); font-size: 1.1rem; }
html[dir="rtl"] .enquiry__status.is-ok { font-family: var(--font-arabic); }
.enquiry__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.enquiry__alt { font-size: .9rem; color: var(--ink-muted); }

/* ------------------------------------------------------ Motion rules */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
html.reduced-motion .track { display: none !important; }
html.reduced-motion .stills { display: grid !important; }
html.reduced-motion .margin-rule__line, html.reduced-motion .service__rule, html.reduced-motion .step__rule { transform: none; transition: none; }

/* Tuning panel (private builds only) */
.tune { position: fixed; inset-inline-end: .5rem; bottom: .5rem; z-index: 90; width: min(92vw, 320px); background: rgba(18,63,67,.92); color: var(--stone); padding: .6rem .75rem; border-radius: 4px; font: 12px/1.4 var(--font-sans); display: grid; gap: .35rem; }
.tune.is-min > *:not(.tune__bar) { display: none; }
.tune__bar { display: flex; justify-content: space-between; align-items: center; }
.tune label { display: grid; gap: .1rem; }
.tune input[type=range] { width: 100%; accent-color: var(--oxide); }
.tune__out { font-size: 11px; word-break: break-all; color: #F4EEE2; }
.tune button { background: transparent; color: var(--stone); border: 1px solid rgba(244,238,226,.5); border-radius: 3px; padding: .2em .6em; font-size: 11px; cursor: pointer; }
