/* =========================================================================
   Al Muqim Marine — Layer 1: fonts, design tokens, reset, base typography
   Every value is transcribed from the source design.
   ========================================================================= */

/* ---------- Fonts (self-hosted, latin + latin-ext only) ---------- */

@font-face {
	font-family: 'Manrope';
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url('../fonts/manrope-var-latin.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: 'Manrope';
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url('../fonts/manrope-var-latin-ext.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;
}

@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-400-latin.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: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-400-latin-ext.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;
}

/* ---------- Tokens ---------- */

:root {
	/* Palette */
	--amm-ink: #06182b;
	--amm-navy: #0b2340;
	--amm-accent: #1668a8;
	--amm-accent-light: #7fb2d9;
	--amm-bg: #f4f6f7;
	--amm-surface: #ffffff;
	--amm-text: #3c4c5c;
	--amm-muted: #5a6b7a;
	--amm-placeholder: #e9edef;

	/* Rules and washes */
	--amm-rule: rgba(11, 35, 64, 0.14);
	--amm-rule-soft: rgba(11, 35, 64, 0.1);
	--amm-rule-strong: rgba(11, 35, 64, 0.18);
	--amm-rule-dark: rgba(255, 255, 255, 0.14);
	--amm-rule-dark-soft: rgba(255, 255, 255, 0.12);
	--amm-rule-dark-strong: rgba(255, 255, 255, 0.2);

	/*
	 * Text on the dark ground. The source used 0.42/0.45/0.5 alpha for the
	 * faintest labels, which falls below WCAG 2.2 AA on #06182B; these are
	 * raised to the lowest alpha that clears 4.5:1. See README → Accessibility.
	 */
	--amm-on-dark: #ffffff;
	--amm-on-dark-strong: rgba(255, 255, 255, 0.92);
	--amm-on-dark-body: rgba(255, 255, 255, 0.82);
	--amm-on-dark-muted: rgba(255, 255, 255, 0.72);
	--amm-on-dark-soft: rgba(255, 255, 255, 0.68);
	--amm-on-dark-faint: rgba(255, 255, 255, 0.62);
	--amm-on-dark-quiet: rgba(255, 255, 255, 0.62);

	/* Type */
	--amm-font-sans: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--amm-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--amm-fs-hero: clamp(40px, 7.4vw, 124px);
	--amm-fs-page-title: clamp(36px, 6.4vw, 104px);
	--amm-fs-display: clamp(34px, 5.4vw, 86px);
	--amm-fs-h2: clamp(30px, 4.4vw, 68px);
	--amm-fs-h2-sm: clamp(26px, 3.4vw, 52px);
	--amm-fs-h2-xs: clamp(24px, 2.8vw, 38px);
	--amm-fs-h3: clamp(23px, 2.6vw, 38px);
	--amm-fs-h4: clamp(19px, 1.9vw, 26px);
	--amm-fs-lead: clamp(17px, 1.4vw, 21px);
	--amm-fs-lead-lg: clamp(18px, 1.7vw, 25px);
	--amm-fs-body: 16.5px;
	--amm-fs-body-sm: 15.5px;
	--amm-fs-mono: 11px;
	--amm-fs-mono-sm: 10px;

	--amm-track-mono: 0.16em;
	--amm-track-eyebrow: 0.22em;

	/* Layout */
	--amm-max: 1720px;
	--amm-pad-x: clamp(18px, 4vw, 56px);
	--amm-sec-lg: clamp(64px, 9vw, 150px);
	--amm-sec-md: clamp(56px, 8vw, 130px);
	--amm-sec-sm: clamp(48px, 6vw, 100px);
	--amm-gap-lg: clamp(32px, 5vw, 90px);
	--amm-gap-md: clamp(24px, 4vw, 56px);
	--amm-header-h: 78px;

	/*
	 * Height of the WordPress admin bar. Zero for visitors; raised below for
	 * logged-in users so the sticky header and anchor offsets clear it.
	 */
	--amm-admin-bar: 0px;

	/* Motion */
	--amm-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--amm-marquee-duration: 34s;
}

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

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

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

body {
	margin: 0;
	background: var(--amm-bg);
	color: var(--amm-navy);
	font-family: var(--amm-font-sans);
	font-size: var(--amm-fs-body);
	line-height: 1.72;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-wrap: pretty;
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-weight: 300;
	text-wrap: balance;
}

p {
	margin: 0;
}

ul,
ol {
	margin: 0;
}

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

img,
svg,
video {
	height: auto;
}

a {
	color: var(--amm-accent);
	text-decoration: none;
	transition: color 0.2s var(--amm-ease), background-color 0.2s var(--amm-ease),
		border-color 0.2s var(--amm-ease), opacity 0.2s var(--amm-ease);
}

a:hover {
	color: var(--amm-navy);
}

input,
select,
button,
textarea {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 12px 0;
	border-bottom: 1px solid var(--amm-rule);
	text-align: left;
}

blockquote {
	margin: 0;
	padding-left: 22px;
	border-left: 1px solid var(--amm-accent);
}

code,
pre,
kbd {
	font-family: var(--amm-font-mono);
	font-size: 0.92em;
}

pre {
	padding: 20px;
	overflow-x: auto;
	background: var(--amm-surface);
	border: 1px solid var(--amm-rule);
}

hr {
	height: 0;
	margin: var(--amm-gap-md) 0;
	border: 0;
	border-top: 1px solid var(--amm-rule);
}

/* ---------- Focus ---------- */

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

.amm-dark :focus-visible,
.amm-header :focus-visible,
.amm-footer :focus-visible {
	outline-color: var(--amm-accent-light);
}

/* ---------- Screen-reader utilities ---------- */

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

.amm-skip-link {
	position: absolute;
	top: -100px;
	left: var(--amm-pad-x);
	z-index: 200;
	padding: 14px 22px;
	background: var(--amm-accent);
	color: var(--amm-on-dark);
	font-family: var(--amm-font-mono);
	font-size: var(--amm-fs-mono);
	letter-spacing: var(--amm-track-mono);
	text-transform: uppercase;
}

.amm-skip-link:focus {
	top: 12px;
	color: var(--amm-on-dark);
}

/* ---------- Shared type utilities ---------- */

.amm-eyebrow {
	display: block;
	font-family: var(--amm-font-mono);
	font-size: var(--amm-fs-mono-sm);
	letter-spacing: var(--amm-track-eyebrow);
	text-transform: uppercase;
	color: var(--amm-accent);
}

.amm-dark .amm-eyebrow,
.amm-eyebrow--light {
	color: var(--amm-accent-light);
}

.amm-eyebrow--stacked {
	margin-bottom: 22px;
}

.amm-rule-mark {
	display: block;
	width: 34px;
	height: 1px;
	background: var(--amm-accent-light);
}

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

.amm-container {
	width: 100%;
	max-width: var(--amm-max);
	margin: 0 auto;
	padding-inline: var(--amm-pad-x);
}

.amm-section {
	padding-block: var(--amm-sec-md);
}

.amm-section--lg {
	padding-block: var(--amm-sec-lg);
}

.amm-section--md {
	padding-block: var(--amm-sec-md);
}

.amm-section--sm {
	padding-block: var(--amm-sec-sm);
}

.amm-dark {
	background: var(--amm-ink);
	color: var(--amm-on-dark);
}

.amm-dark h1,
.amm-dark h2,
.amm-dark h3,
.amm-dark h4 {
	color: var(--amm-on-dark);
}

.amm-surface {
	background: var(--amm-surface);
}

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

@keyframes amm-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes amm-marquee {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

@keyframes amm-sweep {
	0% {
		transform: translateY(-100%);
	}

	100% {
		transform: translateY(400%);
	}
}

@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;
		scroll-behavior: auto !important;
	}
}
