/* ==========================================================================
   Design Tokens — eTeacher PRO / cAmpus (web)
   Single source of truth. Reference these vars; never hardcode values.
   Self-hosted Poppins (offline-safe for browser + Android webview).
   ========================================================================== */

/* --- Self-hosted Poppins ------------------------------------------------- */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/poppins/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/poppins/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/poppins/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/poppins/poppins-700.woff2') format('woff2');
}

/* ==========================================================================
   eTeacher PRO / cAmpus DEFAULT THEME (Layer 1 — theme tokens)
   This :root block is the application's DEFAULT THEME: the single source of
   truth for every colour, font, weight and size the UI renders.
   Override contract: a future portal reskins the whole app by RE-DECLARING
   these same custom properties in a more specific / later-ranked scope
   (e.g. a [data-theme="…"] scope, or a portal stylesheet loaded after
   tokens.css). Because every .ds-* component class (Layer 2) references
   these tokens only — never a literal colour/size — overriding the values
   here reskins every .ds-* consumer at once, from ONE place, with no
   per-page or per-class change.
   Layer discipline: Layer 1 theme tokens (this block) -> Layer 2 .ds-*
   component classes -> Layer 3 HTML/JS consumers.
   ========================================================================== */
:root {

  /* --- Brand ------------------------------------------------------------ */
  --color-green:         #27B15D;
  --color-green-hover:   #24A255;
  --color-red:           #D31334;
  --color-red-hover:     #B81C29;   /* "dark red" */
  --color-yellow:        #F4B20B;
  --color-yellow-hover:  #E3A50A;

  /* --- Neutrals (grey ramp) --------------------------------------------- */
  --color-black:          #161616;
  --color-menu-black:     #282828;   /* SD menu chrome */
  --color-text:           #161616;
  --color-text-secondary: #5E5F5F;
  --color-text-muted:     #959595;
  --color-on-dark-muted:  #CFCFCF;   /* muted text on dark surfaces (e.g. --color-menu-black) */
  --color-border:         #DDDDDD;
  --color-surface:        #F9F9F9;    /* alt background */
  --color-background:     #FFFFFF;
  --color-white:          #FFFFFF;

  /* --- Semantic roles (map jobs -> brand) ------------------------------- */
  --color-primary:        var(--color-green);
  --color-primary-hover:  var(--color-green-hover);
  --color-danger:         var(--color-red);
  --color-danger-hover:   var(--color-red-hover);
  --color-warning:        var(--color-yellow);
  --color-warning-hover:  var(--color-yellow-hover);
  --color-link:           var(--color-red);
  --color-link-hover:     var(--color-red-hover);

  /* --- Typography ------------------------------------------------------- */
  --font-family-base: 'Poppins', 'Segoe UI', Helvetica, Arial, sans-serif;

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --fs-xs:   0.75rem;   /* 12px */
  --fs-sm:   0.875rem;  /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-md:   1.125rem;  /* 18px */
  --fs-lg:   1.25rem;   /* 20px */
  --fs-xl:   1.5rem;    /* 24px */
  --fs-2xl:  1.875rem;  /* 30px */
  --fs-3xl:  2.25rem;   /* 36px */

  --lh-tight: 1.2;
  --lh-base:  1.5;

  /* --- Spacing (4px base) ----------------------------------------------- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-7: 28px; --space-8: 32px;

  /* --- Radius / z-index ------------------------------------------------- */
  --radius-sm: 4px;
  --radius-md: 8px;

  --z-header:  100;
  --z-overlay: 1000;
  --z-modal:   1100;

  /* Breakpoints (documented — CSS vars can't be used in @media):
     mobile <600px · tablet 600–1023px · desktop >=1024px */
}

/* Compact type at the documented mobile breakpoint (<600px).
   Only the two largest steps are oversized on phones; reassigning the
   CSS custom properties inside @media updates every var(--fs-*) consumer. */
@media (max-width: 599px) {
  :root {
    --fs-2xl: 1.5rem;   /* 30px -> 24px */
    --fs-3xl: 1.75rem;  /* 36px -> 28px */
  }
}
