/* ═══════════════════════════════════════════════════════════════════════════
   OFSTED READINESS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */


/* ── Stats: Schools using Cornerstones outperform the national average ── */

.ce-ofsted-stats {
	background: #253d47;
	padding: 5rem 0;
}

.ce-ofsted-stats .site-container {
	text-align: center;
}

.ce-ofsted-stats__title-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	margin-bottom: 1rem;
}

.ce-ofsted-stats__icon-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 3.75rem;
	height: 3.75rem;
	background: rgba(250, 240, 244, 0.9);
	border: 3px solid #af4d76;
	border-radius: 0.6rem;
	color: #af4d76;
	font-size: 2.45rem;
	--fa-primary-color: #af4d76;
	--fa-secondary-color: #af4d76;
	--fa-secondary-opacity: 0.4;
}

/* Inline brand-emblem SVG standing in for a Font Awesome icon — recoloured
   via currentColor so it inherits the badge's own colour (see
   page-splits.css for the same pattern on .page-split__icon-badge). */
.ce-ofsted-stats__icon-badge svg {
	width: 2.45rem;
	height: 2.45rem;
}

.ce-ofsted-stats__icon-badge svg path {
	fill: currentColor;
}

.ce-ofsted-stats__heading {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-h2);
	font-weight: 700;
	color: #ffffff;
	margin: 0;
	line-height: 1.25;
}

/* Left, matching .ce-ofsted-framework__heading further down this file.

   The two title rows are built identically — icon badge, then heading, the
   pair centred as a unit — but the framework heading inherits `start` while
   this one was picking up the section's text-align: center. On one line that
   is invisible, which is why it survived; wrapped to three on a phone, one
   block is ragged-both-sides beside its icon and the other is flush left, and
   the pair stop looking like the same component.

   Mobile only, because both headings sit on a single line above it and there
   is nothing there to align. */
@media (max-width: 767px) {
	.ce-ofsted-stats__heading { text-align: left; }
}

.ce-ofsted-stats__sub {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-body);
	color: rgba(255, 255, 255, 0.8);
	max-width: none;
	margin: 0 auto 2.75rem;
	line-height: 1.65;
}

/* ── Uplift figures ── */

.ce-ofsted-stats__uplift {
	display: flex;
	align-items: stretch;
	gap: 1.25rem;
	margin-bottom: 2.5rem;
}

.ce-ofsted-uplift__stat {
	flex: 1;
	text-align: center;
	padding: 2.5rem 2rem;
	border-radius: 1.5rem;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Same colour-tinted glass-card look used for feature-list cards elsewhere
   on the site (see feature-list.css) — opaque light tints (computed as the
   rgba brand tint composited over white) rather than a translucent white
   overlay, since a translucent tint here would just wash out against navy. */
.ce-ofsted-uplift__stat:nth-child(2n+1) {
	background: rgb(254, 242, 228);
	border: 1px solid rgba(249, 157, 49, 0.3);
}

.ce-ofsted-uplift__stat:nth-child(2n+2) {
	background: rgb(246, 235, 240);
	border: 1px solid rgba(175, 77, 118, 0.25);
}

.ce-ofsted-uplift__area {
	font-family: var(--ci-font-primary);
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	font-weight: 700;
	color: var(--ci-color-navy);
	margin: 0 0 1rem;
	line-height: 1.2;
}

.ce-ofsted-uplift__figure-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	margin-bottom: 0.75rem;
}

.ce-ofsted-uplift__pct {
	font-family: var(--ci-font-primary);
	font-size: clamp(4rem, 7vw, 6rem);
	font-weight: 800;
	line-height: 1;
}

.ce-ofsted-uplift__stat:nth-child(2n+1) .ce-ofsted-uplift__pct { color: var(--ci-color-engage); }
.ce-ofsted-uplift__stat:nth-child(2n+2) .ce-ofsted-uplift__pct { color: var(--ci-color-develop); }

.ce-ofsted-uplift__suffix {
	font-family: var(--ci-font-primary);
	font-size: clamp(0.95rem, 1.5vw, 1.2rem);
	font-weight: 400;
	color: #4a5a6a;
	line-height: 1.25;
	max-width: 4.5rem;
	text-align: left;
}

.ce-ofsted-uplift__detail {
	font-family: var(--ci-font-primary);
	font-size: clamp(1rem, 1.5vw, 1.15rem);
	color: #4a5a6a;
	margin: 0 0 0.6rem;
}

.ce-ofsted-uplift__vs {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-utility);
	color: #8a97a3;
	margin: 0;
}

/* ── Footnotes ── */

.ce-ofsted-stats__footnotes {
	text-align: center;
}

.ce-ofsted-stats__footnotes p {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-utility);
	color: rgba(255, 255, 255, 0.35);
	margin: 0.25rem 0;
	line-height: 1.55;
}

