/* PitchMates homepage. Colours are UITheme's; panels and buttons are the menu's own
   Blender kit pieces as 9-slices, with UITheme's slice margins (top right bottom left).
   The panel's corners are cut wider than PANEL_SLICE so its green corner tick stays
   in the corner instead of stretching along wide panels. */

@font-face {
	font-family: "PitchMates Block";
	src: url("fonts/pitchmates_block_heavy.ttf") format("truetype");
	font-display: swap;
}

:root {
	--bg: #0a121d;
	--bg-2: #0f1b2b;
	--panel: #132236;
	--panel-2: #1a2d47;
	--line: #2a4670;
	--accent: #3ee07f;
	--accent-dark: #1c9f55;
	--gold: #ffd24a;
	--text: #eaf1fb;
	--muted: #8ea3c0;
	--ink: #06210f;
	--red: #e8263a;
	--blue: #1d6bff;
	--common: #a7b0b8;
	--rare: #4f9be8;
	--epic: #a064f0;
	--legendary: #f2c14e;
	--discord: #5865f2;
	--twitch: #9146ff;
	--block: "PitchMates Block", "Bahnschrift", "Arial Black", sans-serif;
	--body: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
	--wide: 1180px;
	color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.55 var(--body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .block {
	font-family: var(--block);
	font-weight: normal;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1.05;
	margin: 0;
}

h2 { font-size: clamp(34px, 5vw, 56px); }
h3 { font-size: 22px; }

.wrap { width: min(var(--wide), 100% - 32px); margin-inline: auto; }

.kicker {
	display: inline-block;
	font: 15px var(--block);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--accent);
	margin-bottom: 10px;
}

.lead { color: var(--muted); font-size: 19px; max-width: 640px; margin: 14px 0 0; }

/* --- kit pieces ----------------------------------------------------------------- */

.slab {
	border-style: solid;
	border-width: 0;
	border-image: url("img/kit_panel.webp") 80 26 28 96 fill / 80px 26px 28px 96px;
	padding: 34px 32px 32px 42px;
}

.well {
	border-style: solid;
	border-width: 0;
	border-image: url("img/kit_inset.webp") 12 fill / 12px;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border-style: solid;
	border-width: 0;
	/* Cut through the middle, at half size: the art's rim highlight then keeps its shape
	   instead of being squashed into a short middle strip. */
	border-image: url("img/kit_btn_slate_normal.webp") 57 30 57 30 fill / 28px 15px 28px 15px;
	height: 56px;
	padding: 0 30px 7px;
	color: var(--text);
	font: 19px var(--block);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
	cursor: pointer;
}
.btn:hover { border-image-source: url("img/kit_btn_slate_hover.webp"); text-decoration: none; }
.btn:active { border-image-source: url("img/kit_btn_slate_pressed.webp"); padding: 3px 30px 4px; }

.btn.green { border-image-source: url("img/kit_btn_green_normal.webp"); color: var(--ink); }
.btn.green:hover { border-image-source: url("img/kit_btn_green_hover.webp"); }
.btn.green:active { border-image-source: url("img/kit_btn_green_pressed.webp"); }

.btn.blue { border-image-source: url("img/kit_btn_blue_normal.webp"); }
.btn.blue:hover { border-image-source: url("img/kit_btn_blue_hover.webp"); }
.btn.blue:active { border-image-source: url("img/kit_btn_blue_pressed.webp"); }

.btn.soon { cursor: default; }
.btn.soon:hover, .btn.soon:active { border-image-source: url("img/kit_btn_green_normal.webp"); }

.btn small {
	font: 12px var(--body);
	font-weight: 700;
	letter-spacing: 0.06em;
	opacity: 0.75;
}

/* --- header --------------------------------------------------------------------- */

.top {
	position: fixed;
	inset: 0 0 auto;
	z-index: 10;
	transition: background 0.25s, box-shadow 0.25s;
}
.top.solid { background: rgba(10, 18, 29, 0.92); box-shadow: 0 1px 0 rgba(42, 70, 112, 0.7); backdrop-filter: blur(8px); }

.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.top .mark { flex: none; }
.top .mark img { width: 150px; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { white-space: nowrap; color: var(--text); font: 15px var(--block); text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.top nav a:hover { color: var(--accent); opacity: 1; text-decoration: none; }

.pill {
	font: 13px var(--block);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink);
	background: var(--accent);
	border-radius: 99px;
	padding: 7px 14px 6px;
	white-space: nowrap;
	box-shadow: 0 3px 0 var(--accent-dark);
}
.pill.discord { background: var(--discord); color: #fff; box-shadow: 0 3px 0 #3c45a5; margin-right: -16px; }
.pill.discord:hover { text-decoration: none; filter: brightness(1.1); }

/* --- hero ----------------------------------------------------------------------- */

.hero {
	position: relative;
	min-height: min(92vh, 900px);
	display: grid;
	align-items: end;
	padding: 120px 0 72px;
	background: var(--bg) url("img/hero.webp") center 30% / cover no-repeat;
	isolation: isolate;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(10, 18, 29, 0.92) 0%, rgba(10, 18, 29, 0.55) 45%, rgba(10, 18, 29, 0) 75%),
		linear-gradient(0deg, var(--bg) 0%, rgba(10, 18, 29, 0) 40%);
}

.hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero .logo { width: min(640px, 100%); filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55)); margin-left: -10px; }

