/* BoxManager homepage (logged-out landing). Loads theme.css, not style.css. */

/* Colours, fonts and the light and dark themes are in theme.css. */

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

html { scroll-behavior: smooth; }

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

/* The gym photo behind everything, under an overlay that follows the theme.
   A fixed layer rather than background-attachment: fixed, which phones ignore. */
body.bm-home::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background: var(--bm-overlay), url("/images/background_main.jpg") center / cover no-repeat;
}

.bm-home a { color: inherit; }
.bm-home img { max-width: 100%; }
.bm-home h1, .bm-home h2, .bm-home h3 { font-family: var(--bm-font-head); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.01em; }

.bm-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.bm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid transparent;
	font: 600 15px/1.2 var(--bm-font-body);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
	white-space: nowrap;
}
.bm-btn:hover { transform: translateY(-1px); }
.bm-btn:focus-visible, .bm-home input:focus-visible, .bm-home a:focus-visible, .bm-theme-toggle:focus-visible { outline: 2px solid var(--bm-blue); outline-offset: 2px; }
.bm-home .bm-btn-primary { background: var(--bm-red); color: #fff; }
.bm-home .bm-btn-primary:hover { background: var(--bm-red-dark); }
.bm-home .bm-btn-secondary { background: var(--bm-blue); color: #fff; }
.bm-home .bm-btn-secondary:hover { background: var(--bm-blue-dark); }
.bm-btn-ghost { background: transparent; border-color: var(--bm-line); color: var(--bm-text); }
.bm-btn-ghost:hover { border-color: var(--bm-blue); }
.bm-btn-large { padding: 14px 24px; font-size: 16px; }
.bm-btn-block { width: 100%; padding: 13px 18px; margin-top: 8px; }
.bm-chevron { flex: none; }

/* Top bar */
.bm-topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--bm-topbar);
	backdrop-filter: blur(10px);
}
.bm-topbar::after { content: ""; display: block; height: 3px; background: var(--bm-stripe); }
.bm-topbar-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.bm-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.bm-wordmark { font: italic 800 26px/1 var(--bm-font-brand); letter-spacing: -0.01em; }
.bm-wordmark-box { color: var(--bm-red); }
.bm-wordmark-manager { color: var(--bm-blue); }
.bm-nav { display: flex; gap: 22px; margin-right: auto; }
.bm-nav a { color: var(--bm-muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.bm-nav a:hover { color: var(--bm-text); }
.bm-topbar-actions { display: flex; align-items: center; gap: 10px; }

.bm-theme-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0;
	border-radius: 50%;
	border: 1px solid var(--bm-line);
	background: transparent;
	color: var(--bm-text);
	cursor: pointer;
}
.bm-theme-toggle:hover { border-color: var(--bm-blue); }

/* Hero */
.bm-hero {
	position: relative;
	overflow: hidden;
	padding: 72px 0 64px;
	background:
		radial-gradient(55% 70% at 88% 35%, rgba(47, 111, 228, 0.28), transparent 70%),
		radial-gradient(50% 65% at 8% 5%, rgba(229, 55, 58, 0.26), transparent 70%);
}
.bm-hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.bm-eyebrow { margin: 0 0 14px; color: var(--bm-gold-text); font: 700 15px/1 var(--bm-font-head); letter-spacing: 0.14em; text-transform: uppercase; }
.bm-hero h1 { font-size: clamp(44px, 6.4vw, 78px); text-transform: uppercase; }
.bm-hero h1 .bm-red { color: var(--bm-red); }
.bm-hero h1 .bm-blue { color: var(--bm-blue); }
.bm-lead { margin: 22px 0 30px; color: var(--bm-muted); font-size: 18px; max-width: 34em; }
.bm-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cards: fanned so each side card's name and rating stay readable beside the middle one. */
.bm-hero-cards { position: relative; height: 400px; }
.bm-hero-cards .bm-card { position: absolute; width: 210px; }
.bm-hero-cards .bm-card:nth-child(1) { left: 50%; top: 60px; transform: translateX(-50%); z-index: 3; }
.bm-hero-cards .bm-card:nth-child(2) { left: 0; top: 0; transform: rotate(-7deg); z-index: 2; }
.bm-hero-cards .bm-card:nth-child(3) { right: 0; top: 0; transform: rotate(7deg); z-index: 1; }

.bm-card {
	--tier: var(--bm-silver);
	background: linear-gradient(160deg, var(--bm-surface-2), var(--bm-surface-solid) 60%);
	border: 1px solid var(--bm-line);
	border-top: 4px solid var(--tier);
	border-radius: var(--bm-radius);
	padding: 18px 18px 16px;
	box-shadow: var(--bm-card-shadow);
}
.bm-card-legend { --tier: var(--bm-tier-legend); box-shadow: 0 24px 60px color-mix(in srgb, var(--bm-tier-legend) 18%, transparent), var(--bm-card-shadow); }
.bm-card-champion { --tier: var(--bm-tier-champion); }
.bm-card-prospect { --tier: var(--bm-tier-prospect); }
.bm-card-standard { --tier: var(--bm-tier-silver); }
.bm-card-top { display: flex; align-items: baseline; justify-content: space-between; }
.bm-card-overall { font: 800 56px/0.9 var(--bm-font-head); }
/* Tier colour mixed with the text colour, so white and grey tiers stay readable in both themes. */
.bm-card-tier { color: color-mix(in srgb, var(--tier) 75%, var(--bm-text)); font: 700 14px/1 var(--bm-font-head); letter-spacing: 0.14em; text-transform: uppercase; }
.bm-card-name { margin-top: 12px; font: 700 28px/1 var(--bm-font-head); text-transform: uppercase; }
.bm-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--bm-muted); font-size: 13px; }
.bm-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--bm-line); }
.bm-card-stats div { text-align: center; }
.bm-card-stats dt { color: var(--bm-muted); font-size: 11px; letter-spacing: 0.08em; }
.bm-card-stats dd { margin: 0; font: 700 22px/1.1 var(--bm-font-head); }

