/* Variables */
@font-face {
	font-family: "AvenirNext";
	src: url("../fonts/AvenirNext/AvenirNext-Heavy.woff2") format("woff2");
	font-display: swap;
}

:root {
	--mdrt-dark-blue: #0F2B5A;
	--mdrt-blue: #1853A3;
	--mdrt-medium-blue: #017CBD;
	--mdrt-yellow: #FFCF00;
	--mdrt-light-gray: #F2F2F2;
	--mdrt-medium-gray: #B7B7B7;
	--mdrt-dark-gray: rgba(28, 28, 28, 0.80);
	--mdrt-black-text: #1C1C1C;
	--mdrt-opaque-white: rgba(255, 255, 255, 0.8);
	--mdrt-font-body: "Nunito Sans", Arial, sans-serif;
	--mdrt-font-headings-sans: "AvenirNext", Arial, sans-serif;
	--mdrt-font-headings-serif: "Merriweather", serif;
	--section-y-padding-lg: 100px;
	--section-y-padding-md: 45px;
	--section-y-padding-sm: 20px;
	--section-x-padding: 20px;
}

/* * { outline: 1px solid red; } */


/* Font localization */
body.locale-zh-cn {
	--mdrt-font-body: "Source Han Sans", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
	--mdrt-font-headings-sans: "Source Han Sans", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
body.locale-zh-cht {
	--mdrt-font-body: "Source Han Sans", "Source Han Sans TC", "Noto Sans CJK TC", "PingFang TC", sans-serif;
	--mdrt-font-headings-sans: "Source Han Sans", "Source Han Sans TC", "Noto Sans CJK TC", "PingFang TC", sans-serif;
}
body.locale-ko {
	--mdrt-font-body: "Nanum Gothic", "Apple SD Gothic Neo", sans-serif;
	--mdrt-font-headings-sans: "Nanum Gothic", "Apple SD Gothic Neo", sans-serif;
}
body.locale-ja {
	--mdrt-font-body: "Noto Sans JP", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
	--mdrt-font-headings-sans: "Noto Sans JP", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
}
body.locale-vi {
	--mdrt-font-body: Arial, "Times New Roman", sans-serif;
	--mdrt-font-headings-sans: "Times New Roman", Arial, serif;
}
body.locale-th {
	--mdrt-font-body: Tahoma, "PSL Kitthada", "PSL Kittithada", sans-serif;
	--mdrt-font-headings-sans: Tahoma, "PSL Kitthada", "PSL Kittithada", serif;
}

/* Core styles */
html {
	overflow-x: hidden;
}
body{
	margin: 0;
	padding: 0;
	font-family: var(--mdrt-font-body);
	overflow-x: hidden;
}

/* Skip navigation */
.skip-nav {
	position: absolute;
	top: -100%;
	left: 0;
	background: var(--mdrt-blue);
	color: white;
	padding: 14px 24px;
	font-weight: 700;
	font-family: var(--mdrt-font-headings-sans);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	z-index: 10000;
	&:focus {
		top: 0;
	}
}

/* Global keyboard focus indicator */
:focus-visible {
	outline: 3px solid var(--mdrt-yellow);
	outline-offset: 2px;
}

h1, h2, h2, h3, h4, h5, h6 {
	margin: 0;
	padding: 0;
	font-family: var(--mdrt-font-headings-sans);
	text-transform: uppercase;
	text-wrap: balance;
}
h1 {
	font-size: 68px;
	font-weight: 900;
	line-height: 75px;
	color: white;
}
h1 sup {
	font-size: 40px;
}
h1 .hero-subheading {
	font-size: 40px;
	font-weight: 900;
	line-height: 60px;
	color: white;
}
h2 {
	font-size: 32px;
	font-weight: 900;
	color: var(--mdrt-blue);
	text-align: center;
	margin-bottom: 30px;
}

p {
	font-size: 24px;
	font-weight: 600;
	text-wrap: balance;
}

span[data-aos] {
	display: inline-block;
}

header {
	padding: var(--section-y-padding-md) var(--section-x-padding);

	& .header-logo {
		max-height: 50px;
		height: auto;
		width: auto;
	}
	& nav {
		& a {
			color: var(--mdrt-blue);
			font-size: 20px;
			font-weight: 600;
			text-decoration: none;
			text-transform: uppercase;
			margin-left: 30px;
			&:hover,
			&:focus-visible {
				color: var(--mdrt-medium-blue);
			}
		}
		& ul {
			list-style: none;
			margin: 0;
			padding: 0;
			display: flex;
			align-items: center;
			height: 50px;
		}
	}
	& .language-globe {
		background: none;
		border: none;
		cursor: pointer;
		padding: 0;
		position: relative;
		top: 3px;
		margin-left: 20px;
		& img {
			padding: 10px;
			display: block;
		}
		&:hover img,
		&:focus-visible img {
			background-color: var(--mdrt-light-gray);
			border-radius: 50%;
		}
	}
}

section {
	padding: var(--section-y-padding-lg) var(--section-x-padding);

	&.hero {
		padding: 60px var(--section-x-padding);
		height: 600px;
		& .hero-heading {
			max-width: 50%;
		}
	}
	&.intro {
		& p { text-align: center; }
	}
	&.hype-video {
		& video {
			margin: auto;
			display: block;
			width: 100%;
			height: auto;
			aspect-ratio: 16 / 9;
		}
	}
	&.social {
		& p.social-text { text-align: center; }
		& .juicer-feed { min-height: 1000px; }
		& .juicer-feed p { font-size: 14px; line-height: initial;
			font-weight: initial; margin-top: 0; }
	}
	&.cta {
		& .square-logo {
			max-width: 135px;
			height: auto;
			width: auto;
			margin-right: 40px;
		}
		& .cta-heading {
			color: white;
			display: inline-block;
		}
		& .cta-card {
			padding: 20px 120px 20px 20px;
			background-color: var(--mdrt-light-gray);
			text-decoration: none;
			display: inline-block;
			background-image: url('../images/cta-card-arrow.svg');
			background-repeat: no-repeat;
			background-position: right 20px center;
			&:hover {
				background-image: url('../images/cta-card-arrow-hover.svg');
			}
		}
		& .cta-card-heading {
			color: var(--mdrt-black-text);
			font-family: var(--mdrt-font-headings-serif);
			font-size: 24px;
			font-weight: 600;
			display: block;
			margin-bottom: 20px;
		}
		& .cta-card-text {
			font-family: var(--mdrt-font-body);
			color: var(--mdrt-dark-gray);
			font-size: 16px;
			font-weight: 400;
			display: block;
		}
	}
}

[data-background="light-gray"] {
	background: var(--mdrt-light-gray);
	& p {
		color: var(--mdrt-dark-gray);
	}
}
[data-background="white"] {
	background: white;
}
[data-background="blue"] {
	background: var(--mdrt-blue);
}
[data-background="dark-blue"] {
	background: var(--mdrt-dark-blue);
}
[data-background="light-pattern"] {
	background: url('../images/grid-background-light.svg'), white;
	background-attachment: fixed;
}
[data-background="blue-pattern"] {
	background: url('../images/grid-background-blue.svg');
	background-size: cover;
	background-attachment: fixed;
	& p {
		color: white;
	}
}
[data-background="blue-pattern-with-arrows"] {
	background: url('../images/hero-arrows.svg') bottom left, url('../images/grid-background-blue.svg');
	background-size: contain, cover;
	background-repeat: no-repeat;
	background-attachment: scroll, fixed;
	& p {
		color: white;
	}
}


footer {
	padding: var(--section-y-padding-lg) var(--section-x-padding) var(--section-y-padding-md) var(--section-x-padding);
	& .footer-logo {
		max-width: 250px;
		height: auto;
	}

	& a.footer-phone {
		color: white;
		text-decoration: none;
		font-size: 20px;
		font-weight: 700;
	}
	& address {
		color: white;
		font-size: 20px;
		line-height: 30px;
		font-style: normal;
	}
	& a.contact-us {
		color: white;
		font-size: 20px;
		font-weight: 700;
		text-decoration: none;
		display: inline-block;
		margin-top: 20px;
	}
	& h3 {
		color: white;
		font-size: 20px;
		font-weight: 900;
		margin-bottom: 45px;
		text-transform: initial;
		font-family: var(--mdrt-font-body);
	}
	& nav.helpful-links ul {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 25px;
		padding: 0;
		list-style: none;
	}
	& nav.helpful-links ul li a {
		color: white;
		font-size: 20px;
		font-weight: 700;
		text-decoration: none;
	}
	& .social-media-hashtag {
		color: white;
		font-size: 24px;
		font-weight: 400;
	}
	& nav.social-media ul {
		display: flex;
		gap: 25px;
		padding: 0;
		list-style: none;
		align-items: center;
		margin: 0;
	}
	& nav.social-media ul li a:hover {
		opacity: 0.75;
	}
	& .footer-bottom-row {
		padding-top: var(--section-y-padding-lg);
	}
	& p.footer-legal {
		color: white;
		font-size: 16px;
		margin: 0;
		font-weight: 400;
		display: inline-block;
		margin-right: 50px;
	}
	& nav.nav-legal {
		display: inline-block;
	}
	& nav.nav-legal ul {
		display: flex;
		gap: 25px;
		padding: 0;
		list-style: none;
	}
	& nav.nav-legal ul li a {
		color: white;
		font-size: 16px;
		font-weight: 700;
		text-decoration: none;
	}
}

.external-link::after {
	content: url(../images/external-link.svg);
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 6px;
	margin-top: -10px;
	vertical-align: middle;
}

/* Language modal */
.language-modal {
	border: none;
	border-radius: 16px;
	padding: 32px;
	width: 600px;
	max-width: calc(100vw - 40px);
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}
.language-modal::backdrop {
	background: rgba(0, 0, 0, 0.45);
}
.language-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
}
.language-modal-title {
	font-family: var(--mdrt-font-body);
	font-size: 22px;
	font-weight: 700;
	color: var(--mdrt-black-text);
	text-transform: none;
	margin: 0;
}
.language-modal-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: var(--mdrt-black-text);
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	&:hover {
		background-color: var(--mdrt-light-gray);
	}
}
.language-modal-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}
.language-option {
	font-family: var(--mdrt-font-body);
	font-size: 14px;
	font-weight: 600;
	padding: 8px 16px;
	border: none;
	border-radius: 50px;
	background-color: var(--mdrt-light-gray);
	color: var(--mdrt-black-text);
	cursor: pointer;
	text-align: center;
	&:hover {
		background-color: var(--mdrt-medium-gray);
	}
	&.active {
		background-color: var(--mdrt-blue);
		color: white;
	}
}

