/**
 * Our Science
 *
 * Same hero band, glossy cards and reveals as About and the Blog; effects.css
 * supplies .ml-glass and the reveal behaviour.
 */

.ml-science {
	background: var(--ml-white);
}

/* ---------- Hero ---------- */

.ml-science__hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, var(--ml-stage) 0%, var(--ml-stage-soft) 100%);
	padding: 22px 24px 46px;
}

.ml-science__hero-mark {
	position: absolute;
	right: -40px;
	top: 50%;
	transform: translateY(-50%);
	width: min(400px, 34%);
	opacity: 0.14;
	pointer-events: none;
	line-height: 0;
}

.ml-science__hero-mark img {
	width: 100%;
	height: auto;
	display: block;
	filter: brightness(0.55) saturate(1.4);
}

.ml-science__hero-inner {
	position: relative;
	z-index: 1;
	max-width: var(--ml-container);
	margin: 0 auto;
}

.ml-science__crumbs {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	color: var(--ml-body);
	margin-bottom: 20px;
}

.ml-science__crumbs a { color: var(--ml-cyan); text-decoration: none; }
.ml-science__crumbs a:hover,
.ml-science__crumbs a:focus-visible { text-decoration: underline; }

.ml-science__eyebrow {
	margin: 0 0 8px;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ml-cyan);
}

.ml-science__title {
	margin: 0 0 14px;
	font-size: clamp(28px, 4.2vw, 48px);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.1;
	color: var(--ml-navy);
	max-width: 20ch;
	text-wrap: balance;
}

.ml-science__standfirst {
	margin: 0;
	max-width: 56ch;
	font-size: clamp(15px, 1.4vw, 18px);
	line-height: 1.65;
	color: var(--ml-body);
}

/* ---------- Body ---------- */

.ml-science__body {
	padding: 46px 24px 60px;
}

.ml-science__body-inner {
	max-width: var(--ml-container);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.ml-science__h2 {
	margin: 0 0 14px;
	font-size: clamp(21px, 2.4vw, 30px);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ml-navy);
}

/* margin-bottom only, (0,2,0): Astra's `.woocommerce-js h2 { margin-bottom: .7em }` (0,1,1) beat the rule above. 14px (heading -> text) is the spacing scale (CLAUDE.md). */
.ml-science__h2.ml-science__h2 {
	margin-bottom: 14px;
}

.ml-science__lede {
	margin: 0 0 22px;
	max-width: 68ch;
	font-size: 15px;
	line-height: 1.75;
	color: var(--ml-body);
}

/* ---------- Principle cards ---------- */

.ml-science__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

.ml-science__grid--three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ml-science__card {
	padding: 24px 22px;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.ml-science__card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 14px;
	background: linear-gradient(145deg, #e6f6fe 0%, #d2edfb 100%);
	color: var(--ml-cyan);
	margin-bottom: 4px;
	transition: transform 0.35s var(--ml-e-enter);
}

.ml-science__card:hover .ml-science__card-icon {
	transform: translateY(-3px) rotate(-4deg);
}

.ml-science__card h3 {
	margin: 0;
	font-size: 16.5px;
	font-weight: 700;
	color: var(--ml-navy);
	line-height: 1.35;
}

.ml-science__card p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--ml-body);
}

/* ---------- Sourcing band ---------- */

.ml-science__sourcing {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 30px 34px;
	border-radius: 16px;
	/* --ml-navy-light, see the note in about.css. */
	background: linear-gradient(120deg, var(--ml-navy) 0%, var(--ml-navy-light) 55%, var(--ml-navy) 100%);
	color: var(--ml-white);
	box-shadow: 0 28px 50px -32px rgba(10, 37, 64, 0.95);
}

.ml-science__sourcing::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0, 175, 240, 0.35) 0%, rgba(0, 175, 240, 0) 70%);
	pointer-events: none;
}

.ml-science__sourcing-icon {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 66px;
	border-radius: 18px;
	background: rgba(0, 175, 240, 0.18);
	border: 1px solid rgba(0, 175, 240, 0.45);
	color: var(--ml-cyan);
}

.ml-science__sourcing-copy {
	position: relative;
	z-index: 1;
	min-width: 0;
}

/*
 * `color: inherit` is the fix, and it is not decoration.
 *
 * .ml-science__sourcing already sets `color: var(--ml-white)` for the whole
 * band, and this heading was meant to inherit it. It could not: Astra's
 * Customizer CSS prints `h1,h2,h3,h4,h5,h6 { color: var(--ast-global-color-2) }`
 * - #1e293b - and INHERITANCE HAS NO SPECIFICITY. An inherited value only
 * applies when nothing matches the element at all, so a bare type selector
 * beats it every time. The heading rendered #1e293b on #0a2540: 1.06:1.
 *
 * `inherit` re-enables the inheritance Astra interrupted, at (0,1,1), which
 * beats both `h2` (0,0,1) and Astra's `.entry-content :where(h2)` (0,1,0) -
 * :where() contributes no specificity. Restating white here would work too,
 * but then the band's colour would live in two places; this way the heading
 * follows the band by definition.
 */
.ml-science__sourcing-copy h2 {
	margin: 0 0 14px;
	font-size: clamp(19px, 2.2vw, 26px);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: inherit;
}

.ml-science__sourcing-copy p {
	margin: 0;
	max-width: 72ch;
	font-size: 14.5px;
	line-height: 1.7;
	color: #c2d4e6;
}

/* ---------- Focus ---------- */

.ml-science__focus-head { margin-bottom: 4px; }

