/*
Theme Name: BayPress Child
Theme URI: https://speedbay.com/
Description: First-party child theme for BayPress, the Speed Bay WordPress marketing site. Owns presentation concerns (templates, theme styles, typography, colors, brand CSS).
Author: Speed Bay
Author URI: https://speedbay.com/
Template: hello-elementor
Version: 0.1.0
License: Proprietary
License URI: https://speedbay.com/
Text Domain: baypress-child
*/

@font-face {
	font-display: swap;
	font-family: "Inter";
	font-style: normal;
	font-weight: 300 900;
	/* opsz=32 (Inter Display) instance of the Latin-subset InterVariable asset; ADR 010, BPRESS-479. */
	src: url("assets/fonts/inter/InterVariable-opsz32-roman.var.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-display: swap;
	font-family: "Speed Bay Group Display";
	font-style: normal;
	font-weight: 400;
	src: url("assets/fonts/speed-bay-group-display/SpeedBayGroupDisplay-roman.var.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * Speed Bay brand tokens derived from SB-BrandGuidelines-2026.
 * These CSS custom properties are the canonical Git-managed brand
 * implementation for BayPress. Elementor Global Colors and Fonts should
 * mirror these values for editor usability rather than redefine the brand.
 */
:root {
	/* Primary palette. */
	--sb-color-slate-blue: #70a6d9;
	--sb-color-indigo: #082442;
	--sb-color-rich-black: #000000;
	--sb-color-white: #ffffff;

	/* Secondary palette. */
	--sb-color-sky: #c3e7fd;
	--sb-color-frost: #eaedf2;
	--sb-color-brass: #c2a469;
	--sb-color-stone: #b3c0cc;
	--sb-color-royal: #2958a1;
	--sb-color-steel: #6a7a8c;

	/* Data/information palette extensions. */
	--sb-color-dark-frost: #d3d7dd;
	--sb-color-gravel: #7f92a3;
	--sb-color-cool-steel: #4e6275;
	--sb-color-moss: #5f8f8a;
	--sb-color-muted-brass: #b3a37a;

	/* Typography. Inter is preferred; Helvetica is the brand fallback. */
	--sb-font-primary: "Inter", Helvetica, Arial, sans-serif;
	--sb-font-display: "Speed Bay Group Display", Georgia, "Times New Roman", serif;
	--sb-font-weight-light: 300;
	--sb-font-weight-regular: 400;
	--sb-font-weight-bold: 700;
	--sb-font-weight-black: 900;

	/* Base typography scale for Elementor and non-Elementor templates. */
	--sb-text-body-size: 1rem;
	--sb-text-body-line-height: 1.45;
	--sb-text-caption-size: 0.875rem;
	--sb-text-h1-size: clamp(2.75rem, 7vw, 5.5rem);
	--sb-text-h2-size: clamp(1.375rem, 3vw, 2.75rem);
	--sb-text-h3-size: clamp(1.25rem, 2vw, 2rem);

	/* Basic shape and focus tokens used by brand defaults. */
	--sb-radius-pill: 999px;
	--sb-focus-ring: 0 0 0 2px var(--sb-color-white), 0 0 0 4px var(--sb-color-indigo);

	/* Approved brand gradients: never use Rich Black or White as gradients. */
	--sb-gradient-indigo: linear-gradient(135deg, var(--sb-color-indigo) 0%, rgb(8 36 66 / 60%) 100%);
	--sb-gradient-slate-blue: linear-gradient(135deg, var(--sb-color-slate-blue) 0%, rgb(112 166 217 / 35%) 100%);
	--sb-gradient-indigo-to-slate: linear-gradient(135deg, var(--sb-color-indigo) 0%, var(--sb-color-indigo) 80%, var(--sb-color-slate-blue) 100%);
}

body {
	background: var(--sb-color-indigo);
	color: var(--sb-color-white);
	display: flex;
	flex-direction: column;
	font-family: var(--sb-font-primary);
	font-size: var(--sb-text-body-size);
	font-weight: var(--sb-font-weight-regular);
	line-height: var(--sb-text-body-line-height);
	min-height: 100dvh;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* The absolute header uses the initial containing block, so html margin-top does not move it. */
body.admin-bar .elementor-location-header > .e-con.e-parent {
	top: var(--wp-admin--admin-bar--height, 0px);
}

/* Protected forms need flow spacing beneath the absolute site header. */
.post-password-required .post-password-form {
	margin-top: 200px;
}

/* Theme Builder content wrappers vary, but the footer remains a direct body
   child and can absorb the slack without depending on the content element. */
body > footer {
	margin-top: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--sb-font-primary);
	font-weight: var(--sb-font-weight-bold);
	line-height: 1.05;
	text-transform: none;
}

h1 {
	font-size: var(--sb-text-h1-size);
}

h2 {
	color: var(--sb-color-slate-blue);
	font-size: var(--sb-text-h2-size);
}

h3 {
	font-size: var(--sb-text-h3-size);
}

p,
li {
	font-family: var(--sb-font-primary);
}

small,
figcaption,
.wp-caption-text {
	font-size: var(--sb-text-caption-size);
	font-style: italic;
	font-weight: var(--sb-font-weight-light);
}

a {
	color: var(--sb-color-slate-blue);
}

#breadcrumbs a {
	color: inherit;
	font-size: 14px;
	font-weight: var(--sb-font-weight-regular);
	/* Keep links recognizable independently of the surrounding text color. */
	text-decoration: underline;
	text-decoration-color: currentColor;
	text-underline-offset: 3px;
}

#breadcrumbs a:hover,
#breadcrumbs a:focus-visible {
	text-decoration-color: currentColor;
}

#breadcrumbs span {
	margin: 0 4px;
}

