/*
Theme Name: CAMRT Prep
Theme URI: https://camrtpreparatoryclasses.ca
Author: Built for CAMRT Preparatory Classes
Description: A fast, accessible theme for an independent exam-preparation service. No page builder: templates render real content, so pages load in a fraction of the time the Elementor build took.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: camrt-prep
*/

/* ============================================================
   Design tokens
   Navy carries the clinical, institutional weight the subject
   needs; teal keeps it from reading as cold or governmental.
   ============================================================ */
:root {
	--ink:        #0f1c2e;
	--navy:       #0d2b4e;
	--navy-700:   #14395f;
	--navy-900:   #081c35;
	--teal:       #0f8a7e;
	--teal-600:   #0b6f66;
	--amber:      #c87d1f;
	--bg:         #ffffff;
	--bg-soft:    #f4f7fb;
	--bg-tint:    #eaf1f8;
	--line:       #d9e3ef;
	--muted:      #56687f;

	--wrap:       1140px;
	--wrap-narrow: 760px;
	--radius:     10px;
	--radius-lg:  16px;
	--shadow:     0 1px 2px rgba(13,43,78,.06), 0 8px 24px rgba(13,43,78,.08);
	--shadow-lg:  0 2px 4px rgba(13,43,78,.06), 0 18px 48px rgba(13,43,78,.14);

	--step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
	--step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
	--step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.9rem);
	--step-3: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem);
	--step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);
}

*, *::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: .001ms !important; transition-duration: .001ms !important; }
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: var(--step-0);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p  { margin: 0 0 1.1em; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 3px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }

.eyebrow {
	display: inline-block; font-size: .8rem; font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase; color: var(--teal-600);
	margin-bottom: .85rem;
}
.section__head { max-width: 42rem; margin-bottom: 2.5rem; }
.section__head p { color: var(--muted); font-size: var(--step-1); margin-bottom: 0; }

.grid { display: grid; gap: 1.5rem; }
@media (min-width: 720px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; gap: .55rem;
	padding: .85rem 1.5rem; border-radius: var(--radius);
	font-weight: 650; text-decoration: none; border: 2px solid transparent;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-600); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-700); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn--outline { border-color: var(--line); color: var(--navy); background: #fff; }
.btn--outline:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255,255,255,.96);
	backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--line);
}
.site-header__inner {
	display: flex; align-items: center; gap: 1.25rem;
	min-height: 74px;
}
.site-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.site-brand img { max-height: 44px; width: auto; }
.site-brand__text { font-weight: 750; color: var(--navy); line-height: 1.15; font-size: 1.02rem; }
.site-brand__text span { display: block; font-weight: 500; font-size: .74rem; color: var(--muted); letter-spacing: .02em; }

.nav__list { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
	display: block; padding: .5rem .8rem; border-radius: 8px;
	color: var(--navy); font-weight: 560; text-decoration: none; font-size: .97rem;
}
.nav__list a:hover { background: var(--bg-tint); }
.nav__list .current-menu-item > a { color: var(--teal-600); }
.nav__list .current-menu-item > a::after {
	content: ""; display: block; height: 2px; border-radius: 2px;
	background: var(--teal); margin-top: 3px;
}

.header__cta { display: none; }
@media (min-width: 1060px) { .header__cta { display: inline-flex; } }

