:root {
  --ink: #3D0713;
  --burgundy: #5E0B20;
  --burgundy-soft: #741A30;
  --cream: #F3E8D6;
  --cream-dim: rgba(243, 232, 214, .72);
  --line: rgba(243, 232, 214, .22);
  --gutter: clamp(16px, 4vw, 56px);
  --display: "Anton", "Alexandria", sans-serif;
  --body: "Montserrat", "IBM Plex Sans Arabic", sans-serif;
}
html[lang="ar"] {
  --display: "Alexandria", sans-serif;
  --body: "IBM Plex Sans Arabic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Loader */
#loader {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--ink);
}
.loader-mark { width: clamp(96px, 14vw, 150px); }
.loader-count { direction: ltr; font: 500 14px "Montserrat", sans-serif; letter-spacing: .2em; color: var(--cream-dim); }

#sparks { position: fixed; inset: 0; z-index: 55; width: 100%; height: 100%; pointer-events: none; }

/* Top */
.top {
  position: absolute; top: 0; inset-inline: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
}
.top-logo img { height: 48px; width: auto; }
.top-role { font-size: 13px; color: var(--cream-dim); }

/* Hero */
.hero { padding: 96px var(--gutter) 56px; }
.hero-eyebrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--cream-dim);
}
html[lang="ar"] .hero-eyebrow { letter-spacing: 0; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cream); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.hero-title {
  font-family: var(--display); font-weight: 400; line-height: 1; white-space: nowrap;
  color: var(--cream); text-transform: uppercase; overflow: hidden; padding-block: .04em;
}
html[lang="ar"] .hero-title { font-weight: 800; line-height: 1.25; }
.hero-title .ch { display: inline-block; will-change: transform; }

.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px clamp(32px, 6vw, 96px);
  margin-top: 40px; align-items: start;
}
.hero-hello { font-size: 18px; letter-spacing: .02em; color: var(--cream-dim); }
.hero-name {
  margin: 0; color: var(--cream); font-family: var(--display); font-weight: 400;
  font-size: clamp(38px, 5.2vw, 72px); line-height: 1.15;
}
html[lang="ar"] .hero-name { font-weight: 800; line-height: 1.3; }
.hero-bio { max-width: 34em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.9; color: var(--cream-dim); }
html[lang="ar"] .hero-bio { line-height: 2; }
.name-rule { display: block; width: 88px; height: 2px; margin: 14px 0 20px; background: var(--cream); transform-origin: left; }
html[dir="rtl"] .name-rule { transform-origin: right; }
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .36em; margin-block: -.36em; }
.word-in { display: inline-block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px;
  padding: 10px 26px; border: 1.5px solid var(--cream);
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background .3s, color .3s, transform .3s;
}
.btn:hover { transform: translateY(-3px); }
.btn-solid { background: var(--cream); color: var(--burgundy); }
.btn-line:hover { background: var(--cream); color: var(--burgundy); }
.cream .btn { border-color: var(--burgundy); }
a.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

