/* ==========================================================================
   Mohamed Dawood — Portfolio
   ========================================================================== */

/* ---------- Thmanyah Sans (Arabic) — self-hosted from /fonts ---------- */
@font-face {
  font-family: "Thmanyah Sans";
  src: url("fonts/thmanyahsans-Regular.woff2") format("woff2"), url("fonts/thmanyahsans-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("fonts/thmanyahsans-Medium.woff2") format("woff2"), url("fonts/thmanyahsans-Medium.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("fonts/thmanyahsans-Bold.woff2") format("woff2"), url("fonts/thmanyahsans-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("fonts/thmanyahsans-Black.woff2") format("woff2"), url("fonts/thmanyahsans-Black.woff") format("woff");
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #E9ECEF;
  --bg-deep: #DEE2E6;
  --ink: #141413;
  --ink-2: #4E4C48;
  --ink-3: #8C8984;
  --line: rgba(20, 20, 19, 0.09);
  --line-strong: rgba(20, 20, 19, 0.16);

  --glass: rgba(247, 246, 244, 0.52);
  --glass-strong: rgba(247, 246, 244, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.72);
  --folder-back: #E2E0DB;

  --shadow-sm: 0 1px 2px rgba(20, 20, 19, 0.04), 0 4px 12px -4px rgba(20, 20, 19, 0.08);
  --shadow-md: 0 2px 4px rgba(20, 20, 19, 0.03), 0 18px 40px -18px rgba(20, 20, 19, 0.22);
  --shadow-lg: 0 4px 10px rgba(20, 20, 19, 0.04), 0 40px 80px -36px rgba(20, 20, 19, 0.32);

  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "Thmanyah Sans", "Segoe UI", Tahoma, sans-serif;
  --font-ar-display: "Thmanyah Sans", "Segoe UI", Tahoma, sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --radius: 24px;
  --nav-h: 76px;

  --flip: 1; /* mirrors directional motion in RTL */
}
[dir="rtl"] { --flip: -1; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 32px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Frosted backdrop: colour shapes sit behind one full-page pane of frosted glass (no grid) */
body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: -2;
  pointer-events: none;
  /* Palette: Whiteout #E9ECEF + Blackstone #212529 (rgb 33, 37, 41) */
  background:
    radial-gradient(40% 36% at 92% 10%, rgba(33, 37, 41, 0.34), rgba(33, 37, 41, 0) 70%),
    radial-gradient(44% 40% at 6% 88%, rgba(33, 37, 41, 0.3), rgba(33, 37, 41, 0) 70%),
    radial-gradient(34% 30% at 64% 62%, rgba(33, 37, 41, 0.14), rgba(33, 37, 41, 0) 70%),
    radial-gradient(46% 40% at 16% 14%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%),
    radial-gradient(38% 34% at 80% 92%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #F4F5F7 0%, #E9ECEF 45%, #D3D7DB 100%);
  /* Blurred once and kept still, so scrolling and animations never re-blur the whole page */
  filter: blur(70px) saturate(1.4);
}
/* The frosted pane: a milky veil, a soft top light and a fine grain over the blurred shapes */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: rgba(233, 236, 239, 0.22);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 45%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:lang(ar) body, [lang="ar"] body { font-family: var(--font-ar); line-height: 1.85; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }

::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.875rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* Editorial emphasis: a lighter weight in a quieter tone */
em {
  font-style: normal;
  font-weight: 300;
  color: var(--ink-3);
}
[lang="ar"] em {
  font-family: var(--font-ar);
  font-weight: 400;
}

.pending { color: var(--ink-3); }

/* ==========================================================================
   Language picker (before the site opens)
   ========================================================================== */
.lang-gate { display: none; }
.gate body { overflow: hidden; }
.gate .lang-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(233, 236, 239, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  transition: opacity 0.45s var(--ease);
}
.gate-out .lang-gate { opacity: 0; }
.lang-gate__card {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(100%, 420px);
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 #fff, 0 40px 80px -40px rgba(33, 37, 41, 0.45);
}
.lang-gate__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  color: #F7F6F4;
  background: linear-gradient(180deg, #34332F, #141413);
}
.lang-gate__mark svg { width: auto; height: 34px; }
.lang-gate__title { display: grid; gap: 4px; margin: 0; font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.lang-gate__title [lang="ar"] { font-family: var(--font-ar); letter-spacing: 0; font-size: 1.25rem; color: var(--ink-2); }
.lang-gate__options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.lang-gate__btn {
  height: 52px;
  border-radius: 14px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(33, 37, 41, 0.1);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease-out);
}
.lang-gate__btn[lang="en"] { font-family: var(--font-display); }
.lang-gate__btn[lang="ar"] { font-family: var(--font-ar); }
.lang-gate__btn:hover,
.lang-gate__btn:focus-visible { color: #F7F6F4; background: #212529; }
.lang-gate__btn:active { transform: scale(0.97); }
@media (prefers-reduced-motion: no-preference) {
  .gate .lang-gate__card { animation: card-in 0.8s var(--ease-out) both; }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 16px;
  inset-inline: 0;
  z-index: 50;
  padding-inline: var(--gutter); /* same side margins as .container, so the bar lines up with the content */
  pointer-events: none;
}
.nav__bar {
  position: relative;
  pointer-events: auto;
  max-width: calc(var(--max) - 2 * var(--gutter));
  height: var(--nav-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.22));
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), background-color 0.4s var(--ease);
}
.nav.is-scrolled .nav__bar { background-color: var(--glass-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), var(--shadow-md); }

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  gap: 12px;
  padding-inline-end: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.015em;
  border-radius: 16px;
}
[lang="ar"] .nav__brand { font-family: var(--font-ar); letter-spacing: 0; }
.nav__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(180deg, #34332F, #141413);
  color: #F7F6F4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px -10px rgba(20, 20, 19, 0.6);
}
.nav__mark .md-mark { width: auto; height: 24px; }

.nav__links { display: none; }
.nav__links a {
  position: relative;
  display: inline-block;
  padding: 10px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 12px;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 4px 12px -6px rgba(20, 20, 19, 0.25);
}

.nav__actions { display: flex; align-items: center; gap: 10px; }

/* Language switch — always laid out LTR so EN is left, ع right */
.lang-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 48px;
  padding: 4px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.07);
  isolation: isolate;
}
.lang-switch__opt {
  position: relative;
  z-index: 1;
  min-width: 44px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 40px;
  color: var(--ink-3);
  transition: color 0.3s var(--ease);
}
.lang-switch__opt[data-lang="en"] { font-family: var(--font-display); letter-spacing: 0.04em; }
.lang-switch__opt[data-lang="ar"] { font-family: var(--font-ar); font-size: 1rem; }
.lang-switch__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 11px;
  background: linear-gradient(180deg, #34332F, #141413);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 10px -4px rgba(20, 20, 19, 0.5);
  transition: transform 0.45s var(--ease-out);
}
html[lang="en"] .lang-switch__opt[data-lang="en"],
html[lang="ar"] .lang-switch__opt[data-lang="ar"] { color: var(--bg); }
html[lang="ar"] .lang-switch__thumb { transform: translateX(100%); }

.nav__menu {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding-inline: 18px 16px;
  border-radius: 15px;
  background: linear-gradient(180deg, #34332F, #141413);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav__menu-icon { display: grid; gap: 4px; width: 14px; }
.nav__menu-icon i { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 0.35s var(--ease); }
.nav__menu[aria-expanded="true"] .nav__menu-icon i:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav__menu[aria-expanded="true"] .nav__menu-icon i:last-child { transform: translateY(-2.75px) rotate(-45deg); }

/* Mobile dropdown panel */
@media (max-width: 859.98px) {
  .nav__links.is-open {
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    padding: 10px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-edge);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    animation: drop 0.35s var(--ease-out);
  }
  .nav__links.is-open a {
    display: block;
    padding: 14px 18px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink);
  }
  [lang="ar"] .nav__links.is-open a { font-family: var(--font-ar); letter-spacing: 0; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (min-width: 860px) {
  .nav__links { display: block; }
  .nav__links ul { display: flex; gap: 2px; }
  .nav__menu { display: none; }
  [lang="ar"] .nav__links a { font-size: 1rem; }
}

/* ==========================================================================
   Hero — bilingual name flanking the portrait
   ========================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 48px) 0 clamp(40px, 8vh, 80px);
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Liquid-glass ribbons ---------- */
.hero__ribbons { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ribbon {
  position: absolute;
  inset-inline-start: -25%;
  width: 150%;
  padding-block: clamp(10px, 1.2vw, 16px);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.2) 55%, rgba(255, 255, 255, 0.38));
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  border-block: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(20, 20, 19, 0.05),
    0 18px 40px -26px rgba(20, 20, 19, 0.35);
}
.ribbon--a { top: 38%; rotate: 11deg; }
.ribbon--b { top: 47%; rotate: -21deg; }
[dir="rtl"] .ribbon--a { rotate: -11deg; }
[dir="rtl"] .ribbon--b { rotate: 21deg; }
/* Ribbon C: Adobe apps only, a gentle tilt through the name */
.ribbon--c { top: 57%; rotate: -4deg; }
[dir="rtl"] .ribbon--c { rotate: 4deg; }
/* Ribbons are dir="ltr" (for the marquee), so mirror their offset explicitly in Arabic */
html[dir="rtl"] .ribbon { inset-inline-start: auto; right: -25%; }
.ribbon__track { display: flex; width: max-content; }
.ribbon__group { display: flex; flex: none; align-items: center; }
.ribbon__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline: clamp(16px, 1.8vw, 26px);
  font-family: var(--font-display);
  font-size: clamp(0.875rem, 1.2vw, 1.0625rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--ink-2);
}
.ribbon__item img { width: 22px; height: 22px; object-fit: contain; }

/* ---------- Editing timeline on the portrait's bottom edge (Premiere / After Effects, empty, in frosted glass) ---------- */
.hero__band {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 6; /* above the portrait */
  overflow: hidden;
  padding-block: 4px 5px;
  /* Thin empty V1 and A1 lanes under the ruler */
  background:
    linear-gradient(rgba(33, 37, 41, 0.06), rgba(33, 37, 41, 0.06)) 0 24px / 100% 9px no-repeat,
    linear-gradient(rgba(33, 37, 41, 0.06), rgba(33, 37, 41, 0.06)) 0 35px / 100% 7px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(233, 236, 239, 0.38));
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 -14px 32px -22px rgba(33, 37, 41, 0.45);
  pointer-events: none;
}
.hero__band-track { display: flex; width: max-content; padding-inline-start: 44px; }
.hero__band-group { display: flex; flex: none; }
.tl__seg { display: grid; grid-template-rows: 18px 9px 7px; row-gap: 2px; }
/* Ruler: small ticks every 10px, tall ticks every 50px, timecode at each clip start */
.tl__tc {
  padding: 1px 0 0 4px;
  font: 500 10px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  color: rgba(33, 37, 41, 0.55);
  background:
    linear-gradient(rgba(33, 37, 41, 0.45), rgba(33, 37, 41, 0.45)) left bottom / 1px 12px no-repeat,
    repeating-linear-gradient(90deg, rgba(33, 37, 41, 0.3) 0 1px, transparent 1px 50px) left bottom / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, rgba(33, 37, 41, 0.16) 0 1px, transparent 1px 10px) left bottom / 100% 4px no-repeat;
}
/* Fixed track headers and playhead */
.tl__heads {
  position: absolute;
  inset-block: 0;
  left: 0;
  z-index: 2;
  display: grid;
  grid-template-rows: 18px 9px 7px;
  row-gap: 2px;
  width: 40px;
  padding-block: 4px 5px;
  background: rgba(248, 249, 250, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(33, 37, 41, 0.1);
  font: 600 8px/1 var(--font-display);
  color: rgba(33, 37, 41, 0.6);
}
.tl__heads span { display: grid; place-items: center; }
.tl__heads span:first-child { grid-row: 2; }
.tl__heads span:last-child { grid-row: 3; }
.tl__playhead { position: absolute; top: 0; bottom: 0; left: 38%; z-index: 3; width: 1px; background: #212529; }
.tl__playhead::before {
  content: "";
  position: absolute;
  top: 3px;
  left: -6px;
  width: 13px;
  height: 14px;
  background: #212529;
  clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__band-group { animation: marquee 50s linear infinite; }
  [dir="rtl"] .hero__band-group { animation-direction: reverse; }
}

/* ---------- Text column ---------- */
.hero__stage { position: relative; z-index: 3; }
/* Text sits on a frosted-glass card; the ribbons blur as they pass behind it */
.hero__text {
  display: grid;
  justify-items: start;
  max-width: 640px;
  padding: clamp(24px, 3.2vw, 48px);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.06) 60%, rgba(255, 255, 255, 0.14));
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(33, 37, 41, 0.04),
    0 30px 60px -40px rgba(33, 37, 41, 0.3);
}

.hero__name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 15vw, 6rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.05em;
}
[lang="ar"] .hero__name { font-family: var(--font-ar); line-height: 1.2; letter-spacing: 0; }
.hero__line { align-self: flex-start; }

