/* ==========================================================================
   Custovia Security: base
   Fonts, colour and spacing tokens, reset, typography, layout primitives.
   Palette: navy and grey, with one restrained steel-blue highlight. Green appears only
   in the guard certification section (the health cross and its cards).
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* Navy */
  --navy-950: #050D1C;
  --navy-900: #081529;
  --navy-800: #0C2040;
  --navy-700: #12305E;
  --navy-600: #1A417C;

  /* Steel-blue highlight: focus, slider glow, small accents */
  --steel-300: #9FB6D6;
  --steel-400: #7C9BC6;

  /* Health green: the first-aid cross and the guard certification cards, nothing else */
  --health-50: #E9F8F0;
  --health-300: #8CF2C4;
  --health-400: #3DDC97;
  --health-500: #1FBF7A;
  --health-600: #12935B;

  /* Greys */
  --grey-50: #F6F8FB;
  --grey-100: #ECEFF4;
  --grey-200: #DCE1E9;
  --grey-300: #C3CAD5;
  --grey-400: #9BA5B4;
  --grey-500: #6F7A8B;
  --grey-600: #556071;
  --grey-700: #3D4655;
  --grey-900: #151A22;
  --white: #FFFFFF;

  /* Functional only: form errors */
  --danger: #B42318;
  --danger-soft: #FDF2F1;
  --danger-ink: #7A1A12;

  --font-serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(8, 21, 41, 0.06), 0 2px 8px -2px rgba(8, 21, 41, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(8, 21, 41, 0.22);
  --shadow-lg: 0 30px 70px -28px rgba(8, 21, 41, 0.45);

  --container: 1200px;
  --gutter: 1rem;
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus-ring: var(--navy-600);
}

@media (min-width: 640px) {
  :root { --gutter: 2rem; }
}
@media (min-width: 1100px) {
  :root { --gutter: 2.5rem; }
}

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--grey-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
::selection { background: var(--navy-700); color: var(--white); }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--navy-900);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 1.5rem + 5vw, 5rem); line-height: 1.02; letter-spacing: -0.015em; }
h2 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); }
h3 { font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.9rem); font-weight: 600; line-height: 1.15; }
h4 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
p { text-wrap: pretty; }
strong { font-weight: 600; }

/* ---------- Layout primitives ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--white);
  color: var(--navy-900);
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* ---------- Motion ---------- */

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