/**
 * ZORA Academy — foundations.
 * Design tokens, reset, typography, layout primitives and long-form prose.
 * Values are taken directly from the approved ZORA Academy design.
 */

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

:root {
	/* Brand */
	--z-navy-900: #0a1c33; /* Dark section canvas (hero, placement, CTA) */
	--z-navy-800: #0b1f3a; /* Primary dark: footer, buttons, headings */
	--z-blue-600: #1a4d8f; /* Primary accent and links */
	--z-blue-400: #3c6fae; /* Blueprint route trace */
	--z-blue-300: #6e93c4; /* Eyebrow text on dark */
	--z-blue-200: #9fc0ea; /* Light accent on dark */

	/* Ink */
	--z-ink: #101a2b;
	--z-ink-strong: #0b1f3a;
	--z-ink-slate: #3d4a5c;
	--z-ink-body: #5a6779;
	--z-ink-dim: #6b7889;
	--z-ink-muted: #8a94a3;
	--z-ink-faint: #a9b3c0;

	/* Ink on dark surfaces */
	--z-on-dark: #a3b6ce;
	--z-on-dark-strong: #c3cedd;
	--z-on-dark-soft: #9fb0c6;
	--z-on-dark-faint: #7c8da5;
	--z-on-dark-lede: #a9bbd1; /* Inner-page hero introductions */
	--z-on-dark-label: #8fa5bf; /* Stat-bar captions */
	--z-on-dark-crumb: #7e93ae; /* Breadcrumbs on dark */
	--z-on-dark-meta: #5c6e86; /* Footer locality line */
	--z-eyebrow-dark: #6fa0dc; /* Eyebrows on dark */
	--z-hairline-dark: rgba(255, 255, 255, 0.14);

	/* Surfaces */
	--z-white: #ffffff;
	--z-surface: #f5f7fa;
	--z-surface-alt: #e7ecf3;
	--z-surface-frame: #eef1f6;
	--z-placeholder: #e3e8ef;

	/* Borders */
	--z-border: #e3e8ef;
	--z-border-mid: #d7dee8;
	--z-border-strong: #c9d3e0;
	--z-border-hairline: #f0f3f7;
	--z-border-dark: #1e3556;
	--z-route-faint: #16324f;
	--z-route-mid: #1d3f63;
	--z-route-node: #2a4e7e;
	--z-route-label: #43678f;
	--z-route-label-dim: #2f4e70;
	--z-route-dot: #3e6ea8;

	/* Feedback */
	--z-error: #b4232a;
	--z-notice-bg: #f0f5fb;

	/* Typography */
	--z-font-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--z-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--z-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	/* Radius */
	--z-radius: 2px;
	--z-radius-lg: 3px;
	--z-radius-pill: 50%;

	/* Layout */
	--z-container: 1240px;
	--z-container-prose: 820px;
	--z-gutter: clamp(20px, 4vw, 40px);
	--z-section-y: clamp(72px, 9vw, 140px);
	--z-section-y-md: clamp(56px, 7vw, 110px);
	--z-section-y-sm: clamp(48px, 6vw, 90px);
	--z-header-height: 76px;

	/* Elevation */
	--z-shadow-header: 0 1px 16px rgba(11, 31, 58, 0.08);
	--z-shadow-modal: 0 30px 70px rgba(7, 18, 33, 0.28);
	--z-focus-ring: 0 0 0 3px rgba(26, 77, 143, 0.14);

	/* Motion */
	--z-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--z-duration: 300ms;
}

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

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

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* Keep in-page anchors clear of the sticky header. */
	scroll-padding-top: calc(var(--z-header-height) + 16px);
}

body {
	margin: 0;
	background: var(--z-white);
	color: var(--z-ink);
	font-family: var(--z-font-body);
	font-size: 16px;
	line-height: 1.6;
	text-wrap: pretty;
	overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--z-font-head);
	color: var(--z-ink-strong);
}

a {
	color: var(--z-blue-600);
	text-decoration: none;
}

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

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

img {
	height: auto;
}

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

:focus-visible {
	outline: 2px solid var(--z-blue-600);
	outline-offset: 3px;
}

/* Dark surfaces need a light focus ring to stay visible. */
.z-section--dark :focus-visible,
.z-footer :focus-visible,
.z-hero :focus-visible {
	outline-color: var(--z-blue-200);
}

