/* ============================================================
   DELMAR DESIGN SYSTEM — Colors & Type
   Source: Delmar Brand Book (2025-10-21)
   Tagline: "Logistics Made Simple"
   ============================================================ */

/* ---------- FONTS ----------
   Primary: Noto Sans (Google Font, all weights, all languages)
   Fallback / Standard: Arial
   - Branded headlines:  Noto Sans Black Italic, UPPERCASE, tracking 25
   - Branded body:       Noto Sans Medium, tracking 25
   - Standard headlines: Arial Black Italic, UPPERCASE
   - Standard body:      Arial Regular
*/
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900&display=swap');

:root {
  /* ===========================================================
     CORE BRAND COLORS (Delmar Blue + Delmar Red + neutrals)
     "Red is to be used sparsely (CTA / highlight). Do not exceed
      2% of red on any layout."
     =========================================================== */

  /* Delmar Blue scale — dominant (PMS 287C) is --blue-700 */
  --blue-300: #1061df;   /* light tint */
  --blue-500: #0845a2;   /* secondary */
  --blue-700: #003685;   /* DOMINANT — PMS 287C, used for logo, body */
  --blue-800: #032c67;   /* deep */
  --blue-900: #021e47;   /* deepest */

  /* Delmar Red scale — dominant (PMS 1925C) is --red-700 */
  --red-300: #f68896;
  --red-500: #ed5e6f;
  --red-700: #db364a;    /* DOMINANT — PMS 1925C, the icon red */
  --red-800: #b71b2f;
  --red-900: #92091a;

  /* Neutrals */
  --white:   #ffffff;
  --black:   #000000;
  --grey:    #e0dfdb;    /* warm light grey */
  --grey-mid:#757779;    /* greyscale-logo grey, C56M46Y44K11 */

  /* ===========================================================
     SUB-BRAND COLORS (Branded House)
     - Fresh: replace red with green  (PMS 360C)
     - Express: keeps Delmar red
     - Delmar-Alisped: green accent   (PMS 347C)
     =========================================================== */

  /* Delmar-Alisped Green */
  --alisped-green: #00904b;        /* PMS 347C */

  /* Fresh Green scale — dominant is --fresh-700 */
  --fresh-300: #7add54;
  --fresh-500: #5dd734;
  --fresh-700: #38bd00;            /* DOMINANT — PMS 360C */
  --fresh-800: #349818;
  --fresh-900: #277510;

  /* Express red — same scale as red-* */
  --express-700: var(--red-700);

  /* ===========================================================
     FUTURE COLORS (off-limits today, defined for completeness)
     =========================================================== */
  --future-purple: #7a45cf;        /* PMS 7677C */
  --future-yellow: #ffc400;        /* PMS 1225C */
  --future-orange: #fd8524;        /* PMS 165C */

  /* ===========================================================
     SEMANTIC TOKENS
     =========================================================== */

  /* Surface */
  --bg:            var(--white);
  --bg-inverse:    var(--blue-700);
  --bg-soft:       var(--grey);
  --bg-muted:      #f5f5f3;
  --surface:       var(--white);
  --surface-dark:  var(--blue-900);

  /* Foreground (text) */
  --fg:            var(--blue-700);   /* Delmar blue is the dominant text color */
  --fg-1:          var(--blue-700);   /* primary text */
  --fg-2:          var(--blue-500);   /* secondary text */
  --fg-3:          var(--grey-mid);   /* tertiary / meta */
  --fg-body:       var(--black);      /* body copy in branded docs is black */
  --fg-on-dark:    var(--white);
  --fg-on-blue:    var(--white);
  --fg-link:       var(--blue-500);

  /* Accent / action — RED IS RARE (under 2% of layout) */
  --accent:        var(--red-700);    /* for CTAs / highlights only */
  --accent-hover:  var(--red-800);

  /* Status (derived from brand palette where possible) */
  --success: var(--fresh-700);
  --warning: var(--future-yellow);
  --danger:  var(--red-800);
  --info:    var(--blue-500);

  /* Borders */
  --border:        rgba(0, 54, 133, 0.12);   /* tinted with blue */
  --border-strong: var(--blue-700);
  --border-soft:   var(--grey);

  /* ===========================================================
     TYPOGRAPHY
     =========================================================== */
  --font-branded:  'Noto Sans', Arial, system-ui, sans-serif;
  --font-standard: Arial, 'Helvetica Neue', system-ui, sans-serif;
  --font-mono:     ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Type scale (px). Headlines are 2–4× body. */
  --fs-display:    72px;
  --fs-h1:         48px;
  --fs-h2:         32px;
  --fs-h3:         24px;
  --fs-body:       16px;
  --fs-small:      14px;
  --fs-micro:      12px;

  /* Line heights */
  --lh-tight:      1.05;
  --lh-snug:       1.2;
  --lh-normal:     1.5;
  --lh-loose:      1.7;

  /* Tracking — brand book specifies "Tracking: 25" (Adobe units) ≈ 0.025em */
  --tracking-branded: 0.025em;
  --tracking-tight:   -0.01em;
  --tracking-wide:    0.08em;

  /* ===========================================================
     SPACING (8pt grid)
     =========================================================== */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  /* ===========================================================
     RADIUS — Delmar is geometric/squared. Use sparingly.
     The icon itself is two pure squares.
     =========================================================== */
  --radius-0:  0;          /* default for cards, banners, buttons */
  --radius-1:  2px;
  --radius-2:  4px;
  --radius-3:  8px;
  --radius-pill: 999px;

  /* ===========================================================
     SHADOWS — minimal; brand is flat/print-derived.
     =========================================================== */
  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(2, 30, 71, 0.08);
  --shadow-2: 0 4px 12px rgba(2, 30, 71, 0.10);
  --shadow-3: 0 12px 32px rgba(2, 30, 71, 0.14);

  /* ===========================================================
     SIGNATURE: Delmar Branded Angle — 12°
     "Pivotal for brand recognition. Forward-thinking and
      forward momentum."
     =========================================================== */
  --brand-angle: 12deg;

  /* ===========================================================
     LAYOUT
     =========================================================== */
  --container:     1280px;
  --container-narrow: 880px;
  --gutter:        var(--space-5);

  /* z-index */
  --z-base: 1;
  --z-sticky: 10;
  --z-overlay: 100;
  --z-modal: 1000;
}

