/* ==========================================================================
   IntellActX — base.css
   Reset, typography, layout primitives, site chrome (header/footer),
   buttons and form controls. Tokens come from theme.css.
   ========================================================================== */

/* -------------------------------------------------------------------------
   Reset
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: var(--fs-400);
	font-weight: 400;
	line-height: var(--lh-normal);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 600;
	line-height: var(--lh-tight);
	letter-spacing: var(--tracking-tight);
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-900);
}

h2 {
	font-size: var(--fs-800);
}

h3 {
	font-size: var(--fs-700);
	line-height: var(--lh-snug);
}

h4 {
	font-size: var(--fs-500);
	line-height: var(--lh-snug);
}

p {
	margin: 0;
	text-wrap: pretty;
}

a {
	color: var(--accent-700);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover {
	color: var(--accent-600);
}

ul,
ol {
	margin: 0;
	padding: 0;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

strong,
b {
	font-weight: 600;
}

/* Visible, unanimated focus for keyboard users. */
:focus-visible {
	outline: 3px solid var(--accent-600);
	outline-offset: 2px;
	border-radius: var(--radius-xs);
}

:focus:not(:focus-visible) {
	outline: none;
}

.site-footer :focus-visible {
	outline-color: #8ab0ff;
}

/* Anchor targets sit below the sticky header. */
[id] {
	scroll-margin-top: calc(var(--header-h) + var(--space-5));
}

/* -------------------------------------------------------------------------
   Layout primitives
   ------------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

.section {
	padding-block: var(--section-y);
}

.section--tight {
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section--sunken {
	background-color: var(--surface-sunken);
}

.section--surface {
	background-color: var(--surface);
}

.grid {
	display: grid;
	gap: var(--space-6);
}

.grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.grid--3 {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.grid--4 {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
}

.split {
	display: grid;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

@media (min-width: 64em) {
	.split {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	}

	.split--start {
		align-items: start;
	}
}

.stack {
	display: flex;
	flex-direction: column;
	gap: var(--stack-gap, var(--space-4));
}

.stack--sm {
	--stack-gap: var(--space-2);
}

.stack--lg {
	--stack-gap: var(--space-8);
}

.cluster {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-3);
	list-style: none;
}

.measure {
	max-width: var(--measure);
}

.measure--narrow {
	max-width: var(--measure-narrow);
}

/* Spacing utilities, used sparingly for one-off gaps between siblings. */
.mt-4 {
	margin-top: var(--space-4);
}

.mt-6 {
	margin-top: var(--space-6);
}

.mt-8 {
	margin-top: var(--space-8);
}

/* -------------------------------------------------------------------------
   Shared text & helpers
   ------------------------------------------------------------------------- */
.lede {
	font-size: var(--fs-450);
	line-height: var(--lh-relaxed);
	color: var(--text-muted);
}

.muted {
	color: var(--text-muted);
}

.subtle {
	color: var(--text-subtle);
}

.small {
	font-size: var(--fs-300);
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-family: var(--font-mono);
	font-size: var(--fs-100);
	font-weight: 500;
	letter-spacing: var(--tracking-mono);
	text-transform: uppercase;
	color: var(--accent-700);
}

.eyebrow::before {
	content: '';
	width: 1.5rem;
	height: 1px;
	background-color: currentColor;
	opacity: 0.6;
}

.section-head {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	margin-bottom: var(--space-10);
}

/* Text the school must replace before launch. */
.placeholder {
	border-bottom: 1px dashed var(--border-strong);
	color: var(--text-subtle);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: var(--space-3);
	left: var(--space-3);
	z-index: var(--z-skip);
	transform: translateY(-200%);
	padding: var(--space-3) var(--space-5);
	background-color: var(--white);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-md);
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	transform: none;
}

/* -------------------------------------------------------------------------
   Site header
   ------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: var(--z-header);
	background-color: rgba(255, 255, 255, 0.88);
	border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(10px)) {
	.site-header {
		background-color: rgba(255, 255, 255, 0.78);
		backdrop-filter: blur(12px) saturate(1.4);
	}
}

.site-header.is-condensed {
	box-shadow: var(--shadow-xs);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	min-height: var(--header-h);
}

/* Zero-height marker at the very top of the document. Watching it with an
   IntersectionObserver tells us when the header should condense — no scroll
   listener required. */
