/* Gallery99 - site styles
   Direction: "the house" - plaster-greige panelled rooms, black-lacquer salons, champagne gilt,
   arch frames taken from her mirrors and built-ins. Bilingual EN / AR (RTL) via logical properties. */

@layer reset, base, layout, components, pages, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  img, video, svg { display: block; max-width: 100%; }
  img, video { height: auto; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  a { color: inherit; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
}

@layer base {
  :root {
    --wall: #EFEBE5;        /* plaster greige - page canvas */
    --wall-2: #E4DDD3;      /* panel shade */
    --paper: #F8F6F2;       /* raised surfaces */
    --lacquer: #131211;     /* dark salon rooms (logo black) */
    --lacquer-2: #1E1C1A;
    --ink: #1B1917;
    --muted: #5C554C;       /* AA on --wall */
    --gilt: #7D6034;        /* antique gold for small text: 4.8:1 on --wall (AA) */
    --gilt-soft: #9C7A45;   /* lighter champagne for large numerals and ornaments only */
    --gilt-light: #D2BA8C;  /* gilt on lacquer */
    --on-dark: #EFE9DF;
    --on-dark-muted: #B9B0A3;
    --line: rgba(27, 25, 23, .16);
    --line-dark: rgba(239, 233, 223, .18);

    --font-display: "Marcellus", "Times New Roman", serif;
    --font-body: "Jost", "Segoe UI", system-ui, sans-serif;
    --track-caps: .3em;

    --step--1: clamp(.8rem, .78rem + .1vw, .88rem);
    --step-0: clamp(1rem, .97rem + .18vw, 1.1rem);
    --step-1: clamp(1.2rem, 1.08rem + .55vw, 1.55rem);
    --step-2: clamp(1.55rem, 1.25rem + 1.2vw, 2.35rem);
    --step-3: clamp(2.05rem, 1.5rem + 2.4vw, 3.6rem);
    --step-4: clamp(2.6rem, 1.7rem + 4.2vw, 5.4rem);

    --gutter: clamp(16px, 4vw, 56px);
    --max: 1240px;
    --radius: 6px;
    --arch: 999px 999px 0 0;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --header-h: 76px;
    color-scheme: light;
  }

  html[lang="ar"] {
    --font-display: "El Messiri", "Segoe UI", sans-serif;
    --font-body: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
    --track-caps: 0;
  }

  /* one language visible at a time */
  html:not([lang="ar"]) [data-lang="ar"],
  html[lang="ar"] [data-lang="en"] { display: none !important; }

  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  body {
    background: var(--wall);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-weight: 400;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  html[lang="ar"] body { font-size: calc(var(--step-0) * 1.1); line-height: 1.85; }

  h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: .005em;
    text-wrap: balance;
  }
  html[lang="ar"] :is(h1, h2, h3, h4) { font-weight: 500; line-height: 1.3; letter-spacing: 0; }
  p { text-wrap: pretty; max-width: 62ch; }

  a { text-decoration-thickness: 1px; text-underline-offset: .22em; }
  ::selection { background: var(--gilt-light); color: var(--ink); }

  :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
  .room--dark :focus-visible, .site-footer :focus-visible, .menu :focus-visible, .lightbox :focus-visible {
    outline-color: var(--gilt-light);
  }

  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }
  @media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
  .wrap--narrow { width: min(100% - 2 * var(--gutter), 820px); margin-inline: auto; }

  .room { position: relative; padding-block: clamp(72px, 10vw, 140px); }
  .room--tight { padding-block: clamp(48px, 7vw, 96px); }
  .room--dark { background: var(--lacquer); color: var(--on-dark); }
  .room--paper { background: var(--paper); }
  .room--panel { background: var(--wall-2); }

  .split {
    display: grid;
    gap: clamp(32px, 6vw, 96px);
    align-items: center;
    grid-template-columns: 1fr;
  }
  @media (min-width: 880px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split--wide-media { grid-template-columns: 1.15fr .85fr; }
    .split--flip > :first-child { order: 2; }
  }

  .stack > * + * { margin-block-start: var(--flow, 1.1em); }
  .grid-3 { display: grid; gap: clamp(20px, 3vw, 36px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

  .page-head { padding-block: calc(var(--header-h) + clamp(56px, 8vw, 120px)) clamp(40px, 6vw, 80px); }
  .page-head .lead { margin-block-start: 1.2rem; }
}

@layer components {
  /* ---------- type helpers ---------- */
  .eyebrow {
    display: inline-flex; align-items: center; gap: .8em;
    font-family: "Jost", var(--font-body);
    font-size: var(--step--1); font-weight: 500;
    letter-spacing: var(--track-caps); text-transform: uppercase;
    color: var(--gilt);
  }
  html[lang="ar"] .eyebrow { font-family: var(--font-body); text-transform: none; font-size: .95rem; }
  .eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
  .room--dark .eyebrow { color: var(--gilt-light); }
  .display { font-size: var(--step-4); }
  .h2 { font-size: var(--step-3); }
  .h3 { font-size: var(--step-2); }
  .h4 { font-size: var(--step-1); }
  .lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); font-weight: 300; }
  html[lang="ar"] .lead { font-weight: 400; }
  .muted { color: var(--muted); }
  .small { font-size: var(--step--1); }
  .room--dark .muted, .room--dark .lead { color: var(--on-dark-muted); }

  /* ---------- skip link ---------- */
  .skip {
    position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200;
    background: var(--ink); color: var(--wall); padding: 10px 16px; border-radius: var(--radius);
  }
  .skip:focus { top: 12px; }

  /* ---------- buttons ---------- */
  .btn {
    --bg: var(--ink); --fg: var(--wall);
    display: inline-flex; align-items: center; justify-content: center; gap: .6em;
    min-height: 52px; padding: 0 1.7em;
    border-radius: 26px 26px 6px 6px;           /* soft arch top, echoing her doorways */
    background: var(--bg); color: var(--fg);
    font-family: "Jost", var(--font-body); font-weight: 500; font-size: .92rem;
    letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
    border: 1px solid var(--bg);
    transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
  }
  html[lang="ar"] .btn { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 1rem; }
  .btn:hover { --bg: var(--gilt); border-color: var(--gilt); }
  .btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--ink); }
  .btn--ghost:hover { --bg: var(--ink); --fg: var(--wall); border-color: var(--ink); }
  .room--dark .btn { --bg: var(--on-dark); --fg: var(--lacquer); border-color: var(--on-dark); }
  .room--dark .btn:hover { --bg: var(--gilt-light); border-color: var(--gilt-light); }
  .room--dark .btn--ghost { --bg: transparent; --fg: var(--on-dark); border-color: var(--on-dark-muted); }
  .btn svg { width: 18px; height: 18px; flex: none; }
  .btn-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }

  .link-arrow {
    display: inline-flex; align-items: center; gap: .55em;
    font-family: "Jost", var(--font-body); font-weight: 500; font-size: .86rem;
    letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
    padding-block-end: 4px; transition: background-size .45s var(--ease);
  }
  html[lang="ar"] .link-arrow { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 1rem; background-position: 100% 100%; }
  .link-arrow:hover { background-size: 100% 1px; }
  .link-arrow svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
  .link-arrow:hover svg { transform: translateX(4px); }
  html[dir="rtl"] .link-arrow svg, html[dir="rtl"] .btn .flip { transform: scaleX(-1); }
  html[dir="rtl"] .link-arrow:hover svg { transform: scaleX(-1) translateX(4px); }

  /* ---------- header ---------- */
  .site-header {
    position: fixed; inset-inline: 0; top: 0; z-index: 90;
    height: var(--header-h);
    display: flex; align-items: center;
    transition: background .4s var(--ease), box-shadow .4s var(--ease), color .4s var(--ease);
  }
  .site-header .wrap { display: flex; align-items: center; gap: 20px; }
  .site-header.is-solid { background: color-mix(in srgb, var(--wall) 94%, transparent); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(10px); }
  .brand { display: block; flex: none; }
  .brand img { height: 38px; width: auto; }
  .brand .logo-white { display: none; }
  .nav { display: none; margin-inline-start: auto; }
  .nav ul { display: flex; gap: clamp(14px, 1.8vw, 28px); }
  .nav a {
    font-family: "Jost", var(--font-body); font-size: .8rem; font-weight: 500;
    letter-spacing: .18em; text-transform: uppercase; text-decoration: none; padding-block: 8px;
    background: linear-gradient(var(--gilt), var(--gilt)) no-repeat 50% 100% / 0 1px; transition: background-size .4s var(--ease);
  }
  html[lang="ar"] .nav a { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 1rem; }
  .nav a:hover, .nav a[aria-current="page"] { background-size: 100% 1px; }
  .header-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
  @media (min-width: 1180px) { .nav + .header-tools { margin-inline-start: clamp(12px, 2vw, 28px); } }
  .header-book { display: none; min-height: 42px; padding: 0 1.2em; font-size: .78rem; }
  .icon-btn {
    width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
    border: 1px solid var(--line); transition: border-color .3s, background .3s;
  }
  .icon-btn:hover { border-color: var(--ink); }
  .icon-btn svg { width: 19px; height: 19px; }
  @media (min-width: 720px) { .header-book { display: inline-flex; } }
  @media (max-width: 480px) {
    .site-header a.icon-btn { display: none; }      /* Instagram stays in the menu + footer */
    .brand img { height: 32px; }
    .header-tools { gap: 8px; }
  }
  @media (min-width: 1180px) { .nav { display: block; } }

  /* dark pages: light logo + text over lacquer */
  body.theme-dark .site-header:not(.is-solid) { color: var(--on-dark); }
  body.theme-dark .site-header:not(.is-solid) .logo-ink { display: none; }
  body.theme-dark .site-header:not(.is-solid) .logo-white { display: block; }
  body.theme-dark .site-header:not(.is-solid) .icon-btn { border-color: var(--line-dark); }
  body.theme-dark .site-header:not(.is-solid) .lang { border-color: var(--line-dark); }
  body.theme-dark .site-header:not(.is-solid) .header-book { --bg: var(--on-dark); --fg: var(--lacquer); border-color: var(--on-dark); }

  /* ---------- language toggle ---------- */
  .lang {
    display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; gap: 2px;
  }
  .lang button {
    min-width: 42px; height: 34px; padding: 0 10px; border-radius: 999px;
    font-family: "Jost", sans-serif; font-size: .78rem; font-weight: 500; letter-spacing: .12em;
    transition: background .3s var(--ease), color .3s var(--ease);
  }
  .lang button[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; letter-spacing: 0; font-size: .9rem; }
  .lang button[aria-pressed="true"] { background: var(--ink); color: var(--wall); }
  body.theme-dark .site-header:not(.is-solid) .lang button[aria-pressed="true"] { background: var(--on-dark); color: var(--lacquer); }

  /* ---------- full-screen menu ---------- */
  .menu {
    position: fixed; inset: 0; z-index: 120; background: var(--lacquer); color: var(--on-dark);
    display: grid; grid-template-rows: auto 1fr auto; padding: 0 var(--gutter) 28px;
    opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s;
    overflow-y: auto;
  }
  .menu.is-open { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }
  .menu__top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
  .menu__top img { height: 36px; width: auto; }
  .menu__close { border-color: var(--line-dark); }
  .menu__list { align-self: center; display: grid; gap: 4px 48px; grid-template-columns: 1fr; padding-block: 24px; }
  @media (min-width: 760px) { .menu__list { grid-template-columns: 1fr 1fr; } }
  .menu__list a {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    text-decoration: none; padding-block: 10px; border-bottom: 1px solid var(--line-dark);
  }
  .menu__list .t { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1.15; }
  .menu__list .d { color: var(--on-dark-muted); font-size: var(--step--1); text-align: end; }
  .menu__list a:hover .t, .menu__list a[aria-current="page"] .t { color: var(--gilt-light); }
  .menu__foot { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; color: var(--on-dark-muted); font-size: var(--step--1); }
  body.menu-open { overflow: hidden; }
  .menu .lang { border-color: var(--line-dark); }
  .menu .lang button[aria-pressed="true"] { background: var(--on-dark); color: var(--lacquer); }

  /* ---------- socials ---------- */
  .socials { display: flex; gap: 10px; flex-wrap: wrap; }
  .social {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 12px;
    border: 1px solid currentColor; border-radius: 999px; text-decoration: none; font-size: .9rem;
    transition: background .3s var(--ease), color .3s var(--ease);
  }
  .social svg { width: 18px; height: 18px; fill: currentColor; }
  .social bdi, .handle { direction: ltr; unicode-bidi: isolate; }
  .social:hover { background: var(--gilt-light); color: var(--lacquer); border-color: var(--gilt-light); }
  .social--icon { width: 44px; padding: 0; justify-content: center; }

  /* ---------- frames ---------- */
  .arch { border-radius: var(--arch); overflow: hidden; position: relative; isolation: isolate; }
  .arch-soft { border-radius: 46% 46% var(--radius) var(--radius) / 26% 26% var(--radius) var(--radius); overflow: hidden; position: relative; isolation: isolate; }
  .frame { overflow: hidden; border-radius: var(--radius); position: relative; }
  :is(.arch, .arch-soft, .frame) > img, :is(.arch, .arch-soft, .frame) > video { width: 100%; height: 100%; object-fit: cover; }
  .ratio-45 { aspect-ratio: 4 / 5; }
  .ratio-23 { aspect-ratio: 2 / 3; }
  .ratio-34 { aspect-ratio: 3 / 4; }
  .ratio-11 { aspect-ratio: 1; }

  /* panel moulding - the double inset line from her boiserie walls */
  .moulding { position: relative; }
  .moulding::before, .moulding::after {
    content: ""; position: absolute; pointer-events: none; border: 1px solid var(--line);
  }
  .moulding::before { inset: clamp(10px, 1.4vw, 18px); }
  .moulding::after { inset: calc(clamp(10px, 1.4vw, 18px) + 7px); }
  .room--dark .moulding::before, .room--dark .moulding::after, .moulding.on-dark::before, .moulding.on-dark::after { border-color: var(--line-dark); }

  /* ---------- reveal ---------- */
  [data-reveal] { opacity: 0; translate: 0 26px; transition: opacity 1s var(--ease), translate 1s var(--ease); transition-delay: var(--d, 0s); }
  [data-reveal].is-in { opacity: 1; translate: 0 0; }
  .no-js [data-reveal] { opacity: 1; translate: none; }
  @media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; translate: none; transition: none; } }

  /* ---------- cards ---------- */
  .card { display: block; text-decoration: none; }
  .card__media { transition: transform .9s var(--ease); }
  .card:hover .card__media img { transform: scale(1.035); }
  .card__media img { transition: transform 1.2s var(--ease); }
  .card__body { padding-block-start: 18px; }
  .card__title { font-size: var(--step-1); }
  .card__meta { margin-block-start: 6px; color: var(--muted); font-size: var(--step--1); letter-spacing: .08em; }
  html[lang="ar"] .card__meta { letter-spacing: 0; }

  /* ---------- before / after slider ---------- */
  .ba { position: relative; overflow: hidden; border-radius: var(--radius); user-select: none; touch-action: pan-y; --pos: 50%; background: var(--wall-2); }
  .ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
  .ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
  .ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--paper); box-shadow: 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; }
  .ba__knob {
    position: absolute; top: 50%; left: var(--pos); width: 52px; height: 52px; margin: -26px 0 0 -26px;
    border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center;
    box-shadow: 0 6px 24px rgba(0,0,0,.22); pointer-events: none;
  }
  .ba__knob svg { width: 22px; height: 22px; }
  .ba__tag {
    position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    background: rgba(19, 18, 17, .72); color: var(--on-dark); pointer-events: none; font-family: "Jost", var(--font-body);
  }
  html[lang="ar"] .ba__tag { font-family: var(--font-body); letter-spacing: 0; font-size: .9rem; }
  .ba__tag--before { left: 14px; }
  .ba__tag--after { right: 14px; }
  .ba__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
  .ba:has(.ba__range:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; }

  .diptych { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .diptych figure { position: relative; }
  .diptych img { width: 100%; aspect-ratio: 608 / 535; object-fit: cover; border-radius: var(--radius); }

  /* ---------- quote ---------- */
  .quote { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.3; }
  .quote::before { content: "\201C"; display: block; font-size: 3.4em; line-height: .6; color: var(--gilt-soft); height: .45em; }
  html[lang="ar"] .quote::before { content: "\00AB"; font-size: 2em; line-height: 1; height: .7em; }
  .quote-by { margin-block-start: 1.2rem; color: var(--muted); font-size: var(--step--1); letter-spacing: .08em; }
  .room--dark .quote-by { color: var(--on-dark-muted); }

  /* ---------- toast ---------- */
  .toast {
    position: fixed; inset-inline: 16px; bottom: 20px; margin-inline: auto; width: fit-content; max-width: 520px; z-index: 150;
    background: var(--lacquer); color: var(--on-dark); padding: 14px 20px; border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25); font-size: .95rem;
    opacity: 0; translate: 0 16px; pointer-events: none; transition: opacity .35s var(--ease), translate .35s var(--ease);
  }
  .toast.is-on { opacity: 1; translate: 0 0; }

  /* ---------- footer ---------- */
  .site-footer { background: var(--lacquer); color: var(--on-dark); padding-block: clamp(64px, 8vw, 110px) 32px; }
  .site-footer a { text-decoration: none; }
  .site-footer a:hover { color: var(--gilt-light); }
  .footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
  @media (min-width: 900px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
  .footer-brand img { height: 44px; width: auto; }
  .footer-brand p { color: var(--on-dark-muted); margin-block-start: 18px; max-width: 34ch; }
  .footer-h { font-family: "Jost", var(--font-body); font-size: .76rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gilt-light); margin-block-end: 16px; }
  html[lang="ar"] .footer-h { font-family: var(--font-body); letter-spacing: 0; font-size: .95rem; }
  .footer-list { display: grid; gap: 8px; color: var(--on-dark-muted); }
  .footer-list svg { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-inline-end: 8px; }
  .footer-base { margin-block-start: 56px; padding-block-start: 22px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; color: var(--on-dark-muted); font-size: var(--step--1); }
  .ltr-inline { direction: ltr; unicode-bidi: isolate; display: inline-block; }
}