#breadcrumbs span:first-child {
	margin: 0 4px 0 0;
}

a:hover,
a:focus-visible {
	color: var(--sb-color-sky);
}

:where(a, button, input, textarea, select):focus-visible,
.elementor a:focus-visible {
	box-shadow: var(--sb-focus-ring);
	outline: 2px solid var(--sb-color-indigo);
	outline-offset: 2px;
}

/* Form controls do not inherit font by default; textarea falls back to monospace. */
input,
textarea,
select {
	font: inherit;
}

button,
input[type="button"],
input[type="submit"],
.wp-block-button__link,
.elementor-button {
	border-radius: var(--sb-radius-pill);
	font-family: var(--sb-font-primary);
	font-weight: var(--sb-font-weight-bold);
	text-transform: none;
}

/* Target-market map (BPRESS-472). Markup contract: README "Target-market map".
   Static SVG with HTML-overlay dots; the sibling .sb-markets list is the accessible content. */
.sb-map,
.sb-markets {
	--sb-map-transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sb-map {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: auto auto;
	position: relative;
	--sb-map-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sb-map > img {
	display: block;
	width: 100%;
	height: auto;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 900ms ease-out, transform 900ms ease-out;
}

.sb-map.is-in > img {
	opacity: 1;
	transform: none;
}

.sb-map__dot {
	/* Absolute grid items use the image row as their percentage containing block. */
	grid-area: 1 / 1 / 2 / 2;
	position: absolute;
	left: calc(var(--x) * 1%);
	top: calc(var(--y) * 1%);
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--sb-color-indigo);
	box-shadow: 0 0 0 3px var(--sb-color-white);
	transform: translate(-50%, -50%) scale(0);
	opacity: 0;
	transition: transform 520ms var(--sb-map-ease), opacity 520ms ease-out, background 160ms;
	transition-delay: calc(var(--i, 0) * 110ms), calc(var(--i, 0) * 110ms), 0ms;
}

.sb-map.is-in .sb-map__dot {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
}

.sb-map__dot::after {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 1.5px solid currentColor;
	color: var(--sb-color-indigo);
	opacity: 0;
	animation-delay: calc(var(--i, 0) * 110ms + 350ms);
}

.sb-map.is-in .sb-map__dot::after {
	animation-name: sb-map-ring;
	animation-duration: 1600ms;
	animation-timing-function: ease-out;
	animation-fill-mode: forwards;
}

.sb-map__dot--current {
	background: var(--sb-color-slate-blue);
}

.sb-map__dot--current::after {
	color: var(--sb-color-slate-blue);
}

.sb-map.is-in .sb-map__dot--current::after {
	animation-name: sb-map-pulse;
	animation-duration: 4s;
	animation-iteration-count: infinite;
	animation-fill-mode: none;
}

/* The pulse is infinite; stop paying for it while the map is off-screen. */
.sb-map:not(.is-visible) .sb-map__dot--current::after {
	animation-play-state: paused;
}

@keyframes sb-map-ring {
	0% { transform: scale(1); opacity: 0.7; }
	100% { transform: scale(3.2); opacity: 0; }
}

@keyframes sb-map-pulse {
	0% { transform: scale(1); opacity: 0.6; }
	45%, 100% { transform: scale(3); opacity: 0; }
}

.sb-map__label {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%) translateX(-4px);
	font: 500 12px/1 var(--sb-font-primary);
	letter-spacing: 0.02em;
	color: var(--sb-color-indigo);
	white-space: nowrap;
	background: var(--sb-color-white);
	box-shadow: 0 0 0 1px var(--sb-color-dark-frost);
	padding: 4px 8px;
	border-radius: 3px;
	opacity: 0;
	pointer-events: none;
	/* display:none while hidden so off-screen labels never widen the page on narrow viewports;
	   allow-discrete + @starting-style keep the fade/slide in browsers that support them. */
	display: none;
	transition: opacity var(--sb-map-transition), transform var(--sb-map-transition), display var(--sb-map-transition) allow-discrete;
}

