/*
 * Homepage experience layer.
 * The existing navy, teal, Rubik typography, imagery, and Divi editability stay
 * intact. This file only improves states, navigation, programme, and motion.
 */

:root {
	--highlights-navy: #003464;
	--highlights-navy-deep: #002746;
	--highlights-teal: #00f0bf;
	--highlights-muted-teal: #65bea9;
	--highlights-focus: #fff;
	--highlights-fast: 180ms;
	--highlights-standard: 280ms;
	--highlights-header-offset: 104px;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--highlights-header-offset);
}

#subscribe,
#speakers,
#aftermovie,
#program {
	scroll-margin-top: var(--highlights-header-offset);
}

/* Header and one-page navigation. */
.custom_menu_section,
.custom_menu_mobile_row_parent {
	transition:
		background-color var(--highlights-standard) ease,
		box-shadow var(--highlights-standard) ease,
		padding var(--highlights-standard) ease;
}

.highlights-page-scrolled .custom_menu_section,
.highlights-page-scrolled .custom_menu_mobile_row_parent {
	box-shadow: 0 12px 34px rgba(0, 28, 58, 0.16);
}

.custom_menu_section .dsm-logo-wrap img,
.custom_menu_mobile_row_parent .custom_mobile_menu_logo img {
	animation: none !important;
	transition:
		opacity var(--highlights-fast) ease,
		transform var(--highlights-standard) ease !important;
}

.highlights-page-scrolled .custom_menu_section .dsm-logo-wrap img,
.highlights-page-scrolled .custom_menu_mobile_row_parent .custom_mobile_menu_logo img {
	transform: scale(0.96);
}

.highlights-nav-item .dsm-mega-menu-link,
.highlights-nav-item > a,
.dsm-root-menu .dsm-mega-menu-link,
#menu-menu-principal > li > a {
	position: relative;
}

.highlights-nav-item .dsm-mega-menu-link::after,
.dsm-root-menu .dsm-mega-menu-link::after {
	background: var(--highlights-teal);
	bottom: 2px;
	content: '';
	height: 2px;
	left: 12px;
	position: absolute;
	right: 12px;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform var(--highlights-fast) ease;
}

.highlights-nav-item .dsm-mega-menu-link:hover::after,
.highlights-nav-item .dsm-mega-menu-link:focus-visible::after,
.dsm-root-menu .dsm-mega-menu-link.highlights-nav-active::after {
	transform: scaleX(1);
}

.dsm-root-menu .dsm-mega-menu-link.highlights-nav-active .dsm-menu-text,
#menu-menu-principal a.highlights-nav-active {
	color: var(--highlights-teal) !important;
}

.custom_burger_icon a {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
}

.custom_burger_icon a:focus-visible,
.dsm-root-menu a:focus-visible,
#menu-menu-principal a:focus-visible {
	border-radius: 6px;
	outline: 3px solid var(--highlights-teal);
	outline-offset: 4px;
}

.custom_mobile_menu_section[aria-hidden='true'] {
	visibility: hidden;
}

.custom_mobile_menu_section.custom_open[aria-hidden='false'] {
	visibility: visible;
}

#menu-menu-principal .highlights-nav-item {
	margin-bottom: 25px;
}

/* Programme: preserve the two-day information architecture. */
#program .dsm_advanced_tabs {
	margin-inline: auto;
	max-width: 1040px;
}

#program .dsm-advanced-tabs-container {
	isolation: isolate;
}

#program .dsm-advanced-tabs-container.highlights-program-all-coming-soon {
	display: flex;
	flex-direction: column;
}

#program .highlights-program-all-coming-soon > .dsm-advanced-tabs-content-wrapper {
	margin-bottom: clamp(18px, 2.4vw, 28px);
	min-height: 0;
	order: 1;
}

#program .highlights-program-all-coming-soon > .dsm-advanced-tabs-wrapper {
	margin-bottom: 0;
	order: 2;
}

#program .dsm-advanced-tabs-wrapper {
	align-items: stretch;
	background: rgba(0, 31, 65, 0.58);
	border: 1px solid rgba(101, 190, 169, 0.34);
	border-radius: 18px;
	display: grid !important;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: 18px;
	padding: 8px;
}

