/* ═══════════════════════════════════════════════════════════
   LOJE 971 — Private Real Estate Office
   Apple-style system: SF type, frosted bar, pill buttons, rounded
   tiles, black / light-grey rhythm. Monochrome; Didot lives in the logo.
   ═══════════════════════════════════════════════════════════ */

:root {
  --black:     #000;
  --ink:       #1d1d1f;
  --ink-2:     #6e6e73;
  --white:     #fff;
  --gray:      #f5f5f7;
  --gray-2:    #e8e8ed;
  --line:      #d2d2d7;
  --on-dark:   #f5f5f7;
  --on-dark-2: #a1a1a6;
  --line-dark: #424245;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;

  --r: 28px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5rem, 10vw, 9rem);
  --plus-on-gray: #fff;
  --nav-light-bg: rgba(255, 255, 255, .8);
  --nav-light-line: rgba(0, 0, 0, .1);

  --ease: cubic-bezier(.28, .11, .32, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1); /* long, soft landing — used for entrances */
}

/* Dark theme: the white / grey sections turn dark; the black scenes (hero, story,
   trust, contact) are black in both themes. Elements that sit on those black
   scenes use fixed colours, so they don't flip. */
:root { color-scheme: light; }
html[data-theme="dark"] {
  color-scheme: dark;
  --white: #000;
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --gray: #161617;
  --gray-2: #2c2c2e;
  --line: #3a3a3c;
  --plus-on-gray: #2c2c2e;
  --nav-light-bg: rgba(22, 22, 23, .72);
  --nav-light-line: rgba(255, 255, 255, .12);
}

/* Lenis (inertial scroll) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.47; letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
p, h1, h2, h3, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: var(--white); padding: .7rem 1.2rem; border-radius: 980px; font-size: .85rem; }
.skip:focus { top: 1rem; }

/* ── Layout ─────────────────────────────────────────────── */
.wrap { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--mid { max-width: 58rem; }
.wrap--narrow { max-width: 50rem; }
.center { text-align: center; }
.section { padding-block: var(--section); }
.section--gray { background: var(--gray); }

/* ── Type ───────────────────────────────────────────────── */
.eyebrow { font-size: clamp(1.0625rem, 1.6vw, 1.3rem); font-weight: 500; line-height: 1.2; letter-spacing: -.01em; color: var(--ink-2); }
.eyebrow--dark { color: var(--on-dark-2); }
.h2 { font-size: clamp(2.25rem, 5.6vw, 4.5rem); font-weight: 500; line-height: 1.07; letter-spacing: -.035em; text-wrap: balance; }
.h2--xl { font-size: clamp(3rem, 8.5vw, 6.5rem); line-height: 1.03; }
.sub { max-width: 46rem; margin-inline: auto; font-size: clamp(1.125rem, 1.9vw, 1.5rem); line-height: 1.4; letter-spacing: -.015em; color: var(--ink-2); text-wrap: pretty; }
.sub--dark { color: var(--on-dark-2); }
.head { text-align: center; margin-bottom: clamp(3rem, 6vw, 5rem); }
.head .eyebrow { margin-bottom: .8rem; }
.head .sub { margin-top: 1.5rem; }
.lead { font-size: clamp(1.5rem, 2.8vw, 2.35rem); font-weight: 500; line-height: 1.17; letter-spacing: -.03em; color: var(--ink); text-wrap: pretty; }

/* ── Buttons & links ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.5rem; border-radius: 980px;
  background: var(--ink); color: var(--white); font-size: 1.0625rem; font-weight: 500; line-height: 1.2; letter-spacing: -.01em;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { opacity: .86; }
.btn:active { transform: scale(.97); }
.btn--light { background: #f5f5f7; color: #1d1d1f; }
.btn--light:hover { background: #fff; opacity: 1; }
.btn--nav { padding: .32rem .9rem; font-size: .75rem; }
.link { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; }
.link::after { content: "\203A"; display: inline-block; margin-inline-start: .3em; transition: transform .3s var(--ease); }
.link:hover::after { transform: translateX(.25em); }

/* ── Circular plus (every expander) ─────────────────────── */
.plus { position: relative; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--gray-2); transition: background .3s var(--ease); }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: .7rem; height: 1.5px; margin: -.75px 0 0 -.35rem; background: var(--ink); }
.plus::after { transform: rotate(90deg); transition: transform .5s var(--ease); }
[aria-expanded="true"] > .plus::after { transform: rotate(0); }
.section--gray .plus { background: var(--plus-on-gray); }

