/* =====================================================================
   مركز التحكم / MISSION CONTROL
   Crown Prince Camel Festival — live-telemetry broadcast concept
   Tokens + base + layout. Components split into components.css,
   sections live in sections.css.
   ===================================================================== */

:root {
  /* ---- Canvas (warm near-black) ---- */
  --bg:           #0C0A09;
  --bg-2:         #110D0A;
  --panel:        #15110D;
  --panel-2:      #1B1611;
  --panel-3:      #221C16;
  --hair:         rgba(255, 255, 255, 0.08);
  --hair-strong:  rgba(255, 255, 255, 0.14);

  /* ---- Data accents (from the logo arc) ---- */
  --speed:        #2EC4B6;   /* teal — speed / live motion (01 palette) */
  --speed-glow:   #3DD9CA;
  --pulse:        #A855C8;   /* violet — heart rate (01 palette) */
  --pulse-deep:   #9340B5;
  --leader:       #D4A017;   /* warm amber — leader / honors (01 palette) */
  --leader-soft:  #E3B840;

  /* ---- Text ---- */
  --ink:          #F3ECE2;   /* warm-white */
  --ink-mute:     #B9AE9F;   /* muted warm-grey */
  --ink-dim:      #8A8073;
  --wordmark:     #787884;

  /* ---- Radii ---- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* ---- Shadows / glows ---- */
  --sh-1: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 40px rgba(0,0,0,.55);
  --sh-2: 0 24px 70px rgba(0,0,0,.6);
  --glow-speed:  0 0 0 1px rgba(46,196,182,.4), 0 0 32px rgba(46,196,182,.35);
  --glow-pulse:  0 0 0 1px rgba(168,85,200,.45), 0 0 34px rgba(168,85,200,.4);
  --glow-leader: 0 0 0 1px rgba(212,160,23,.45), 0 0 30px rgba(212,160,23,.35);

  /* ---- Type scale (modular ~1.26) ---- */
  --t-mega:  clamp(3.2rem, 9vw, 7.5rem);
  --t-xxl:   clamp(2.3rem, 5.4vw, 4.2rem);
  --t-xl:    clamp(1.7rem, 3.4vw, 2.7rem);
  --t-lg:    clamp(1.3rem, 2.1vw, 1.7rem);
  --t-md:    1.125rem;
  --t-base:  1rem;
  --t-sm:    0.875rem;
  --t-xs:    0.75rem;
  --t-xxs:   0.66rem;

  /* ---- Spatial rhythm ---- */
  --gap: clamp(14px, 2vw, 24px);
  --pad-section: clamp(56px, 9vh, 130px);
  --maxw: 1320px;

  --font-ui:  "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-num: "Fira Code", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(46,196,182,.10), transparent 60%),
    radial-gradient(900px 700px at 6% 12%, rgba(168,85,200,.07), transparent 58%),
    radial-gradient(1200px 800px at 50% 120%, rgba(212,160,23,.06), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-base);
  line-height: 1.7;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { margin: 0; }

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

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

/* numerals: mono everywhere they matter */
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---- Focus visibility ---- */
:focus-visible {
  outline: 2px solid var(--speed-glow);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---- Layout helpers ---- */
.wrap {
  width: min(100% - 40px, var(--maxw));
  margin-inline: auto;
}

.section { padding-block: var(--pad-section); position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-family: var(--font-num);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--speed), transparent);
}
html[dir="rtl"] .eyebrow::before {
  background: linear-gradient(270deg, var(--speed), transparent);
}

.section-title {
  font-size: var(--t-xxl);
  margin-top: 14px;
  max-width: 18ch;
}

.lede {
  color: var(--ink-mute);
  font-size: var(--t-lg);
  max-width: 56ch;
  margin-top: 18px;
  font-weight: 400;
}

/* concept tag */
.concept-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-num);
  font-size: var(--t-xxs);
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  border: 1px dashed var(--hair-strong);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  text-transform: uppercase;
}
.concept-tag::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--leader);
  box-shadow: 0 0 8px var(--leader);
}

/* live badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-num);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--pulse-deep), var(--pulse));
  padding: 5px 13px;
  border-radius: var(--r-pill);
  box-shadow: var(--glow-pulse);
}
.live-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: blink 1.4s steps(2, start) infinite;
}
@keyframes blink { 0%,55% { opacity: 1; } 56%,100% { opacity: .25; } }

/* divider hairline with ticks (broadcast lower-third feel) */
.scan-rule {
  height: 1px;
  background: var(--hair);
  position: relative;
}

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