/* ============================================================
   TEZ ERP — base.css
   Design tokens, reset, typography.
   Every page and component pulls from these variables only —
   no hard-coded colors, spacing, or font sizes outside this file.
   ============================================================ */

/* ---- Fonts (Wireframe Typography: Inter + IBM Plex Mono) ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ---- Wireframe Color tokens ---- */
  --dark: #111820;
  /* deep navy/black header bar, principles, legal */
  --ink: #111827;
  /* primary heading & text dark */
  --muted: #667085;
  /* body text & subheadings */
  --line: #d8dde6;
  /* border lines on light */
  --paper: #ffffff;
  /* base light surface */
  --wash: #f4f6f8;
  /* light grey section background */
  --accent: #2357d8;
  /* brand blue / primary button */
  --accent-hover: #1a47b8;
  /* button hover */
  --cta-bg: #e9edf7;
  /* soft blue CTA background */
  --dark-border: #3b4654;
  /* border on dark sections */
  --dark-text: #aeb8c6;
  /* muted text on dark */
  --dark-line: #46505d;
  /* divider on top dark bar */

  /* ---- Brand & Logo Tokens (Derived from Tez ERP Logo) ---- */
  --brand-cyan: #33a7d8;
  /* vibrant brand sky blue from 'TEZ' & chart */
  --brand-cyan-hover: #2494c5;
  /* interactive hover cyan */
  --brand-navy: #252541;
  /* deep midnight slate from 'ERP' & tick */
  --brand-slate: #6a7f9a;
  /* muted slate from 'E-BUSINESS SUITE' */
  --brand-ice: #9fc8dc;
  /* soft ice blue from accent chart bar */
  --brand-tint: #f0f7fb;
  /* soft sky wash surface */
  --tez-blue: #33a7d8;
  --lime: #c8f43d;

  /* ---- Backward-compatible aliases ---- */
  --azure: var(--accent);
  --azure-dark: var(--accent-hover);
  --azure-tint: #e8effe;
  --mist: var(--wash);
  --graphite: var(--ink);
  --slate: var(--muted);
  --slate-soft: #98a2b3;
  --ink-2: #1a2330;
  --ink-line: var(--dark-border);
  --paper-90: rgba(255, 255, 255, .92);
  --ink-90: rgba(17, 24, 32, .95);

  /* ---- Wireframe Font Typography ---- */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --fs-display: clamp(2.6rem, 2rem + 4.5vw, 5.2rem);
  --fs-h1: clamp(2.2rem, 1.6rem + 2.2vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  --fs-h3: clamp(1.2rem, 1.05rem + .5vw, 1.5rem);
  --fs-body-lg: 1.125rem;
  --fs-body: 1rem;
  --fs-body-sm: .9375rem;
  --fs-label: .8125rem;
  --fs-caption: .75rem;

  --lh-tight: 1.08;
  --lh-snug: 1.25;
  --lh-normal: 1.6;

  /* ---- Spacing scale (8px base) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* ---- Layout ---- */
  --header-height: 72px;
  --container: 1200px;
  --container-pad: clamp(20px, 5vw, 64px);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur-fast: .18s;
  --dur-med: .4s;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  letter-spacing: -0.018em;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
.font-display {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: -0.055em;
}

h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.055em;
  line-height: 0.94;
  font-weight: 400;
}

h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.055em;
  line-height: 0.95;
  font-weight: 400;
}

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.035em;
  line-height: var(--lh-snug);
  font-weight: 600;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.eyebrow--on-dark {
  color: var(--dark-text);
}

.numbered {
  position: relative;
}

.numbered::after {
  content: attr(data-no);
  position: absolute;
  top: 32px;
  right: max(24px, calc((100vw - var(--container)) / 2 + var(--container-pad)));
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #98a2b3;
  letter-spacing: 0.05em;
  pointer-events: none;
}

@media (max-width: 767px) {
  .numbered::after {
    display: none;
  }
}

.body-lg {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-normal);
}

.body-sm {
  font-size: var(--fs-body-sm);
}

.text-muted {
  color: var(--slate-soft);
}

.on-dark {
  color: #C6D3EA;
}

/* ---- Layout helpers ---- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--sp-9);
}

.section--tight {
  padding-block: var(--sp-7);
}

.section--dark {
  background: var(--ink);
  color: var(--slate);
}

.section--mist {
  background: var(--mist);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 560px) {
  :root {
    --header-height: 60px;
  }
}

/* Responsive safety utilities */
@media (max-width: 768px) {
  .nowrap {
    white-space: normal !important;
  }

  .hide-mobile {
    display: none !important;
  }
}
