/* ==========================================================================
   Certenly theme – About template
   --------------------------------------------------------------------------
   Loaded only on pages using page-templates/about.php, after main.css, whose
   tokens, primitives and components (hero, faq, cta) it reuses. Desktop values
   match the 1440px Figma frame; the tablet and phone layouts follow at the end.
   ========================================================================== */

/* Figma trims these text boxes to cap height / baseline. */
.hero--about .eyebrow, .mission__eyebrow, .mission__text, .vision__title,
.values__title, .value__num, .value__title, .value__text,
.reasons__title, .authority__title, .endorse__name, .endorse__role,
.team-card__name, .team-card__role, .bio__name, .bio__role, .bio__label,
.journey__title, .journey-card__num, .journey-card__title, .journey-card__text {
	text-box: trim-both cap alphabetic;
}

/* 1. Hero (the design's 810px frame starts under the 27px utility bar) ------ */
.hero--about .hero__inner { min-height: 783px; }
.hero--about .hero__content { max-width: 655px; padding: 222px 0 60px 94px; }
.hero--about .hero__title { margin-top: 40px; }
.hero--about .hero__lead { margin-top: 40px; max-width: 561px; line-height: 1.5; letter-spacing: 0; }
.hero--about .hero__content > .btn { margin-top: 40px; }

.hero__trust { position: absolute; left: 738px; top: 356px; z-index: 2; }
.hero__trust-row { display: flex; align-items: flex-start; gap: 36px; margin-top: 15px; }
.hero__trust-row > :first-child { margin-top: 22px; } /* the logo sits lower than the badge, as in the design */

/* 2. Mission --------------------------------------------------------------- */
.mission { position: relative; padding: 119px var(--gutter) 179.8px; overflow: hidden; }
.mission__deco { position: absolute; left: 50%; top: 0; width: 1440px; height: 100%; margin-left: -720px; pointer-events: none; }
.mission__inner { position: relative; max-width: 1260px; margin: 0 auto; text-align: center; }
.mission__eyebrow { font-weight: 600; color: #999; }
/* Figma measures this 48px text wider than a browser does; 1170px keeps the design's four lines. */
.mission__text { max-width: 1170px; margin: 40px auto 0; font-size: 48px; line-height: 1.2; color: var(--navy-900); }

/* 3. Vision ---------------------------------------------------------------- */
.vision { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--panel); }
.vision__photo { width: 720px; height: 432px; object-fit: cover; }
/* The photo fills its half at every width (main.js scales .art--grow up too), and the panel takes
   its height, with the text set directly under the title. */
.vision__panel { padding: 67px 30px 43px; }
.vision__title { font-weight: 400; font-size: 48px; line-height: 1.2; color: var(--navy-950); }
.vision__text { max-width: 341px; margin-top: 40px; font-size: 16px; line-height: 22px; letter-spacing: 0.48px; }

/* 4. Values ---------------------------------------------------------------- */
.values { padding: 80px var(--gutter) 0; }
.values__inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 36px; max-width: 1260px; margin: 0 auto; }
.values__title { font-weight: 500; font-size: 48px; line-height: 1.2; color: var(--navy-900); }
/* The values are ruled rows across the two right-hand columns: number, name, then text. */
.values__list { grid-column: 3 / -1; }
.value { display: grid; grid-template-columns: 108px 216px minmax(0, 1fr); align-items: start; padding: 40px 0; border-top: 1px solid var(--gray-300); }
.value:last-child { padding-bottom: 0; }
.value__num { font-weight: 600; font-size: 14px; line-height: 1.2; color: var(--navy-900); }
.value__title { font-weight: 400; font-size: 22px; line-height: 1.2; color: var(--navy-900); }
.value__text { font-size: 18px; line-height: 22px; color: var(--navy-900); text-wrap: balance; }
.value__line { display: block; } /* each design line is its own balanced block, as in Figma */

/* 5. Purpose (uses the shared .split-head from main.css) ------------------- */
.purpose { padding: 80px var(--gutter) 0; }