/* ── Collapsible text ───────────────────────────────────── */
.collapse, .acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.collapse > div, .acc__panel > div { overflow: hidden; }
.collapse.is-open, .acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.collapse p { padding-top: 1.25rem; max-width: 34rem; color: var(--ink-2); }
.more__btn { display: inline-flex; align-items: center; gap: .75rem; margin-top: 2rem; font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; }
.more__btn:hover .plus { background: var(--line); }

/* ── Accordion ──────────────────────────────────────────── */
.acc__item { border-top: 1px solid var(--line); }
.acc__item:first-child { border-top: 0; }
.acc__btn { display: flex; align-items: center; gap: 1.25rem; width: 100%; padding: 1.25rem 0; }
.acc__title { flex: 1; font-size: clamp(1.35rem, 2.4vw, 1.9rem); font-weight: 500; line-height: 1.15; letter-spacing: -.028em; color: #86868b; transition: color .4s var(--ease); }
.acc__item.is-open .acc__title, .acc__btn:hover .acc__title { color: var(--ink); }
.acc__panel p { padding: 0 0 1.5rem; padding-inline-end: 3rem; max-width: 32rem; color: var(--ink-2); }
.acc--wide .acc__item:first-child { border-top: 1px solid var(--line); }
.acc--wide .acc__item:last-child { border-bottom: 1px solid var(--line); }
.acc--wide .acc__title { font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -.035em; }
.acc--wide .acc__btn { padding-block: 1.6rem; }

/* ── Motion (only when .anim is set by main.js) ─────────── */
.anim .reveal { opacity: 0; transform: translate3d(0, 1.25rem, 0); transition: opacity 1.3s var(--ease-out) var(--d, 0s), transform 1.5s var(--ease-out) var(--d, 0s); }
.anim .reveal.is-in { opacity: 1; transform: none; }
.img-reveal { overflow: hidden; }
.anim .img-reveal img { opacity: 0; transform: scale(1.08); transition: opacity 1.6s var(--ease-out) var(--d, 0s), transform 2.6s var(--ease-out) var(--d, 0s); }
.anim .img-reveal.is-in img { opacity: 1; transform: none; }
[data-parallax] { will-change: translate; }

/* ── Header (frosted bar) ───────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: 3rem;
  background: rgba(0, 0, 0, .55); color: var(--on-dark);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid rgba(255, 255, 255, .12);
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.nav.is-light { background: var(--nav-light-bg); color: var(--ink); border-bottom-color: var(--nav-light-line); }
.nav__inner { position: relative; height: 100%; max-width: 90rem; margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav__logo { transition: opacity .5s var(--ease); }
.nav:not(.show-logo) .nav__logo { opacity: 0; pointer-events: none; }
.nav__mark { width: 6.5rem; }
.nav__mark--dark { display: none; }
.nav.is-light .nav__mark--light { display: none; }
.nav.is-light .nav__mark--dark { display: block; }
/* Centred on the viewport, independent of the (unequal) logo / actions widths either side */
.nav__links { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; justify-content: center; gap: clamp(1rem, 2.1vw, 2.25rem); }
.nav__links a { font-size: .75rem; letter-spacing: -.01em; opacity: .82; transition: opacity .3s; white-space: nowrap; }
.nav__links a:hover, .nav__links a[aria-current="true"] { opacity: 1; }
.nav.is-light .btn--nav { background: var(--ink); color: var(--white); }
.nav:not(.is-light) .btn--nav { background: #f5f5f7; color: #1d1d1f; }
.nav__toggle { display: none; }

/* In dark theme the bar always shows the light mark; the footer's ink mark is inverted */
html[data-theme="dark"] .nav.is-light .nav__mark--light { display: block; }
html[data-theme="dark"] .nav.is-light .nav__mark--dark { display: none; }
html[data-theme="dark"] .footer__top img { filter: invert(.94); }

/* Theme switch */
.theme { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; opacity: .75; transition: opacity .3s var(--ease), background .3s var(--ease); }
.theme:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.theme svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme .i-sun { display: none; }
html[data-theme="dark"] .theme .i-moon { display: none; }
html[data-theme="dark"] .theme .i-sun { display: block; }
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease), fill .5s var(--ease), stroke .5s var(--ease) !important;
}