/* Mobile nav */
.mobile-nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}
.mobile-nav-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
	&.open {
		opacity: 1;
		pointer-events: auto;
	}
}
.mobile-nav {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(300px, 82vw);
	background: var(--mdrt-dark-blue);
	z-index: 1000;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	/* box-shadow: -4px 0 24px rgba(0, 0, 0, 0.25); */
	&.open {
		transform: translateX(0);
	}
}
.mobile-nav-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 20px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.mobile-nav-close {
	background: none;
	border: none;
	color: white;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: 0.75;
	&:hover {
		opacity: 1;
	}
}
.mobile-nav-links {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	& li a {
		display: block;
		color: white;
		font-family: var(--mdrt-font-body);
		font-size: 16px;
		font-weight: 700;
		text-decoration: none;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		padding: 18px 28px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
		transition: background 0.15s ease, color 0.15s ease;
	}
	& li:first-child a {
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}
	& li a:hover,
	& li a:focus {
		background: rgba(255, 255, 255, 0.08);
		color: var(--mdrt-yellow);
	}
}
.mobile-nav-footer {
	padding: 24px 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mobile-language-trigger {
	display: flex;
	align-items: center;
	gap: 12px;
	background: none;
	border: none;
	color: white;
	font-family: var(--mdrt-font-body);
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	padding: 0;
	opacity: 0.75;
	transition: opacity 0.15s ease, color 0.15s ease;
	& img {
		filter: brightness(0) invert(1);
		width: 22px;
		height: 22px;
	}
	&:hover {
		opacity: 1;
		color: var(--mdrt-yellow);
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.mobile-nav,
	.mobile-nav-backdrop {
		transition: none;
	}
}

/* Mobile adjustments */
@media (max-width: 767px) {
	/* background-attachment: fixed is broken on mobile Safari — sized to viewport, not element */
	[data-background="light-pattern"],
	[data-background="blue-pattern"],
	[data-background="blue-pattern-with-arrows"] {
		background-attachment: scroll;
	}

	header {
		padding: 45px 35px;
		position: relative;
		& .header-logo { max-width: 200px; }
		& nav { display: none; }
		& .mobile-nav-toggle {
			display: block;
			position: absolute;
			right: 10px;
			top: 50%;
			transform: translateY(-50%);
		}
	}
	section {
		&.hero {
			height: 375px;
			padding: var(--section-y-padding-sm) var(--section-x-padding);
			& .hero-heading {
				text-align: center;
				font-size: 40px;
				line-height: normal;
				max-width: initial;
				& sup { font-size: 24px; }
				& .hero-subheading {
					font-size: 28px;
					line-height: 40px;
				}
			}
		}
		&.cta {
			& .cta-card { background-position: right 20px bottom 20px; }
		}
	}
	.language-modal-grid { grid-template-columns: 1fr; }
	.social-media-hashtag { text-align: center; }
	nav.social-media ul { justify-content: center; }
	footer {
		& h3 { margin-top: 50px; }
		& .row:first-child {
			display: flex;
			flex-direction: column;
			& > *:nth-child(1) { order: 2; margin-top: 50px; }
			& > *:nth-child(2) { order: 3; }
			& > *:nth-child(3) { order: 1; }
		}
	}
}
