/* Abderrahim Moubarik: paper, ink and a wax-red seal. Every surface is a document. */

:root {
  --paper: #F2ECE1;
  --paper-2: #E9E1D2;
  --paper-3: #FBF8F1;
  --ink: #15213B;
  --ink-2: #3A4460;
  --muted: #5F6472;
  --rule: #CBBDA4;
  --seal: #A31F2A;
  --seal-2: #C3343F;
  --gilt: #A9843A;
  --gutter: clamp(16px, 4.2vw, 64px);
  --nav-h: 68px;
  --f-latin-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-display: var(--f-latin-display);
  --f-text: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --tint: rgba(21, 33, 59, .06);
  --line: rgba(21, 33, 59, .15);
  --line-2: rgba(21, 33, 59, .32);
  --nav-bg: rgba(242, 236, 225, .93);
  --fs: 1;
  --fs-d: 1;
  color-scheme: light;
}
html[data-text="125"] { --fs: 1.25; --fs-d: 1.08; }
html[data-text="150"] { --fs: 1.5; --fs-d: 1.16; }
html[lang="ar"] {
  --f-display: "Amiri", "IBM Plex Sans Arabic", serif;
  --f-text: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Sans Arabic", "IBM Plex Mono", ui-monospace, monospace;
}
/* Arabic letters join: never track or uppercase them */
:lang(ar) { letter-spacing: 0 !important; text-transform: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .22 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  font: 400 calc(17px * var(--fs))/1.6 var(--f-text);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="ar"] body { font-size: calc(18px * var(--fs)); line-height: 1.75; }
img, svg, canvas { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--seal); color: var(--paper-3); }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; border-radius: 4px; transition: outline-offset .25s var(--ease-spring); }
em { font-style: italic; color: var(--seal); }
html[lang="ar"] em { font-style: normal; }

.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
/* hidden entrance states are tilted in 3D; their projected boxes must never widen the page */
main { overflow-x: clip; }

.skip {
  position: fixed; inset-inline-start: 12px; top: 12px; z-index: 200;
  padding: 10px 16px; background: var(--ink); color: var(--paper-3); border-radius: 6px;
  translate: 0 -160%; transition: translate .3s var(--ease-out);
}
.skip:focus { translate: 0 0; }

/* ------------------------------------------------------------- intro curtain */
.curtain { display: none; }
.intro .curtain {
  display: block; position: fixed; inset: 0; z-index: 120; pointer-events: none;
  /* safety net: if the script never runs, the curtain still lifts */
  animation: curtain-safety 0s linear 4.5s forwards;
}
@keyframes curtain-safety { to { visibility: hidden; } }
.curtain__half { position: absolute; inset-inline: 0; height: 50.5%; background: var(--paper); }
.curtain__half--top { top: 0; }
.curtain__half--bottom { bottom: 0; }
.curtain__seam {
  position: absolute; inset-inline: 0; top: 50%; height: 2px; margin-top: -1px;
  background: var(--seal); transform: scaleX(0);
}
.curtain__label { position: absolute; inset-inline: 0; top: calc(50% - 86px); margin: 0; display: flex; justify-content: center; }

/* ------------------------------------------------------------- language wipe */
.wipe {
  display: none; position: fixed; inset: 0; z-index: 110; pointer-events: none;
  background: var(--ink); color: var(--paper-3);
  place-items: center; align-content: center; gap: 18px;
}
.wipe { box-shadow: inset 4px 0 0 var(--seal-2), inset -4px 0 0 var(--seal-2); }
.wipe__edge { display: none; }
.wipe__name { font: 400 calc(clamp(40px, 7vw, 96px) * var(--fs-d))/1 var(--f-latin-display); letter-spacing: -.01em; }
.wipe__name:lang(ar) { font-family: "Amiri", serif; }

/* ------------------------------------------------------------- page chrome */
.progress { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 95; pointer-events: none; }
.progress__bar { display: block; height: 100%; background: var(--seal); transform: scaleX(0); transform-origin: left center; }
[dir="rtl"] .progress__bar { transform-origin: right center; }

.margin-rule {
  position: fixed; top: 0; bottom: 0; inset-inline-start: clamp(6px, 1.6vw, 26px); width: 1px; z-index: 5;
  background: color-mix(in srgb, var(--seal) 45%, transparent); pointer-events: none; transform-origin: top;
}

.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 90; height: var(--nav-h);
  display: flex; align-items: center; gap: clamp(10px, 2vw, 28px);
  padding-inline: var(--gutter);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .4s, background-color .4s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: var(--nav-bg); }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; margin-inline-end: auto; min-width: 0; }
