/* ============================================================
   RRAY — single-page site. Strict black & white identity, Thmanyah
   typography (Arabic-first, RTL). No color hue is used anywhere —
   every accent is grayscale, contrast, and motion instead.
   ============================================================ */

@font-face {
  font-family: "Thmanyah Sans";
  src: url("../fonts/thmanyah/thmanyahsans-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("../fonts/thmanyah/thmanyahsans-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("../fonts/thmanyah/thmanyahsans-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("../fonts/thmanyah/thmanyahsans-Black.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Display";
  src: url("../fonts/thmanyah/thmanyahserifdisplay-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Display";
  src: url("../fonts/thmanyah/thmanyahserifdisplay-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Display";
  src: url("../fonts/thmanyah/thmanyahserifdisplay-Black.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #050505;
  --bg-alt: #0a0a0a;
  --card: #0f0f0f;
  --card-hover: #151515;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --ink: #f5f5f5;
  --ink-dim: #a3a3a3;
  --ink-mute: #6b6b6b;
  --white: #ffffff;
  --radius: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Thmanyah Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: "Thmanyah Display", "Thmanyah Sans", serif; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 100%; height: 100%; }
img { max-width: 100%; display: block; }

/* film-grain texture — the one bit of "life" allowed on a flat black canvas */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.85), transparent);
  backdrop-filter: blur(10px);
}
/* The wordmark is a Latin lockup (logo="R" + "RAY") regardless of the page's
   RTL context — direction: ltr keeps the glyph immediately before the text
   it belongs to, reading as one continuous "RRAY", not reflowed by the
   surrounding Arabic layout. */
.brand { display: flex; align-items: center; gap: 4px; direction: ltr; }
.brand-mark { height: 26px; width: 26px; object-fit: contain; }
.brand-word { font-family: "Thmanyah Display", serif; font-weight: 900; font-size: 20px; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 34px; }
.site-nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-dim);
  transition: color 0.25s var(--ease);
}
.site-nav a:hover { color: var(--white); }
@media (max-width: 760px) { .site-nav { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; border-radius: 999px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  white-space: nowrap;
}
.btn-solid { background: var(--white); color: #000; box-shadow: 0 0 0 0 rgba(255,255,255,0); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(255,255,255,0.25); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); padding: 10px 22px; }
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }
.btn-line { border: 1px solid var(--line); color: var(--ink-dim); }
.btn-line:hover { color: var(--white); border-color: rgba(255,255,255,0.3); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 140px 20px 80px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -20%; left: 50%; translate: -50% 0;
  width: min(900px, 140vw); height: 700px;
  background: radial-gradient(closest-side, rgba(255,255,255,0.14), rgba(255,255,255,0.02) 60%, transparent 75%);
  filter: blur(10px);
  pointer-events: none;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-dim);
  margin-bottom: 28px; position: relative; z-index: 2;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--white); box-shadow: 0 0 12px 2px rgba(255,255,255,0.7); }
.hero h1 {
  position: relative; z-index: 2;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 900; line-height: 1.18; letter-spacing: -0.01em;
  max-width: 18ch;
}
.hero-accent {
  display: inline-block;
  background: linear-gradient(90deg, #fff, #8a8a8a, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
  padding-bottom: 0.08em;
}
@keyframes shine { to { background-position: -200% center; } }
.hero-lede {
  position: relative; z-index: 2;
  max-width: 640px; margin-top: 26px;
  font-size: clamp(15px, 2vw, 18px); color: var(--ink-dim); line-height: 1.85;
}
.hero-cta { position: relative; z-index: 2; display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }
.hero-scroll {
  position: absolute; bottom: 36px; left: 50%; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid var(--line); border-radius: 20px;
}
.hero-scroll span {
  display: block; width: 4px; height: 8px; margin: 8px auto 0; border-radius: 3px;
  background: var(--white); animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0%,100% { opacity: 0; transform: translateY(0);} 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(14px);} }

/* ---------- sections ---------- */
.section { position: relative; z-index: 2; padding: 120px clamp(20px, 6vw, 80px); max-width: 1240px; margin: 0 auto; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-alt) 12%, var(--bg-alt) 88%, transparent); max-width: none; }
.section-alt > * { max-width: 1240px; margin-left: auto; margin-right: auto; }

.section-head { max-width: 640px; margin-bottom: 64px; }
.kicker {
  display: block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--ink-mute); text-transform: uppercase; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 900; line-height: 1.28; }
.section-head p { margin-top: 18px; color: var(--ink-dim); font-size: 16px; line-height: 1.85; }

