/* SMOrchestra — shared foundation stylesheet
 * -----------------------------------------------------------
 * Loaded FIRST on every page. Page-specific <style> blocks
 * that follow can override any of these rules (cascade order).
 *
 * Contains:
 *   1. Brand design tokens (CSS custom properties)
 *   2. Global resets + base typography
 *   3. Nav primitives (every page has the same nav shell)
 *   4. Footer primitives
 *   5. Layout + utility classes shared site-wide
 *
 * Rules of thumb:
 *   - If a rule is identical across 10+ pages, it belongs here.
 *   - If a page overrides it, keep the page override — don't
 *     fight the cascade, lean on it.
 *   - This file is cached immutably (see netlify.toml headers
 *     on /assets/*). Changing it invalidates every page's
 *     cached bytes — treat as a deliberate design-system move.
 */

/* --- 1. Brand design tokens ------------------------------- */
:root {
  --orange: #ff6b35;
  --cyan: #38bdf8;
  --lime: #bef264;
  --violet: #a78bfa;
  --bg: #000;
  --bg-2: #0a0a0a;
  --card: #141414;
  --card-dark: #141414;
  --rule: #1a1a1a;
  --text: #ffffff;
  --text-body: #cfcfd2;
  --text-muted: #a3a3a3;
  --text-dim: #8a8a8a;
  --text-blue: #b8c4d1;
  --f: "Inter", -apple-system, system-ui, sans-serif;
  --f-ar: "IBM Plex Sans Arabic", "Inter", -apple-system, system-ui, sans-serif;
}

/* --- 2. Global resets + base typography ------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

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

button {
  font-family: inherit;
}

/* --- 3. Nav primitives ------------------------------------ */
/* Every page uses this shell. Page-specific inline CSS may add
 * decorative tweaks (shadow colors, transforms) but should not
 * override the structural rules below. */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.nav-links a:hover,
.nav-links a.on {
  color: var(--orange);
}
.nav-cta {
  padding: 10px 18px;
  background: var(--orange);
  color: #000;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.15s;
}

/* Mobile nav collapse — the hamburger is injected by /assets/nav.js */
@media (max-width: 880px) {
  .nav-links {
    display: none;
  }
}

/* --- 4. Shared layout primitives -------------------------- */
.wrap {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* --- 5. Mobile overflow safety net ------------------------ */
/* Belt-and-suspenders against any runaway element on narrow
 * viewports. Homepage applies this inline already for section
 * containers; this is the site-wide baseline. */
@media (max-width: 640px) {
  html,
  body {
    overflow-x: clip;
    max-width: 100vw;
  }
}

/* --- 6. Print hygiene ------------------------------------- */
@media print {
  .nav,
  .nav-cta,
  .nav-toggle,
  footer form,
  [role="region"][aria-label*="chat"] {
    display: none !important;
  }
  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}
