/* ============================================================
   UPRISE AI — Design Tokens
   colors_and_type.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Noto+Kufi+Arabic:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Varino';
  src: url('fonts/Varino_Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   COLOR PRIMITIVES
   ============================================================ */
:root {
  /* ── Brand canonical tokens ── */
  --brand-primary:    #F1731D;   /* orange — primary CTA / accent */
  --brand-primary-dk: #C75A10;   /* orange hover/active */
  --brand-navy:       #0F3C5A;   /* navy — headings, nav, structure */
  --brand-navy-lt:    #1A4E6B;
  --brand-teal:       #458C9B;   /* teal — secondary/supportive */
  --brand-bg:         #F5F5F0;   /* cream — page background */
  --brand-font:       'Inter', sans-serif;

  /* ── Navy / teal scale ── */
  --c-teal-950: #071E2D;
  --c-teal-900: #0F3C5A;   /* brand-primary */
  --c-teal-800: #1A4E6B;   /* brand-primary-lt */
  --c-teal-700: #25607C;
  --c-teal-500: #458C9B;   /* brand-teal */
  --c-teal-400: #5AA3B0;
  --c-teal-300: #82BFC9;
  --c-teal-200: #B2D9E0;
  --c-teal-100: #DFF0F3;

  /* ── Orange accent ── */
  --c-orange-600: #C75A10;
  --c-orange-500: #F1731D;   /* brand-orange */
  --c-orange-400: #F48B42;
  --c-orange-300: #F8AE78;
  --c-orange-100: #FEF0E6;

  /* ── Dark backgrounds ── */
  --c-bg-950: #060E14;
  --c-bg-900: #0C1E2B;
  --c-bg-800: #112539;
  --c-bg-700: #183045;
  --c-bg-600: #1E3B52;
  --c-bg-500: #254A64;

  /* ── Borders ── */
  --c-border-subtle: #1E3B52;
  --c-border:        #2A506C;
  --c-border-strong: #3A6882;

  /* ── Foreground (on dark) ── */
  --c-fg-1: #F0F6FA;
  --c-fg-2: #A8C8D8;
  --c-fg-3: #6A96A8;
  --c-fg-4: #3A6070;

  /* ── Light mode surfaces ── */
  --c-cream:      #F5F5F0;   /* brand-bg */
  --c-cream-dark: #E8E8E2;
  --c-fg-light-1: #0F3C5A;
  --c-fg-light-2: #1A4E6B;
  --c-fg-light-3: #458C9B;

  /* ── Status ── */
  --c-success: #22C07A;
  --c-warning: #F0A428;
  --c-error:   #E84848;
}

/* ============================================================
   SEMANTIC COLOR TOKENS  (LIGHT / CREAM is the default)
   ============================================================ */
:root {
  /* Surfaces */
  --surface-bg:      var(--c-cream);       /* page background */
  --surface-default: #FFFFFF;              /* main content surface */
  --surface-card:    #FFFFFF;              /* cards */
  --surface-raised:  var(--c-cream);       /* raised panels on white */
  --surface-overlay: var(--c-cream-dark);  /* hover / pressed surfaces */
  --surface-dark:    var(--c-bg-900);      /* opt-in dark section (e.g. footer or single hero) */

  /* Text */
  --text-primary:   var(--c-fg-light-1);   /* navy */
  --text-secondary: var(--c-fg-light-2);
  --text-muted:     var(--c-fg-light-3);
  --text-disabled:  #93A8B4;
  --text-accent:    var(--c-orange-500);   /* orange — for highlighted words */
  --text-on-accent: #FFFFFF;               /* text on orange button */
  --text-on-dark:   var(--c-fg-1);         /* text on opt-in dark sections */

  /* Brand — orange leads */
  --brand-primary-sem:   var(--c-orange-500);
  --brand-secondary-sem: var(--c-teal-900);
  --brand-accent-sem:    var(--c-orange-500);
  --brand-glow:          var(--c-orange-400);

  /* Interactive — primary CTAs are orange */
  --interactive-default: var(--c-orange-500);
  --interactive-hover:   var(--c-orange-600);
  --interactive-active:  var(--c-orange-600);
  --interactive-focus:   var(--c-orange-400);

  /* Borders */
  --border-subtle:  #D4DDE2;
  --border-default: #B0CDD6;
  --border-strong:  var(--c-teal-500);
  --border-accent:  var(--c-orange-500);

  /* Shadows — soft, not glowy (no AI-slop glow) */
  --shadow-sm:   0 1px 2px rgba(15,60,90,0.06);
  --shadow-md:   0 2px 12px rgba(15,60,90,0.08), 0 0 0 1px rgba(15,60,90,0.04);
  --shadow-lg:   0 4px 24px rgba(15,60,90,0.10), 0 0 0 1px rgba(15,60,90,0.05);
  --shadow-xl:   0 8px 48px rgba(15,60,90,0.14);
  --shadow-glow: 0 0 24px rgba(241,115,29,0.22);  /* orange glow when used */

  /* Radii */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Spacing */
  --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-32: 128px;

  /* Transitions */
  --ease-out-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:        cubic-bezier(0.2, 0, 0, 1);
  --duration-fast:   150ms;
  --duration-base:   200ms;
  --duration-slow:   350ms;
  --duration-enter:  600ms;
}

/* ============================================================
   TYPOGRAPHY TOKENS
   ============================================================ */
:root {
  /* Font families */
  --font-display: 'Varino', 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-arabic:  'Noto Kufi Arabic', sans-serif;

  /* Font sizes */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  /* Line heights */
  --leading-none:    1;
  --leading-tight:   1.2;
  --leading-snug:    1.35;
  --leading-normal:  1.5;
  --leading-relaxed: 1.65;

  /* Letter spacing */
  --tracking-tight:   -0.02em;
  --tracking-snug:    -0.01em;
  --tracking-normal:  0em;
  --tracking-wide:    0.04em;
  --tracking-wider:   0.08em;
  --tracking-widest:  0.12em;

  /* Font weights */
  --weight-light:    300;
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-extrabold:800;
}

/* ============================================================
   SEMANTIC TYPE STYLES
   ============================================================ */

h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-wrap: pretty;
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-wrap: pretty;
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--text-primary);
}

h4, .h4 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--text-primary);
}

p, .body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.body-lg {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.body-sm {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

.caption {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--c-teal-300);
}

[lang="ar"], .arabic {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
}

/* ============================================================
   OPT-IN DARK SECTION
   Apply to a single section/hero/footer when needed.
   The site is light by default; this is NOT a global toggle.
   Usage:  <section class="dark-section"> ... </section>
   ============================================================ */
.dark-section, [data-theme="dark"] {
  --surface-bg:      var(--c-bg-950);
  --surface-default: var(--c-bg-900);
  --surface-card:    var(--c-bg-800);
  --surface-raised:  var(--c-bg-700);
  --surface-overlay: var(--c-bg-600);
  --text-primary:    var(--c-fg-1);
  --text-secondary:  var(--c-fg-2);
  --text-muted:      var(--c-fg-3);
  --border-subtle:   var(--c-border-subtle);
  --border-default:  var(--c-border);
  background: var(--surface-bg);
  color: var(--text-primary);
}
