/* =========================================================
   DITHAR — main stylesheet
   RTL-first, logical properties. Light / dark via [data-theme].
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --navy: #15233A;
  --gold-brand: #A68A67;
  --stone: #F2EFEA;
  --sand: #C9C1B6;
  --mist: #AFB4BC;

  --bg: #F2EFEA;
  --bg-2: #E8E2D8;
  --bg-3: #DDD5C8;
  --ink: #15233A;
  --ink-2: #4A5566;
  --ink-3: #6B7483;
  --line: rgba(21, 35, 58, .14);
  --line-strong: rgba(21, 35, 58, .32);
  --gold: #A68A67;
  --gold-ink: #7A5F3E;
  --on-ink: #F2EFEA;           /* text on ink-filled buttons */
  --scrim: rgba(242, 239, 234, .78);
  --shadow: 0 18px 40px -18px rgba(21, 35, 58, .35);
  --plate-night: #15233A;

  --f-ar: 'Alexandria', 'Segoe UI', Tahoma, sans-serif;
  --f-naskh: 'Noto Naskh Arabic', 'Traditional Arabic', serif;
  --f-serif: 'Noto Serif Display', 'Times New Roman', serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1440px;
  --header-h: 84px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --f-diwani: 'Dithar Diwani', 'Arslan Wessam', var(--f-naskh);   /* Diwani face for the lexicon word; drop the woff2 into fonts.css */
  --r-media: clamp(12px, 1.1vw, 18px);   /* rounded image frames (client review) */
  --section: clamp(96px, 18vh, 200px);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0F1A2C;
  --bg-2: #15233A;
  --bg-3: #1C2D48;
  --ink: #F2EFEA;
  --ink-2: #B9BEC6;
  --ink-3: #8E96A3;
  --line: rgba(242, 239, 234, .13);
  --line-strong: rgba(242, 239, 234, .3);
  --gold: #C2A67F;
  --gold-ink: #D4BC98;
  --on-ink: #0F1A2C;
  --scrim: rgba(15, 26, 44, .78);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  --plate-night: #1C2D48;
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-size: 95%; }   /* all type −5% (client review, Oct 2026) — every size is rem-based */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ar);
  font-size: 1rem;
  line-height: 1.9;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
html[lang="en"] body { line-height: 1.7; font-size: .95rem; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 4px; }

/* Avoid flash of Arabic when English is selected (i18n swaps before reveal) */
html.js[lang="en"]:not(.i18n-ready) main,
html.js[lang="en"]:not(.i18n-ready) .site-header { visibility: hidden; }

.skip-link {
  position: fixed; inset-inline-start: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px;
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 16px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* View-transition theme swap (circle reveal driven by JS) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section); }

/* ---------- Type ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .8125rem; font-weight: 500; letter-spacing: .02em;
  color: var(--gold-ink);
}
html[lang="en"] .kicker { letter-spacing: .14em; text-transform: uppercase; font-size: .75rem; }
.kicker::before {
  content: ""; width: 7px; height: 7px; flex: none;
  background: var(--gold); transform: rotate(45deg);
}
.display {
  font-weight: 200;
  font-size: clamp(2rem, 3.99vw, 3.9rem);
  line-height: 1.22;
  letter-spacing: -.01em;
  text-wrap: balance;
}
html[lang="en"] .display {
  font-family: var(--f-serif);
  font-stretch: 82%;
  font-weight: 350;
  line-height: 1.02;
  letter-spacing: -.02em;
}
/* Hero headline (Arabic) — brand calligraphic face "Arslan Wessam B" */
html[lang="ar"] .hero .display {
  font-family: 'Arslan Wessam', var(--f-ar);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.37vw, 4.25rem);   /* −15% after client review */
  line-height: 1.45;
  letter-spacing: 0;
}
html[lang="ar"] .hero .display .line-mask { padding-block: .12em .08em; }
html[lang="en"] .hero .display { font-size: clamp(1.8rem, 3.52vw, 3.4rem); }
.h2 {
  font-weight: 250;
  font-size: clamp(1.6rem, 2.56vw, 2.45rem);
  line-height: 1.3;
  text-wrap: balance;
}
html[lang="en"] .h2 {
  font-family: var(--f-serif); font-stretch: 85%; font-weight: 400; line-height: 1.1; letter-spacing: -.01em;
}
.h3 { font-weight: 400; font-size: clamp(1.1rem, 1.23vw, 1.2rem); line-height: 1.5; }
.lead { font-size: clamp(.98rem, 1vw, 1.08rem); color: var(--ink-2); max-width: 44ch; line-height: 1.95; }
html[lang="en"] .lead { line-height: 1.65; max-width: 48ch; }
.muted { color: var(--ink-2); }
.num { font-family: var(--f-serif); font-stretch: 68%; font-weight: 400; font-variant-numeric: lining-nums; }
.gold-em { color: var(--gold-ink); font-style: normal; }

.line-mask { display: block; overflow: clip; padding-block: .06em; }

/* ---------- Buttons ---------- */
.btn {
  --pad: 18px 28px;
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  padding: var(--pad);
  font-size: .95rem; font-weight: 500; line-height: 1.2;
  border: 1px solid var(--ink);
  transition: color .4s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease);
  isolation: isolate; overflow: hidden;
  will-change: transform;
}
.btn .arrow { width: 22px; height: 10px; flex: none; transition: transform .5s var(--ease); }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(6px); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(6px); }
.btn--primary { background: var(--ink); color: var(--on-ink); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--gold); transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--ease);
}
.btn--primary:hover::before { transform: scaleY(1); }
.btn--primary:hover { border-color: var(--gold); color: #15233A; }
.btn--ghost { color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--on-ink); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .wa { width: 18px; height: 18px; flex: none; }

.link-rule {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding-block: 6px; font-weight: 500; font-size: .95rem;
}
.link-rule::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--gold);
  transform-origin: var(--origin-end, left); transition: transform .6s var(--ease);
}
html[dir="rtl"] .link-rule::after { transform-origin: right; }
.link-rule:hover::after { transform: scaleX(.35); }