/* 6. Full-bleed imagery ---------------------------------------------------- */
.imagery { position: relative; aspect-ratio: 1440 / 960; margin-top: 80px; overflow: hidden; background: var(--navy-950); }
.imagery > * { position: absolute; }
.imagery__photo { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imagery__grid {
	left: 19.3056%; top: 5.4167%; width: 41.25%; height: 61.875%; opacity: 0.5;
	background:
		linear-gradient(90deg, #fff 2px, transparent 2px) 111.4px 0 / 115px 100%,
		linear-gradient(#fff 2px, transparent 2px) 0 10.33px / 100% 115px;
	-webkit-mask: radial-gradient(circle, #000, transparent);
	mask: radial-gradient(circle, #000, transparent);
}
/* Figma blurs both glows heavily; the radius follows the viewport so they scale with the photo. */
.imagery__glow {
	left: 21.1806%; top: 25.3125%; width: 34.0278%; height: 51.0417%; border-radius: 50%;
	background: radial-gradient(circle, #ffb700, #ffd97a); filter: blur(min(112px, 7.8vw));
}
.imagery__glow--small {
	left: 21.6667%; top: 43.3333%; width: 14.5833%; height: 21.875%;
	background: #fff; opacity: 0.6; filter: blur(min(67px, 4.65vw));
}
.imagery__front { left: 20.3125%; top: 14.0104%; width: 34.2708%; height: auto; }

/* 7. Why choose Certenly --------------------------------------------------- */
.reasons { padding: 120px var(--gutter) 0; }
.reasons__head { max-width: 1180px; margin: 0 auto; text-align: center; }
.reasons__title { font-weight: 500; font-size: 48px; line-height: 1.2; color: var(--navy-900); }
.reasons__text { max-width: 706px; margin: 30px auto 0; font-size: 16px; line-height: 22px; letter-spacing: 0.48px; }
.reason-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 396px)); justify-content: center; gap: 40px 36px; margin-top: 90px; }
.reason-card {
	display: flex; flex-direction: column; min-height: 384px; padding: 29px 29px 35px;
	background: #fff; border: 1px solid var(--gray-300); border-radius: 12px;
}
.reason-card__icon { display: grid; place-items: center; width: 48px; height: 48px; background: #b6dcff; border-radius: 50%; }
.reason-card__title { margin-top: 20px; font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--navy-950); }
.reason-card__text { margin-top: 40px; font-size: 16px; line-height: 22px; color: var(--navy-950); }

/* 8. Named course authority ------------------------------------------------ */
.authority { padding: 120px var(--gutter) 103px; background: linear-gradient(#fff, #dfedf6); }
.authority__head { max-width: 1180px; margin: 0 auto; text-align: center; }
.authority__title { font-weight: 500; font-size: 48px; line-height: 1.2; color: var(--navy-900); }
.authority__text { max-width: 706px; margin: 30px auto 0; font-size: 16px; line-height: 22px; letter-spacing: 0.48px; }
.authority__inner { display: grid; grid-template-columns: 504px minmax(0, 496px); column-gap: 142px; max-width: 1260px; margin: 90px auto 0; }

.endorse__person { display: flex; align-items: flex-start; gap: 20px; }
.endorse__photo { width: 75px; height: 75px; border-radius: 50%; object-fit: cover; }
.endorse__name { font-weight: 500; font-size: 36px; line-height: 1.2; color: var(--navy-950); }
.endorse__role { margin-top: 27.8px; font-size: 18px; line-height: 1.2; color: var(--navy-950); }
.endorse__statement { margin-top: 40px; max-width: 495px; font-size: 22px; line-height: 1.2; color: var(--navy-950); }
.endorse__statement p + p { margin-top: 26.4px; }

.authority__panel > .btn { margin-top: 40px; }
.toggles .faq-item { padding: 23px 0; }
.toggles .faq-item:first-child { padding-top: 0; }
.toggles .faq-item__q { font-weight: 400; font-size: 14px; line-height: 1.2; letter-spacing: 0.7px; text-transform: uppercase; }
.toggles .faq-item[open] .faq-item__q { font-size: 14px; line-height: 1.2; letter-spacing: 0.7px; color: var(--navy-900); }
.toggles .faq-item__label { top: 0; }
.toggles .faq-item__a { padding: 23px 0 0; font-size: 16px; line-height: 1.2; letter-spacing: 0; color: var(--navy-950); }
.toggles .faq-item__a p + p, .toggles .faq-item__list { margin-top: 19.2px; }
.toggles .faq-item__list { padding-left: 20px; list-style: disc; }
.toggles .faq-item__list + p { margin-top: 19.2px; }

/* 9. Meet the team --------------------------------------------------------- */
.team { padding: 120px 0 0; }
.team__inner { max-width: calc(1260px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
/* The title and the intro's two paragraphs share the design's three 396px columns. */
.team__head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; max-width: none; }
.team__head .split-head__title { width: auto; }
.team .carousel { margin-top: 60px; --carousel-arrow-top: 234px; } /* half the photo height */
.team .carousel__list { gap: 77px; }
.team-card { width: 373px; }
.team-card__photo { width: 373px; height: 468px; border-radius: 12px; object-fit: cover; }
.team-card__open { display: block; width: 100%; text-align: left; }
.team-card__open--static { cursor: default; }
.team-card__photo--empty { display: block; background: var(--panel); }
.bio-modal__photo--empty { display: block; background: var(--panel); }
.team-card__open:hover .team-card__name,
.team-card__open:focus-visible .team-card__name { text-decoration: underline; text-underline-position: from-font; }
.team-card__name { display: block; margin-top: 20px; font-size: 22px; line-height: 1.2; color: var(--navy-900); }
.team-card__role { display: block; margin-top: 10px; font-size: 14px; line-height: 1.2; text-transform: uppercase; color: var(--navy-900); }

/* 9.1 Biography dialog (native <dialog>, so Esc and focus trapping are free) */
body:has(.bio-modal[open]) { overflow: hidden; }
.bio-modal {
	/* 60% of the screen each way, but never too cramped for the two columns on smaller laptops. */
	width: max(60vw, min(720px, 100vw - 48px)); max-width: none;
	height: max(60vh, min(520px, 100vh - 48px)); max-height: none;
	margin: auto; padding: 0; border-radius: 12px;
	border: 0; background: #fff; color: var(--navy-900); overflow: hidden;
}
.bio-modal::backdrop { background: rgba(6, 7, 29, 0.6); }
.bio-modal__inner { position: relative; display: grid; grid-template-columns: 40% minmax(0, 1fr); height: 100%; }
.bio-modal__photo { width: 100%; height: 100%; object-fit: cover; }
.bio-modal__body {
	overflow-y: auto; overscroll-behavior: contain; padding: 41px 112px 112px 40px;
	scrollbar-width: thin; scrollbar-color: #d9d9d9 transparent;
}
.bio { max-width: 536px; }
.bio__name { font-weight: 400; font-size: 36px; line-height: 1.2; color: var(--navy-950); }
.bio__role { margin-top: 20px; }
.bio__text { margin-top: 30px; }
.bio__text p { font-size: 16px; line-height: 22px; color: var(--navy-900); }
.bio__text p + p { margin-top: 22px; }
.bio__section { margin-top: 30px; }
.bio__list { margin-top: 10px; }
.bio__list li { position: relative; padding-left: 25px; font-size: 16px; line-height: 22px; color: var(--navy-900); }
.bio__list li + li { margin-top: 5px; }
.bio__list li::before { content: ""; position: absolute; left: 10px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.bio-modal__close, .bio-modal__arrow {
	display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
	background: #fff; transition: background-color 0.15s;
}
.bio-modal__close { position: absolute; right: 39px; top: 41px; border: 3px solid var(--navy-900); }
/* A white strip along the foot of the text column, so the scrolling bio passes under the arrows, not beside them.
   It stops short of the right edge to leave the scrollbar visible. */
.bio-modal__nav {
	position: absolute; left: 40%; right: 10px; bottom: 0; display: flex; justify-content: flex-end; gap: 10px;
	padding: 16px 29px 32px 0; background: #fff;
}
.bio-modal__arrow { border: 2px solid var(--navy-900); }
.bio-modal__close:hover, .bio-modal__arrow:hover { background: var(--panel); }

/* 10. Support across the journey ------------------------------------------- */
.journey { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 120px; background: var(--panel); }
.journey__media { position: relative; aspect-ratio: 720 / 810; overflow: hidden; color: #fff; }
.journey__photo { width: 100%; height: 100%; object-fit: cover; }
/* The design darkens the foot of the photo so the copy stays legible. */
.journey__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 73.6%); pointer-events: none; }
.journey__text { position: absolute; z-index: 1; left: 30px; right: 30px; bottom: 26px; }
.journey__title { max-width: 616px; font-weight: 500; font-size: 48px; line-height: 1.2; }
.journey__lead { max-width: 476px; margin-top: 30px; font-size: 16px; line-height: 22px; letter-spacing: 0.48px; }
.journey__text > .btn { margin-top: 30px; }

.journey__steps { display: flex; flex-direction: column; gap: 28px; padding: 40px 66px; }
.journey-card { display: flex; gap: 38px; min-height: 225px; padding: 40px; background: #fff; border-radius: 12px; }
.journey-card__icon { flex: none; display: grid; place-items: center; width: 145px; height: 145px; background: #e3f4ff; border-radius: 12px; }
.journey-card__num {
	display: inline-grid; place-items: center; width: 30px; height: 30px;
	background: #e3f4ff; border-radius: 50%;
	font-size: 14px; line-height: 1.2; text-transform: uppercase; color: var(--navy-900);
}
.journey-card__title { margin-top: 23.2px; font-weight: 400; font-size: 22px; line-height: 1.2; color: var(--navy-900); }
.journey-card__text { max-width: 337px; margin-top: 18.6px; font-size: 16px; line-height: 1.2; color: var(--navy-900); }

/* 11. FAQ (shares the site's accordion rows under a centred heading) -------- */
.faq--about { padding-top: 120px; }

/* 12. Tablets in landscape ------------------------------------------------- */
@media (max-width: 1200px) {
	.hero--about .hero__inner { min-height: 0; }
	.hero--about .hero__content { max-width: none; padding: 140px var(--gutter) 40px; }
	.hero__trust { position: static; padding: 0 var(--gutter) 64px; }
	.hero__trust-row { flex-wrap: wrap; gap: 20px 36px; }
	.hero__trust-row > :first-child { margin-top: 0; }

	.mission { padding: 88px var(--gutter); }
	.mission__deco { display: none; }
	.mission__text { margin-top: 40px; font-size: 40px; }

	.vision__panel { padding: 48px 32px; }

	.values { padding-top: 88px; }
	.values__inner { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
	.values__list { grid-column: 1; }

	.purpose, .team { padding-top: 88px; }
	.split-head__title { font-size: 40px; }
	/* The title takes its own row and the two paragraphs share the next. */
	.team__head { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 36px; }
	.team__head .split-head__title { grid-column: 1 / -1; }

	.imagery { margin-top: 64px; }

	.reasons { padding-top: 88px; }
	.reasons__title { font-size: 40px; }
	.reason-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
	.reason-card { min-height: 0; }
	.reason-card__text { margin-top: 24px; }

	.authority { padding: 88px var(--gutter) 72px; }
	.authority__title { font-size: 40px; }
	.authority__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 496px); column-gap: 48px; margin-top: 56px; }

	.bio-modal__body { padding: 41px 112px 112px 32px; }
	.bio__name { font-size: 30px; }

	.journey { margin-top: 88px; }
	.journey__title { font-size: 34px; }
	.journey__text { left: 24px; right: 24px; bottom: 24px; }
	.journey__steps { gap: 20px; padding: 24px; }
	.journey-card { gap: 24px; padding: 24px; }
	.journey-card__icon { width: 104px; height: 104px; }
	.journey-card__icon img { width: 48px; height: auto; }

	.faq--about { padding-top: 88px; }
}

/* 13. Tablets in portrait and phones --------------------------------------- */
@media (max-width: 900px) {

	/* Narrow screens keep the popup nearly full screen (60% would be too small to read), inset so the page shows around it. */
	.bio-modal { width: calc(100vw - 2 * var(--gutter)); height: calc(100vh - 2 * var(--gutter)); height: calc(100dvh - 2 * var(--gutter)); }
	/* The photo becomes a band above the biography, which then scrolls on its own. */
	.bio-modal__inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: 300px minmax(0, 1fr); }
	/* Show the whole portrait (head and shoulders) rather than a cropped strip, which landed on the forehead.
	   The grey matches the studio backdrop of the portraits, so the sides read as part of the photo. */
	.bio-modal__photo { object-fit: contain; background: #d2d2d2; }
	.bio-modal__body { padding: 32px var(--gutter) 120px; }
	.bio-modal__close { right: var(--gutter); top: 20px; }
	.bio-modal__nav { left: 0; padding: 12px calc(var(--gutter) - 10px) 20px 0; }
	.vision { grid-template-columns: 1fr; }
	.vision__panel { padding: 40px var(--gutter) 48px; }

	/* The text drops under the value's name. */
	.value { grid-template-columns: 64px minmax(0, 1fr); row-gap: 16px; }
	.value__text { grid-column: 2; }

	.reason-cards { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }

	.authority__inner { grid-template-columns: 1fr; row-gap: 48px; }

	/* The steps read better under the photo than beside it once the columns are this narrow. */
	.journey { grid-template-columns: 1fr; }
	.journey__media { aspect-ratio: 4 / 5; } /* tall enough for the copy to sit inside the photo */
	/* The copy starts higher up the photo here, so the shade has to reach further. */
	.journey__media::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0)); }
	.journey__steps { padding: 32px var(--gutter); }

	.team-card, .team-card__photo { width: 300px; }
	.team-card__photo { height: 376px; }
	.team .carousel__list { gap: 40px; }
	.team .carousel { --carousel-arrow-top: 188px; }
}

@media (max-width: 600px) {
	.bio-modal__inner { grid-template-rows: 240px minmax(0, 1fr); }
	.bio__name { font-size: 26px; }
	.bio-modal__close, .bio-modal__arrow { width: 40px; height: 40px; }
	.mission { padding: 64px var(--gutter); }
	.mission__text { font-size: 28px; }
	.vision__title { font-size: 36px; }

	.values { padding-top: 64px; }
	.values__title, .split-head__title, .reasons__title, .authority__title { font-size: 32px; }
	.value { grid-template-columns: 40px minmax(0, 1fr); padding: 32px 0; }
	.team__head { grid-template-columns: minmax(0, 1fr); gap: 24px; }

	.purpose, .team, .reasons, .faq--about { padding-top: 64px; }
	.authority { padding-top: 64px; }
	.journey { margin-top: 64px; }
	.journey__title { font-size: 28px; }
	/* On phones the copy is as tall as the 4:5 photo, so it would run up into the corner
	   squares and, on the narrowest screens, out of the frame. Here it sits in the flow under
	   the squares (four rows of 10%-wide squares) and a longer text makes the photo taller. */
	.journey__media { container-type: inline-size; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: auto; min-height: 125vw; padding-top: 42vw; }
	.journey__photo { position: absolute; inset: 0; }
	.journey__text { position: relative; left: auto; right: auto; bottom: auto; margin: 0 24px 24px; }
	.journey__media .px { width: 10cqw; height: 10cqw; }
	.journey__media .px:nth-child(2), .journey__media .px:nth-child(4) { top: 10cqw; }
	.journey__media .px:nth-child(5), .journey__media .px:nth-child(6) { top: 20cqw; }
	.journey__media .px:nth-child(7) { top: 30cqw; }
	.journey-card { flex-direction: column; gap: 16px; }
	.journey-card__icon { width: 88px; height: 88px; }

	.endorse__name { font-size: 28px; }
	.endorse__statement { font-size: 18px; }
	.endorse__statement p + p { margin-top: 21.6px; }

	.team-card, .team-card__photo { width: 260px; }
	.team-card__photo { height: 326px; }
	.team .carousel { --carousel-arrow-top: 163px; }
	.team .carousel__arrow { width: 40px; height: 80px; }
}