@layer pages {
  /* =================== HOME: the arch that opens =================== */
  .hero { position: relative; background: var(--wall); }
  .hero__stage { position: relative; min-height: 100svh; padding: calc(var(--header-h) + 24px) var(--gutter) 32px; }
  .hero__copy { position: relative; z-index: 2; }
  .hero__copy .display { margin-block: .35em .3em; }
  .hero__copy .lead { max-width: 34ch; }
  .hero__copy .btn-row { margin-block-start: 2rem; }
  .hero__arch {
    position: relative; z-index: 1; margin-block-start: 36px; height: 68svh; min-height: 420px;
    border-radius: var(--arch); overflow: hidden; background: var(--lacquer-2);
  }
  .hero__arch video, .hero__arch img { width: 100%; height: 100%; object-fit: cover; }
  .hero__arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(19,18,17,.55)); opacity: var(--cap, 0); pointer-events: none; }
  .hero__caption {
    position: absolute; z-index: 3; inset-inline: 0; bottom: 9%; text-align: center; color: var(--on-dark);
    padding-inline: 12%; opacity: var(--cap, 0); translate: 0 calc((1 - var(--cap, 0)) * 18px); pointer-events: none;
  }
  .hero__caption p { margin-inline: auto; font-family: var(--font-display); font-size: var(--step-2); line-height: 1.25; max-width: 28ch; }
  .hero__caption small { display: block; margin-block-start: .8rem; color: var(--gilt-light); letter-spacing: .22em; text-transform: uppercase; font-size: .72rem; }
  html[lang="ar"] .hero__caption small { letter-spacing: 0; font-size: .9rem; }
  .hero__hint { display: none; }

  @media (min-width: 900px) {
    .hero { height: 230vh; }
    .hero__stage { position: sticky; top: 0; height: 100vh; min-height: 640px; padding: 0; overflow: hidden; }
    .hero__copy {
      position: absolute; top: 50%; inset-inline-start: var(--gutter); width: min(44vw, 600px);
      translate: 0 -50%; opacity: calc(1 - var(--p, 0) * 2.2);
    }
    html[dir="rtl"] .hero__copy { translate: 0 -50%; }
    .hero__copy { transform: translateX(calc(var(--p, 0) * -60px)); }
    html[dir="rtl"] .hero__copy { transform: translateX(calc(var(--p, 0) * 60px)); }
    .hero__arch {
      position: absolute; margin: 0; min-height: 0;
      bottom: var(--ab, 7vh); inset-inline-end: var(--ax, 7vw);
      width: var(--aw, 34vw); height: var(--ah, 80vh);
      border-radius: var(--ar, 999px) var(--ar, 999px) 0 0 / var(--arv, 999px) var(--arv, 999px) 0 0;
    }
    .hero__hint {
      display: flex; align-items: center; gap: 10px; position: absolute; bottom: 30px; inset-inline-start: var(--gutter); white-space: nowrap; max-width: none;
      color: var(--muted); font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; opacity: calc(1 - var(--p, 0) * 4);
    }
    html[lang="ar"] .hero__hint { letter-spacing: 0; font-size: .9rem; }
    .hero__hint span { width: 1px; height: 40px; background: var(--muted); transform-origin: top; animation: hint 2.4s var(--ease) infinite; }
  }
  @keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
  @media (prefers-reduced-motion: reduce) {
    .hero { height: auto; }
    .hero__stage { position: relative; }
    .hero__hint span { animation: none; }
  }

  /* expertise strip on home */
  .offer-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
  .offer-list li { display: grid; grid-template-columns: 1fr; gap: 6px 32px; padding-block: 26px; border-bottom: 1px solid var(--line); }
  @media (min-width: 760px) { .offer-list li { grid-template-columns: .9fr 1.1fr; align-items: baseline; } }
  .offer-list h3 { font-size: var(--step-2); }
  .offer-list p { color: var(--muted); }

  /* horizontal collection strip */
  .strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 26%); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-block-end: 12px; scrollbar-width: thin; }
  .strip > * { scroll-snap-align: start; }
  @media (max-width: 700px) { .strip { grid-auto-columns: 68%; } }

  /* =================== EXPERTISE =================== */
  .service { padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
  .service:first-of-type { border-top: 0; }
  .service__num { font-family: var(--font-display); color: var(--gilt); font-size: var(--step-1); }
  .service ul { margin-block-start: 1.2rem; padding-inline-start: 1.1em; color: var(--muted); }
  .service li + li { margin-block-start: .35em; }
  .service li::marker { color: var(--gilt); }
  .service .arch-soft, .service .frame { max-height: 78vh; }

  /* =================== PROJECTS =================== */
  .projects { display: grid; gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
  .project { position: relative; text-align: start; width: 100%; display: block; color: inherit; }
  .project__open { font: inherit; color: inherit; text-align: inherit; line-height: inherit; }
  .project__open::after { content: ""; position: absolute; inset: 0; z-index: 2; }
  .project__open:focus-visible { outline: none; }
  .project:has(.project__open:focus-visible) { outline: 2px solid var(--ink); outline-offset: 8px; border-radius: 14px; }
  .lightbox .eyebrow { color: var(--gilt-light); }
  .lightbox .btn { --bg: var(--on-dark); --fg: var(--lacquer); border-color: var(--on-dark); }
  .lightbox .btn:hover { --bg: var(--gilt-light); border-color: var(--gilt-light); }
  .lightbox a:not(.btn) { color: var(--on-dark); }
  .eyebrow + :is(h1, h2, h3) { margin-block-start: .45em; }
  .project__media { position: relative; aspect-ratio: 3 / 4.2; border-radius: var(--arch); overflow: hidden; background: var(--wall-2); }
  .project__media img, .project__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
  .project__media video { opacity: 0; }
  .project.is-playing .project__media video { opacity: 1; }
  .project:hover .project__media img { transform: scale(1.03); }
  .project__badge {
    position: absolute; bottom: 14px; inset-inline-start: 14px; display: inline-flex; align-items: center; gap: 6px;
    background: rgba(19,18,17,.7); color: var(--on-dark); border-radius: 999px; padding: 5px 12px 5px 9px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  }
  html[lang="ar"] .project__badge { letter-spacing: 0; font-size: .85rem; }
  .project__badge svg { width: 12px; height: 12px; fill: currentColor; }
  .project__title { font-size: var(--step-1); margin-block-start: 18px; }
  .project__meta { color: var(--muted); font-size: var(--step--1); margin-block-start: 4px; letter-spacing: .06em; }
  .project__credit { color: var(--gilt); font-size: var(--step--1); margin-block-start: 6px; }

  .lightbox {
    width: min(1100px, 100% - 24px); max-height: calc(100svh - 24px); border: 0; padding: 0; border-radius: 14px;
    background: var(--lacquer); color: var(--on-dark); overflow: hidden;
  }
  .lightbox::backdrop { background: rgba(10, 9, 8, .78); backdrop-filter: blur(4px); }
  .lightbox__inner { display: grid; grid-template-columns: 1fr; max-height: calc(100svh - 24px); overflow-y: auto; }
  @media (min-width: 820px) { .lightbox__inner { grid-template-columns: minmax(0, 420px) 1fr; } }
  .lightbox__media { background: #000; aspect-ratio: 9 / 16; max-height: calc(100svh - 24px); }
  .lightbox__media > * { width: 100%; height: 100%; object-fit: contain; }
  .lightbox__text { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; }
  .lightbox__text p { color: var(--on-dark-muted); }
  .lightbox__close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; background: rgba(19,18,17,.7); color: var(--on-dark); border-color: var(--line-dark); }

  /* =================== COLLECTION =================== */
  .filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: clamp(28px, 4vw, 48px); }
  .chip {
    min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
    font-size: .88rem; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s;
  }
  .chip:hover { border-color: var(--ink); }
  .chip[aria-pressed="true"] { background: var(--ink); color: var(--wall); border-color: var(--ink); }
  .wall { columns: 3 300px; column-gap: clamp(20px, 3vw, 36px); }
  .piece { break-inside: avoid; margin-block-end: clamp(32px, 4vw, 52px); display: block; }
  .piece[hidden] { display: none; }
  .piece__media { position: relative; border-radius: 40% 40% var(--radius) var(--radius) / 20% 20% var(--radius) var(--radius); overflow: hidden; background: var(--wall-2); }
  .piece__media img { width: 100%; height: auto; transition: opacity .7s var(--ease), transform 1.2s var(--ease); }
  .piece__media .alt { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: 0; }
  .piece:hover .piece__media .alt, .piece:focus-within .piece__media .alt { opacity: 1; }
  .piece__ref { position: absolute; bottom: 12px; inset-inline-end: 12px; direction: ltr; background: rgba(248,246,242,.9); color: var(--ink); border-radius: 999px; padding: 3px 10px; font-size: .72rem; letter-spacing: .12em; }
  .piece__body { padding-block-start: 16px; }
  .piece__name { font-size: var(--step-1); }
  .piece__desc { color: var(--muted); font-size: .95rem; margin-block-start: 4px; }
  .piece__credit { color: var(--gilt); font-size: var(--step--1); margin-block-start: 4px; }
  .ask {
    margin-block-start: 14px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 14px;
    border-radius: 999px; border: 1px solid var(--ink); text-decoration: none; font-size: .9rem;
    transition: background .3s var(--ease), color .3s var(--ease);
  }
  .ask svg { width: 18px; height: 18px; fill: currentColor; }
  .ask:hover { background: var(--ink); color: var(--wall); }

  /* =================== TRANSFORMATIONS =================== */
  .ba-block { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; grid-template-columns: 1fr; }
  @media (min-width: 900px) { .ba-block { grid-template-columns: 1.2fr .8fr; } .ba-block--flip > :first-child { order: 2; } }
  .ba-block .ba { aspect-ratio: var(--ratio, 720 / 630); }

  /* =================== PROCESS =================== */
  .steps { display: grid; gap: 0; counter-reset: step; }
  .step { display: grid; gap: 18px 40px; padding-block: clamp(32px, 5vw, 64px); border-top: 1px solid var(--line); grid-template-columns: 1fr; }
  @media (min-width: 860px) { .step { grid-template-columns: 90px minmax(0, .75fr) minmax(0, 1.25fr); align-items: baseline; } }
  .step__n { font-family: var(--font-display); font-size: var(--step-3); color: var(--gilt-soft); line-height: 1; }
  .step h2 { font-size: var(--step-2); }
  .step p { color: var(--muted); }
  .faq { border-top: 1px solid var(--line); }
  .faq details { border-bottom: 1px solid var(--line); }
  .faq summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: center;
    padding-block: 22px; font-family: var(--font-display); font-size: var(--step-1);
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary svg { width: 20px; height: 20px; flex: none; transition: transform .35s var(--ease); color: var(--gilt); }
  .faq details[open] summary svg { transform: rotate(180deg); }
  .faq details p { padding-block-end: 22px; color: var(--muted); }

  /* =================== ABOUT =================== */
  .about-hero { background: var(--lacquer); color: var(--on-dark); padding-block: calc(var(--header-h) + clamp(40px, 7vw, 100px)) clamp(64px, 9vw, 130px); }
  .about-hero .lead { color: var(--on-dark-muted); }
  .principles { display: grid; gap: clamp(24px, 3vw, 40px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
  .principle { padding: clamp(28px, 3vw, 40px); }
  .principle h3 { font-size: var(--step-2); margin-block-end: .6em; }

  /* =================== SPACE NOTES =================== */
  .notes-index { display: grid; gap: clamp(20px, 3vw, 36px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .article { padding-block: clamp(56px, 8vw, 110px); border-top: 1px solid var(--line); scroll-margin-top: var(--header-h); }
  .article__head { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; align-items: end; margin-block-end: clamp(32px, 5vw, 56px); }
  @media (min-width: 900px) { .article__head { grid-template-columns: 1fr 380px; } }
  .prose { font-size: calc(var(--step-0) * 1.04); }
  .prose > * + * { margin-block-start: 1.05em; }
  .prose h3 { font-size: var(--step-1); margin-block-start: 1.8em; }
  .prose strong { font-weight: 500; }
  .prose ul { padding-inline-start: 1.2em; }
  .prose li + li { margin-block-start: .4em; }
  .prose li::marker { color: var(--gilt); }
  .draft-note { display: inline-block; border: 1px dashed var(--gilt); color: var(--gilt); border-radius: 999px; padding: 2px 12px; font-size: .78rem; }

  /* =================== STORIES =================== */
  .stat { font-family: var(--font-display); font-size: clamp(3.5rem, 2rem + 6vw, 7rem); line-height: 1; color: var(--gilt-soft); }
  .story { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: 1fr; align-items: center; }
  @media (min-width: 900px) { .story { grid-template-columns: .8fr 1.2fr; } .story--flip > :first-child { order: 2; } }
  .quote-ar { font-family: "El Messiri", serif; direction: rtl; text-align: right; }
  html:not([lang="ar"]) .quote-ar { font-size: var(--step-2); line-height: 1.5; }
  .translation { margin-block-start: 1rem; color: var(--muted); font-style: italic; }
  .room--dark .translation { color: var(--on-dark-muted); }

  /* =================== CONTACT =================== */
  .channels { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
  .channel {
    display: flex; gap: 16px; align-items: center; padding: 20px 22px; border-radius: 14px; background: var(--paper);
    text-decoration: none; border: 1px solid var(--line); transition: border-color .3s, transform .5s var(--ease);
  }
  .channel:hover { border-color: var(--ink); transform: translateY(-2px); }
  .channel svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
  .channel .lu { fill: none; }
  .channel strong { display: block; font-weight: 500; }
  .channel span { color: var(--muted); font-size: .92rem; }
  .channel--primary { background: var(--ink); color: var(--wall); border-color: var(--ink); }
  .channel--primary span { color: #CFC7BB; }
  .form { display: grid; gap: 18px; grid-template-columns: 1fr; }
  @media (min-width: 700px) { .form { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
  .field { display: grid; gap: 8px; }
  .field label { font-size: .9rem; font-weight: 500; }
  .field input, .field select, .field textarea {
    width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(27,25,23,.28); background: var(--paper);
    transition: border-color .3s;
  }
  .field textarea { min-height: 140px; resize: vertical; }
  .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(156,122,69,.25); }
  .form-note { color: var(--muted); font-size: var(--step--1); }

  /* =================== PRIVACY =================== */
  .legal h2 { font-size: var(--step-1); margin-block-start: 2em; }
  .legal p, .legal li { color: var(--muted); }
}

@layer utilities {
  .mt-s { margin-block-start: 12px; } .mt-m { margin-block-start: 24px; } .mt-l { margin-block-start: 48px; } .mt-xl { margin-block-start: clamp(56px, 8vw, 96px); }
  .center { text-align: center; } .center p { margin-inline: auto; }
  .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .flex-between { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: end; }
}

@layer utilities { .portrait img { object-position: 6% 40%; } }
