/* =====================================================
   WPD Cockpit — Base CSS
   Wagenborg brand tokens + reset + typography
   ===================================================== */

/* ---- Fonts ---- */
/* Nunito Sans loaded via <link> in _Layout.cshtml from Google Fonts */

@font-face {
  font-family: "Futura";
  src: url("/fonts/FuturaLT.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura";
  src: url("/fonts/FuturaStd-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Brand Tokens ---- */
:root {
  /* Brand colors */
  --color-brand-1: #df091e; /* Wagenborg Red — RAL 3000 — Pantone Red 032C */
  --color-brand-2: #132739; /* Dark Navy */
  --color-brand-3: #8d969d; /* Wagenborg Grey — RAL 7001 — Pantone Cool Grey 6C */
  --color-brand-4: #e5e7ea; /* Royal Grey */
  --color-brand-5: #6093ac; /* Light Blue — RAL 5024 (secondary) */
  --color-brand-6: #1c1f2a; /* Dark Blue — RAL 7024 (secondary) */
  --color-white: #fff;
  --color-black: #132739;
  --color-transparent: transparent;

  /* Grey scale — derived from Wagenborg Grey #8D969D */
  --color-grey-50: #f5f6f6;
  --color-grey-100: #e5e7ea;
  --color-grey-200: #cdd0d4;
  --color-grey-300: #b5b9be;
  --color-grey-400: #9da2a7;
  --color-grey-500: #8d969d;
  --color-grey-600: #6b7278;
  --color-grey-700: #51575f;
  --color-grey-800: #373c44;
  --color-grey-900: #0e0e10;

  /* Status */
  --color-status-ok: #228b22;
  --color-status-info: #fcd900;
  --color-status-alert: #ee3135;

  /* Semantic */
  --color-text: var(--color-brand-2);
  --color-titles: var(--color-brand-2);
  --color-link: var(--color-brand-1);
  --color-link-hover: var(--color-brand-1);
  --color-title-link: var(--color-brand-2);
  --color-title-link-hover: var(--color-brand-1);

  /* Typography */
  --fontfamily-default: "Nunito Sans", Helvetica, Arial, sans-serif;
  --fontfamily-title: "Futura", "Nunito Sans", Helvetica, Arial, sans-serif;
  --fontfamily-mono: ui-monospace, Menlo, Monaco, "Courier New", monospace;

  --fontsize-default: 0.875rem;
  --fontsize-body: 0.875rem;
  --fontsize-intro: 1rem;
  --fontsize-small: 0.8125rem;
  --fontsize-mini: 0.6875rem;

  --fontsize-h1: 1.75rem;
  --fontsize-h2: 1.375rem;
  --fontsize-h3: 1.125rem;
  --fontsize-h4: 0.9375rem;

  --lineheight-default: 1.6;
  --lineheight-title: 1.3;

  --fontweight-default: 400;
  --fontweight-medium: 600;
  --fontweight-strong: 700;
  --fontweight-title: 700;

  --letterspacing-default: 0;
  --letterspacing-caps: 0.08em;

  /* Spacing scale (compact) */
  --spacing: 0.875rem;
  --spacing-2xs: calc(var(--spacing) * 0.25);
  --spacing-xs: calc(var(--spacing) * 0.5);
  --spacing-sm: calc(var(--spacing) * 0.75);
  --spacing-lg: calc(var(--spacing) * 1.25);
  --spacing-xl: calc(var(--spacing) * 1.5);
  --spacing-2xl: calc(var(--spacing) * 2);
  --spacing-3xl: calc(var(--spacing) * 3);
  --spacing-4xl: calc(var(--spacing) * 4);

  /* Borders & shapes */
  --border-color: var(--color-grey-500);
  --border-color-hover: var(--color-grey-800);
  --border-radius: 0.5rem;
  --border-radius-sm: 0.25rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 20px;
  --border-radius-pill: 99px;
  --border-radius-input: 8px;

  /* Shadows (subtle — sprint4 style) */
  --shadow-sm: 0 1px 3px rgba(33, 33, 33, 0.1);
  --shadow: 0 1px 10px 0 rgba(133, 133, 133, 0.2);
  --shadow-lg: 0 2px 4px rgba(33, 33, 33, 0.2);

  /* Focus */
  --focus-outline-color: var(--color-brand-1);
  --focus-outline: 2px solid var(--focus-outline-color);
  --focus-offset: 2px;

  /* Dashboard chrome (topbar + sidebar) */
  --wpd-topbar-height: 80px;
  --wpd-sidebar-width: 240px;
  --wpd-sidebar-bg: #f6f6f6;
  --wpd-sidebar-text: #132739;
  --wpd-sidebar-text-muted: #8d969d;
  --wpd-sidebar-active-bg: transparent;
  --wpd-sidebar-active-border: var(--color-brand-1);
  --wpd-sidebar-hover-bg: rgba(19, 39, 57, 0.05);
  --wpd-topbar-bg: var(--color-brand-1);
  --wpd-topbar-text: #ffffff;
  --wpd-topbar-test-bg: #e74c3c;
  --wpd-content-bg: #f6f6f6;

  /* Transition */
  --transition-fast: 0.12s ease-in-out;
  --transition-default: 0.2s ease-in-out;
}

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

blockquote,
body,
dd,
dl,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
ol,
p,
table,
ul {
  margin: 0;
}

ol ::marker,
ul ::marker {
  color: var(--color-brand-1);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--wpd-content-bg);
  color: var(--color-text);
  font-family: var(--fontfamily-default);
  font-size: var(--fontsize-body);
  font-weight: var(--fontweight-default);
  line-height: var(--lineheight-default);
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

a:not([class]) {
  color: var(--color-link);
  text-decoration: underline;
  transition: color var(--transition-fast);
}
a:not([class]):hover {
  color: var(--color-link-hover);
}

/* ---- Focus styles ---- */
:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  border-radius: var(--border-radius-sm);
}

/* ---- Headings ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--fontfamily-title);
  font-weight: var(--fontweight-title);
  line-height: var(--lineheight-title);
  color: var(--color-titles);
}

h1 {
  font-size: var(--fontsize-h1);
}
h2 {
  font-size: var(--fontsize-h2);
}
h3 {
  font-size: var(--fontsize-h3);
}
h4 {
  font-size: var(--fontsize-h4);
}

strong,
b {
  font-family: var(--fontfamily-title);
  font-weight: var(--fontweight-strong);
}

/* ---- Visually hidden ---- */
.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;
}