.brand__text { display: grid; line-height: 1.15; min-width: 0; }
.brand__text b { font: 500 calc(17px * var(--fs))/1.15 var(--f-latin-display); letter-spacing: 0; white-space: nowrap; font-variation-settings: "opsz" 24; }
.brand__text small { font: 500 calc(12px * var(--fs))/1.3 var(--f-text); letter-spacing: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the AM monogram (outlines from Fraunces, see tools/build_mark.py); it inherits the text colour */
.mark { display: block; width: auto; flex: none; fill: currentColor; }
.mark--brand { height: 22px; color: var(--ink); }
.brand__rule { width: 1px; height: 30px; flex: none; background: var(--line-2); }
.brand:hover .mark--brand { color: var(--seal); }
.mark--brand { transition: color .25s; }
.mark--foot { height: 40px; color: var(--paper-3); }
.mark--wipe { height: 46px; color: var(--paper-3); }
.mark--curtain { height: 56px; margin-inline: auto; color: var(--ink); }

.nav__links { position: relative; display: flex; gap: clamp(14px, 1.8vw, 28px); }
.nav__links a {
  position: relative; text-decoration: none; font-size: calc(14.5px * var(--fs)); font-weight: 500; color: var(--ink-2);
  padding-block: 8px; transition: color .25s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__ind {
  position: absolute; left: 0; bottom: 2px; width: 100px; height: 2px; background: var(--seal);
  transform-origin: left center; transform: scaleX(0); pointer-events: none;
}

.lang-menu { position: relative; display: flex; align-items: center; }
.lang-toggle { display: none; }
.langs__name { display: none; }
.langs { display: flex; align-items: center; gap: 2px; }
.langs button {
  border: 0; background: none; cursor: pointer; padding: 9px 7px;
  font: 500 calc(14.5px * var(--fs))/1 var(--f-text); color: var(--muted);
  text-decoration: underline transparent 1.5px; text-underline-offset: 7px;
  transition: color .2s, text-decoration-color .2s;
}
.langs button[lang="ar"] { font: 500 calc(15px * var(--fs))/1 "IBM Plex Sans Arabic", sans-serif; }
.langs button:hover { color: var(--ink); text-decoration-color: var(--line-2); }
.langs button[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration-color: currentColor; }

.tool {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); flex: none;
  background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: background-color .25s, border-color .25s, color .25s;
}
.tool:hover { background: var(--tint); border-color: var(--ink); }
.tool svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.a11y-toggle svg circle { fill: currentColor; stroke: none; }
.motion-toggle .mt__line { opacity: 0; }
.tool[aria-pressed="true"], .tool[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper-3); }
.motion-toggle[aria-pressed="true"] .mt__wave { opacity: 0; }
.motion-toggle[aria-pressed="true"] .mt__line { opacity: 1; }

/* ------------------------------------------------------------- journey (sticky 3D stage + beats) */
.journey { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease-out); }
.stage__canvas.is-ready { opacity: 1; }
.stage__canvas.is-failed { display: none; }

.hud {
  position: absolute; inset-inline-end: var(--gutter); bottom: clamp(18px, 4vh, 40px);
  display: flex; align-items: center; gap: 12px;
  font: 500 calc(13px * var(--fs))/1 var(--f-text); letter-spacing: 0; color: var(--ink-2);
}
.hud__bar { width: 90px; height: 2px; background: var(--line); overflow: hidden; }
.hud__fill { display: block; height: 100%; background: var(--seal); transform: scaleX(0); transform-origin: left center; }
[dir="rtl"] .hud__fill { transform-origin: right center; }
.hud__label { min-width: 8ch; }

.beats { position: relative; margin-top: -100vh; margin-top: -100svh; pointer-events: none; }
.beat {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-inline: calc(var(--gutter) + 18px) var(--gutter);
  padding-block: calc(var(--nav-h) + 24px) 48px;
}
.beat__copy { pointer-events: auto; width: min(540px, 44vw); }
.beat--hero .beat__copy { width: min(640px, 50vw); }

.hero__name { margin: 0; font-family: var(--f-latin-display); font-weight: 400; line-height: .9; letter-spacing: -.025em; font-variation-settings: "opsz" 144; }
.hero__title { display: block; margin-bottom: 14px; font: 500 calc(14.5px * var(--fs))/1 var(--f-text); letter-spacing: 0; color: var(--seal); }
.beat--hero .beat__copy { container-type: inline-size; }
/* the name always fits its column on one line per word: the cap is the column width divided by the word's width
   in em for the active font and spacing (measured: "Abderrahim" is 4.45em in Fraunces, 5.15em in Atkinson) */
