/* =============================================================================
   Okommerce theme — soflow-inspired
   LOCKED design tokens. Do not modify per-page.
   Used across: marketing site, admin, all PWAs, generated templates.
   ============================================================================= */

:root {
  /* ---- Surfaces ---- */
  --ok-cream:           #FBFAF6;
  --ok-cream-hover:     #F5F3ED;
  --ok-cream-card:      #FFFFFF;
  --ok-paper:           #FFFFFF;

  /* ---- Primary brand action color (blue) ---- */
  --ok-primary:         #2563B8;
  --ok-primary-hover:   #1E4F94;
  --ok-primary-deep:    #173E76;
  --ok-primary-soft:    #C8D7EE;
  --ok-primary-tint:    #E5EDF8;

  /* ---- Secondary brand identity (teal) — used for logo, accents ---- */
  --ok-teal:            #0F5F5C;
  --ok-teal-hover:      #0A4A48;
  --ok-teal-deep:       #074745;
  --ok-mint:            #E1F0EE;
  --ok-mint-hover:      #CFE6E3;
  --ok-mint-deep:       #B7D8D3;

  /* ---- KPI block colors (vivid, distinctive) ---- */
  --ok-coral:           #D85A30;
  --ok-coral-soft:      #F5C9B8;
  --ok-amber:           #E59930;
  --ok-amber-soft:      #F5DEB8;
  --ok-blue:            #2563B8;
  --ok-blue-soft:       #C8D7EE;

  /* ---- Status & feedback ---- */
  --ok-success:         #2A8466;
  --ok-success-soft:    #D9EFE5;
  --ok-warning:         #C77E1D;
  --ok-warning-soft:    #F5DEB8;
  --ok-danger:          #C44530;
  --ok-danger-soft:     #F5C9B8;
  --ok-info:            #2563B8;
  --ok-info-soft:       #C8D7EE;
  --ok-peach:           #FBF1EB;

  /* ---- Text ---- */
  --ok-ink:             #0E1F1E;
  --ok-ink-muted:       #4F6361;
  --ok-ink-soft:        #768B89;
  --ok-ink-faint:       #A8B6B4;
  --ok-ink-on-teal:     #FFFFFF;
  --ok-ink-on-coral:    #FFFFFF;
  --ok-ink-on-amber:    #1F1505;
  --ok-ink-on-blue:     #FFFFFF;

  /* ---- Borders & dividers ---- */
  --ok-border:          #E8E2D5;
  --ok-border-strong:   #D4CCBC;
  --ok-border-mint:     #B7D8D3;
  --ok-divider:         #EDE8DC;

  /* ---- Radii ---- */
  --ok-radius-pill:     24px;
  --ok-radius-lg:       16px;
  --ok-radius-md:       12px;
  --ok-radius-sm:       8px;
  --ok-radius-xs:       6px;

  /* ---- Shadows ---- */
  --ok-shadow-card:     0 1px 2px rgba(15, 95, 92, 0.04), 0 4px 12px rgba(15, 95, 92, 0.06);
  --ok-shadow-pop:      0 8px 24px rgba(15, 95, 92, 0.12);
  --ok-shadow-modal:    0 24px 64px rgba(15, 95, 92, 0.18);

  /* ---- Typography ---- */
  --ok-font-sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ok-font-display:    'Inter', sans-serif;
  --ok-font-mono:       'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  --ok-font-arabic:     'Tajawal', 'Noto Sans Arabic', sans-serif;

  /* ---- Layout ---- */
  --ok-content-max:     1280px;
  --ok-content-narrow:  960px;
  --ok-content-wide:    1440px;
  --ok-nav-h:           72px;

  /* ---- Spacing (4px scale) ---- */
  --ok-s-1: 4px;
  --ok-s-2: 8px;
  --ok-s-3: 12px;
  --ok-s-4: 16px;
  --ok-s-5: 20px;
  --ok-s-6: 24px;
  --ok-s-8: 32px;
  --ok-s-10: 40px;
  --ok-s-12: 48px;
  --ok-s-16: 64px;
  --ok-s-20: 80px;
  --ok-s-24: 96px;
  --ok-s-32: 128px;

  /* ---- Type scale ---- */
  --ok-text-xs:   12px;
  --ok-text-sm:   13px;
  --ok-text-md:   14px;
  --ok-text-base: 16px;
  --ok-text-lg:   18px;
  --ok-text-xl:   22px;
  --ok-text-2xl:  28px;
  --ok-text-3xl:  36px;
  --ok-text-4xl:  48px;
  --ok-text-5xl:  64px;
  --ok-text-6xl:  84px;

  /* ---- Letter spacing ---- */
  --ok-tracking-tight:  -0.03em;
  --ok-tracking-snug:   -0.02em;
  --ok-tracking-normal: 0;
  --ok-tracking-wide:   0.08em;
  --ok-tracking-wider:  0.14em;
  --ok-tracking-widest: 0.18em;
}

