@import './fonts.css';

/* ==========================================================================
   Mafatih Al-Enjaz — design tokens
   ========================================================================== */
:root {
  /* surfaces */
  --ink-900: #03050a;
  --ink-850: #05070d;
  --ink-800: #070b14;
  --ink-700: #0b1220;
  --ink-600: #101a2c;

  /* glass */
  --glass-top: rgba(255, 255, 255, 0.085);
  --glass-mid: rgba(255, 255, 255, 0.035);
  --glass-bot: rgba(255, 255, 255, 0.055);
  --glass-fill: rgba(9, 14, 24, 0.55);
  --glass-deep: rgba(4, 7, 13, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --line-3: rgba(255, 255, 255, 0.06);

  /* text */
  --txt: #eef2f9;
  --txt-2: #c8d1e0;
  --muted: #93a0b4;
  --muted-2: #6f7c90;

  /* accents */
  --accent: #d6b78c;
  --accent-2: #ecd7b6;
  --accent-ink: #221a10;
  --accent-glow: rgba(214, 183, 140, 0.22);
  --cool: #9dbbff;

  --ok: #6cc7a4;
  --warn: #e6bd74;
  --bad: #ef8f8f;

  /* radii + spacing */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-pill: 999px;

  --pad: clamp(16px, 3vw, 40px);
  --max: 1280px;

  --shadow-1: 0 24px 60px -38px rgba(0, 0, 0, 0.9);
  --shadow-2: 0 40px 120px -60px rgba(0, 0, 0, 1);
  --sheen: inset 0 1px 0 rgba(255, 255, 255, 0.14);

  --font-body: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Almarai: a premium Arabic face whose ج / ز shapes are unmistakable
     (Reem Kufi made «الإنجاز» read like «الانباز»). */
  --font-display: 'Almarai', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-brand: 'Almarai', 'IBM Plex Sans Arabic', system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

/* ==========================================================================
   base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The `hidden` attribute must always win. Several components (mobile sheet,
   lightbox, hero video toggle, advanced filters) carry their own `display`
   value, which would otherwise override the user-agent `[hidden]` rule and
   leave an invisible overlay swallowing clicks. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Honour the OS "reduce motion" setting: animations land on their final state
   instantly instead of playing. Durations are zeroed (not removed) so elements
   that animate into view still end up visible. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink-900);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 760px at 88% -8%, rgba(56, 92, 158, 0.26), transparent 62%),
    radial-gradient(900px 700px at -5% 8%, rgba(170, 126, 76, 0.14), transparent 60%),
    radial-gradient(900px 900px at 50% 110%, rgba(28, 52, 92, 0.22), transparent 65%),
    linear-gradient(180deg, #05070d 0%, #04060b 45%, #05070d 100%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.28;
  margin: 0;
  letter-spacing: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(214, 183, 140, 0.28);
  color: #fff;
}

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

/* scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #05070d;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid #05070d;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(214, 183, 140, 0.45);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}

/* layout */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.container--narrow {
  max-width: 900px;
}
.section {
  position: relative;
  padding-block: clamp(64px, 9vw, 128px);
}
.section--tight {
  padding-block: clamp(44px, 6vw, 76px);
}

.stack {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  align-items: center;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}
.gap-24 {
  gap: 24px;
}
.wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
}
.center {
  justify-content: center;
}
.between {
  justify-content: space-between;
}
.text-center {
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
[dir='rtl'] .eyebrow::before {
  background: linear-gradient(270deg, transparent, var(--accent));
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.22;
  font-weight: 500;
  margin-block: 12px 0;
}
.section-sub {
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px);
  max-width: 62ch;
  margin-block-start: 12px;
  line-height: 1.85;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-block-end: clamp(28px, 4vw, 44px);
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
}
.numeric {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
.accent {
  color: var(--accent);
}
.nowrap {
  white-space: nowrap;
}

hr.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin-block: 28px;
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
