/* Bearberry Coming Soon: main styles */

:root {
	--bb-plum: #3a1f2b;
	--bb-plum-rgb: 58, 31, 43;
	--bb-glaze: #e8a5b6;
	--bb-glaze-rgb: 232, 165, 182;
	--bb-cream: #f7ecdf;
	--bb-cream-soft: rgba(247, 236, 223, 0.72);
	--bb-cream-faint: rgba(247, 236, 223, 0.14);
	--bb-gold: #f0c36b;
	--bb-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
	--bb-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--bb-radius: 999px;
	--bb-pad-x: clamp(20px, 5vw, 72px);
	--bb-pad-y: clamp(20px, 3vw, 40px);
	--bb-header-rgb: 0, 0, 0;
	--bb-header-a: 0.25;
	--bb-header-blur: 14px;
	--bb-overlay-a: 0.6;
	--bb-logo-h: 56px;
}

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

html { -webkit-text-size-adjust: 100%; }

body.bb-body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	font-family: var(--bb-body);
	font-size: 17px;
	line-height: 1.55;
	color: var(--bb-cream);
	background:
		radial-gradient(120% 90% at 100% 0%, rgba(var(--bb-glaze-rgb), 0.16), transparent 55%),
		radial-gradient(90% 80% at 0% 100%, rgba(0, 0, 0, 0.35), transparent 60%),
		var(--bb-plum);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

.bb-page {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	padding: 0 var(--bb-pad-x) var(--bb-pad-y);
	isolation: isolate;
	overflow: hidden;
}

/* Full-page background image (set in Bearberry > Settings or the Customizer) */
.bb-bg {
	position: fixed;
	inset: 0;
	z-index: -2;
	background-image: var(--bb-bg-image);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	pointer-events: none;
}
.bb-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgb(var(--bb-plum-rgb));
	opacity: var(--bb-overlay-a);
}
body.bb-has-bg .bb-glow { opacity: .3; }

/* Soft ambient glows */
.bb-glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	pointer-events: none;
	z-index: -1;
	opacity: .55;
}
.bb-glow--a {
	width: 52vw; height: 52vw; max-width: 720px; max-height: 720px;
	right: -14vw; top: -18vw;
	background: rgba(var(--bb-glaze-rgb), 0.35);
}
.bb-glow--b {
	width: 40vw; height: 40vw; max-width: 560px; max-height: 560px;
	left: -12vw; bottom: -10vw;
	background: rgba(240, 195, 107, 0.16);
}

/* Header: full-bleed bar with its own color and opacity */
.bb-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 calc(-1 * var(--bb-pad-x)) var(--bb-pad-y);
	padding: 16px var(--bb-pad-x);
	background: rgba(var(--bb-header-rgb), var(--bb-header-a));
	-webkit-backdrop-filter: blur(var(--bb-header-blur));
	backdrop-filter: blur(var(--bb-header-blur));
	border-bottom: 1px solid rgba(247, 236, 223, 0.08);
	position: relative;
	z-index: 2;
}
.bb-logo a { display: block; line-height: 0; }
.bb-logo img { display: block; max-height: var(--bb-logo-h, 56px); width: auto; }
.bb-wordmark {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--bb-display);
	font-weight: 600;
	font-size: 22px;
	letter-spacing: -0.01em;
	color: var(--bb-cream);
	text-decoration: none;
}
.bb-wordmark__dot {
	width: 14px; height: 14px;
	border-radius: 50%;
	background: var(--bb-glaze);
	box-shadow: inset 0 0 0 4px var(--bb-plum), 0 0 0 1.5px var(--bb-glaze);
}
.bb-badge {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--bb-cream-soft);
	border: 1px solid var(--bb-cream-faint);
	border-radius: var(--bb-radius);
	padding: 8px 14px;
	white-space: nowrap;
}

/* Main layout */
.bb-main {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	align-items: center;
	gap: clamp(32px, 6vw, 96px);
	padding: clamp(40px, 6vh, 80px) 0;
}

