@font-face { font-family: "Teshrin"; src: url("/fonts/teshrin-ar-lt-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Teshrin"; src: url("/fonts/teshrin-ar-lt-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Teshrin"; src: url("/fonts/teshrin-ar-lt-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Teshrin"; src: url("/fonts/teshrin-ar-lt-black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0a09;
  --ink: #f3ede4;
  --mute: #a39a8d;
  --faint: #6d665c;
  --line: rgba(243, 237, 228, 0.10);
  --line-2: rgba(243, 237, 228, 0.22);
  --card: rgba(22, 20, 18, 0.62);
  --accent: #e8b26a;
  --accent-ink: #1a1208;
  --max: 1180px;
  --gut: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Teshrin", Tahoma, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
bdi, .alt { unicode-bidi: isolate; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(11,10,9,.65) 100%),
    linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
}
html:not(.gl) .veil {
  background: radial-gradient(60% 50% at 72% 38%, rgba(232,178,106,.16), transparent 70%), var(--bg);
}

.top, main, .foot { position: relative; z-index: 2; }
.top { z-index: 10; }

.top {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gut);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.top.scrolled { background: rgba(11,10,9,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.mark svg { color: var(--accent); }
.top nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: 15px; }
.top nav a { text-decoration: none; color: var(--mute); transition: color .2s; }
.top nav a:hover { color: var(--ink); }
.lang {
  font: inherit; font-size: 14px; color: var(--ink); background: transparent;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 14px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.lang:hover { border-color: var(--accent); }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 0 80px;
  max-width: 680px;
}
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--mute); font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(232,178,106,.15); }
h1 {
  margin: 0; font-weight: 900;
  font-size: clamp(40px, 7.2vw, 84px); line-height: 1.04; letter-spacing: -.025em;
  text-wrap: balance;
}
[dir="rtl"] h1 { letter-spacing: 0; line-height: 1.25; }
.lede { margin: 26px 0 0; max-width: 560px; color: var(--mute); font-size: clamp(17px, 1.6vw, 20px); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; font-weight: 500;
  transition: transform .25s var(--ease), border-color .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.primary:hover { background: #f0c385; border-color: #f0c385; }

.work { padding: 40px 0 60px; scroll-margin-top: 80px; }
.work-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
h2 { margin: 0; font-weight: 900; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.015em; }
[dir="rtl"] h2 { letter-spacing: 0; }
.work-head p { margin: 0; color: var(--mute); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); }
.card { grid-column: span 2; }
.card.feature { grid-column: span 3; }
.card a {
  position: relative; display: flex; flex-direction: column; height: 100%;
  min-height: 210px; padding: 26px 26px 24px;
  text-decoration: none; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s, transform .4s var(--ease), background .3s;
}
.card.feature a { min-height: 260px; }
.card a:hover, .card a:focus-visible { border-color: rgba(232,178,106,.55); transform: translateY(-4px); background: rgba(30,26,22,.72); }
.card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tag { font-size: 13px; color: var(--accent); letter-spacing: .02em; }
.card h3 { margin: 14px 0 10px; font-size: 24px; font-weight: 700; line-height: 1.25; }
.card.feature h3 { font-size: 32px; }
.card h3 .alt { color: var(--faint); font-weight: 500; margin-inline-start: 6px; }
[lang="ar"] .card h3 .alt { display: none; }
.card p { margin: 0; color: var(--mute); text-wrap: pretty; }
.go {
  position: absolute; top: 22px; inset-inline-end: 24px; font-size: 20px; color: var(--faint);
  transition: color .3s, transform .3s var(--ease);
}
[dir="rtl"] .go { transform: scaleX(-1); }
.card a:hover .go { color: var(--accent); transform: translate(3px, -3px); }
[dir="rtl"] .card a:hover .go { transform: scaleX(-1) translate(3px, -3px); }

.about {
  margin: 40px 0 0; padding: 56px 0 96px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px 48px; align-items: start;
}
.about p { margin: 0; color: var(--mute); font-size: 19px; text-wrap: pretty; }
.about .link { grid-column: 2; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); justify-self: start; padding-bottom: 2px; }
.about .link:hover { color: var(--accent); }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gut) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--faint); font-size: 14px; border-top: 1px solid var(--line);
}
.foot p { margin: 0; }
.foot .links { display: flex; gap: 20px; }
.foot a { text-decoration: none; color: var(--mute); }
.foot a:hover { color: var(--ink); }

/* Entrance: only when JS runs, so the page is never blank without it. */
.js .hero > * { opacity: 0; transform: translateY(14px); animation: rise .9s var(--ease) forwards; }
.js .hero > :nth-child(2) { animation-delay: .08s; }
.js .hero > :nth-child(3) { animation-delay: .18s; }
.js .hero > :nth-child(4) { animation-delay: .28s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .card, .card.feature { grid-column: span 3; }
  .about { grid-template-columns: 1fr; }
  .about .link { grid-column: 1; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .card, .card.feature { grid-column: auto; }
  .card a, .card.feature a { min-height: 0; }
  .card.feature h3 { font-size: 28px; }
  .top nav a[href="#work"] { display: none; }
  .hero { padding-top: 110px; justify-content: flex-end; padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero > * { animation: none; opacity: 1; transform: none; }
  .card a, .btn, .go { transition: none; }
}