/* ---------- Diamond marker ---------- */
.diamond { display: inline-block; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); flex: none; }
.diamond--line { background: transparent; border: 1px solid var(--gold); }

/* ---------- Gable frame (from the logo's outer border) ---------- */
.gable {
  --apex: 12%;
  clip-path: polygon(0 var(--apex), 50% 0, 100% var(--apex), 100% 100%, 0 100%);
}
.gable-wrap { position: relative; }
.gable-outline {
  position: absolute; top: -12px; left: -12px; width: calc(100% + 24px); height: calc(100% + 24px);
  pointer-events: none; overflow: visible;
}
.gable-outline polyline { fill: none; stroke: var(--gold); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- Rounded image frame (cards, project cover, gallery) ---------- */
.frame { position: absolute; inset: 0; overflow: hidden; border-radius: var(--r-media); isolation: isolate; background: var(--bg-2); }

/* ---------- Placeholder plate (until real photos arrive) ---------- */
.plate {
  position: relative; width: 100%; height: 100%;
  background:
    radial-gradient(120% 80% at 50% 110%, color-mix(in oklab, var(--gold) 22%, transparent), transparent 60%),
    var(--bg-2);
  overflow: hidden;
}
.plate::before {
  content: ""; position: absolute; inset: 14% 6% 8%;
  background: var(--gold);
  -webkit-mask: url(../img/sketch.svg) center / contain no-repeat;
          mask: url(../img/sketch.svg) center / contain no-repeat;
  opacity: .75;
}
.plate[data-variant="2"], .plate[data-variant="4"] {
  background:
    radial-gradient(120% 70% at 50% 115%, color-mix(in oklab, #C2A67F 30%, transparent), transparent 62%),
    var(--plate-night);
}
.plate[data-variant="2"] .plate__label, .plate[data-variant="4"] .plate__label { color: #AFB4BC; }
.plate[data-variant="2"]::before { inset: 10% -20% 6%; transform: scaleX(-1); background: #C2A67F; }
.plate[data-variant="3"]::before { inset: 22% 10% 10%; opacity: .6; }
.plate[data-variant="4"]::before { inset: 4% -30% 4% 10%; background: #C2A67F; }
.plate__label {
  position: absolute; inset-inline-start: 18px; bottom: 16px;
  font-size: .72rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center;
}
.plate__label::before { content: ""; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.media { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--bg-2); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  height: var(--header-h);
  transition: transform .6s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--scrim);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
          backdrop-filter: saturate(1.2) blur(14px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-101%); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; height: 100%; }
.brand__logo { height: 62px; width: auto; }
.brand__logo svg { height: 100%; width: auto; }
.lg-ink { fill: var(--ink); transition: fill .5s var(--ease); }
.lg-gold { fill: var(--gold); transition: fill .5s var(--ease); }
.lg-gold-lt { fill: var(--gold); opacity: .7; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav a { position: relative; font-size: .92rem; font-weight: 400; color: var(--ink-2); transition: color .3s; padding-block: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; width: 5px; height: 5px;
  background: var(--gold); transform: translateX(-50%) rotate(45deg) scale(0);
  transition: transform .4s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: translateX(-50%) rotate(45deg) scale(1); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.tool {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding-inline: 10px;
  border: 1px solid var(--line); font-size: .8rem; font-weight: 500;
  transition: border-color .3s, background-color .3s;
}
.tool:hover { border-color: var(--gold); }
.tool svg { width: 18px; height: 18px; }
.tool .i-sun { display: none; }
:root[data-theme="dark"] .tool .i-sun { display: block; }
:root[data-theme="dark"] .tool .i-moon { display: none; }
.tool--lang { font-family: var(--f-ar); }
html[lang="ar"] .tool--lang { font-family: var(--f-serif); font-stretch: 75%; letter-spacing: .06em; }
.header-cta { --pad: 12px 18px; font-size: .85rem; }
.menu-btn { display: none; }
.menu-btn span { display: block; width: 22px; height: 1px; background: var(--ink); transition: transform .5s var(--ease), opacity .3s; }
.menu-btn span + span { margin-top: 7px; }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 55; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  visibility: hidden;
}
.menu__links a {
  display: flex; align-items: baseline; gap: 16px; padding-block: 10px;
  font-size: clamp(1.6rem, 6.65vw, 2.3rem); font-weight: 250; line-height: 1.3;
  border-bottom: 1px solid var(--line);
}
html[lang="en"] .menu__links a { font-family: var(--f-serif); font-stretch: 85%; font-weight: 400; }
.menu__links a .diamond { transform: rotate(45deg) translateY(-6px); }
.menu__foot { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--ink-2); font-size: .9rem; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: #0F1A2C;               /* always night navy: the logo film is ivory + gold on transparent */
  display: grid; place-items: center;
}
.preloader__stage { width: min(78vw, 980px); aspect-ratio: 16 / 9; position: relative; }
.preloader__stage video, .preloader__stage img { width: 100%; height: 100%; object-fit: contain; }
.preloader__skip {
  position: absolute; bottom: 28px; inset-inline-end: var(--gutter);
  font-size: .8rem; color: #AFB4BC; padding: 10px 4px; border-bottom: 1px solid #C2A67F;
}
.preloader__lines { position: absolute; inset: 0; pointer-events: none; }
html:not(.js) .preloader, html.no-preload .preloader { display: none; }

/* ---------- Page transition curtain ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: var(--bg-2);
  clip-path: inset(0 0 100% 0);
  display: grid; place-items: center;
}
.curtain canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.curtain__mark { width: 64px; position: relative; opacity: 0; }

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 120; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border: 1px solid var(--gold); transform: rotate(45deg);
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s, opacity .3s;
  opacity: 0;
  display: grid; place-items: center;
}
.cursor span { transform: rotate(-45deg); font-size: .7rem; font-weight: 500; color: #15233A; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.cursor.is-link { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
.cursor.is-view { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--gold); border-color: var(--gold); }
.cursor.is-view span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Mantle canvas ---------- */
.mantle { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* =========================================================
   HOME
   ========================================================= */

/* Hero */
.hero {
  position: relative; min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(24px, 6vh, 72px));
  display: flex; flex-direction: column;
  overflow: clip;
}
.hero__grid {
  position: relative; z-index: 2; flex: 1;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center;
}
.hero__copy { grid-column: 1 / span 7; display: grid; gap: clamp(20px, 3.4vh, 36px); padding-block-end: 40px; }
.hero__copy .display { margin-block: 4px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.hero__art { grid-column: 9 / span 4; position: relative; align-self: center; }
.hero__arch { aspect-ratio: 3 / 4.3; width: 100%; }
.hero__arch .gable { position: absolute; inset: 0; background: var(--bg-2); overflow: hidden; }
/* Hero arch — featured project covers cross-fading inside the Dithar gable */
.hero__arch { display: block; }
.arch-slides { position: absolute; inset: 0; }
.arch-slide { position: absolute; inset: 0; opacity: 0; will-change: opacity, transform; }
.arch-slide img { width: 100%; height: 100%; object-fit: cover; }
.arch-slide.is-on { opacity: 1; }
html:not(.motion) .arch-slide { transition: opacity 1.2s ease; }
.hero__arch .arch-wash {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 72%, color-mix(in oklab, var(--bg) 45%, transparent) 100%);
  pointer-events: none;
}
.hero__caption {
  position: absolute; inset-inline-start: 0; bottom: -44px; font-size: .75rem; color: var(--ink-3);
  display: flex; gap: 10px; align-items: center;
}
.hero__caption .rule { width: 36px; height: 1px; background: var(--gold); }
.hero__caption [data-arch-caption] { transition: opacity .5s var(--ease); }
.hero .mantle { z-index: 1; }

/* Title block (drawing sheet) */
.titleblock {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  margin-top: clamp(24px, 5vh, 56px);
}
.titleblock__cell {
  padding: 18px 20px 22px; border-inline-start: 1px solid var(--line);
  display: grid; gap: 4px; align-content: start;
}
.titleblock__cell:first-child { border-inline-start: 0; padding-inline-start: 0; }
.titleblock__label { font-size: .75rem; color: var(--ink-3); }
.titleblock__value { font-size: clamp(1.3rem, 1.71vw, 1.6rem); line-height: 1.1; color: var(--ink); }
.titleblock__value.text { font-size: 1rem; line-height: 1.6; font-weight: 400; }
.titleblock__note { font-size: .72rem; color: var(--gold-ink); line-height: 1.5; }
.titleblock__cell--sheet { text-align: end; }
.titleblock__cell--sheet .titleblock__value { font-family: var(--f-serif); font-stretch: 70%; font-size: 1.05rem; letter-spacing: .08em; }

/* Marquee of disciplines */
.marquee {
  position: relative; border-block: 1px solid var(--line); overflow: clip; padding-block: 22px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; gap: 48px; align-items: center; }
.marquee__item { display: flex; align-items: center; gap: 48px; font-size: clamp(1.1rem, 1.61vw, 1.45rem); font-weight: 200; white-space: nowrap; color: var(--ink-2); }
.marquee__item .en { font-family: var(--f-serif); font-stretch: 88%; font-weight: 400; color: var(--ink-3); }

/* Philosophy */
.philosophy__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.philosophy__head { grid-column: 1 / span 12; margin-bottom: clamp(40px, 8vh, 88px); display: grid; gap: 20px; }
.lexicon {
  grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 32px);
  border: 1px solid var(--line-strong); padding: 28px 26px 30px; background: var(--bg);
}
.lexicon__word { font-family: var(--f-diwani); font-weight: 400; font-size: clamp(2.4rem, 3.23vw, 3rem); line-height: 1.35; color: var(--ink); }
.lexicon__pos { font-size: .8rem; color: var(--gold-ink); margin-top: 6px; display: flex; gap: 10px; align-items: center; }
.lexicon__def { font-family: var(--f-naskh); font-size: 1.05rem; line-height: 2; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
html[dir="ltr"] .lexicon__word, html[dir="ltr"] .lexicon__def { text-align: left; }   /* Arabic runs set RTL for correct punctuation, but keep the card's LTR alignment */
.lexicon__note { margin-top: 18px; font-size: .92rem; color: var(--ink-2); line-height: 1.95; }
.lexicon__src { margin-top: 18px; font-size: .72rem; color: var(--ink-3); }
.philosophy__body { grid-column: 6 / span 7; display: grid; gap: clamp(32px, 6vh, 64px); }
.ink-text {
  font-size: clamp(1.2rem, 1.61vw, 1.55rem); line-height: 1.85; font-weight: 250;
}
html[lang="en"] .ink-text { font-family: var(--f-serif); font-stretch: 100%; font-weight: 300; line-height: 1.55; }
.ink-text .word { transition: none; }
.philosophy__quote {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.philosophy__quote p { font-family: 'Arslan Wessam', var(--f-ar); font-weight: 400; font-size: clamp(1.35rem, 1.61vw, 1.55rem); line-height: 1.9; color: var(--ink); }   /* same face as the hero slogan; optically matched to the old Naskh size (this face draws small) */
html[lang="en"] .philosophy__quote p { font-family: var(--f-serif); font-stretch: 82%; font-weight: 350; font-style: normal; font-size: clamp(1.15rem, 1.38vw, 1.35rem); line-height: 1.5; }   /* same face as the English hero slogan */

/* Services — schedule */
.services__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; margin-bottom: clamp(40px, 7vh, 80px); }
.services__head > div { grid-column: 1 / span 7; display: grid; gap: 20px; }
.services__head p { grid-column: 9 / span 4; color: var(--ink-2); }
.schedule { border-top: 1px solid var(--line-strong); position: relative; }
.schedule__row {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 5fr) minmax(0, 6fr) 40px; gap: 24px; align-items: baseline;
  padding-block: clamp(22px, 3.4vh, 36px); border-bottom: 1px solid var(--line);
  transition: color .4s;
}
.schedule__row::before {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -1px; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: var(--row-origin, right);
  transition: transform .8s var(--ease);
}
html[dir="ltr"] .schedule__row::before { --row-origin: left; }
.schedule__row:hover::before, .schedule__row:focus-within::before { transform: scaleX(1); }
.schedule__idx { font-family: var(--f-serif); font-stretch: 70%; font-size: 1rem; color: var(--gold-ink); }
.schedule__title { font-size: clamp(1.15rem, 1.42vw, 1.35rem); font-weight: 300; line-height: 1.35; }
.schedule__title small { display: block; font-family: var(--f-serif); font-stretch: 100%; font-size: .82rem; font-weight: 400; color: var(--ink-3); letter-spacing: .02em; margin-top: 4px; }
html[lang="en"] .schedule__title small, html[lang="en"] .step__title small { font-family: var(--f-ar); font-size: .85rem; text-align: left; }
.schedule__desc { color: var(--ink-2); max-width: 52ch; }
.schedule__mark { justify-self: end; }
/* Services hover — calm tint + colour shift (replaces the floating image preview) */
.schedule__row { cursor: default; }
.schedule__row::after {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -.35); z-index: -1; border-radius: var(--r-media);
  background: color-mix(in oklab, var(--gold) 9%, transparent);
  opacity: 0; transition: opacity .6s var(--ease);
}
.schedule__row { isolation: isolate; }
.schedule__title > span, .schedule__desc, .schedule__idx { transition: color .6s var(--ease); }
.schedule__mark { transition: transform .7s var(--ease), background-color .6s var(--ease); }
.schedule__row:hover::after, .schedule__row:focus-visible::after { opacity: 1; }
.schedule__row:hover .schedule__title > span, .schedule__row:focus-visible .schedule__title > span { color: var(--gold-ink); }
.schedule__row:hover .schedule__desc, .schedule__row:focus-visible .schedule__desc { color: var(--ink); }
.schedule__row:hover .schedule__mark, .schedule__row:focus-visible .schedule__mark { transform: rotate(225deg) scale(1.3); }

/* Works — horizontal */
.works { padding-bottom: 0; }
.works__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 6vh, 64px); }
.works__head > div { display: grid; gap: 18px; }
.works__pin { position: relative; overflow: clip; }
.works__track {
  display: flex; gap: clamp(28px, 4vw, 64px); align-items: end;
  padding-inline: var(--gutter); padding-block: 24px clamp(64px, 12vh, 120px);
  width: max-content;
}
.work-card { width: clamp(280px, 30vw, 440px); flex: none; display: grid; gap: 22px; }
.work-card:nth-child(even) { width: clamp(260px, 25vw, 380px); margin-bottom: 8vh; }
.work-card__media { position: relative; aspect-ratio: 3 / 4; }
.work-card__media .parallax { position: absolute; inset: -7% -9%; }   /* overscan both axes: desktop drifts in x, mobile in y */
.work-card__media .media img { transition: transform 1.2s var(--ease); }
.work-card:hover .work-card__media .media img { transform: scale(1.04); }
.work-card__meta { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; border-top: 1px solid var(--line-strong); padding-top: 14px; }
.work-card__name { font-size: clamp(1.05rem, 1.14vw, 1.15rem); font-weight: 400; line-height: 1.4; }
.work-card__sector { font-size: .78rem; color: var(--gold-ink); align-self: center; }
.work-card__loc { font-size: .85rem; color: var(--ink-3); grid-column: 1 / -1; }
.work-card--end {
  width: clamp(240px, 22vw, 320px); aspect-ratio: 3 / 4; align-self: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-media); display: grid; place-content: center; gap: 18px; text-align: center; padding: 24px;
  transition: background-color .5s var(--ease), color .5s;
}
.work-card--end:hover { background: var(--ink); color: var(--on-ink); }
.work-card--end .h3 { font-weight: 300; }