/* ── Mobile ── */

@media (max-width: 640px) {
	.ce-ofsted-stats {
		padding: 3rem 0;
	}

	.ce-ofsted-stats__uplift {
		flex-direction: column;
	}

	.ce-ofsted-uplift__stat {
		padding: 2rem 1.5rem;
	}
}


/* ═══════════════════════════════════════════════════════════════════════════
   FRAMEWORK SECTION — "What inspectors look for and how Cornerstones helps"
   ═══════════════════════════════════════════════════════════════════════════ */

.ce-ofsted-framework {
	background: #ffffff;
	padding: 5rem 0;
	position: relative;
	overflow: clip;
}

.ce-ofsted-framework::before {
	content: '';
	position: absolute;
	width: 450px;
	height: 450px;
	background: #f9f9f9;
	border-radius: 2.75rem;
	transform: rotate(45deg);
	top: -80px;
	left: -90px;
	pointer-events: none;
	z-index: 0;
}

.ce-ofsted-framework::after {
	content: '';
	position: absolute;
	width: 260px;
	height: 260px;
	background: #f9f9f9;
	border-radius: 2rem;
	transform: rotate(45deg);
	top: 420px;
	left: 178px;
	pointer-events: none;
	z-index: 0;
}

.ce-ofsted-framework .site-container {
	position: relative;
	z-index: 1;
}

.ce-ofsted-framework__title-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	margin-bottom: 1rem;
}

.ce-ofsted-framework__heading {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-h2);
	font-weight: 700;
	color: #646464;
	margin: 0;
	line-height: 1.25;
}

.ce-ofsted-framework__intro {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-body);
	color: #555;
	text-align: center;
	max-width: 680px;
	/* Back to the full gap now the legend line that used to sit between this
	   and the grid has gone. */
	margin: 0 auto 2.75rem;
	line-height: 1.65;
}

/* ── Card grid ── */

.ce-ofsted-framework__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.25rem;
}

