/**
 * Base — reset, document defaults, typography, layout primitives.
 * Depends on tokens.css.
 */

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

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

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

body {
	margin: 0;
	font-family: var(--aik-font);
	font-size: var(--fs-base);
	line-height: var(--lh-normal);
	color: var(--aik-text);
	background: var(--aik-surface-alt);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--sp-4);
	color: var(--aik-navy-900);
	font-weight: var(--fw-bold);
	line-height: var(--lh-tight);
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-4xl);
}
h2 {
	font-size: var(--fs-3xl);
}
h3 {
	font-size: var(--fs-2xl);
}
h4 {
	font-size: var(--fs-xl);
}
h5 {
	font-size: var(--fs-lg);
}
h6 {
	font-size: var(--fs-base);
}

p {
	margin: 0 0 var(--sp-4);
	text-wrap: pretty;
}

a {
	color: var(--aik-sky);
	text-decoration: none;
	transition: color var(--t-fast);
}

a:hover {
	color: var(--aik-sky-dark);
	text-decoration: underline;
}

/* Visible focus is non-negotiable — content protection must never remove it. */
:focus-visible {
	outline: 2px solid var(--aik-sky);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

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

ul,
ol {
	margin: 0 0 var(--sp-4);
	padding-left: var(--sp-6);
}

li + li {
	margin-top: var(--sp-1);
}

hr {
	border: 0;
	border-top: 1px solid var(--aik-border);
	margin: var(--sp-8) 0;
}

code,
pre {
	font-family: var(--aik-font-mono);
	font-size: 0.9em;
}

/* ── Layout primitives ───────────────────────────────────────────────────── */

.aik-container {
	width: var(--aik-container);
	margin-inline: auto;
}

.aik-container--wide {
	max-width: var(--aik-container-wide);
}

.aik-section {
	padding-block: var(--sp-16);
}

.aik-stack > * + * {
	margin-top: var(--sp-4);
}

.aik-row {
	display: flex;
	align-items: center;
	gap: var(--sp-3);
}

.aik-grid {
	display: grid;
	gap: var(--sp-6);
}

/* Deck p2: 4 sector cards across, stepping down by breakpoint. */
.aik-grid--4 {
	grid-template-columns: repeat(4, 1fr);
}
.aik-grid--3 {
	grid-template-columns: repeat(3, 1fr);
}
.aik-grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1279px) {
	.aik-grid--4 {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 1023px) {
	.aik-grid--4,
	.aik-grid--3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.aik-grid--4,
	.aik-grid--3,
	.aik-grid--2 {
		grid-template-columns: 1fr;
	}
}

/* ── Utilities ───────────────────────────────────────────────────────────── */

.aik-muted {
	color: var(--aik-muted);
}

.aik-eyebrow {
	font-size: var(--fs-sm);
	font-weight: var(--fw-semibold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--aik-sky);
	margin-bottom: var(--sp-3);
}

.screen-reader-text,
.aik-sr {
	position: absolute !important;
	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;
	top: -100px;
	left: var(--sp-4);
	z-index: 999;
	padding: var(--sp-3) var(--sp-5);
	background: var(--aik-surface);
	color: var(--aik-ribbon);
	font-weight: var(--fw-semibold);
	border-radius: var(--r-md);
	box-shadow: var(--sh-raised);
}

.skip-link:focus {
	top: var(--sp-4);
}

/* Wide content (tables, diagrams) scrolls inside its own box — the page body
   must never scroll horizontally. */
.aik-scroll-x {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