/* Process — dimension line */
.process__head { display: grid; gap: 20px; margin-bottom: clamp(48px, 9vh, 96px); max-width: 780px; }
.dimension { position: relative; height: 40px; margin-bottom: 36px; }
.dimension__line { position: absolute; inset-inline: 0; top: 50%; height: 1px; background: var(--gold); transform-origin: right; }
html[dir="ltr"] .dimension__line { transform-origin: left; }
.dimension__tick { position: absolute; top: 8px; width: 1px; height: 24px; background: var(--gold); }
.dimension__tick::after { content: ""; position: absolute; top: 8px; left: -4px; width: 9px; height: 9px; border: 1px solid var(--gold); background: var(--bg); transform: rotate(45deg); }
.process__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.step { display: grid; gap: 14px; align-content: start; }
.step__no { font-family: var(--f-serif); font-stretch: 70%; font-size: clamp(2rem, 2.66vw, 2.5rem); line-height: 1; color: var(--gold); font-weight: 300; }
.step__title { font-size: 1.12rem; font-weight: 400; }
.step__title small { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 400; }
.step p { color: var(--ink-2); font-size: .98rem; }

/* Why — statements */
.why { background: var(--bg-2); }
.why__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.why__head { grid-column: 1 / span 4; display: grid; gap: 20px; align-content: start; position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
.why__list { grid-column: 6 / span 7; }
.statement { padding-block: clamp(28px, 5vh, 48px); border-top: 1px solid var(--line-strong); display: grid; gap: 12px; }
.statement:last-child { border-bottom: 1px solid var(--line-strong); }
.statement h3 { font-size: clamp(1.2rem, 1.61vw, 1.55rem); font-weight: 250; line-height: 1.35; }
html[lang="en"] .statement h3 { font-family: var(--f-serif); font-stretch: 100%; font-weight: 350; line-height: 1.3; }
.statement p { color: var(--ink-2); max-width: 54ch; }

/* Contact */
.contact { overflow: clip; }
.contact .mantle { z-index: 0; opacity: .85; }
.contact__inner { position: relative; z-index: 1; }
.contact__head { display: grid; gap: 22px; max-width: 980px; margin-bottom: clamp(48px, 9vh, 96px); }
.contact__head .display { font-size: clamp(2.1rem, 4.56vw, 4.2rem); }
.contact__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.brief { grid-column: 1 / span 7; background: var(--bg); border: 1px solid var(--line-strong); padding: clamp(24px, 3.4vw, 48px); box-shadow: var(--shadow); display: grid; gap: 26px; }
.brief__title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.field { display: grid; gap: 10px; }
.field > label, .field > legend { font-size: .82rem; color: var(--ink-2); padding: 0; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  padding: 10px 0 12px; font-size: 1rem; border-radius: 0; outline: none;
  transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.8; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-size: 6px 6px; background-repeat: no-repeat; background-position: left 4px center, left 10px center; }
html[dir="ltr"] .field select { background-position: right 10px center, right 4px center; }
.field select option { background: var(--bg); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--gold); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line-strong);
  font-size: .9rem; transition: background-color .3s, color .3s, border-color .3s;
}
.chip span::before { content: ""; width: 6px; height: 6px; border: 1px solid var(--gold); transform: rotate(45deg); transition: background-color .3s; }
.chip input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip input:checked + span::before { background: var(--gold); }
.chip input:focus-visible + span { outline: 1.5px solid var(--gold); outline-offset: 3px; }
.brief__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.brief__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brief__hint { font-size: .8rem; color: var(--ink-3); }
.brief__error { font-size: .85rem; color: #B4412F; min-height: 1.4em; }
:root[data-theme="dark"] .brief__error { color: #F0A18F; }
.contact__aside { grid-column: 9 / span 4; display: grid; gap: 34px; align-content: start; }
.contact__block { display: grid; gap: 10px; }
.contact__block h3 { font-size: .8rem; color: var(--gold-ink); font-weight: 500; }
.contact__block a, .contact__block p { font-size: .98rem; }
.contact__block a:hover { color: var(--gold-ink); }
.phones li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-block: 8px; }
.phones li span { color: var(--ink-3); font-size: .85rem; }
.phones li a { direction: ltr; font-family: var(--f-serif); font-stretch: 88%; font-size: 1.05rem; letter-spacing: .03em; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); transition: border-color .3s, background-color .3s; }
.socials a:hover { border-color: var(--gold); background: var(--bg-2); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }

