/*
Theme Name: WMT Esports
Theme URI: https://wmt.gg
Author: WMT
Description: Professionelles eSports-Theme für WMT (Counter-Strike). Mit Custom Post Types für Spieler und Matches.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: wmt
*/

:root {
	--red: #E91A1E;
	--red-dark: #b81216;
	--black: #0B0B0B;
	--g900: #131313;
	--g800: #1a1a1a;
	--g700: #242424;
	--g600: #333;
	--g500: #555;
	--g400: #8a8a8a;
	--g300: #b5b5b5;
	--g100: #ececec;
	--white: #fff;
	--font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
	--font-head: "Barlow Condensed", "Oswald", "Arial Narrow", Impact, sans-serif;
	--max: 1280px;
	--header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
	margin: 0;
	background: var(--black);
	color: var(--g100);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
	font-family: var(--font-head);
	text-transform: uppercase;
	letter-spacing: .02em;
	line-height: 1.05;
	margin: 0 0 .5em;
	color: var(--white);
}
h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Buttons */
.btn {
	display: inline-block;
	padding: 14px 30px;
	font-family: var(--font-head);
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	background: var(--red);
	color: var(--white);
	border: 2px solid var(--red);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
	transition: background .2s, color .2s, border-color .2s;
	cursor: pointer;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--ghost { background: transparent; border-color: var(--g500); }
.btn--ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* Header */
.site-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 100;
	height: var(--header-h);
	background: rgba(11, 11, 11, .9);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--g700);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.site-logo { display: flex; align-items: center; }
.site-logo img { height: 42px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.main-nav a {
	display: block; padding: 10px 16px;
	font-family: var(--font-head); font-size: 1.1rem; font-weight: 600;
	letter-spacing: .08em; text-transform: uppercase; color: var(--g300);
	position: relative; transition: color .2s;
}
.main-nav a::after {
	content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px;
	background: var(--red); transform: scaleX(0); transition: transform .25s;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--white); }
.main-nav a:hover::after, .main-nav .current-menu-item > a::after { transform: scaleX(1); }

/* Mobile nav toggle (CSS only) */
.nav-check { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--white); margin: 6px 0; }

main { padding-top: var(--header-h); min-height: 70vh; }

/* Hero */
.hero {
	position: relative; min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; overflow: hidden;
	background: radial-gradient(ellipse at 78% 45%, rgba(233, 26, 30, .22), transparent 60%), var(--black);
	border-bottom: 1px solid var(--g700);
}
.hero::after {
	content: ""; position: absolute; right: -8%; top: -10%; width: 38%; height: 120%;
	background: var(--red); opacity: .08; transform: skewX(-18deg);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; padding-top: 70px; padding-bottom: 70px; }
.hero__eyebrow {
	display: inline-block; font-family: var(--font-head); font-weight: 700; letter-spacing: .25em;
	text-transform: uppercase; color: var(--red); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.8rem, 6vw, 5rem); line-height: .98; }
.hero h1 span { color: var(--red); }
.hero p { max-width: 520px; color: var(--g300); font-size: 1.1rem; margin-bottom: 32px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__side { display: flex; flex-direction: column; align-items: center; gap: 36px; }
.hero__side { align-items: flex-end; }
.hero__logo { width: min(36vw, 460px); filter: drop-shadow(0 0 60px rgba(233, 26, 30, .25)); }

.next-match {
	display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 380px; padding: 22px 24px;
	background: var(--g800); border: 1px solid var(--g700); border-left: 4px solid var(--red);
	transition: border-color .2s;
}
.next-match:hover { border-color: var(--red); }
.next-match__label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .2em; color: var(--red); font-weight: 700; font-size: .9rem; }
.next-match strong { font-family: var(--font-head); font-size: 1.8rem; text-transform: uppercase; color: var(--white); line-height: 1.1; }
.next-match em { color: var(--red); font-style: normal; }
.next-match__event, .next-match__date { color: var(--g400); font-size: .9rem; }

/* Sections */
.section { padding: 96px 0; }
.section--alt { background: var(--g900); border-top: 1px solid var(--g700); border-bottom: 1px solid var(--g700); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.section__head h2 { margin: 0; padding-left: 18px; border-left: 6px solid var(--red); }
.link-more { font-family: var(--font-head); letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--g300); transition: color .2s; }
.link-more:hover { color: var(--red); }