/* Language switcher */
.nav__actions { display: flex; align-items: center; gap: 1.25rem; }
.lang { display: flex; align-items: center; gap: .4rem; font-size: .75rem; letter-spacing: .04em; }
.lang button { padding: .3rem .15rem; font-weight: 500; opacity: .5; transition: opacity .3s var(--ease); }
.lang button:hover { opacity: .85; }
.lang button[aria-pressed="true"] { opacity: 1; }
.lang span { opacity: .3; }

/* Page fades while the language swaps */
main, .footer { transition: opacity .32s var(--ease); }
body.is-switching main, body.is-switching .footer { opacity: 0; }

.menu {
  position: fixed; inset: 0; z-index: 90; background: #000; color: var(--on-dark);
  padding: 6rem var(--gutter) 2rem; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s .35s;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a { font-size: 2rem; font-weight: 500; letter-spacing: -.03em; padding: .8rem 0; border-bottom: 1px solid var(--line-dark); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { background: #000; color: var(--on-dark); text-align: center; overflow: hidden; padding-top: calc(3rem + clamp(2.5rem, 5vw, 4.5rem)); }
.hero__logo { width: clamp(14rem, 27vw, 23rem); margin: 0 auto clamp(1.75rem, 3vw, 2.75rem); }
.hero__text { max-width: 62rem; margin-inline: auto; padding-inline: var(--gutter); }
.hero__eyebrow { font-size: .75rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--on-dark-2); }
.hero__eyebrow::before { content: ""; display: block; width: 2.5rem; height: 1px; margin: 0 auto 1.1rem; background: var(--on-dark-2); opacity: .5; }
.hero__headline { margin-top: clamp(1.75rem, 3vw, 2.5rem); font-size: clamp(2.3rem, 4.8vw, 4.4rem); font-weight: 500; line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
.hero__copy { max-width: 31rem; margin: 1.5rem auto 0; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.45; letter-spacing: -.012em; color: var(--on-dark-2); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1.75rem; margin-top: 2rem; }
.hero__media {
  max-width: 88rem; margin: clamp(1.5rem, 3vw, 3rem) auto 0; aspect-ratio: 16 / 10;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; }
.anim .hero__media img { opacity: 0; transform: scale(1.08); transition: opacity 2.6s var(--ease-out), transform 4s var(--ease-out); }
.anim.is-loaded .hero__media img { opacity: 1; transform: none; animation: drift 28s ease-in-out 3.5s infinite alternate; }
@keyframes drift { from { scale: 1; } to { scale: 1.05; } }

/* ── Principles (swipeable gallery) ─────────────────────────
   Big rounded cards of different widths, the next one peeking in, captions
   underneath, round prev/next buttons — scroll, swipe, drag or press the buttons. */
.wrap--wide { max-width: 90rem; }
.head--left { text-align: start; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.head--left .h2 { max-width: 14ch; }
.principles { padding-bottom: clamp(3rem, 6vw, 5rem); overflow: hidden; }
.gallery { --card-h: clamp(23rem, 62svh, 40rem); --edge: max(var(--gutter), calc((100vw - 90rem) / 2 + var(--gutter))); }
.gallery__track {
  display: flex; gap: clamp(.75rem, 1.4vw, 1.25rem); overflow-x: auto; padding: 0 var(--edge);
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); scrollbar-width: none; overscroll-behavior-x: contain;
  cursor: grab; -webkit-overflow-scrolling: touch;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery__track.is-auto { scroll-snap-type: none; }   /* page scroll is moving the cards; snapping would fight it */
.gallery__track:focus-visible { outline-offset: -4px; }
.card { flex: none; display: block; scroll-snap-align: start; user-select: none; -webkit-user-select: none; }
.card--portrait { width: calc(var(--card-h) * 0.8); }   /* 4:5 */
.card--wide { width: calc(var(--card-h) * 1.5); }        /* 3:2 */
.card__media { width: 100%; height: var(--card-h); border-radius: var(--r); overflow: hidden; background: #000; }
.card__media img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; }
.card--wide .card__media img { object-position: 50% 30%; }
.card__cap { margin-top: 1.5rem; padding-inline-end: 1rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.4; letter-spacing: -.015em; color: var(--ink-2); }
.card__cap strong { color: var(--ink); font-weight: 600; }
.card__cap strong::after { content: ". "; }
.gallery__nav { display: flex; justify-content: flex-end; gap: .75rem; margin-top: clamp(1.25rem, 2.5vw, 2rem); }
.gallery__btn { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); transition: background .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease); }
.gallery__btn:hover { background: color-mix(in srgb, var(--ink) 18%, transparent); }
.gallery__btn:active { transform: scale(.94); }
.gallery__btn:disabled { opacity: .35; cursor: default; pointer-events: none; }
.gallery__btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }


/* ── Story (pinned, scroll-driven) ──────────────────────────
   Default = a plain stacked block. .anim turns it into a pinned
   sequence driven by scroll position (see main.js). */
.story { background: #000; color: var(--on-dark); }
.story__pin { position: relative; padding: var(--section) var(--gutter); }
.story__frame { position: relative; overflow: hidden; border-radius: var(--r); aspect-ratio: 16 / 9; max-width: 70rem; margin: 0 auto 3.5rem; }
.story__frame img { width: 100%; height: 100%; object-fit: cover; }
.story__frame::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.story__lines { display: grid; gap: 1.75rem; text-align: center; }
.story__line { margin-inline: auto; max-width: 18ch; font-size: clamp(2rem, 4.8vw, 4rem); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.story__line--xl { max-width: none; font-size: clamp(3.2rem, 10vw, 8.5rem); line-height: 1; letter-spacing: -.045em; }
.story__eyebrow { margin: 0 0 2rem; text-align: center; font-size: clamp(1.0625rem, 1.6vw, 1.3rem); font-weight: 500; letter-spacing: -.01em; color: var(--on-dark-2); }
.story__dots { display: none; }
.nowrap { white-space: nowrap; }

.anim .story { height: 380svh; }
.anim .story__pin { position: sticky; top: 0; height: 100svh; padding: 0; overflow: hidden; }
.anim .story__frame {
  position: absolute; inset: 0; max-width: none; margin: 0; aspect-ratio: auto; border-radius: 0;
  clip-path: inset(calc((1 - var(--e, 0)) * 14%) calc((1 - var(--e, 0)) * 22%) round calc((1 - var(--e, 0)) * 28px));
}
.anim .story__frame img { scale: var(--s, 1.18); }
.anim .story__lines { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 var(--gutter); gap: 0; z-index: 1; }
.anim .story__line { grid-area: 1 / 1; opacity: 0; will-change: opacity, transform; }
.anim .story__eyebrow { position: absolute; z-index: 1; left: 0; right: 0; top: calc(3rem + clamp(1.5rem, 5vh, 3.5rem)); margin: 0; opacity: 0; }
.anim .story__dots { display: flex; gap: .5rem; position: absolute; bottom: 2.25rem; left: 50%; transform: translateX(-50%); z-index: 1; }
.story__dots li { width: .4rem; height: .4rem; border-radius: 50%; background: #fff; opacity: .3; transition: opacity .4s, width .5s var(--ease); }
.story__dots li.is-on { opacity: 1; width: 1.6rem; border-radius: 1rem; }

/* ── What We Do (panel) ─────────────────────────────────── */
.panel { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; background: var(--gray); border-radius: var(--r); padding: clamp(1.5rem, 4vw, 3.5rem); }
.stack { position: sticky; top: 5.5rem; aspect-ratio: 5 / 4; border-radius: 20px; overflow: hidden; background: #000; }
.stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); }
.stack img.is-active { opacity: 1; }

/* ── Trust (pinned, scroll-driven) ──────────────────────────
   Default = plain stacked lines over the photo; .anim pins it and lets
   scroll position drive each line (see main.js → updateBand). */
.band { background: #000; color: var(--on-dark); }
.band .scene__pin { position: relative; isolation: isolate; overflow: hidden; padding: clamp(8rem, 18vw, 14rem) var(--gutter); }
.band__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; scale: var(--s, 1.06); }
.band .scene__pin::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, .62); }
.band__lines { display: grid; gap: 1.5rem; text-align: center; }
.band__line { margin-inline: auto; max-width: 20ch; font-size: clamp(2.2rem, 5.6vw, 4.8rem); font-weight: 500; line-height: 1.06; letter-spacing: -.04em; text-wrap: balance; }
.band__line--last { max-width: 16ch; font-size: clamp(2.6rem, 7.4vw, 6.4rem); line-height: 1; letter-spacing: -.045em; }

.anim .band { height: 300svh; }
.anim .band .scene__pin { position: sticky; top: 0; height: 100svh; padding: 0; }
.anim .band__lines { position: absolute; inset: 0; display: grid; place-items: center; gap: 0; padding: 0 var(--gutter); z-index: 1; }
.anim .band__line { grid-area: 1 / 1; opacity: 0; will-change: opacity, transform; }
.anim .band .story__dots { display: flex; }

.expertise__close { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 40rem; font-size: clamp(1.125rem, 1.9vw, 1.4rem); line-height: 1.45; letter-spacing: -.015em; color: var(--ink-2); text-wrap: pretty; }

/* ── The LOJE Circle ────────────────────────────────────── */
.circle .head--left .h2 { max-width: 16ch; }
.circle__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.circle__body { display: grid; gap: 1.5rem; }
.circle__body .lead { max-width: none; }
.circle__body p:not(.lead) { color: var(--ink-2); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.55; letter-spacing: -.015em; }
.circle__lines { color: var(--ink) !important; font-weight: 500; }
.circle__media { aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: #000; }
.circle__media img { width: 100%; height: 118%; margin-top: -9%; object-fit: cover; }
@media (max-width: 960px) {
  .circle__grid { grid-template-columns: 1fr; }
  .circle__media { order: -1; max-width: 26rem; }
}

/* ── People ─────────────────────────────────────────────── */
.founders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.founder { display: grid; grid-template-columns: minmax(0, 9.5rem) 1fr; gap: clamp(1.25rem, 2.5vw, 2rem); align-items: start; background: var(--gray); border-radius: var(--r); padding: clamp(1.5rem, 3vw, 2.5rem); }
.founder__frame { aspect-ratio: 4 / 5; border-radius: 18px; background: var(--gray-2); display: grid; place-items: center; overflow: hidden; }
.founder__frame span { font-size: 1.9rem; font-weight: 500; letter-spacing: .04em; color: var(--ink-2); }
.founder__frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.founder__name { font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 500; line-height: 1.15; letter-spacing: -.03em; }
.founder__role { color: var(--ink-2); }
.founder__bio { margin-top: 1rem; color: var(--ink-2); }
.founder__pending { color: #86868b; }
.founder .more__btn { margin-top: 1.25rem; }

.belief { margin: clamp(5rem, 9vw, 8rem) auto 0; max-width: 52rem; text-align: center; }
.belief blockquote { margin-top: 1rem; font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }

/* ── Contact ────────────────────────────────────────────── */
.contact { background: #000; color: var(--on-dark); padding-block: var(--section); }
.contact .h2 { margin-top: .8rem; }
.contact .sub { margin-top: 1.75rem; }
.contact__cta { margin-top: 2.5rem; }
.contact__cta .btn { font-size: clamp(1.0625rem, 2vw, 1.3rem); padding: .95rem 2rem; }
.contact__card { position: relative; margin-top: clamp(4rem, 8vw, 6.5rem); border-radius: var(--r); overflow: hidden; aspect-ratio: 21 / 9; background: #111; }
.contact__card img { width: 100%; height: 100%; object-fit: cover; }
.contact__card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.7)); pointer-events: none; }
.contact__card figcaption { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: clamp(1.25rem, 3vw, 2.25rem); display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; font-size: .95rem; color: var(--on-dark-2); }
.contact__card strong { display: block; font-size: 1.4rem; font-weight: 500; letter-spacing: -.02em; color: #fff; }

/* ── Footer ─────────────────────────────────────────────── */
.footer { background: var(--gray); color: var(--ink-2); font-size: .75rem; line-height: 1.6; letter-spacing: -.005em; padding-block: 2.5rem 1.75rem; }
.footer__top { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; align-items: start; padding-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.footer__top img { width: clamp(9rem, 14vw, 12.5rem); }
.footer a { transition: color .3s; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__base { display: flex; justify-content: space-between; gap: .75rem 2rem; flex-wrap: wrap; padding-top: 1.25rem; }
.footer__base span[aria-hidden] { margin-inline: .75rem; color: var(--line); }
.foot__orn { display: inline-block; margin-inline-start: .5rem; color: var(--ink-2); }

/* ── Pinned scene: services (desktop only; .pin-on set by main.js) ── */
.pin-on #what-we-do { padding: 0; }
.pin-on #what-we-do { height: 320svh; }
.pin-on #what-we-do .scene__pin {
  position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 3.25rem;
}
.pin-on #what-we-do .head { margin-bottom: 1.5rem; }
.pin-on #what-we-do .h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); }
.pin-on #what-we-do .head .sub { margin-top: .75rem; font-size: 1.05rem; }


/* Services: scroll steps through the four, the photo follows */
.pin-on #what-we-do .panel { padding: 1.5rem 2rem; }
.pin-on #what-we-do .stack { position: relative; top: 0; aspect-ratio: auto; height: min(44svh, 25rem); }

/* ── Legal pages (privacy, terms) ────────────────────────── */
.legal { padding: calc(3rem + clamp(3rem, 7vw, 5.5rem)) 0 var(--section); }
.legal__back { display: inline-block; margin-bottom: 2.25rem; font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; color: var(--ink-2); transition: color .3s var(--ease); }
.legal__back::before { content: "\2039"; display: inline-block; margin-inline-end: .4em; transition: transform .3s var(--ease); }
.legal__back:hover { color: var(--ink); }
.legal__back:hover::before { transform: translateX(-.25em); }
.legal__lang { display: none; }
html[lang="en"] .legal__lang[lang="en"], html[lang="fr"] .legal__lang[lang="fr"], html[lang="ar"] .legal__lang[lang="ar"] { display: block; }
.legal__title { text-align: start; font-size: clamp(2.4rem, 5.6vw, 4rem); }
.legal__sub { margin: 1.25rem 0 0; max-width: 34rem; text-align: start; font-size: clamp(1.05rem, 1.7vw, 1.25rem); }
.legal__body { margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.legal__sec { padding-block: 2rem; border-bottom: 1px solid var(--line); }
.legal__sec h2 { margin-bottom: 1rem; font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 500; line-height: 1.25; letter-spacing: -.025em; }
.legal__sec p, .legal__sec li { color: var(--ink-2); }
.legal__sec p + p, .legal__sec ul + p, .legal__sec p + ul { margin-top: 1rem; }
.legal__sec ul { padding-inline-start: 1.2rem; list-style: disc; display: grid; gap: .6rem; }
.legal__sec li::marker { color: var(--line); }
.legal__sec strong { color: var(--ink); font-weight: 500; }
.legal__sec a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .18em; transition: text-decoration-color .3s; }
.legal__sec a:hover { text-decoration-color: currentColor; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav__actions { gap: .6rem; }
  .nav__links, .btn--nav { display: none; }
  .nav__toggle { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 2.5rem; height: 2.5rem; padding: 0 .55rem; color: inherit; }
  .nav__toggle span { display: block; height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }
  body.menu-open .nav { background: transparent; color: var(--on-dark); border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.menu-open .nav__mark--light { display: block; }
  body.menu-open .nav__mark--dark { display: none !important; }
  body.menu-open { overflow: hidden; }

  .panel { grid-template-columns: 1fr; }
  .stack { position: relative; top: 0; order: -1; aspect-ratio: 4 / 3; }
  .founders { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__top img { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  :root { --r: 22px; }
  .gallery { --card-h: clamp(19rem, 52svh, 26rem); }
  .hero__media { aspect-ratio: 4 / 3; }
  .hero__media img { object-position: 50% 30%; }
  .founder { grid-template-columns: 6.5rem 1fr; }
  .acc__panel p { padding-inline-end: 0; }
  .contact__card { aspect-ratio: 4 / 3; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__base span[aria-hidden] { display: none; }
  .footer__base p:last-child { display: flex; gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
}

/* ── Principles gallery, pinned: the page holds still while scroll slides the cards ── */
.anim .principles { padding: 0; overflow: visible; height: calc(100svh + var(--scroll-len, 80svh)); }
.anim .principles .scene__pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 3.25rem; }
.anim .principles .head--left { margin-bottom: 1.1rem; }
.anim .principles .head--left .h2 { max-width: none; font-size: clamp(1.9rem, 3.4vw, 3rem); }
.anim .principles .head--left .h2 br { display: none; }              /* one line in this view */
.anim .gallery { --card-h: clamp(15rem, calc(100svh - 15.5rem), 36rem); }
.anim .card__cap { margin-top: 1rem; font-size: clamp(1rem, 1.25vw, 1.125rem); }
/* Arrow buttons sit at the top right, level with the heading, to give the cards the height */
.anim .principles .scene__pin > .wrap:last-child { position: absolute; left: 0; right: 0; top: calc(3.25rem + .6rem); pointer-events: none; }
.anim .gallery__nav { margin-top: 0; }
.anim .gallery__btn { pointer-events: auto; }
@media (max-width: 720px) {
  .anim .gallery { --card-h: clamp(15rem, calc(100svh - 17rem), 24rem); }
  .anim .principles .head--left .h2 { font-size: clamp(1.6rem, 6.4vw, 2rem); }
}

/* ── About: scroll-lit statement beside a drifting photo ─── */
.about .head--left .h2 { max-width: 20ch; }
.about__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.lead--scrub { font-size: clamp(1.8rem, 3.5vw, 3.1rem); font-weight: 500; line-height: 1.16; letter-spacing: -.035em; color: var(--ink); text-wrap: pretty; max-width: 22ch; }
.lead--scrub .sw { opacity: .2; transition: opacity .2s linear; }     /* words light up as you scroll (JS) */
.about__initials { margin-top: 1.1rem; font-size: 1.0625rem; color: var(--ink-2); letter-spacing: -.01em; }
.about__initials strong { color: var(--ink); font-weight: 600; }
.about .more { margin-top: 2.25rem; }
.about .collapse p + p { margin-top: 1rem; }
.about .collapse p { max-width: 38rem; }
.about__media { position: relative; aspect-ratio: 4 / 5; max-height: 78svh; margin-inline: auto; width: 100%; border-radius: var(--r); overflow: hidden; background: #000; }
.about__media img { width: 100%; height: 118%; margin-top: -9%; object-fit: cover; }
.about__tag { position: absolute; inset-inline-start: 1.4rem; bottom: 1.25rem; z-index: 1; font-size: .78rem; letter-spacing: .14em; color: rgba(255,255,255,.82); text-shadow: 0 1px 12px rgba(0,0,0,.5); }
@media (max-width: 960px) {
  .about__grid { grid-template-columns: 1fr; }
  .lead--scrub { max-width: none; }
  .about__media { max-width: 26rem; margin-inline: 0; }
}

/* ── Back to top ─────────────────────────────────────────── */
.to-top {
  position: fixed; z-index: 80;
  inset-inline-end: max(var(--gutter), env(safe-area-inset-right)); bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + .75rem));
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  color: var(--ink); background: color-mix(in srgb, var(--white) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
  opacity: 0; visibility: hidden; transform: translateY(.75rem);
  transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s .4s, background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { transform: translateY(-2px); }
.to-top:active { transform: scale(.94); }
.to-top.is-dark { color: #f5f5f7; background: rgba(28, 28, 30, .72); border-color: rgba(255, 255, 255, .18); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.to-top svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Social links (footer; only rendered when js/social.js has links) ── */
.footer__top.has-social { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.footer__social .eyebrow-s { margin-bottom: .5rem; }
.footer__social ul { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.footer__social a { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease); }
.footer__social a:hover { color: var(--ink); border-color: var(--ink-2); text-decoration: none; }
.footer__social svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 960px) { .footer__top.has-social { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .footer__top.has-social { grid-template-columns: 1fr; } }

/* keep the footer's right-hand links clear of the floating back-to-top button */
.footer__base > p:last-child { margin-inline-end: 4rem; }
@media (max-width: 720px) { .footer__base > p:last-child { margin-inline-end: 0; } }

/* ── Company profile: section + PDF viewer ───────────────── */
.btn--sm { padding: .45rem 1.1rem; font-size: .875rem; }
.profile__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.profile .h2 { margin-top: .8rem; max-width: 14ch; }
.profile .sub { margin: 1.5rem 0 0; max-width: 30rem; }
.profile__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.75rem; margin-top: 2.25rem; }
.profile__meta { margin-top: 1.5rem; font-size: .875rem; letter-spacing: .02em; color: var(--ink-2); }
.profile__cover { position: relative; display: block; width: 100%; cursor: pointer; border-radius: 18px; isolation: isolate; transition: transform .6s var(--ease-out); }
.profile__cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; background: #000; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
/* two more "pages" peeking out from behind the cover */
.profile__cover::before, .profile__cover::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 18px; background: var(--gray-2); transition: transform .6s var(--ease-out); }
.profile__cover::before { transform: translate(1.1rem, -.9rem) scale(.97); opacity: .75; }
.profile__cover::after { transform: translate(2.1rem, -1.8rem) scale(.94); opacity: .45; }
.profile__cover:hover { transform: translateY(-4px); }
.profile__cover:hover::before { transform: translate(1.3rem, -1.1rem) scale(.97); }
.profile__cover:hover::after { transform: translate(2.5rem, -2.2rem) scale(.94); }
@media (max-width: 960px) {
  .profile__grid { grid-template-columns: 1fr; }
  .profile__cover { margin-top: 1.5rem; width: calc(100% - 2.1rem); }
}

.pdfview {
  position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 10, 11, .94); color: #f5f5f7;
  -webkit-backdrop-filter: saturate(160%) blur(24px); backdrop-filter: saturate(160%) blur(24px);
}
.pdfview[open] { display: flex; flex-direction: column; animation: pdfIn .5s var(--ease-out) both; }
.pdfview::backdrop { background: rgba(0, 0, 0, .55); }
@keyframes pdfIn { from { opacity: 0; transform: translateY(1.25rem) scale(.985); } to { opacity: 1; transform: none; } }
.pdfview__bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem var(--gutter); border-bottom: .5px solid rgba(255, 255, 255, .14); }
.pdfview__title { font-size: .9375rem; font-weight: 500; letter-spacing: -.01em; }
.pdfview__actions { display: flex; align-items: center; gap: .9rem; }
.pdfview__count { font-size: .8125rem; color: #a1a1a6; font-variant-numeric: tabular-nums; direction: ltr; }
.pdfview__close { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #f5f5f7; transition: background .3s var(--ease); }
.pdfview__close:hover { background: rgba(255, 255, 255, .22); }
.pdfview__close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pdfview__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem var(--gutter) 3.5rem; outline: 0; }
.pdfview__fail { max-width: min(78rem, 100%); margin: 0 auto 1rem; padding: 1rem 1.25rem; border-radius: 10px; background: rgba(255, 255, 255, .1); font-size: .9375rem; }
.pdfview__fail a { text-decoration: underline; text-underline-offset: .2em; }
.pdfview__pages { display: grid; gap: 1.1rem; max-width: min(78rem, 100%); margin-inline: auto; }
.pdfview__pages img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; background: #161617; box-shadow: 0 12px 40px rgba(0, 0, 0, .55); }
html.pdf-open { overflow: hidden; }
@media (max-width: 600px) {
  .pdfview__title { display: none; }
  .pdfview__bar { justify-content: flex-end; }
  .pdfview__pages img { border-radius: 6px; }
}

/* ═══════════════════════════════════════════════════════════
   Arabic — right-to-left, Tajawal
   ═══════════════════════════════════════════════════════════ */
html[lang="ar"] { --sans: "Tajawal", "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
html[lang="ar"] body { font-size: 1.125rem; line-height: 1.75; }
/* Arabic letters join: any letter-spacing (we use a lot of negative tracking) breaks the script */
html[lang="ar"] *, html[lang="ar"] *::before, html[lang="ar"] *::after { letter-spacing: 0 !important; }
/* Arabic needs more line height than Latin display type */
html[lang="ar"] .h2 { line-height: 1.35; }
html[lang="ar"] .h2--xl { line-height: 1.3; }
html[lang="ar"] .hero__headline { line-height: 1.28; font-size: clamp(2.6rem, 5.4vw, 4.8rem); font-weight: 700; }
html[lang="ar"] .story__line, html[lang="ar"] .band__line { line-height: 1.35; font-weight: 700; }
html[lang="ar"] .story__line--xl, html[lang="ar"] .band__line--last { line-height: 1.3; }
html[lang="ar"] .lead, html[lang="ar"] .lead--scrub { line-height: 1.55; }
html[lang="ar"] .lead--scrub { font-weight: 700; }
html[lang="ar"] .acc__title, html[lang="ar"] .founder__name, html[lang="ar"] .belief blockquote, html[lang="ar"] .band__title { line-height: 1.4; }
html[lang="ar"] .h2, html[lang="ar"] .acc__title { font-weight: 700; }
html[lang="ar"] .card__cap, html[lang="ar"] .hero__copy, html[lang="ar"] .sub { line-height: 1.7; }
html[lang="ar"] .lang button[data-lang="ar"] { font-family: "Tajawal", sans-serif; font-size: .95em; }

/* Mirror the things that point somewhere */
[dir="rtl"] .link::after { content: "\2039"; }
[dir="rtl"] .link:hover::after { transform: translateX(-.25em); }
[dir="rtl"] .legal__back::before { content: "\203A"; }
[dir="rtl"] .legal__back:hover::before { transform: translateX(.25em); }
[dir="rtl"] .gallery__btn svg { transform: scaleX(-1); }
/* Latin-only runs (emails, coordinates) keep their own direction inside Arabic text */
a[href^="mailto:"], .contact__mail, .about__tag { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .about__tag { text-align: end; }
/* the profile cover's stacked pages peek out toward the reading direction's end */
[dir="rtl"] .profile__cover::before { transform: translate(-1.1rem, -.9rem) scale(.97); }
[dir="rtl"] .profile__cover::after { transform: translate(-2.1rem, -1.8rem) scale(.94); }
[dir="rtl"] .profile__cover:hover::before { transform: translate(-1.3rem, -1.1rem) scale(.97); }
[dir="rtl"] .profile__cover:hover::after { transform: translate(-2.5rem, -2.2rem) scale(.94); }