/* --------------------------------------------------------- Accessibility */

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

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--z-gutter);
	z-index: 200;
	display: inline-flex;
	align-items: center;
	height: 46px;
	padding: 0 20px;
	background: var(--z-navy-800);
	color: var(--z-white);
	font: 600 14px/1 var(--z-font-body);
	border-radius: var(--z-radius);
	transition: top 160ms ease;
}

.skip-link:focus {
	top: 12px;
	color: var(--z-white);
}

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

.z-container {
	max-width: var(--z-container);
	margin-inline: auto;
	padding-inline: var(--z-gutter);
}

.z-container--prose {
	max-width: var(--z-container-prose);
}

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

.z-section__inner {
	max-width: var(--z-container);
	margin-inline: auto;
	padding: var(--z-section-y) var(--z-gutter);
}

.z-section__inner--md {
	padding-block: var(--z-section-y-md);
}

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

.z-section--surface {
	background: var(--z-surface);
	border-top: 1px solid var(--z-border);
	border-bottom: 1px solid var(--z-border);
}

.z-section--dark {
	position: relative;
	background: var(--z-navy-900);
	overflow: hidden;
}

.z-section--navy {
	background: var(--z-navy-800);
}

.z-section--bordered {
	border-bottom: 1px solid var(--z-border);
}

/* Two-column split used across the design. `--min` tunes the collapse point. */
.z-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 320px)), 1fr));
	gap: var(--gap, clamp(40px, 6vw, 88px));
}

.z-split--start { align-items: start; }
.z-split--center { align-items: center; }
.z-split--end { align-items: end; }
.z-split--stretch { align-items: stretch; }

/* ------------------------------------------------------------ Typography */

.z-eyebrow {
	margin: 0 0 28px;
	font: 500 11px/1 var(--z-font-mono);
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--z-blue-600);
}

.z-eyebrow--on-dark {
	color: var(--z-blue-300);
}

.z-eyebrow--sans {
	font: 600 12px/1 var(--z-font-body);
	letter-spacing: 0.16em;
}

/* Small uppercase mono labels (stat captions, meta rows, slide counters). */
.z-label {
	font: 500 11px/1.5 var(--z-font-mono);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--z-ink-muted);
}

.z-label--accent { color: var(--z-blue-600); }
.z-label--faint { color: var(--z-ink-faint); }

.z-h1 {
	margin: 0;
	font: 600 clamp(38px, 5vw, 68px) / 1.06 var(--z-font-head);
	letter-spacing: -0.034em;
}

.z-h1--page {
	font-weight: 700;
	font-size: clamp(36px, 4.8vw, 60px);
	line-height: 1.08;
	letter-spacing: -0.032em;
}

.z-h2 {
	margin: 0;
	font: 600 clamp(28px, 3.2vw, 44px) / 1.14 var(--z-font-head);
	letter-spacing: -0.03em;
}

.z-h2--sm {
	font-size: clamp(26px, 3vw, 40px);
	line-height: 1.16;
	letter-spacing: -0.028em;
}

.z-h2--lg {
	font-size: clamp(32px, 4vw, 56px);
	line-height: 1.08;
	letter-spacing: -0.034em;
}

.z-h2--compact {
	font-size: 22px;
	line-height: 1.3;
	letter-spacing: normal;
}

.z-h3 {
	margin: 0 0 10px;
	font: 600 20px/1.3 var(--z-font-head);
	letter-spacing: -0.016em;
}

.z-lede {
	margin: 0;
	font: 400 clamp(16px, 1.3vw, 18px) / 1.75 var(--z-font-body);
	color: var(--z-ink-body);
}

.z-body {
	margin: 0;
	font: 400 clamp(16px, 1.2vw, 17px) / 1.8 var(--z-font-body);
	color: var(--z-ink-body);
}

.z-body--sm {
	font: 400 15px/1.72 var(--z-font-body);
}


/* Larger Manrope pull-quote used for emphasis lines. */
.z-statement {
	margin: 0;
	font: 500 clamp(17px, 1.5vw, 20px) / 1.6 var(--z-font-head);
	letter-spacing: -0.012em;
	color: var(--z-blue-600);
}

.z-measure { max-width: 34em; }
.z-measure--tight { max-width: 26em; }
.z-measure--head { max-width: 24em; }

