/* ============================================================
   AboRabeaTV — Brand Design System
   Single source of truth for the whole site.
   Colours, fonts and the chromatic-glow treatment are taken
   straight from the Brand Manual (2024).
   ============================================================ */

:root {
  /* ---- Brand palette (from manual) ---- */
  --black:  #06070E;
  --navy:   #070D1E;
  --b2:     #0C2060;
  --glow:   #60A0FF;
  --ice:    #D0E8FF;
  --white:  #FFFFFF;
  --off:    #E8EEFF;
  --cyan:   #88FFEE;
  --purple: #C070FF;
  --red:    #FF7080;
  --amber:  #FFB060;

  /* ---- Derived UI tokens ---- */
  --border:        rgba(96,160,255,.14);
  --border-strong: rgba(96,160,255,.30);
  --card:          rgba(7,13,30,.55);
  --card-hover:    rgba(12,32,96,.35);
  --text:          var(--off);
  --text-dim:      rgba(208,232,255,.62);
  --text-mute:     rgba(208,232,255,.38);
  --label-mute:    rgba(96,160,255,.32);

  /* ---- Type ----
     Latin font is listed FIRST, Arabic font second. Browsers pick the
     first font that has a glyph for each character — so English text
     always uses the Latin fonts (identical on English and Arabic pages),
     while Arabic characters fall through to the Arabic font. */
  --f-display: 'Dancing Script', 'Lalezar', cursive;   /* hero / big names */
  --f-head:    'Kalam', 'Cairo', sans-serif;           /* section headings */
  --f-body:    'Rajdhani', 'Cairo', sans-serif;        /* body copy        */
  --f-mono:    'IBM Plex Mono', 'Cairo', monospace;    /* labels / tags    */

  --wrap: 1140px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Atmospheric background (manual cover treatment): radial glow + faint grid */
body::before {
  content:''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 90% 80% at 50% 8%, #0C2060 0%, #070D1E 52%, #06070E 100%);
}
body::after {
  content:''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg,  transparent, transparent 79px, rgba(96,160,255,.026) 80px),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(96,160,255,.026) 80px);
}

.page { position: relative; z-index: 2; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 64px 40px; }
.band { background: rgba(7,13,30,.55); }
.hdiv { height: 1px; background: linear-gradient(90deg, transparent, var(--b2), transparent); margin: 0; }

/* ---------- Type helpers ---------- */
.stag {
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .5em;
  color: var(--glow); text-transform: uppercase;
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.stag::before { content:''; width: 24px; height: 1px; background: var(--glow); flex-shrink: 0; }
html[dir="rtl"] .stag { letter-spacing: .15em; }

h1, h2 { font-family: var(--f-display); font-weight: 700; color: var(--white); line-height: 1.05; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 22px; }
h3 { font-family: var(--f-head); font-weight: 700; font-size: 1.1rem; color: var(--glow); margin-bottom: 8px; }
html[dir="rtl"] h2 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.25; }

p { font-family: var(--f-body); font-size: 1.05rem; color: var(--text-dim); line-height: 1.75; max-width: 680px; }
html[dir="rtl"] p { line-height: 2; }
a { color: var(--glow); }

.lead { font-size: 1.18rem; color: var(--ice); }

/* ---------- Chromatic name (logo treatment from manual) ---------- */
.chrom { position: relative; display: inline-block; line-height: 1; }
.chrom > span { display:block; font-family: var(--f-display); font-weight: 700; line-height: 1; letter-spacing: .02em; }
.chrom .cyan   { position:absolute; inset:0; color: var(--cyan);   opacity:.55; transform: translate(-3px,-2px); pointer-events:none; }
.chrom .purple { position:absolute; inset:0; color: var(--purple); opacity:.45; transform: translate( 3px, 2px); pointer-events:none; }
.chrom .main   { position: relative; color: var(--white); z-index: 1; }

/* ============================================================
   HEADER / NAV  (injected by site.js)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6,7,14,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .ar-mark { height: 33px; width: auto; flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  font-family: var(--f-head); font-weight: 700; font-size: 1rem;
  color: var(--text-dim); text-decoration: none;
  padding: 8px 14px; border-radius: 8px; transition: all .18s ease; white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: var(--card-hover); }
.nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content:''; display:block; height: 2px; margin-top: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--glow), var(--purple));
}

.nav-right { display: flex; align-items: center; gap: 10px; }

/* Language switch */
.lang-switch {
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .25em;
  color: var(--glow); background: transparent; cursor: pointer;
  padding: 9px 14px; border: 1px solid var(--border-strong); border-radius: 8px;
  text-transform: uppercase; transition: all .18s ease;
  display: inline-flex; align-items: center; gap: 7px;
}
.lang-switch:hover { background: var(--glow); color: var(--black); }
.lang-switch .globe { width: 13px; height: 13px; }