.bb-eyebrow {
	margin: 0 0 18px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--bb-glaze);
}
.bb-headline {
	margin: 0;
	font-family: var(--bb-display);
	font-weight: 500;
	font-size: clamp(42px, 6.4vw, 84px);
	line-height: 1.02;
	letter-spacing: -0.025em;
	font-variation-settings: "opsz" 144;
	text-wrap: balance;
}
.bb-subhead {
	margin: 22px 0 0;
	max-width: 52ch;
	font-size: clamp(17px, 1.4vw, 20px);
	color: var(--bb-cream-soft);
	text-wrap: pretty;
}

/* Form */
.bb-form { margin-top: 40px; max-width: 560px; }
.bb-form__label {
	display: block;
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
}
.bb-form__row {
	display: flex;
	gap: 8px;
	padding: 6px;
	border-radius: var(--bb-radius);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(247, 236, 223, 0.18);
	backdrop-filter: blur(8px);
	transition: border-color .2s, box-shadow .2s;
}
.bb-form__row:focus-within {
	border-color: rgba(var(--bb-glaze-rgb), 0.9);
	box-shadow: 0 0 0 4px rgba(var(--bb-glaze-rgb), 0.18);
}
.bb-form__input {
	flex: 1;
	min-width: 0;
	padding: 14px 18px;
	font: inherit;
	font-size: 16px;
	color: var(--bb-cream);
	background: transparent;
	border: 0;
	outline: 0;
}
.bb-form__input::placeholder { color: rgba(247, 236, 223, 0.45); }
.bb-form__button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 24px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--bb-plum);
	background: var(--bb-glaze);
	border: 0;
	border-radius: var(--bb-radius);
	cursor: pointer;
	white-space: nowrap;
	transition: transform .15s ease, filter .15s ease;
}
.bb-form__button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.bb-form__button:active { transform: translateY(0); }
.bb-form__button:focus-visible { outline: 2px solid var(--bb-cream); outline-offset: 3px; }
.bb-form__button[disabled] { cursor: progress; }
.bb-form__button[disabled] .bb-form__button-text { visibility: hidden; }
.bb-form__spinner {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 18px; height: 18px;
	border-radius: 50%;
	border: 2px solid rgba(var(--bb-plum-rgb), 0.25);
	border-top-color: var(--bb-plum);
	opacity: 0;
	animation: bb-spin .8s linear infinite;
}
.bb-form__button[disabled] .bb-form__spinner { opacity: 1; }
@keyframes bb-spin { to { transform: rotate(360deg); } }

.bb-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px; overflow: hidden;
}