.slogan {
	font: clamp(22px, 3vw, 30px) var(--block);
	text-transform: uppercase;
	color: var(--text);
	margin: 18px 0 6px;
	min-height: 1.2em;
	transition: opacity 0.4s;
}
.slogan.fade { opacity: 0; }

.hero p.lead { margin-top: 6px; color: #c9d6e8; }

.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.chips li {
	font-size: 14px;
	font-weight: 700;
	color: var(--muted);
	background: rgba(19, 34, 54, 0.8);
	border: 1px solid var(--line);
	border-radius: 99px;
	padding: 6px 14px;
}
.chips li::before { content: "\25CF"; color: var(--accent); margin-right: 8px; font-size: 10px; vertical-align: 2px; }

/* Discord and Twitch, right under the hero's buttons */
.integrations { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.intg {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px 10px 10px;
	border-radius: 14px;
	background: rgba(19, 34, 54, 0.85);
	border: 1px solid var(--line);
	color: var(--text);
	transition: border-color 0.2s, transform 0.2s;
}
.intg:hover { text-decoration: none; transform: translateY(-2px); }
.intg.discord:hover { border-color: var(--discord); }
.intg.twitch:hover { border-color: var(--twitch); }
.intg b { display: block; font: 14px var(--block); text-transform: uppercase; letter-spacing: 0.04em; }
.intg small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; max-width: 230px; }
.intg.twitch b { color: #c9a8ff; }

.tag {
	font: 14px var(--block);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
	border-radius: 9px;
	padding: 8px 11px 7px;
	flex: none;
}
.discord .tag, .tag.discord { background: var(--discord); }
.twitch .tag, .tag.twitch { background: var(--twitch); }

.twitch-card { display: flex; gap: 14px; align-items: center; margin-top: 24px; padding: 16px 18px; }
.twitch-card p { margin: 0; color: var(--muted); font-size: 15px; }
.twitch-card b { color: var(--text); }

/* --- sections ------------------------------------------------------------------- */

section { padding: 96px 0; }
section.alt { background: var(--bg-2); }
.head { margin-bottom: 40px; }
.head.center { text-align: center; }
.head.center .lead { margin-inline: auto; }

/* trailer */
.trailer { padding-top: 40px; }
.player {
	position: relative;
	max-width: 1060px;
	margin: 0 auto;
	border-radius: 18px;
	overflow: hidden;
	border: 2px solid var(--line);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(62, 224, 127, 0.06);
	background: #000;
}
.player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.player .play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	border: 0;
	padding: 0;
	cursor: pointer;
	background: radial-gradient(circle, rgba(10, 18, 29, 0.1), rgba(10, 18, 29, 0.55));
}
.player .play span {
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 6px 0 var(--accent-dark), 0 12px 40px rgba(62, 224, 127, 0.45);
	transition: transform 0.2s;
	position: relative;
}
.player .play span::after {
	content: "";
	position: absolute;
	left: 40px;
	top: 30px;
	border-style: solid;
	border-width: 22px 0 22px 36px;
	border-color: transparent transparent transparent var(--ink);
}
.player .play:hover span { transform: scale(1.08); }
.player.playing .play { display: none; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature img { border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 18px; }
.feature p { color: var(--muted); margin: 10px 0 0; }

.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; margin-top: 22px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.gallery img:first-child { grid-row: span 2; }

/* modes */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: var(--panel);
	border: 2px solid var(--line);
	transition: transform 0.2s, border-color 0.2s;
}
.mode:hover { transform: translateY(-4px); border-color: var(--accent); }
.mode img { aspect-ratio: 1200 / 520; object-fit: cover; width: 100%; }
.mode div { padding: 16px 20px 20px; }
.mode p { color: var(--muted); margin: 8px 0 0; font-size: 16px; }
.mode .tag { position: absolute; top: 12px; right: 12px; }

/* ranks */
.ladder {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 8px;
	margin-top: 48px;
	padding: 26px 22px 20px;
	align-items: end;
}
.rank { text-align: center; }
.rank img { width: 100%; max-width: 92px; margin: 0 auto 8px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.rank:nth-child(1) img { max-width: 64px; }
.rank:nth-child(2) img { max-width: 68px; }
.rank:nth-child(3) img { max-width: 72px; }
.rank:nth-child(4) img { max-width: 76px; }
.rank:nth-child(5) img { max-width: 80px; }
.rank:nth-child(6) img { max-width: 84px; }
.rank:nth-child(7) img { max-width: 88px; }
.rank span { font: 13px var(--block); text-transform: uppercase; letter-spacing: 0.04em; }

/* worlds */
.worlds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
figure { margin: 0; }
.world { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.world img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform 0.3s; }
.world:hover img { transform: scale(1.06); }
.world figcaption {
	position: absolute;
	inset: auto 0 0;
	padding: 18px 12px 8px;
	font: 14px var(--block);
	text-transform: uppercase;
	background: linear-gradient(0deg, rgba(10, 18, 29, 0.9), rgba(10, 18, 29, 0));
}
.more-worlds { text-align: center; color: var(--muted); margin-top: 22px; font-size: 18px; }
.more-worlds b { color: var(--text); }

/* locker */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 34px; }
.slot { padding: 30px 20px 24px 40px; }
.slot b { display: block; font: 40px var(--block); color: var(--accent); }
.slot span { color: var(--muted); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.item {
	text-align: center;
	padding: 10px 6px 10px;
	border-radius: 12px;
	background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%), var(--panel);
	border: 2px solid color-mix(in srgb, var(--rc) 55%, transparent);
}
.item img { width: 90px; margin: 0 auto 4px; }
.item figcaption { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.r-common { --rc: var(--common); }
.r-rare { --rc: var(--rare); }
.r-epic { --rc: var(--epic); }
.r-legendary { --rc: var(--legendary); }

.goals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 44px; }
.shot { position: relative; border-radius: 12px; overflow: hidden; border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent); }
.shot img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.shot figcaption {
	position: absolute;
	inset: auto 0 0;
	padding: 18px 12px 8px;
	font: 14px var(--block);
	text-transform: uppercase;
	color: var(--rc);
	background: linear-gradient(0deg, rgba(10, 18, 29, 0.92), rgba(10, 18, 29, 0));
}

