/* MM2026 — design tokens */
:root {
	--color-bg: #08080a;
	--color-surface: #1c1c21;
	--color-surface-2: #25252c;
	--color-text: #ffffff;
	--color-text-muted: #b8b8c0;
	--color-lime: #6fc529;
	--color-orange: #ff7900;
	--color-blue: #3d9fff;
	--font: "Montserrat", system-ui, sans-serif;
	--container: 1200px;
	--radius-lg: 20px;
	--radius-pill: 999px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

.container {
	width: min(100% - 2rem, var(--container));
	margin-inline: auto;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(8, 8, 10, 0.85);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* WordPress admin toolbar (sisselogitud kasutaja) */
body.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .site-header {
		top: var(--wp-admin--admin-bar--height, 46px);
	}
}

/* Avalehel läbipaistev päis video/taustapildi kohal */
body.home .site-header,
body.front-page .site-header {
	position: absolute;
	left: 0;
	right: 0;
	background: transparent;
	backdrop-filter: none;
	border-bottom: none;
}

body.home .site-main,
body.front-page .site-main {
	margin-top: 0;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 72px;
	gap: 1rem;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
	line-height: 0;
}

.site-brand__slash {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.site-brand img {
	display: block;
	height: clamp(28px, 4vw, 34px);
	width: auto;
	max-width: none;
}

.site-brand__mm,
.site-brand__coolbet {
	transition: opacity 0.2s;
}

.site-brand__mm:hover,
.site-brand__coolbet:hover {
	opacity: 0.85;
}

@media (max-width: 768px) {
	.site-brand img {
		height: 26px;
	}

	.site-brand__coolbet img {
		max-width: 140px;
	}
}

.site-nav__list {
	display: flex;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list a {
	font-family: "Roboto Flex", system-ui, sans-serif;
	font-size: 18px;
	font-weight: 400;
	color: #fff;
	text-transform: uppercase;
	transition: color 0.2s;
}

.site-nav__list a:hover {
	color: var(--color-lime);
}

.site-nav-toggle {
	display: none;
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
}

.site-nav-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	margin: 5px 0;
	background: var(--color-text);
}

/* Hero */
.hero {
	position: relative;
	overflow: visible;
}

/* Video / taustapildi riba (päise all) */
.hero__media {
	position: relative;
	height: clamp(220px, 32vw, 420px);
	overflow: hidden;
}

.hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-size: cover;
	background-position: center top;
	background-color: #111;
}

.hero__video {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
}

.hero__video-scale {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100vw;
	height: 56.25vw;
	min-width: 177.78vh;
	min-height: 100%;
	transform: translate(-50%, -50%);
}

.hero__video-iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.hero__media-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.85) 100%);
}

@media (prefers-reduced-motion: reduce) {
	.hero__video {
		display: none;
	}
}

/* Must tekstiplokk + mõmmi */
.hero__panel {
	position: relative;
	z-index: 3;
	background: var(--color-bg);
}

.hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
	align-items: end;
	gap: 1.5rem 2rem;
	padding-block: 2.5rem 1rem;
}

.hero__content {
	max-width: 720px;
	padding-bottom: 1.5rem;
}

.hero__ball {
	display: block;
	width: 48px;
	height: 48px;
	margin-bottom: 1.25rem;
}

.hero__title {
	margin: 0 0 1.25rem;
	font-family: "Montserrat", var(--font);
	font-size: 35px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--color-text);
}

.hero__dates {
	color: var(--color-lime);
}

.hero__text {
	margin: 0;
	max-width: 680px;
	font-family: "Roboto Flex", system-ui, sans-serif;
	font-size: 24px;
	font-weight: 300;
	line-height: 1.4;
	color: var(--color-text);
}

.hero__mascot {
	position: relative;
	align-self: end;
	justify-self: end;
	margin-bottom: -3.5rem;
	pointer-events: none;
	line-height: 0;
}

.hero__mascot::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 8%;
	width: 90%;
	height: 70%;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center, rgba(60, 60, 70, 0.55) 0%, transparent 72%);
	z-index: 0;
}

.hero__mascot img {
	position: relative;
	z-index: 1;
	width: min(520px, 100%);
	height: auto;
	max-height: 520px;
	object-fit: contain;
	object-position: bottom right;
}

/* Promo / registration */
.promo {
	position: relative;
	z-index: 4;
	padding-block: 4.5rem 4rem;
}

.promo-box {
	background: #1c1e22;
	border-radius: 16px;
	padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
	text-align: center;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.promo-box__text {
	margin: 0 0 2rem;
	font-family: "Roboto Flex", system-ui, sans-serif;
	font-size: 24px;
	font-weight: 300;
	line-height: 1.4;
	color: var(--color-text);
}

.promo-box__line {
	display: block;
}

.promo-box__text strong {
	color: var(--color-orange);
	font-weight: 700;
}

.register-form {
	max-width: 480px;
	margin: 0 auto;
}

.register-form__row {
	margin-bottom: 0;
}

.register-form__row--team {
	margin-bottom: 0;
}

.team-select {
	position: relative;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
}

.team-select select {
	appearance: none;
	width: 100%;
	padding: 0.9rem 3.75rem 0.9rem 1.5rem;
	font-family: "Roboto Flex", system-ui, sans-serif;
	font-size: 18px;
	font-weight: 300;
	color: var(--color-text);
	background: transparent;
	border: 1px solid var(--color-orange);
	border-radius: var(--radius-pill);
	cursor: pointer;
	text-align: left;
}

.team-select select:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.35);
}