.ml-science__count {
	display: block;
	margin-top: 4px;
	font-weight: 600;
	color: var(--ml-navy);
}

.ml-science__focus-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.ml-science__focus-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 18px 20px;
	border-radius: 12px;
	text-decoration: none;
	color: var(--ml-navy);
}

.ml-science__focus-name {
	font-size: 15px;
	font-weight: 600;
}

.ml-science__focus-count {
	flex: 0 0 auto;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ml-cyan);
	background: #eef8fe;
	border-radius: 999px;
	padding: 4px 11px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* ---------- CTA ---------- */

.ml-science__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	padding: 28px 32px;
	border-radius: 16px;
	background: linear-gradient(135deg, #e9f6fe 0%, #d8eefb 100%);
	border: 1px solid #c9e6f8;
}

.ml-science__cta-copy h2 {
	margin: 0 0 14px;
	font-size: clamp(19px, 2.1vw, 25px);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ml-navy);
}

.ml-science__cta-copy p {
	margin: 0;
	font-size: 14.5px;
	color: var(--ml-body);
}

.ml-science__cta-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 26px;
	border-radius: 8px;
	background: var(--ml-cyan);
	color: var(--ml-white);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 14px 26px -14px rgba(var(--ml-shadow-tint), 0.95);
	transition: transform var(--ml-t-base) var(--ml-e-enter), box-shadow var(--ml-t-base) var(--ml-e-standard);
}

.ml-science__cta-btn:hover,
.ml-science__cta-btn:focus-visible {
	background: var(--ml-cyan-dark);
	transform: translateY(-3px);
	box-shadow: 0 20px 32px -14px rgba(var(--ml-shadow-tint), 1);
	color: var(--ml-white);
}

.ml-science__content {
	max-width: 72ch;
	font-size: 15px;
	line-height: 1.75;
	color: var(--ml-body);
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */

@media (max-width: 1100px) {
	.ml-science__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ml-science__grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ml-science__focus-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
	.ml-science__sourcing { flex-direction: column; align-items: flex-start; }
	.ml-science__cta { flex-direction: column; align-items: flex-start; }
	.ml-science__cta-btn { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
	.ml-science__hero { padding: 18px 16px 34px; }
	.ml-science__body { padding: 32px 16px 44px; }
	.ml-science__hero-mark { display: none; }
	.ml-science__grid,
	.ml-science__grid--three,
	.ml-science__focus-list { grid-template-columns: minmax(0, 1fr); }
	.ml-science__body-inner { gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
	.ml-science__card-icon,
	.ml-science__cta-btn {
		transition: none;
	}

	.ml-science__card:hover .ml-science__card-icon,
	.ml-science__cta-btn:hover,
	.ml-science__cta-btn:focus-visible {
		transform: none;
	}
}

/*
 * POINTER FOCUS - ASTRA a:focus { outline: thin dotted } (main.min.css L3).
 * A mouse click leaves :focus set, so every anchor that names no outline of its
 * own kept a thin dotted ring until focus moved. Measured 2026-09-13 by the
 * sitewide anchor sweep (CLAUDE.md, "Anchor pointer-focus sweep").
 *
 * :not(:focus-visible) IS LOAD-BEARING: this only ever applies to pointer focus,
 * so the keyboard ring each family already has is untouched. Outline only -
 * nothing moves, so there is no reduced-motion twin.
 */
a.ml-science__focus-item:focus:not(:focus-visible),
.ml-science__crumbs a:focus:not(:focus-visible),
a.ml-science__cta-btn:focus:not(:focus-visible) {
	outline: none;
}

/*
 * KEYBOARD RINGS - 2026-09-14. These families had NO focus ring of their own:
 * keyboard focus showed only Astra's a:focus-visible 1px dotted in the text
 * colour, or nothing at all where a theme rule said outline: none. Measured by
 * the sitewide anchor sweep (CLAUDE.md, "Keyboard ring pass").
 *
 * Light surface: 3px --ml-cyan offset 3px. Navy surface: 2px. border-radius is
 * RESTATED on every ring - a rule wins only the properties it names, and a
 * shared focus rule has squared a round control on this site before. Text links
 * take 4px corners; boxed controls keep their own radius.
 *
 * The pointer pin (:focus:not(:focus-visible)) above is untouched - the two
 * selectors can never match the same state. Contrast: cyan on white 2.50:1 is
 * the owner's recorded decision (CLAUDE.md, "THE FOCUS-RING RULE").
 */
.ml-science__crumbs a:focus-visible {
	outline: 3px solid var(--ml-cyan);
	outline-offset: 3px;
	border-radius: 4px;
}
a.ml-science__focus-item:focus-visible {
	outline: 3px solid var(--ml-cyan);
	outline-offset: 3px;
	border-radius: 12px;
}
a.ml-science__cta-btn:focus-visible {
	outline: 3px solid var(--ml-cyan);
	outline-offset: 3px;
	border-radius: 8px;
}

/*
 * RING FADE - ASTRA'S INLINE `a { transition: all .2s linear }`. "all" includes
 * outline, so these families' keyboard rings slid and faded in over 200ms
 * instead of appearing at once. Each family now names exactly what its hover /
 * focus-visible state really changes, measured 2026-09-14 (CLAUDE.md, "Ring fade
 * pass"): colour where Astra's a:hover repaints the ink, nothing at all where
 * only the (discrete) underline changes or nothing visible changes.
 * Outline is never in the list. Colour-only fades need no reduced-motion twin.
 */
.ml-science__crumbs a {
	transition: none;
}
