/* Kurdish Tech: ink, gold sun, red arcs. Logical properties throughout so Arabic (RTL) mirrors for free. */
:root {
  --bg: #0b0d12;
  --bg-2: #0e1118;
  --card: #11151d;
  --card-2: #161b25;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --paper: #eef1f5;
  --text: #c6ccd8;
  --muted: #8e97aa;
  --gold: #f2b33d;
  --gold-deep: #c98a1e;
  --gold-soft: rgba(242, 179, 61, 0.13);
  --red: #d7372f;
  --green: #5c8a6e;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ar: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --wrap: 1200px;
  --gutter: 28px;
  --radius: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
html[lang="ar"] body {
  font-family: var(--ar);
  font-size: 18px;
  line-height: 1.85;
}
/* Film grain over everything: the difference between flat and expensive. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
::selection {
  background: var(--gold);
  color: #14171f;
}
img,
svg {
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--paper);
  font-weight: 400;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--gold);
  color: #14171f;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}
.ico {
  width: 20px;
  height: 20px;
  flex: none;
}
[dir="rtl"] .ico-arrow {
  transform: scaleX(-1);
}

/* ── Logo mark ─────────────────────────────────────────────────────────── */
.mark .arc {
  fill: none;
  stroke: var(--red);
  stroke-width: 16;
  stroke-linecap: round;
}
.mark .rays,
.mark .disc {
  fill: var(--gold);
}

/* ── Type ──────────────────────────────────────────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font: 700 12.5px/1.4 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 30px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
html[lang="ar"] .kicker {
  font: 700 15px/1.4 var(--ar);
  letter-spacing: 0;
}
h1 em,
h2 em,
.statement em {
  font-style: italic;
  color: var(--gold);
}
html[lang="ar"] h1 em,
html[lang="ar"] h2 em,
html[lang="ar"] .statement em {
  font-style: normal;
}
.lead {
  font-size: clamp(17px, 1.45vw, 20px);
  color: var(--text);
  max-width: 34em;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font: 700 16px var(--sans);
  text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s, background 0.3s;
}
html[lang="ar"] .btn {
  font-family: var(--ar);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-gold {
  background: linear-gradient(180deg, #f8c962, #e8a22a);
  color: #1a1408;
  box-shadow: 0 12px 40px -12px rgba(242, 179, 61, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-gold:hover {
  box-shadow: 0 18px 50px -12px rgba(242, 179, 61, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-ghost {
  color: var(--paper);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.025);
}
.btn-ghost:hover {
  border-color: rgba(242, 179, 61, 0.55);
  background: rgba(242, 179, 61, 0.06);
}
.btn .ico-arrow {
  transition: transform 0.35s var(--ease);
}
.btn:hover .ico-arrow {
  transform: translateX(3px);
}
[dir="rtl"] .btn:hover .ico-arrow {
  transform: scaleX(-1) translateX(3px);
}

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled,
.menu-open .nav {
  background: rgba(11, 13, 18, 0.74);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-color: var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  font: 800 19px var(--sans);
  letter-spacing: -0.01em;
  direction: ltr;
}
.brand .mark {
  width: 40px;
  height: 40px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links > a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.25s;
}
.nav-links > a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}
.nav-links > a:hover {
  color: var(--paper);
}
.nav-links > a:hover::after {
  transform: scaleX(1);
}
/* Where to find us, in the header. Icon-only, so each link carries its own label. */
.social {
  display: flex;
  align-items: center;
  gap: 2px;
}
.social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  transition: color 0.25s, background 0.25s;
}
.social a:hover {
  color: var(--gold);
  background: var(--gold-soft);
}
.nav-in .social {
  padding-inline-start: 12px;
  margin-inline-start: 4px;
  border-inline-start: 1px solid var(--line-2);
}