.ce-ofsted-framework__item {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1.25rem 1.25rem 1rem;
	border-radius: 1.5rem;
	backdrop-filter: blur(20px) saturate(1.3);
	-webkit-backdrop-filter: blur(20px) saturate(1.3);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 4px 20px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ce-ofsted-framework__item:hover {
	transform: translateY(-2px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 28px rgba(0, 0, 0, 0.09);
}

.ce-ofsted-c-1 { background: rgba(249, 157, 49, 0.13); border: 1px solid rgba(249, 157, 49, 0.3); }
.ce-ofsted-c-2 { background: rgba(175, 77, 118, 0.11); border: 1px solid rgba(175, 77, 118, 0.25); }
.ce-ofsted-c-3 { background: rgba(83, 141, 169, 0.13); border: 1px solid rgba(83, 141, 169, 0.28); }
.ce-ofsted-c-4 { background: rgba(207, 214, 102, 0.15); border: 1px solid rgba(207, 214, 102, 0.35); }

.ce-ofsted-framework__item-heading {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-card-heading);
	font-weight: 700;
	color: var(--ci-color-navy);
	margin: 0;
	line-height: 1.25;
}

.ce-ofsted-framework__item-header {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.ce-ofsted-framework__item-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.75rem;
	background: none;
	flex-shrink: 0;
}

.ce-ofsted-c-1 .ce-ofsted-framework__item-icon { color: #b86e10; }
.ce-ofsted-c-2 .ce-ofsted-framework__item-icon { color: #8f3a5e; }
.ce-ofsted-c-3 .ce-ofsted-framework__item-icon { color: #3f7288; }
.ce-ofsted-c-4 .ce-ofsted-framework__item-icon { color: #6b7010; }

.ce-ofsted-framework__item-link-wrap {
	margin-top: 0.25rem;
}

.ce-ofsted-framework__item-link {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-utility);
	font-weight: 700;
	text-decoration: none;
	pointer-events: none;
}

.ce-ofsted-c-1 .ce-ofsted-framework__item-link { color: #b86e10; }
.ce-ofsted-c-2 .ce-ofsted-framework__item-link { color: #8f3a5e; }
.ce-ofsted-c-3 .ce-ofsted-framework__item-link { color: #3f7288; }
.ce-ofsted-c-4 .ce-ofsted-framework__item-link { color: #6b7010; }

.ce-ofsted-framework__item:hover .ce-ofsted-c-1 .ce-ofsted-framework__item-link,
.ce-ofsted-c-1.ce-ofsted-framework__item:hover .ce-ofsted-framework__item-link { color: #d97e10; }
.ce-ofsted-framework__item:hover .ce-ofsted-c-2 .ce-ofsted-framework__item-link,
.ce-ofsted-c-2.ce-ofsted-framework__item:hover .ce-ofsted-framework__item-link { color: #af4d76; }
.ce-ofsted-framework__item:hover .ce-ofsted-c-3 .ce-ofsted-framework__item-link,
.ce-ofsted-c-3.ce-ofsted-framework__item:hover .ce-ofsted-framework__item-link { color: #538da9; }
.ce-ofsted-framework__item:hover .ce-ofsted-c-4 .ce-ofsted-framework__item-link,
.ce-ofsted-c-4.ce-ofsted-framework__item:hover .ce-ofsted-framework__item-link { color: #9fa825; }

/* ── Modal ── */

.ce-ofsted-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

/* Both keyframes now live in base/animations.css — the Maestro video modal
   uses the same two, and they have to stay identical. */
.ce-ofsted-modal.is-open {
	display: flex;
	animation: ce-modal-fadein 0.18s ease-out;
}

.ce-ofsted-modal.is-open .ce-ofsted-modal__panel {
	animation: ce-modal-panel-in 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.ce-ofsted-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	cursor: pointer;
}

.ce-ofsted-modal__panel {
	position: relative;
	z-index: 1;
	background: #ffffff;
	border-radius: 1.5rem;
	width: 100%;
	max-width: 640px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	overflow: clip;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}


.ce-ofsted-modal__panel > p {
	display: none;
}

.ce-ofsted-modal__header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 4rem 1rem 1.5rem;
	flex-shrink: 0;
}

.ce-ofsted-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 0.75rem;
	font-size: 1.6rem;
	flex-shrink: 0;
}

.ce-ofsted-modal.ce-ofsted-c-1 .ce-ofsted-modal__icon { background: rgba(249, 157, 49, 0.18); color: #c97820; }
.ce-ofsted-modal.ce-ofsted-c-2 .ce-ofsted-modal__icon { background: rgba(175, 77, 118, 0.15); color: #8f3a5e; }
.ce-ofsted-modal.ce-ofsted-c-3 .ce-ofsted-modal__icon { background: rgba(83, 141, 169, 0.18); color: #3f7288; }
.ce-ofsted-modal.ce-ofsted-c-4 .ce-ofsted-modal__icon { background: rgba(150, 158, 30, 0.18); color: #6b7010; }

.ce-ofsted-modal__title {
	font-family: var(--ci-font-primary);
	font-size: clamp(1.25rem, 2.5vw, 1.6rem);
	font-weight: 700;
	color: var(--ci-color-navy);
	margin: 0;
	line-height: 1.2;
}

.ce-ofsted-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: none;
	background: #f0f0f0;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
	color: #555;
	transition: background 0.15s ease;
}

.ce-ofsted-modal__close:hover {
	background: #e0e0e0;
}

.ce-ofsted-modal__body {
	padding: 0.25rem 1.75rem 1.75rem;
	overflow-y: auto;
	flex: 1;
}

.ce-ofsted-modal__body p {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-body);
	color: #444;
	margin: 0 0 0.85rem;
	line-height: 1.7;
}

.ce-ofsted-modal__body p:last-child {
	margin-bottom: 0;
}

/* ── CTA ── */

.ce-ofsted-cta {
	background: #253d47;
	padding: 4rem 0;
	text-align: center;
}

.ce-ofsted-cta__inner {
	max-width: 820px;
	margin: 0 auto;
	padding: 0 2rem;
}

.ce-ofsted-cta__heading {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-h2);
	font-weight: 700;
	color: #ffffff;
	line-height: 1.25;
	margin: 0 0 1.25rem;
}

.ce-ofsted-cta__body {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-body);
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.85);
	margin: 0 0 1.75rem;
}

.ce-ofsted-cta__btn-wrap {
	text-align: center;
}

.ce-ofsted-cta .ci-btn--white {
	background: #f99d31;
	border-color: #f99d31;
	color: #ffffff;
}

.ce-ofsted-cta .ci-btn--white:hover {
	background: #e08820;
	border-color: #e08820;
}

@media (max-width: 1023px) {
	.ce-ofsted-framework__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.ce-ofsted-framework {
		padding: 3rem 0;
	}

	.ce-ofsted-framework__grid {
		grid-template-columns: 1fr;
	}

	/* Top-align instead of centring so we can guarantee clearance below the
	   fixed header, and pad the bottom so mobile browser chrome (address
	   bar / home indicator) doesn't sit on top of the panel's edge.
	   Internal scroll (.ce-ofsted-modal__body) handles any overflow. */
	.ce-ofsted-modal {
		align-items: flex-start;
		padding-top: calc(var(--nav-bottom, 64px) + 1rem);
		padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
	}

	.ce-ofsted-modal__panel {
		max-height: 100%;
	}

	.ce-ofsted-cta {
		padding: 2.5rem 0;
	}
}