.team-select select option {
	color: #000;
	background: #fff;
}

.team-select__chevron {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--color-orange);
	pointer-events: none;
}

.team-select__chevron::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 44%;
	width: 9px;
	height: 9px;
	border-right: 2px solid #000;
	border-bottom: 2px solid #000;
	transform: translate(-50%, -35%) rotate(45deg);
}

.register-form__fields {
	display: grid;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.register-form__fields[hidden] {
	display: none !important;
}

.register-form__fields input {
	width: 100%;
	padding: 0.9rem 1.25rem;
	font-family: "Roboto Flex", system-ui, sans-serif;
	font-size: 18px;
	font-weight: 300;
	color: var(--color-text);
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--radius-pill);
}

.register-form__fields input:focus {
	outline: 2px solid var(--color-lime);
	border-color: transparent;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 2rem;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	border: none;
	border-radius: var(--radius-pill);
	cursor: pointer;
	transition: transform 0.15s, opacity 0.15s;
}

.btn--primary {
	width: 100%;
	color: #000;
	background: var(--color-orange);
}

.btn--primary:hover {
	opacity: 0.9;
}

.btn--primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.register-form__message {
	min-height: 1.5rem;
	margin: 1rem 0 0;
	font-family: "Roboto Flex", system-ui, sans-serif;
	font-size: 16px;
	font-weight: 300;
}

.register-form__message.is-success {
	color: var(--color-lime);
}

.register-form__message.is-error {
	color: #ff6b6b;
}

.hp-field {
	position: absolute;
	left: -9999px;
	opacity: 0;
}

/* Team gallery */
.team-gallery {
	padding-block: 2rem 4rem;
}

.team-gallery__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1rem;
}

.team-card {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	aspect-ratio: 3 / 5;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}

.team-card:hover,
.team-card.is-selected {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(111, 197, 41, 0.15);
	outline: 2px solid var(--color-lime);
}

.team-card__image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-color: var(--color-surface-2);
}

.team-card__tag {
	position: absolute;
	left: 0.75rem;
	bottom: 0.75rem;
	margin: 0;
	font-size: 0.8rem;
	font-weight: 700;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.team-card__hash {
	color: var(--color-blue);
}

/* Subpages */
.subpage {
	padding: 3rem 0 5rem;
}

.subpage__header {
	margin-bottom: 2rem;
}

.subpage__header h1 {
	margin: 0 0 0.5rem;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.subpage__lead {
	margin: 0;
	color: var(--color-text-muted);
	max-width: 560px;
}

.schedule-placeholder,
.page-article__body {
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	padding: 2rem;
	color: var(--color-text-muted);
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.stats-card {
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	text-align: center;
}

.stats-card__label {
	display: block;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-text-muted);
	margin-bottom: 0.5rem;
}

.stats-card__value {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--color-lime);
}

.page-content {
	padding: 3rem 0;
}

.page-article__header h1 {
	margin-top: 0;
}

.site-footer {
	padding: 2rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	color: var(--color-text-muted);
	font-size: 0.85rem;
}

.site-footer__inner {
	text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
	.hero__inner {
		grid-template-columns: 1fr;
	}

	.hero__title {
		font-size: clamp(26px, 4vw, 35px);
	}

	.hero__text {
		font-size: clamp(18px, 2.5vw, 24px);
	}

	.hero__mascot {
		justify-self: center;
		margin-bottom: -2rem;
	}

	.hero__mascot img {
		max-height: 380px;
	}

	.team-gallery__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.site-nav {
		display: none;
	}

	.site-nav.is-open {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--color-bg);
		padding: 1rem;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}

	.site-nav.is-open .site-nav__list {
		flex-direction: column;
		gap: 1rem;
	}

	.site-nav-toggle {
		display: block;
	}

	.team-gallery__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.promo-box__text {
		font-size: clamp(18px, 4.5vw, 24px);
	}

	.team-select select {
		font-size: 16px;
	}

	.hero__media {
		height: 200px;
	}

	.hero__mascot {
		display: none;
	}

	.hero__title {
		font-size: 24px;
	}

	.hero__text {
		font-size: 18px;
	}
}

@media (max-width: 480px) {
	.team-gallery__grid {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		gap: 0.75rem;
		padding-bottom: 0.5rem;
		-webkit-overflow-scrolling: touch;
	}

	.team-card {
		flex: 0 0 70%;
		scroll-snap-align: start;
	}
}