.header-sentinel {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3);
	min-height: var(--tap-target);
	color: var(--text);
	text-decoration: none;
}

.brand__mark {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: var(--radius-sm);
	background-image: linear-gradient(155deg, var(--accent-500), var(--accent-700));
	color: var(--white);
}

.brand__mark svg {
	width: 1.15rem;
	height: 1.15rem;
}

.brand__text {
	display: flex;
	flex-direction: column;
}

.brand__name {
	font-family: var(--font-display);
	font-size: var(--fs-500);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: var(--tracking-tight);
}

.brand__tag {
	font-family: var(--font-mono);
	font-size: 0.625rem;
	letter-spacing: var(--tracking-mono);
	text-transform: uppercase;
	color: var(--text-subtle);
}

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */
.nav__list {
	display: flex;
	list-style: none;
}

.nav__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap-target);
	color: var(--text-muted);
	text-decoration: none;
}

.nav__link[aria-current='page'] {
	color: var(--accent-700);
	background-color: var(--accent-050);
}

.nav__meta {
	display: none;
}

.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--tap-target);
	height: var(--tap-target);
	padding: 0;
	background-color: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	color: var(--text);
	cursor: pointer;
}

.nav-toggle svg {
	width: 1.25rem;
	height: 1.25rem;
}

.nav-toggle__close,
.nav-toggle[aria-expanded='true'] .nav-toggle__open {
	display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__close {
	display: block;
}

.nav-backdrop {
	position: fixed;
	inset: 0;
	z-index: var(--z-backdrop);
	background-color: rgba(10, 21, 38, 0.5);
	opacity: 0;
}

.nav-backdrop.is-open {
	opacity: 1;
}

body.is-nav-open {
	overflow: hidden;
}

/* --- Mobile & tablet: bottom sheet ------------------------------------- */
@media (max-width: 63.99em) {
	.nav {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: var(--z-nav);
		display: flex;
		flex-direction: column;
		gap: var(--space-4);
		max-height: 86vh;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: var(--space-6) var(--gutter) calc(var(--space-6) + env(safe-area-inset-bottom));
		background-color: var(--surface);
		border-radius: var(--radius-xl) var(--radius-xl) 0 0;
		box-shadow: var(--shadow-lg);
		transform: translateY(101%);
		opacity: 0;
		visibility: hidden;
	}

	.nav.is-open {
		transform: none;
		opacity: 1;
		visibility: visible;
	}

	.nav__list {
		flex-direction: column;
		gap: var(--space-1);
	}

	.nav__link {
		padding: var(--space-3) var(--space-4);
		border-radius: var(--radius-sm);
		font-size: var(--fs-500);
	}

	.nav__link[aria-current='page'] {
		font-weight: 600;
	}

	.nav__meta {
		display: block;
		padding-top: var(--space-4);
		border-top: 1px solid var(--border);
		font-size: var(--fs-300);
		color: var(--text-muted);
	}

	.nav__actions {
		display: grid;
		gap: var(--space-3);
	}
}

/* --- Desktop ------------------------------------------------------------ */
@media (min-width: 64em) {
	.nav-toggle,
	.nav-backdrop {
		display: none;
	}

	.nav {
		display: flex;
		align-items: center;
		gap: var(--space-4);
	}

	.nav__list {
		align-items: center;
		gap: var(--space-1);
	}

	.nav__link {
		padding: var(--space-2) var(--space-3);
		border-radius: var(--radius-sm);
		font-size: var(--fs-300);
		font-weight: 500;
	}

	.nav__actions {
		display: flex;
		align-items: center;
		gap: var(--space-2);
	}
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
	background-color: var(--surface-inverse);
	color: var(--text-inverse-muted);
	padding-block: var(--space-16) var(--space-8);
	font-size: var(--fs-300);
}

.footer-grid {
	display: grid;
	gap: var(--space-10);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 40em) {
	.footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64em) {
	.footer-grid {
		grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
		gap: var(--space-8);
	}
}

.footer-grid > * {
	min-width: 0;
}

.site-footer .brand__name {
	color: var(--white);
}

.site-footer .brand__tag {
	color: var(--text-inverse-muted);
}

.footer__heading {
	margin-bottom: var(--space-4);
	font-family: var(--font-mono);
	font-size: var(--fs-100);
	font-weight: 500;
	letter-spacing: var(--tracking-mono);
	text-transform: uppercase;
	color: var(--white);
}

.footer__list {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	list-style: none;
}

.footer__link {
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	color: var(--text-inverse-muted);
	text-decoration: none;
}

.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	margin-top: var(--space-12);
	padding-top: var(--space-6);
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	list-style: none;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: var(--tap-target);
	padding: 0.75rem 1.25rem;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	font-size: var(--fs-400);
	font-weight: 600;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

/* The soft shadow lives on a pseudo-element so only `opacity` animates. */
.btn::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	box-shadow: var(--shadow-md);
	opacity: 0;
	pointer-events: none;
}