.hero__line {
  --name-em: 4.6;
  display: block; white-space: nowrap; perspective: 600px;
  font-size: min(calc(clamp(54px, 8.4vw, 138px) * var(--fs-d)), calc(96cqi / var(--name-em)));
}
html[data-font="readable"] .hero__line { --name-em: 5.3; }
html[data-spacing="wide"] .hero__line { --name-em: 5.9; }
/* display lines keep a display leading in the spacing mode; the extra letter and word spacing still applies */
html[data-spacing="wide"] main .hero__name :is(.hero__line, .char) { line-height: 1.08 !important; }
html[data-font="readable"][data-spacing="wide"] .hero__line { --name-em: 6.6; }
.hero__line--1 { font-weight: 300; }
.hero__line--2 { font-style: italic; font-weight: 480; padding-inline-start: .55em; }
[dir="rtl"] .hero__line--2 { padding-inline-start: 0; padding-inline-end: .55em; text-align: left; }
.hero__line .char { display: inline-block; will-change: transform; }
.hero__lead { max-width: 34em; margin: 26px 0 0; font-size: calc(clamp(17px, 1.35vw, 20px) * var(--fs)); color: var(--ink-2); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  --bg: var(--ink); --fg: var(--paper-3); --bd: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px;
  border-radius: 6px; border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg);
  font: 600 calc(15px * var(--fs))/1 var(--f-text); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 6px 16px -8px var(--line-2);
  transition: translate .35s var(--ease-spring), box-shadow .35s, background-color .25s, color .25s, border-color .25s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn::after {
  content: ""; position: absolute; inset: -2px auto -2px 0; width: 40%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  translate: -120% 0; transition: translate 0s;
}
.btn:hover { translate: 0 -2px; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 14px 26px -12px var(--line-2); }
.btn:hover::after { translate: 320% 0; transition: translate .9s var(--ease-out); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-2); box-shadow: none; }
.btn--ghost:hover { --bg: var(--tint); --bd: var(--ink); }
.btn--ghost::after { background: linear-gradient(100deg, transparent, rgba(163,31,42,.12), transparent); }
.btn--seal { --bg: var(--seal); --bd: var(--seal); margin-top: 26px; }
.btn--seal:hover { --bg: #8f1a24; }
.btn__arrow { display: inline-block; transition: translate .35s var(--ease-spring); }
.btn:hover .btn__arrow, .lcard__read:hover .btn__arrow { translate: 4px 0; }
[dir="rtl"] .btn__arrow:not(.btn__arrow--out) { scale: -1 1; }
[dir="rtl"] .btn:hover .btn__arrow:not(.btn__arrow--out), [dir="rtl"] .lcard__read:hover .btn__arrow { translate: -4px 0; }
.btn:hover .btn__arrow--out { translate: 2px -2px; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; pointer-events: none; z-index: -1; }

.stats { display: flex; flex-wrap: wrap; gap: 16px 34px; margin: 38px 0 0; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--line); }
.stats li { display: grid; gap: 4px; max-width: 15em; }
.stat__n { font: 400 calc(34px * var(--fs))/1 var(--f-latin-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat__n--word { font-style: italic; }
.stats span { font-size: calc(13.5px * var(--fs)); line-height: 1.4; color: var(--muted); }

.beat__title { margin: 0 0 34px; font: 400 calc(clamp(32px, 3.6vw, 52px) * var(--fs-d))/1.04 var(--f-display); letter-spacing: -.015em; }
html[lang="ar"] .beat__title, html[lang="ar"] .section__title { line-height: 1.35; font-weight: 700; }
.step { position: relative; padding-inline-start: 74px; }
.step__num {
  position: absolute; inset-inline-start: 0; top: -4px;
  font: 300 calc(54px * var(--fs-d))/1 var(--f-latin-display); font-variant-numeric: tabular-nums; color: var(--seal);
}
.step__title { margin: 0 0 10px; font: 500 calc(clamp(26px, 2.4vw, 34px) * var(--fs))/1.15 var(--f-display); }
html[lang="ar"] .step__title { font-weight: 700; }
.step__body { margin: 0; max-width: 30em; color: var(--ink-2); font-size: calc(17.5px * var(--fs)); }

/* ------------------------------------------------------------- marquee */
.marquee {
  position: relative; z-index: 2; overflow: hidden; padding-block: 22px 18px;
  background: var(--ink); color: var(--paper-3);
  border-block: 1px solid var(--ink);
}
.marquee__row { display: flex; align-items: center; gap: 36px; width: max-content; white-space: nowrap; will-change: transform; }
.marquee__row--a { font: italic 300 calc(clamp(38px, 5vw, 72px) * var(--fs-d))/1.15 var(--f-latin-display); }
.marquee__row--a [lang="ar"] { font: 400 calc(clamp(38px, 5vw, 72px) * var(--fs-d))/1.15 "Amiri", serif; font-style: normal; }
.marquee__row--b { margin-top: 10px; font: 500 calc(14.5px * var(--fs))/1 var(--f-text); letter-spacing: 0; color: rgba(251,248,241,.6); }
.marquee__row--b [lang="ar"] { font: 500 calc(15px * var(--fs))/1 "IBM Plex Sans Arabic", sans-serif; }
.marquee i { width: 12px; height: 12px; border-radius: 50%; background: var(--seal-2); flex: none; }
.marquee__row--b i { width: 5px; height: 5px; background: var(--gilt); }

/* ------------------------------------------------------------- sections */
.section { position: relative; z-index: 2; padding-block: clamp(56px, 7vw, 104px); background: var(--paper); }
.section__head { max-width: 760px; margin-bottom: clamp(32px, 4.5vw, 56px); }
.section__title { margin: 0; font: 400 calc(clamp(38px, 5.2vw, 76px) * var(--fs-d))/1.02 var(--f-display); letter-spacing: -.02em; }
.section__lead { margin: 22px 0 0; max-width: 36em; font-size: calc(clamp(17px, 1.3vw, 19px) * var(--fs)); color: var(--ink-2); }

/* language cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); perspective: 1400px; }
.lcard {
  position: relative; isolation: isolate; min-height: 340px; padding: 30px 28px 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--paper-3); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 40px -26px rgba(60,40,20,.45), 0 2px 6px -2px rgba(60,40,20,.12);
  transform-style: preserve-3d; overflow: hidden;
  transition: box-shadow .4s, border-color .4s;
}
.lcard::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 18px; width: 1px; z-index: -1;
  background: color-mix(in srgb, var(--seal) 35%, transparent);
}
.lcard::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 30%), rgba(255,255,255,.55), transparent 60%);
  mix-blend-mode: soft-light; transition: opacity .4s;
}
.lcard:hover { border-color: var(--line-2); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 30px 60px -28px rgba(60,40,20,.55), 0 4px 10px -4px rgba(60,40,20,.18); }
.lcard:hover::after { opacity: 1; }
.lcard__fold {
  position: absolute; top: 0; right: 0; width: 46px; height: 46px; z-index: 2;
  background: linear-gradient(225deg, var(--paper) 50%, #e3d8c4 50%, #d8cbb2);
  box-shadow: -3px 3px 6px rgba(60,40,20,.14);
  transition: width .45s var(--ease-spring), height .45s var(--ease-spring);
}
.lcard:hover .lcard__fold { width: 62px; height: 62px; }
/* the folded corner sits on the line's far end, so in Arabic it moves to the left, away from the label */
[dir="rtl"] .lcard__fold { right: auto; left: 0; scale: -1 1; }
.lcard__glyph {
  position: absolute; top: 10px; inset-inline-end: 24px; z-index: -1;
  font: italic 300 calc(190px * var(--fs-d))/1 var(--f-latin-display); color: var(--tint);
  transform: translateZ(40px); transition: color .4s, translate .6s var(--ease-out);
}
.lcard__glyph:lang(ar) { font: 400 calc(230px * var(--fs-d))/1 "Amiri", serif; top: -30px; }
.lcard:hover .lcard__glyph { color: rgba(163,31,42,.16); translate: 0 6px; }
.lcard__body { transform: translateZ(26px); }
.lcard__label { margin: 0; font: 600 calc(14.5px * var(--fs))/1.2 var(--f-text); letter-spacing: 0; color: var(--ink-2); }
html[lang="ar"] .lcard__label { font-size: calc(15px * var(--fs)); }
.lcard__native { margin: 12px 0 18px; font: 400 calc(clamp(40px, 3.6vw, 54px) * var(--fs-d))/1.05 var(--f-latin-display); letter-spacing: -.02em; }
.lcard__native:lang(ar) { font: 700 calc(clamp(44px, 3.8vw, 58px) * var(--fs-d))/1.2 "Amiri", serif; }
.lcard__read {
  position: relative; overflow: hidden; isolation: isolate; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 6px;
  border: 1.5px solid var(--ink); background: transparent; cursor: pointer;
  font-weight: 600; font-size: calc(15px * var(--fs)); transition: background-color .25s, color .25s;
}
.lcard__read:hover { background: var(--ink); color: var(--paper-3); }
.lcard__read[hidden] { display: none; }
.lcard__readlabel:lang(ar) { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: calc(16px * var(--fs)); }

/* services */
.svc { position: relative; }
.svc__row { position: relative; display: grid; grid-template-columns: 90px 84px minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: start; padding-block: 44px; }
.svc__rule { position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--ink); transform-origin: left center; }
[dir="rtl"] .svc__rule { transform-origin: right center; }
.svc__rule--end { position: relative; display: block; }
.svc__num { font: italic 300 calc(64px * var(--fs-d))/1 var(--f-latin-display); color: var(--seal); }
.svc__icon { width: 64px; height: 64px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.svc__text h3 { margin: 0 0 10px; font: 400 calc(clamp(28px, 3vw, 42px) * var(--fs-d))/1.1 var(--f-display); letter-spacing: -.01em; }
html[lang="ar"] .svc__text h3 { font-weight: 700; line-height: 1.4; }
.svc__text p { margin: 0; max-width: 34em; color: var(--ink-2); font-size: calc(18px * var(--fs)); }
.svc__row:hover .svc__icon { stroke: var(--seal); }

.docs { margin-top: clamp(40px, 5vw, 64px); }
.docs__title { margin: 0 0 12px; font: 600 calc(17px * var(--fs))/1.3 var(--f-text); color: var(--ink); }
.chips { columns: 4 190px; column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.chip { break-inside: avoid; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: calc(16.5px * var(--fs)); color: var(--ink-2); }

/* contact */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.phone-big {
  display: inline-block; margin-top: 34px; text-decoration: none;
  font: 300 calc(clamp(40px, 5.4vw, 80px) * var(--fs-d))/1 var(--f-latin-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; padding-bottom: 6px;
  transition: background-size .6s var(--ease-out), color .3s;
}
.phone-big:hover { color: var(--seal); background-size: 100% 2px; }
.phone-big .char { display: inline-block; }
.visit { margin: 22px 0 0; font-size: calc(14.5px * var(--fs)); color: var(--muted); }
.clist { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.crow { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.crow__k { font: 500 calc(13.5px * var(--fs))/1.4 var(--f-text); letter-spacing: 0; color: var(--muted); }
html[lang="ar"] .crow__k { font-size: calc(14px * var(--fs)); }
.crow__v { font-size: calc(18px * var(--fs)); text-decoration: none; overflow-wrap: anywhere; }
[dir="rtl"] .crow__v[dir="ltr"] { text-align: right; }
a.crow__v { background: linear-gradient(var(--seal), var(--seal)) 0 100% / 0 1.5px no-repeat; transition: background-size .5s var(--ease-out), color .25s; justify-self: start; }
a.crow__v:hover { color: var(--seal); background-size: 100% 1.5px; }
.copy {
  position: relative; overflow: hidden; isolation: isolate;
  height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  font: 500 calc(12px * var(--fs))/1 var(--f-mono); letter-spacing: .06em; color: var(--ink-2); transition: border-color .25s, color .25s, background-color .25s;
}
html[lang="ar"] .copy { font-size: calc(13px * var(--fs)); }
.copy:hover { border-color: var(--ink); color: var(--ink); }
.copy.is-done { border-color: #2f6b4a; color: #2f6b4a; background: rgba(47,107,74,.08); }
.copy__label { display: inline-block; }
.spark { position: fixed; z-index: 130; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; background: var(--seal); }

/* footer */
.foot { position: relative; z-index: 2; background: var(--ink); color: rgba(251,248,241,.82); padding-block: 56px; }
.foot__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 32px; }
.foot__brand { display: flex; align-items: center; gap: 16px; }
.foot__brand p { margin: 0; font-size: calc(14.5px * var(--fs)); line-height: 1.5; }
.foot__brand b { font: 500 calc(19px * var(--fs))/1.3 var(--f-latin-display); color: var(--paper-3); }
.foot__legal { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot__brand { min-width: 0; }
.foot__legal a { font: 500 calc(14px * var(--fs))/1 var(--f-text); text-decoration: none; color: var(--paper-3); background: linear-gradient(var(--seal-2), var(--seal-2)) 0 100% / 0 1.5px no-repeat; padding-bottom: 4px; transition: background-size .4s var(--ease-out); }
.foot__legal a:hover { background-size: 100% 1.5px; }
.foot__copy { margin: 0; font: 500 calc(12px * var(--fs))/1 var(--f-mono); letter-spacing: .08em; color: rgba(251,248,241,.55); }
.totop {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  border: 1px solid rgba(251,248,241,.3); color: var(--paper-3); font-size: calc(18px * var(--fs));
  transition: background-color .25s, border-color .25s, translate .35s var(--ease-spring);
}
.totop:hover { background: var(--seal); border-color: var(--seal); translate: 0 -3px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* tablets and narrow windows: the copy becomes a card under the sheets instead of sharing the row with them */
@media (max-width: 1000px) {
  .beat { align-items: flex-end; padding-inline: var(--gutter); padding-block: calc(var(--nav-h) + 12px) 24px; }
  .beat__copy, .beat--hero .beat__copy {
    width: 100%; max-width: 640px; padding: 22px 22px;
    background: var(--nav-bg); border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 18px 40px -26px rgba(60,40,20,.5);
  }
  .hud { top: calc(var(--nav-h) + 14px); bottom: auto; }
}
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .lcard { min-height: 0; padding-block: 26px 24px; }
}
@media (max-width: 760px) {
  :root { --nav-h: 60px; }
  /* phones: an opaque bar (nothing shows through it), the name beside the mark, the languages in one dropdown and
     the motion switch inside the accessibility menu, where it already lives */
  .nav {
    gap: 6px; background: var(--paper); border-bottom-color: var(--line);
    padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  }
  .nav.is-scrolled { background: var(--paper); }
  .brand { gap: 11px; }
  .brand__text small { display: none; }
  .brand__text b { font-size: calc(15.5px * var(--fs)); }
  .mark--brand { height: 19px; }
  .brand__rule { height: 22px; }
  .motion-toggle { display: none; }
  .tool { width: 42px; height: 42px; }
  .lang-toggle {
    display: inline-flex; align-items: center; gap: 3px; height: 44px; padding: 0 6px 0 10px; flex: none;
    border: 0; background: none; color: var(--ink); cursor: pointer; font: 600 calc(15px * var(--fs))/1 var(--f-text);
  }
  .lang-toggle__code:lang(ar) { font-family: "IBM Plex Sans Arabic", sans-serif; }
  .lang-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: rotate .25s var(--ease-out); }
  .lang-menu.is-open .lang-toggle svg { rotate: 180deg; }
  .langs {
    display: none; position: absolute; z-index: 5; top: calc(100% + 6px); inset-inline-end: -48px; min-width: 210px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 6px;
    background: var(--paper-3); border: 1px solid var(--line-2); border-radius: 10px;
    box-shadow: 0 22px 44px -20px rgba(20, 24, 40, .5);
  }
  .lang-menu.is-open .langs { display: flex; }
  .langs button {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px;
    border-radius: 6px; font-size: calc(16.5px * var(--fs)); color: var(--ink); text-decoration: none; text-align: start;
  }
  .langs button[lang="ar"] { font-size: calc(17px * var(--fs)); }
  .langs button:hover { text-decoration: none; background: var(--tint); }
  .langs button[aria-pressed="true"] { background: var(--tint); text-decoration: none; }
  .langs button[aria-pressed="true"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--seal); flex: none; }
  .langs__code { display: none; }
  .langs__name { display: inline; }
  .hud { display: none; }
  .margin-rule { display: none; }
  .beat { align-items: flex-end; padding-inline: var(--gutter); padding-block: calc(var(--nav-h) + 12px) 22px; }
  .beat__copy, .beat--hero .beat__copy {
    width: 100%; padding: 20px 18px;
    background: var(--nav-bg); border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 18px 40px -26px rgba(60,40,20,.5);
  }
  .beat--hero { align-items: flex-end; }
  .beat--hero .beat__copy { background: var(--nav-bg); }
  .hero__line { font-size: min(calc(clamp(40px, 12vw, 58px) * var(--fs-d)), calc(96cqi / var(--name-em))); }
  .hero__title { margin-bottom: 10px; font-size: calc(11px * var(--fs)); }
  .hero__lead { margin-top: 12px; font-size: calc(15.5px * var(--fs)); line-height: 1.5; }
  .cta-row { margin-top: 20px; gap: 10px; }
  .btn { min-height: 46px; padding: 0 16px; font-size: calc(14.5px * var(--fs)); }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; padding-top: 14px; gap: 10px; }
  .stats li { max-width: none; }
  .stat__n { font-size: calc(24px * var(--fs)); }
  .stats span { font-size: calc(11.5px * var(--fs)); }
  .beat__title { margin-bottom: 18px; font-size: calc(28px * var(--fs)); }
  .step { padding-inline-start: 54px; }
  .step__num { font-size: calc(40px * var(--fs-d)); }
  .step__title { font-size: calc(24px * var(--fs)); }
  .step__body { font-size: calc(16px * var(--fs)); }
  .btn--seal { margin-top: 18px; }
  .svc__row { grid-template-columns: 56px minmax(0, 1fr); padding-block: 32px; }
  .svc__icon { display: none; }
  .svc__num { font-size: calc(44px * var(--fs-d)); }
  .crow { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .copy { height: 40px; padding: 0 14px; }
  .crow__k { grid-column: 1 / -1; }
  .foot__grid { flex-direction: column; align-items: flex-start; }
  .totop { justify-self: start; }
}
/* short phones (iPhone SE, landscape-ish browsers): the hero card drops the stats row (the register repeats them)
   so the sheets above it stay visible */
@media (max-width: 760px) and (max-height: 720px) {
  .beat--hero .stats { display: none; }
  .beat--hero .beat__copy { padding-block: 18px; }
  .hero__lead { margin-top: 10px; }
}
@media (max-width: 380px) {
  .brand { gap: 8px; }
  .brand__text b { font-size: calc(14.5px * var(--fs)); }
  .lang-toggle { padding-inline: 6px 2px; }
}
@media (max-width: 350px) {
  .brand__text, .brand__rule { display: none; }
}

html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important;
}
html[data-motion="reduced"] .stage__canvas { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) *, html:not([data-motion="full"]) *::before, html:not([data-motion="full"]) *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------- legal pages */
.legal { padding-block: calc(var(--nav-h) + 56px) 100px; }
.legal .wrap { max-width: 860px; }
.legal h1 { margin: 0 0 12px; font: 400 calc(clamp(40px, 6vw, 72px) * var(--fs-d))/1.05 var(--f-latin-display); letter-spacing: -.02em; }
.legal h2 { margin: 48px 0 12px; font: 500 calc(24px * var(--fs))/1.25 var(--f-latin-display); }
.legal h3 { margin: 28px 0 8px; font: 600 calc(16px * var(--fs))/1.4 var(--f-text); }
.legal p, .legal li { color: var(--ink-2); font-size: calc(16.5px * var(--fs)); }
.legal a { color: var(--seal); }
.legal .todo { background: rgba(169,132,58,.18); padding: 1px 6px; border-radius: 3px; color: var(--ink); }
.legal__back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 36px; font: 500 calc(14.5px * var(--fs))/1 var(--f-text); letter-spacing: 0; text-decoration: none; color: var(--ink-2); }
.legal__back:hover { color: var(--seal); }
.nav--plain .brand { margin-inline-end: auto; }

/* ============================================================= accessibility options
   Set from the accessibility menu; carried between pages in the URL only. */

/* high contrast: black on white, stronger lines, deeper red */
html[data-contrast="high"] {
  --paper: #ffffff; --paper-2: #ffffff; --paper-3: #ffffff;
  --ink: #000000; --ink-2: #000000; --muted: #262626; --rule: #000000;
  --seal: #9b0012; --seal-2: #b3001b; --gilt: #6b4e00;
  --tint: rgba(0, 0, 0, .08); --line: #000000; --line-2: #000000; --nav-bg: #ffffff;
}
html[data-contrast="high"] body { background-image: none; }
html[data-contrast="high"] .lcard__glyph { color: rgba(0, 0, 0, .1); }
html[data-contrast="high"] .marquee__row--b { color: #ffffff; }
html[data-contrast="high"] .foot { color: #ffffff; }

/* dark: light text on deep navy */
html[data-contrast="dark"] {
  --paper: #0d1220; --paper-2: #141b2e; --paper-3: #18203a;
  --ink: #ffffff; --ink-2: #e9ecf5; --muted: #c5cad8; --rule: #6a7392;
  --seal: #ff9a9a; --seal-2: #ffb6b6; --gilt: #e8c983;
  --tint: rgba(255, 255, 255, .08); --line: rgba(255, 255, 255, .24); --line-2: rgba(255, 255, 255, .5); --nav-bg: rgba(13, 18, 32, .96);
  color-scheme: dark;
}
html[data-contrast="dark"] body { background-image: none; }
html[data-contrast="dark"] .foot, html[data-contrast="dark"] .marquee { background: #04060c; color: #ffffff; }
html[data-contrast="dark"] .foot__brand b, html[data-contrast="dark"] .foot__legal a, html[data-contrast="dark"] .totop { color: #ffffff; }
html[data-contrast="dark"] .marquee__row--b { color: rgba(255, 255, 255, .75); }
html[data-contrast="dark"] .btn--seal { --fg: #0d1220; }
html[data-contrast="dark"] .lcard__glyph { color: rgba(255, 255, 255, .08); }
html[data-contrast="dark"] .lcard__fold { background: linear-gradient(225deg, var(--paper) 50%, #2a3352 50%, #323c60); }
html[data-contrast="dark"] .copy.is-done { color: #8ee0b0; border-color: #8ee0b0; background: rgba(142, 224, 176, .1); }
html[data-contrast="dark"] .lcard, html[data-contrast="dark"] .chip { box-shadow: none; }

/* easy-to-read font: one plain sans for everything, no italics, no spaced capitals */
html[data-font="readable"] {
  --f-latin-display: "Atkinson Hyperlegible", "IBM Plex Sans", system-ui, sans-serif;
  --f-display: var(--f-latin-display);
  --f-text: "Atkinson Hyperlegible", "IBM Plex Sans", system-ui, sans-serif;
  --f-mono: "Atkinson Hyperlegible", "IBM Plex Sans", system-ui, sans-serif;
}
html[data-font="readable"][lang="ar"] { --f-display: "IBM Plex Sans Arabic", sans-serif; --f-text: "IBM Plex Sans Arabic", sans-serif; --f-mono: "IBM Plex Sans Arabic", sans-serif; }
html[data-font="readable"] :is(em, i, .hero__line--2, .stat__n--word, .svc__num, .marquee__row--a, .lcard__glyph) { font-style: normal !important; }
html[data-font="readable"] :is(.kicker, .hud, .lcard__label, .crow__k, .docs__title, .hero__title, .copy, .langs button, .brand__text small, .legal__back, .marquee__row--b) { text-transform: none !important; letter-spacing: .01em !important; }

/* text spacing as in WCAG 1.4.12 */
html[data-spacing="wide"] :is(main, footer, .a11y) :is(p, li, dd, dt, h1, h2, h3, a, button, span, legend, small) {
  line-height: 1.75 !important; letter-spacing: .12em !important; word-spacing: .16em !important;
}
html[data-spacing="wide"] :is(main, footer) p { margin-bottom: 1em; }
html[data-spacing="wide"] :lang(ar), html[data-spacing="wide"] :lang(ar) * { letter-spacing: 0 !important; }

/* links and focus made unmistakable */
html[data-links="underline"] a:not(.btn):not(.brand) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 4px; }
html[data-links="underline"] :is(a, button, [tabindex]):focus-visible { outline: 3px solid var(--seal) !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px var(--paper) !important; }
html[data-links="underline"] .btn { text-decoration: underline; text-underline-offset: 4px; }

/* large cursor */
html[data-cursor="big"], html[data-cursor="big"] * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 4l30 22-13 2 8 15-6 3-8-15-11 9z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 4, auto !important;
}
html[data-cursor="big"] :is(a, button, label, [role="switch"], canvas) {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 4l30 22-13 2 8 15-6 3-8-15-11 9z' fill='%23A31F2A' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 4, pointer !important;
}

/* ------------------------------------------------------------- accessibility menu */
.a11y { position: fixed; inset: 0; z-index: 140; }
.a11y[hidden] { display: none; }
.a11y__scrim { position: absolute; inset: 0; background: rgba(8, 11, 22, .5); opacity: 0; transition: opacity .3s; }
.a11y__sheet {
  position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100%);
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 24px 30px; background: var(--paper-3); color: var(--ink);
  border-inline-start: 1px solid var(--line-2); box-shadow: 0 0 60px -20px rgba(0, 0, 0, .45);
  transform: translateX(100%); transition: transform .4s var(--ease-out);
}
[dir="rtl"] .a11y__sheet { transform: translateX(-100%); }
.a11y.is-open .a11y__scrim { opacity: 1; }
.a11y.is-open .a11y__sheet { transform: none; }
.a11y__sheet:focus { outline: none; }
.a11y__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.a11y__head h2 { margin: 0; font: 500 calc(28px * var(--fs-d))/1.15 var(--f-display); }
.a11y__close { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.a11y__close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.a11y__close:hover { background: var(--tint); }
.a11y__intro { margin: 6px 0 4px; font-size: calc(14.5px * var(--fs)); line-height: 1.5; color: var(--muted); }
.a11y fieldset { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.a11y legend { margin-bottom: 10px; padding: 0; font: 600 calc(15px * var(--fs))/1.3 var(--f-text); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.seg button {
  min-height: 48px; padding: 6px 8px; border: 1.5px solid var(--line-2); border-radius: 8px;
  background: transparent; color: var(--ink); cursor: pointer; font: 600 calc(14.5px * var(--fs))/1.2 var(--f-text);
  transition: background-color .2s, color .2s, border-color .2s;
}
.seg button:hover { border-color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper-3); border-color: var(--ink); }
.seg--text button:nth-child(1) { font-size: calc(15px * var(--fs)); }
.seg--text button:nth-child(2) { font-size: calc(19px * var(--fs)); }
.seg--text button:nth-child(3) { font-size: calc(23px * var(--fs)); }
.switches { margin-top: 14px; border-top: 1px solid var(--line); }
.switch {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px;
  padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink);
  cursor: pointer; text-align: start; font: 600 calc(15.5px * var(--fs))/1.3 var(--f-text);
}
.switch__label { display: grid; gap: 2px; }
.switch__label small { font-weight: 400; font-size: calc(13px * var(--fs)); color: var(--muted); }
.switch__track { position: relative; width: 48px; height: 28px; flex: none; border-radius: 999px; background: var(--line-2); transition: background-color .25s; }
.switch__knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: translate .3s var(--ease-spring); }
.switch[aria-checked="true"] .switch__track { background: var(--seal); }
.switch[aria-checked="true"] .switch__knob { translate: 20px 0; }
[dir="rtl"] .switch[aria-checked="true"] .switch__knob { translate: -20px 0; }
.a11y__reset {
  margin-top: 18px; min-height: 48px; border-radius: 8px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; font: 600 calc(15px * var(--fs))/1.2 var(--f-text);
}
.a11y__reset:hover { background: var(--ink); color: var(--paper-3); }
.a11y__links { display: grid; margin-top: 20px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.a11y__links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font: 600 calc(15px * var(--fs))/1.3 var(--f-text); text-decoration: none; border-bottom: 1px solid var(--line); }
.a11y__links a:hover { color: var(--seal); }
.a11y__links a::after { content: "→"; }
[dir="rtl"] .a11y__links a::after { content: "←"; }
@media (max-width: 560px) {
  .a11y__sheet { top: auto; inset-inline: 0; width: 100%; max-height: 88vh; max-height: 88svh; padding-bottom: max(30px, calc(env(safe-area-inset-bottom) + 16px)); border-radius: 16px 16px 0 0; border-inline-start: 0; border-top: 1px solid var(--line-2); transform: translateY(100%); }
  [dir="rtl"] .a11y__sheet { transform: translateY(100%); }
}

/* the tool buttons on the legal pages sit at the end of the bar */
.nav__tools { display: flex; gap: 8px; }

/* Leichte Sprache page */
.easy { font-size: calc(20px * var(--fs)); line-height: 1.7; }
.easy h2 { margin-top: 56px; font-size: calc(28px * var(--fs-d)); }
.easy p, .easy li { font-size: calc(20px * var(--fs)); line-height: 1.7; color: var(--ink); max-width: 34em; }
.easy ul { padding-inline-start: 1.2em; }
.easy .explain { margin: 18px 0; padding: 16px 20px; border-inline-start: 4px solid var(--seal); background: var(--paper-2); }