/* Footer */
.site-footer { position: relative; border-top: 1px solid var(--line-strong); padding-block: clamp(56px, 10vh, 96px) 28px; overflow: clip; }
.footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.footer__brand { grid-column: 1 / span 5; display: grid; gap: 18px; align-content: start; }
.footer__brand .brand__logo { height: 120px; }
.footer__brand p { color: var(--ink-2); max-width: 36ch; font-size: .95rem; }
.footer__col { grid-column: span 2; display: grid; gap: 10px; align-content: start; }
.footer__col:nth-of-type(2) { grid-column: 7 / span 2; }
.footer__col h3 { font-size: .78rem; color: var(--gold-ink); font-weight: 500; margin-bottom: 4px; }
.footer__col a { color: var(--ink-2); font-size: .95rem; width: fit-content; transition: color .3s; }
.footer__col a:hover { color: var(--ink); }
.footer__word {
  margin-top: clamp(48px, 9vh, 96px);
  font-family: var(--f-serif); font-stretch: 62.5%; font-weight: 300;
  font-size: clamp(4rem, 15.2vw, 14rem); line-height: .8; letter-spacing: .02em;
  color: transparent; -webkit-text-stroke: 1px var(--gold);
  text-align: center; user-select: none; direction: ltr;
}
.footer__bottom { margin-top: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: var(--ink-3); }
.to-top { display: inline-flex; align-items: center; gap: 8px; }