/* ---------- modality grid ---------- */
.modality-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .modality-grid { grid-template-columns: repeat(2, 1fr); } }
.modality-card {
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 32px 20px; text-align: center; background: var(--card);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.modality-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.22); background: var(--card-hover); }
.modality-icon {
  width: 56px; height: 56px; margin: 0 auto 18px; color: var(--white);
  padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.05);
}
.modality-sub { font-size: 11px; letter-spacing: 0.1em; color: var(--ink-mute); font-weight: 700; margin-bottom: 4px; }
.modality-card h3 { font-size: 17px; font-weight: 700; font-family: "Thmanyah Sans", sans-serif; }

/* ---------- offerings ---------- */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 60px; }
@media (max-width: 900px) { .offer-grid { grid-template-columns: 1fr; } }
.offer-card {
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 34px 28px;
  background: linear-gradient(160deg, var(--card), var(--bg-alt));
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.offer-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.2); }
.offer-index { font-family: "Thmanyah Display", serif; font-size: 13px; color: var(--ink-mute); font-weight: 700; }
.offer-card h3 { margin-top: 16px; font-size: 20px; font-weight: 700; font-family: "Thmanyah Sans", sans-serif; }
.offer-card p { margin-top: 12px; color: var(--ink-dim); font-size: 14.5px; line-height: 1.8; }

.banner {
  border: 1px solid var(--line); border-radius: 28px; padding: 56px clamp(24px, 6vw, 72px);
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 55%), #000;
  text-align: center;
}
.banner-kicker { font-size: 12.5px; letter-spacing: 0.1em; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; margin-bottom: 18px; }
.banner-text { font-size: clamp(17px, 2.4vw, 22px); line-height: 1.9; max-width: 760px; margin: 0 auto; color: var(--ink); }

/* ---------- team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 720px; margin: 0 auto; }
@media (max-width: 700px) { .team-grid { grid-template-columns: 1fr; max-width: 320px; } }
.team-card {
  display: block; width: 100%; appearance: none; font: inherit; color: inherit;
  background: none; cursor: pointer;
  text-align: center; padding: 30px 16px; border-radius: var(--radius);
  border: 1px solid transparent; transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.team-card:hover, .team-card:focus-visible { border-color: var(--line); background: var(--card); transform: translateY(-4px); }
.team-card:focus-visible { outline: 2px solid rgba(255,255,255,0.4); outline-offset: 3px; }
.team-avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(160deg, #1a1a1a, #050505);
  border: 1px solid var(--line);
  font-family: "Thmanyah Display", serif; font-size: 34px; font-weight: 700; color: var(--ink-dim);
}
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 15.5px; font-weight: 700; font-family: "Thmanyah Sans", sans-serif; }
.team-card p { margin-top: 6px; font-size: 13px; color: var(--ink-mute); }

/* ---------- CTA ---------- */
.cta-section {
  position: relative; text-align: center; padding: 140px 20px;
  border-top: 1px solid var(--line-soft);
  overflow: hidden;
}
.cta-glow { top: 10%; }
.cta-section h2 { position: relative; z-index: 2; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; }
.cta-section p { position: relative; z-index: 2; margin-top: 16px; color: var(--ink-dim); font-size: 16px; }
.cta-section .btn { position: relative; z-index: 2; margin-top: 36px; }

/* ---------- footer ---------- */
.site-footer {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 50px 20px 60px; border-top: 1px solid var(--line-soft);
}
.footer-mark { height: 26px; width: 26px; object-fit: contain; opacity: 0.85; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { width: 20px; height: 20px; color: var(--ink-mute); transition: color 0.25s var(--ease); }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 12.5px; color: var(--ink-mute); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-accent, .hero-scroll span { animation: none; }
}

/* ---------- team member bio modal ---------- */
.member-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.member-modal.is-open { display: flex; }
.member-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); }
.member-modal-card {
  position: relative; z-index: 1; width: min(420px, 100%);
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 40px 32px 32px; text-align: center;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.7);
  animation: modalIn 0.35s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.member-modal-close {
  position: absolute; top: 14px; left: 14px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--ink-dim); cursor: pointer; transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.member-modal-close:hover { color: var(--white); border-color: rgba(255,255,255,0.3); }
.member-modal-close svg { width: 14px; height: 14px; }
.member-modal-avatar {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(160deg, #1a1a1a, #050505); border: 1px solid var(--line);
  font-family: "Thmanyah Display", serif; font-size: 38px; font-weight: 700; color: var(--ink-dim);
}
.member-modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-modal-card h3 { font-size: 20px; font-weight: 900; font-family: "Thmanyah Sans", sans-serif; }
.member-modal-role { margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-mute); text-transform: uppercase; }
.member-modal-bio { margin-top: 20px; font-size: 14.5px; line-height: 1.9; color: var(--ink-dim); }
.member-modal-bio-empty { color: var(--ink-mute); font-style: italic; }
