/*
 * FLO — base elements: reset, document, typography roles, focus, motion, print.
 *
 * Class convention (docs/DECISIONS.md):
 *   .c-*   components        .l-*   layout        .t-*   text roles
 *   .u-*   utilities         .is-* / .has-*  states
 * Element modifiers use BEM: .c-btn--primary, .c-card__title.
 */

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-h); /* anchored sections start right under the sticky header (WP-10b, decision 44) */
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
	margin: 0;
}

p {
	text-wrap: pretty;
}

/* :where() keeps the reset at zero specificity so a component's own
   padding on a list (.c-pillar__points) is not beaten by it */
:where(ul[class], ol[class]) {
	padding: 0;
	list-style: none;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
	margin: 0;
}

button {
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
}

a {
	color: var(--navy-ink);
	text-decoration: none;
	transition: color var(--t-base);
}

a:hover {
	color: var(--gold-text);
}

::selection {
	background: var(--gold);
	color: var(--navy);
}

[hidden] {
	display: none !important;
}

/* Khmer glyphs fall through to Noto Sans Khmer where it is loaded (khmer.css) */
.u-khmer {
	font-family: 'Hanken Grotesk', 'Noto Sans Khmer', 'Khmer OS', system-ui, sans-serif;
}

/* ---- Focus and motion ------------------------------------------------------ */
:focus-visible {
	outline: var(--focus-ring);
	outline-offset: var(--focus-offset);
	border-radius: 4px;
}

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

	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---- Headings: element defaults (Bricolage, navy) ------------------------- */
h1,
h2,
h3,
h4 {
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-weight: 800;
	color: var(--navy);
}

h1 {
	font-size: var(--fs-h1);
	line-height: var(--lh-h1);
	letter-spacing: var(--ls-h1);
}

h2 {
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
	letter-spacing: var(--ls-h2);
}

h3 {
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--ls-h3);
	font-weight: 700;
}

h4 {
	font-size: 17px;
	line-height: 1.25;
	letter-spacing: -.01em;
	font-weight: 700;
}

/* ---- Text roles (.t-*) ---------------------------------------------------- */
.t-h1-hero {
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-weight: 800;
	font-size: var(--fs-h1-hero);
	line-height: var(--lh-h1-hero);
	letter-spacing: var(--ls-h1-hero);
	color: var(--paper);
}

.t-h1 {
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-weight: 800;
	font-size: var(--fs-h1);
	line-height: var(--lh-h1);
	letter-spacing: var(--ls-h1);
	color: var(--navy);
}

.t-h2,
.t-h2-lg {
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-weight: 800;
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
	letter-spacing: var(--ls-h2);
	color: var(--navy);
}

.t-h2-lg {
	font-size: var(--fs-h2-lg);
	line-height: 1.0;
}

.t-h3,
.t-h3-lg {
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-weight: 700;
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--ls-h3);
	color: var(--navy);
}

.t-h3-lg {
	font-size: var(--fs-h3-lg);
	line-height: 1.15;
}

.t-number {
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-weight: 800;
	font-size: var(--fs-number);
	line-height: var(--lh-number);
	letter-spacing: var(--ls-number);
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}

.t-number__accent {
	color: var(--gold);
}

.t-eyebrow {
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: var(--fs-eyebrow);
	line-height: var(--lh-eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	color: var(--gold-text);
}

.t-lead {
	font-size: var(--fs-lead);
	line-height: var(--lh-lead);
	color: var(--text);
	max-width: 50ch;
}

.t-body {
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--text);
	max-width: var(--measure);
}

.t-body-sm {
	font-size: var(--fs-body-sm);
	line-height: 1.62;
	color: var(--text);
	max-width: var(--measure);
}

.t-small {
	font-weight: 600;
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	color: var(--muted);
}

.t-caption {
	font-weight: 600;
	font-size: var(--fs-small-sm);
	line-height: 1.4;
	color: var(--muted);
}

/* On navy (inside .c-section--navy, .c-card--glass, header, footer) the same
   roles switch to paper text and gold eyebrows. */
.is-dark h1,
.is-dark h2,
.is-dark h3,
.is-dark h4,
.is-dark .t-h1,
.is-dark .t-h2,
.is-dark .t-h2-lg,
.is-dark .t-h3,
.is-dark .t-h3-lg,
.is-dark .t-number {
	color: var(--paper);
}

.is-dark .t-eyebrow {
	color: var(--gold);
}

.is-dark,
.is-dark .t-body,
.is-dark .t-body-sm {
	color: var(--on-navy);
}

.is-dark .t-lead {
	color: rgba(255, 255, 255, .92);
}

.is-dark .t-small,
.is-dark .t-caption {
	color: var(--on-navy-3);
}

.is-dark a {
	color: var(--paper);
}

.is-dark a:hover {
	color: var(--gold);
}

/* ---- Layout ------------------------------------------------------------------ */
.l-container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
}

/* Section wrapper: background + vertical rhythm. Inner padding is horizontal
   gutters only; the container centres the content. */
.c-section {
	position: relative;
	padding: var(--section-y) var(--gutter);
	background: var(--paper);
	color: var(--text);
}

.c-section--sm {
	padding-block: var(--section-y-sm);
}

.c-section--hero {
	padding-top: var(--hero-top);
}

.c-section--paper {
	background: var(--paper);
}

.c-section--sand {
	background: var(--sand);
}

.c-section--cream {
	background: var(--cream);
}

.c-section--white {
	background: var(--white);
}

.c-section--navy {
	background: var(--navy);
	color: var(--on-navy);
}

/* Grids used by cards and split blocks */
.l-grid {
	display: grid;
	gap: var(--gap-cards);
}

.l-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.l-stack {
	display: flex;
	flex-direction: column;
	gap: var(--gap-cards);
}

.l-cluster {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

@media (max-width: 1024px) {
	.l-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.l-grid--3 {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

/* ---- Utilities ------------------------------------------------------------- */
.u-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.u-mt-sm {
	margin-top: 12px;
}

.u-mt {
	margin-top: 20px;
}

.u-mt-lg {
	margin-top: 36px;
}

/* ---- Print (README §7) ----------------------------------------------------- */
@media print {
	.c-topbar,
	.c-skip,
	.c-footer,
	.c-map,
	.c-drawer,
	.c-announce {
		display: none !important;
	}

	* {
		background: #fff !important;
		color: #101828 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	section,
	article,
	main,
	div {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	section {
		padding-top: 14pt !important;
		padding-bottom: 14pt !important;
		break-inside: avoid;
	}

	h1,
	h2,
	h3 {
		color: #001B42 !important;
		break-after: avoid;
	}

	img {
		max-width: 100% !important;
	}

	/* Only links that leave the site print their address (the site's own links and
	   the share buttons do not; WP-10b, decision 45). */
	a[target="_blank"]:not(.p-share__btn)::after {
		content: " (" attr(href) ")";
		font-size: 10pt;
		color: #333;
	}

	.p-share,
	.c-gallery__arrows,
	.c-gallery__dots,
	.c-video__play {
		display: none !important;
	}
}
