/* ============================================================
   NAJAM & CO. — DESIGN TOKENS
   Sourced from the live website (index, portfolio, erp-demo).
   The brand has two surface modes: LIGHT (warm cream/sand) and
   DARK (deep aubergine). Colors below are the canonical set —
   light mode is the default.
   ============================================================ */

/* ---- FONTS (loaded via Google Fonts at runtime) ---- */
@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=DM+Mono:wght@400;500&display=swap");

:root {
  /* ---------- BRAND CORE (logo colors) ------------------- */
  --brand-sand:     #f4d3b9;  /* warm cream, bg + highlights      */
  --brand-mauve:    #9a7374;  /* dusty rose, muted accent         */
  --brand-aubergine:#441d51;  /* deep purple, primary ink         */
  --brand-blue:     #0a64c4;  /* logo blue (headline / CTA hue)   */

  /* In the live site the blue is used slightly lighter: #2c72c4.
     Both are legit — aubergine + this blue = primary duo.      */
  --brand-blue-web: #2c72c4;

  /* ---------- LIGHT SURFACE ----------------------------- */
  --bg:      #ffffff;
  --bg-2:    #f5f0eb;   /* soft cream section */
  --bg-3:    #ede4d8;   /* warmer card surface */
  --bg-hover:#efe9e3;   /* subtle hover */

  --fg:      #1c1218;   /* text (near-black aubergine)  */
  --fg-muted:#7a6880;   /* muted copy, labels           */
  --fg-onInk:#ffffff;   /* text on aubergine/blue ink   */

  --border:  rgba(57, 28, 66, 0.12);
  --border-strong: rgba(57, 28, 66, 0.22);
  --card:    rgba(57, 28, 66, 0.03);

  /* ---------- SEMANTIC COLOR ---------------------------- */
  --accent:       var(--brand-blue-web);   /* primary action   */
  --accent-ink:   var(--brand-aubergine);  /* secondary ink    */
  --accent-warm:  var(--brand-sand);       /* warm highlight   */
  --accent-dust:  var(--brand-mauve);      /* tertiary accent  */

  --success: #06ffa5;           /* used sparingly in demos */
  --success-ink: #0a864e;       /* accessible version      */
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    var(--brand-blue-web);

  /* Tinted color washes (for banners, pills, mock panels) */
  --tint-blue:    rgba(44, 114, 196, 0.08);
  --tint-blue-2:  rgba(44, 114, 196, 0.15);
  --tint-purple:  rgba(57, 28, 66, 0.07);
  --tint-purple-2:rgba(57, 28, 66, 0.18);
  --tint-sand:    rgba(244, 211, 185, 0.40);
  --tint-red:     rgba(239, 68, 68, 0.10);
  --tint-amber:   rgba(245, 158, 11, 0.10);

  /* ---------- TYPOGRAPHY -------------------------------- */
  --font-head: "Syne", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale — ranges pulled from live site clamp() values   */
  --fs-display:   clamp(48px, 7vw, 88px);   /* hero H1        */
  --fs-h1:        clamp(40px, 6vw, 72px);
  --fs-h2:        clamp(32px, 4vw, 52px);   /* section title  */
  --fs-h3:        24px;
  --fs-h4:        20px;
  --fs-h5:        16px;
  --fs-lead:      18px;
  --fs-body:      16px;
  --fs-small:     14px;
  --fs-micro:     13px;
  --fs-eyebrow:   12px;   /* uppercase labels */
  --fs-caption:   11px;

  /* Line heights */
  --lh-tight: 1.02;   /* display */
  --lh-snug:  1.1;
  --lh-base:  1.6;
  --lh-body:  1.7;    /* body paragraphs on marketing pages */

  /* Letter spacing */
  --tracking-tight:    -2px;   /* display */
  --tracking-tight-sm: -0.5px;
  --tracking-normal:   0;
  --tracking-loose:    0.06em; /* eyebrows */
  --tracking-looser:   0.12em; /* tiny caps */

  /* Weights */
  --fw-light:     300;
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semi:      600;
  --fw-bold:      700;
  --fw-black:     800;  /* Syne's signature weight */

  /* ---------- SPACING ----------------------------------- */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-30: 120px;   /* section padding */

  /* ---------- RADIUS ------------------------------------ */
  --radius-sm:  4px;    /* tags, small pills  */
  --radius-md:  6px;    /* CTAs, nav pills    */
  --radius-lg:  8px;    /* buttons, inputs    */
  --radius-xl:  12px;   /* cards, kpi tiles   */
  --radius-2xl: 16px;   /* feature cards      */
  --radius-3xl: 20px;   /* hero panels        */
  --radius-pill:100px;  /* badges             */

  /* ---------- SHADOW / ELEVATION ------------------------ */
  --shadow-xs: 0 1px 2px rgba(57, 28, 66, 0.05);
  --shadow-sm: 0 1px 20px rgba(57, 28, 66, 0.08);   /* nav bar */
  --shadow-md: 0 12px 40px rgba(44, 114, 196, 0.25);/* primary btn hover */
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);      /* dark card lift */
  --shadow-ink:0 12px 40px rgba(57, 28, 66, 0.25);

  /* ---------- MOTION ------------------------------------ */
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --dur-fast:  150ms;
  --dur-base:  200ms;
  --dur-slow:  300ms;
  --dur-reveal:700ms;

  /* ---------- LAYOUT ------------------------------------ */
  --container-max: 1200px;
  --page-pad-lg:   60px;
  --page-pad-md:   30px;
  --nav-height:    72px;
}

