/* MilliSec - shared design tokens (external site + intranet) */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded-az.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-az.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Palette: indigo and madder red, the two classic dyes of Azerbaijani carpets */
  --bg: #F4F5F9;
  --surface: #FFFFFF;
  --text: #18204A;
  --muted: #596079;
  --line: #D6D9E4;
  --brand: #A3263B;
  --brand-strong: #86192D;
  --on-brand: #FFFFFF;
  --focus: #E2A331;
  --ok: #1F7A4D;
  --warn: #9A5B00;
  --band: #18204A;
  --on-band: #F4F5F9;

  --font-display: "Unbounded", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Onest", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Type scale (ratio 1.25) */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.25rem;
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  --fs-h1: clamp(2.2rem, 1.3rem + 3.8vw, 4.2rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  --radius-control: 6px;
  --radius-panel: 12px;
  --measure: 38rem;
  --page: 72rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10152F;
    --surface: #171E44;
    --text: #E8EAF3;
    --muted: #A3A9C4;
    --line: #2B3366;
    --brand: #E26A7C;
    --brand-strong: #F08B9A;
    --on-brand: #10152F;
    --focus: #E9B24A;
    --ok: #5FC795;
    --warn: #E9B24A;
    --band: #0B0F24;
    --on-band: #E8EAF3;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--brand);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-strong);
}

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

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

.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;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -3rem;
  background: var(--surface);
  color: var(--text);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-control);
  z-index: 10;
}

.skip-link:focus {
  top: var(--space-1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 2.9rem;
  padding: 0.7rem 1.35rem;
  border: 2px solid var(--brand);
  border-radius: var(--radius-control);
  background: var(--brand);
  color: var(--on-brand);
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: var(--on-brand);
}

.button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.button--quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.button--quiet:hover {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 7px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