/* Stats band */
.bm-stats { border-top: 1px solid var(--bm-line); border-bottom: 1px solid var(--bm-line); background: var(--bm-surface); }
.bm-stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.bm-stat { display: flex; flex-direction: column; align-items: center; padding: 26px 10px; }
.bm-stat + .bm-stat { border-left: 1px solid var(--bm-line); }
.bm-stat-value { display: flex; align-items: center; gap: 10px; font: 800 40px/1 var(--bm-font-head); }
.bm-stat-label { color: var(--bm-muted); font-size: 14px; margin-top: 6px; text-align: center; }
.bm-stat-label a { text-decoration: none; }
.bm-stat-label a:hover { color: var(--bm-text); text-decoration: underline; }
.bm-live { width: 10px; height: 10px; border-radius: 50%; background: var(--bm-green); box-shadow: 0 0 0 0 rgba(60, 207, 142, 0.6); animation: bm-pulse 2s infinite; }
@keyframes bm-pulse {
	0% { box-shadow: 0 0 0 0 rgba(60, 207, 142, 0.6); }
	70% { box-shadow: 0 0 0 10px rgba(60, 207, 142, 0); }
	100% { box-shadow: 0 0 0 0 rgba(60, 207, 142, 0); }
}

/* Section headings carry the red and blue stripe. */
.bm-steps h2, .bm-access h2 { text-transform: uppercase; }
.bm-steps h2 { font-size: 40px; }
.bm-steps h2::after, .bm-panel h2::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 12px; border-radius: 2px; background: var(--bm-stripe); }

/* Steps */
.bm-steps { padding: 80px 0; }
.bm-steps-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bm-steps-list li { background: var(--bm-surface); border: 1px solid var(--bm-line); border-radius: var(--bm-radius); padding: 26px; }
.bm-step-number {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%;
	background: rgba(229, 55, 58, 0.14); color: var(--bm-red);
	font: 800 20px/1 var(--bm-font-head);
}
.bm-steps-list li:nth-child(2) .bm-step-number { background: rgba(47, 111, 228, 0.16); color: var(--bm-blue); }
.bm-steps-list h3 { font-size: 26px; margin: 16px 0 8px; text-transform: uppercase; }
.bm-steps-list p { margin: 0; color: var(--bm-muted); }