/* WhatsApp floating */
.wa-float {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 50;
  opacity: 0; visibility: hidden; translate: 0 16px;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow);
  clip-path: polygon(0 14%, 50% 0, 100% 14%, 100% 100%, 0 100%);
  transition: transform .5s var(--ease), background-color .3s, color .3s;
}
.wa-float.is-on { opacity: 1; visibility: visible; translate: 0 0; transition: opacity .5s var(--ease), translate .6s var(--ease), visibility 0s, background-color .3s, color .3s; }
.wa-float:hover { background: var(--gold); color: #15233A; transform: translateY(-4px); }
.wa-float svg { width: 24px; height: 24px; fill: currentColor; margin-top: 4px; }

/* =========================================================
   PROJECTS INDEX
   ========================================================= */
.page-hero { position: relative; padding-top: calc(var(--header-h) + clamp(48px, 12vh, 140px)); padding-bottom: clamp(40px, 8vh, 80px); overflow: clip; }
.page-hero .mantle { opacity: .7; }
.page-hero__inner { position: relative; z-index: 1; display: grid; gap: 22px; }
.page-hero .display { font-size: clamp(2.4rem, 5.51vw, 5.2rem); }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 12px 40px; color: var(--ink-2); align-items: baseline; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 24px; border-block: 1px solid var(--line); position: sticky; top: var(--header-h); z-index: 20; background: var(--bg); transition: top .6s var(--ease); }
.site-header.is-hidden ~ main .filters { top: 0; }
.filter { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--line-strong); font-size: .9rem; transition: background-color .3s, color .3s, border-color .3s; }
.filter sup { font-family: var(--f-serif); font-stretch: 75%; font-size: .75rem; color: var(--gold-ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.filter[aria-pressed="true"] sup { color: var(--gold); }
.filter:hover:not([aria-pressed="true"]) { border-color: var(--gold); }
.grid-projects {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(40px, 6vh, 72px) clamp(20px, 2.4vw, 40px);
  padding-block: clamp(48px, 8vh, 96px) var(--section);
}
.pcard { grid-column: span 4; display: grid; gap: 18px; align-content: start; }
.pcard:nth-child(6n+1) { grid-column: span 5; }
.pcard:nth-child(6n+2) { grid-column: span 4; margin-top: 12vh; }
.pcard:nth-child(6n+3) { grid-column: span 3; margin-top: 4vh; }
.pcard:nth-child(6n+4) { grid-column: span 4; }
.pcard:nth-child(6n+5) { grid-column: span 3; margin-top: 8vh; }
.pcard:nth-child(6n) { grid-column: span 5; margin-top: -2vh; }
.pcard.is-hidden { display: none; }
.pcard__media { position: relative; aspect-ratio: 3 / 4; }
.pcard__media .inner { position: absolute; inset: 0; transition: transform 1.2s var(--ease); }
.pcard:hover .pcard__media .inner { transform: scale(1.05); }
.pcard__meta { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; border-top: 1px solid var(--line-strong); padding-top: 12px; }
.pcard__name { font-size: 1.08rem; font-weight: 400; }
.pcard__sector { font-size: .78rem; color: var(--gold-ink); align-self: center; }
.pcard__loc { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-3); min-height: 1.4em; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-2); padding-block: 80px; }