.hero-portrait { grid-row: span 2; position: relative; }
.portrait-frame {
  aspect-ratio: 4 / 5; overflow: hidden; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame img.is-mark { width: 62%; height: auto; object-fit: contain; }
.portrait-frame.has-photo { position: relative; overflow: visible; background: var(--burgundy); align-items: flex-end; }
.portrait-frame.has-photo .portrait-photo { position: relative; z-index: 1; width: 100%; height: 112%; object-fit: contain; object-position: bottom; transform-origin: bottom center; }
.portrait-tag {
  z-index: 2; position: absolute; bottom: 14px; inset-inline-start: 50%; transform: translateX(-50%);
  padding: 2px 14px; white-space: nowrap;
  background: var(--burgundy); color: var(--cream); font-size: 13px; font-weight: 600;
}
html[dir="rtl"] .portrait-tag { transform: translateX(50%); }

.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-facts b { display: block; font-size: 17px; }
.hero-facts b { direction: ltr; unicode-bidi: plaintext; text-align: start; font: 400 clamp(30px, 3.4vw, 46px)/1.1 "Anton", sans-serif; }
.hero-facts span { display: block; font-size: 14px; line-height: 1.5; color: var(--cream-dim); }

/* Marquee */
.marquee { direction: ltr; overflow: hidden; background: var(--cream); color: var(--burgundy); padding: 12px 0; }
.marquee-track {
  display: flex; width: max-content; animation: slide 34s linear infinite;
  transform: translate3d(0, 0, 0); will-change: transform; backface-visibility: hidden;
}
.marquee-track span { flex: none; padding-inline: 26px; font: 400 26px/1.3 "Anton", sans-serif; white-space: nowrap; }
.marquee-track span::after { content: "✦"; margin-inline-start: 52px; font-size: 15px; vertical-align: middle; }
@keyframes slide {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* Sections */
.section { padding: clamp(72px, 10vw, 140px) var(--gutter); }
.cream { background: var(--cream); color: var(--burgundy); --cream-dim: rgba(94, 11, 32, .74); --line: rgba(94, 11, 32, .24); }
.cream .browser { background: #EADCC6; }
.cream .btn-line:hover { background: var(--burgundy); color: var(--cream); }
.dept .sites, .dept .apps { margin-top: 44px; }
.kicker { font-family: "Anton", "Cairo", sans-serif; font-weight: 400; font-size: 16px; font-weight: 700; letter-spacing: .16em; margin-bottom: 10px; opacity: .75; }
html[lang="ar"] .kicker { letter-spacing: 0; font-size: 15px; }
.heading, .contact-title {
  font-family: var(--display); font-weight: 400; line-height: 1.08; text-wrap: balance;
  font-size: clamp(42px, 7.4vw, 104px);
}
html[lang="ar"] .heading, html[lang="ar"] .contact-title { font-weight: 800; line-height: 1.3; }
.section-sub { max-width: 40em; margin-top: 16px; color: var(--cream-dim); }

.about-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px clamp(32px, 6vw, 96px); margin-top: 40px; }
.lead { font-size: clamp(21px, 2.3vw, 30px); line-height: 1.5; font-weight: 600; }

/* Wins */
.wins { background: var(--burgundy); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 44px; border-top: 1px solid var(--line); }
.stat { padding: 24px 0 30px; padding-inline-end: 20px; border-bottom: 1px solid var(--line); }
.stat-num {
  direction: ltr; display: block; text-align: start; font: 400 clamp(56px, 8.5vw, 124px)/1.05 "Anton", sans-serif;
  unicode-bidi: plaintext;
}
.stat-label { color: var(--cream-dim); font-size: 16px; line-height: 1.5; }

/* Work */
.group-title {
  margin: clamp(40px, 5vw, 64px) 0 20px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: clamp(25px, 3vw, 38px); line-height: 1.3;
}

/* Branded video thumbnail */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.8vw, 24px); }
.thumb-card { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-decoration: none; }
.thumb {
  direction: ltr; container-type: inline-size; position: relative; overflow: hidden; aspect-ratio: 808 / 632;
  background: radial-gradient(120% 120% at 18% 12%, #84203A 0%, var(--burgundy) 48%, #40071A 100%);
  color: var(--cream); text-align: left; isolation: isolate;
}
.thumb-mark-wall {
  position: absolute; inset: -2% -2%; z-index: -1; opacity: .07; pointer-events: none;
  font: 400 8.6cqw/1.34 "Anton", sans-serif; letter-spacing: .34em; word-break: break-all; color: var(--cream);
}
.thumb-title {
  position: absolute; top: 8%; left: 6.5%; width: 40%;
  font-family: "Montserrat", "Cairo", sans-serif; font-weight: 800; font-size: 5.3cqw; line-height: 1.18;
}
.thumb-title[dir="rtl"] { font-family: "Cairo", sans-serif; font-weight: 900; font-size: 5.7cqw; line-height: 1.3; text-align: left; }
.thumb-topic {
  position: absolute; top: 40%; left: 6.5%; display: flex; align-items: center; gap: 1.4cqw;
  font: italic 700 2.5cqw "Montserrat", sans-serif; letter-spacing: .08em;
}
.thumb-topic svg { width: 11cqw; height: auto; }
.thumb-strip {
  position: absolute; left: 3%; bottom: 12%; width: 54%; height: 15%; transform: rotate(-16deg);
  border-radius: .9cqw; background: var(--cream); color: var(--burgundy);
  box-shadow: 0 1.4cqw 3cqw rgba(30, 3, 9, .45);
}
.thumb-strip::before {
  content: ""; position: absolute; inset: 11% 3%; border-radius: .4cqw;
  background:
    repeating-linear-gradient(90deg, currentColor 0 2cqw, transparent 2cqw 2.8cqw) top / 100% 13% no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 2cqw, transparent 2cqw 2.8cqw) bottom / 100% 13% no-repeat,
    linear-gradient(90deg, rgba(94, 11, 32, .9) 0 34%, transparent 34% 36%, rgba(94, 11, 32, .55) 36% 70%, transparent 70% 72%, rgba(94, 11, 32, .8) 72%) center / 100% 46% no-repeat;
}
.thumb-strip::after { content: ""; position: absolute; top: -10%; bottom: -10%; left: 62%; width: .7cqw; background: #fff; box-shadow: 0 0 0 .2cqw var(--burgundy); }
.thumb-frame {
  position: absolute; top: 13.5%; right: 10%; width: 31%; aspect-ratio: 250 / 445; overflow: hidden;
  border-radius: 2cqw; background: #2A0410;
  box-shadow: 1.2cqw 1.6cqw 3.2cqw rgba(30, 3, 9, .6);
}
.thumb-frame video { width: 100%; height: 100%; object-fit: cover; }
.thumb-tag {
  position: absolute; width: 19%; aspect-ratio: 1 / 1.08; display: flex; align-items: center; justify-content: center;
  background: var(--cream); box-shadow: .8cqw 1cqw 2cqw rgba(30, 3, 9, .5);
}
.thumb-tag img { width: 62%; }
.thumb-tag.one { top: 6%; left: 47%; width: 16%; transform: rotate(-9deg); }
.thumb-tag.two { right: 3.5%; bottom: 3.5%; width: 17%; transform: rotate(7deg); }
.thumb-play {
  position: absolute; top: 50%; right: 25.5%; z-index: 2; width: 13cqw; height: 13cqw; margin: -6.5cqw -6.5cqw 0 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--cream);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), opacity .3s;
}
.thumb-play::before { content: ""; margin-left: .8cqw; border-style: solid; border-width: 2.1cqw 0 2.1cqw 3.3cqw; border-color: transparent transparent transparent var(--burgundy); }
.thumb-card:hover .thumb-play { transform: scale(1.14); }
.thumb-frame, .thumb-strip, .thumb-tag, .folder-stack .thumb-frame { transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.thumb-card:hover .thumb-frame { transform: translateY(-2.4%) scale(1.03); }
.thumb-card:hover .thumb-strip { transform: rotate(-11deg) translateX(1.5%); }
.thumb-card:hover .thumb-tag.one { transform: rotate(-3deg) translateY(-3%); }
.thumb-card:hover .thumb-tag.two { transform: rotate(13deg); }
.folder-grid { margin-top: 36px; }
.folder-stack { position: absolute; inset: 0; }
.folder-stack .thumb-frame img { width: 100%; height: 100%; object-fit: cover; }
.folder-stack .thumb-frame:nth-child(1) { transform: translateX(-13%) rotate(-7deg) scale(.92); filter: brightness(.62); }
.folder-stack .thumb-frame:nth-child(2) { transform: translateX(9%) rotate(6deg) scale(.95); filter: brightness(.75); }
.folder-card:hover .folder-stack .thumb-frame:nth-child(1) { transform: translateX(-27%) rotate(-12deg) scale(.92); }
.folder-card:hover .folder-stack .thumb-frame:nth-child(2) { transform: translateX(20%) rotate(10deg) scale(.95); }
.folder-card:hover .folder-stack .thumb-frame:nth-child(3) { transform: translateY(-2%) scale(1.02); }
.folder-count {
  position: absolute; right: 3.5%; bottom: 4%; z-index: 3; min-width: 13cqw; height: 13cqw; padding: 0 2cqw; border-radius: 7cqw;
  display: flex; align-items: center; justify-content: center; background: var(--cream); color: var(--burgundy);
  font: 400 6.6cqw/1 "Anton", sans-serif;
}

/* Collection window */
body.is-locked { overflow: hidden; }
#collection {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0;
  padding: clamp(20px, 3.4vw, 44px) var(--gutter) 40px; overflow-y: auto; background: var(--ink); color: var(--cream);
}
#collection::backdrop { background: var(--ink); }
.collection-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 26px; }
.collection-title { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 6vw, 78px); line-height: 1.15; }
html[lang="ar"] .collection-title { font-weight: 800; line-height: 1.3; }
.collection-desc { max-width: 40em; color: var(--cream-dim); }
#collectionClose {
  position: sticky; top: 0; flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--cream); color: var(--burgundy); font-size: 28px; line-height: 1; cursor: pointer;
}