/* Mobile menu toggle */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 9px 11px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--glow); margin: 3px 0; transition: .2s; }

@media (max-width: 860px) {
  .nav { padding: 12px 18px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(6,7,14,.97); border-bottom: 1px solid var(--border);
    padding: 10px 18px 18px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--card-hover); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--f-head); font-weight: 700; font-size: 1rem;
  color: var(--glow); background: transparent; cursor: pointer;
  padding: 12px 22px; border: 1px solid var(--border-strong); border-radius: 9px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 9px;
  transition: all .18s ease;
}
.btn:hover { background: var(--card-hover); border-color: var(--glow); color: var(--white); }
.btn.solid { background: var(--glow); color: var(--black); border-color: var(--glow); }
.btn.solid:hover { background: var(--cyan); border-color: var(--cyan); color: var(--black); }
.btn.ghost { border-color: var(--border); }
.btn.danger { color: var(--red); border-color: rgba(255,112,128,.4); }
.btn.danger:hover { background: rgba(255,112,128,.12); color: var(--red); }

/* ============================================================
   CARDS / GRID
   ============================================================ */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }

/* ============================================================
   HERO
   ============================================================ */
.hero { text-align: center; padding: 80px 0 56px; }
.hero .ar-mark { height: 102px; width: auto; margin: 0 auto 26px; }
.hero .chrom > span { font-size: clamp(3.6rem, 10vw, 7rem); }
.hero-sub { font-family: var(--f-head); font-size: clamp(1rem,2vw,1.25rem); color: var(--text-dim); letter-spacing: .06em; margin-top: 16px; }
.hero-badge {
  font-family: var(--f-mono); font-size: .58rem; letter-spacing: .5em; color: rgba(96,160,255,.4);
  text-transform: uppercase; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 26px; display: inline-block;
}
.cta-row { display: flex; justify-content: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* ============================================================
   FOOTER  (injected by site.js)
   ============================================================ */
.site-footer {
  background: var(--navy); border-top: 1px solid var(--border);
  padding: 46px 40px; text-align: center; position: relative; z-index: 2;
}
.site-footer .foot-name { font-family: var(--f-display); font-weight: 700; font-size: 2rem; color: var(--white); display: block; }
.site-footer .foot-tag  { font-family: var(--f-head); color: var(--text-mute); margin: 4px 0 18px; }
.site-footer .foot-social { display: flex; gap: 14px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.site-footer .foot-social a { color: var(--text-dim); text-decoration: none; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; transition: color .18s; }
.site-footer .foot-social a:hover { color: var(--glow); }
.site-footer .foot-copy { font-family: var(--f-mono); font-size: .54rem; letter-spacing: .4em; color: rgba(96,160,255,.22); text-transform: uppercase; }

/* ============================================================
   FORMS
   ============================================================ */
.field { margin-bottom: 18px; text-align: start; }
.field label { display: block; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--glow); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--navy); border: 1px solid var(--border);
  border-radius: 9px; padding: 13px 15px; color: var(--off); font-family: var(--f-body); font-size: 1rem;
  transition: border-color .18s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--glow); }
.field textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   UTILITIES
   ============================================================ */
.center { text-align: center; }
.muted { color: var(--text-mute); }
.tag-mono { font-family: var(--f-mono); font-size: .56rem; letter-spacing: .35em; color: var(--label-mute); text-transform: uppercase; }
[hidden] { display: none !important; }

/* RTL flips */
html[dir="rtl"] .nav-links a.active::after { background: linear-gradient(270deg, var(--cyan), var(--glow), var(--purple)); }

@media (max-width: 720px) {
  .wrap { padding: 48px 18px; }
}

/* Reveal-on-load stagger */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: rise .6s ease forwards; }
.rise:nth-child(2){ animation-delay:.06s } .rise:nth-child(3){ animation-delay:.12s }
.rise:nth-child(4){ animation-delay:.18s } .rise:nth-child(5){ animation-delay:.24s }