/* =========================================================
   PROJECT DETAIL
   ========================================================= */
.project-hero { padding-top: calc(var(--header-h) + clamp(32px, 8vh, 96px)); }
.crumbs { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--ink-3); margin-bottom: 28px; }
.crumbs a:hover { color: var(--ink); }
.project-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; }
.project-hero__title { grid-column: 1 / span 7; display: grid; gap: 18px; }
.project-hero__summary { grid-column: 9 / span 4; color: var(--ink-2); }
.project-cover { margin-top: clamp(40px, 7vh, 72px); position: relative; aspect-ratio: 16 / 8; }
.project-cover .parallax { position: absolute; inset: -10% 0; }
.project-block { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; padding-block: clamp(56px, 10vh, 112px); }
.project-block .titleblock { grid-column: 1 / span 5; grid-template-columns: 1fr 1fr; margin-top: 0; border: 1px solid var(--line-strong); }
.project-block .titleblock__cell { border-top: 1px solid var(--line); padding-inline-start: 20px; }
.project-block .titleblock__cell:nth-child(-n+2) { border-top: 0; }
.project-block .titleblock__cell:nth-child(odd) { border-inline-start: 0; }
.project-block .titleblock__cell, .project-block .titleblock__cell:first-child, .project-block .titleblock__cell:nth-child(odd) { padding: 16px 18px 18px; }
.project-block .titleblock__value { font-size: 1rem; font-weight: 400; line-height: 1.5; }
.project-block__text { grid-column: 7 / span 6; display: grid; gap: 20px; align-content: start; }
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); padding-bottom: var(--section); }
.gallery figure { margin: 0; position: relative; }
.gallery figure:nth-child(3n+1) { grid-column: span 7; aspect-ratio: 4 / 3; }
.gallery figure:nth-child(3n+2) { grid-column: span 5; aspect-ratio: 3 / 4; }
.gallery figure:nth-child(3n) { grid-column: 3 / span 8; aspect-ratio: 16 / 9; }
.gallery figure > .frame .media, .gallery figure > .frame .plate { position: absolute; inset: 0; }
.next-project { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-block: clamp(56px, 10vh, 112px); border-top: 1px solid var(--line-strong); }
.next-project .display { font-size: clamp(1.9rem, 3.7vw, 3.3rem); transition: color .4s; }
.next-project:hover .display { color: var(--gold-ink); }
.notice { display: flex; gap: 12px; align-items: center; font-size: .82rem; color: var(--ink-3); padding: 14px 18px; border: 1px dashed var(--line-strong); width: fit-content; }