/* Matches */
.match-list { display: grid; gap: 12px; }
.match {
	display: grid; grid-template-columns: 150px 1fr auto 1fr 150px; align-items: center; gap: 20px;
	background: var(--g800); border: 1px solid var(--g700); border-left: 4px solid var(--g600);
	padding: 18px 24px; transition: border-color .2s, background .2s;
}
.match:hover { border-left-color: var(--red); background: var(--g700); }
.match--live { border-left-color: var(--red); }
.match__date { font-size: .85rem; color: var(--g400); text-transform: uppercase; letter-spacing: .05em; }
.match__event { font-size: .8rem; color: var(--g400); }
.match__team { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; text-transform: uppercase; }
.match__team--home { text-align: right; }
.match__score {
	font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; min-width: 90px; text-align: center;
	background: var(--black); padding: 4px 14px;
}
.match__score.win { color: #3ddc84; }
.match__score.loss { color: var(--red); }
.match__status { text-align: right; font-family: var(--font-head); letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--g400); }
.match--live .match__status { color: var(--red); }

/* Players */
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.player-card { position: relative; background: var(--g800); border: 1px solid var(--g700); overflow: hidden; aspect-ratio: 3/4; transition: border-color .25s; }
.player-card:hover { border-color: var(--red); }
.player-card::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s; z-index: 2; }
.player-card:hover::after { transform: scaleX(1); }
.player-card__img { position: absolute; inset: 0; background: linear-gradient(160deg, var(--g700), var(--g900)); }
.player-card__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); transition: filter .3s; }
.player-card:hover .player-card__img img { filter: none; }
.player-card__info {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 20px 20px;
	background: linear-gradient(transparent, rgba(11, 11, 11, .95));
}
.player-card__role { font-family: var(--font-head); color: var(--red); letter-spacing: .15em; text-transform: uppercase; font-weight: 700; font-size: .95rem; }
.player-card__name { font-family: var(--font-head); font-size: 2rem; font-weight: 800; text-transform: uppercase; line-height: 1; margin: 2px 0; }
.player-card__real { color: var(--g400); font-size: .85rem; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.news-card { background: var(--g800); border: 1px solid var(--g700); display: flex; flex-direction: column; transition: border-color .2s; }
.news-card:hover { border-color: var(--red); }
.news-card__img { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--g700), var(--g900)); overflow: hidden; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card__meta { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--red); font-weight: 600; }
.news-card h3 { margin: 0; }
.news-card p { margin: 0; color: var(--g400); font-size: .95rem; }

/* CTA */
.cta { background: var(--red); text-align: center; padding: 80px 0; }
.cta h2 { color: var(--white); }
.cta .btn { background: var(--black); border-color: var(--black); }
.cta .btn:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* Content pages */
.page-hero {
	position: relative; overflow: hidden; padding: 96px 0 64px;
	background: radial-gradient(ellipse at 85% 50%, rgba(233, 26, 30, .25), transparent 60%), linear-gradient(180deg, var(--g900), var(--black));
	border-bottom: 1px solid var(--g700);
}
.page-hero::before {
	content: ""; position: absolute; right: -6%; top: -20%; width: 34%; height: 140%;
	background: var(--red); opacity: .08; transform: skewX(-18deg);
}
.page-hero::after {
	content: ""; position: absolute; right: 6%; top: 50%; width: 300px; height: 150px; transform: translateY(-50%);
	background: url("assets/img/wmt_wht.svg") center / contain no-repeat; opacity: .07;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .container::before {
	content: ""; display: block; width: 64px; height: 4px; background: var(--red); margin-bottom: 22px;
}
.page-hero h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1; }
.page-hero .meta { color: var(--red); font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .22em; font-size: .95rem; margin-bottom: 14px; }
.entry { max-width: 820px; margin: 0 auto; padding: 64px 24px; }
.entry > * + * { margin-top: 1.2em; }
.entry a { color: var(--red); text-decoration: underline; }
.entry img { margin: 1.5em 0; }
.entry blockquote { border-left: 4px solid var(--red); margin-left: 0; padding-left: 20px; color: var(--g300); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination a, .pagination span { padding: 8px 16px; border: 1px solid var(--g600); }
.pagination .current { background: var(--red); border-color: var(--red); }

/* Single player */
.player-single { display: grid; grid-template-columns: 380px 1fr; gap: 48px; padding: 64px 0; align-items: start; }
.player-single__img { background: var(--g800); border-bottom: 4px solid var(--red); }
.player-single dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 24px 0; }
.player-single dt { color: var(--g400); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.player-single dd { margin: 0; font-weight: 600; }

/* Partners */
.partners { padding: 40px 0; border-bottom: 1px solid var(--g700); background: var(--g900); }
.partners__title { font-size: .95rem; letter-spacing: .25em; color: var(--g400); text-align: center; margin-bottom: 24px; font-weight: 600; }
.partners__list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 56px; }
.partner { display: flex; align-items: center; justify-content: center; height: 48px; opacity: .6; filter: grayscale(1); transition: opacity .2s, filter .2s; }
.partner:hover { opacity: 1; filter: none; }
.partner img { max-height: 48px; width: auto; max-width: 160px; object-fit: contain; }
.partner span { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--g300); }