.lang {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.lang a {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  font: 700 13px var(--sans);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.lang a[lang="ar"] {
  font: 700 15px var(--ar);
}
.lang a:hover {
  color: var(--paper);
}
.lang a[aria-current] {
  background: var(--gold);
  color: #14171f;
}
.menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.menu-btn span {
  width: 18px;
  height: 1.5px;
  background: var(--paper);
  transition: transform 0.35s var(--ease);
}
.menu-open .menu-btn span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}
.menu-open .menu-btn span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 130px 0 90px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 72% 48%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 70% at 72% 48%, #000 10%, transparent 70%);
  opacity: 0.55;
}
[dir="rtl"] .hero-bg {
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 28% 48%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 70% at 28% 48%, #000 10%, transparent 70%);
}
.hero-glow {
  position: absolute;
  z-index: -1;
  top: 50%;
  inset-inline-end: -220px;
  width: 1000px;
  height: 1000px;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(242, 179, 61, 0.2) 0%, rgba(215, 55, 47, 0.06) 36%, transparent 64%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 48px;
}
.hero h1 {
  margin: 26px 0 28px;
  font-family: var(--display);
  font-size: clamp(48px, 7.4vw, 112px);
  font-weight: 340;
  font-variation-settings: "opsz" 144;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
html[lang="ar"] .hero h1 {
  font-family: var(--ar);
  font-size: clamp(44px, 6.4vw, 92px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}
.hero-copy > * {
  animation: rise 1.1s var(--ease) both;
}
.hero-copy > :nth-child(2) {
  animation-delay: 0.12s;
}
.hero-copy > :nth-child(3) {
  animation-delay: 0.24s;
}
.hero-copy > :nth-child(4) {
  animation-delay: 0.36s;
}
.hero-art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1;
}
.hero-art-in {
  width: 100%;
  height: 100%;
  transition: transform 0.9s var(--ease);
  will-change: transform;
}
.emblem {
  width: 100%;
  height: 100%;
  overflow: visible;
  direction: ltr;
}
.emblem .orbit {
  fill: none;
  stroke: rgba(242, 179, 61, 0.22);
  stroke-width: 1;
  stroke-dasharray: 1.5 7;
}
.emblem .ring-text {
  fill: rgba(238, 241, 245, 0.42);
  font: 600 11.5px var(--sans);
  transform-box: view-box;
  transform-origin: 200px 200px;
  animation: spin 180s linear infinite reverse, fade 1.6s 0.8s both;
}
.emblem .arc {
  fill: none;
  stroke: var(--red);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.8s 0.35s var(--ease) forwards;
}
.emblem .rays-in {
  transform-box: view-box;
  transform-origin: 200px 200px;
  animation: rays-in 1.6s 0.1s var(--ease) both;
}
.emblem .rays {
  fill: var(--gold);
  transform-box: view-box;
  transform-origin: 200px 200px;
  animation: spin 140s linear infinite;
}
.emblem .disc {
  transform-box: view-box;
  transform-origin: 200px 200px;
  filter: drop-shadow(0 0 26px rgba(242, 179, 61, 0.6));
  animation: disc-in 1.2s var(--ease) both, breathe 6s 1.2s ease-in-out infinite;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes rays-in {
  from {
    opacity: 0;
    transform: scale(0.55) rotate(-40deg);
  }
}
@keyframes disc-in {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}
@keyframes breathe {
  50% {
    transform: scale(1.045);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(120, 200, 150, 0.6);
  }
  100% {
    box-shadow: 0 0 0 7px rgba(120, 200, 150, 0);
  }
}
@keyframes flip {
  from {
    transform: rotateX(90deg);
    opacity: 0;
  }
}

/* ── Marquee ───────────────────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  padding: 26px 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 70s linear infinite;
}
.marquee-track > div {
  display: flex;
  align-items: center;
  gap: 44px;
  padding-inline-end: 44px;
}
.marquee span {
  font-family: var(--display);
  font-size: 30px;
  font-style: italic;
  font-weight: 300;
  color: rgba(238, 241, 245, 0.55);
  white-space: nowrap;
}
.marquee .w-ar {
  font-family: var(--ar);
  font-style: normal;
  font-weight: 500;
  font-size: 27px;
}
.marquee i {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  opacity: 0.7;
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.section {
  padding: 140px 0;
}
.band {
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 85%);
  border-top: 1px solid var(--line);
}
.head {
  max-width: 780px;
  margin-bottom: 68px;
}
.head h2,
.join h2 {
  margin: 20px 0;
  font-family: var(--display);
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 340;
  font-variation-settings: "opsz" 144;
  line-height: 1.02;
  letter-spacing: -0.026em;
  text-wrap: balance;
}
html[lang="ar"] .head h2,
html[lang="ar"] .join h2 {
  font-family: var(--ar);
  font-size: clamp(34px, 4.4vw, 62px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
}
.head p {
  max-width: 36em;
  color: var(--muted);
  font-size: 18px;
}

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stats {
  padding: 120px 0 20px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  margin-top: 40px;
}
.stat::before {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-bottom: 26px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
[dir="rtl"] .stat::before {
  background: linear-gradient(270deg, var(--gold), transparent);
}
.stat-num {
  font-family: var(--display);
  font-size: clamp(44px, 4.8vw, 72px);
  font-weight: 300;
  font-variation-settings: "opsz" 144;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--paper);
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-num .suf {
  color: var(--gold);
}
html[lang="ar"] .stat-num .suf {
  font-family: var(--ar);
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0;
}
.stat-label {
  max-width: 17em;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

/* ── Project cards ─────────────────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  transition: border-color 0.4s, transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), rgba(242, 179, 61, 0.11), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover {
  border-color: rgba(242, 179, 61, 0.3);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}
.card:hover::before {
  opacity: 1;
}
.card--ferheng {
  grid-column: span 4;
  grid-row: span 2;
}
.card--bot {
  grid-row: span 2;
}
.card-visual {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 30px 24px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.025), transparent 70%);
}
.card-body {
  position: relative;
  padding: 24px 26px 26px;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card h3 {
  font: 700 21px/1.3 var(--sans);
  letter-spacing: -0.01em;
}
html[lang="ar"] .card h3 {
  font-family: var(--ar);
}
.card p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}
html[lang="ar"] .card p {
  font-size: 16px;
  line-height: 1.8;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font: 700 11px/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
html[lang="ar"] .tag {
  font: 700 12.5px/1.4 var(--ar);
  letter-spacing: 0;
}
.tag--live {
  color: #96d4ad;
  border-color: rgba(92, 138, 110, 0.55);
  background: rgba(92, 138, 110, 0.13);
}
.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78c896;
  animation: pulse-green 2s infinite;
}
.tag--data {
  color: var(--gold);
  border-color: rgba(242, 179, 61, 0.35);
  background: var(--gold-soft);
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card { cursor: pointer; }
.card-link .ico-arrow {
  color: var(--gold);
  transition: transform 0.4s var(--ease);
}
.card:hover .card-link .ico-arrow {
  transform: translateX(4px);
}
[dir="rtl"] .card:hover .card-link .ico-arrow {
  transform: scaleX(-1) translateX(4px);
}

/* Ferheng: a search box and a real entry */
.search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 470px);
  height: 58px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--paper);
  font-size: 18px;
}
.search .ico {
  color: var(--muted);
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-inline-start: 3px;
  vertical-align: -3px;
  background: var(--gold);
  animation: blink 1.1s steps(1) infinite;
}
.entry {
  width: min(100%, 470px);
  margin-top: 14px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0d1017;
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.9);
}
.entry-word {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.entry-pos {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}
.entry-ar {
  margin-top: 16px;
  font: 700 23px/1.6 var(--ar);
  color: var(--gold);
  text-align: right;
}
.entry-gloss {
  margin-top: 8px;
  color: var(--text);
  font-size: 15px;
}

/* Bot: the real reply to "ماء" */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 330px;
  font-size: 14.5px;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-size: 14px;
}
.chat-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.chat-avatar {
  width: 38px;
  height: 38px;
  padding: 3px;
  border-radius: 50%;
  background: #14171f;
  border: 1px solid var(--line-2);
}
.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.6;
}
.msg.me {
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  background: #2b5278;
  color: #fff;
  font: 500 17px var(--ar);
}
.msg.bot {
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  background: #1e2430;
  color: var(--paper);
}
.msg.bot b {
  font-family: var(--ar);
}
.lnk {
  color: #6ab2f2;
}