.btn--primary {
	background-color: var(--accent-600);
	color: var(--white);
}

.btn--secondary {
	background-color: var(--surface);
	border-color: var(--border-strong);
	color: var(--text);
}

.btn--inverse {
	background-color: transparent;
	border-color: rgba(255, 255, 255, 0.4);
	color: var(--white);
}

.btn--sm {
	min-height: 2.5rem;
	padding: 0.5rem 0.9rem;
	font-size: var(--fs-300);
}

.btn--lg {
	min-height: 3.25rem;
	padding: 1rem 1.75rem;
	font-size: var(--fs-450);
}

.btn[disabled],
.btn[aria-disabled='true'] {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-3);
}

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-weight: 600;
	text-decoration: none;
}

.link-arrow__icon {
	width: 1rem;
	height: 1rem;
	flex: none;
}

/* -------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------- */
.form {
	display: grid;
	gap: var(--space-5);
}

.form-grid {
	display: grid;
	gap: var(--space-5);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.field {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	min-width: 0;
}

.field--full {
	grid-column: 1 / -1;
}

.field__label {
	font-size: var(--fs-300);
	font-weight: 600;
	color: var(--text);
}

.field__optional {
	font-weight: 400;
	color: var(--text-subtle);
}

.field__hint {
	font-size: var(--fs-200);
	color: var(--text-subtle);
}

.input,
.select,
.textarea {
	width: 100%;
	min-height: var(--tap-target);
	padding: 0.7rem 0.85rem;
	background-color: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	font-size: var(--fs-400);
	color: var(--text);
}

.input:hover,
.select:hover,
.textarea:hover {
	border-color: var(--ink-400);
}

.input:focus,
.select:focus,
.textarea:focus {
	border-color: var(--accent-600);
}

.input::placeholder,
.textarea::placeholder {
	color: var(--ink-400);
}

.textarea {
	min-height: 8rem;
	resize: vertical;
	line-height: var(--lh-normal);
}

.select {
	appearance: none;
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346566f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.85rem center;
	background-size: 1rem 1rem;
}

[aria-invalid='true'] {
	border-color: var(--danger);
	background-color: var(--danger-bg);
}

.checkbox {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	font-size: var(--fs-300);
	line-height: var(--lh-normal);
	color: var(--text-muted);
}

.checkbox input {
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.15rem;
	flex: none;
	accent-color: var(--accent-600);
}

.checkbox--consent {
	grid-column: 1 / -1;
}

/* Bot trap: kept out of the accessibility tree and out of the tab order. */
.hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-status {
	font-size: var(--fs-300);
	border-radius: var(--radius-sm);
}

.form-status:empty {
	display: none;
}

.form-status[data-tone='success'] {
	padding: var(--space-3) var(--space-4);
	background-color: var(--success-bg);
	color: var(--success);
}

.form-status[data-tone='error'] {
	padding: var(--space-3) var(--space-4);
	background-color: var(--danger-bg);
	color: var(--danger);
}




