/* ==========================================================================
   Design tokens — حاضنة العمل الحر (WAC Incubator)
   Every colour, size, radius and shadow used on the site is defined here.
   Components read these variables; they never hard-code values.
   ========================================================================== */

@font-face { font-family: "Montserrat Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/Montserrat-Arabic-Regular.ttf") format("truetype"); }
@font-face { font-family: "Montserrat Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/Montserrat-Arabic-Medium.ttf") format("truetype"); }
@font-face { font-family: "Montserrat Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/Montserrat-Arabic-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/Montserrat-Arabic-Bold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat Arabic"; font-weight: 800; font-display: swap; src: url("../fonts/Montserrat-Arabic-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat Arabic"; font-weight: 900; font-display: swap; src: url("../fonts/Montserrat-Arabic-Black.ttf") format("truetype"); }

:root {
  /* ---- brand ---- */
  --burgundy: #9d1d25;
  --burgundy-deep: #7a0012;
  --navy: #0e2d5a;
  --navy-soft: #445e8e;
  --amber: #fdaf56;
  --amber-light: #ffb86b;
  --amber-deep: #f59e0b;
  --green: #10b981;

  /* ---- text ---- */
  --ink: #1c1b1a;            /* strongest text */
  --text: #59413f;           /* body copy */
  --text-muted: #8d706e;     /* helper text, placeholders */
  --text-on-dark: #ffffff;
  --text-on-navy: #d9e3f6;   /* footer copy */

  /* ---- surfaces ---- */
  --surface: #ffffff;
  --page: #fbfbfb;           /* header / neutral page ground */
  --tint-cool: #f8f9ff;      /* cool section ground */
  --tint-warm: #fdf8f6;      /* warm section ground */
  --sand: #f7f3f0;           /* field ground */
  --sand-strong: #f1edeb;
  --gray: #f7f7f7;

  /* ---- lines ---- */
  --line: #ece7e5;
  --line-rose: rgb(225 191 188 / .4);
  --line-rose-strong: rgb(225 191 188 / .6);
  --line-cool: #d9e3f6;
  --line-on-dark: rgb(255 255 255 / .1);

  /* ---- soft fills for pills / icon tiles ---- */
  --amber-soft: rgb(253 175 86 / .15);
  --amber-line: rgb(253 175 86 / .4);
  --burgundy-soft: rgb(157 29 37 / .1);
  --navy-tint: rgb(230 238 255 / .6);

  /* ---- gradients ---- */
  --grad-amber: linear-gradient(135deg, var(--amber-light), var(--amber) 50%, var(--amber-deep));
  --grad-burgundy: linear-gradient(135deg, var(--burgundy), var(--burgundy-deep));
  --grad-brand: linear-gradient(135deg, var(--burgundy), var(--burgundy-deep) 55%, var(--navy));
  --grad-accent-line: linear-gradient(90deg, var(--burgundy-deep), var(--amber));

  /* ---- type ---- */
  --font: "Montserrat Arabic", "Montserrat-Arabic", "Montserrat", system-ui, sans-serif;
  --fs-11: .6875rem;  --fs-12: .75rem;   --fs-14: .875rem;  --fs-16: 1rem;
  --fs-18: 1.125rem;  --fs-20: 1.25rem;  --fs-22: 1.375rem; --fs-24: 1.5rem;
  --fs-28: 1.75rem;   --fs-30: 1.875rem; --fs-36: 2.25rem;  --fs-46: 2.875rem;
  /* fluid headings: shrink smoothly below the design width */
  --fs-h1: clamp(1.5rem, 1.1rem + 1.6vw, var(--fs-30));
  --fs-h2: clamp(1.625rem, 1.1rem + 2vw, var(--fs-36));
  --fs-h3: clamp(1.25rem, 1.05rem + .8vw, var(--fs-24));
  --fs-stat: clamp(2rem, 1.4rem + 2.4vw, var(--fs-46));

  /* ---- spacing (4px scale) ---- */
  --sp-1: .25rem; --sp-2: .5rem;  --sp-3: .75rem; --sp-4: 1rem;  --sp-5: 1.25rem;
  --sp-6: 1.5rem; --sp-8: 2rem;   --sp-10: 2.5rem; --sp-12: 3rem; --sp-16: 4rem;
  --sp-20: 5rem;  --sp-24: 6rem;
  --section-y: clamp(3.5rem, 2rem + 5vw, 6rem);     /* vertical rhythm of sections */
  --gutter: clamp(1rem, .4rem + 2.4vw, 2rem);       /* page side gutter */

  /* ---- layout ---- */
  --container: 78.625rem;    /* 1258px content track */
  --container-wide: 86.75rem;/* 1388px header track */
  --container-narrow: 56rem; /* 896px reading / timeline track */
  --header-h: 5.6875rem;     /* 91px */

  /* ---- radius ---- */
  --r-4: .25rem; --r-6: .375rem; --r-8: .5rem; --r-12: .75rem; --r-16: 1rem; --r-24: 1.5rem; --r-full: 999px;

  /* ---- shadows ---- */
  --sh-xs: 0 1px 2px rgb(0 0 0 / .05);
  --sh-sm: 0 2px 4px -2px rgb(0 0 0 / .1), 0 4px 6px -1px rgb(0 0 0 / .1);
  --sh-md: 0 4px 6px -4px rgb(0 0 0 / .1), 0 10px 15px -3px rgb(0 0 0 / .1);
  --sh-lg: 0 8px 10px -6px rgb(0 0 0 / .1), 0 20px 25px -5px rgb(0 0 0 / .1);
  --sh-xl: 0 25px 50px -12px rgb(0 0 0 / .25);
  --sh-soft: 0 4px 20px -2px rgb(14 45 90 / .04), 0 2px 6px -1px rgb(157 29 37 / .03);
  --sh-brand: 0 4px 16px rgb(157 29 37 / .38);
  --sh-amber: 0 10px 15px -3px rgb(253 175 86 / .35), 0 4px 6px -4px rgb(253 175 86 / .35);

  /* ---- motion ---- */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .26s;                 /* hover / press feedback */
  --t-med: .4s;                   /* cards, menus, underlines */
  --t-slow: .8s;                  /* entrances */
  --t-reveal: 1.1s;               /* scroll reveals */
  --stagger: 130ms;               /* delay between siblings that arrive together */
  --ease-drop: cubic-bezier(.22, 1.18, .36, 1);   /* settles with a small overshoot */
  --ease-soft: cubic-bezier(.33, 0, .2, 1);       /* slow, even ambient motion */

  /* ---- extra ink / on-dark tints (promoted from the first pages) ---- */
  --amber-ink: #764600;        /* text on amber-soft pills, amber icons */
  --rose-pale: #ffdad7;        /* pale rose on burgundy surfaces */
  --on-dark-95: rgb(255 255 255 / .95);
  --on-dark-70: rgb(255 255 255 / .7);
  --on-dark-60: rgb(255 255 255 / .6);
  --on-dark-15: rgb(255 255 255 / .15);
  --fs-44: 2.75rem;
  --fs-page-title: clamp(2rem, 1.3rem + 2.6vw, var(--fs-44));
  --container-mid: 71.75rem;   /* 1148px column used by inner pages */

  /* ---- status greens ---- */
  --green-ink: #047857;        /* text / solid fill of "available", "published" */
  --green-deep: #065f46;       /* text on green-soft */
  --green-soft: #ecfdf5;
  --green-line: #a7f3d0;
  --danger-soft: #fff7f6;      /* ground of an invalid field / error alert */

  /* ---- extra brand shades (promoted from page files) ---- */
  --burgundy-bright: #c4242e;
  --navy-ink: #001a40;
  --navy-mid: #0a1e3c;
  --navy-deep: #051224;
  --sky: #adc7fd;
  --teal: #0d7377;             /* news category */
  --bronze: #683d00;           /* news category */
  --peach: #ffdcbc;
  --sand-deep: #e6e2df;
  --line-rose-solid: #e1bfbc;  /* opaque form of --line-rose-strong */
  --on-dark-85: rgb(255 255 255 / .85);
  --on-dark-80: rgb(255 255 255 / .8);
  --on-dark-20: rgb(255 255 255 / .2);

  /* ---- extra type sizes ---- */
  --fs-10: .625rem;
  --fs-26: 1.625rem;
  --fs-50: 3.125rem;
  --fs-hero: clamp(2rem, 1.15rem + 3.4vw, var(--fs-50));

  /* ---- extra radii ---- */
  --r-20: 1.25rem;
  --r-32: 2rem;

  /* ---- extra shadows ---- */
  --sh-float: 0 8px 30px rgb(0 0 0 / .06);
  --sh-card: 0 0 0 1px rgb(0 0 0 / .02), 0 10px 30px -5px rgb(0 0 0 / .04);

  /* ---- recurring page tracks ---- */
  --container-77: 77rem;       /* 1232px */
  --container-80: 80rem;       /* 1280px */

  /* ---- focus ---- */
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--navy);
  --focus-on-dark: 0 0 0 2px var(--navy), 0 0 0 4px var(--amber);   /* ring on navy / photo grounds */
  --focus-field: 0 0 0 3px color-mix(in srgb, var(--burgundy) 14%, transparent);   /* halo of a focused text field */
}

@media (max-width: 53.75rem) { :root { --header-h: 4.75rem; } }   /* ≤860px */
@media (max-width: 30rem)    { :root { --header-h: 4rem; } }      /* ≤480px */

/* ---- Breakpoints -----------------------------------------------------------
   Custom properties cannot be used inside @media, so the scale is documented here.
   Page and component styles are mobile-first (min-width) and use only these steps:

     40rem   640px   large phones / small tablets: two-column forms and card rows
     48rem   768px   tablets: side-by-side blocks, desktop text sizes for fields
     60rem   960px   small laptops: content + sidebar layouts
     64rem  1024px   laptops: three and four column grids
     75rem  1200px   desktops: full design layout
     80rem  1280px   wide desktops: the 1440px design proportions

   The site header is the one exception: its menu collapses at max-width 77.5rem (1240px),
   where the seven links stop fitting. The same value lives in layout.css and in
   app.js (MENU_BREAKPOINT) — change both together.
   Older rules written desktop-first (max-width) in base.css / layout.css keep their
   values: 30, 37.5, 43.75, 45, 53.75 and 73.75rem belong to the header and footer only.
   -------------------------------------------------------------------------- */
