/* =========================================================================
   SKYLINE — SINGLE DESIGN TOKEN SOURCE (Phase 03D / Brass Specification)
   Exact brand values only. Every secondary neutral is a computed mixture of
   the approved palette. Components never use primitives directly.
   ========================================================================= */

/* Inter — primary display and body. Locally hosted, SIL OFL 1.1. */
@font-face {
	font-family: 'Inter';
	src: url('../fonts/inter-latin.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-024F, U+02B0-02FF, U+1AB0-1AFF, U+1E00-1EFF, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2150-218F, U+2190-21FF, U+2200-22FF, U+0394, U+26A0, U+2713, U+FE20-FE2F, U+FEFF, U+FFFD;
}

/* Metric-adjusted local fallback: matches Inter's x-height and vertical metrics
   during the font-display:swap window, derived from the font's own OS/2, hhea
   and glyph metrics. No extra download. */
@font-face {
	font-family: 'Inter Fallback';
	src: local('Arial');
	size-adjust: 105%;
	ascent-override: 96.9%;
	descent-override: 24.1%;
	line-gap-override: 0%;
}

/* JetBrains Mono — overlines, technical labels and data. SIL OFL 1.1. */
@font-face {
	font-family: 'JetBrains Mono';
	src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
	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;
}

/* DM Serif Display — two editorial moments only. SIL OFL 1.1. */
@font-face {
	font-family: 'DM Serif Display';
	src: url('../fonts/dm-serif-display-latin.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* Noto Sans Arabic — Arabic script. SIL OFL 1.1. */
@font-face {
	font-family: 'Noto Sans Arabic';
	src: url('../fonts/noto-sans-arabic-arabic.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
	font-family: 'Noto Sans Arabic';
	src: url('../fonts/noto-sans-arabic-latin.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* TYPE — one ratio: 1.250 major third, one fluid base */
	--type-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
	--step--2: calc(var(--type-base) / 1.5625);
	--step--1: calc(var(--type-base) / 1.25);
	--step-0:  var(--type-base);
	--step-1:  calc(var(--type-base) * 1.25);
	--step-2:  calc(var(--type-base) * 1.5625);
	--step-3:  calc(var(--type-base) * 1.953125);
	--step-4:  calc(var(--type-base) * 2.44140625);
	--step-5:  calc(var(--type-base) * 3.05175781);
	--step-6:  calc(var(--type-base) * 3.81469727);

	--font-display: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	--font-body: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--font-editorial: 'DM Serif Display', Georgia, 'Times New Roman', serif;
	--font-arabic: 'Noto Sans Arabic', 'Geeza Pro', Tahoma, sans-serif;

	/* SPACE — one 4px base unit */
	--space-3xs: 0.25rem;
	--space-2xs: 0.5rem;
	--space-xs: 0.75rem;
	--space-s: 1rem;
	--space-m: 1.5rem;
	--space-l: 2rem;
	--space-xl: 3rem;
	--space-2xl: 4.5rem;
	--space-3xl: 7rem;
	--space-section: clamp(3.5rem, 2.5rem + 4vw, 7.5rem);
	--gutter: clamp(var(--space-s), 4.6vw, var(--space-2xl));
	--measure: 66ch;
	--ratio-portrait: 4 / 5;
	--ratio-landscape: 4 / 3;
	--ratio-wide: 16 / 9;

	/* APPROVED BRAND PRIMITIVES — no other hue is permitted */
	--brass: #C8A44E;
	--brass-light: #D4B565;
	--brass-dark: #8A6A25;
	--ivory: #FAFAFA;
	--warm-ivory: #FBF9F4;
	--ink: #0A0A0B;
	--industrial: #080809;
	--technology: #0A0D12;

	/* DERIVED NEUTRALS — mixtures of the approved palette only */
	/* light: ink -> ivory */
	--neutral-100: #ECECEC; /* 94% ivory */
	--neutral-200: #DCDCDC;
	--neutral-400: #8E8E8E; /* 3.14:1 on ivory — UI boundaries */
	--neutral-600: #6F6F6F; /* 4.81:1 on ivory — secondary text */
	--neutral-800: #353536; /* 11.74:1 on ivory */
	/* dark: technology -> ivory */
	--dark-100: #ECECEC;    /* 16.47:1 on technology */
	--dark-200: #CACBCC;    /* 11.98:1 */
	--dark-400: #A6A7A9;    /* 8.08:1 */
	--dark-500: #8E8F92;    /* 6.02:1 — UI boundaries on dark */
	--brass-hover: #705720; /* brass-dark mixed toward ink */
	--brass-active: #B58F3F; /* pressed gold: >=4.5:1 with ink */
	--brass-tint: #17140E;  /* industrial mixed with 8% brass */

	/* SEMANTIC — surfaces */
	--base: var(--warm-ivory);
	--surface: var(--ivory);
	--surface-2: var(--neutral-100);
	--surface-ink: var(--technology);
	--surface-ink-raised: var(--industrial);
	--line: var(--neutral-200);
	--line-strong: var(--neutral-400);
	--line-on-dark: var(--dark-500);

	/* SEMANTIC — text */
	--text: var(--ink);
	--ink-2: var(--neutral-800);
	--ink-3: var(--neutral-600);
	--on-dark: var(--dark-100);
	--on-dark-2: var(--dark-200);
	--on-dark-3: var(--dark-400);

	/* SEMANTIC — brass signal roles */
	--accent: var(--brass);
	--accent-strong: var(--brass-dark);
	--accent-on-dark: var(--brass);
	--accent-on-dark-hover: var(--brass-light);
	--on-accent: var(--ink);

	/* HYPERLINK — one contract, two surfaces */
	--link: var(--brass-dark);
	--link-hover: var(--brass-dark);
	--link-visited: var(--brass-hover);
	--link-active: var(--ink);
	--link-underline: rgba(138, 106, 37, 0.38);
	--link-dark: var(--brass);
	--link-dark-hover: var(--brass-light);
	--link-dark-underline: rgba(200, 164, 78, 0.42);
	--focus: var(--ink);
	--focus-on-dark: var(--brass);

	/* COMPONENT */
	--container: 82rem;
	--grid-columns: 12;
	--grid-gap: var(--space-m);
	--header-h: 5.25rem;
	--section-y: var(--space-section);
	--radius: 0;
	--border: 1px solid var(--line-strong);
	--border-on-dark: 1px solid var(--line-on-dark);
	--shadow: none;
	--control-min: 2.75rem;
	--focus-ring: 2px solid var(--focus);
	--focus-offset: 3px;
	--process-divider: 1px solid var(--line-strong);
	--legacy-bleed: calc(var(--gutter) * 2);
	--legacy-bleed-margin: calc(-1 * var(--gutter));

	/* MOTION — immediate, functional state changes only */
	--dur-fast: 90ms;
	--dur: 140ms;
	--dur-slow: 220ms;
	--ease: linear;

	/* LAYERS */
	--z-base: 0;
	--z-raised: 10;
	--z-sticky: 100;
	--z-overlay: 1000;

	/* Compatibility aliases for preserved third-party content only */
	--text-muted: var(--ink-3);
	--text-invert: var(--on-dark);
	--text-invert-muted: var(--on-dark-3);
	--accent-deep: var(--accent-strong);
	--line-light: var(--line-on-dark);
	--petrol-900: var(--technology);
	--petrol-800: var(--industrial);
	--orange-600: var(--brass);
}

/* Kadence global palette — the legacy content layer still writes colours via
   --global-palette1..9. Remapping the variables at source removes the old blue
   and white values without editing a single block attribute or post. The
   html:root selector outranks Kadence's own :root declaration. */
html:root {
	/* Legacy "primary" is used as text in preserved blocks; the accessible
	   dark brass is required there, while the fill value moves to slot 2. */
	--global-palette1: var(--brass-dark);
	--global-palette2: var(--brass);
	--global-palette3: var(--ink);
	--global-palette4: var(--technology);
	--global-palette5: var(--neutral-600);
	--global-palette6: var(--neutral-400);
	--global-palette7: var(--neutral-100);
	--global-palette8: var(--warm-ivory);
	--global-palette9: var(--ivory);
	--global-content-width: var(--container);
	--global-content-wide-width: calc(var(--container) + 12rem);
}

/* Arabic script: readable Noto Sans Arabic, no tracking, generous leading. */
html[lang^='ar'] {
	--font-display: var(--font-arabic);
	--font-body: var(--font-arabic);
	--step--1: calc(var(--type-base) * 0.82);
}

html[dir='rtl'] { --gutter: clamp(var(--space-s), 4.6vw, var(--space-2xl)); }

/* One breakpoint vocabulary everywhere: 48em / 64em / 75em. */
@media (max-width: 48em) {
	:root {
		--header-h: 4.5rem;
		--legacy-bleed: 0px;
		--legacy-bleed-margin: 0px;
	}
}
