/*
 * Basketball City: tokens + page chrome (header, nav, footer).
 * Section styles live in the Popshap Core plugin and read these tokens.
 * Colors and fonts follow the signed-off homepage design (Home.jpg, eMagid).
 */

/* Outfit, hosted with the theme (was Google Fonts: one less server to wait for). SIL OFL, see assets/fonts/OFL.txt. */
@font-face {
	font-family: 'Outfit';
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url(../fonts/outfit-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Outfit';
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url(../fonts/outfit-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--ps-ink: #0f1115;
	--ps-paper: #ffffff;
	--ps-muted: #5b616b;
	--ps-accent: var(--ps-c-red, #e5422d);
	--ps-accent-dark: #c93522;
	--ps-navy: var(--ps-c-navy, #003466);
	--ps-on-accent: #ffffff;
	--ps-focus: #ffd166;
	--ps-container: 1520px;
	--ps-gutter: clamp(16px, 3vw, 40px);
	--ps-font-display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--ps-font-body: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--ps-paper);
	color: var(--ps-ink);
	font-family: var(--ps-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
/* Editor canvas uses the same body font. */
.editor-styles-wrapper { font-family: var(--ps-font-body); }

img, video { max-width: 100%; height: auto; }
a { color: var(--ps-accent-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ps-focus); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--ps-accent);
	color: #fff;
	font-weight: 700;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--ps-ink);
	color: #fff;
	transition: background-color 0.25s, box-shadow 0.25s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

/* The header runs wider than page content (logo ~105px from the edge in the design). */
.site-header .ps-container { max-width: 1790px; }

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 84px;
	padding-block: 10px;
}
.site-logo {
	flex: none;
	color: #fff;
	text-decoration: none;
	font-family: var(--ps-font-display);
	font-size: 1.75rem;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1;
}
.site-logo img { display: block; width: auto; height: 64px; transition: height 0.25s; }

.site-nav { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; margin: 0 auto; padding: 0; list-style: none; }
.site-nav__list a {
	display: block;
	padding: 10px 12px;
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	font-size: clamp(1rem, 0.55rem + 0.55vw, 1.25rem);
	border-radius: 6px;
	white-space: nowrap;
}
.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current-menu-ancestor > a { color: var(--ps-accent); }

/* Dropdowns (desktop). Figma 1116:645: black panel, red outline, 273px, red row for the current page. */
.site-nav__list li { position: relative; }
.site-nav__list .sub-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 20;
	width: 273px;
	margin: 0;
	padding: 0;
	list-style: none;
	background: #000;
	border: 1px solid var(--ps-c-red, #e5422d);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
/* Hover bridge so the menu stays open while the pointer moves down to it. */
.site-nav__list .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -11px; height: 11px; }
.site-nav__list .sub-menu .sub-menu { top: -1px; left: 100%; }
.site-nav__list .sub-menu .sub-menu::before { top: 0; bottom: 0; left: -8px; width: 8px; height: auto; right: auto; }
.site-nav__list li:hover > .sub-menu,
.site-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav__list .sub-menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 24px;
	border-radius: 0; /* Square red rows, as in Figma (top-level links keep their 6px). */
	white-space: normal;
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
}
.site-nav__list .sub-menu a:hover,
.site-nav__list .sub-menu a:focus-visible,
.site-nav__list .sub-menu .current-menu-item > a { background: var(--ps-c-red, #e5422d); color: #fff; }
.site-nav__list .sub-menu .menu-item-has-children > a::after {
	content: "";
	flex: none;
	border-left: 7px solid currentColor;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
}

/* The two pill buttons, stacked (Rent a Court / Digital Waiver). */
.site-nav__actions { flex: none; display: flex; flex-direction: column; gap: 6px; }
.header-btn {
	display: block;
	min-width: 250px;
	padding: 18px 24px;
	border-radius: 999px;
	color: #fff;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	transition: background-color 0.2s;
}
.header-btn--primary { background: var(--ps-accent); }
.header-btn--primary:hover { background: var(--ps-accent-dark); }
.header-btn--dark { background: rgba(255, 255, 255, 0.18); }
.header-btn--dark:hover { background: rgba(255, 255, 255, 0.3); }

/* Desktop + hero first: header floats see-through over the hero, turns solid once you scroll. */
@media (min-width: 1280px) {
	.has-hero-first .site-header { position: fixed; left: 0; right: 0; background: transparent; }
	.has-hero-first .site-logo img { height: 122px; }
	.has-hero-first .site-header__inner { min-height: 150px; padding-top: 40px; align-items: flex-start; }
	.has-hero-first .site-nav { align-self: center; }
	.has-hero-first .site-header.is-scrolled .site-header__inner { padding-top: 10px; align-items: center; }
	.has-hero-first .site-header.is-scrolled { background: rgb(15, 17, 21); box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25); }
	.has-hero-first .site-header.is-scrolled .site-logo img { height: 64px; }
	.has-hero-first .site-header.is-scrolled .site-nav__actions { flex-direction: row; }
	.has-hero-first .site-header.is-scrolled .header-btn { min-width: 0; padding: 12px 22px; }
	.has-hero-first .site-header.is-scrolled .site-header__inner { min-height: 84px; }
	.site-header__inner { transition: min-height 0.25s; }
}

.nav-toggle { display: none; }

/* Below 1280px: drawer from the left (as on the current site), buttons inside it. */
@media (max-width: 1279px) {
	.site-header__inner { justify-content: space-between; }
	.nav-toggle {
		display: inline-grid;
		place-items: center;
		width: 48px;
		height: 48px;
		padding: 0;
		border: 0;
		border-radius: 8px;
		background: transparent;
		cursor: pointer;
	}
	.nav-toggle__bars,
	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		display: block;
		width: 24px;
		height: 2px;
		background: #fff;
		content: "";
		position: relative;
		transition: transform 0.2s, background-color 0.2s;
	}
	.nav-toggle__bars::before { position: absolute; top: -7px; }
	.nav-toggle__bars::after { position: absolute; top: 7px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

	.site-nav {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 60;
		width: min(86vw, 360px);
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding: 96px 16px 32px;
		overflow-y: auto;
		background: var(--ps-ink);
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		visibility: hidden;
	}
	.site-nav.is-open { transform: none; visibility: visible; }
	.site-nav__list { flex-direction: column; flex-wrap: nowrap; margin: 0; }
	.site-nav__list a { padding: 13px 12px; font-size: 1.125rem; }
	.site-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		background: transparent;
		box-shadow: none;
		padding: 0 0 8px 12px;
	}
	.site-nav__list .sub-menu { width: auto; border: 0; }
	.site-nav__list .sub-menu::before,
	.site-nav__list .sub-menu .menu-item-has-children > a::after { display: none; }
	.site-nav__list .sub-menu a { color: rgba(255, 255, 255, 0.8); padding: 10px 12px; }
	.site-nav__actions { margin-top: 16px; }
	.header-btn { min-width: 0; padding-block: 14px; }

	.nav-backdrop {
		position: fixed;
		inset: 0;
		z-index: 55;
		background: rgba(0, 0, 0, 0.55);
	}
	.nav-open { overflow: hidden; }
	/* The sticky header is its own layer: lift it above the backdrop while the drawer is open. */
	.nav-open .site-header { z-index: 70; }
}

/* ---------- Footer ---------- */

/* Footer (Figma 1116:458): navy, 98px in from the top/left at 1920, columns 308px apart by 163px. */
.site-footer { background: var(--ps-c-navy, #003466); color: #fff; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:focus-visible { outline: 3px solid var(--ps-focus, #ffd166); outline-offset: 3px; }
.site-footer__inner {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 308px)) minmax(0, 311px);
	justify-content: space-between;
	gap: 48px clamp(32px, 8.49vw, 163px);
	max-width: 1724px;
	margin-inline: auto;
	padding: clamp(56px, 5.1vw, 98px) var(--ps-gutter, 24px) clamp(56px, 5.1vw, 98px);
	box-sizing: content-box;
}
.site-footer__col { display: flex; flex-direction: column; gap: 66px; }
.site-footer__group { display: flex; flex-direction: column; gap: 9px; }
.site-footer__contact { gap: 9px; }
.site-footer__heading { margin: 0; font-family: var(--ps-font-display); font-size: 1.375rem; font-weight: 600; line-height: 1.15; text-transform: uppercase; color: #fff; }
.site-footer__links { margin: 0; padding: 0; list-style: none; font-size: 1rem; line-height: 1.6; }
.site-footer__links address { font-style: normal; }
.site-footer__social { display: flex; gap: 15px; margin: 8px 0 0; padding: 0; list-style: none; }
.site-footer__icon { display: block; width: 20px; height: 20px; background: var(--ps-c-orange, #ff3c00); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.site-footer__icon:hover { filter: brightness(1.15); }
.site-footer__actions { gap: 13px; }
.site-footer__btn {
	display: flex; align-items: center; justify-content: center;
	padding: 21.333px 37.333px; border-radius: 99px;
	background: var(--ps-c-red, #e5422d); color: #fff;
	font-family: var(--ps-font-display); font-size: clamp(1.0625rem, 0.95rem + 0.3vw, 1.333rem); font-weight: 600; line-height: 1.15; text-transform: uppercase; text-align: center;
}
.site-footer a.site-footer__btn:hover { text-decoration: none; filter: brightness(0.92); }
.site-footer__legal { background: rgba(255, 255, 255, 0.1); padding: 3px var(--ps-gutter, 24px); text-align: center; font-size: 0.8125rem; line-height: 1.6; }
.site-footer__legal p { margin: 0; }
@media (max-width: 1199px) {
	.site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
	.site-footer__inner { grid-template-columns: minmax(0, 1fr); }
	.site-footer__col { gap: 40px; }
}

.site-main--plain { padding-block: 64px; }