.sb-map__dot--left .sb-map__label {
	left: auto;
	right: 18px;
	transform: translateY(-50%) translateX(4px);
}

.sb-map__dot:hover .sb-map__label,
.sb-map__dot.is-hot .sb-map__label {
	display: block;
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

@starting-style {
	.sb-map__dot:hover .sb-map__label,
	.sb-map__dot.is-hot .sb-map__label {
		opacity: 0;
		transform: translateY(-50%) translateX(-4px);
	}

	.sb-map__dot--left:hover .sb-map__label,
	.sb-map__dot--left.is-hot .sb-map__label {
		transform: translateY(-50%) translateX(4px);
	}
}

.sb-map__dot:hover,
.sb-map__dot.is-hot {
	z-index: 5;
}

.sb-map__dot.is-hot {
	background: var(--sb-color-royal);
}

.sb-map__legend {
	display: flex;
	gap: 20px;
	margin-top: 12px;
	font-size: 13px;
	color: var(--sb-color-steel);
}

.sb-map__legend span {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	line-height: 1.3;
}

/* Same specificity as .sb-map.is-in .sb-map__dot so the legend swatch never animates. */
.sb-map .sb-map__legend .sb-map__dot {
	position: static;
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	margin-top: 4px;
	box-shadow: none;
	opacity: 1;
	transform: none;
	transition: none;
}

.sb-map .sb-map__legend .sb-map__dot::after {
	content: none;
}

.sb-markets {
	list-style: none;
	margin: 18px 0 22px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 20px;
	font-size: 15px;
	color: var(--sb-color-cool-steel);
}

.sb-markets li {
	cursor: default;
	transition: color var(--sb-map-transition), transform var(--sb-map-transition);
}

/* Transform, not padding: the indent must never resize the list column or its grid. */
.sb-markets li.is-hot {
	color: var(--sb-color-indigo);
	transform: translateX(10px);
}

@media (prefers-reduced-motion: reduce) {
	.sb-map > img,
	.sb-map__dot,
	.sb-map__label,
	.sb-markets li {
		transition: none;
	}

	.sb-map > img {
		opacity: 1;
		transform: none;
	}

	.sb-map .sb-map__dot {
		opacity: 1;
		transform: translate(-50%, -50%);
	}

	.sb-map.is-in .sb-map__dot::after,
	.sb-map.is-in .sb-map__dot--current::after {
		animation: none;
	}
}