/* Corpus: share of words by dialect */
.share {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 340px;
}
.share-row {
  display: grid;
  grid-template-columns: 92px 1fr 52px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.share-row b {
  color: var(--paper);
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.share small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
.track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
}
.bar {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transform-origin: left center;
  transition: transform 1.5s var(--ease) 0.25s;
}
[dir="rtl"] .bar {
  transform-origin: right center;
  background: linear-gradient(270deg, var(--gold-deep), var(--gold));
}
.js .reveal .bar {
  transform: scaleX(0);
}
.js .reveal.in .bar {
  transform: scaleX(1);
}

/* Tokenizers */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.chip {
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: 500 13px ui-monospace, "Cascadia Code", Consolas, monospace;
}
.chip b {
  color: var(--gold);
  font-weight: 600;
}

/* Metrics */
.big {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.big-num {
  font-family: var(--display);
  font-size: 96px;
  font-weight: 300;
  line-height: 0.9;
  color: var(--gold);
}
.big-label {
  max-width: 15em;
  color: var(--muted);
  font-size: 14px;
}

/* Spell checker */
.spell {
  margin-bottom: 34px;
  font-family: var(--display);
  font-size: 21px;
  white-space: nowrap;
  color: var(--paper);
  text-align: center;
}
.typo {
  position: relative;
  text-decoration: underline wavy var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 7px;
}
.fix {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--paper);
  color: #14171f;
  font: 700 13px var(--sans);
  white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
}
.fix::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

/* Kurdle */
.tiles {
  display: flex;
  gap: 8px;
  perspective: 600px;
}
.tile {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: #2a303d;
  color: #fff;
  font: 800 22px var(--sans);
}
.tile.ok {
  background: #4f8a63;
}
.tile.near {
  background: #c99a2e;
}
.js .reveal.in .tile {
  animation: flip 0.7s var(--ease) both;
  animation-delay: calc(var(--i) * 130ms + 200ms);
}

/* Keyboard */
.keys {
  display: flex;
  gap: 10px;
}
.key {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: linear-gradient(180deg, #252b39, #1a1f2a);
  box-shadow: 0 5px 0 #08090d, inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: var(--paper);
  font: 600 22px var(--sans);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card--keyboard:hover .key:nth-child(4) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #08090d, inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: var(--gold);
}

/* ── Tokenizer comparison ─────────────────────────────────────────────── */
.tok-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tok {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.tok-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.tok-head h3 {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 350;
  letter-spacing: -0.02em;
}
html[lang="ar"] .tok-head h3 {
  font: 800 28px var(--ar);
}
.tok-x {
  font-family: var(--display);
  font-size: 46px;
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
  direction: ltr;
}
.tok-x small {
  margin-inline-start: 8px;
  color: var(--muted);
  font: 600 14px var(--sans);
}
html[lang="ar"] .tok-x small {
  font-family: var(--ar);
}
.tok-row {
  display: grid;
  grid-template-columns: 124px 1fr 56px;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
}
.tok-row .track {
  height: 12px;
}
.tok-row .bar {
  background: rgba(238, 241, 245, 0.26);
}
.tok-row.is-ours .bar {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  box-shadow: 0 0 22px rgba(242, 179, 61, 0.5);
}
[dir="rtl"] .tok-row.is-ours .bar {
  background: linear-gradient(270deg, var(--gold-deep), var(--gold));
}
.tok-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.is-ours .tok-name {
  color: var(--gold);
  font-weight: 800;
}
.tok-row b {
  color: var(--paper);
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.tok-unit {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}
.note {
  max-width: 62em;
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}
.note a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}
.note .ico {
  width: 16px;
  height: 16px;
}

/* ── Mission, path, values ────────────────────────────────────────────── */
.statement {
  max-width: 21em;
  margin-top: 28px;
  font-family: var(--display);
  font-size: clamp(30px, 3.7vw, 56px);
  font-weight: 300;
  font-variation-settings: "opsz" 144;
  line-height: 1.16;
  letter-spacing: -0.022em;
  color: var(--paper);
  text-wrap: pretty;
}
html[lang="ar"] .statement {
  max-width: 24em;
  font: 700 clamp(26px, 3vw, 44px) / 1.6 var(--ar);
  letter-spacing: 0;
}
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  margin-top: 90px;
}
.pillar {
  padding-top: 28px;
  border-top: 1px solid var(--line-2);
}
.pillar .num {
  color: var(--gold);
  font: 500 15px var(--display);
  letter-spacing: 0.1em;
}
.pillar h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  font: 700 20px/1.35 var(--sans);
}
html[lang="ar"] .pillar h3 {
  font-family: var(--ar);
}
.pillar p {
  color: var(--muted);
  font-size: 15.5px;
}
.badge-next {
  padding: 2px 9px;
  border: 1px dashed rgba(242, 179, 61, 0.55);
  border-radius: 99px;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 700;
}
.sub {
  margin: 120px 0 34px;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 350;
  letter-spacing: -0.02em;
}
html[lang="ar"] .sub {
  font: 800 clamp(26px, 2.6vw, 34px) var(--ar);
}
.roadmap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.road {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.road h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--paper);
  font: 800 13px var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
html[lang="ar"] .road h4 {
  font: 800 17px var(--ar);
  letter-spacing: 0;
}
.dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.dot .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.6;
}
.dot--done {
  background: var(--gold);
  color: #14171f;
}
.dot--next {
  border: 1.5px dashed var(--muted);
}
.road ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.road li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.5;
}
.road li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-2);
}
.road--done li::before {
  background: rgba(242, 179, 61, 0.55);
}
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.values li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 340;
  letter-spacing: -0.015em;
}
html[lang="ar"] .values li {
  font: 700 clamp(19px, 1.8vw, 24px) var(--ar);
  letter-spacing: 0;
}
.values span {
  color: var(--gold);
  font: 600 13px var(--sans);
  letter-spacing: 0.08em;
}

