/* =========================================================================
   CATALYST ADVISORY — DESIGN TOKENS & BASE LAYER
   -------------------------------------------------------------------------
   Colour tokens below are fallbacks only — the live values are injected as
   inline :root custom properties from the Customizer (inc/enqueue.php), so
   admins can rebrand the whole site without touching this file.

   Type: a single system-UI sans stack, used at two weights/tracking levels
   for heading vs body, so the theme ships with zero external font requests.

   Layout: content sits in an 1160px container; cards are flat and
   border-led (no drop-shadow kit) with a coloured top rule that carries
   meaning (destination/service/university/story), not decoration.
   ========================================================================= */

:root {
	/* Brand colour fallbacks (overridden inline by the Customizer). */
	--ca-primary: #102A43;
	--ca-blue: #1769AA;
	--ca-sky: #38BDF8;
	--ca-accent: #F59E0B;
	--ca-white: #FFFFFF;
	--ca-light: #F5F8FC;
	--ca-text: #172033;
	--ca-muted: #64748B;
	--ca-border: #E2E8F0;

	/* Derived surfaces. */
	--ca-surface: var(--ca-white);
	--ca-surface-alt: var(--ca-light);
	--ca-overlay: rgba(16, 42, 67, 0.86);
	--ca-focus: #1769AA;

	/* Type. */
	--ca-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ca-step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
	--ca-step-0: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
	--ca-step-1: clamp(1.2rem, 1.14rem + 0.3vw, 1.35rem);
	--ca-step-2: clamp(1.44rem, 1.32rem + 0.6vw, 1.75rem);
	--ca-step-3: clamp(1.85rem, 1.6rem + 1.2vw, 2.4rem);
	--ca-step-4: clamp(2.3rem, 1.9rem + 2vw, 3.25rem);
	--ca-step-5: clamp(2.8rem, 2.2rem + 3vw, 4.2rem);

	/* Rhythm. */
	--ca-radius-sm: 4px;
	--ca-radius-md: 10px;
	--ca-radius-lg: 18px;
	--ca-container: 1160px;
	--ca-gutter: clamp(1.25rem, 1rem + 1.2vw, 2.5rem);
	--ca-section-y: clamp(3.5rem, 2.8rem + 3vw, 6.5rem);
	--ca-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	font-family: var(--ca-font);
	font-size: var(--ca-step-0);
	line-height: 1.65;
	color: var(--ca-text);
	background: var(--ca-surface);
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: var(--ca-primary);
}

h1 { font-size: var(--ca-step-5); }
h2 { font-size: var(--ca-step-4); }
h3 { font-size: var(--ca-step-2); }
h4 { font-size: var(--ca-step-1); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ca-blue); text-decoration-thickness: 1.5px; text-underline-offset: 0.15em; }
a:hover { color: var(--ca-primary); }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

address { font-style: normal; }

/* -------------------------------------------------------------------------
   Focus states
   ---------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--ca-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

/* -------------------------------------------------------------------------
   Accessibility utilities
   ---------------------------------------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: -60px;
	left: 1rem;
	z-index: 10000;
	background: var(--ca-primary);
	color: var(--ca-white);
	padding: 0.75em 1.25em;
	border-radius: var(--ca-radius-sm);
	transition: top 0.2s var(--ca-ease);
}
.skip-link:focus {
	top: 1rem;
	color: var(--ca-white);
}

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

.section { padding-block: var(--ca-section-y); }
.section--alt { background: var(--ca-surface-alt); }
.section--dark { background: var(--ca-primary); color: rgba(255,255,255,0.88); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--ca-white); }
.section--tight { padding-block: clamp(2rem, 1.6rem + 1.5vw, 3.25rem); }

.section-heading { max-width: 640px; margin-bottom: clamp(1.75rem, 1.4rem + 1.5vw, 3rem); }
.section-heading--center { margin-inline: auto; text-align: center; }
.section-heading__lede { color: var(--ca-muted); font-size: var(--ca-step-1); margin-top: 0.6em; }
.section--dark .section-heading__lede { color: rgba(255,255,255,0.72); }

.grid { display: grid; gap: clamp(1.25rem, 1rem + 1vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card-grid { display: grid; gap: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }

.visually-balanced { text-wrap: balance; }

/* Reveal-on-scroll (progressive enhancement, see main.js) */
.js-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ca-ease), transform 0.6s var(--ca-ease); }
.js-reveal.is-visible { opacity: 1; transform: none; }

/* -------------------------------------------------------------------------
   Page head (used by archive/single/page templates)
   ---------------------------------------------------------------------- */
.page-head {
	background: var(--ca-primary);
	color: rgba(255,255,255,0.9);
	padding-block: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.page-head__title { color: var(--ca-white); margin-bottom: 0; }
.page-head__intro { max-width: 640px; margin-top: 0.75em; color: rgba(255,255,255,0.78); }

/* -------------------------------------------------------------------------
   Empty state
   ---------------------------------------------------------------------- */
.empty-state {
	text-align: center;
	max-width: 480px;
	margin-inline: auto;
	padding-block: 2rem;
}
.empty-state__title { margin-bottom: 0.4em; }

/* -------------------------------------------------------------------------
   Elementor compatibility
   ---------------------------------------------------------------------- */
/* Full Width template (page-templates/page-full-width.php): no max-width
   constraint, so Elementor's own full-width sections can span edge to edge. */
.site-main--full-width { width: 100%; }
.site-main--full-width > .elementor { margin: 0; }

/* Elementor's editor preview loads this stylesheet inside its own iframe;
   keep the admin bar from colliding with a sticky header there. */
.elementor-editor-active .site-header--sticky { position: static; }
