/*
Theme Name: RoRi
Theme URI: https://researchonresearch.org
Description: Design & brand by <a href="https://www.design-science.org.uk/" target="_blank">Design Science</a>. Development by <a href="https://digitalgarden.co" target="_blank">DigitalGarden</a>.
Version: 0.0.1
Author: Design Science & DigitalGarden
Text Domain: rori
*/

/* =====================================================================
   BREAKPOINTS
   =====================================================================
   Mobile: 768px
   Tablet: 1200px
   XL Desktop: 1920px
   */

/* =====================================================================
   BASE
   ===================================================================== */

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

:focus:not(:focus-visible) {
	outline: none;
}

html {
	scrollbar-gutter: stable;
	scroll-padding-top: 0;
	scroll-behavior: smooth;
	background-color: var(--grey-light);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

body {
	max-width: 2560px;
	margin: 0 auto;
	font-size: var(--font-size-12-16-17);
}

div > :first-child {
	margin-top: 0;
}

div > :last-child {
	margin-bottom: 0;
}

/* =====================================================================
   COLOURS
   ===================================================================== */
html {
	--black: #000000;
	--off-black: #222222;
	--white: #FFFFFF;
	--grey-light: #F4EFF1;
	--grey: #EAECF4;
	--grey-dark: #383838;
	--orange-light: #FF8672;
	--orange: #FF6147;
	--purple-light: #9897CE;
	--purple: #7271B4;
	--purple-dark: #2B2A6C;
	--pink: #E3264E;
	--pink-dark: #952940;
	--pink-light: #F1E5E8;
	--pink-lighter: #FBF8F9;
	--blue: #3E5DEF;
	--blue-light: #6B7EEE;
	--blue-lighter: #EAECF4;
	--blue-lightest: #EFF2F5;
	--slate: #597C95;
}

/* =====================================================================
   CONTENT WIDTHS
   ===================================================================== */
html {
	--content-width-xl: 1210px;
	--content-width-lg: 1000px;
	--content-width-md: 895px;
	--content-width-sm: 662px;
	--content-width-xs: 585px;
	--content-width-2xs: 470px;
}

/* =====================================================================
   PADDING
   ===================================================================== */
html {
	--section-px: 115px;
	--padding-xl: 200px;
	--padding-lg: 115px;
	--padding-md: 60px;
	--padding-sm: 30px;
	--padding-xs: 22px;
	--padding-none: 0;
}

@media (max-width: 1200px) {
	html {
		--section-px: 60px;
		--padding-xl: 156px;
		--padding-lg: 90px;
		--padding-md: 50px;
		--padding-sm: 23px;
		--padding-xs: 17px;
		--padding-none: 0;
	}
}

@media (max-width: 768px) {
	html {
		--section-px: 32px;
		--padding-xl: 104px;
		--padding-lg: 60px;
		--padding-md: 35px;
		--padding-sm: 16px;
		--padding-xs: 11px;
		--padding-none: 0;
	}
}

/* =====================================================================
   FONTS
   ===================================================================== */
html {
	font-family: "Roboto Slab", serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;

	/* Font families */
	--font-family-base: "Roboto Slab", serif;
	--font-family-headline: "Poppins", sans-serif;

	/* Font sizes — fluid clamp() from 360px to 1240px viewport.
	   Formula: clamp(min-rem, intercept-rem + slope*vw, max-rem)
	   slope = (max-px - min-px) / (1240 - 360)
	   intercept = (min-px - slope * 360) / 16 */
	--font-size-84: 5.25rem;
	--font-size-40-64: clamp(2.5rem, 1.8864rem + 2.7273vw, 4rem);
	--font-size-25-60: clamp(1.563rem, 0.6676rem + 3.9773vw, 3.75rem);
	--font-size-20-48: clamp(1.25rem, 0.5341rem + 3.1818vw, 3rem);
	--font-size-18-36: clamp(1.125rem, 0.6648rem + 2.0455vw, 2.25rem);
	--font-size-20-28: clamp(1.25rem, 1.0455rem + 0.9091vw, 1.75rem);
	--font-size-18-22: clamp(1.125rem, 1.0227rem + 0.4545vw, 1.375rem);
	--font-size-18: 1.125rem;
	--font-size-12-16-17: clamp(1rem, 0.9744rem + 0.1136vw, 1.063rem);
	--font-size-12-16: clamp(0.75rem, 0.6477rem + 0.4545vw, 1rem);
	--font-size-12-14: clamp(0.75rem, 0.6989rem + 0.2273vw, 0.875rem);
}

.is-style-headline-64 {
	font-size: var(--font-size-40-64);
	font-family: var(--font-family-headline);
	line-height: 1;
	text-transform: uppercase;
	font-weight: 600;
}

.is-style-headline-36 {
	font-size: var(--font-size-18-36);
	font-family: var(--font-family-headline);
	line-height: 1;
	text-transform: uppercase;
	font-weight: 600;
}

.is-style-base-60 {
	font-size: var(--font-size-25-60);
	font-family: var(--font-family-base);
	line-height: 1.2;
	font-weight: 400;
}

.is-style-headline-28 {
	font-size: var(--font-size-20-28);
	font-family: var(--font-family-headline);
	line-height: 1;
	text-transform: uppercase;
	font-weight: 600;
}

.is-style-base-28 {
	font-size: var(--font-size-20-28);
	font-family: var(--font-family-base);
	line-height: 1.2;
	font-weight: 400;
	max-width: 46rem;
}

.is-style-headline-17 {
	font-size: var(--font-size-12-16-17);
	font-family: var(--font-family-headline);
	line-height: 1.1;
	text-transform: uppercase;
	font-weight: 700;
}

/* =====================================================================
   TYPOGRAPHY
   ===================================================================== */

h1 {
	font-weight: 400;
}

h1, h2, h3, h4 {
	text-wrap: pretty;
}

h1, h2, h3, h4, ul, ol {
	line-height: 1.2;
}

h1, h2, h3, h4, p, ul, ol {
	margin: 0 0 1.25rem;
}

@media (max-width: 768px) {
	h1, h2, h3, h4, p, ul, ol {
		margin-bottom: 1rem;
		max-width: var(--content-width-lg);
	}
}

p + h2, p + h3, p + h4,
ul + h2, ul + h3, ul + h4,
ol + h2, ol + h3, ol + h4 {
	margin-top: 2.5rem;
}

h1 strong, h2 strong, h3 strong, h4 strong,
h1 b, h2 b, h3 b, h4 b {
	font-weight: inherit;
}

ul,
ol {
	list-style-position: outside;
	padding: 0;
	margin-left: 1.25em;
}

ul li,
ol li {
	padding: 0 0 0.25rem;
}

@media (min-width: 769px) {
	ul,
	ol {
		padding: 0;
		margin-left: 0;
	}
}

/* =====================================================================
   BLOCK QUOTE
   ===================================================================== */

.wp-block-quote {
	margin: 4rem 0 4rem;
	padding: 0;
}

.wp-block-quote p {
	font-size: var(--font-size-20-28);
	color: var(--slate);
	font-weight: 400;
	line-height: 1.2;
}

.wp-block-quote p:first-child {
	text-indent: -0.375em;
}

.wp-block-quote p:first-child::before {
	content: "\201C";
}

.wp-block-quote p:last-of-type {
	margin-bottom: 0.75rem;
}

.wp-block-quote p:last-of-type::after {
	content: "\201D";
}

.wp-block-quote cite {
	font-family: var(--font-family-headline);
	font-size: var(--font-size-12-16);
	text-transform: uppercase;
	font-weight: 600;
	font-style: normal;
	line-height: 1.2;
	display: block;
}

/* =====================================================================
   LINKS
   ===================================================================== */

a {
	color: var(--black);
	text-decoration-line: underline;
	text-underline-offset: 0.175em;
	text-decoration-thickness: 1px;
	transition: opacity 0.25s ease, text-decoration-color 0.3s ease;
}

a:hover {
	opacity: 0.75;
}

h1 a, h2 a, h3 a, h4 a {
	color: inherit;
}

/* =====================================================================
   IMAGES
   ===================================================================== */

figure {
	margin: 0 0 1.25rem;
}

img {
	max-width: 100%;
}

/* ===================================================================
   TAG FILTER
   =================================================================== */

.section {
	padding: var(--padding-top) var(--section-px) var(--padding-bottom);
}

.section__inner {
	max-width: var(--content-width);
	margin: 0 auto;
	width: 100%;
}

/* ===================================================================
   TAG FILTER
   =================================================================== */

.tag-filter {
    background-color: var(--bg-color);
	padding: var(--padding-lg) var(--section-px) var(--padding-lg);
}

.tag-filter__inner {
	max-width: var(--content-width);
	margin: 0 auto;
	width: 100%;
	display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2rem;
}

.tag-filter__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag-filter__btn {
    text-transform: uppercase;
    font-size: var(--font-size-12-16);
    font-weight: 700;
    font-family: var(--font-family-headline);
    padding: 0.5rem 0.5rem;
    border: 2px solid var(--slate);
    color: var(--slate);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
    white-space: nowrap;
    line-height: 1.2;
}

@media (min-width: 1021px) {
	.tag-filter__inner {
		justify-content: center;
	}

	.tag-filter__btn {
		width: 14.5rem;
	}
}

.tag-filter__btn:hover:not(.tag-filter__btn--active) {
	opacity: 0.8;
}

.tag-filter__btn--active {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.tag-filter__toggle {
    display: none;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    padding: 0.75rem 0 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent-color);
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.tag-filter__toggle-icon {
    width: 1.375rem;
    height: 1.375rem;
    transition: transform 0.2s ease;
}

.tag-filter__toggle-icon--closed {
    transform: rotate(180deg);
}

/* ===================================================================
   DIALOG
   =================================================================== */

.dialog {
	position: fixed;
	inset: 0;
	z-index: 300;
	overflow-y: auto;
}

@media (max-width: 768px) {
	.dialog {
		font-size: 0.9rem;
	}
}

.dialog__overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
}

.dialog__container {
	position: fixed;
	inset: 0;
	width: 100vw;
	display: flex;
	min-height: 100%;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
	text-align: center;
}

.dialog__panel {
	position: relative;
	overflow-y: auto;
	max-height: calc(100dvh - 1.2rem);
	padding: 3rem 1.5rem;
	text-align: left;
	width: 100%;
	background: #fff;
}

@media (min-width: 640px) {
	.dialog__panel {
		margin: 2rem auto;
		max-width: var(--content-width-xl);
		max-height: calc(100dvh - 4rem);
	}
}

@media (min-width: 1201px) {
	.dialog__panel {
		padding: 3.75rem 5rem;
	}
}

.dialog__close {
	position: absolute;
	top: 0.75rem;
	right: 0;
	margin: 1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	padding: 0.25rem;
	background: none;
	border: none;
	cursor: pointer;
}

.dialog__close svg {
	width: 2.5rem;
	height: 2.5rem;
}

@media (max-width: 419px) {
	.dialog__close {
		top: 0;
		margin: 0.5rem 0;
	}
}

/* =====================================================================
   FOOTER CTA
   ===================================================================== */

.footer-cta {
	background-color: var(--purple-dark);
	color: var(--white);
	padding: var(--padding-lg) var(--section-px) var(--padding-lg);
	text-align: center;
}

.footer-cta__inner {
	max-width: var(--content-width-md);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
}

.footer-cta__heading {
	margin: 0;
	font-size: var(--font-size-25-60);
	font-weight: 400;
	line-height: 1.1;
}

.footer-cta__text {
	margin: 0;
	font-size: var(--font-size-18-22);
	line-height: 1.4;
	opacity: 0.85;
}

.footer-cta__btn {
	color: var(--white);
	border: 1px solid var(--white);
	padding: 0.75em 1.75em;
	font-size: var(--font-size-12-16-17);
	transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
	text-decoration: none;
}

.footer-cta__btn:hover {
	background-color: var(--white);
	color: var(--purple-dark);
	opacity: 1;
}

/* =====================================================================
   FOOTER
   ===================================================================== */

.footer {
	color: var(--white);
}

.footer a {
	color: var(--white);
	text-decoration-color: transparent;
}

.footer a:hover {
	text-decoration-color: var(--white);
	opacity: 1;
}

/* =====================================================================
   FOOTER - Contact details
   ===================================================================== */


.footer-contact {
	background-color: var(--off-black);
	padding: 5rem var(--section-px) 8rem;
}

.footer-contact__inner {
	max-width: var(--content-width-xl);
	margin: 0 auto;
}

.footer-contact__heading {
	margin-bottom: 2.5rem;
}

.footer-contact__columns {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
}

@media (max-width: 768px) {
	.footer-contact {
		padding: 4rem var(--section-px) 3rem;
	}

	.footer-contact__columns {
		flex-direction: column;
		gap: 2rem;
	}
}

.footer-contact__address {
	font-size: var(--font-size-18-22);
	line-height: 1.2;
	font-style: normal;
}

/* =====================================================================
    FOOTER - Nav
    ===================================================================== */

.footer-nav {
    display: block;
}

@media (min-width: 1201px) {
	.footer-nav {
		min-width: 241px;
	}
}

.footer-nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-nav li {
	margin-bottom: 0.75rem;
	font-size: var(--font-size-18-22);
	line-height: 1.2;
}

/* =====================================================================
   FOOTER - Social
   ===================================================================== */

.footer-social {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.footer-social a {
	transition: opacity 0.25s ease;
	background-color: var(--white);
	color: var(--off-black);
	padding: 0.35em;
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
}

.footer-social a:hover {
	opacity: 0.8;
	text-decoration: none;
}

.footer-social svg {
	width: 2.25rem;
	height: 2.25rem;
}

@media (max-width: 1200px) {
	.footer-social svg {
		width: 2rem;
		height: 2rem;
	}
}

@media (max-width: 768px) {
	.footer-social svg {
		width: 1.625rem;
		height: 1.625rem;
	}
}

/* =====================================================================
   FOOTER - Copyright
   ===================================================================== */

.footer-copyright {
	background-color: var(--grey-dark);
	padding: 1rem var(--section-px);
}

.footer-copyright__inner {
	max-width: var(--content-width-xl);
	margin: 0 auto;
	display: flex;
	gap: 3rem;
	justify-content: space-between;
}

.footer-copyright p {
	margin: 0;
	font-family: var(--font-family-headline);
	font-weight: 400;
	font-size: var(--font-size-18);
	line-height: 1.2;
}

@media (max-width: 768px) {
	.footer-copyright__inner {
		flex-direction: column;
		gap: 0.5rem;
	}

	.footer-copyright__inner p {
		margin-bottom: 0 !important;
		font-size: var(--font-size-12-16-17);
	}
}

/* =====================================================================
   UTILITY
   ===================================================================== */

.max-w-2xs {
	max-width: var(--content-width-2xs);
}

.balance {
   	text-wrap: balance;
}

/* =====================================================================
   ACCESSIBILITY - Screen Readers
   ===================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
	z-index: 100;
	padding: 1rem;
	background: #fff;
	color: #000;
	font-weight: bold;
}

.skip-link:focus {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 200;
}

/* =====================================================================
   ALPINE — hide elements until JS initialises
   ===================================================================== */

[x-cloak] { display: none !important; }

/* =====================================================================
   HEADER
   ===================================================================== */

.header {
	position: relative;
	height: 80px;
	width: 100%;
	z-index: 100;
	background-color: var(--bg-color, var(--grey));
	padding: 1.25rem var(--section-px);
	transition: background-color 0.3s ease, height 0.3s ease;
}

.header--home:not(.header--scrolled) {
	height: auto;
}


/* ── Scrolled / sticky state ── */

.header--scrolled {
	height: 70px;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background-color: var(--off-black);
}

.header--scrolled .header__menu-wrap,
.header--scrolled .header__menu-link,
.header--scrolled .header__menu-link--search {
	color: var(--white);
}

.header--scrolled .header__menu-link:hover {
	color: var(--white);
	opacity: 0.75;
}

.header--scrolled .header__mobile-btn {
	color: var(--white);
}

/* ── Nav bar ── */

.header__nav {
	display: flex;
	height: 100%;
	max-width: var(--content-width-xl);
	margin: 0 auto;
	align-items: center;
	color: var(--header-text, var(--off-black));
	justify-content: flex-end;
	gap: 4rem;
}

.header__nav:not(.header--home) {
	/*margin-top: 0.2rem;*/
}

.header--home:not(.header--scrolled) .header__nav {
	align-items: flex-start;
	justify-content: space-between;
}

/* ── Logo anchor ── */

.header__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
	line-height: 0;
	position: fixed;
	top: 0;
	left: 0;
}

.header--home:not(.header--scrolled) .header__logo {
	position: relative;
}

/* Individual logo SVGs */

.header__logo-svg {
	width: auto;
	transition: height 0.3s;
}

.header__logo-svg--home-desktop {
	display: block;
	height: 128px;
}

@media (max-width: 1350px) {
	.header__logo-svg--home-desktop {
		height: 87px;
	}
}

.header__logo-svg--home-mobile {
	display: none;
	height: 217px;
	margin-bottom: -2.5rem;
}

@media (max-width: 410px) {
	.header__logo-svg--home-mobile {
		height: 185px;
	}
}

@media (max-width: 350px) {
	.header__logo-svg--home-mobile {
		height: 159px;
	}
}

.header--menu-open .header__logo-svg--home-desktop {
	height: 80px;
}

/* Compact logo wrapper — grid stacking lets width derive from SVG aspect ratio at the given height */
.header__logo-compact {
	display: none;
	height: 80px;
	transition: height 0.3s;
}

/* Show wrapper on non-home pages, and on home when scrolled */
.header:not(.header--home) .header__logo-compact,
.header--home.header--scrolled .header__logo-compact {
	display: grid;
}

/* Scrolled: shrink the wrapper */
.header--scrolled .header__logo-compact {
	height: 70px;
}

/* All compact logos stack in the same grid cell, hidden by default via opacity */
.header__logo-svg--compact-white,
.header__logo-svg--compact-black,
.header__logo-svg--compact-color {
	grid-area: 1 / 1;
	height: 100%;
	width: auto;
	opacity: 0;
	transition: opacity 0.3s;
}

/* Grey (default) non-home pages: show colour logo */
.header:not(.header--home):not(.header--section):not(.header--scrolled) .header__logo-svg--compact-color {
	opacity: 1;
}

/* Section (coloured bg) pages: show white or black logo */
.header--section:not(.header--scrolled) .header__logo-svg--compact-white,
.header--section:not(.header--scrolled) .header__logo-svg--compact-black {
	opacity: 1;
}

/* When scrolled: hide home logos, cross-fade to colour logo */
.header--scrolled .header__logo-svg--home-desktop,
.header--scrolled .header__logo-svg--home-mobile {
	display: none;
}

.header--scrolled .header__logo-svg--compact-color {
	opacity: 1;
}

/* ── Mobile menu button ── */

.header__mobile-btn {
	display: none;
	align-items: center;
	justify-content: center;
	margin-top: -0.5rem;
	margin-right: -0.5rem;
	padding: 0.5rem;
	background: none;
	border: none;
	cursor: pointer;
	line-height: 0;
	color: var(--header-text, var(--off-black));
}

.header__mobile-btn-icon {
	width: 1.75rem;
	height: 1.75rem;
}

/* ── Desktop menu ── */

.header__menu {
	display: flex;
	list-style: none;
	gap: 2.5rem;
	margin: 0;
	padding: 0;
	align-items: center;
}

@media (max-width: 1450px) {
	.header__menu {
		gap: 2rem;
	}
}

.header__menu-item {
	position: relative;
}

.header__menu-wrap {
	display: inline-flex;
	align-items: center;
	border: 2px solid transparent;
	padding: 0.5rem 0.625rem 0.4rem;
	color: var(--header-text, var(--off-black));
	transition: border-color 0.3s ease, opacity 0.3s ease;
	gap: 0.7rem;
}

.header__menu-wrap--active {
	border-color: currentColor;
}

.header__menu-link:hover,
.header__menu-arrow:hover {
	opacity: 0.75;
}

.header__menu-link {
	font-family: var(--font-family-headline);
	text-transform: uppercase;
	font-size: 1rem;
	line-height: 1.2;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
}

.header__menu-arrow {
	display: flex;
	align-items: center;
	background: none;
	border: none;
	padding: 0.65rem 0.4rem 0.6rem;
	margin: -0.6rem -0.4rem;
	cursor: pointer;
	color: inherit;
	appearance: none;
}

.header__menu-arrow-icon {
	width: 0.75rem;
	height: auto;
}

/* --- Search button --- */

.header__menu-link--search {
	display: flex;
	align-items: center;
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
	color: inherit;
	appearance: none;
}

.header__menu-link--search svg {
	width: 1.25rem;
	height: 1.25rem;
}

/* ── Mobile overrides ── */

@media (max-width: 1035px) {
	.header {
		height: 70px;
	}

	.header__logo-compact {
		height: 70px;
	}

	/* Swap home logo to mobile version */
	.header__logo-svg--home-desktop {
		display: none;
	}

	.header__logo-svg--home-mobile {
		display: block;
	}

	/* Show mobile button, hide desktop menu */
	.header__mobile-btn {
		display: flex;
	}

	.header__menu {
		display: none;
	}
}


/* =====================================================================
   MENU OVERLAY
   ===================================================================== */

/* Container — full viewport, sits above header */
.menu-overlay {
	position: fixed;
	inset: 0;
	z-index: 200;
}

/* ── Backdrop ── */

.menu-overlay__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
}