.apps { display: grid; gap: clamp(36px, 5vw, 64px); }
.app { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.app-icon { width: 76px; height: 76px; border-radius: 18px; }
.app-name { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1.2; direction: ltr; text-align: start; }
html[dir="rtl"] .app-name { text-align: right; }
.app-kind { font-size: 15px; color: var(--cream-dim); }
.app-desc { max-width: 32em; color: var(--cream-dim); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.badge { padding: 3px 14px; background: var(--cream); color: var(--burgundy); font-size: 15px; font-weight: 700; }
.app-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.4vw, 18px); }
.app-shots img { width: 100%; aspect-ratio: 9 / 18; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid var(--line); }
.app-shots img:nth-child(2) { transform: translateY(-14px); }

.sites { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.4vw, 32px); }
.site-card { display: block; text-decoration: none; }
.browser { overflow: hidden; border: 1px solid var(--line); background: var(--burgundy); }
.browser-bar { direction: ltr; display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); font: 500 13px "Montserrat", sans-serif; color: var(--cream-dim); }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser-bar span { margin-left: 8px; }
.browser-view { aspect-ratio: 16 / 10; overflow: hidden; }
.browser-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.site-card:hover .browser-view img { transform: scale(1.04); }
.site-meta { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; }
.site-name { font-size: 20px; font-weight: 700; line-height: 1.4; }
.site-kind { font-size: 14px; color: var(--cream-dim); }
.site-arrow { font-size: 22px; line-height: 1.4; }
html[dir="rtl"] .site-arrow { transform: scaleX(-1); }