#program .dsm-advanced-tabs-wrapper .dsm-tab {
	align-items: center;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 12px;
	color: #fff;
	cursor: pointer;
	display: flex;
	justify-content: center;
	min-height: 58px;
	min-width: 0 !important;
	padding: 12px 18px;
	transition:
		background-color var(--highlights-fast) ease,
		border-color var(--highlights-fast) ease,
		color var(--highlights-fast) ease,
		transform var(--highlights-fast) ease;
}

#program .dsm-advanced-tabs-wrapper .dsm-tab:hover {
	background: rgba(101, 190, 169, 0.13);
	border-color: rgba(101, 190, 169, 0.42);
}

#program .dsm-advanced-tabs-wrapper .dsm-tab.dsm-active,
#program .dsm-advanced-tabs-wrapper .dsm-tab[aria-selected='true'] {
	background: var(--highlights-teal);
	border-color: var(--highlights-teal);
	color: var(--highlights-navy-deep);
	box-shadow: 0 9px 26px rgba(0, 240, 191, 0.18);
}

#program .dsm-advanced-tabs-wrapper .dsm-tab:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

#program .dsm-advanced-tabs-content-wrapper {
	min-height: 220px;
}

#program .dsm-content-wrapper {
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(243, 253, 250, 0.96));
	border: 1px solid rgba(101, 190, 169, 0.38) !important;
	border-radius: 20px;
	box-shadow: 0 22px 58px rgba(0, 24, 52, 0.2);
	overflow: hidden;
	padding: clamp(34px, 6vw, 68px) clamp(22px, 5vw, 64px) !important;
	position: relative;
}

#program .dsm-content-wrapper::before {
	background: linear-gradient(180deg, var(--highlights-teal), var(--highlights-muted-teal));
	content: '';
	inset: 0 auto 0 0;
	position: absolute;
	width: 5px;
}

#program .dsm-content-wrapper[hidden] {
	display: none !important;
}

#program .dsm-content-wrapper h2 {
	color: var(--highlights-navy);
	letter-spacing: 0.04em;
	margin: 0;
}

#program .dsm-content-wrapper.highlights-program-coming-soon {
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0;
	box-shadow: none !important;
	display: grid !important;
	min-height: 0;
	overflow: visible;
	padding: 0 12px 20px !important;
	place-items: center;
	text-align: center;
}

#program .dsm-content-wrapper.highlights-program-coming-soon::before {
	display: none;
}

#program .dsm-content-wrapper.highlights-program-coming-soon[hidden] {
	display: none !important;
}

#program .highlights-program-coming-soon .dsm-inner-content-wrapper,
#program .highlights-program-coming-soon .dsm-inner-content,
#program .highlights-program-coming-soon .dsm-content {
	width: 100%;
}

#program .dsm-content-wrapper.highlights-program-coming-soon h2 {
	color: #fff !important;
	font-family: rubikBold, Rubik, sans-serif !important;
	font-size: clamp(38px, 5vw, 70px) !important;
	font-weight: 700 !important;
	letter-spacing: 0.065em;
	line-height: 1.05;
	text-align: center;
	text-wrap: balance;
}

/* Restrained, one-time section motion. Content remains visible without JS. */
.highlights-enhanced-motion .highlights-reveal {
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity var(--highlights-standard) ease,
		transform var(--highlights-standard) ease;
}

.highlights-enhanced-motion .highlights-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (max-width: 980px) {
	:root {
		--highlights-header-offset: 84px;
	}

	#program .dsm_advanced_tabs {
		width: min(92%, 760px);
	}

	.custom_mobile_menu_section {
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

@media (max-width: 640px) {
	#program .dsm-advanced-tabs-wrapper {
		gap: 6px;
		padding: 6px;
	}

	#program .dsm-advanced-tabs-wrapper .dsm-tab {
		min-height: 52px;
		padding: 10px 8px;
	}

	#program .dsm-content-wrapper {
		border-radius: 16px;
		min-height: 190px;
		padding: 34px 22px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
	}

	.custom_menu_section,
	.custom_menu_mobile_row_parent,
	.custom_menu_section .dsm-logo-wrap img,
	.custom_menu_mobile_row_parent .custom_mobile_menu_logo img,
	#program .dsm-tab,
	.highlights-enhanced-motion .highlights-reveal {
		animation: none !important;
		transition-duration: 0.01ms !important;
	}

	.highlights-enhanced-motion .highlights-reveal {
		opacity: 1;
		transform: none;
	}
}
