/*
 * Bovbjerg Modern Landing — homepage-only styles.
 * Everything below #bml-landing is scoped under that wrapper so it
 * can never bleed into the store, the virtual gallery, or any other
 * page. The header rules just below are the one exception — they
 * target Twenty Seventeen's own header markup, which sits outside
 * that wrapper, but this file is still only ever loaded on the
 * front page, so it still can't affect any other page.
 */

/* --- Cap the native header image to the top half of the screen,
   so the custom hero below fills the bottom half --- */

.custom-header-media {
	max-height: 50vh !important;
	height: 50vh !important;
	overflow: hidden;
}

.custom-header-media img,
.custom-header-media video {
	height: 100% !important;
	width: 100%;
	object-fit: cover;
}

#bml-landing {
	--bml-bg: #1a1a18;
	--bml-text: #f5f3ee;
	--bml-text-muted: #c9c7bf;
	--bml-text-dim: #8f8d84;
	--bml-card: #232320;
	--bml-border: #2c2c29;
}

/* --- Hero: fills the bottom half of the initial screen, so the
   native header image above it accounts for the top half --- */

#bml-landing .bml-hero {
	position: relative;
	min-height: 50vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--bml-bg);
	padding: 64px 24px;
	text-align: center;
	overflow: hidden;
}

#bml-landing .bml-hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	z-index: 0;
	animation: bml-hero-zoom 8s ease-out forwards;
}

@keyframes bml-hero-zoom {
	from {
		transform: scale(1);
	}
	to {
		transform: scale(1.12);
	}
}

#bml-landing .bml-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(26, 26, 24, 0.55);
	z-index: 1;
}

#bml-landing .bml-hero-inner {
	position: relative;
	z-index: 2;
	max-width: 640px;
	margin: 0 auto;
	animation: bml-fade-in-up 0.8s ease both;
}

@keyframes bml-fade-in-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#bml-landing .bml-eyebrow {
	color: var(--bml-text-dim);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0 0 16px;
}

#bml-landing .bml-headline {
	color: var(--bml-text);
	font-size: clamp(32px, 5vw, 48px);
	font-weight: 500;
	line-height: 1.25;
	margin: 0 0 16px;
}

#bml-landing .bml-subheadline {
	color: var(--bml-text-muted);
	font-size: 18px;
	line-height: 1.6;
	max-width: 480px;
	margin: 0 auto 32px;
}

#bml-landing .bml-button {
	display: inline-block;
	background: var(--bml-text);
	color: var(--bml-bg);
	padding: 14px 32px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

#bml-landing .bml-button:hover,
#bml-landing .bml-button:focus {
	opacity: 0.85;
	color: var(--bml-bg);
}

#bml-landing .bml-secondary-link {
	margin: 20px 0 0;
}

#bml-landing .bml-secondary-link a {
	color: var(--bml-text-dim);
	font-size: 13px;
	text-decoration: none;
}

#bml-landing .bml-secondary-link a:hover {
	color: var(--bml-text-muted);
}

/* --- Featured work --- */

#bml-landing .bml-featured {
	background: var(--bml-bg);
	padding: 64px 24px 72px;
}

#bml-landing .bml-section-label {
	color: var(--bml-text-dim);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	margin: 0 0 32px;
}

#bml-landing .bml-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	max-width: 1040px;
	margin: 0 auto;
	list-style: none;
	padding: 0;
}

@media (max-width: 780px) {
	#bml-landing .bml-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	#bml-landing .bml-hero {
		padding: 72px 20px;
	}
}

#bml-landing .bml-grid-item {
	display: block;
	text-decoration: none;
	color: inherit;
}

#bml-landing .bml-grid-image {
	aspect-ratio: 1;
	background: var(--bml-card);
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 12px;
}

#bml-landing .bml-grid-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

#bml-landing .bml-grid-title {
	color: var(--bml-text-muted);
	font-size: 14px;
	margin: 0;
}

#bml-landing .bml-grid-price {
	color: var(--bml-text-dim);
	font-size: 13px;
	margin: 4px 0 0;
}

#bml-landing .bml-grid-price ins {
	text-decoration: none;
	color: var(--bml-text-muted);
}

#bml-landing .bml-grid-price del {
	opacity: 0.6;
}

#bml-landing .bml-featured-link {
	text-align: center;
	margin: 40px 0 0;
}

#bml-landing .bml-featured-link a {
	color: var(--bml-text-muted);
	font-size: 13px;
	text-decoration: none;
}

#bml-landing .bml-featured-link a:hover {
	color: var(--bml-text);
}

/* --- About --- */

#bml-landing .bml-about {
	background: var(--bml-bg);
	border-top: 1px solid var(--bml-border);
	padding: 56px 24px;
}

#bml-landing .bml-about-inner {
	max-width: 720px;
	margin: 0 auto;
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}

#bml-landing .bml-about-photo {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: var(--bml-card);
	overflow: hidden;
	flex-shrink: 0;
}

#bml-landing .bml-about-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

#bml-landing .bml-about-text {
	flex: 1;
	min-width: 240px;
}

#bml-landing .bml-about-heading {
	color: var(--bml-text);
	font-size: 16px;
	font-weight: 500;
	margin: 0 0 8px;
}

#bml-landing .bml-about-bio {
	color: var(--bml-text-muted);
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 12px;
}

#bml-landing .bml-about-link {
	color: var(--bml-text-dim);
	font-size: 13px;
	text-decoration: none;
}

#bml-landing .bml-about-link:hover {
	color: var(--bml-text-muted);
}

/* --- Scroll-driven reveal (native CSS, no JavaScript) --- */

@keyframes bml-reveal-up {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Only browsers that understand animation-timeline get the effect.
   Everyone else falls through to the plain, fully visible state
   below — nothing is ever hidden waiting on JavaScript or a timeline
   that never fires. */
@supports (animation-timeline: view()) {
	#bml-landing .bml-reveal {
		animation: bml-reveal-up linear both;
		animation-timeline: view();
		animation-range: entry 0% entry 40%;
	}

	/* A slight offset per grid item gives the row a gentle cascade
	   instead of every piece appearing at once. */
	#bml-landing .bml-grid-item:nth-child(1) { animation-range: entry 0% entry 35%; }
	#bml-landing .bml-grid-item:nth-child(2) { animation-range: entry 5% entry 40%; }
	#bml-landing .bml-grid-item:nth-child(3) { animation-range: entry 10% entry 45%; }
	#bml-landing .bml-grid-item:nth-child(4) { animation-range: entry 15% entry 50%; }
}

@supports not (animation-timeline: view()) {
	#bml-landing .bml-reveal {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	#bml-landing .bml-hero-inner,
	#bml-landing .bml-hero-bg,
	#bml-landing .bml-reveal {
		animation: none !important;
		opacity: 1;
		transform: none;
	}
}