/* =============================================================================
   Reset & base
   ============================================================================= */

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

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

body {
  margin: 0;
  font-family: var(--ok-font-sans);
  font-size: var(--ok-text-base);
  line-height: 1.5;
  color: var(--ok-ink);
  background: var(--ok-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--ok-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--ok-primary-hover); }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 800;
  letter-spacing: var(--ok-tracking-tight);
  line-height: 1.05;
  color: var(--ok-ink);
}

p { margin: 0; }

button { font-family: inherit; cursor: pointer; }

/* =============================================================================
   Editorial type primitives — soflow voice
   ============================================================================= */

/* Lowercase heavy display headlines */
.ok-display {
  font-family: var(--ok-font-display);
  font-weight: 800;
  letter-spacing: var(--ok-tracking-tight);
  line-height: 1.02;
  text-transform: lowercase;
  color: var(--ok-ink);
}
.ok-display-1 { font-size: clamp(40px, 6vw, 84px); }
.ok-display-2 { font-size: clamp(32px, 4.5vw, 64px); }
.ok-display-3 { font-size: clamp(28px, 3.5vw, 48px); }

/* All-caps tracked section labels */
.ok-eyebrow {
  font-size: var(--ok-text-xs);
  font-weight: 700;
  letter-spacing: var(--ok-tracking-wider);
  text-transform: uppercase;
  color: var(--ok-teal);
}

/* Section subtitles */
.ok-lead {
  font-size: var(--ok-text-lg);
  line-height: 1.55;
  color: var(--ok-ink-muted);
  font-weight: 400;
  max-width: 60ch;
}

/* Body muted */
.ok-muted { color: var(--ok-ink-muted); }
.ok-soft  { color: var(--ok-ink-soft); }

/* =============================================================================
   Layout primitives
   ============================================================================= */

.ok-container {
  width: 100%;
  max-width: var(--ok-content-max);
  margin: 0 auto;
  padding: 0 var(--ok-s-6);
}

.ok-container-narrow { max-width: var(--ok-content-narrow); }
.ok-container-wide   { max-width: var(--ok-content-wide); }

.ok-section { padding: var(--ok-s-20) 0; }
.ok-section-sm { padding: var(--ok-s-12) 0; }
.ok-section-lg { padding: var(--ok-s-24) 0; }

.ok-grid { display: grid; gap: var(--ok-s-4); }
.ok-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ok-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ok-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .ok-grid-3, .ok-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ok-grid-2, .ok-grid-3, .ok-grid-4 { grid-template-columns: 1fr; }
}

/* Skip link for accessibility */
.ok-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ok-teal);
  color: white;
  padding: 8px 16px;
  z-index: 100;
}
.ok-skip-link:focus { top: 0; }

/* Visually-hidden helper for SR-only content */
.ok-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