/* Teams & games */
.game-badge { display: inline-block; padding: 2px 10px; background: var(--red); color: var(--white); font-family: var(--font-head); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.game-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.game-filter a { padding: 8px 20px; border: 1px solid var(--g600); font-family: var(--font-head); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--g300); transition: border-color .2s, color .2s, background .2s; }
.game-filter a:hover { border-color: var(--red); color: var(--white); }
.game-filter a.is-active { background: var(--red); border-color: var(--red); color: var(--white); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.team-card { background: var(--g800); border: 1px solid var(--g700); display: flex; flex-direction: column; transition: border-color .2s; }
.team-card:hover { border-color: var(--red); }
.team-card__img { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--g700), var(--g900)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.team-card__img img { width: 100%; height: 100%; object-fit: cover; }
.team-card__img img.team-card__fallback { width: 40%; height: auto; opacity: .85; object-fit: contain; }
.team-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.team-card__body h3 { margin: 0; }
.team-card__meta { display: flex; justify-content: space-between; width: 100%; color: var(--g400); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }

/* Scroll reveal (class added by assets/js/reveal.js, so content stays visible without JS) */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-visible { animation: wmt-reveal .7s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms) both; }
@keyframes wmt-reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* Live indicator, stream page */
.live-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(233, 26, 30, .6); animation: wmt-pulse 1.8s infinite; vertical-align: middle; }
@keyframes wmt-pulse { 70% { box-shadow: 0 0 0 8px rgba(233, 26, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(233, 26, 30, 0); } }
.main-nav .menu-live a { color: var(--white); }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.stream { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.stream__player, .stream__chat { background: #000; border: 1px solid var(--g700); }
.stream__player { aspect-ratio: 16/9; }
.stream iframe { width: 100%; height: 100%; border: 0; display: block; }
.stream__chat { min-height: 420px; }
.stream__info { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding: 18px 0; color: var(--g400); }
.stream__info strong { color: var(--white); font-family: var(--font-head); font-size: 1.3rem; text-transform: uppercase; }
.stream-tabs a { display: inline-flex; align-items: center; }
.stream-tabs a.is-active .live-dot { background: var(--white); }

/* Partner & Organisation pages */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.partner-card { background: var(--g800); border: 1px solid var(--g700); padding: 28px 24px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; transition: border-color .2s; }
a.partner-card:hover { border-color: var(--red); }
.partner-card__logo { height: 90px; display: flex; align-items: center; justify-content: center; width: 100%; }
.partner-card__logo img { max-height: 80px; width: auto; max-width: 100%; object-fit: contain; }
.partner-card__logo span { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; text-transform: uppercase; color: var(--g300); }
.partner-card h3 { margin: 0; font-size: 1.2rem; }
.partner-card__link, .member-card__link { font-family: var(--font-head); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--g400); font-size: .85rem; }
a.partner-card:hover .partner-card__link, .member-card__link:hover { color: var(--red); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.member-card { background: var(--g800); border: 1px solid var(--g700); transition: border-color .2s; }
.member-card:hover { border-color: var(--red); }
.member-card__img { aspect-ratio: 1; background: linear-gradient(135deg, var(--g700), var(--g900)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.member-card__img img { width: 100%; height: 100%; object-fit: cover; }
.member-card__img img.team-card__fallback { width: 45%; height: auto; opacity: .85; object-fit: contain; }
.member-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.member-card__body h3 { margin: 0; }

/* Footer */
.site-footer { background: var(--g900); border-top: 3px solid var(--red); padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid img { height: 130px; width: auto; max-width: none; margin-bottom: 20px; }
.footer-grid p { color: var(--g400); max-width: 360px; }
.footer-grid h4 { font-size: 1.1rem; color: var(--g300); letter-spacing: .15em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--g400); transition: color .2s; }
.footer-grid a:hover { color: var(--red); }
.footer-bottom a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid var(--g700); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--g500); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
	html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.main-nav {
		position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--black);
		border-bottom: 1px solid var(--g700); display: none; padding: 12px 24px 24px;
	}
	.nav-check:checked ~ .main-nav { display: block; }
	.main-nav ul { flex-direction: column; }
	.hero__inner { grid-template-columns: 1fr; }
	.hero__side { display: none; }
	.match { grid-template-columns: 1fr auto 1fr; }
	.match__date, .match__status { grid-column: 1 / -1; text-align: left; }
	.player-single { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.stream { grid-template-columns: 1fr; }
	.stream__chat { min-height: 480px; }
	.section { padding: 64px 0; }
}