.bb-form__message {
	min-height: 1.5em;
	margin: 14px 0 0;
	font-size: 15px;
	font-weight: 500;
	color: var(--bb-gold);
}
.bb-form__message.is-ok { color: var(--bb-gold); }
.bb-form__message.is-error { color: #ffb3b3; }
.bb-form__message:empty { display: none; }

.bb-form__fine {
	margin: 12px 0 0;
	font-size: 13px;
	color: rgba(247, 236, 223, 0.5);
}

.bb-form.is-done .bb-form__row,
.bb-form.is-done .bb-form__label,
.bb-form.is-done .bb-form__fine { display: none; }
.bb-form.is-done .bb-form__message {
	font-family: var(--bb-display);
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 500;
	line-height: 1.25;
	margin: 0;
	padding: 22px 26px;
	border-radius: 24px;
	background: rgba(var(--bb-glaze-rgb), 0.12);
	border: 1px solid rgba(var(--bb-glaze-rgb), 0.35);
	color: var(--bb-cream);
}

/* Hero (illustrated donut, or your own image in one of three styles) */
.bb-hero { margin: 0; display: flex; justify-content: center; min-width: 0; }
.bb-hero__photo {
	width: 100%;
	max-width: 520px;
	height: auto;
	display: block;
}
.bb-hero--card .bb-hero__photo {
	border-radius: 32px;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.bb-hero--float .bb-hero__photo {
	max-width: 460px;
	filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
	animation: bb-float 7s ease-in-out infinite;
}
.bb-donut {
	width: min(100%, 460px);
	height: auto;
	animation: bb-float 7s ease-in-out infinite;
}
@keyframes bb-float {
	0%, 100% { transform: translateY(0) rotate(-4deg); }
	50% { transform: translateY(-16px) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
	.bb-donut, .bb-hero--float .bb-hero__photo { animation: none; }
	.bb-form__button { transition: none; }
}

/* Footer */
.bb-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding-top: 24px;
	border-top: 1px solid var(--bb-cream-faint);
	font-size: 13px;
	color: rgba(247, 236, 223, 0.5);
}
.bb-footer__line { margin: 0; }
.bb-social { display: flex; gap: 20px; }
.bb-social a {
	color: var(--bb-cream-soft);
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid transparent;
	transition: border-color .15s, color .15s;
}
.bb-social a:hover { color: var(--bb-cream); border-bottom-color: var(--bb-glaze); }

/* Responsive */

/* Tablets and small laptops: keep two columns but tighten */
@media (max-width: 1100px) and (min-width: 901px) {
	.bb-main { gap: 40px; }
	.bb-donut, .bb-hero--float .bb-hero__photo { max-width: 380px; }
	.bb-hero--card .bb-hero__photo, .bb-hero--plain .bb-hero__photo { max-width: 400px; }
}

/* Tablets portrait and phones: stack, image first */
@media (max-width: 900px) {
	.bb-main {
		grid-template-columns: 1fr;
		gap: 28px;
		padding: 24px 0 48px;
		align-content: start;
	}
	.bb-hero { order: -1; }
	.bb-donut, .bb-hero--float .bb-hero__photo { width: min(60vw, 300px); max-width: none; }
	.bb-hero--card .bb-hero__photo, .bb-hero--plain .bb-hero__photo { max-width: min(100%, 420px); }
	.bb-headline { font-size: clamp(38px, 9vw, 64px); }
	.bb-form { max-width: none; }
}

/* Phones */
@media (max-width: 560px) {
	.bb-header { padding: 12px var(--bb-pad-x); }
	.bb-logo img { max-height: min(var(--bb-logo-h, 56px), 44px); }
	.bb-wordmark { font-size: 19px; }
	.bb-badge { display: none; }
	.bb-donut, .bb-hero--float .bb-hero__photo { width: min(56vw, 240px); }
	.bb-headline { font-size: clamp(34px, 11vw, 46px); }
	.bb-subhead { font-size: 16px; }
	.bb-form { margin-top: 28px; }
	.bb-form__row {
		flex-direction: column;
		border-radius: 28px;
		padding: 8px;
	}
	.bb-form__input { padding: 12px 14px; text-align: center; }
	.bb-form__button { width: 100%; padding: 15px 20px; }
	.bb-footer { flex-direction: column; align-items: flex-start; }
	.bb-social { flex-wrap: wrap; gap: 12px 18px; }
}

/* Very narrow phones */
@media (max-width: 360px) {
	.bb-headline { font-size: 32px; }
	.bb-form.is-done .bb-form__message { font-size: 20px; padding: 16px 18px; }
}

/* Phones in landscape: don't waste height on the illustration */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 900px) {
	.bb-main { grid-template-columns: minmax(0, 1fr) 160px; gap: 24px; padding: 16px 0 24px; }
	.bb-hero { order: 0; }
	.bb-donut, .bb-hero--float .bb-hero__photo, .bb-hero--card .bb-hero__photo, .bb-hero--plain .bb-hero__photo { width: 160px; max-width: 160px; }
	.bb-headline { font-size: 30px; }
	.bb-subhead { margin-top: 10px; font-size: 15px; }
	.bb-form { margin-top: 18px; }
	.bb-form__fine { display: none; }
}

/* Large screens: keep line lengths comfortable */
@media (min-width: 1700px) {
	.bb-page { padding-left: max(var(--bb-pad-x), calc((100vw - 1600px) / 2)); padding-right: max(var(--bb-pad-x), calc((100vw - 1600px) / 2)); --bb-pad-x-wide: max(var(--bb-pad-x), calc((100vw - 1600px) / 2)); }
	.bb-header { margin-left: calc(-1 * var(--bb-pad-x-wide)); margin-right: calc(-1 * var(--bb-pad-x-wide)); padding-left: var(--bb-pad-x-wide); padding-right: var(--bb-pad-x-wide); }
}