/* Players online graph */
.bm-graph { padding: 56px 0 0; }
.bm-graph-card { background: var(--bm-surface); border: 1px solid var(--bm-line); border-radius: var(--bm-radius); padding: 22px 24px 16px; }
.bm-graph-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.bm-graph-head h2 { font-size: 30px; text-transform: uppercase; }
.bm-graph-note { color: var(--bm-muted); font-size: 14px; }
.bm-graph-svg { display: block; width: 100%; height: 140px; margin-top: 14px; overflow: visible; }
.bm-graph-area { fill: color-mix(in srgb, var(--bm-blue) 22%, transparent); }
.bm-graph-line { fill: none; stroke: var(--bm-blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.bm-graph-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--bm-muted); font-size: 13px; }

/* Join and log in: a band of its own, so it is the obvious next step. */
.bm-access {
	padding: 64px 0 90px;
	margin-bottom: 0;
	background:
		radial-gradient(45% 80% at 15% 50%, rgba(229, 55, 58, 0.16), transparent 70%),
		radial-gradient(45% 80% at 85% 50%, rgba(47, 111, 228, 0.18), transparent 70%);
	border-top: 1px solid var(--bm-line);
}
.bm-access-title { text-align: center; margin-bottom: 28px; }
.bm-access-title h2 { font-size: clamp(38px, 5vw, 56px); text-transform: uppercase; }
.bm-access-title h2::after { content: ""; display: block; width: 90px; height: 4px; margin: 14px auto 0; border-radius: 2px; background: var(--bm-stripe); }
.bm-access-title p { margin: 14px auto 0; max-width: 34em; color: var(--bm-muted); font-size: 17px; }
.bm-access-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bm-panel { background: var(--bm-surface-solid); border: 1px solid var(--bm-line); border-radius: var(--bm-radius); padding: 30px; scroll-margin-top: 90px; box-shadow: var(--bm-card-shadow); }
.bm-panel-join { border-top: 5px solid var(--bm-red); }
.bm-panel-login { border-top: 5px solid var(--bm-blue); }

/* Cookie notice (js/jquery.cookiebar.js) */
#cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px 16px; background: var(--bm-surface-solid); color: var(--bm-text); border-top: 1px solid var(--bm-line); text-align: center; font-size: 14px; }
#cookie-bar p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
#cookie-bar .cb-enable { display: inline-block; padding: 7px 16px; border-radius: 999px; background: var(--bm-red); color: #fff; font-weight: 600; text-decoration: none; }
#cookie-bar .cb-policy { color: var(--bm-muted); }
.bm-panel h2 { font-size: 34px; }
.bm-panel-lead { color: var(--bm-muted); margin: 12px 0 0; }
.bm-panel form { margin-top: 18px; }
.bm-panel label { display: block; font-size: 14px; font-weight: 500; margin: 14px 0 5px; }
.bm-panel input[type=text], .bm-panel input[type=email], .bm-panel input[type=password] {
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--bm-line);
	background: var(--bm-input);
	color: var(--bm-text);
	font: 400 16px/1.3 var(--bm-font-body);
}
.bm-panel input:focus { border-color: var(--bm-blue); }
.bm-panel .bm-check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--bm-muted); }
.bm-link { display: inline-block; margin-top: 14px; color: var(--bm-muted); font-size: 14px; }
.bm-link:hover { color: var(--bm-text); }