/* ---------- Project chapters (phase 2) ---------- */
.chapnav { position: sticky; top: var(--header-h, 76px); z-index: 20; background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); margin-top: clamp(32px, 6vh, 64px); }
.chapnav__inner { display: flex; gap: clamp(16px, 2.4vw, 36px); overflow-x: auto; scrollbar-width: none; padding-block: 14px; }
.chapnav__inner::-webkit-scrollbar { display: none; }
.chapnav a { white-space: nowrap; font-size: .9rem; color: var(--ink-3); padding-block: 4px; border-bottom: 1px solid transparent; transition: color .4s var(--ease), border-color .4s var(--ease); }
.chapnav a:hover { color: var(--ink); }
.chapnav a.is-on { color: var(--gold-ink); border-color: var(--gold); }
.chapter { padding-block: clamp(56px, 10vh, 112px) 0; scroll-margin-top: calc(var(--header-h, 76px) + 64px); }
.chapter__head { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(24px, 4vh, 44px); padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.chapter__no { font-family: var(--f-serif); font-stretch: 70%; color: var(--gold-ink); font-size: 1.1rem; }
.chapter__note { display: flex; gap: 10px; align-items: center; color: var(--ink-3); font-size: .88rem; margin: -10px 0 22px; }
.chapter--about .project-block { padding-block: 0; }
.prose { display: grid; gap: 1em; color: var(--ink-2); max-width: 62ch; }
.chapters > .next-project { margin-top: var(--section); }
.chapters .gallery { padding-bottom: 0; }
.gallery figure, .sheets figure { display: grid; gap: 10px; align-content: start; }
.gallery figure > .frame { position: relative; inset: auto; aspect-ratio: inherit; }
.gallery figure:nth-child(3n+1) > .frame { aspect-ratio: 4 / 3; } .gallery figure:nth-child(3n+2) > .frame { aspect-ratio: 3 / 4; } .gallery figure:nth-child(3n) > .frame { aspect-ratio: 16 / 9; }
.gallery figure { aspect-ratio: auto !important; }
figcaption { font-size: .85rem; color: var(--ink-3); }
button.frame { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; color: inherit; font: inherit; }
button.frame:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button.frame .media img { transition: transform 1.2s var(--ease); }
button.frame:hover .media img { transform: scale(1.03); }

/* Drawing sheets: light paper whatever the theme, so linework reads */
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(16px, 2vw, 28px); }
.sheets .frame { position: relative; inset: auto; aspect-ratio: 1.414 / 1; background: #F7F5F1; }
.sheets .media { background: #F7F5F1; }
.sheets .media img { object-fit: contain; padding: 4%; }
.sheets.is-protected img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sheet-pdf { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center; color: #15233A; font-size: .9rem; }
.sheet-pdf .num { font-family: var(--f-serif); font-size: 2rem; letter-spacing: .12em; color: #7A5F3E; }

/* 3D model */
.model-box { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-media); overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, color-mix(in oklab, var(--gold) 16%, var(--bg-2)), var(--bg-2)); border: 1px solid var(--line); }
.model-box:fullscreen { aspect-ratio: auto; border-radius: 0; }
.model-stage, .model-stage model-viewer, .model-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.model-stage model-viewer { --poster-color: transparent; background: transparent; }
.model-load { position: absolute; inset: 0; z-index: 2; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.model-load img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.7); transition: transform 1.2s var(--ease); }
.model-load:hover img { transform: scale(1.03); }
.model-load__btn { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 70%, transparent); backdrop-filter: blur(8px); border: 1px solid color-mix(in oklab, var(--gold) 60%, transparent); font-size: .95rem; }
.model-box.is-loading .model-load__btn { opacity: .7; }
.model-box.is-ready .model-load { opacity: 0; pointer-events: none; transition: opacity .8s var(--ease); }
.model-bar { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 18px;
  font-size: .82rem; background: linear-gradient(0deg, color-mix(in oklab, var(--bg) 80%, transparent), transparent); }
.model-ar { position: absolute; top: 14px; inset-inline-end: 14px; }

/* Video */
.videos { display: grid; gap: clamp(20px, 3vw, 36px); }
.video__frame { position: relative; inset: auto; aspect-ratio: 16 / 9; background: #000; }
.video__frame video, .video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-lite { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: var(--bg-2); }
.video-lite img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .5s; }
.video-lite:hover img { opacity: 1; }
.video-lite__play { position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: color-mix(in oklab, var(--bg) 60%, transparent); border: 1px solid var(--gold); backdrop-filter: blur(6px); }
.video-lite__play::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--ink); }

/* Design ← Reality */
.compare { display: grid; gap: 10px; margin-bottom: clamp(20px, 3vw, 36px); --pos: 50%; }
.compare__frame { position: relative; inset: auto; aspect-ratio: 16 / 9; max-height: 78vh; width: 100%; -webkit-user-select: none; user-select: none; }
.compare__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare__b { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
html[dir="rtl"] .compare__b { clip-path: inset(0 0 0 calc(100% - var(--pos))); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: var(--gold); pointer-events: none; }
html[dir="rtl"] .compare__handle { left: auto; right: var(--pos); }
.compare__handle span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 1px solid var(--gold);
  background: color-mix(in oklab, var(--bg) 65%, transparent); backdrop-filter: blur(6px); }
.compare__handle span::before, .compare__handle span::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.compare__handle span::before { left: 11px; transform: translateY(-50%) rotate(-45deg); }
.compare__handle span::after { right: 11px; transform: translateY(-50%) rotate(135deg); }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
html[dir="rtl"] .compare__range { direction: rtl; }
.compare__range:focus-visible ~ .compare__handle span, .compare__frame:focus-within .compare__handle span { outline: 2px solid var(--gold); outline-offset: 3px; }
.compare__tag { position: absolute; top: 14px; padding: 4px 12px; border-radius: 999px; font-size: .78rem; background: color-mix(in oklab, var(--bg) 70%, transparent); backdrop-filter: blur(6px); pointer-events: none; }
.compare__tag--b { inset-inline-start: 14px; } .compare__tag--a { inset-inline-end: 14px; }