/* ── Join ──────────────────────────────────────────────────────────────── */
.join {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6.5vw, 96px);
  border: 1px solid rgba(242, 179, 61, 0.24);
  border-radius: 34px;
  background: radial-gradient(800px 420px at 88% -10%, rgba(242, 179, 61, 0.17), transparent 60%),
    radial-gradient(600px 320px at -5% 110%, rgba(215, 55, 47, 0.13), transparent 60%), var(--card);
}
.join > :not(.join-mark) {
  position: relative;
}
.join > p {
  max-width: 34em;
  color: var(--text);
  font-size: 18px;
}
.join-mark {
  position: absolute;
  inset-inline-end: -90px;
  bottom: -110px;
  width: 460px;
  height: 460px;
  opacity: 0.08;
  pointer-events: none;
}
.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.roles li {
  padding: 9px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
}

/* ── Contact ───────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--paper);
  text-decoration: none;
  transition: border-color 0.35s, background 0.35s, transform 0.5s var(--ease);
}
.contact-item:hover {
  border-color: rgba(242, 179, 61, 0.35);
  background: var(--card-2);
  transform: translateY(-2px);
}
.ico-wrap {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--gold);
}
.contact-item small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.contact-item strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.go {
  margin-inline-start: auto;
  color: var(--muted);
  transition: color 0.3s, transform 0.4s var(--ease);
}
.contact-item:hover .go {
  color: var(--gold);
  transform: translateX(3px);
}
[dir="rtl"] .contact-item:hover .go {
  transform: translateX(-3px);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.footer-tag {
  max-width: 22em;
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}
.quote {
  margin: 0;
  max-width: 18em;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 42px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.2;
  color: var(--paper);
}
.quote small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font: 400 16px var(--sans);
}
html[lang="ar"] .quote small {
  font-family: var(--ar);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-top: 64px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--gold);
}

/* ── 404 ───────────────────────────────────────────────────────────────── */
.nf {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 120px 0 60px;
  text-align: center;
}
.nf-in {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nf-mark {
  width: 140px;
  margin-bottom: 30px;
}
.nf h1 {
  margin: 18px 0;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 340;
}
html[lang="ar"] .nf h1 {
  font: 800 clamp(32px, 4.4vw, 54px) var(--ar);
}
.nf .actions {
  justify-content: center;
}

/* ── Reveal on scroll (only when JS runs, so nothing is ever hidden without it) ── */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
.js .card.reveal.in {
  transition: opacity 1.1s var(--ease), transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s var(--ease);
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-art {
    order: -1;
    justify-self: center;
    max-width: 380px;
  }
  .hero {
    padding-top: 110px;
  }
  .hero-glow {
    top: 26%;
    inset-inline-end: 50%;
    transform: translate(50%, -50%);
    width: 800px;
    height: 800px;
  }
  [dir="rtl"] .hero-glow {
    transform: translate(-50%, -50%);
  }
  .hero-bg,
  [dir="rtl"] .hero-bg {
    -webkit-mask-image: radial-gradient(ellipse 70% 40% at 50% 26%, #000 10%, transparent 70%);
    mask-image: radial-gradient(ellipse 70% 40% at 50% 26%, #000 10%, transparent 70%);
  }
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .card,
  .card--bot {
    grid-column: span 1;
    grid-row: auto;
  }
  .card--ferheng {
    grid-column: span 2;
    grid-row: auto;
  }
  .stats-grid,
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
  .values {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .menu-btn {
    display: flex;
  }
  .nav-links {
    position: fixed;
    inset: 78px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 28px;
    /* Opaque, not near-opaque: the hero's gold glow sits right behind this panel
       and reads through even a few percent of transparency. */
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0.3s;
  }
  .menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-links > a {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    color: var(--paper);
    font-size: 18px;
  }
  .nav-links > a::after {
    display: none;
  }
  .lang {
    align-self: flex-start;
    margin-top: 20px;
  }
  /* In the dropdown the icons sit on their own row, not squeezed beside the links. */
  .nav-in .social {
    padding: 14px 0 0;
    margin: 0;
    border-inline-start: 0;
  }
  .social a {
    width: 44px;
    height: 44px;
  }
  .tok-grid,
  .roadmap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --radius: 20px;
  }
  body {
    font-size: 16px;
  }
  .section {
    padding: 96px 0;
  }
  .stats {
    padding-top: 84px;
  }
  .head {
    margin-bottom: 44px;
  }
  .hero-art {
    max-width: 290px;
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }
  .bento,
  .pillars,
  .values,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .card,
  .card--ferheng {
    grid-column: auto;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 20px;
  }
  .tok {
    padding: 24px 20px;
  }
  .tok-row {
    grid-template-columns: 92px 1fr 44px;
    gap: 10px;
  }
  .tok-name {
    font-size: 13.5px;
  }
  .entry {
    padding: 20px;
  }
  .entry-word {
    font-size: 34px;
  }
  .search {
    height: 52px;
    font-size: 16px;
  }
  .tile {
    width: 44px;
    height: 44px;
  }
  .key {
    width: 46px;
    height: 46px;
    font-size: 19px;
  }
  .marquee span {
    font-size: 24px;
  }
  .marquee .w-ar {
    font-size: 22px;
  }
  .sub {
    margin-top: 90px;
  }
  .join-mark {
    width: 300px;
    height: 300px;
    inset-inline-end: -80px;
    bottom: -80px;
  }
}

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