/*
 * Sturlaugur Marás – design tokens (ARCHITECTURE §5, BRAND-BRIEF 2026).
 * One brand palette from Brandenburg's identity (September 2026):
 * navy #04284D, turquoise #3FE0D0, white, black. Turquoise is never text on
 * white (1.6:1) – #087A70 is the teal for text on light surfaces.
 * Contrast (WCAG 2.2) of every pair defined here is noted next to the token.
 */

@font-face {
	font-family: "Sora";
	font-style: normal;
	font-weight: 100 800;
	font-display: swap;
	src: url("../fonts/sora-latin-var.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Sora";
	font-style: normal;
	font-weight: 100 800;
	font-display: swap;
	src: url("../fonts/sora-latin-ext-var.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	/* 5.1 Raw brand colours (Brandenburg, official) */
	--ms-raw-navy: #04284D;                    /* NCS S 6030-R80B */
	--ms-raw-turquoise: #3FE0D0;               /* NCS S 1050-B40G */
	--ms-raw-teal: #087A70;                    /* derived: turquoise text on light surfaces */
	--ms-raw-white: #FFFFFF;
	--ms-raw-black: #000000;
	/* Deprecated aliases (pre-2026 provisional names) – kept so older rules keep working. */
	--ms-raw-maras-orange: var(--ms-raw-turquoise);
	--ms-raw-maras-navy: var(--ms-raw-navy);
	--ms-raw-sturlaugur-blue: var(--ms-raw-navy);
	--ms-raw-sturlaugur-navy: var(--ms-raw-navy);
	--ms-raw-ink: #14202E;

	/* 5.2 Role tokens (single brand palette) */
	--ms-color-brand: #04284D;                 /* white on it 14.8:1, turquoise on it 9.0:1 */
	--ms-color-brand-strong: #021B36;          /* hover/pressed navy: white 17.3:1, turquoise 10.5:1 */
	--ms-color-brand-pattern: rgba(255, 255, 255, .06);
	--ms-color-on-brand: #FFFFFF;
	--ms-color-on-brand-muted: rgba(255, 255, 255, .8);  /* secondary text on navy: 9.9:1 */
	--ms-color-accent: #3FE0D0;                /* fills, badges, lines; navy text on it 9.0:1 – never text on white */
	--ms-color-accent-strong: #087A70;         /* teal text: 5.2:1 on white, 4.8:1 on --ms-color-bg, 4.7:1 on --ms-color-accent-tint */
	--ms-color-on-accent: #04284D;             /* 9.0:1 on turquoise */
	--ms-color-accent-tint: #E3F8F5;           /* navy 13.4:1, teal 4.7:1 */
	--ms-color-link: #04284D;                  /* 14.8:1 on white; inline links are underlined */
	--ms-color-ink: #04284D;                   /* headings */
	--ms-color-text: #14202E;                  /* body: 16.5:1 on white, 15.0:1 on --ms-color-bg */
	--ms-color-text-muted: #4B5A6B;            /* 7.1:1 on white, 6.5:1 on --ms-color-bg */
	--ms-color-bg: #F2F5F8;
	--ms-color-surface: #FFFFFF;
	--ms-color-surface-alt: #F7F9FB;
	--ms-color-border: #DCE3EA;
	--ms-color-steel: #A3B1C0;
	--ms-color-success: #0F7A4A;               /* 5.4:1 on white, 4.7:1 on its tint */
	--ms-color-warning: #9A5B00;               /* 5.4:1 on white, 4.9:1 on its tint */
	--ms-color-danger: #C62828;                /* 5.6:1 on white, 4.8:1 on its tint */
	--ms-color-info: #04284D;

	/* On-brand helpers (text and UI on navy surfaces) */
	--ms-color-on-brand-rule: rgba(255, 255, 255, .16);         /* hairlines on navy (decorative) */
	--ms-color-on-brand-rule-strong: rgba(255, 255, 255, .55);  /* ghost borders on navy: 5.4:1 */
	--ms-color-accent-on-brand: #3FE0D0;                        /* turquoise text/icons on navy: 9.0:1 */
	--ms-color-focus-on-brand: #3FE0D0;                         /* focus ring on navy: 9.0:1 */

	/* Derived helpers */
	--ms-color-overlay: rgba(2, 20, 40, .55);
	--ms-color-focus: #04284D;                                  /* focus ring on light: 14.8:1 */
	--ms-color-success-tint: #E6F4EC;
	--ms-color-warning-tint: #FBF1E1;
	--ms-color-danger-tint: #FBEAEA;
	--ms-color-info-tint: #E8EEF5;
	--ms-color-neutral-tint: #E9EEF3;

	/* Neutral helpers (derived from navy) */
	--ms-color-rule: #E3E8EE;                  /* hairlines between cells (decorative) */
	--ms-color-rule-strong: #C3CDD8;           /* frames (decorative) */
	--ms-color-hairline: #E6EBF0;              /* card outlines */
	--ms-color-field-border: #717F90;          /* input borders: 4.1:1 on white, 3.7:1 on --ms-color-bg (WCAG 1.4.11) */
	--ms-color-info-text: #04284D;

	/* 5.3 Typography */
	--ms-font-sans: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--ms-fw-light: 300;
	--ms-fw-medium: 500;
	--ms-fw-bold: 700;
	--ms-fw-black: 800;
	/* „Less is more" (MINIMAL-PLAN §2): fewer, calmer sizes. H1 26px (390) → 36px (1440). */
	--ms-fs-display: clamp(2rem, 1.2rem + 2.6vw, 3rem);
	--ms-fs-h1: clamp(1.625rem, 1.3rem + 1vw, 2.25rem);
	--ms-fs-h2: clamp(1.375rem, 1.15rem + .6vw, 1.75rem);
	--ms-fs-h3: clamp(1.125rem, 1rem + .35vw, 1.25rem);
	--ms-fs-h4: 1.0625rem;
	--ms-fs-lead: 1.0625rem;
	--ms-fs-body: 1rem;
	--ms-fs-sm: .875rem;
	--ms-fs-xs: .8125rem;
	--ms-fs-label: .6875rem;                   /* lettering: never smaller */
	--ms-lh-tight: 1.1;
	--ms-lh-heading: 1.2;
	--ms-lh-body: 1.6;
	--ms-track-display: -.032em;
	--ms-track-h1: -.024em;
	--ms-track-h2: -.018em;
	--ms-track-h3: -.01em;
	--ms-track-label: .13em;
	--ms-num: tabular-nums lining-nums;

	/* Radius */
	--ms-radius-xs: 2px;
	--ms-radius-sm: 4px;
	--ms-radius-md: 6px;
	--ms-radius-lg: 8px;
	--ms-radius-xl: 10px;
	--ms-radius-2xl: 12px;
	--ms-radius-3xl: 14px;
	--ms-radius-pill: 999px;

	/* Shadows – minimal: cards are flat (hairline border), only floating UI casts a shadow.
	   --ms-shadow-card-hover stays as it was: the approved „NÝTT" product card uses it. */
	--ms-shadow-card: 0 1px 2px rgba(4, 40, 77, .04);
	--ms-shadow-card-hover: 0 12px 28px rgba(4, 40, 77, .12);
	--ms-shadow-float: 0 15px 80px rgba(4, 40, 77, .18);
	--ms-shadow-popover: 0 8px 30px rgba(4, 40, 77, .16);
	--ms-shadow-header: 0 6px 24px rgba(4, 40, 77, .10);

	/* Layout – the mockup's page frame: content runs almost edge to edge with a
	   ~30px margin at 1536px (hero, product row and footer card). */
	--ms-container: 1480px;
	--ms-container-wide: 1600px;
	--ms-container-narrow: 760px;
	--ms-gutter: clamp(16px, 2.2vw, 32px);
	--ms-section-gap: clamp(56px, 6vw, 96px);
	--ms-grid-gap: 24px;
	--ms-grid-gap-tight: 16px;
	--ms-edge: clamp(40px, 6vw, 110px);        /* slant height (no longer used by the page band) */

	/* Spacing scale (4px base) – use these instead of one-off values. */
	--ms-space-1: 4px;
	--ms-space-2: 8px;
	--ms-space-3: 12px;
	--ms-space-4: 16px;
	--ms-space-5: 24px;
	--ms-space-6: 32px;
	--ms-space-7: 48px;
	--ms-space-8: 64px;
	--ms-space-9: 96px;
	--ms-block-gap: clamp(32px, 4vw, 56px);    /* between blocks inside a section */

	/* Forms – one field style everywhere (account, checkout, application, contact). */
	--ms-form-narrow: 440px;                   /* a form alone on the page */
	--ms-form-wide: 640px;                     /* long forms with paired fields */
	--ms-field-h: 48px;
	--ms-field-pad: 11px 14px;
	--ms-field-radius: 6px;
	--ms-field-focus-ring: 0 0 0 1px var(--ms-color-link), 0 0 0 4px color-mix(in srgb, var(--ms-color-link) 14%, transparent);

	/* Motion */
	--ms-ease: cubic-bezier(.4, 0, .2, 1);
	--ms-ease-out: cubic-bezier(.16, 1, .3, 1);
	--ms-t-fast: .15s;
	--ms-t-base: .2s;
	--ms-t-slow: .3s;

	/* Header: navy top bar + navy header bar, full width (no floating offset). */
	--ms-header-offset: 0px;
	--ms-header-h: 88px;
	--ms-utility-h: 48px;

	/* Stacking */
	--ms-z-header: 900;
	--ms-z-drawer: 1000;
	--ms-z-toast: 1100;
}

@media (max-width: 1024px) {
	:root {
		--ms-header-h: 64px;
		--ms-utility-h: 40px;
	}
}

@media (max-width: 767px) {
	:root {
		--ms-grid-gap: 16px;
	}
}