.hero__role {
  margin-top: clamp(14px, 1.6vw, 22px);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
[lang="en"] .hero__role { text-transform: lowercase; }
[lang="ar"] .hero__role { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.4; }

/* Primary action: dark liquid glass */
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
  padding: 12px 24px 12px 12px;
  border-radius: 16px;
  color: #F7F6F4;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(52, 51, 48, 0.94), rgba(18, 18, 17, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 14px 30px -14px rgba(20, 20, 19, 0.6);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
[dir="rtl"] .hero__cta { padding: 12px 12px 12px 24px; }
.hero__cta:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -1px 0 rgba(0, 0, 0, 0.4), 0 20px 36px -14px rgba(20, 20, 19, 0.6); }
.hero__cta-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
}
.hero__cta-icon img { width: 16px; height: 16px; }
/* Meeting button plus quick WhatsApp and email buttons beside it */
.hero__ctas { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: clamp(32px, 4vw, 48px); }
.hero__ctas .hero__cta { margin-top: 0; }
.hero__quick {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 16px;
  color: #F7F6F4;
  background: linear-gradient(180deg, rgba(52, 51, 48, 0.94), rgba(18, 18, 17, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -1px 0 rgba(0, 0, 0, 0.4), 0 14px 30px -14px rgba(20, 20, 19, 0.6);
  transition: transform 0.4s var(--ease-out), background 0.3s;
}
.hero__quick svg { width: 24px; height: 24px; }
.hero__quick:hover { transform: translateY(-2px); }
.hero__quick--wa:hover { background: #25D366; }
.hero__quick:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.hero__tagline {
  margin-top: clamp(32px, 4vw, 48px);
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
[lang="ar"] .hero__tagline { font-family: var(--font-ar); letter-spacing: 0; font-size: 1rem; }

.hero__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  margin-top: 16px;
}
.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-block: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.hero__link:hover { color: var(--ink); border-color: var(--ink); }
.hero__link--primary { color: var(--ink); border-color: var(--ink); }
.hero__link svg { width: 16px; height: 16px; transform: scaleX(var(--flip)); transition: translate 0.3s var(--ease-out); }
.hero__link:hover svg { translate: calc(3px * var(--flip)) 0; }

/* ---------- Cut-out portrait (static, no effects) ---------- */
.hero__photo {
  position: relative;
  /* In front of the ribbons and the text card; only the services band sits above it */
  z-index: 5;
  margin: 0;
}
.hero__photo img {
  display: block;
  width: 100%;
  height: auto;
  /* No fade: the portrait ends on a clean edge at the bottom of the hero */
}

/* Mobile: portrait sits under the text, bleeding to the section bottom */
@media (max-width: 899.98px) {
  .hero { flex-direction: column; align-items: stretch; padding-bottom: 0; }
  .hero__photo { width: min(100%, 520px); align-self: center; margin-top: 32px; }
  /* Both ribbons cross behind the head and shoulders, above the shirt's fade */
  .ribbon--a { top: 66%; rotate: 11deg; }
  .ribbon--b { top: 75%; rotate: -10deg; }
  [dir="rtl"] .ribbon--a { rotate: -11deg; }
  [dir="rtl"] .ribbon--b { rotate: 10deg; }
}

@media (min-width: 900px) {
  /* All three ribbons fan out from one point just past "senior visual artist" (39% across, 53% down)
     and run edge to edge: centred on that point (-61% + 200% / 2 = 39%) and long enough to reach both sides. */
  .ribbon {
    inset-inline-start: calc(-50% - 217px * var(--hs, 1));
    width: 200%;
    top: calc(100% - 446px * var(--hs, 1) - 31px);
  }
  .ribbon--a { rotate: 20deg; }
  .ribbon--b { rotate: -20deg; }
  .ribbon--c { rotate: -3deg; }
  html[dir="rtl"] .ribbon { inset-inline-start: auto; right: calc(-50% - 217px * var(--hs, 1)); }
  html[dir="rtl"] .ribbon--a { rotate: -20deg; }
  html[dir="rtl"] .ribbon--b { rotate: 20deg; }
  html[dir="rtl"] .ribbon--c { rotate: 3deg; }
  /* Fixed sizes inside the card: the whole card is scaled by zoom instead */
  .hero__name { font-size: 136px; }
  .hero__text { padding: 48px; }
  .hero__role { margin-top: 22px; font-size: 44px; }
  .hero__ctas, .hero__tagline { margin-top: 48px; }
  /* Card and portrait placed as in a 1920 x 955 window, then scaled by --hs (set in index.html) */
  /* The hero keeps the 1920 x 955 shape, so tall-narrow windows get no empty band above the card */
  .hero { min-height: calc(955px * var(--hs, 1)); padding: 0; }
  .hero__stage {
    position: absolute;
    inset-inline-start: calc(50% - 619px * var(--hs, 1));
    bottom: calc(130px * var(--hs, 1));
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
  }
  .hero__text { max-width: 720px; zoom: var(--hs, 1); }
  .hero__photo {
    position: absolute;
    bottom: 0;
    inset-inline-end: calc(50% - 645px * var(--hs, 1));
    height: calc(783px * var(--hs, 1));
    width: auto;
  }
  .hero__photo img { width: auto; height: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .ribbon__track .ribbon__group { animation: marquee 48s linear infinite; }
  .ribbon__track--reverse .ribbon__group { animation-direction: reverse; animation-duration: 56s; }
}

/* ==========================================================================
   Desktop scale — the hero is a 1920 x 955 layout scaled by --hs (window width / 1920);
   the rest of the page follows the same scale, so a laptop shows the same proportions
   as a big screen. Text never drops below 60% (--zs); the container makes up the difference.
   ========================================================================== */
@media (min-width: 900px) {
  :root { --zs: clamp(0.6, var(--hs, 1), 2); }
  main > section:not(.hero), .footer, .nav__bar { zoom: var(--zs); }
  main > section:not(.hero) .container, .footer .container { max-width: calc(var(--max) * var(--hs, 1) / var(--zs)); }
  .nav__bar { max-width: calc((var(--max) - 2 * var(--gutter)) * var(--hs, 1) / var(--zs)); }
}

/* ==========================================================================
   Showcase — best work sliding on its own under the hero
   ========================================================================== */
.showcase { padding-block: clamp(20px, 3vw, 40px) 0; overflow: hidden; }
.showcase__viewport {
  display: grid;
  gap: clamp(12px, 1.4vw, 20px);
  padding-block: clamp(8px, 1vw, 14px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.showcase__track { position: relative; display: flex; width: max-content; }
.showcase__track:hover { z-index: 2; }
.showcase__group { display: flex; gap: clamp(12px, 1.4vw, 20px); padding-inline-end: clamp(12px, 1.4vw, 20px); }
.showcase__item {
  position: relative;
  flex: none;
  height: clamp(150px, 16vw, 260px);
  aspect-ratio: var(--ar, 4 / 3);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: #e9ebee;
  cursor: pointer;
  box-shadow: 0 24px 40px -30px rgba(33, 37, 41, 0.45);
}
.showcase__item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase__item img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.6s var(--ease-out); }
.showcase__label {
  position: absolute;
  inset-inline: 10px;
  bottom: 10px;
  width: fit-content;
  max-width: calc(100% - 20px);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.3s, translate 0.3s var(--ease-out);
}
/* Hovered shot grows a little; the rows leave a bit of room above and below for it */
.showcase__item { transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.showcase__item:hover, .showcase__item:focus-visible {
  z-index: 2;
  transform: scale(1.06);
  box-shadow: 0 28px 44px -26px rgba(33, 37, 41, 0.5);
}
.showcase__item:hover .showcase__label, .showcase__item:focus-visible .showcase__label { opacity: 1; translate: 0 0; }
.showcase__item:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .showcase__group { animation: marquee 80s linear infinite; }
  .showcase__track--reverse .showcase__group { animation-direction: reverse; animation-duration: 90s; }
  .showcase__track:nth-child(3) .showcase__group { animation-duration: 100s; }
  .showcase__track:nth-child(4) .showcase__group { animation-duration: 110s; }
  .showcase__track:nth-child(5) .showcase__group { animation-duration: 70s; }
}
/* Reduced motion: no sliding, swipe through one set instead */
@media (prefers-reduced-motion: reduce) {
  .showcase__viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .showcase__group[aria-hidden] { display: none; }
}

/* ==========================================================================
   Sections — shared
   ========================================================================== */
.section { padding-block: clamp(28px, 4vw, 64px); }

.section__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(24px, 4vw, 48px);
}
.section__head:not(.section__head--split)::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section__label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
[lang="ar"] .section__label { font-family: var(--font-ar); letter-spacing: 0; text-transform: none; font-size: 1rem; }

.section__head--split {
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.section__head--split > div { display: grid; gap: 18px; justify-items: start; }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.05em;
}
[lang="ar"] .section__title { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.section__intro { max-width: 34ch; color: var(--ink-2); }

@media (min-width: 900px) {
  .section__head--split { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .section__intro { text-align: end; padding-bottom: 10px; }
}

/* ==========================================================================
   About
   ========================================================================== */

.about .section__head { margin-bottom: clamp(18px, 2.5vw, 32px); }
.about__grid { display: grid; gap: clamp(32px, 5vw, 64px); }
.about__statement {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 16ch;
  text-wrap: balance;
}
[lang="ar"] .about__statement { font-family: var(--font-ar); font-weight: 500; letter-spacing: 0; line-height: 1.35; max-width: 18ch; }
/* Fluent English note (Skills header): plain text, no capsule */
.about__lead { display: grid; }

/* ---------- Frosted glass (stats, skills, tool strips) ----------
   Mostly clear with a light sheen; soft blurred shapes behind give the blur something to frost. */
.glass {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0.12) 55%, rgba(255, 255, 255, 0.24) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(20, 20, 19, 0.05),
    0 1px 2px rgba(20, 20, 19, 0.04),
    0 24px 48px -30px rgba(20, 20, 19, 0.35);
}
.glass-stage { position: relative; isolation: isolate; }
.glass-stage::before,
.glass-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.45;
  pointer-events: none;
}
.glass-stage::before { width: min(22%, 260px); aspect-ratio: 1; inset-inline-start: 8%; top: -30%; background: #CDBBA4; }
.glass-stage::after { width: min(18%, 220px); aspect-ratio: 1; inset-inline-end: 10%; bottom: -30%; background: #A9B5A2; }

/* ---------- Stats bar ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(28px, 4vw, 48px);
}
.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: clamp(16px, 2vw, 24px) clamp(18px, 2.2vw, 28px);
}
.stat:nth-child(even) { border-inline-start: 1px solid rgba(20, 20, 19, 0.08); }
.stat:nth-child(n + 3) { border-top: 1px solid rgba(20, 20, 19, 0.08); }
/* Six cells now: on phones the countries cell pairs with "assets" in the last row */
.stat__row { flex-wrap: wrap; row-gap: 8px; }
.stat__row { display: flex; align-items: center; gap: 16px; }

.stat__num {
  display: flex;
  align-items: flex-start;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
[dir="rtl"] .stat:not(.stat--countries) .stat__num { justify-content: flex-end; }
.stat__num sup {
  margin-top: 0.06em;
  margin-left: 0.04em;
  font-size: 0.5em;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-3);
}
.stat__label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
[lang="ar"] .stat__label { letter-spacing: 0; text-transform: none; font-size: 0.875rem; }

.flag-stack { display: flex; }
.flag-stack__item {
  position: relative;
  width: 26px;
  height: 26px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 3px 8px -3px rgba(20, 20, 19, 0.35);
  transition: transform 0.35s var(--ease-out);
}
.flag-stack__item + .flag-stack__item { margin-inline-start: -7px; }
.flag-stack__item svg { display: block; width: 100%; height: 100%; }
.flag-stack__item:hover { transform: translateY(-3px); z-index: 1; }

@media (min-width: 900px) {
  .stats-bar { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.4fr); }
  .stat { border-top: 0 !important; }
  .stat + .stat { border-inline-start: 1px solid rgba(20, 20, 19, 0.08) !important; }
  .stat--countries { grid-column: auto; }
}

/* ---------- Client rating ---------- */
.rating {
  display: grid;
  gap: clamp(22px, 2.6vw, 30px);
  margin-top: clamp(28px, 4vw, 48px);
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: 28px;
}
.rating__summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; }
.rating__score {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.rating__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
[lang="ar"] .rating__label { letter-spacing: 0; text-transform: none; font-size: 0.875rem; }

.stars { display: inline-flex; gap: 3px; color: #E9A825; }
.stars .star { display: block; width: 16px; height: 16px; }
.stars svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.stars--lg { gap: 6px; }
.stars--lg .star { width: 26px; height: 26px; }
.star--part { position: relative; color: rgba(233, 168, 37, 0.25); }
.star__fill { position: absolute; inset: 0; color: #E9A825; clip-path: inset(0 50% 0 0); }
[dir="rtl"] .star__fill { clip-path: inset(0 0 0 50%); }

/* One large review at a time */
.testi { display: grid; gap: clamp(20px, 2.4vw, 28px); padding-top: clamp(22px, 2.6vw, 30px); border-top: 1px solid var(--line); }
.testi__stage { display: grid; }
.testi__slide {
  grid-area: 1 / 1;
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease-out), visibility 0s linear 0.6s;
}
.testi__slide.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.testi__quote {
  margin: 0;
  max-width: 46ch;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.testi__quote[lang="ar"] { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.7; }
.testi__slide figcaption { display: grid; gap: 2px; }
.testi__name { font-weight: 600; }
.testi__role { font-size: 0.875rem; color: var(--ink-3); }
.testi__slide[dir="rtl"] figcaption { font-family: var(--font-ar); }
.testi__bar { position: relative; width: min(220px, 60%); height: 3px; justify-self: center; overflow: hidden; border-radius: 3px; background: var(--line-strong); }
.testi__fill { position: absolute; inset: 0; border-radius: inherit; background: #212529; transform-origin: left; }
[dir="rtl"] .testi__fill { transform-origin: right; }
@media (prefers-reduced-motion: no-preference) {
  .testi__fill { animation: sc-fillx 6s linear both; }
  .rating:hover .testi__fill { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .testi__bar { display: none; } }


@media (prefers-reduced-motion: no-preference) {
  /* Stars pop in one by one when the block scrolls into view */
  .js .rating .stars--lg .star { opacity: 0; scale: 0.3; rotate: -30deg; }
  .js .rating.is-in .stars--lg .star { animation: star-pop 0.6s var(--ease-out) forwards; animation-delay: calc(0.3s + var(--i) * 130ms); }
}
@keyframes star-pop {
  60% { opacity: 1; scale: 1.25; rotate: 8deg; }
  to { opacity: 1; scale: 1; rotate: 0deg; }
}

/* ---------- Tool strips: one moving glass row per category ---------- */
.tool-strips { display: grid; gap: 12px; margin-bottom: clamp(48px, 7vw, 80px); }
.tool-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
  border-radius: 20px;
}
.tool-strip__label {
  flex: none;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
[lang="ar"] .tool-strip__label { font-size: 0.875rem; padding-block: 8px; }
.tool-strip__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.tool-strip__track { display: flex; width: max-content; }
.tool-strip__group { display: flex; flex: none; }
.tool {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
}
.tool img { width: 22px; height: 22px; object-fit: contain; }
.tool__mono {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.6875rem;
  font-weight: 700;
}

@media (min-width: 700px) {
  .tool-strip__label { min-width: 9.5rem; text-align: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .tool-strip__group { animation: marquee var(--dur, 36s) linear infinite; }
  .is-reverse .tool-strip__group { animation-direction: reverse; }
  [dir="rtl"] .tool-strip__group { animation-direction: reverse; }
  [dir="rtl"] .is-reverse .tool-strip__group { animation-direction: normal; }
}
@keyframes marquee { to { transform: translateX(-100%); } }
/* Reduced motion: no scrolling, one wrapped set of tools */
@media (prefers-reduced-motion: reduce) {
  .tool-strip { flex-wrap: wrap; }
  .tool-strip__viewport { -webkit-mask-image: none; mask-image: none; }
  .tool-strip__track { width: auto; }
  .tool-strip__group { flex-wrap: wrap; }
  .tool-strip__group[aria-hidden="true"], .tool[aria-hidden="true"] { display: none; }
}

@media (min-width: 900px) {
  .about__statement { max-width: 22ch; }
}

/* ==========================================================================
   Services — small glass cards; real work shows as a strip of shots
   ========================================================================== */
.svc-grid { display: grid; gap: clamp(10px, 1.2vw, 16px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .svc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.svc-grid .svc-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 20px;
  isolation: isolate;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.svc-tile__media {
  display: grid;
  place-items: center;
  height: clamp(110px, 10vw, 140px);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08));
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
/* The mock-ups are drawn ~440px wide; shrink them to fit the small card */
.svc-tile__media .mk { zoom: 0.4; transition: transform 0.6s var(--ease-out); }
.svc-tile__media > img { width: 100%; height: 100%; object-fit: cover; }
/* Shots from real projects, side by side */
.svc-shots { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; width: 100%; height: 100%; padding: 6px; }
.svc-shots img {
  width: 100%; height: 100%; min-width: 0;
  object-fit: cover; border-radius: 12px;
  transition: transform 0.6s var(--ease-out);
}
.svc-tile__body { display: grid; align-content: start; gap: 6px; padding: clamp(12px, 1.4vw, 18px); }
.svc-tile__work { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 4px 0 0; }
.svc-tile__work button {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: rgba(33, 37, 41, 0.25); text-underline-offset: 3px;
}
.svc-tile__work button:hover { text-decoration-color: currentColor; }
.svc-tile__work button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.svc-tile__cat {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.svc-tile__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.3vw, 1.175rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.svc-tile__desc { margin: 0; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-2); }
[lang="ar"] .svc-tile__cat { letter-spacing: 0; text-transform: none; font-size: 0.8125rem; }
[lang="ar"] .svc-tile__title { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.4; }

@media (hover: hover) {
  .svc-grid .svc-tile:hover { transform: translateY(-6px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 34px 60px -34px rgba(33, 37, 41, 0.45); }
  .svc-tile:hover .svc-tile__media .mk { transform: scale(1.06) rotate(-1deg); }
  .svc-tile:hover .svc-shots img { transform: scale(1.04); }
}
@media (prefers-reduced-motion: no-preference) {
  /* Tiles rise in with a slight scale; each preview builds itself once its tile is on screen */
  .js .svc-grid .svc-tile.reveal { transform: translateY(26px) scale(0.97); }
  .js .svc-grid .svc-tile.reveal.is-in { transform: none; }
  .js .svc-tile:not(.is-in) .mk,
  .js .svc-tile:not(.is-in) .mk * { animation-play-state: paused; }
}

/* ---------- Placeholder mock-ups (shown until a real example image is set) ---------- */
.mk { --a: #CDBBA4; --b: #A9B5A2; --c: #9FAAB6; position: relative; width: min(100%, 440px); }
.mk i, .mk b, .mk span { display: block; }

.mk-social { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-social i { aspect-ratio: 1; border-radius: 10px; background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--line); }
.mk-social i:nth-child(1) { background: var(--a); }
.mk-social i:nth-child(3) { background: var(--ink); }
.mk-social i:nth-child(5) { background: var(--b); }
.mk-social i:nth-child(6) { background: var(--c); }

.mk-brand { display: grid; justify-items: center; gap: 18px; }
.mk-brand__mark { width: 120px; aspect-ratio: 1; border-radius: 32px; background: var(--ink); box-shadow: inset 0 0 0 18px var(--bg), inset 0 0 0 24px var(--ink); }
.mk-brand__type { font-family: var(--font-display); font-size: 3rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.mk .mk-brand__sw { display: flex; gap: 8px; }
.mk-brand__sw i { width: 44px; height: 44px; border-radius: 12px; }
.mk-brand__sw i:nth-child(1) { background: var(--ink); }
.mk-brand__sw i:nth-child(2) { background: var(--a); }
.mk-brand__sw i:nth-child(3) { background: var(--b); }
.mk-brand__sw i:nth-child(4) { background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--line-strong); }

.mk-video { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #2A2927; }
.mk-video__play { position: relative; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
.mk-video__play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 18px solid #2A2927; border-block: 11px solid transparent; translate: 3px 0; }
.mk .mk-video__bar { position: absolute; inset-inline: 16px; bottom: 16px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); }
.mk-video__bar i { height: 100%; width: 40%; border-radius: inherit; background: #fff; }

.mk-motion { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: var(--bg-deep); }
.mk-motion i { position: absolute; border-radius: 50%; }
.mk-motion i:nth-child(1) { width: 34%; aspect-ratio: 1; left: 12%; top: 20%; background: var(--a); }
.mk-motion i:nth-child(2) { width: 22%; aspect-ratio: 1; left: 48%; top: 44%; background: var(--ink); border-radius: 22%; }
.mk-motion i:nth-child(3) { width: 16%; aspect-ratio: 1; left: 72%; top: 18%; background: var(--b); }

.mk-podcast { display: grid; gap: 16px; }
.mk .mk-podcast__cams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-podcast__cams i { aspect-ratio: 4 / 3; border-radius: 14px; background: #2A2927; }
.mk-podcast__cams i:last-child { background: #3A3835; }
.mk .mk-podcast__wave { display: flex; align-items: center; gap: 4px; height: 48px; }
.mk-podcast__wave i { flex: 1; height: 30%; border-radius: 3px; background: var(--ink); }

.mk-print { aspect-ratio: 4 / 3; }
.mk-print__flyer { position: absolute; left: 10%; top: 0; width: 48%; aspect-ratio: 3 / 4; border-radius: 6px; background: var(--a); rotate: -6deg; box-shadow: 0 16px 30px -18px rgba(20, 20, 19, 0.5); }
.mk-print__card { position: absolute; right: 8%; bottom: 8%; width: 46%; aspect-ratio: 1.75; border-radius: 8px; background: var(--ink); rotate: 5deg; box-shadow: 0 16px 30px -14px rgba(20, 20, 19, 0.6); }

.mk-docs { display: grid; grid-template-rows: auto 1fr; gap: 10%; aspect-ratio: 16 / 9; padding: 9% 8%; border-radius: 12px; background: #FBFAF8; box-shadow: inset 0 0 0 1px var(--line), 0 18px 36px -24px rgba(20, 20, 19, 0.45); }
.mk-docs__title { width: 55%; height: 14px; border-radius: 4px; background: var(--ink); }
.mk .mk-docs__chart { display: flex; align-items: flex-end; gap: 6%; }
.mk-docs__chart i { flex: 1; border-radius: 4px 4px 0 0; background: var(--c); }
.mk-docs__chart i:nth-child(1) { height: 35%; }
.mk-docs__chart i:nth-child(2) { height: 55%; }
.mk-docs__chart i:nth-child(3) { height: 45%; }
.mk-docs__chart i:nth-child(4) { height: 75%; background: var(--ink); }
.mk-docs__chart i:nth-child(5) { height: 90%; }

.mk-ads { display: grid; align-content: end; gap: 10px; width: min(100%, 300px); aspect-ratio: 1; padding: 12%; border-radius: 16px; background: var(--a); }
.mk-ads__line { height: 16px; border-radius: 4px; background: var(--ink); }
.mk-ads__line--short { width: 60%; }
.mk-ads__cta { width: 46%; height: 36px; margin-top: 8px; border-radius: 10px; background: #fff; }

.mk-game { display: grid; grid-template-rows: 1fr auto auto; gap: 14px; width: min(100%, 300px); aspect-ratio: 3 / 4; padding: 10%; border-radius: 20px; background: #2A2927; }
.mk-game__hero { border-radius: 50% 50% 16px 16px; background: var(--b); }
.mk-game__hp { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.15); }
.mk-game__hp i { height: 100%; width: 72%; border-radius: inherit; background: #E9A825; }
.mk .mk-game__slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mk-game__slots i { aspect-ratio: 1; border-radius: 10px; background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }

/* Email: a newsletter in an inbox */
.mk-email { display: grid; gap: 10px; width: min(100%, 300px); padding: 16px; border-radius: 14px; background: #FBFAF8; box-shadow: inset 0 0 0 1px var(--line), 0 18px 36px -24px rgba(20, 20, 19, 0.45); }
.mk .mk-email__top { display: flex; align-items: center; gap: 8px; }
.mk-email__top i { width: 22px; height: 22px; border-radius: 7px; background: var(--ink); }
.mk-email__top b { width: 40%; height: 8px; border-radius: 4px; background: var(--bg-deep); }
.mk-email__hero { aspect-ratio: 16 / 7; border-radius: 10px; background: var(--a); }
.mk-email__line { height: 9px; border-radius: 4px; background: var(--bg-deep); }
.mk-email__line--short { width: 65%; }
.mk-email__cta { width: 42%; height: 28px; margin-top: 4px; border-radius: 8px; background: var(--ink); }

/* Editorial: an open magazine / book spread */
.mk-book { display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 380px); aspect-ratio: 1.45; perspective: 800px; filter: drop-shadow(0 18px 24px rgba(20, 20, 19, 0.22)); }
.mk .mk-book__page { display: grid; align-content: start; gap: 7px; padding: 14px; background: #FBFAF8; }
.mk-book__page:first-child { border-radius: 8px 2px 2px 8px; rotate: y 8deg; transform-origin: right; box-shadow: inset -12px 0 18px -14px rgba(20, 20, 19, 0.35); }
.mk-book__page:last-child { border-radius: 2px 8px 8px 2px; rotate: y -8deg; transform-origin: left; box-shadow: inset 12px 0 18px -14px rgba(20, 20, 19, 0.35); }
.mk-book__page i { height: 6px; border-radius: 3px; background: var(--bg-deep); }
.mk-book__page .mk-book__img { height: auto; aspect-ratio: 4 / 3; border-radius: 4px; background: var(--b); }
.mk-book__head { width: 75%; height: 14px; border-radius: 3px; background: var(--ink); margin-bottom: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .mk-motion i { animation: mk-float 4s ease-in-out infinite alternate; }
  .mk-motion i:nth-child(2) { animation-duration: 3.2s; animation-direction: alternate-reverse; }
  .mk-motion i:nth-child(3) { animation-duration: 5s; }
  /* Bars and progress move with transforms only, so they never trigger layout */
  .mk-podcast__wave i { height: 100%; transform: scaleY(0.3); animation: mk-eq 1.1s ease-in-out infinite alternate; }
  .mk-podcast__wave i:nth-child(3n) { animation-delay: -0.4s; }
  .mk-podcast__wave i:nth-child(3n + 1) { animation-delay: -0.8s; }
  .mk-podcast__wave i:nth-child(4n) { animation-duration: 0.8s; }
  .mk-video__bar i { width: 100%; transform: scaleX(0.4); transform-origin: left; animation: mk-progress 5s linear infinite; }
  [dir="rtl"] .mk-video__bar i { transform-origin: right; }
}
@keyframes mk-float { to { transform: translate(14%, -10%) rotate(20deg); } }
@keyframes mk-eq { from { transform: scaleY(0.18); } to { transform: none; } }
@keyframes mk-progress { from { transform: scaleX(0); } to { transform: none; } }

/* ==========================================================================
   Service details popup — opens from a service tile
   ========================================================================== */
.modal-open,
.modal-open body { overflow: hidden; }

.svc-grid .svc-tile { cursor: pointer; }
.svc-grid .svc-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.svc-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  color: var(--ink);
  background: transparent;
}
.svc-modal[open] { display: grid; place-items: center; }
.svc-modal::backdrop {
  background: rgba(233, 236, 239, 0.45);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
.svc-modal__card {
  position: relative;
  display: flex;
  width: min(1120px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.58));
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  backdrop-filter: blur(30px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 #fff, 0 50px 100px -40px rgba(33, 37, 41, 0.5);
}
.svc-modal__scroll { flex: 1; overflow: auto; overscroll-behavior: contain; }
.svc-modal__body {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(14px, 2.2vw, 28px);
  transition: opacity 0.18s var(--ease);
}
.svc-modal.is-swapping .svc-modal__body { opacity: 0; }
.folder { cursor: pointer; }
@media (min-width: 900px) {
  .svc-modal__body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .svc-modal__show { position: sticky; top: 0; }
}
.svc-modal__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 16px -10px rgba(33, 37, 41, 0.5);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.svc-modal__close svg { width: 20px; height: 20px; }
.svc-modal__close:hover { color: #F8F9FA; background: #212529; }

/* Example stage + tabs */
.svc-modal__show { display: grid; gap: 14px; }
.svc-modal__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  container-type: inline-size;
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, #F1F3F5, #DEE2E6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(20, 20, 19, 0.05);
}
.svc-modal__stage > img,
.svc-modal__stage > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-modal__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.svc-modal__tab {
  display: grid;
  gap: 8px;
  padding: 4px 0;
  text-align: start;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-3);
  transition: color 0.25s var(--ease);
}
.svc-modal__tab[aria-selected="true"],
.svc-modal__tab:hover { color: var(--ink); }
.svc-modal__track { position: relative; display: block; height: 2px; overflow: hidden; border-radius: 2px; background: var(--line-strong); }
.svc-modal__fill { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .svc-modal__fill { transform-origin: right; }
.svc-modal__tab[aria-selected="true"] .svc-modal__fill { transform: none; }

/* Info column */
.svc-modal__info { display: grid; align-content: start; gap: 22px; padding-block: 6px; }
.svc-modal__head { display: grid; gap: 10px; padding-inline-end: 52px; }
.svc-modal__cat,
.svc-modal__block h3 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.svc-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.svc-modal__about { margin: 0; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); }
.svc-modal__block { display: grid; align-content: start; gap: 10px; }
.svc-modal__list { display: grid; margin: 0; padding: 0; list-style: none; }
.svc-modal__list li { display: flex; align-items: center; gap: 12px; padding-block: 11px; border-top: 1px solid var(--line); font-weight: 500; }
.svc-modal__list svg { flex: none; width: 18px; height: 18px; }
.svc-modal__meta { display: grid; gap: 22px; }
@media (min-width: 600px) { .svc-modal__meta { grid-template-columns: auto 1fr; gap: 32px; } }
.svc-modal__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-modal__tools span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px -10px rgba(33, 37, 41, 0.5);
}
.svc-modal__tools img { width: 22px; height: 22px; object-fit: contain; }
.svc-modal__formats { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); }
.svc-modal__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.svc-modal__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding-inline: 20px;
  border-radius: 16px;
  font-weight: 600;
  color: #F8F9FA;
  background: #212529;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 14px 28px -16px rgba(33, 37, 41, 0.8);
  transition: transform 0.3s var(--ease-out);
}
.svc-modal__cta:hover { transform: translateY(-2px); }
.svc-modal__cta svg,
.svc-modal__nav svg { width: 18px; height: 18px; transform: scaleX(var(--flip)); }
.svc-modal__nav { display: flex; gap: 8px; }
.svc-modal__nav button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.svc-modal__nav button:hover { color: #F8F9FA; background: #212529; }
[lang="ar"] .svc-modal__cat,
[lang="ar"] .svc-modal__block h3 { letter-spacing: 0; text-transform: none; font-size: 0.875rem; }
[lang="ar"] .svc-modal__title { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.35; }

@media (prefers-reduced-motion: no-preference) {
  .svc-modal[open] .svc-modal__card { animation: svc-modal-in 0.55s var(--ease-out) both; }
  .svc-modal[open]::backdrop { animation: svc-fade-in 0.4s var(--ease) both; }
  .svc-modal.is-closing .svc-modal__card { animation: svc-modal-out 0.22s var(--ease) both; }
  .svc-modal.is-closing::backdrop { animation: svc-fade-out 0.22s var(--ease) both; }
  .svc-modal__tab[aria-selected="true"] .svc-modal__fill { animation: sc-fillx 6s linear both; }
  .svc-modal__show:hover .svc-modal__fill { animation-play-state: paused; }
}
/* ==========================================================================
   Project case study popup — opens from a project folder
   Reuses the service popup shell (.svc-modal), one long scrolling column
   ========================================================================== */
.cs-modal .svc-modal__card {
  width: min(1080px, 100%);
  /* Solid card: a frosted pane over a long scrolling story costs too much per frame */
  background: #F6F7F8;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
/* No scroll anchoring in the story: stages assembling and images arriving made the browser pull the view back up mid-scroll */
.cs-modal .svc-modal__scroll { overflow-anchor: none; }
.cs-modal::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(33, 37, 41, 0.35); }
/* While a popup is open, the page underneath holds still so it is not repainted on every frame */
.modal-open body > :not(dialog),
.modal-open body > :not(dialog) * { animation-play-state: paused !important; }
/* The case study fills the view, so the page under it is hidden rather than composited under every scroll frame */
.cs-open body > :not(dialog) { visibility: hidden; }
/* Sections scrolled out of view hold their looping motion until they come back */
.is-offscreen,
.is-offscreen * { animation-play-state: paused !important; }
.cs-modal .svc-modal__body { display: block; padding: clamp(16px, 3.4vw, 48px); }
.cs { display: grid; gap: clamp(36px, 5vw, 64px); }

.cs__head { display: grid; gap: 16px; max-width: 760px; padding-inline-end: 52px; }
.cs__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cs__meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-inline-end: 18px; vertical-align: middle; border-radius: 50%; background: currentColor; opacity: 0.5; }
.cs__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.4vw, 4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.cs__lede { margin: 0; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--ink-2); }

/* Cover: an image or video, or three tone sheets that fan out */
.cs__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, #F1F3F5, #DEE2E6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 30px 60px -40px rgba(33, 37, 41, 0.5);
}
.cs__cover > img,
.cs__cover > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-cover-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.cs-cover-ph__sheet {
  grid-area: 1 / 1;
  display: grid;
  place-items: end start;
  width: 34%;
  aspect-ratio: 4 / 5;
  padding: 4%;
  border-radius: 14px;
  color: var(--tone-ink);
  background: var(--tone);
  box-shadow: 0 30px 50px -28px rgba(20, 20, 19, 0.55);
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg));
}
.cs-cover-ph__sheet b { font-size: clamp(0.625rem, 1.1vw, 0.8125rem); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.cs-cover-ph__sheet:nth-child(1) { --x: -62%; --y: 6%; --r: -9deg; }
.cs-cover-ph__sheet:nth-child(2) { --y: -4%; z-index: 1; }
.cs-cover-ph__sheet:nth-child(3) { --x: 62%; --y: 6%; --r: 9deg; }
.cs-cover-ph em {
  position: absolute;
  inset-inline-start: 22px;
  bottom: 18px;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Facts */
.cs__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 0; }
.cs__facts > div { display: grid; align-content: start; gap: 8px; padding: 18px 20px 18px 0; border-top: 1px solid var(--line-strong); }
[dir="rtl"] .cs__facts > div { padding: 18px 0 18px 20px; }
.cs__facts dt,
.cs__label { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cs__facts dd { margin: 0; font-weight: 600; line-height: 1.45; }

/* Challenge / approach / solution */
.cs__story { display: grid; gap: clamp(24px, 3vw, 40px); }
@media (min-width: 760px) { .cs__story { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cs__step { display: grid; align-content: start; gap: 10px; }
.cs__num { font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; color: var(--ink-3); }
.cs__step h3 { margin: 0; font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.cs__step p { margin: 0; line-height: 1.65; color: var(--ink-2); }

/* Process cover: steps cross-fade, with the step names along the bottom */
.cs-frames { position: absolute; inset: 0; background: #E9E8E3; }
.cs-frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s var(--ease); }
.cs-frames img.is-on { opacity: 1; }
.cs-frames__steps {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin: 0;
  padding: 28px 16px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-3);
  background: linear-gradient(to top, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
}
.cs-frames__steps span { transition: color 0.4s var(--ease); }
.cs-frames__steps span.is-on { color: var(--ink); }
.cs-frames__steps b { font-family: var(--font-display); }

/* Gallery: wide shots span the row, halves sit in pairs, thirds in threes */
.cs__gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); }
.cs__shot { position: relative; display: grid; align-content: start; gap: 10px; margin: 0; }
.cs__shot--wide { grid-column: 1 / -1; }
.cs__shot--half { grid-column: span 3; }
.cs__shot--third { grid-column: span 2; }
.cs__shot > img,
.cs__shot > video,
.cs__shot > .cs-ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; }
.cs__shot--half > img,
.cs__shot--half > video,
.cs__shot--half > .cs-ph,
.cs__shot--third > .cs-ph { aspect-ratio: 4 / 5; }
.cs__shot[style] > img,
.cs__shot[style] > video { aspect-ratio: var(--ratio); }
/* Cut-out assets sit whole on a soft panel */
.cs__shot--contain > img {
  object-fit: contain;
  padding: 7%;
  background:
    radial-gradient(70% 70% at 50% 40%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #F1F3F5, #DEE2E6);
}
@media (max-width: 599px) { .cs__shot--half { grid-column: 1 / -1; } }
.cs__shot figcaption { font-size: 0.875rem; color: var(--ink-3); }
.cs-ph {
  position: relative;
  display: grid;
  place-items: end start;
  padding: 18px 20px;
  overflow: hidden;
  color: var(--tone-ink);
  background: var(--tone);
}
.cs-ph span { position: relative; z-index: 1; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
/* Soft light sweeping across the placeholder */
.cs-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-100%);
}

/* Cover made of screens that rise into place */
.cs-screens { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3%; padding: 4% 6%; }
.cs-screens img { height: 100%; width: auto; min-width: 0; border-radius: 14px; box-shadow: 0 30px 50px -30px rgba(20, 20, 19, 0.6); }

/* Hero cover: launch posts on the sides, three phones in the middle, over the game's own forest */
.cs__cover--hero { aspect-ratio: 16 / 10; container-type: inline-size; background: #22180F; }
.cs-hero {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 38%, color-mix(in srgb, var(--c3) 32%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(24, 14, 6, 0.1), rgba(24, 14, 6, 0.7)),
    var(--hero-bg, none) center / cover,
    #2A1C12;
}
.cs-hero::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 12cqw rgba(10, 6, 2, 0.55); pointer-events: none; }
.cs-hero__post {
  position: absolute;
  top: 50%;
  width: 25cqw;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 1.6cqw;
  box-shadow: 0 0 0 0.35cqw rgba(255, 255, 255, 0.16), 0 3cqw 5cqw -1.5cqw rgba(0, 0, 0, 0.65);
}
.cs-hero__post--l { inset-inline-start: 16cqw; transform: translateY(-46%) rotate(-7deg); }
.cs-hero__post--r { inset-inline-end: 16cqw; transform: translateY(-54%) rotate(7deg); }
.cs-hero__phones { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; }
.cs-hero__phone {
  position: relative;
  width: 19cqw;
  margin-inline: -1.2cqw;
  padding: 0.6cqw;
  border-radius: 3cqw;
  background: #0E0E10;
  box-shadow: 0 0 0 0.12cqw rgba(255, 255, 255, 0.22), 0 4cqw 6cqw -2cqw rgba(0, 0, 0, 0.75);
  transform: translateY(5%) scale(0.92);
}
.cs-hero__phone:nth-child(2) { z-index: 1; transform: none; width: 22cqw; }
/* one screen only: it takes the middle slot between the two posts */
.cs-hero__phone:only-child { z-index: 1; transform: none; width: 22cqw; }
.cs-hero__phone img { display: block; width: 100%; aspect-ratio: 610 / 1080; object-fit: cover; border-radius: 2.4cqw; }
/* Dynamic island */
.cs-hero__phone::before { content: ""; position: absolute; top: 1.3cqw; left: 50%; width: 28%; height: 1.2cqw; border-radius: 1cqw; background: #0E0E10; transform: translateX(-50%); }
@media (max-width: 640px) {
  .cs__cover--hero { aspect-ratio: 4 / 5; }
  .cs-hero__post { top: 6cqw; width: 40cqw; }
  .cs-hero__post--l { inset-inline-start: 7cqw; transform: rotate(-6deg); }
  .cs-hero__post--r { inset-inline-end: 7cqw; transform: rotate(6deg); }
  .cs-hero__phones { align-items: flex-end; padding-bottom: 6cqw; }
  .cs-hero__phone { width: 27cqw; padding: 1cqw; border-radius: 5cqw; }
  .cs-hero__phone:nth-child(2), .cs-hero__phone:only-child { width: 31cqw; }
  .cs-hero__phone img { border-radius: 4cqw; }
  .cs-hero__phone::before { top: 2.2cqw; height: 2cqw; }
}

/* A stage used as a full-bleed cover scene */
.cs__cover > .cs-stage--scene { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; box-shadow: none; background: transparent; }
.cs-stage--scene::before { display: none; }

/* A soft panel, tinted with the project's tones, that each phone screen sits on */
.cs-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(32px, 5vw, 60px) clamp(18px, 4vw, 44px);
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(70% 55% at 50% 0%, color-mix(in srgb, var(--c3) 34%, transparent), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, color-mix(in srgb, var(--c2) 38%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--c1) 88%, #000), color-mix(in srgb, var(--c1) 55%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Story chapters */
.cs-chapters { display: grid; gap: clamp(56px, 8vw, 110px); }
.cs-ch { display: grid; gap: clamp(20px, 3vw, 32px); align-items: center; }
@media (min-width: 760px) {
  .cs-ch:not(.cs-ch--wide) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
  .cs-ch--flip .cs-ch__text { order: 2; }
}
.cs-ch__text { display: grid; align-content: start; gap: 12px; max-width: 520px; }
.cs-ch--wide .cs-ch__text { max-width: 640px; }
.cs-ch__text h3 { margin: 0; font-family: var(--font-display); font-size: clamp(1.625rem, 3vw, 2.25rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.cs-ch__text p { margin: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--ink-2); }
[lang="ar"] .cs-ch__text h3 { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.4; }
.cs-ch__media { min-width: 0; }
.cs-ch__frames { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 22px; }

/* A screen rebuilt from PSD layers */
.cs-stage,
.cs-phone {
  position: relative;
  width: min(100% - 20px, 320px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: 30px;
  background: #23331F;
  /* Phone frame: dark bezel, a hairline edge and a long soft shadow */
  box-shadow: 0 0 0 9px #0E0E10, 0 0 0 10px rgba(255, 255, 255, 0.18), 0 50px 80px -30px rgba(0, 0, 0, 0.75);
}
.cs-stage::before,
.cs-phone::before { content: ""; position: absolute; top: 10px; left: 50%; z-index: 3; width: 28%; height: 18px; border-radius: 99px; background: #0E0E10; transform: translateX(-50%); }
.cs-phone { aspect-ratio: 9 / 16; }
.cs-phone img,
.cs-stage__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-fx-soften { transform: scale(1.06); }
.cs-stage__l { position: absolute; }
.cs-stage__l img { display: block; width: 100%; height: auto; }
.cs-loop-swing { transform-origin: 50% 0; }
/* Light falling through the trees */
.cs-stage--glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 45% at 50% 12%, rgba(255, 246, 170, 0.55), rgba(255, 246, 170, 0) 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Client quote */
.cs__quote { display: grid; gap: 16px; max-width: 820px; margin: 0 auto; text-align: center; }
.cs__quote p { margin: 0; font-family: var(--font-display); font-size: clamp(1.375rem, 2.6vw, 2rem); font-weight: 500; line-height: 1.35; letter-spacing: -0.02em; text-wrap: balance; }
.cs__quote cite { font-style: normal; font-weight: 600; color: var(--ink-3); }

/* Client message as a WhatsApp-style chat card */
.cs__chat {
  width: min(560px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 24px;
  background: #EFEAE2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 30px 60px -36px rgba(33, 37, 41, 0.55);
}
.cs__chat[lang="ar"] { font-family: var(--font-ar); }
.cs__chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #F7F8FA; border-bottom: 1px solid rgba(20, 20, 19, 0.06); }
.cs__chat-av {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  background: #25D366;
}
.cs__chat-head > span:last-child { display: grid; gap: 1px; }
.cs__chat-head b { font-weight: 700; }
.cs__chat-head small { font-size: 0.8125rem; color: var(--ink-3); }
/* Wallpaper: faint dots like the chat background */
.cs__chat-body {
  display: grid;
  min-height: 150px;
  padding: 22px 18px 26px;
  background-image: radial-gradient(rgba(20, 20, 19, 0.06) 1px, transparent 1.4px);
  background-size: 14px 14px;
}
.cs__chat-typing,
.cs__chat-msg { grid-area: 1 / 1; justify-self: start; align-self: start; }
.cs__chat-typing { display: none; }
.cs__chat-msg {
  position: relative;
  max-width: 88%;
  margin: 0;
  padding: 10px 14px 12px;
  border-radius: 14px;
  border-start-start-radius: 0;
  background: #fff;
  box-shadow: 0 1px 1px rgba(20, 20, 19, 0.12);
}
/* Bubble tail on the sender's side */
.cs__chat-msg::before,
.cs__chat-typing::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: -8px;
  border-top: 10px solid #fff;
  border-inline-start: 9px solid transparent;
}
.cs__chat-msg p { margin: 0; font-size: 1.0625rem; line-height: 1.75; }

@media (prefers-reduced-motion: no-preference) {
  .cs__chat-typing {
    position: relative;
    display: flex;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    border-start-start-radius: 0;
    background: #fff;
    box-shadow: 0 1px 1px rgba(20, 20, 19, 0.12);
    opacity: 0;
  }
  .cs__chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8696A0; animation: chat-dot 1s ease-in-out infinite; }
  .cs__chat-typing i:nth-child(2) { animation-delay: 0.15s; }
  .cs__chat-typing i:nth-child(3) { animation-delay: 0.3s; }
  .cs__chat-msg { opacity: 0; }
  .cs__chat.is-in .cs__chat-typing { animation: chat-typing 1.6s var(--ease) 0.3s both; }
  .cs__chat.is-in .cs__chat-msg { animation: chat-pop 0.5s var(--ease-out) 1.8s both; transform-origin: top right; }
  [dir="ltr"] .cs__chat.is-in .cs__chat-msg { transform-origin: top left; }
}
@keyframes chat-dot { 0%, 60%, 100% { transform: none; opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes chat-typing { 0% { opacity: 0; transform: scale(0.9); } 15%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes chat-pop { from { opacity: 0; transform: scale(0.92) translateY(6px); } to { opacity: 1; transform: none; } }

/* Footer: contact + next project */
.cs__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: clamp(20px, 3vw, 32px); border-top: 1px solid var(--line-strong); }
.cs__ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.cs__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding-inline: 20px;
  border-radius: 16px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cs__live svg { width: 16px; height: 16px; transform: scaleX(var(--flip)); }
.cs__next { display: flex; align-items: center; gap: 14px; }
.cs__nextbtn { display: grid; gap: 2px; text-align: end; }
.cs__nextbtn span { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cs__nextbtn b { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; transition: opacity 0.25s var(--ease); }
.cs__nextbtn:hover b { opacity: 0.6; }
@media (max-width: 599px) { .cs__nextbtn { display: none; } }

[lang="ar"] .cs__meta,
[lang="ar"] .cs__facts dt,
[lang="ar"] .cs__label,
[lang="ar"] .cs__nextbtn span,
[lang="ar"] .cs-ph span,
[lang="ar"] .cs-cover-ph b,
[lang="ar"] .cs-cover-ph em { letter-spacing: 0; text-transform: none; }
[lang="ar"] .cs__title,
[lang="ar"] .cs__step h3,
[lang="ar"] .cs__quote p,
[lang="ar"] .cs__nextbtn b { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.4; }

@media (prefers-reduced-motion: no-preference) {
  .cs-r { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease) var(--d, 0ms), transform 0.9s var(--ease-out) var(--d, 0ms); }
  .cs-r.is-in { opacity: 1; transform: none; }
  .cs__cover.is-in .cs-cover-ph__sheet { animation: cs-sheet-in 1s var(--ease-out) both; }
  .cs__cover.is-in .cs-cover-ph__sheet:nth-child(2) { animation-delay: 0.08s; }
  .cs__cover.is-in .cs-cover-ph__sheet:nth-child(3) { animation-delay: 0.16s; }
  .cs-cover-ph__sheet { transition: transform 0.6s var(--ease-out); }
  .cs__cover:hover .cs-cover-ph__sheet:nth-child(1) { --x: -70%; --r: -13deg; }
  .cs__cover:hover .cs-cover-ph__sheet:nth-child(2) { --y: -9%; }
  .cs__cover:hover .cs-cover-ph__sheet:nth-child(3) { --x: 70%; --r: 13deg; }
  .cs-r.is-in .cs-ph::after { animation: cs-sweep 3.2s var(--ease) 0.4s infinite; }

  .cs-hero__post, .cs-hero__phone { opacity: 0; }
  .cs__cover.is-in .cs-hero__post--l { animation: cs-post-l 1.1s var(--ease-out) 0.15s both; }
  .cs__cover.is-in .cs-hero__post--r { animation: cs-post-r 1.1s var(--ease-out) 0.3s both; }
  /* translate, not transform, so the side phones keep their scale */
  .cs__cover.is-in .cs-hero__phone { animation: cs-rise-mid 1s var(--ease-out) calc(var(--i) * 130ms + 350ms) both; }
  .cs-screens img { opacity: 0; }
  .cs__cover.is-in .cs-screens img { animation: cs-rise 1s var(--ease-out) calc(var(--i) * 140ms + 150ms) both; }

  .cs-stage .cs-stage__l { opacity: 0; }
  .cs-stage.is-in .cs-stage__l { animation: cs-fade 0.8s var(--ease) var(--t) both; }
  .cs-stage.is-in .cs-a-drop { animation: cs-drop 1s var(--ease-out) var(--t) both; }
  .cs-stage.is-in .cs-a-pop { animation: cs-pop 0.7s var(--ease-out) var(--t) both; }
  .cs-stage.is-in .cs-a-rise { animation: cs-rise 0.9s var(--ease-out) var(--t) both; }
  .cs-stage.is-in .cs-a-fall { animation: cs-fall 0.7s cubic-bezier(0.5, 0, 0.75, 0) var(--t) both; }
  .cs-stage.is-in .cs-a-zoom { animation: cs-zoom 1.2s var(--ease-out) var(--t) both; }
  .cs-stage.is-in .cs-a-drive-l { animation: cs-drive-l 1.3s cubic-bezier(0.16, 1, 0.3, 1) var(--t) both; }
  .cs-stage.is-in .cs-a-drive-r { animation: cs-drive-r 1.3s cubic-bezier(0.16, 1, 0.3, 1) var(--t) both; }
  .cs-stage.is-live .cs-loop-flicker { animation: cs-flicker 3.2s steps(1, end) calc(var(--t) + 0.8s) infinite; }
  .cs-stage.is-in .cs-a-slide { animation: cs-slide 0.9s var(--ease-out) var(--t) both; }
  .cs-stage.is-live .cs-loop-swing { animation: cs-swing 3.4s ease-in-out calc(var(--t) + 1s) infinite alternate; }
  .cs-stage.is-live .cs-loop-float { animation: cs-float 2.8s ease-in-out calc(var(--t) + 0.7s) infinite alternate; }
  .cs-stage.is-live .cs-loop-pulse { animation: cs-pulse 1.1s ease-in-out calc(var(--t) + 0.9s) infinite alternate; }
  .cs-stage.is-live .cs-loop-wiggle { animation: cs-wiggle 1.6s ease-in-out calc(var(--t) + 0.8s) infinite; }
  .cs-stage.is-in .cs-fx-focus { animation: cs-focus 1.6s var(--ease-out) both; }
  .cs-stage--glow::after { opacity: 0; }
  .cs-stage--glow.is-live::after { animation: cs-glow 4s ease-in-out 1s infinite alternate; }
}
@keyframes cs-post-l { from { opacity: 0; translate: -30% 0; rotate: -10deg; } to { opacity: 1; } }
@keyframes cs-post-r { from { opacity: 0; translate: 30% 0; rotate: 10deg; } to { opacity: 1; } }
@keyframes cs-rise-mid { from { opacity: 0; translate: 0 14%; } to { opacity: 1; } }
@keyframes cs-zoom { from { opacity: 0; transform: scale(1.12); letter-spacing: 0.2em; } to { opacity: 1; transform: none; } }
@keyframes cs-drive-l { from { opacity: 0; transform: translateX(-45%); } 30% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes cs-drive-r { from { opacity: 0; transform: translateX(45%); } 30% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes cs-flicker { 0%, 100% { opacity: 1; } 8% { opacity: 0.2; } 11% { opacity: 1; } 14% { opacity: 0.4; } 17%, 60% { opacity: 1; } 62% { opacity: 0.3; } 64% { opacity: 1; } }
@keyframes cs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cs-drop { from { opacity: 0; transform: translateY(-140%); } 65% { opacity: 1; transform: translateY(5%); } to { opacity: 1; transform: none; } }
@keyframes cs-pop { from { opacity: 0; transform: scale(0.4); } 70% { opacity: 1; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes cs-rise { from { opacity: 0; transform: translateY(18%); } to { opacity: 1; transform: none; } }
@keyframes cs-fall { from { opacity: 0; transform: translateY(-700%); } 20% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes cs-slide { from { opacity: 0; transform: translateY(80%); } to { opacity: 1; transform: none; } }
@keyframes cs-swing { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
@keyframes cs-float { from { transform: none; } to { transform: translateY(-4%); } }
@keyframes cs-pulse { from { transform: none; } to { transform: scale(1.08); } }
@keyframes cs-wiggle { 0%, 100% { transform: none; } 20% { transform: rotate(-4deg); } 40% { transform: rotate(3deg); } 60% { transform: rotate(-2deg); } 80% { transform: none; } }
@keyframes cs-focus { from { filter: blur(14px); transform: scale(1.12); } to { filter: none; transform: none; } }
@keyframes cs-glow { from { opacity: 0.2; } to { opacity: 1; } }
/* Sheets rise from a neat stack into the fan */
@keyframes cs-sheet-in { from { opacity: 0; transform: translate(0, 30%) rotate(0deg); } }
@keyframes cs-sweep { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

@keyframes svc-modal-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
@keyframes svc-modal-out { to { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes svc-fade-in { from { opacity: 0; } }
@keyframes svc-fade-out { to { opacity: 0; } }

/* ---------- Animated examples (all sizes in container units of the stage) ---------- */
.sc {
  --a: #CDBBA4; --b: #A9B5A2; --c: #9FAAB6; --k: #212529; --g: #5A5E63; --p: #FBFAF8; --d: var(--bg-deep);
  --cy: 6s;
  --sh: 0 5cqw 8cqw -5cqw rgba(20, 20, 19, 0.5);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 140cqw;
}
:where(.sc) :where(i, b, span, em) { display: block; font-style: normal; }
.sc .l { flex: none; width: var(--w, 100%); height: 1.4cqw; border-radius: 1cqw; background: var(--d); }
.sc .sc-img { aspect-ratio: 16 / 10; border-radius: 1.4cqw; }
.sc .sc-av { flex: none; width: 3.4cqw; aspect-ratio: 1; border-radius: 50%; background: var(--k); }
.sc .sc-btn { width: 34%; height: 5cqw; border-radius: 1.4cqw; background: var(--k); }
.sc .sc-mark-sm { flex: none; width: 4cqw; aspect-ratio: 1; border-radius: 1.2cqw; background: var(--k); }
.sc .sc-mark { width: 12cqw; aspect-ratio: 1; border-radius: 3.4cqw; background: #fff; box-shadow: inset 0 0 0 1.8cqw var(--k), inset 0 0 0 2.6cqw #fff; }
.sc .sc-layer { position: absolute; inset: 0; }
.sc .sc-fill { height: 100%; background: #fff; transform: scaleX(0.4); transform-origin: left; }
.sc .sc-head { position: absolute; top: 0; bottom: 0; left: 35%; z-index: 2; width: 2px; margin-left: -1px; background: #fff; }
.sc .sc-head::before { content: ""; position: absolute; top: 0; left: 50%; width: 1.8cqw; height: 1.8cqw; translate: -50% 0; border-radius: 0.3cqw 0.3cqw 50% 50%; background: #fff; }
.sc .sc-on2, .sc .sc-on3, .sc .sc-half2 { opacity: 0; }
/* Colours */
.sc .ca { background: var(--a); }
.sc .cb { background: var(--b); }
.sc .cc { background: var(--c); }
.sc .ck { background: var(--k); }
.sc .cg { background: var(--g); }
.sc .cd { background: var(--d); }
.sc .cw { background: #fff; }
.sc .cf { background: rgba(255, 255, 255, 0.3); }

/* Devices */
.sc-phone { position: relative; width: 31cqw; aspect-ratio: 9 / 18.5; padding: 1cqw; border-radius: 5.4cqw; background: var(--k); box-shadow: var(--sh); }
.sc-phone .scr { position: relative; height: 100%; overflow: hidden; border-radius: 4.4cqw; background: var(--p); }
.sc-phone .sc-dark { background: #2A2927; }
.sc-win { display: grid; grid-template-rows: auto 1fr; width: 66cqw; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2.4cqw; background: var(--p); box-shadow: inset 0 0 0 1px var(--line), var(--sh); }
.sc-win__bar { display: flex; gap: 0.9cqw; padding: 1.6cqw 2cqw; border-bottom: 1px solid var(--line); }
.sc-win__bar i { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: var(--d); }
.sc-win__body { position: relative; overflow: hidden; }
.sc-screen { position: relative; width: 78cqw; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2.4cqw; background: #2A2927; box-shadow: var(--sh); }

/* Video frames */
.sc-fr i { position: absolute; }
.sc-fr--1 { background: linear-gradient(180deg, #E4D3BC, var(--a)); }
.sc-fr--1 i:nth-child(1) { right: 18%; top: 16%; width: 18%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.8); }
.sc-fr--1 i:nth-child(2) { left: -10%; bottom: -40%; width: 80%; aspect-ratio: 2; border-radius: 50%; background: #B49F86; }
.sc-fr--2 { background: linear-gradient(180deg, #C3CCD6, var(--c)); }
.sc-fr--2 i:nth-child(1) { left: 20%; bottom: 0; width: 18%; height: 55%; background: #7E8A97; }
.sc-fr--2 i:nth-child(2) { left: 44%; bottom: 0; width: 26%; height: 72%; background: #6C7884; }
.sc-fr--3 { background: linear-gradient(180deg, #CBD5C5, var(--b)); }
.sc-fr--3 i:nth-child(1) { left: 12%; top: 18%; width: 30%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.sc-fr--3 i:nth-child(2) { left: 0; right: 0; bottom: 0; height: 30%; background: #8E9C86; }

/* Social */
.sc-feed__col { display: grid; gap: 2.2cqw; padding: 2.2cqw 2.2cqw 0; }
.sc-feed__col > .sc-post:last-child { margin-bottom: 2.2cqw; }
.sc-post { display: grid; gap: 1cqw; }
.sc-post__head { display: flex; align-items: center; gap: 1cqw; }
.sc-post .sc-img { aspect-ratio: 1; }
.sc-car { display: grid; gap: 1.6cqw; width: 44cqw; padding: 2cqw; border-radius: 2.6cqw; background: var(--p); box-shadow: var(--sh); }
.sc-car__view { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 1.6cqw; }
.sc-car__track { display: flex; width: 400%; height: 100%; }
.sc-car__slide { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.2cqw; padding: 3.4cqw; }
.sc-car__slide .l { height: 2.2cqw; }
.sc-car__slide .sc-img { margin-bottom: auto; }
.sc .sc-car__orb { width: 12cqw; aspect-ratio: 1; margin-bottom: auto; border-radius: 50%; background: var(--a); }
.sc-dots { display: flex; justify-content: center; gap: 0.9cqw; }
.sc-dots i { position: relative; width: 1.3cqw; aspect-ratio: 1; border-radius: 50%; background: var(--d); }
.sc-dots b { position: absolute; inset: 0; border-radius: inherit; background: var(--k); }
.sc-story__txt { position: absolute; inset-inline: 3cqw; bottom: 7cqw; display: grid; gap: 1.2cqw; }
.sc-story__txt .l { height: 2.2cqw; }
.sc .sc-story__orb { position: absolute; left: 50%; top: 36%; width: 16cqw; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: var(--a); }
.sc .sc-story__card { position: absolute; left: 3cqw; right: 3cqw; top: 16%; aspect-ratio: 1; border-radius: 2cqw; background: rgba(255, 255, 255, 0.55); }
.sc-bars { position: absolute; top: 2.4cqw; inset-inline: 2.4cqw; z-index: 1; display: flex; gap: 0.6cqw; }
.sc-bars i { position: relative; flex: 1; height: 0.5cqw; overflow: hidden; border-radius: 1cqw; background: rgba(33, 37, 41, 0.2); }
.sc-bars b { height: 100%; background: var(--k); transform-origin: left; }
.sc-story__head { position: absolute; top: 4.4cqw; inset-inline: 2.4cqw; z-index: 1; display: flex; align-items: center; gap: 1cqw; }
.sc-story__head .sc-av { width: 3cqw; }

/* Email */
.sc-nl { display: grid; gap: 1.6cqw; padding: 3cqw 5cqw; }
.sc--newsletter { --to: -48%; }
.sc-nl__top { display: flex; align-items: center; gap: 1cqw; }
.sc-nl .sc-nl__hero { aspect-ratio: 16 / 7; }
.sc-nl .l.ck { height: 2.2cqw; }
.sc-nl__two { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; }
.sc-nl__two > span { display: grid; gap: 1cqw; }
.sc-promo { display: grid; gap: 1.6cqw; padding: 3cqw 5cqw; }
.sc-promo__hero { display: grid; gap: 1.6cqw; padding: 4cqw; border-radius: 1.6cqw; }
.sc-promo__pct { font-family: var(--font-display); font-size: 9cqw; font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: #fff; }
.sc-promo__count { display: flex; gap: 1.2cqw; }
.sc-promo__count em { padding: 1cqw 1.6cqw; border-radius: 1cqw; background: var(--d); font-family: var(--font-display); font-size: 2.6cqw; font-weight: 600; color: var(--k); }
.sc-promo .sc-btn { width: 40%; }
.sc-inbox { display: grid; }
.sc-row { display: flex; align-items: center; gap: 1.6cqw; padding: 1.8cqw 3cqw; border-bottom: 1px solid var(--line); }
.sc-row__txt { flex: 1; display: grid; gap: 0.9cqw; }
.sc-row--new { background: #fff; box-shadow: inset 0.5cqw 0 0 var(--k); }

/* Brand */
.sc-lg { display: grid; justify-items: center; gap: 4cqw; }
.sc-lg__set { display: flex; align-items: center; gap: 2.4cqw; }
.sc .sc-lg__mark { width: 14cqw; aspect-ratio: 1; border-radius: 4cqw; background: var(--k); box-shadow: inset 0 0 0 2cqw var(--p), inset 0 0 0 3cqw var(--k); }
.sc-lg__word { display: grid; gap: 1.4cqw; width: 24cqw; }
.sc-lg__word .l:first-child { height: 3cqw; }
.sc-lg__sw { display: flex; gap: 1.4cqw; }
.sc-lg__sw i { width: 7cqw; aspect-ratio: 1; border-radius: 2cqw; }
.sc-pal { display: flex; align-items: flex-end; gap: 1.6cqw; height: 52cqw; }
.sc-pal i { position: relative; width: 11cqw; height: 100%; border-radius: 2cqw; transform-origin: bottom; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.06); }
.sc-pal i:nth-child(2) { height: 84%; }
.sc-pal i:nth-child(3) { height: 70%; }
.sc-pal i:nth-child(4) { height: 58%; }
.sc-pal i:nth-child(5) { height: 46%; }
.sc-pal b { position: absolute; inset-inline: 1.6cqw; bottom: 1.6cqw; height: 1.2cqw; border-radius: 1cqw; background: rgba(255, 255, 255, 0.6); }
.sc-stat { position: relative; width: 70cqw; height: 52cqw; }
.sc-stat__letter { position: absolute; left: 6cqw; top: 0; display: grid; align-content: start; gap: 1.2cqw; width: 30cqw; aspect-ratio: 1 / 1.414; padding: 3cqw; border-radius: 1cqw; background: var(--p); box-shadow: var(--sh); rotate: -4deg; }
.sc-stat__env { position: absolute; right: 4cqw; top: 6cqw; display: flex; flex-direction: column; justify-content: space-between; width: 34cqw; aspect-ratio: 1.6; padding: 2.4cqw; border-radius: 1cqw; background: #fff; box-shadow: var(--sh); rotate: 3deg; }
.sc-stat__card { position: absolute; left: 30cqw; bottom: 0; display: grid; place-items: center; width: 24cqw; aspect-ratio: 1.75; border-radius: 1.2cqw; box-shadow: var(--sh); rotate: -2deg; }

/* Video */
.sc .sc-play { position: absolute; left: 50%; top: 50%; z-index: 1; width: 10cqw; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.sc-play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 2.8cqw solid #2A2927; border-block: 1.7cqw solid transparent; translate: 0.5cqw 0; }
.sc-player__bar { position: absolute; inset-inline: 2.4cqw; bottom: 2.4cqw; z-index: 1; display: flex; align-items: center; gap: 1.6cqw; }
.sc-player__bar > i { position: relative; flex: 1; height: 0.7cqw; overflow: hidden; border-radius: 1cqw; background: rgba(255, 255, 255, 0.3); }
.sc-reel__side { position: absolute; right: 1.6cqw; bottom: 12cqw; z-index: 1; display: grid; gap: 1.4cqw; }
.sc-reel__side i { width: 3.2cqw; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.sc-reel__cap { position: absolute; inset-inline: 2cqw; top: 56%; z-index: 1; display: grid; place-items: center; }
.sc-reel__cap em { grid-area: 1 / 1; padding: 0.6cqw 1.6cqw; border-radius: 1cqw; background: #fff; font-family: var(--font-display); font-size: 3.6cqw; font-weight: 700; color: var(--k); white-space: nowrap; }
.sc-reel__cap em:nth-child(2) { background: var(--a); }
[lang="ar"] .sc-reel__cap em { font-family: var(--font-ar); }
.sc-reel__bar { position: absolute; inset-inline: 0; bottom: 0; z-index: 1; height: 0.6cqw; background: rgba(255, 255, 255, 0.25); }
.sc-tl { display: grid; gap: 1.6cqw; width: 80cqw; padding: 1.6cqw; border-radius: 2.4cqw; background: #2A2927; box-shadow: var(--sh); }
.sc-tl__view { position: relative; justify-self: center; width: 50%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 1cqw; }
.sc-tl__tracks { position: relative; display: grid; gap: 0.8cqw; padding-block: 1cqw; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sc-tl__row { position: relative; height: 4.6cqw; border-radius: 0.8cqw; background: rgba(255, 255, 255, 0.05); }
.sc-tl__row i { position: absolute; top: 0; bottom: 0; border-radius: 0.8cqw; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.sc .sc-tl__audio { background: repeating-linear-gradient(90deg, rgba(169, 181, 162, 0.9) 0 0.4cqw, rgba(169, 181, 162, 0.35) 0.4cqw 0.8cqw); }

/* Motion */
.sc .sc-rv__disc { position: absolute; inset: 0; background: var(--k); clip-path: circle(75% at 50% 50%); }
.sc-rv { position: relative; display: flex; align-items: center; gap: 3cqw; }
.sc .sc-rv__mark { width: 14cqw; aspect-ratio: 1; border-radius: 4cqw; background: #fff; box-shadow: inset 0 0 0 2cqw var(--k), inset 0 0 0 3cqw #fff; }
.sc-rv__word { display: grid; gap: 1.4cqw; width: 26cqw; }
.sc-rv__word .l:first-child { height: 3cqw; }
.sc-kin { display: grid; justify-items: start; gap: 0.5cqw; }
.sc-kin em { font-family: var(--font-display); font-size: 11cqw; font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--k); }
.sc-kin em:nth-child(2) { color: transparent; -webkit-text-stroke: 0.25cqw var(--k); }
[lang="ar"] .sc-kin { justify-items: end; }
[lang="ar"] .sc-kin em { font-family: var(--font-ar); font-size: 9cqw; line-height: 1.35; letter-spacing: 0; }
.sc-kin__bar { width: 30cqw; height: 2cqw; margin-top: 1.4cqw; border-radius: 1cqw; }
[lang="ar"] .sc-kin__bar { transform-origin: right; }
.sc--shapes { align-content: center; gap: 3cqw; }
.sc--shapes .mk { width: 66cqw; }
.sc-shapes__cap { display: grid; gap: 1.2cqw; width: 66cqw; }
.sc-shapes__cap .l:first-child { height: 2.2cqw; }

/* Podcast */
.sc-st { display: grid; gap: 2cqw; width: 80cqw; }
.sc-st__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; }
.sc-cam { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2cqw; background: #2A2927; }
.sc-cam__head { position: absolute; left: 50%; top: 24%; width: 24%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; }
.sc-cam__body { position: absolute; left: 50%; bottom: -22%; width: 56%; aspect-ratio: 1.3; translate: -50% 0; border-radius: 50% 50% 0 0; }
.sc-cam__ring { position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 0.5cqw var(--b); }
.sc-cam__name { position: absolute; left: 1.4cqw; bottom: 1.4cqw; z-index: 1; width: 12cqw; padding: 0.8cqw; border-radius: 0.8cqw; background: rgba(0, 0, 0, 0.35); }
.sc-st__bar { display: flex; align-items: center; gap: 1.4cqw; padding: 1.4cqw 2cqw; border-radius: 1.6cqw; background: var(--p); box-shadow: var(--sh); }
.sc-rec { flex: none; width: 1.6cqw; aspect-ratio: 1; border-radius: 50%; background: #E5484D; }
.sc-mini { flex: 1; display: flex; align-items: center; gap: 0.5cqw; height: 3.4cqw; }
.sc-mini i { flex: 1; height: 100%; border-radius: 1cqw; background: var(--k); transform: scaleY(0.4); }
.sc-wv { position: relative; width: 80cqw; height: 34cqw; padding: 3cqw; border-radius: 2.4cqw; background: #2A2927; box-shadow: var(--sh); }
.sc-wv__bars { display: flex; align-items: center; gap: 0.5cqw; height: 100%; }
.sc-wv__bars i { flex: 1; height: var(--h); border-radius: 1cqw; background: var(--b); }
.sc-wv__cut { position: absolute; top: 3cqw; bottom: 3cqw; border-left: 1px dashed rgba(255, 255, 255, 0.5); }
.sc-ep { display: flex; align-items: center; gap: 4cqw; width: 80cqw; }
.sc-ep__cover { flex: none; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.4cqw; width: 32cqw; aspect-ratio: 1; padding: 3cqw; border-radius: 2.4cqw; box-shadow: var(--sh); }
.sc-ep__cover .sc-mark-sm { margin-bottom: auto; }
.sc-ep__list { flex: 1; display: grid; gap: 1.6cqw; }
.sc-ep__row { display: flex; align-items: center; gap: 2cqw; padding: 2cqw; border-radius: 1.8cqw; background: var(--p); box-shadow: inset 0 0 0 1px var(--line); }
.sc-ep__row > span { flex: 1; display: grid; gap: 1cqw; }
.sc .sc-ep__play { position: relative; flex: none; width: 5cqw; aspect-ratio: 1; border-radius: 50%; background: var(--d); }
.sc .sc-ep__play.ck { background: var(--k); }
.sc-ep__play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 1.4cqw solid #fff; border-block: 0.9cqw solid transparent; translate: 0.3cqw 0; }
.sc-ep__prog { height: 0.7cqw; overflow: hidden; border-radius: 1cqw; background: var(--d); }
.sc-ep__prog .sc-fill { background: var(--k); }

/* Print */
.sc-flip { position: relative; width: 54cqw; aspect-ratio: 1.75; transform-style: preserve-3d; }
.sc-flip__face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 2cqw; backface-visibility: hidden; box-shadow: 0 4cqw 6cqw -3cqw rgba(20, 20, 19, 0.5); }
.sc .sc-flip__back { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.4cqw; padding-inline: 5cqw; background: var(--p); transform: rotateY(180deg); }
.sc-bro { display: flex; transform-style: preserve-3d; }
.sc-bro__p { display: flex; flex-direction: column; gap: 1.2cqw; width: 22cqw; aspect-ratio: 1 / 1.6; padding: 2.4cqw; background: var(--p); box-shadow: inset 0 0 0 1px var(--line); }
.sc-bro__l { border-radius: 1.2cqw 0 0 1.2cqw; transform-origin: right; transform: rotateY(25deg); }
.sc-bro__m { box-shadow: inset 0 0 0 1px var(--line), var(--sh); }
.sc-bro__r { border-radius: 0 1.2cqw 1.2cqw 0; transform-origin: left; transform: rotateY(-25deg); }
.sc-bro .sc-img { aspect-ratio: 4 / 3; }
.sc-bro .l.ck { height: 2cqw; }
.sc-fly { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 1.4cqw; width: 36cqw; aspect-ratio: 1 / 1.414; padding: 3cqw; border-radius: 1cqw; background: var(--p); box-shadow: var(--sh); rotate: 3deg; }
.sc-fly--back { translate: -8cqw 2cqw; rotate: -9deg; }
.sc .sc-fly__img { position: relative; flex: none; aspect-ratio: 1; overflow: hidden; }
.sc-fly__img b { position: absolute; left: 20%; right: 20%; bottom: -30%; aspect-ratio: 1; border-radius: 50%; background: var(--k); }
.sc-fly .l.ck { height: 2.4cqw; }
.sc-fly__foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; }
.sc-fly__qr { width: 6cqw; aspect-ratio: 1; border-radius: 0.4cqw; background: repeating-conic-gradient(var(--k) 0 25%, transparent 0 50%) 0 0 / 1.5cqw 1.5cqw; }

/* Editorial */
.sc-book { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 72cqw; aspect-ratio: 1.45; perspective: 160cqw; }
.sc-book__pg { display: flex; flex-direction: column; gap: 1.1cqw; padding: 3cqw; background: var(--p); }
.sc-book > .sc-book__pg:first-child { border-radius: 1.4cqw 0 0 1.4cqw; box-shadow: inset -2cqw 0 2.4cqw -2cqw rgba(20, 20, 19, 0.3), var(--sh); }
.sc-book > .sc-book__pg:nth-child(2) { border-radius: 0 1.4cqw 1.4cqw 0; box-shadow: inset 2cqw 0 2.4cqw -2cqw rgba(20, 20, 19, 0.3), var(--sh); }
.sc-book__turn { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; transform-origin: left; transform-style: preserve-3d; }
.sc-book__turn .sc-book__pg { position: absolute; inset: 0; backface-visibility: hidden; }
.sc-book__front { border-radius: 0 1.4cqw 1.4cqw 0; box-shadow: inset 2cqw 0 2.4cqw -2cqw rgba(20, 20, 19, 0.3); }
.sc-book__back { border-radius: 1.4cqw 0 0 1.4cqw; box-shadow: inset -2cqw 0 2.4cqw -2cqw rgba(20, 20, 19, 0.3); transform: rotateY(180deg); }
.sc-book .sc-img { aspect-ratio: 4 / 3; }
.sc-book .l { height: 1cqw; }
.sc-book .l.ck { height: 2cqw; }
.sc-mag { position: relative; grid-area: 1 / 1; display: flex; flex-direction: column; width: 40cqw; aspect-ratio: 3 / 4; overflow: hidden; padding: 3cqw; border-radius: 1cqw; background: var(--b); box-shadow: var(--sh); }
.sc-mag--back { translate: -9cqw 1cqw; rotate: -8deg; background: var(--c); }
.sc-mag__mast { position: relative; z-index: 1; font-family: var(--font-display); font-size: 7.4cqw; font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; color: var(--k); }
[lang="ar"] .sc-mag__mast { font-family: var(--font-ar); font-size: 6.4cqw; line-height: 1.2; letter-spacing: 0; text-align: right; }
.sc-mag__fig { position: absolute; left: 50%; bottom: -6%; width: 64%; aspect-ratio: 0.78; translate: -50% 0; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: var(--k); }
.sc-mag__fig::before { content: ""; position: absolute; left: 50%; top: -34%; width: 46%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: inherit; }
.sc-mag__lines { position: relative; z-index: 1; display: grid; gap: 1cqw; width: 52%; margin-top: auto; }
.sc-mag__code { position: absolute; right: 2.4cqw; bottom: 2.4cqw; z-index: 1; width: 6cqw; height: 3cqw; background: repeating-linear-gradient(90deg, #fff 0 0.3cqw, transparent 0.3cqw 0.6cqw, #fff 0.6cqw 0.7cqw, transparent 0.7cqw 1.1cqw); }
.sc-cols { display: grid; gap: 2.4cqw; width: 74cqw; padding: 4cqw; border-radius: 1.4cqw; background: var(--p); box-shadow: var(--sh); }
.sc-cols__head .l { height: 3cqw; }
.sc-cols__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; }
.sc-cols__grid > span { display: grid; align-content: start; gap: 1.1cqw; }
.sc-cols .sc-img { aspect-ratio: 4 / 3; margin-bottom: 0.6cqw; }

/* Documents */
.sc-dk { display: grid; gap: 2cqw; width: 76cqw; }
.sc-dk__view { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 1.8cqw; background: var(--p); box-shadow: var(--sh); }
.sc-dk__track { display: flex; width: 400%; height: 100%; }
.sc-dk__s { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 5cqw; }
.sc-dk__t { display: grid; gap: 1.6cqw; }
.sc-dk__t .l.ck { height: 3.6cqw; }
.sc-dk__s--chart { flex-direction: row; align-items: center; justify-content: flex-start; gap: 5cqw; }
.sc-dk__s--chart .sc-dk__t { flex: 1; }
.sc-dk__bars { display: flex; align-items: flex-end; gap: 1.4cqw; width: 40%; height: 80%; }
.sc-dk__bars i { flex: 1; border-radius: 0.8cqw 0.8cqw 0 0; background: var(--c); }
.sc-dk__bars i:last-child { background: var(--k); }
.sc-dk__num { font-family: var(--font-display); font-size: 14cqw; font-weight: 700; line-height: 1; letter-spacing: -0.05em; color: #fff; }
.sc-dk__thumbs { display: flex; justify-content: center; gap: 1.4cqw; }
.sc-dk__thumbs i { position: relative; width: 12cqw; aspect-ratio: 16 / 9; border-radius: 0.8cqw; background: var(--p); box-shadow: inset 0 0 0 1px var(--line); }
.sc-dk__thumbs b { position: absolute; inset: -0.5cqw; border-radius: 1.2cqw; box-shadow: 0 0 0 0.4cqw var(--k); }
.sc-ch { display: flex; align-items: stretch; gap: 3cqw; width: 80cqw; }
.sc-ch__card { flex: 1.6; display: grid; grid-template-rows: auto 1fr; gap: 3cqw; padding: 3.4cqw; border-radius: 2cqw; background: var(--p); box-shadow: var(--sh); }
.sc-ch__bars { position: relative; display: flex; align-items: flex-end; gap: 1.6cqw; height: 34cqw; }
.sc-ch__bars i { flex: 1; border-radius: 0.8cqw 0.8cqw 0 0; background: var(--c); transform-origin: bottom; }
.sc-ch__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sc-ch__line path { fill: none; stroke: var(--a); stroke-width: 3px; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; vector-effect: non-scaling-stroke; }
.sc-ch__side { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.6cqw; padding: 3.4cqw; border-radius: 2cqw; background: var(--p); box-shadow: var(--sh); }
.sc .sc-ch__donut { width: 100%; aspect-ratio: 1; margin-bottom: 1cqw; border-radius: 50%; background: conic-gradient(var(--k) 0 62%, var(--a) 0 84%, var(--b) 0); -webkit-mask: radial-gradient(circle, transparent 42%, #000 43%); mask: radial-gradient(circle, transparent 42%, #000 43%); }
.sc-rep { width: 48cqw; aspect-ratio: 1 / 1.25; overflow: hidden; border-radius: 1.4cqw; background: var(--p); box-shadow: var(--sh); }
.sc--report { --to: -45%; }
.sc-rep__body { display: grid; gap: 1.3cqw; padding: 4cqw; }
.sc-rep__body .l.ck { height: 2.6cqw; }
.sc-rep__table > span { display: flex; gap: 2cqw; padding-block: 1.2cqw; border-bottom: 1px solid var(--line); }
.sc-rep__table .l.ck { height: 1.4cqw; }
.sc-rep__bars { display: flex; align-items: flex-end; gap: 1.2cqw; height: 14cqw; }
.sc-rep__bars i { flex: 1; border-radius: 0.6cqw 0.6cqw 0 0; background: var(--c); }

/* Ads */
.sc-ad { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.6cqw; width: 46cqw; aspect-ratio: 1; padding: 5cqw; border-radius: 2.4cqw; background: var(--a); box-shadow: var(--sh); }
.sc-ad__pct { margin-bottom: auto; font-family: var(--font-display); font-size: 13cqw; font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: var(--k); }
.sc-ad .l { height: 2.4cqw; }
.sc-ad__cta { width: 46%; height: 6.4cqw; margin-top: 1.4cqw; border-radius: 1.6cqw; background: #fff; }
.sc-cursor { position: absolute; left: 15cqw; bottom: 2.6cqw; z-index: 1; width: 6cqw; height: 6cqw; }
.sc-cursor path { fill: var(--k); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.sc-ban { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 2.4cqw; width: 72cqw; }
.sc-ban__lb { grid-column: 1 / -1; display: flex; align-items: center; gap: 2cqw; height: 10cqw; padding-inline: 2.4cqw; border-radius: 1.4cqw; box-shadow: var(--sh); }
.sc-ban__lb .l { width: 30%; }
.sc-ban__sq { justify-self: end; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.2cqw; width: 30cqw; aspect-ratio: 1; padding: 2.8cqw; border-radius: 1.4cqw; box-shadow: var(--sh); }
.sc-ban__sky { display: flex; flex-direction: column; gap: 1.2cqw; width: 14cqw; height: 36cqw; padding: 1.8cqw; border-radius: 1.4cqw; box-shadow: var(--sh); }
.sc-ban__sky .sc-img { aspect-ratio: 1; }
.sc .sc-ban__cta { flex: none; width: 12cqw; height: 4.4cqw; border-radius: 1.2cqw; background: var(--k); }
.sc .sc-ban__cta.cw { background: #fff; }
.sc-ban__lb .sc-ban__cta { margin-left: auto; }
.sc-ban__sky .sc-ban__cta { width: 100%; margin-top: auto; }
.sc-sad { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.2cqw; padding: 3cqw 3cqw 4cqw; }
.sc-sad .l { height: 1.8cqw; }
.sc .sc-sad__prod { position: absolute; left: 50%; top: 24%; width: 13cqw; aspect-ratio: 0.6; translate: -50% 0; border-radius: 3cqw 3cqw 2cqw 2cqw; }
.sc-sad__prod::before { content: ""; position: absolute; left: 25%; top: -12%; width: 50%; height: 14%; border-radius: 1cqw 1cqw 0 0; background: inherit; }
.sc-sad__up { display: grid; justify-items: center; gap: 0.8cqw; margin-top: 2cqw; }
.sc-sad__up i { width: 2.4cqw; height: 2.4cqw; border-left: 0.5cqw solid var(--k); border-top: 0.5cqw solid var(--k); rotate: 45deg; }

/* Games */
.sc-gm { display: flex; align-items: center; gap: 4cqw; width: 78cqw; padding: 3cqw; border-radius: 2.6cqw; background: #2A2927; box-shadow: var(--sh); }
.sc-gm__stage { position: relative; flex: none; display: grid; place-items: end center; width: 30cqw; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 2cqw; background: radial-gradient(circle at 50% 40%, #4A4744, #2A2927 70%); }
.sc-gm__char { position: relative; display: grid; justify-items: center; margin-bottom: 5cqw; }
.sc-gm__head { width: 9cqw; aspect-ratio: 1; border-radius: 50%; background: var(--a); }
.sc-gm__body { width: 15cqw; height: 13cqw; margin-top: -1cqw; border-radius: 6cqw 6cqw 2cqw 2cqw; background: var(--b); }
.sc-gm__shadow { position: absolute; bottom: 4cqw; width: 14cqw; height: 2cqw; border-radius: 50%; background: rgba(0, 0, 0, 0.45); }
.sc-gm__stats { flex: 1; display: grid; gap: 2cqw; }
.sc-gm__hp { height: 2cqw; overflow: hidden; border-radius: 1cqw; background: rgba(255, 255, 255, 0.12); }
.sc-gm__hp b { height: 100%; background: #E9A825; transform: scaleX(0.72); transform-origin: left; }
.sc-gm__stars { display: flex; gap: 1cqw; }
.sc-gm__stars i { width: 4cqw; aspect-ratio: 1; background: #E9A825; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sc-gm__stars i:last-child { background: rgba(255, 255, 255, 0.2); }
.sc-ico { display: grid; grid-template-columns: repeat(3, 13cqw); gap: 2cqw; padding: 3.4cqw; border-radius: 2.6cqw; background: #2A2927; box-shadow: var(--sh); }
.sc-ico > i { display: grid; place-items: center; aspect-ratio: 1; border-radius: 2.6cqw; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.sc-ico b { width: 6cqw; aspect-ratio: 1; }
.sc-ico__circle { border-radius: 50%; background: var(--a); }
.sc-ico .sc-ico__diamond { width: 4.4cqw; border-radius: 0.8cqw; background: var(--b); rotate: 45deg; }
.sc-ico__tri { background: #E9A825; clip-path: polygon(50% 6%, 96% 90%, 4% 90%); }
.sc-ico__star { background: var(--c); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sc-ico__hex { background: var(--a); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.sc-ico__plus { background: var(--b); clip-path: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%); }
.sc-ico .sc-ico__drop { width: 5cqw; border-radius: 50% 50% 50% 0; background: var(--c); rotate: -45deg; }
.sc-ico__ring { border-radius: 50%; box-shadow: inset 0 0 0 1.4cqw #E9A825; }
.sc-ico__bolt { background: var(--a); clip-path: polygon(58% 0, 15% 58%, 46% 58%, 38% 100%, 85% 40%, 54% 40%); }
.sc-hd { position: relative; width: 80cqw; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2.4cqw; background: radial-gradient(circle at 50% 70%, #4A5A46, #232821 75%); box-shadow: var(--sh); }
.sc-hd__bars { position: absolute; left: 2.4cqw; top: 2.4cqw; display: grid; gap: 1cqw; width: 24cqw; }
.sc-hd__bars i { height: 1.8cqw; overflow: hidden; border-radius: 1cqw; background: rgba(255, 255, 255, 0.15); }
.sc-hd__bars b { height: 100%; transform-origin: left; }
.sc-hd__hp b { background: #E5484D; transform: scaleX(0.8); }
.sc-hd__mp b { background: var(--c); transform: scaleX(0.55); }
.sc-hd__map { position: absolute; right: 2.4cqw; top: 2.4cqw; width: 12cqw; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 0.3cqw rgba(255, 255, 255, 0.35); }
.sc-hd__map b { position: absolute; left: 55%; top: 40%; width: 1.4cqw; aspect-ratio: 1; border-radius: 50%; background: #E9A825; }
.sc-hd__slots { position: absolute; left: 50%; bottom: 2.4cqw; display: grid; grid-template-columns: repeat(5, 7.4cqw); translate: -50% 0; }
.sc-hd__slots i { padding: 0.5cqw; }
.sc-hd__slots i b { aspect-ratio: 1; border-radius: 1.2cqw; background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.sc-hd__slots i:nth-child(odd) b { background: radial-gradient(circle, var(--a) 0 28%, rgba(255, 255, 255, 0.12) 30%); }
.sc-hd__sel { position: absolute; left: 0; top: 0; width: 7.4cqw; height: 7.4cqw; border-radius: 1.6cqw; box-shadow: inset 0 0 0 0.4cqw #fff; }
.sc-hd__btn { position: absolute; right: 3cqw; bottom: 3cqw; width: 9cqw; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1cqw rgba(255, 255, 255, 0.15); }

/* The motion (the scenes above are complete still images without it) */
@media (prefers-reduced-motion: no-preference) {
  .sc-scroll { animation: sc-scroll var(--cy) var(--ease) infinite alternate; }
  .sc-feed__col { animation: sc-loop 12s linear infinite; }
  .sc .sc-on1 { animation: sc-t1 var(--cy) infinite; }
  .sc .sc-on2 { animation: sc-t2 var(--cy) infinite; }
  .sc .sc-on3 { animation: sc-t3 var(--cy) infinite; }
  .sc-seg1 { animation: sc-s1 var(--cy) linear infinite; }
  .sc-seg2 { animation: sc-s2 var(--cy) linear infinite; }
  .sc-seg3 { animation: sc-s3 var(--cy) linear infinite; }
  .sc-car__track, .sc-dk__track { animation: sc-slide3 var(--cy) var(--ease) infinite; }
  .sc .sc-pop { animation: sc-pop var(--cy) var(--ease-out) calc(var(--i, 0) * 120ms) infinite both; }
  .sc .sc-grow { animation: sc-grow var(--cy) var(--ease-out) calc(var(--i, 0) * 120ms) infinite both; transform-origin: left; }
  .sc .sc-rise { animation: sc-rise var(--cy) var(--ease-out) calc(var(--i, 0) * 120ms) infinite both; transform-origin: bottom; }
  .sc .sc-slide { animation: sc-slide var(--cy) var(--ease-out) calc(var(--i, 0) * 120ms) infinite both; }
  .sc .sc-fill { animation: sc-fillx var(--cy) linear infinite; }
  .sc-pulse { animation: sc-pulse 1.6s var(--ease) infinite; }
  .sc .sc-head { animation: sc-move var(--cy) linear infinite; }
  .sc-inbox { animation: sc-push var(--cy) var(--ease-out) infinite; }
  .sc-row--new { animation: sc-fade var(--cy) var(--ease-out) infinite; }
  .sc .sc-half1 { animation: sc-h1 4s infinite; }
  .sc .sc-half2 { animation: sc-h2 4s infinite; }
  .sc-rec, .sc-hd__map b { animation: sc-blink 1.2s ease-in-out infinite; }
  .sc-mini i, .sc-wv__bars i { animation: sc-eq 0.9s ease-in-out calc(var(--i, 0) * -0.13s) infinite alternate; }
  .sc-flip { animation: sc-flip var(--cy) var(--ease) infinite; }
  .sc-bro__l { animation: sc-fold-l var(--cy) var(--ease) infinite; }
  .sc-bro__r { animation: sc-fold-r var(--cy) var(--ease) infinite; }
  .sc-fly:not(.sc-fly--back) { animation: sc-drop var(--cy) var(--ease-out) infinite both; }
  .sc-book__turn { animation: sc-turn var(--cy) var(--ease) infinite; }
  .sc-ch__line path { animation: sc-draw var(--cy) var(--ease) 0.5s infinite both; }
  .sc-ad__cta { animation: sc-press var(--cy) infinite; }
  .sc-cursor { animation: sc-cursor var(--cy) var(--ease) infinite; }
  .sc .sc-sad__prod, .sc-gm__char { animation: sc-bob 2.4s ease-in-out infinite; }
  .sc-sad__up { animation: sc-bob 1.2s ease-in-out infinite; }
  .sc-gm__shadow { animation: sc-shadow 2.4s ease-in-out infinite; }
  .sc-gm__hp b, .sc-hd__hp b { animation: sc-hp var(--cy) var(--ease) infinite; }
  .sc .sc-rv__disc { animation: sc-wipe var(--cy) var(--ease) infinite both; }
  .sc-hd__sel { animation: sc-steps 5s steps(5) infinite; }
  .sc-hd__btn { animation: sc-pulse 1.6s var(--ease) infinite; }
  .sc .sc-play { animation: sc-playbtn var(--cy) var(--ease) infinite; }
}
@keyframes sc-loop { to { transform: translateY(-50%); } }
@keyframes sc-scroll { 0%, 15% { transform: none; } 85%, 100% { transform: translateY(var(--to, -40%)); } }
@keyframes sc-t1 { 0%, 30% { opacity: 1; } 33.3%, 96.7% { opacity: 0; } 100% { opacity: 1; } }
@keyframes sc-t2 { 0%, 30% { opacity: 0; } 33.3%, 63.3% { opacity: 1; } 66.6%, 100% { opacity: 0; } }
@keyframes sc-t3 { 0%, 63.3% { opacity: 0; } 66.6%, 96.7% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sc-s1 { 0% { transform: scaleX(0); } 33.3%, 100% { transform: scaleX(1); } }
@keyframes sc-s2 { 0%, 33.3% { transform: scaleX(0); } 66.6%, 100% { transform: scaleX(1); } }
@keyframes sc-s3 { 0%, 66.6% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes sc-slide3 { 0%, 25% { transform: none; } 33.3%, 58.3% { transform: translateX(-25%); } 66.6%, 91.6% { transform: translateX(-50%); } 100% { transform: translateX(-75%); } }
@keyframes sc-pop { 0% { opacity: 0; transform: scale(0.6); } 12%, 86% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@keyframes sc-grow { 0% { transform: scaleX(0); } 14%, 86% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@keyframes sc-rise { 0% { transform: scaleY(0); } 16%, 86% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@keyframes sc-slide { 0% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)); } 14%, 86% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@keyframes sc-fillx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sc-pulse { 50% { transform: scale(1.07); } }
@keyframes sc-move { from { left: 0; } to { left: 100%; } }
@keyframes sc-push { 0%, 12% { transform: translateY(-9cqw); } 26%, 100% { transform: none; } }
@keyframes sc-fade { 0%, 14% { opacity: 0; } 28%, 100% { opacity: 1; } }
@keyframes sc-h1 { 0%, 46% { opacity: 1; } 50%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes sc-h2 { 0%, 46% { opacity: 0; } 50%, 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sc-blink { 50% { opacity: 0.25; } }
@keyframes sc-eq { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
@keyframes sc-flip { 0%, 30% { transform: none; } 45%, 80% { transform: rotateY(180deg); } 95%, 100% { transform: rotateY(360deg); } }
@keyframes sc-fold-l { 0%, 15%, 100% { transform: rotateY(12deg); } 45%, 70% { transform: rotateY(72deg); } }
@keyframes sc-fold-r { 0%, 15%, 100% { transform: rotateY(-12deg); } 45%, 70% { transform: rotateY(-72deg); } }
@keyframes sc-drop { 0% { opacity: 0; transform: translateY(-14%); } 14%, 88% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
@keyframes sc-turn { 0% { opacity: 0; transform: none; } 8%, 20% { opacity: 1; transform: none; } 60%, 88% { opacity: 1; transform: rotateY(-180deg); } 100% { opacity: 0; transform: rotateY(-180deg); } }
@keyframes sc-draw { 0% { stroke-dashoffset: 1; } 40%, 86% { opacity: 1; stroke-dashoffset: 0; } 96%, 100% { opacity: 0; stroke-dashoffset: 0; } }
@keyframes sc-press { 0%, 47% { transform: none; } 50% { transform: scale(0.92); } 56%, 100% { transform: none; } }
@keyframes sc-cursor { 0%, 10% { opacity: 0; transform: translate(18cqw, 14cqw); } 20% { opacity: 1; } 45% { transform: none; } 50% { transform: scale(0.85); } 55%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes sc-bob { 50% { transform: translateY(-6%); } }
@keyframes sc-shadow { 50% { opacity: 0.6; transform: scaleX(0.8); } }
@keyframes sc-hp { 0%, 15% { transform: scaleX(0.9); } 45%, 60% { transform: scaleX(0.3); } 90%, 100% { transform: scaleX(0.9); } }
@keyframes sc-wipe { 0% { clip-path: circle(0% at 50% 50%); } 22%, 88% { opacity: 1; clip-path: circle(75% at 50% 50%); } 98%, 100% { opacity: 0; clip-path: circle(75% at 50% 50%); } }
@keyframes sc-steps { to { transform: translateX(500%); } }
@keyframes sc-playbtn { 0%, 8% { opacity: 1; transform: none; } 16%, 100% { opacity: 0; transform: scale(1.3); } }

/* ==========================================================================
   Selected Work — frosted-glass folders
   ========================================================================== */
.projects {
  display: grid;
  gap: clamp(40px, 5vw, 56px) clamp(20px, 3vw, 36px);
}
@media (min-width: 700px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .projects { grid-template-columns: repeat(3, 1fr); } }

.folder {
  --lift: 0px;
  position: relative;
  display: block;
  aspect-ratio: 1 / 0.94;
  border-radius: var(--radius);
  transform: translateY(var(--lift));
  transition: transform 0.6s var(--ease-out);
  outline: none;
}
/* Ground shadow */
.folder::after {
  content: "";
  position: absolute;
  inset-inline: 8%;
  bottom: -14px;
  height: 28px;
  border-radius: 50%;
  background: rgba(20, 20, 19, 0.16);
  filter: blur(18px);
  z-index: -1;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  opacity: 0.7;
}
.folder:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }

/* Back of folder, with tab */
.folder__back {
  position: absolute;
  top: 9%;
  inset-inline: 3%;
  bottom: 18%;
  background: var(--folder-back);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.folder__back::before {
  content: "";
  position: absolute;
  bottom: calc(100% - 1px);
  inset-inline-start: 0;
  width: 38%;
  height: 18px;
  background: inherit;
  border-radius: 16px 16px 0 0;
}

/* Screenshots / mockups fanned inside the folder */
.folder__sheets { position: absolute; inset: 0; }
.sheet {
  --r: 0deg;
  --x: 0%;
  --y: 0%;
  position: absolute;
  bottom: 30%;
  left: 50%;
  width: 44%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: var(--tone, #ccc);
  color: var(--tone-ink, var(--ink));
  box-shadow: 0 10px 24px -10px rgba(20, 20, 19, 0.35);
  transform: translateX(-50%) translate(var(--x), var(--y)) rotate(var(--r));
  transform-origin: 50% 100%;
  transition: transform 0.7s var(--ease-out);
}
.sheet img { width: 100%; height: 100%; object-fit: cover; }
.sheet--1 { --x: calc(-46% * var(--flip)); --y: 2%; --r: calc(-9deg * var(--flip)); z-index: 1; }
.sheet--3 { --x: calc(46% * var(--flip)); --y: 4%; --r: calc(8deg * var(--flip)); z-index: 2; }
.sheet--2 { --y: -6%; z-index: 3; }
/* A pair of images gets bigger sheets, spread a little less */
.folder__sheets--pair .sheet { width: 52%; }
.folder__sheets--pair .sheet--1 { --x: calc(-28% * var(--flip)); }
.folder__sheets--pair .sheet--3 { --x: calc(28% * var(--flip)); }
.folder:hover .folder__sheets--pair .sheet--1,
.folder:focus-visible .folder__sheets--pair .sheet--1 { --x: calc(-40% * var(--flip)); }
.folder:hover .folder__sheets--pair .sheet--3,
.folder:focus-visible .folder__sheets--pair .sheet--3 { --x: calc(40% * var(--flip)); }

.folder:hover .sheet--1,
.folder:focus-visible .sheet--1 { --x: calc(-58% * var(--flip)); --y: -4%; --r: calc(-13deg * var(--flip)); }
.folder:hover .sheet--3,
.folder:focus-visible .sheet--3 { --x: calc(58% * var(--flip)); --y: -3%; --r: calc(12deg * var(--flip)); }
.folder:hover .sheet--2,
.folder:focus-visible .sheet--2 { --y: -15%; }

/* Placeholder composition inside a sheet */
.sheet__ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 11px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
[lang="ar"] .sheet__ph { letter-spacing: 0; text-transform: none; font-size: 0.6875rem; }
.sheet__ph::before {
  content: "";
  position: absolute;
  inset: 22% 18% 30%;
  border: 1px dashed currentColor;
  border-radius: 10px;
  opacity: 0.35;
}
.sheet__ph::after {
  content: "";
  position: absolute;
  inset-inline: 18%;
  bottom: 18%;
  height: 4px;
  border-radius: 4px;
  background: currentColor;
  opacity: 0.3;
  box-shadow: 0 -9px 0 currentColor;
  width: 40%;
}
.sheet__ph span { opacity: 0.75; }

/* Front glass panel */
.folder__front {
  --step: 26px;
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 54%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: calc(var(--step) + 14px) 22px 20px;
  padding-inline-end: 84px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.6) inset, 0 24px 40px -24px rgba(20, 20, 19, 0.35);
}
/* Folder-front silhouette: raised start edge with a soft step (progressive enhancement) */
@supports (clip-path: shape(from 0 0, line to 1px 1px)) {
  .folder__front { height: 56%; }
  .folder__front {
    border: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    clip-path: shape(
      from 0 22px,
      arc to 22px 0 of 22px cw,
      hline to calc(54% - 14px),
      arc to 54% 14px of 14px cw,
      vline to calc(var(--step) - 14px),
      arc to calc(54% + 14px) var(--step) of 14px ccw,
      hline to calc(100% - 22px),
      arc to 100% calc(var(--step) + 22px) of 22px cw,
      vline to calc(100% - 22px),
      arc to calc(100% - 22px) 100% of 22px cw,
      hline to 22px,
      arc to 0 calc(100% - 22px) of 22px cw,
      close
    );
  }
  [dir="rtl"] .folder__front {
    clip-path: shape(
      from 100% 22px,
      arc to calc(100% - 22px) 0 of 22px ccw,
      hline to calc(46% + 14px),
      arc to 46% 14px of 14px ccw,
      vline to calc(var(--step) - 14px),
      arc to calc(46% - 14px) var(--step) of 14px cw,
      hline to 22px,
      arc to 0 calc(var(--step) + 22px) of 22px ccw,
      vline to calc(100% - 22px),
      arc to 22px 100% of 22px ccw,
      hline to calc(100% - 22px),
      arc to 100% calc(100% - 22px) of 22px ccw,
      close
    );
  }
}

.folder__badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 18px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
[lang="ar"] .folder__badge { letter-spacing: 0; text-transform: none; font-size: 0.75rem; }
.folder__badge::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-inline-end: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
  vertical-align: 1px;
}

.folder__meta {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
[lang="ar"] .folder__meta { letter-spacing: 0; text-transform: none; font-size: 0.8125rem; }
.folder__meta span + span::before { content: "·"; margin-inline-end: 8px; color: var(--ink-3); }

.folder__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.3vw, 1.175rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
[lang="ar"] .folder__title { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.folder__desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.folder__arrow {
  position: absolute;
  bottom: 18px;
  inset-inline-end: 18px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 8px 18px -8px rgba(20, 20, 19, 0.6);
  transition: transform 0.5s var(--ease-out);
}
.folder__arrow svg {
  width: 18px;
  height: 18px;
  transform: scaleX(var(--flip));
  transition: transform 0.5s var(--ease-out);
}
.folder:hover .folder__arrow,
.folder:focus-visible .folder__arrow { transform: scale(1.06); }
.folder:hover .folder__arrow svg,
.folder:focus-visible .folder__arrow svg { transform: scaleX(var(--flip)) rotate(45deg); }

.folder:hover,
.folder:focus-visible { --lift: -6px; }
.folder:hover::after,
.folder:focus-visible::after { opacity: 1; transform: scaleX(0.94); }

/* Sections scrolled out of view stop their looping animations (see script.js) */
.is-offscreen,
.is-offscreen *,
.is-offscreen *::before,
.is-offscreen *::after { animation-play-state: paused !important; }

/* No backdrop-filter support: make the glass more opaque */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .folder__front, .nav__bar, .skill-card { background: rgba(247, 246, 244, 0.92); }
}

/* ==========================================================================
   Experience
   ========================================================================== */
.exp__grid { display: grid; gap: clamp(40px, 6vw, 80px); }
.exp__since {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
[lang="ar"] .exp__since { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.exp__year {
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 15rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.065em;
  margin-inline-start: -0.05em;
  font-variant-numeric: tabular-nums;
}
.exp__years { margin-top: 20px; color: var(--ink-2); font-size: 1.0625rem; }
.exp__years strong { font-family: var(--font-display); font-weight: 600; color: var(--ink); }

.timeline { border-top: 1px solid var(--line); align-self: end; }
.timeline li {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) 2fr;
  gap: 16px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}
.timeline__period {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.timeline__role {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
[lang="ar"] .timeline__role { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.5; }
.timeline__org { margin-top: 2px; font-size: 0.9375rem; color: var(--ink-3); }
.timeline li.is-pending .timeline__role { color: var(--ink-3); font-weight: 500; }

@media (min-width: 900px) {
  .exp__grid { grid-template-columns: 5fr 7fr; align-items: end; }
}

/* ==========================================================================
   Skills
   ========================================================================== */
.skills__head {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 56px);
}
.skills__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7.5vw, 6.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
[lang="ar"] .skills__title { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.25; }
.skills__intro { max-width: 44ch; font-size: 1.0625rem; color: var(--ink-2); }

/* One glass card per working skill, each with a small still scene; 3 x 3 on desktop */
.skills__groups { display: grid; gap: clamp(12px, 1.6vw, 18px); }
@media (min-width: 640px) { .skills__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .skills__groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.skill-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: clamp(18px, 2vw, 24px);
}
.skill-card__scene {
  display: grid;
  place-items: center;
  height: 112px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.15));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.skill-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.skill-card__desc { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); }
[lang="ar"] .skill-card__title { font-family: var(--font-ar); letter-spacing: 0; }

/* --- scenes --- */
.sv { position: relative; }
.sv img { width: 28px; height: 28px; object-fit: contain; }

.sv-english__bubble {
  display: block;
  height: 40px;
  padding: 0 18px;
  overflow: hidden;
  border-radius: 14px 14px 14px 4px;
  background: #212529;
  color: #F8F9FA;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 40px;
}

.sv-check { display: grid; gap: 9px; width: 150px; }
.sv-check li { display: flex; align-items: center; gap: 10px; }
.sv-check b { flex: none; width: 16px; height: 16px; border-radius: 5px; background: #212529; }
.sv-check i { flex: 1; height: 7px; border-radius: 4px; background: rgba(33, 37, 41, 0.14); }
.sv-check li:nth-child(2) i { flex: 0.7; }

.sv-logos { display: flex; gap: 10px; }
.sv-logos span, .sv-grid span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 #fff, 0 8px 16px -10px rgba(33, 37, 41, 0.45);
}
.sv-logos span { width: 40px; height: 40px; border-radius: 11px; }
.sv-logos img { width: 22px; height: 22px; }

.sv-grid { display: grid; grid-template-columns: repeat(2, 40px); gap: 8px; }
.sv-grid span { width: 40px; height: 40px; border-radius: 11px; }
.sv-grid img { width: 22px; height: 22px; }

/* Backup: Drive, then per-project folders, then an external drive */
.sv-backup { display: flex; align-items: center; gap: 8px; }
.sv-backup > span:not(.sv-backup__folders) {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 #fff, 0 8px 16px -10px rgba(33, 37, 41, 0.45);
}
.sv-backup img, .sv-backup svg { width: 22px; height: 22px; }
.sv-backup > i { width: 14px; border-top: 1.5px dashed rgba(33, 37, 41, 0.35); }
.sv-backup__folders { display: grid; gap: 4px; }
.sv-backup__folders b { width: 30px; height: 9px; border-radius: 2px 6px 2px 2px; background: rgba(33, 37, 41, 0.22); }
.sv-backup__folders b:first-child { background: #212529; }

.sv-clock { width: 66px; height: 66px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 0 0 2px #212529, 0 10px 18px -12px rgba(33, 37, 41, 0.5); }
.sv-clock::after { content: ""; position: absolute; inset: 0; margin: auto; width: 6px; height: 6px; border-radius: 50%; background: #212529; }
.sv-clock i { position: absolute; left: 50%; bottom: 50%; width: 2px; border-radius: 2px; background: #212529; transform-origin: bottom center; translate: -50% 0; }
.sv-clock__h { height: 17px; rotate: 60deg; }
.sv-clock__m { height: 25px; background: #868E96 !important; }

.sv-progress { display: flex; align-items: center; gap: 10px; width: 170px; }
.sv-progress span { flex: 1; height: 8px; border-radius: 6px; background: rgba(33, 37, 41, 0.12); overflow: hidden; }
.sv-progress span i { display: block; height: 100%; width: 100%; border-radius: inherit; background: #212529; transform-origin: left; }
[dir="rtl"] .sv-progress span i { transform-origin: right; }
.sv-progress b { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #212529; }
.sv-progress b::after { content: ""; position: absolute; width: 9px; height: 5px; margin: 7px 0 0 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; rotate: -45deg; }

.sv-chat { display: grid; gap: 7px; width: 160px; }
.sv-chat i { height: 20px; border-radius: 10px 10px 10px 3px; background: rgba(33, 37, 41, 0.14); width: 70%; }
.sv-chat i:nth-child(2) { justify-self: end; width: 55%; border-radius: 10px 10px 3px 10px; background: #212529; }
.sv-chat i:nth-child(3) { width: 45%; }

.sv-grow { display: flex; align-items: flex-end; gap: 8px; height: 64px; }
.sv-grow i { width: 16px; border-radius: 5px 5px 2px 2px; background: rgba(33, 37, 41, 0.18); }
.sv-grow i:nth-child(1) { height: 30%; }
.sv-grow i:nth-child(2) { height: 50%; }
.sv-grow i:nth-child(3) { height: 72%; }
.sv-grow i:nth-child(4) { height: 100%; background: #212529; }


/* ==========================================================================
   Contact
   ========================================================================== */
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 10rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.06em;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.contact__title em { letter-spacing: -0.03em; }
[lang="ar"] .contact__title { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.2; }

.contact__links { border-top: 1px solid var(--line); }
.contact__links li { border-bottom: 1px solid var(--line); }
.contact__row {
  display: grid;
  grid-template-columns: 1fr auto 40px;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  border-radius: 12px;
}
.contact__label {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  transition: transform 0.5s var(--ease-out);
}
[lang="ar"] .contact__label { font-family: var(--font-ar); letter-spacing: 0; }
.contact__value { font-size: 0.875rem; color: var(--ink-2); }
.contact__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.5s var(--ease-out);
}
.contact__arrow svg { width: 14px; height: 14px; transform: scaleX(var(--flip)); }
a.contact__row:hover .contact__label { transform: translateX(calc(8px * var(--flip))); }
a.contact__row:hover .contact__arrow { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.contact__row.is-pending { color: var(--ink-3); }
.contact__row.is-pending .contact__value { color: var(--ink-3); font-style: normal; }
.contact__row.is-pending .contact__arrow { border-style: dashed; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { padding-block: 32px 40px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-2); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer__tag { color: var(--ink-3); }
.footer__logo { color: var(--ink); border-radius: 6px; }
.footer__logo .md-mark { width: auto; height: 56px; transition: transform 0.5s var(--ease-out); }
.footer__logo:hover .md-mark { transform: translateY(-2px); }
.footer__top { display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; border-radius: 6px; }
.footer__top svg { width: 16px; height: 16px; transition: translate 0.3s var(--ease-out); }
.footer__top:hover svg { translate: 0 -3px; }
.footer__top:hover { color: var(--ink); }

/* ==========================================================================
   Reveal on scroll (only with JS, only when motion is welcome)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }

  /* Hero entrance. Held until fonts and the portrait are ready (html.is-ready, set in script.js),
     so nothing swaps mid-animation. The card rises, its text follows, then the ribbons and band
     fade in, and the portrait appears last. The card slides in from the start side, the portrait from the end side. */
  .js .nav__bar,
  .js .hero__text,
  .js .hero__text > *,
  .js .hero__ribbons,
  .js .hero__band,
  .js .hero__photo { opacity: 0; }
  .js.is-ready .nav__bar { animation: nav-in 0.9s var(--ease-out) forwards; }
  .js.is-ready .hero__text { animation: card-in 1.1s var(--ease-out) 0.05s forwards; }
  .js.is-ready .hero__text > * { animation: rise 0.9s var(--ease-out) forwards; }
  .js.is-ready .hero__text > :nth-child(1) { animation-delay: 0.2s; }
  .js.is-ready .hero__text > :nth-child(2) { animation-delay: 0.28s; }
  .js.is-ready .hero__text > :nth-child(3) { animation-delay: 0.36s; }
  .js.is-ready .hero__text > :nth-child(4) { animation-delay: 0.44s; }
  .js.is-ready .hero__text > :nth-child(5) { animation-delay: 0.5s; }
  .js.is-ready .hero__ribbons { animation: fade-in 1.6s var(--ease) 0.45s forwards; }
  .js.is-ready .hero__band { animation: fade-in 1.2s var(--ease) 0.6s forwards; }
  .js.is-ready .hero__photo { animation: photo-in 0.9s var(--ease-out) 0.3s forwards; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateX(calc(-64px * var(--flip))) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes photo-in { from { opacity: 0; transform: translateX(calc(80px * var(--flip))); } to { opacity: 1; transform: none; } }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Case studies show the work only: title on top, then pictures. The words stay in
   content.js (and in the markup for screen readers) but are not drawn.
   ========================================================================== */
.cs__lede, .cs__facts, .cs__chat, .cs__quote { display: none; }
.cs-ch__text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.cs-ch, .cs-ch:not(.cs-ch--wide) { grid-template-columns: minmax(0, 1fr); }
.cs-chapters { gap: clamp(20px, 3vw, 40px); }

/* ==========================================================================
   Flipbook — a magazine read page by page inside a case study
   ========================================================================== */
.flip { display: grid; gap: 18px; justify-items: center; }
.flip__stage { width: 100%; perspective: 2600px; }
.flip__book {
  position: relative;
  width: min(100%, 1120px);
  aspect-ratio: 1600 / 1132;
  margin-inline: auto;
  transition: transform 0.7s var(--ease-out);
}
/* cover alone: slide the book so the single page sits in the middle; same for the back cover */
.flip__book.is-cover { transform: translateX(-25%); }
.flip__book.is-back { transform: translateX(25%); }
.flip__page, .flip__leaf { position: absolute; top: 0; width: 50%; height: 100%; }
.flip__page--l { left: 0; }
.flip__page--r { right: 0; }
.flip__page { cursor: pointer; background: #fff; box-shadow: 0 30px 60px -36px rgba(20, 20, 19, 0.55); }
.flip__page.is-empty { visibility: hidden; }
.flip__page img, .flip__face img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
/* shading along the spine, like a real fold */
.flip__page--l::after, .flip__page--r::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.flip__page--l::after { background: linear-gradient(270deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0) 9%); }
.flip__page--r::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0) 9%); }
.flip__leaf { display: none; z-index: 3; transform-style: preserve-3d; transition: transform 0.72s cubic-bezier(0.45, 0.05, 0.25, 1); }
.flip__leaf.is-next { display: block; right: 0; transform-origin: left center; }
.flip__leaf.is-prev { display: block; left: 0; transform-origin: right center; }
.flip__leaf.is-next.is-turning { transform: rotateY(-180deg); }
.flip__leaf.is-prev.is-turning { transform: rotateY(180deg); }
.flip__face { position: absolute; inset: 0; backface-visibility: hidden; background: #fff; overflow: hidden; }
.flip__face--back { transform: rotateY(180deg); }
.flip__face.is-empty img { visibility: hidden; }
.flip__face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0) 30%); pointer-events: none; }
.flip__bar { display: flex; align-items: center; gap: 14px; }
.flip__count { min-width: 92px; text-align: center; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.flip__btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 50%;
  background: rgba(255, 255, 255, 0.7); color: var(--ink); cursor: pointer;
  box-shadow: 0 10px 24px -16px rgba(33, 37, 41, 0.5);
}
.flip__btn svg { width: 20px; height: 20px; }
.flip__btn--prev svg { transform: scaleX(-1); }
.flip__btn:disabled { opacity: 0.35; cursor: default; }
.flip__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Flip buttons stand out: solid, larger, the next arrow gently nudging until first used */
.flip__bar { gap: 18px; padding: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); box-shadow: 0 14px 30px -20px rgba(33, 37, 41, 0.5); }
.flip__btn { width: 54px; height: 54px; border: 0; background: var(--ink); color: #fff; box-shadow: 0 12px 26px -12px rgba(20, 20, 19, 0.6); transition: transform 0.2s, background 0.2s; }
.flip__btn svg { width: 24px; height: 24px; }
.flip__btn:not(:disabled):hover { transform: scale(1.08); }
.flip__btn:disabled { background: rgba(33, 37, 41, 0.25); }
.flip__count { font-size: 1rem; color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .flip__btn--next:not(:disabled) { animation: flip-nudge 1.6s ease-in-out infinite; }
  .flip__bar:hover .flip__btn--next { animation: none; }
}
@keyframes flip-nudge { 0%, 70%, 100% { translate: 0 0; } 80% { translate: 5px 0; } 90% { translate: 0 0; } }

/* Magazines in the carousel: the book turns its own pages */
.showcase__item--book { background: transparent; border-color: transparent; box-shadow: none; overflow: visible; }
.showcase__item--book .flip, .showcase__item--book .flip__stage, .showcase__item--book .flip__book { width: 100%; height: 100%; }
.showcase__item--book .flip__book { aspect-ratio: auto; }
.showcase__item--book .flip__page, .showcase__item--book .flip__page img { cursor: pointer; }
.showcase__item--book .flip__page { box-shadow: 0 18px 30px -22px rgba(20, 20, 19, 0.6); }

/* ==========================================================================
   Services as slim horizontal cards: a small preview beside the title, no copy
   ========================================================================== */
.svc-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.svc-grid .svc-tile { grid-template-rows: none; grid-template-columns: 76px minmax(0, 1fr); align-items: center; border-radius: 16px; min-height: 0; }
.svc-tile__media { height: 64px; margin: 6px 0 6px 6px; border-bottom: 0; border-radius: 11px; }
[dir="rtl"] .svc-tile__media { margin: 6px 6px 6px 0; }
.svc-tile__media .mk { zoom: 0.16; }
.svc-shots { padding: 0; gap: 2px; }
.svc-shots img { border-radius: 6px; }
.svc-shots--3 img:nth-child(n+2), .svc-shots--2 img:nth-child(n+2) { display: none; }
.svc-tile__body { padding: 10px 14px; gap: 0; }
.svc-tile__cat, .svc-tile__desc, .svc-tile__work { display: none; }
.svc-tile__title { font-size: 0.9375rem; line-height: 1.3; }
@media (hover: hover) { .svc-grid .svc-tile:hover { transform: translateY(-2px); } }

/* Services are plain labels now: no preview, no popup */
.svc-grid .svc-tile { grid-template-columns: minmax(0, 1fr); cursor: default; }
.svc-grid .svc-tile__body { padding: 16px 18px; }
@media (hover: hover) { .svc-grid .svc-tile:hover { transform: none; } }

/* Work images can't be dragged out, selected or saved with a long press on phones */
img, video { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