/* Matrix */
.matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(48px, 7vw, 88px); border-top: 2px solid var(--burgundy); }
.matrix-item { padding: 22px 20px 26px; border-inline-end: 1px solid rgba(94, 11, 32, .25); }
.matrix-item:last-child { border-inline-end: 0; }
.matrix-num { font: 400 15px "Anton", sans-serif; opacity: .6; }
.matrix-item h3 { margin: 8px 0 14px; font-size: 23px; line-height: 1.3; }
.matrix-item li { padding: 6px 0; font-size: 15px; line-height: 1.5; border-top: 1px solid rgba(94, 11, 32, .15); }

/* Contact */
.contact { text-align: center; }
.contact .section-sub { margin-inline: auto; }
.contact-title { max-width: 14em; margin-inline: auto; }
.contact-actions { margin-top: 30px; display: flex; justify-content: center; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 22px; }
.socials a { text-underline-offset: 4px; }

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px var(--gutter) 100px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--cream-dim);
}
.foot img { height: 44px; width: auto; }

/* Dock */
.dock {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 2px; padding: 5px; max-width: calc(100vw - 16px);
  background: #3D0713; border: 1px solid var(--line); border-radius: 999px;
}
.dock a, .dock-lang {
  display: flex; align-items: center; min-height: 40px; padding: 4px 15px; border: 0; border-radius: 999px;
  background: none; color: var(--cream); font: 600 14px var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .25s, color .25s;
}
.dock a.is-active { background: var(--cream); color: var(--burgundy); }
.dock-lang { border-inline-start: 1px solid var(--line); border-radius: 0 999px 999px 0; }
html[dir="rtl"] .dock-lang { border-radius: 999px 0 0 999px; }

/* Lightbox */
#lightbox { border: 0; padding: 0; background: none; max-width: none; max-height: none; overflow: visible; }
#lightbox::backdrop { background: rgba(30, 3, 9, .92); }
#lightboxVideo { max-height: min(88vh, 860px); max-width: 92vw; width: auto; height: auto; background: #000; }
#lightboxClose {
  position: absolute; top: -8px; inset-inline-end: -8px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--cream); color: var(--burgundy); font-size: 26px; line-height: 1; cursor: pointer;
}

@media (max-width: 900px) {
  .hero-grid, .about-cols { grid-template-columns: 1fr; }
  .hero-portrait { grid-row: auto; grid-column: 1; order: 2; max-width: 460px; }
  .hero-facts { order: 3; }
  .app { grid-template-columns: 1fr; }
  .sites { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .matrix { grid-template-columns: repeat(2, 1fr); }
  .matrix-item:nth-child(2) { border-inline-end: 0; }
  .matrix-item:nth-child(n+3) { border-top: 2px solid var(--burgundy); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top-role { display: none; }
  .top-logo img { height: 40px; }
  .hero { padding-top: 84px; }
  .hero-facts { gap: 10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding-inline-end: 10px; }
  .matrix { grid-template-columns: 1fr; }
  .matrix-item { border-inline-end: 0; }
  .matrix-item + .matrix-item { border-top: 2px solid var(--burgundy); }
  .video-grid { grid-template-columns: 1fr; }
  .folder-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .folder-grid .thumb-title { width: 46%; font-size: 8cqw; }
  .folder-grid .thumb-title[dir="rtl"] { font-size: 8.6cqw; }
  .folder-grid .thumb-topic, .folder-grid .thumb-tag { display: none; }
  .dock a, .dock-lang { padding: 4px 9px; font-size: 13px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .dot { animation: none; }
  .btn:hover { transform: none; }
}
