/**
 * Optima Event — frontend
 */

:root {
	--oe-accent: #ff6b00;
	--oe-accent-dark: #1a2744;
	--oe-text: #1a1a1a;
	--oe-muted: #6b7280;
	--oe-border: #e5e7eb;
	--oe-bg: #fff;
	--oe-radius: 28px;
	--oe-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

/* —— Program —— */
.oe-program {
	--oe-program-bg: var(--oe-accent-dark);
	--oe-program-text: #fff;
	--oe-program-line: rgba(255, 255, 255, 0.22);
	margin: 0 auto;
	font-family: inherit;
	color: var(--oe-text);
}

.oe-program__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	margin-bottom: 1rem;
}

.oe-program__download {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 1rem;
	border: 1.5px solid var(--oe-accent-dark);
	border-radius: var(--oe-radius);
	color: var(--oe-accent-dark);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.85rem;
	transition: background 0.2s, color 0.2s;
}

.oe-program__download:hover {
	background: var(--oe-accent-dark);
	color: #fff;
}

.oe-program__days {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.oe-day {
	background: var(--oe-program-bg);
	color: var(--oe-program-text);
	border-radius: var(--oe-radius);
	overflow: hidden;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.oe-day:hover {
	background: color-mix(in srgb, var(--oe-program-bg) 78%, var(--oe-accent));
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}

.oe-day.is-open:hover {
	background: color-mix(in srgb, var(--oe-program-bg) 88%, var(--oe-accent));
}

.oe-day__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	flex-wrap: wrap;
	padding: 0.85rem 1.5rem;
}

.oe-day__toggle {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	margin: 0;
	padding: 0.3rem 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font: inherit;
	text-align: left;
	flex: 1 1 auto;
	min-width: min(100%, 10rem);
}

.oe-day__toggle::after {
	content: '';
	width: 0.55rem;
	height: 0.55rem;
	margin-left: 0.35rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
	opacity: 0.85;
}

.oe-day.is-open .oe-day__toggle::after {
	transform: rotate(-135deg);
	margin-top: 0.25rem;
}

.oe-day__toggle:hover {
	color: #fff;
}

.oe-day__toggle:hover .oe-day__label {
	color: var(--oe-accent);
}

.oe-day__label {
	font-weight: 700;
	font-size: clamp(1.15rem, 2.4vw, 1.55rem);
	letter-spacing: 0.04em;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
}

.oe-day__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.4rem;
	flex: 0 1 auto;
	max-width: 100%;
}