/* ============================================================
   BASE / SEMANTIC TYPE STYLES
   Apply via class OR via element selector inside .delmar scope.
   ============================================================ */

.delmar,
body.delmar {
  font-family: var(--font-standard);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--fg-body);
  background: var(--bg);
  letter-spacing: var(--tracking-branded);
}

/* ----- Headings — Branded headlines are uppercase Black Italic ----- */
.delmar h1, .h1,
.delmar h2, .h2,
.delmar h3, .h3,
.delmar h4, .h4 {
  font-family: var(--font-branded);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  color: var(--fg-1);
  letter-spacing: var(--tracking-branded);
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

.delmar h1, .h1 { font-size: var(--fs-h1); }
.delmar h2, .h2 { font-size: var(--fs-h2); }
.delmar h3, .h3 { font-size: var(--fs-h3); color: var(--fg-2); }
.delmar h4, .h4 { font-size: 18px; color: var(--fg-2); }

.display {
  font-family: var(--font-branded);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-branded);
  color: var(--fg-1);
}

/* ----- Body ----- */
.delmar p, .p {
  font-family: var(--font-branded);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  margin: 0 0 var(--space-4);
  color: var(--fg-body);
  text-wrap: pretty;
}

.delmar small, .small {
  font-size: var(--fs-small);
  color: var(--fg-3);
}

.delmar strong { font-weight: 700; color: var(--fg-1); }
.delmar em     { font-style: italic; }

.delmar a, .link {
  color: var(--fg-link);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 120ms ease;
}
.delmar a:hover, .link:hover { color: var(--blue-700); }

/* ----- Code / mono (utility — not brand-defined) ----- */
.delmar code, .code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: var(--radius-2);
}

/* ----- Tagline / eyebrow ----- */
.eyebrow {
  font-family: var(--font-branded);
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-wide);
  color: var(--accent);
}

/* ============================================================
   BRAND PRIMITIVES — Banner & Branded Angle
   ============================================================ */

/* The utilitarian banner — used to highlight categories.
   Always uppercase, Noto Sans, primary text bold, secondary regular. */
.banner {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: var(--font-branded);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: var(--tracking-branded);
  background: var(--blue-700);
  color: var(--white);
  padding: 0.5em 1em;
  line-height: 1;
}
.banner__primary { font-weight: 900; }
.banner__secondary { font-weight: 500; opacity: 0.9; }

/* The 12° forward-leaning angle — pivotal brand signature. */
.brand-angle      { transform: skewX(calc(-1 * var(--brand-angle))); }
.brand-angle--rev { transform: skewX(var(--brand-angle));    }
.brand-italic     { font-style: italic; } /* logo-style forward lean */

/* The Delmar Wash — image treatment.
   Three valid treatments: desaturate, 15% solid color overlay, multiply. */
.delmar-wash {
  position: relative;
  isolation: isolate;
}
.delmar-wash > img,
.delmar-wash > video {
  filter: saturate(0.85);
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.delmar-wash::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--blue-700);
  mix-blend-mode: multiply;
  opacity: 0.45;
  pointer-events: none;
}
.delmar-wash--solid::after {
  mix-blend-mode: normal;
  opacity: 0.15;
}

/* ============================================================
   FOCUS / MOTION
   ============================================================ */
.delmar :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