.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.promise div { padding: 18px 20px; }
.promise b { display: block; font: 18px var(--block); text-transform: uppercase; margin-bottom: 4px; }
.promise p { margin: 0; color: var(--muted); font-size: 15px; }

/* discord */
.community { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.feed { padding: 30px 28px 26px 40px; font-size: 15px; }
.msg { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 10px 0; }
.msg + .msg { border-top: 1px solid rgba(42, 70, 112, 0.5); }
.msg .av { width: 40px; height: 40px; border-radius: 50%; background: var(--panel-2) url("favicon.png") center / 78% no-repeat; border: 2px solid var(--accent); }
.msg b { font-size: 15px; }
.msg b em { font-style: normal; font-size: 11px; background: #5865f2; color: #fff; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }
.msg p { margin: 2px 0 0; color: #dbe4f0; }

/* tifo band */
.tifo {
	padding: 120px 0;
	text-align: center;
	background: linear-gradient(0deg, rgba(10, 18, 29, 0.75), rgba(10, 18, 29, 0.75)), url("img/tifo.webp") center / cover;
}
.tifo h2 { font-size: clamp(36px, 6vw, 72px); }
.tifo .cta { justify-content: center; }

/* news */
.newsgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.news time { font-size: 14px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.news h3 { margin: 6px 0 10px; }
.news ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 16px; }
.news li + li { margin-top: 6px; }
.news .more { display: inline-block; margin-top: 12px; font-weight: 700; }
.all-news { text-align: center; margin-top: 34px; }

.page { padding-top: 120px; }
.page .newsgrid { grid-template-columns: 1fr; max-width: 820px; margin-inline: auto; }
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { font-size: 40px; margin-bottom: 20px; }
.prose h3 { margin: 30px 0 8px; }
.prose p, .prose li { color: #c9d6e8; }

/* footer */
footer { padding: 46px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; }
footer img { width: 130px; }
footer nav { display: flex; gap: 20px; margin-left: auto; }
footer nav a { color: var(--muted); }

/* --- small screens -------------------------------------------------------------- */

/* The nav needs about 1100px next to the logo and both pills. */
@media (max-width: 1120px) {
	.top nav { display: none; }
	.top .pill.discord { margin-left: auto; }
}

@media (max-width: 980px) {
	.features, .modes { grid-template-columns: 1fr 1fr; }
	.worlds { grid-template-columns: repeat(2, 1fr); }
	.goals, .slots { grid-template-columns: repeat(2, 1fr); }
	.ladder { grid-template-columns: repeat(4, 1fr); row-gap: 22px; }
	.community { grid-template-columns: 1fr; }
	.promise { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.lead { font-size: 17px; }
	.items { grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.player .play span { transform: scale(0.7); }
	.trailer { padding-top: 20px; }
	.item img { width: 70px; }
	.item figcaption { font-size: 12px; }
	section { padding: 68px 0; }
	.features, .modes, .newsgrid { grid-template-columns: 1fr; }
	.gallery { grid-template-columns: 1fr; grid-template-rows: none; }
	.gallery img:first-child { grid-row: auto; }
	.hero { min-height: 88vh; background-position: 62% 30%; padding-bottom: 48px; }
	.hero::before { background: linear-gradient(0deg, var(--bg) 8%, rgba(10, 18, 29, 0.55) 60%, rgba(10, 18, 29, 0.35) 100%); }
	.btn { font-size: 17px; padding: 0 22px 7px; }
	/* Smaller corners on phones, so narrow panels don't look puffed up. */
	.slab { border-image-width: 52px 17px 18px 62px; padding: 26px 20px 22px 30px; }
	.top .mark img { width: 120px; }
	/* Only room for one pill next to the logo; Steam is right below in the hero. */
	.top .pill:not(.discord) { display: none; }
	.top .pill.discord { margin-right: 0; }
	footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}