.menu-overlay__backdrop--entering {
	transition: opacity 0.3s ease;
}
.menu-overlay__backdrop--enter-from { opacity: 0; }
.menu-overlay__backdrop--enter-to   { opacity: 1; }

.menu-overlay__backdrop--leaving {
	transition: opacity 0.25s ease;
}
.menu-overlay__backdrop--leave-from { opacity: 1; }
.menu-overlay__backdrop--leave-to   { opacity: 0; }

/* ── Panel ── */

.menu-overlay__panel {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	max-height: 100dvh;
	overflow-y: auto;
	background-color: var(--off-black);
}

.menu-overlay__panel--entering {
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
.menu-overlay__panel--enter-from {
	transform: translateY(-100%);
	opacity: 0;
}
.menu-overlay__panel--enter-to {
	transform: translateY(0);
	opacity: 1;
}

.menu-overlay__panel--leaving {
	transition: transform 0.25s ease-in, opacity 0.25s ease-in;
}
.menu-overlay__panel--leave-from {
	transform: translateY(0);
	opacity: 1;
}
.menu-overlay__panel--leave-to {
	transform: translateY(-100%);
	opacity: 0;
}

/* ── Close button ── */

.menu-overlay__focus-sink {
	display: block;
	width: 0;
	height: 0;
	overflow: hidden;
	outline: none;
}

.menu-overlay__focus-sink:focus,
.menu-overlay__focus-sink:focus-visible {
	outline: none;
}

.menu-overlay__close {
	position: absolute;
	top: 1.25rem;
	right: 1.5rem;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	background: rgba(255, 255, 255, 0);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	line-height: 0;
	color: var(--black);
	transition: background 0.2s ease;
}

.menu-overlay__close:hover {
	background: rgba(255, 255, 255, 0.28);
}

.menu-overlay__close:focus-visible {
	outline: 2px solid var(--black);
	outline-offset: 3px;
}

.menu-overlay__close-icon {
	width: 1.25rem;
	height: 1.25rem;
}

/* Override inline SVG fill so it inherits the button colour */
.menu-overlay__close-icon path {
	fill: currentColor;
}

/* ── Navigation grid ── */

.menu-overlay__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

/* ── Cell ──
   Full-bleed background: no horizontal padding on the cell itself.
   display:grid + grid-template-rows:1fr stretches the cell-inner to the
   outer grid's row height, which lets align-self:end work on the parent.
   ── */

.menu-overlay__cell {
	padding: 3.5rem 0 3rem;
	display: grid;
	grid-template-rows: 1fr;
	transition: opacity 0.2s ease;
}

/* ── Cell inner ──
   Constrains content to one half of --content-width-xl and pins it to the
   centre-of-page junction so both halves together equal --content-width-xl.

   Left cells (nth-child odd)  → margin-left:auto  pushes inner to right edge
   Right cells (nth-child even) → margin-right:auto pushes inner to left edge
   ── */

.menu-overlay__cell-inner {
	width: min(calc(var(--content-width-xl) / 2), calc(100% - var(--section-px)));
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr;
	gap: 2rem;
}

.menu-overlay__cell:nth-child(odd) .menu-overlay__cell-inner {
	margin-left: auto;
	padding-right: 3.75rem; /* breathing room at the centre junction */
}

.menu-overlay__cell:nth-child(even) .menu-overlay__cell-inner {
	margin-right: auto;
	padding-left: 3.75rem;  /* breathing room at the centre junction */
}

/* Inactive: cell background fades to 0.4, text fades to 0.5 independently */
.menu-overlay__cell--inactive {
	opacity: 0.4;
}

.menu-overlay__cell--inactive .menu-overlay__parent,
.menu-overlay__cell--inactive .menu-overlay__children {
	opacity: 0.3;
}

.menu-overlay__cell--inactive .menu-overlay__parent {
	text-decoration-color: transparent;
}

/* Cell colours */
.menu-overlay__cell--orange {
	background-color: var(--orange);
	color: var(--black);
}

.menu-overlay__cell--pink {
	background-color: var(--pink);
	color: var(--black);
}

.menu-overlay__cell--purple-dark {
	background-color: var(--purple-dark);
	color: var(--white);
}

.menu-overlay__cell--blue {
	background-color: var(--blue);
	color: var(--white);
}

/* All cell links inherit the cell colour */
.menu-overlay__cell a {
	color: inherit;
}

/* ── Parent link ──
   Typography comes from .is-style-headline-36 added in HTML.
   Only overlay-specific overrides live here.
   ── */

.menu-overlay__parent-wrap {
	/* Desktop: right column, pinned to bottom-right */
	grid-column: 2;
	grid-row: 1;
	align-self: end;
	text-align: right;
}

.menu-overlay__parent {
	display: inline;
	text-decoration-line: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 0.1em;
	text-underline-offset: 0.25em;
	transition: opacity 0.2s ease, text-decoration-color 0.3s ease;
}

.menu-overlay__parent--active {
	text-decoration-color: currentColor;
}

@media (min-width: 1201px) {
	.menu-overlay__parent {
		white-space: nowrap;
	}
}

.menu-overlay__parent:hover,
.menu-overlay__parent:focus-visible {
	opacity: 1;
	text-decoration-color: currentColor;
}

/* ── Children list ── */

.menu-overlay__children {
	/* Desktop: left column, top-aligned */
	grid-column: 1;
	grid-row: 1;
	align-self: start;
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem !important;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* ── Child link ── */

.menu-overlay__child {
	font-size: var(--font-size-20-28);
	font-weight: 400;
	text-decoration-line: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 0.1em;
	text-underline-offset: 0.25em;
	transition: opacity 0.2s ease, text-decoration-color 0.3s ease;
}

.menu-overlay__child:hover,
.menu-overlay__child:focus-visible {
	opacity: 1;
	text-decoration-color: currentColor;
}

.menu-overlay__child--active {
	text-decoration-color: currentColor;
}

/* ── Desktop: panel drops below the header ── */

@media (min-width: 1036px) {
	.header {
		z-index: 201; /* above menu overlay */
	}

	.menu-overlay__backdrop {
		top: var(--header-height, 0px);
	}

	.menu-overlay__panel {
		top: var(--header-height, 0px);
		max-height: calc(100dvh - var(--header-height, 0px));
	}

	.menu-overlay__close--mobile-only {
		display: none;
	}
}

/* ── Mobile overrides ── */

@media (max-width: 768px) {
	.menu-overlay__grid {
		grid-template-columns: 1fr;
	}

	/* Cell: restore horizontal padding (cell-inner is full-width here).
	   grid-template-rows: auto so cell height is driven by content. */
	.menu-overlay__cell {
		padding: 2.5rem var(--section-px) 2rem;
		grid-template-rows: auto;
	}

	/* Reset the desktop nth-child width/margin constraints — full width on mobile */
	.menu-overlay__cell-inner,
	.menu-overlay__cell:nth-child(odd) .menu-overlay__cell-inner,
	.menu-overlay__cell:nth-child(even) .menu-overlay__cell-inner {
		width: 100%;
		margin: 0;
		padding: 0;
		grid-template-rows: auto;
	}

	/* Mobile column swap: parent top-left (col 1), children right (col 2) */
	.menu-overlay__parent-wrap {
		grid-column: 1;
		grid-row: 1;
		align-self: start;
		text-align: left;
	}

	.menu-overlay__children {
		grid-column: 2;
		grid-row: 1;
	}

	.menu-overlay__child {
		font-size: 1rem;
	}


}

/* =====================================================================
   SPACER BLOCK (CORE)
   ===================================================================== */

.wp-block-separator {
	margin: 2.5rem 0;
	border-top: 1px solid var(--black) !important;
}

/* =====================================================================
   MAP
   ===================================================================== */

@media (max-width: 1200px) {
	.map img {
		aspect-ratio: 3 / 2;
		object-fit: cover;
		object-position: center;
	}
}

@media (max-width: 768px) {
	.map img {
		aspect-ratio: 1 / 1;
		object-fit: cover;
		object-position: center;
	}
}

/* =====================================================================
   SUBSCRIBE FORM
   ===================================================================== */

.subscribe__form {
	margin: 1rem 0 0 0;
	width: 100%;
	color: rgb(255, 255, 255);
	display: flex;
	flex-wrap: nowrap;
	justify-content: start;
	gap: 17px;
}

.subscribe__input {
	width: 100%;
	height: 100%;
	padding: 0 0.75rem;
	border-radius: 3px;
	border: 1px solid var(--purple-dark);
	font-size: var(--font-size-12-16-17);
	font-family: var(--font-family-base);
	background-color: var(--white);
}

.subscribe__button-wrap {
	position: relative;
	width: 113px;
	height: 30px;
	display: inline-block;
}

.subscribe__button {
	color: var(--white);
	height: 45px;
	z-index: 5;
	padding: 0.55em 1em;
	background-color: var(--blue);
	border: 1px solid var(--blue);
	border-radius: 3px;
	font-size: var(--font-size-12-16-17);
	font-family: var(--font-family-base);
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.subscribe__button:hover {
	background-color: var(--blue-light);
}

/* =====================================================================
   POSTS
   ===================================================================== */

.post__header {
	color: var(--accent-color);
	padding-bottom: var(--padding-md);
}

.post__title {

}

.post__published {

}

.post__content {

}