/* --------------------------------------------------------------- Reveals */

[data-reveal] {
	opacity: 0;
	transform: translateY(28px);
	transition:
		opacity 0.95s var(--z-ease),
		transform 0.95s var(--z-ease);
}

[data-reveal].is-in {
	opacity: 1;
	transform: none;
}

/* Without JS — or with reveals switched off — nothing stays invisible. */
.no-js [data-reveal],
.zora-no-reveal [data-reveal] {
	opacity: 1;
	transform: none;
	transition: none;
}

@keyframes zRing {
	0% { transform: scale(0.3); opacity: 0.5; }
	100% { transform: scale(3.4); opacity: 0; }
}

@keyframes zTrace {
	to { stroke-dashoffset: -1400; }
}

@keyframes zPulse {
	0%, 100% { opacity: 0.35; }
	50% { opacity: 1; }
}

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

	[data-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}

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

/* ----------------------------------------------------------------- Prose */
/*
 * Applied to editor-managed content: legal pages, posts and page bodies.
 * Mirrors the type treatment of the design's Privacy / Terms pages.
 */

.z-prose {
	font: 400 16px/1.8 var(--z-font-body);
	color: var(--z-ink-body);
}

.z-prose > *:first-child { margin-top: 0; }
.z-prose > *:last-child { margin-bottom: 0; }

.z-prose h2 {
	margin: 44px 0 12px;
	font: 600 22px/1.3 var(--z-font-head);
	color: var(--z-ink-strong);
}

.z-prose h3 {
	margin: 34px 0 10px;
	font: 600 18px/1.35 var(--z-font-head);
	color: var(--z-ink-strong);
}

.z-prose h4 {
	margin: 28px 0 10px;
	font: 600 16px/1.4 var(--z-font-head);
	color: var(--z-ink-strong);
}

.z-prose p,
.z-prose ul,
.z-prose ol {
	margin: 0 0 34px;
}

.z-prose ul,
.z-prose ol {
	padding-left: 20px;
}

.z-prose li {
	margin-bottom: 8px;
}

.z-prose li::marker {
	color: var(--z-ink-muted);
}

.z-prose strong {
	color: var(--z-ink-strong);
	font-weight: 600;
}

.z-prose blockquote {
	margin: 0 0 34px;
	padding: 4px 0 4px 24px;
	border-left: 2px solid var(--z-blue-600);
	font: 400 clamp(18px, 1.9vw, 22px) / 1.6 var(--z-font-head);
	letter-spacing: -0.016em;
	color: var(--z-ink-strong);
}

.z-prose img,
.z-prose figure {
	margin: 0 0 34px;
}

.z-prose figcaption {
	margin-top: 12px;
	font: 400 14px/1.6 var(--z-font-body);
	color: var(--z-ink-muted);
}

.z-prose code {
	font-family: var(--z-font-mono);
	font-size: 0.9em;
	background: var(--z-surface);
	padding: 2px 6px;
	border-radius: var(--z-radius);
}

.z-prose pre {
	margin: 0 0 34px;
	padding: 20px;
	overflow-x: auto;
	background: var(--z-surface);
	border: 1px solid var(--z-border);
	border-radius: var(--z-radius);
}

.z-prose pre code {
	background: none;
	padding: 0;
}

.z-prose hr {
	margin: 44px 0;
	border: 0;
	border-top: 1px solid var(--z-border);
}

.z-prose table {
	width: 100%;
	margin: 0 0 34px;
	border-collapse: collapse;
	font-size: 15px;
}

.z-prose th,
.z-prose td {
	padding: 12px 14px;
	border: 1px solid var(--z-border);
	text-align: left;
}

.z-prose th {
	background: var(--z-surface);
	font-weight: 600;
	color: var(--z-ink-strong);
}

/* Wide content must scroll inside itself, never the page. */
.z-prose .wp-block-table {
	overflow-x: auto;
}

/* WordPress alignment + caption defaults */
.alignleft {
	float: left;
	margin: 0 24px 20px 0;
}

.alignright {
	float: right;
	margin: 0 0 20px 24px;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide,
.alignfull {
	margin-inline: 0;
}

.wp-caption-text,
.wp-element-caption {
	margin-top: 12px;
	font: 400 14px/1.6 var(--z-font-body);
	color: var(--z-ink-muted);
}