.oe-day__tag {
	appearance: none;
	margin: 0;
	padding: 0.35rem 0.75rem;
	border: 1px solid color-mix(in srgb, var(--oe-tag-c, #fff) 55%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--oe-tag-c, #fff) 18%, transparent);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.oe-day__tag:hover {
	background: color-mix(in srgb, var(--oe-tag-c, #fff) 32%, transparent);
}

.oe-day__tag.is-active {
	background: var(--oe-tag-c, #fff);
	border-color: var(--oe-tag-c, #fff);
	color: #0f172a;
}

.oe-day.is-open .oe-day__bar {
	padding-bottom: 0.55rem;
}

.oe-day__panel {
	padding: 0 1.5rem 0.35rem;
}

.oe-day__empty {
	margin: 0;
	padding: 0.5rem 0 1.15rem;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.9rem;
}

.oe-day__list {
	display: flex;
	flex-direction: column;
}

.oe-session {
	display: grid;
	grid-template-columns: 8rem minmax(0, 1.5fr) auto minmax(7rem, 0.9fr);
	align-items: start;
	gap: 0.85rem 1.1rem;
	padding: 1.05rem 0.85rem;
	border-top: 1px solid var(--oe-program-line);
	background: transparent;
	color: var(--oe-program-text);
	box-shadow: none;
	border-radius: 0.9rem;
	margin: 0 -0.85rem;
	transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.oe-session:hover,
.oe-session:focus-within {
	background: rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.oe-session.is-hidden,
.oe-session[hidden] {
	display: none !important;
}

.oe-session__time {
	font-weight: 500;
	font-size: 0.92rem;
	line-height: 1.3;
	padding-top: 0.05rem;
	color: rgba(255, 255, 255, 0.92);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.oe-session__title-wrap {
	min-width: 0;
}

.oe-session__tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 0.5rem;
	padding: 0;
}

.oe-session__tags li {
	margin: 0;
	padding: 0.28rem 0.65rem;
	border: 1px solid color-mix(in srgb, var(--oe-tag-c, #fff) 55%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--oe-tag-c, #fff) 22%, transparent);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.oe-session__title {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fff;
}

.oe-session__body {
	margin: 0.45rem 0 0;
	font-size: 0.88rem;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: normal;
	text-transform: none;
	color: rgba(255, 255, 255, 0.82);
}

.oe-session--collapsible .oe-session__body {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	line-clamp: 3;
	-webkit-line-clamp: 3;
	overflow: hidden;
	max-height: 4.35em;
}

.oe-session--collapsible.is-expanded .oe-session__body {
	line-clamp: unset;
	-webkit-line-clamp: unset;
	max-height: none;
}

.oe-session__body > *:first-child {
	margin-top: 0;
}

.oe-session__body > *:last-child {
	margin-bottom: 0;
}

.oe-session__body p {
	margin: 0 0 0.55em;
}

.oe-session__body p:last-child {
	margin-bottom: 0;
}

.oe-session__body a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.oe-session__speakers {
	justify-self: end;
	padding-top: 0.05rem;
}

.oe-session__avatars {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.3rem;
}

.oe-session__avatars li {
	margin: 0;
}

.oe-speaker-icon {
	appearance: none;
	display: block;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.18);
	cursor: pointer;
	box-shadow: none;
	transition: transform 0.15s, border-color 0.15s;
}

.oe-speaker-icon:hover {
	transform: scale(1.06);
	border-color: #fff;
}

.oe-speaker-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.oe-speaker-icon__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-weight: 700;
	font-size: 0.85rem;
	color: #fff;
}

.oe-session__sponsors {
	justify-self: end;
	text-align: right;
	min-width: 0;
	padding-top: 0.15rem;
}

.oe-session__sponsor-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(5.25rem, 1fr));
	gap: 0.65rem;
	justify-items: end;
	max-width: 16rem;
}

.oe-session__sponsor {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
}

.oe-session__sponsor-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

.oe-session__sponsor-link:hover .oe-session__sponsor-logo,
.oe-session__sponsor-link:focus-visible .oe-session__sponsor-logo {
	background: rgba(255, 255, 255, 0.22);
}

.oe-session__sponsor-logo {
	width: 72px;
	height: 50px;
	object-fit: contain;
	display: block;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 0.4rem;
	padding: 0.25rem;
}

.oe-session__sponsor-name {
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
	line-height: 1.25;
	text-align: center;
}

.oe-session__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.65rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	text-decoration: none;
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.oe-session__more:hover,
.oe-session__more:focus-visible {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translate(1px, -1px);
}

.oe-program .oe-empty {
	color: var(--oe-muted);
}

/* —— Speakers grid (photo + flip bio) —— */
.oe-speakers__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--oe-cols, 3), minmax(0, 1fr));
	gap: 1rem;
}

.oe-speakers__item {
	margin: 0;
}

.oe-speakers__card {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	perspective: 1200px;
	outline: none;
}

.oe-speakers__inner {
	position: relative;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.oe-speakers__card.is-flipped .oe-speakers__inner {
	transform: rotateY(180deg);
}

@media (hover: hover) and (pointer: fine) {
	.oe-speakers__card:hover .oe-speakers__inner {
		transform: rotateY(180deg);
	}

	.oe-speakers__card:hover.is-flipped .oe-speakers__inner {
		transform: rotateY(0deg);
	}
}

.oe-speakers__face {
	position: absolute;
	inset: 0;
	border-radius: var(--oe-radius);
	overflow: hidden;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transform: translateZ(0);
	-webkit-font-smoothing: antialiased;
}

.oe-speakers__face--front {
	background: #3a3a3a;
	transform: rotateY(0deg) translateZ(0);
}

.oe-speakers__face--back {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.5rem 1.35rem;
	background: var(--oe-accent);
	color: #fff;
	transform: rotateY(180deg) translateZ(0);
}

.oe-speakers__photo {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: 0;
	overflow: hidden;
	background: #3a3a3a;
}

.oe-speakers__photo img,
.oe-speakers__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	/* Avoid soft blur from 3D/composited layers */
	transform: translateZ(0);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.oe-speakers__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 3.5rem;
	font-weight: 700;
	color: #fff;
	background: #4b5563;
}

.oe-speakers__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 3.5rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
	text-align: left;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
	color: #fff;
	pointer-events: none;
}

.oe-speakers__flip {
	appearance: none;
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 3;
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.oe-speakers__flip--back {
	position: static;
	margin-left: auto;
	background: rgba(255, 255, 255, 0.22);
}

.oe-speakers__flip:active {
	transform: scale(0.94);
}

.oe-speakers__name {
	display: block;
	font-weight: 700;
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
}

.oe-speakers__role {
	display: block;
	font-size: clamp(0.8rem, 1.2vw, 0.92rem);
	font-weight: 400;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.92);
}

.oe-speakers__back-top {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.oe-speakers__bio {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #fff;
	display: -webkit-box;
	-webkit-line-clamp: 8;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.oe-speakers__social {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: auto;
}

.oe-speakers__social-link {
	display: inline-flex;
	color: #fff;
	opacity: 0.95;
	transition: opacity 0.15s;
}

.oe-speakers__social-link:hover {
	opacity: 0.7;
}

.oe-speakers__linkedin {
	display: none;
}

@media (max-width: 900px) {
	.oe-speakers__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.65rem;
	}

	.oe-speakers__card {
		aspect-ratio: 3 / 3.55;
	}

	.oe-speakers__face {
		border-radius: 18px;
	}

	.oe-speakers__face--back {
		padding: 0.85rem 0.75rem 0.75rem;
		gap: 0.45rem;
	}

	.oe-speakers__overlay {
		padding: 2rem 0.7rem 0.7rem;
		gap: 0.15rem;
	}

	.oe-speakers__name {
		font-size: 0.78rem;
		letter-spacing: 0.01em;
	}

	.oe-speakers__role {
		font-size: 0.68rem;
		line-height: 1.25;
	}

	.oe-speakers__bio {
		font-size: 0.7rem;
		line-height: 1.35;
		-webkit-line-clamp: 5;
	}

	.oe-speakers__flip {
		display: inline-flex;
		top: 0.45rem;
		right: 0.45rem;
		width: 2rem;
		height: 2rem;
	}

	.oe-speakers__flip svg {
		width: 15px;
		height: 15px;
	}

	.oe-speakers__social {
		gap: 0.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.oe-speakers__inner {
		transition: none;
	}
}

/* —— Modal —— */
.oe-modal[hidden] {
	display: none !important;
}

.oe-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.oe-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.oe-modal__dialog {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: var(--oe-radius);
	max-width: 640px;
	width: 100%;
	max-height: min(90vh, 720px);
	overflow: auto;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	padding: 1.5rem;
	outline: none;
}

.oe-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.85rem;
	appearance: none;
	border: 0;
	background: transparent;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: var(--oe-muted);
}

.oe-modal__layout {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 1.25rem;
	align-items: start;
}

.oe-modal__photo {
	width: 160px;
	height: 160px;
	border-radius: var(--oe-radius);
	overflow: hidden;
	background: #e5e7eb;
}

.oe-modal__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.oe-modal__photo-ph {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	font-weight: 700;
	color: var(--oe-accent-dark);
}

.oe-modal__name {
	margin: 0 0 0.25rem;
	font-size: 1.4rem;
	padding-right: 1.5rem;
}

.oe-modal__role {
	margin: 0 0 1rem;
	color: var(--oe-muted);
	font-size: 0.95rem;
}

.oe-modal__bio {
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--oe-text);
}

.oe-modal__bio p {
	margin: 0 0 0.75rem;
}

.oe-modal__linkedin {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 1rem;
	color: #0a66c2;
	font-weight: 600;
	text-decoration: none;
}

.oe-modal__linkedin[hidden] {
	display: none !important;
}

.oe-empty {
	text-align: center;
	color: var(--oe-muted);
	padding: 2rem 1rem;
}

body.oe-modal-open {
	overflow: hidden;
}

@media (max-width: 800px) {
	.oe-day__bar {
		padding: 0.85rem 1.15rem;
		flex-direction: column;
		align-items: flex-start;
	}

	.oe-day__tags {
		justify-content: flex-start;
		width: 100%;
	}

	.oe-day__panel {
		padding: 0 1.15rem 0.25rem;
	}

	.oe-session {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"time"
			"title"
			"speakers"
			"sponsors";
		gap: 0.5rem;
		padding: 0.9rem 0.75rem;
		margin: 0 -0.75rem;
	}

	.oe-session__time {
		grid-area: time;
		font-size: 0.8rem;
		padding-top: 0;
	}

	.oe-session__title-wrap {
		grid-area: title;
	}

	.oe-session__tags {
		margin-bottom: 0.4rem;
	}

	.oe-session__title {
		font-size: 0.8rem;
	}

	.oe-session__body {
		font-size: 0.8rem;
		margin-top: 0.35rem;
	}

	.oe-session__speakers {
		grid-area: speakers;
		justify-self: start;
		padding-top: 0;
	}

	.oe-session__avatars {
		justify-content: flex-start;
	}

	.oe-session__sponsors {
		grid-area: sponsors;
		justify-self: start;
		text-align: left;
		padding-top: 0;
	}

	.oe-session__sponsor-grid {
		justify-items: start;
		max-width: none;
	}

	.oe-speaker-icon {
		width: 32px;
		height: 32px;
	}
}

@media (max-width: 640px) {
	.oe-modal__layout {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}

	.oe-modal__linkedin {
		justify-content: center;
	}
}