/* ============================================================
   DARK MODE — deep aubergine on warm-cream ink
   Mirrors [data-theme="dark"] from source site.
   ============================================================ */
[data-theme="dark"] {
  --bg:      #120a18;
  --bg-2:    #1a1025;
  --bg-3:    #221530;
  --bg-hover:#2a1c3a;

  --fg:      #ebd9cc;
  --fg-muted:#9e8fa0;
  --fg-onInk:#ffffff;

  --border:  rgba(235, 217, 204, 0.08);
  --border-strong: rgba(235, 217, 204, 0.18);
  --card:    rgba(235, 217, 204, 0.04);

  --accent:     var(--brand-blue-web);
  --accent-ink: #c9a8d4;          /* lavender-in-dark */
  --tint-blue:    rgba(44, 114, 196, 0.15);
  --tint-blue-2:  rgba(44, 114, 196, 0.25);
  --tint-purple:  rgba(57, 28, 66, 0.25);
  --tint-purple-2:rgba(57, 28, 66, 0.40);

  --shadow-sm: 0 1px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   SEMANTIC ELEMENT STYLES
   Plug colors_and_type.css into any file and text will already
   look "on brand". Override per-component where needed.
   ============================================================ */
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .display,
p { margin: 0; }

/* Display / headings — Syne, black weight, tight tracking */
h1, .h1 {
  font-family: var(--font-head);
  font-weight: var(--fw-black);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
}
h2, .h2 {
  font-family: var(--font-head);
  font-weight: var(--fw-black);
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--fg);
}
h3, .h3 {
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--fg);
}
h4, .h4 {
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h4);
  letter-spacing: -0.3px;
  color: var(--fg);
}
h5, .h5 {
  font-family: var(--font-head);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h5);
  color: var(--fg);
}

.display {
  font-family: var(--font-head);
  font-weight: var(--fw-black);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}

/* Eyebrow / section label: uppercase, widely tracked, ink-purple */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semi);
  letter-spacing: var(--tracking-looser);
  text-transform: uppercase;
  color: var(--brand-aubergine);
  font-family: var(--font-body);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--brand-aubergine);
}

/* Body copy variants */
.lead {
  font-size: var(--fs-lead);
  color: var(--fg-muted);
  font-weight: var(--fw-light);
  line-height: 1.6;
}
p, .body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  text-wrap: pretty;
}
.muted { color: var(--fg-muted); }

/* Code / mono */
code, kbd, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

/* Links — default is accent blue, underline on hover */
a { color: var(--accent); text-decoration: none; transition: opacity var(--dur-base); }
a:hover { opacity: 0.85; }

/* Tiny micro-copy (badges, tags) */
.tag {
  font-size: var(--fs-caption);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--tint-purple);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-weight: var(--fw-medium);
  letter-spacing: 0.03em;
}

/* Pill badge — rounded capsule, used in hero badges / live badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tint-blue);
  border: 1px solid var(--tint-blue-2);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  color: var(--accent);
  letter-spacing: var(--tracking-loose);
  text-transform: uppercase;
}

/* Reveal-on-scroll primitive used site-wide */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity var(--dur-reveal) ease,
    transform var(--dur-reveal) ease;
}
.reveal.visible { opacity: 1; transform: none; }