/* Full-screen viewer */
.viewer { position: fixed; inset: 0; z-index: 400; background: #0B1322; display: grid; grid-template-rows: 1fr auto; }
html.viewer-open .wa-float, html.viewer-open .cursor { display: none !important; }
.viewer[hidden] { display: none; }
html.viewer-open { overflow: hidden; }
.viewer__stage { position: relative; overflow: hidden; display: grid; place-items: center; touch-action: none; cursor: zoom-in; }
.viewer.is-zoomed .viewer__stage { cursor: grab; }
.viewer__stage img { max-width: 92vw; max-height: calc(100vh - 90px); object-fit: contain; transform-origin: center; transition: transform .25s var(--ease); -webkit-user-select: none; user-select: none; }
.viewer.is-pdf .viewer__stage { cursor: default; }
.viewer__stage iframe { width: min(1200px, 94vw); height: calc(100vh - 96px); border: 0; background: #fff; border-radius: 8px; }
.viewer__bar { display: flex; align-items: center; gap: 18px; padding: 14px var(--gutter); color: #F2EFEA; border-top: 1px solid rgba(242,239,234,.12); font-size: .88rem; }
.viewer__cap { flex: 1; color: #AFB4BC; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__tools { display: flex; gap: 8px; align-items: center; }
.viewer__tools button, .viewer__tools a { min-width: 40px; height: 40px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid rgba(242,239,234,.2);
  background: transparent; color: #F2EFEA; font: inherit; cursor: pointer; }
.viewer__tools button:hover, .viewer__tools a:hover { border-color: #C2A67F; }
.viewer.is-protected [data-v=download] { display: none; }
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(242,239,234,.25);
  background: rgba(15,26,44,.6); color: #F2EFEA; display: grid; place-items: center; cursor: pointer; }
.viewer__nav .arrow { width: 22px; height: 12px; }
.viewer__nav--next { inset-inline-end: 18px; } .viewer__nav--prev { inset-inline-start: 18px; }
html[dir="ltr"] .viewer__nav--prev .arrow { transform: scaleX(-1); }
html[dir="rtl"] .viewer__nav--next .arrow { transform: scaleX(-1); }
@media (max-width: 720px) {
  .viewer__nav { width: 42px; height: 42px; top: auto; bottom: 76px; transform: none; }
  .model-box { aspect-ratio: 4 / 5; }
  .model-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .compare__frame { aspect-ratio: 4 / 5; }
}

/* ---------- Reveal defaults (JS enhances; content visible without JS) ---------- */
html.js.motion [data-reveal] { opacity: 0; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .header-cta { display: none; }
  .hero__copy { grid-column: 1 / span 12; }
  .hero__art { grid-column: 7 / span 6; grid-row: 1; opacity: .9; }
  .titleblock { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .titleblock__cell:nth-child(4) { border-inline-start: 0; padding-inline-start: 0; }
  .titleblock__cell:nth-child(n+4) { border-top: 1px solid var(--line); }
  .lexicon { grid-column: 1 / span 12; position: relative; top: 0; }
  .philosophy__body { grid-column: 1 / span 12; }
  .services__head > div, .services__head p { grid-column: 1 / span 12; }
  .process__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .why__head, .why__list { grid-column: 1 / span 12; position: relative; top: 0; }
  .brief, .contact__aside { grid-column: 1 / span 12; }
  .footer__brand { grid-column: 1 / span 12; }
  .footer__col, .footer__col:nth-of-type(2) { grid-column: span 4; }
  .pcard, .pcard:nth-child(n) { grid-column: span 6; margin-top: 0; }
  .pcard:nth-child(even) { margin-top: 8vh; }
  .project-hero__title, .project-hero__summary, .project-block .titleblock, .project-block__text { grid-column: 1 / span 12; }
}
@media (max-width: 720px) {
  :root { --header-h: 68px; }
  .brand__logo { height: 48px; }
  .header-tools .tool--theme { display: none; }
  .hero { min-height: auto; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { grid-column: 1; grid-row: 2; }
  .hero__art { grid-column: 1; grid-row: 1; width: 62%; justify-self: end; margin-block: 8px 12px; }
  .hero__caption { display: none; }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock__cell { padding: 14px 14px 16px; }
  .titleblock__cell:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .titleblock__cell:nth-child(4) { border-inline-start: 1px solid var(--line); padding-inline-start: 14px; }
  .titleblock__cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .titleblock__cell--sheet { display: none; }
  .hero .mantle { opacity: .45; }
  .schedule__row { grid-template-columns: 48px 1fr; gap: 8px 14px; }
  .schedule__idx { font-size: .85rem; white-space: nowrap; }
  .schedule__desc { grid-column: 2; }
  .schedule__mark { display: none; }
  .works__track { flex-direction: column; width: 100%; align-items: stretch; padding-bottom: 40px; }
  .work-card, .work-card:nth-child(even) { width: 100%; margin: 0; }
  .work-card:nth-child(even) { width: 84%; margin-inline-start: auto; }
  .work-card--end { width: 100%; aspect-ratio: auto; padding: 40px 24px; }
  .process__steps { grid-template-columns: 1fr; }
  .dimension { display: none; }
  .step { grid-template-columns: 64px 1fr; column-gap: 16px; }
  .step__no { grid-row: span 3; }
  .brief__row { grid-template-columns: 1fr; }
  .footer__col, .footer__col:nth-of-type(2) { grid-column: span 6; }
  .footer__col:last-of-type { grid-column: span 12; }
  .pcard, .pcard:nth-child(n) { grid-column: span 12; margin-top: 0; }
  .pcard:nth-child(even) { width: 86%; justify-self: end; }
  .gallery figure:nth-child(n) { grid-column: span 12; }
  .project-cover { aspect-ratio: 4 / 3.4; }
  .next-project { grid-template-columns: 1fr; }
  .wa-float { bottom: 16px; inset-inline-end: 16px; width: 52px; height: 52px; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .preloader { display: none !important; }
  html.js.motion [data-reveal] { opacity: 1 !important; }
}