/* Messages from the login code (it uses .error, .success and .info) */
.bm-notice, .bm-panel .error, .bm-panel .success, .bm-panel .info { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.bm-notice-error, .bm-panel .error { background: rgba(229, 55, 58, 0.12); border: 1px solid rgba(229, 55, 58, 0.4); }
.bm-notice-success, .bm-panel .success { background: rgba(60, 207, 142, 0.12); border: 1px solid rgba(60, 207, 142, 0.4); }
.bm-panel .info { background: rgba(47, 111, 228, 0.12); border: 1px solid rgba(47, 111, 228, 0.4); }

/* Footer */
.bm-footer { border-top: 1px solid var(--bm-line); padding: 26px 0; color: var(--bm-muted); font-size: 14px; background: var(--bm-surface); }
.bm-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.bm-footer p { margin: 0; }
.bm-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.bm-footer a { text-decoration: none; }
.bm-footer a:hover { color: var(--bm-text); }

/* Tablet */
@media (max-width: 960px) {
	.bm-hero-inner { grid-template-columns: 1fr; gap: 40px; }
	.bm-hero { padding-top: 48px; }
	.bm-hero-cards { height: 380px; max-width: 560px; width: 100%; margin: 0 auto; }
	.bm-steps-list { grid-template-columns: 1fr; }
	.bm-stats-inner { grid-template-columns: repeat(2, 1fr); }
	.bm-stat:nth-child(3) { border-left: 0; }
	.bm-stat:nth-child(n+3) { border-top: 1px solid var(--bm-line); }
}

/* Phone */
@media (max-width: 640px) {
	.bm-wrap { padding: 0 16px; }
	/* The tagline takes three lines, one phrase each. */
	.bm-hero h1 .bm-line { display: block; white-space: nowrap; }
	.bm-hero h1 { font-size: clamp(30px, 10.5vw, 52px); }
	.bm-nav { display: none; }
	.bm-topbar-inner { justify-content: space-between; height: 60px; gap: 10px; }
	/* The wordmark stays; the top-bar Log in gives way (the hero has one). */
	.bm-wordmark { font-size: 21px; }
	.bm-brand img { width: 34px; height: 34px; }
	.bm-topbar-actions .bm-btn-ghost { display: none; }
	.bm-topbar-actions { gap: 8px; }
	.bm-theme-toggle { width: 36px; height: 36px; }
	.bm-btn { padding: 9px 14px; font-size: 14px; }
	.bm-btn-large { width: 100%; padding: 14px 20px; font-size: 16px; }
	.bm-lead { font-size: 16px; }
	/* One card on a phone: the legend, centred. */
	.bm-hero-cards { height: auto; display: flex; justify-content: center; }
	.bm-hero-cards .bm-card { position: static; width: 240px; transform: none !important; }
	.bm-hero-cards .bm-card:nth-child(n+2) { display: none; }
	.bm-stat { padding: 18px 4px; }
	.bm-stat-value { font-size: 28px; gap: 8px; }
	.bm-stat-label { font-size: 12px; line-height: 1.3; }
	.bm-steps { padding: 56px 0; }
	.bm-access-inner { grid-template-columns: 1fr; }
	.bm-panel { padding: 22px; }
	.bm-footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 370px) {
	.bm-wordmark { font-size: 18px; }
	.bm-brand img { width: 30px; height: 30px; }
	.bm-topbar-actions { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.bm-btn { transition: none; }
	.bm-btn:hover { transform: none; }
	.bm-live { animation: none; }
}

/* Version badge by the logo and the staging or local tag (same as css/site.css). */
.bm-version, .bm-env { align-self: center; padding: 2px 7px; border-radius: 999px; font: 800 10px/14px var(--bm-font-head); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.bm-version { color: #1a1205; background: var(--bm-gold); }
.bm-env { color: #fff; background: var(--bm-orange); }
.bm-version-foot { margin-left: 4px; padding: 1px 6px; border-radius: 999px; font-size: 11px; color: #1a1205; background: var(--bm-gold); }
@media (max-width: 420px) { .bm-brand { gap: 6px; min-width: 0; } .bm-version { padding: 1px 5px; font-size: 9px; } .bm-env { display: none; } }
@media (max-width: 480px) { .bm-brand { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 6px; row-gap: 1px; align-items: center; } .bm-brand img { grid-row: 1 / 3; } .bm-brand .bm-wordmark { grid-column: 2; grid-row: 1; line-height: 1; } .bm-brand .bm-version { grid-column: 2; grid-row: 2; justify-self: start; padding: 0 5px; font-size: 8px; line-height: 12px; } }
.bm-brand + .bm-env { text-decoration: none; }
.bm-brand, .bm-brand + .bm-env { flex-shrink: 0; } .bm-nav { min-width: 0; overflow: hidden; }
@media (max-width: 860px) { .bm-topbar-inner:has(.bm-env) .bm-nav { display: none; } .bm-topbar-inner:has(.bm-env) { justify-content: flex-start; } .bm-brand + .bm-env { margin-right: auto; } }