.nav-toggle {
	display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
	width: 44px; height: 44px; padding: 0 10px;
	background: none; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1059px) {
	.site-nav {
		position: fixed; inset: 74px 0 auto 0;
		background: #fff; border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow-lg);
		max-height: 0; overflow: hidden; transition: max-height .26s ease;
	}
	.site-nav.is-open { max-height: calc(100vh - 74px); overflow-y: auto; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1rem 1.25rem; }
	.nav__list a { padding: .95rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
	.nav__list .current-menu-item > a::after { display: none; }
	.site-nav .btn { margin-top: 1rem; width: 100%; justify-content: center; }
}
@media (min-width: 1060px) {
	.nav-toggle { display: none; }
	.site-nav .btn--mobile-only { display: none; }
}

/* ---------- hero ---------- */
.hero {
	position: relative; color: #fff;
	background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 55%, #10466f 100%);
	overflow: hidden;
}
.hero::after {
	content: ""; position: absolute; inset: 0;
	background:
		radial-gradient(60rem 30rem at 85% -10%, rgba(15,138,126,.30), transparent 65%),
		radial-gradient(40rem 24rem at 5% 110%, rgba(15,138,126,.18), transparent 60%);
	pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 920px) { .hero__grid { grid-template-columns: 1.15fr .85fr; gap: 3.5rem; } }
.hero h1 { color: #fff; margin-bottom: .65rem; }
.hero__lede { font-size: var(--step-1); color: rgba(255,255,255,.90); max-width: 34rem; }
.hero .eyebrow { color: #7ee0d2; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.9rem; }
.hero__note {
	margin-top: 1.9rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.18);
	font-size: .9rem; color: rgba(255,255,255,.72); max-width: 34rem;
}

.hero__card {
	background: rgba(255,255,255,.07);
	border: 1px solid rgba(255,255,255,.17);
	border-radius: var(--radius-lg); padding: 1.6rem;
	backdrop-filter: blur(4px);
}
.hero__card h2 { color: #fff; font-size: var(--step-1); margin-bottom: 1rem; }
.hero__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.hero__list li { display: flex; gap: .7rem; align-items: flex-start; color: rgba(255,255,255,.90); font-size: .98rem; }
.hero__list svg { flex: 0 0 20px; margin-top: 3px; }

/* ---------- cards ---------- */
.card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: 1.75rem; display: flex; flex-direction: column;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: #b9cde2; box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { font-size: var(--step-1); }
.card p { color: var(--muted); margin-bottom: 1.1rem; }
.card__icon {
	width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
	background: var(--bg-tint); color: var(--teal-600); margin-bottom: 1.1rem;
}
.card__link { margin-top: auto; font-weight: 650; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.card__link:hover { gap: .65rem; }

.card--discipline { padding: 1.4rem 1.5rem; }
.card--discipline h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.card--discipline p { font-size: .93rem; margin-bottom: 0; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 3.25rem; }
.step::before {
	counter-increment: step; content: counter(step);
	position: absolute; top: 0; left: 0;
	width: 44px; height: 44px; border-radius: 50%;
	background: var(--navy); color: #fff; display: grid; place-items: center;
	font-weight: 700; font-size: 1.05rem;
}
.step h3 { font-size: var(--step-1); }
.step p { color: var(--muted); margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
	background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 60%, var(--teal-600) 165%);
	color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.25rem);
	display: grid; gap: 1.75rem; align-items: center;
}
@media (min-width: 880px) { .cta-band { grid-template-columns: 1.4fr auto; } }
.cta-band h2 { color: #fff; margin-bottom: .5rem; }
.cta-band p { color: rgba(255,255,255,.88); margin-bottom: 0; max-width: 40rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ---------- article cards ---------- */
.post-card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
	overflow: hidden; display: flex; flex-direction: column;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.post-card:hover { border-color: #b9cde2; box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card__media { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-tint); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; letter-spacing: .01em; }
.post-card h3 { font-size: 1.16rem; margin-bottom: .55rem; line-height: 1.3; }
.post-card h3 a { color: var(--navy); text-decoration: none; }
.post-card h3 a:hover { color: var(--teal-600); }
.post-card p { color: var(--muted); font-size: .95rem; margin-bottom: 1.1rem; }
.post-card .card__link { margin-top: auto; }

/* ---------- page / article body ---------- */
.page-hero {
	background: linear-gradient(135deg, var(--navy-900), var(--navy) 70%);
	color: #fff; padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}
.page-hero h1 { color: #fff; margin-bottom: .4rem; }
.page-hero p { color: rgba(255,255,255,.85); margin-bottom: 0; font-size: var(--step-1); max-width: 44rem; }
.breadcrumbs { font-size: .86rem; color: rgba(255,255,255,.68); margin-bottom: .9rem; }
.breadcrumbs a { color: rgba(255,255,255,.85); }

.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: var(--step-2); }
.prose h3 { margin-top: 1.8em; font-size: var(--step-1); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose img { border-radius: var(--radius); }
.prose blockquote {
	margin: 1.6em 0; padding: .4em 0 .4em 1.3em;
	border-left: 3px solid var(--teal); color: var(--navy-700); font-size: var(--step-1);
}
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.prose th { background: var(--bg-soft); font-weight: 650; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .75rem; max-width: 48rem; }
.faq details {
	border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
	transition: border-color .18s ease;
}
.faq details[open] { border-color: #b9cde2; box-shadow: var(--shadow); }
.faq summary {
	cursor: pointer; list-style: none; padding: 1.05rem 3rem 1.05rem 1.25rem;
	font-weight: 650; color: var(--navy); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
	content: ""; position: absolute; right: 1.25rem; top: 50%;
	width: 10px; height: 10px; margin-top: -6px;
	border-right: 2px solid var(--teal-600); border-bottom: 2px solid var(--teal-600);
	transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .faq__body { padding: 0 1.25rem 1.25rem; color: var(--muted); }
.faq .faq__body > *:last-child { margin-bottom: 0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.25fr; gap: 3rem; } }
.contact-item { display: flex; gap: .9rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item__icon { flex: 0 0 42px; height: 42px; border-radius: 11px; background: var(--bg-tint); color: var(--teal-600); display: grid; place-items: center; }
.contact-item h3 { font-size: 1rem; margin-bottom: .15rem; }
.contact-item p, .contact-item a { margin: 0; color: var(--muted); text-decoration: none; }
.contact-item a:hover { color: var(--teal-600); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.76); padding-top: clamp(3rem, 6vw, 4.5rem); }
.site-footer h3 { color: #fff; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer a { color: rgba(255,255,255,.80); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: 2.25rem; padding-bottom: 2.75rem; }
@media (min-width: 760px)  { .footer__grid { grid-template-columns: 1.5fr 1fr 1.3fr; gap: 3rem; } }
.footer__brand img { max-height: 44px; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: .95; }
.footer__about { font-size: .95rem; max-width: 30rem; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .96rem; }
.footer__disclaimer {
	border-top: 1px solid rgba(255,255,255,.14); padding: 1.5rem 0;
	font-size: .86rem; color: rgba(255,255,255,.58);
}
.footer__bottom {
	border-top: 1px solid rgba(255,255,255,.14); padding: 1.25rem 0 2rem;
	display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
	font-size: .88rem; color: rgba(255,255,255,.6);
}

/* ---------- pagination / misc ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 3rem; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .7rem;
	border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: var(--navy);
}
.pagination .page-numbers:hover { border-color: var(--navy); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

.notice-404 { text-align: center; padding: clamp(3rem, 10vw, 7rem) 0; }

/* ---------- credibility band ----------
   Real, confirmed figures. Given this site sits next to a national
   professional body with a near-identical name, numbers are only shown
   where they are the business's own and can be stood behind.
   ------------------------------------- */
.stats { display: grid; gap: 1rem; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.stat {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: 1.75rem 1.5rem; text-align: center;
}
.stat__num {
	font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.3rem);
	font-weight: 750; color: var(--navy); line-height: 1; letter-spacing: -0.02em;
}
.stat__num span { color: var(--teal); }
.stat__label { color: var(--muted); margin: .6rem 0 0; font-size: .97rem; }

.hero__proof {
	display: flex; flex-wrap: wrap; gap: 1.1rem 2rem;
	margin-top: 1.9rem; padding-top: 1.5rem;
	border-top: 1px solid rgba(255,255,255,.18);
}
.hero__proof div { color: rgba(255,255,255,.92); }
.hero__proof strong { display: block; font-size: 1.6rem; font-weight: 750; line-height: 1.1; color: #fff; }
.hero__proof span { font-size: .86rem; color: rgba(255,255,255,.70); }
