/*
Theme Name: Amanda Hansen Group
Theme URI: https://github.com/kevinbeetge/amanda-hansen-group
Author: Kevin Beetge
Author URI: https://github.com/kevinbeetge
Description: Premium Custom FSE Theme built specifically for Amanda Hansen Group website. High-contrast, dynamic, Awwwards-worthy kinetic interactions driven by custom Dynamic Gutenberg Blocks and GSAP.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: amanda-hansen-group
*/

/* ── Site Header ───────────────────────────────────────────── */
.ahg-site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	padding: 1.25rem 5%;
	background-color: var(--wp--preset--color--midnight);
}

.ahg-site-header__inner {
	max-width: var(--wp--style--global--wide-size, 1400px);
	margin: 0 auto;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ahg-site-logo {
	display: flex;
	align-items: center;
	margin: 0;
	text-decoration: none;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.ahg-site-logo.is-hidden {
	opacity: 0;
}

.ahg-site-logo svg {
	display: block;
	height: 2.25rem;
	width: auto;
}

/* Legacy text logo support */
.ahg-site-logo--text {
	font-family: var(--wp--preset--font-family--outfit);
	font-size: 1.375rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--wp--preset--color--white) !important;
}

.ahg-site-header__nav {
	display: flex;
	align-items: center;
	gap: 2.5rem;
}

.ahg-site-header .wp-block-navigation__container {
	gap: 2rem;
}

.ahg-site-header .wp-block-navigation-item__content,
.ahg-site-header .wp-block-navigation a {
	color: #d1d1d1 !important;
	text-decoration: none;
	font-weight: 400;
	transition: color 0.2s ease;
}

.ahg-site-header .wp-block-navigation-item__content:hover,
.ahg-site-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--white) !important;
}



/* Mobile hamburger + overlay menu */
.ahg-site-header .wp-block-navigation__responsive-container-open {
	color: #C4D600;
	/* Core gives the button padding: 0 and a 24px icon — enlarge the
	   tap target for mobile and give the hamburger some breathing room. */
	padding: 0.625rem 1.5rem;
}

.ahg-site-header .wp-block-navigation__responsive-container-open svg {
	width: 28px;
	height: 28px;
}

.ahg-site-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--white);
}

/* Lock overlay to viewport — WP defaults can exceed 100% via wide-size + padding */
html.has-modal-open,
html.has-modal-open body {
	overflow: hidden;
	max-width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 1.25rem 5% !important;
	overflow-x: hidden;
	overflow-y: auto;
	background-color: var(--wp--preset--color--midnight) !important;
}

.has-modal-open .wp-block-navigation__responsive-close {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding-inline: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	width: 100%;
	padding: 3rem 0 0;
	align-items: stretch;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.5rem;
	width: 100%;
	justify-content: flex-start;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open a,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	width: 100%;
	color: var(--wp--preset--color--white) !important;
	font-size: 1.75rem;
	font-weight: 500;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--mint) !important;
}

.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--white) !important;
}

/* ── Kinetic Hero: responsive background ───────────────────── */
.kinetic-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
}

.kinetic-hero__bg-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* When a video is supplied it layers on top of the static background. */
.kinetic-hero__video {
	z-index: 1;
}

@media (max-width: 768px) {
	/* Mobile: skip the video entirely and lean on the lightweight image. */
	.kinetic-hero__video {
		display: none !important;
	}

	.wp-block-amanda-hansen-group-kinetic-hero {
		min-height: 88vh;
		padding-top: 6rem;
		padding-bottom: 3rem;
	}

	/* Stronger top-to-bottom overlay keeps the headline legible on small screens. */
	.kinetic-hero__video-overlay {
		background: linear-gradient(180deg, rgba(13, 27, 42, 0.4) 0%, rgba(13, 27, 42, 0.55) 45%, rgba(13, 27, 42, 0.92) 100%);
	}

	.kinetic-hero__portrait {
		max-height: 40vh;
	}
}

/* ── Site Footer ───────────────────────────────────────────── */
.ahg-site-footer {
	padding: 3rem 2rem 1.5rem;
	margin-top: 0;
}

.ahg-site-footer__main {
	max-width: var(--wp--style--global--wide-size, 1400px);
	margin: 0 auto 2rem;
	width: 100%;
	gap: 3rem;
	align-items: flex-start;
}

.ahg-site-footer__brand {
	max-width: 280px;
}

.ahg-site-logo--footer svg {
	height: 2.75rem;
}

.ahg-site-footer__links {
	gap: 3rem;
	align-items: flex-start;
}

.ahg-site-footer a {
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
}

.ahg-site-footer a:hover {
	color: var(--wp--preset--color--mint);
}

.ahg-site-footer__bar {
	max-width: var(--wp--style--global--wide-size, 1400px);
	margin: 0 auto;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	width: 100%;
	color: rgba(255, 255, 255, 0.5);
}

/* ── Shared CTA button (ahg-cta) ────────────────────────── */
/* Text color + hover live here so every block's CTA behaves identically.
   Doubled classes raise specificity above the global link-hover rule. */
.ahg-cta.ahg-cta {
	color: var(--wp--preset--color--white);
}

.ahg-cta.ahg-cta--light {
	color: var(--wp--preset--color--midnight);
}

.ahg-cta.ahg-cta:hover {
	color: var(--wp--preset--color--chartreuse);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.ahg-cta.ahg-cta--light:hover {
	color: var(--wp--preset--color--electric-blue);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

/* ── Global resets for full-width home ─────────────────────── */
body {
	margin: 0;
}

/* GSAP from-states (e.g. split-panel photos sliding in at ±40%) sit off-grid
   until their scroll trigger fires, which would add a horizontal scrollbar
   and dead white space to the right. Clip (not hidden — hidden would break
   the sticky parallax sections) so the page never scrolls sideways. */
html,
body {
	overflow-x: clip;
}

.wp-site-blocks > * {
	margin-block-start: 0;
}

/* ── Home Page Parallax Stacking ──────────────────────────── */
/* Sections slide over each other on scroll */
/* Keep the front-page parallax stack separate from the template footer. */
.home .home-parallax-stack {
	position: relative;
}

.home .home-parallax-stack > * {
	margin-block-start: 0;
}


/* Hero is the base layer — also sticky so it stays pinned while next section slides over */
.home .wp-block-amanda-hansen-group-kinetic-hero {
	position: sticky;
	top: 0;
	z-index: 0;
}

/* Subsequent sections stack with sticky positioning. */
.home .wp-block-amanda-hansen-group-philosophy-section,
.home .wp-block-amanda-hansen-group-info-banner,
.home .wp-block-amanda-hansen-group-expertise-section {
	position: sticky;
	top: 0;
	min-height: 100vh;
}

.home .wp-block-amanda-hansen-group-featured-work {
	position: sticky;
	top: 0;
}

/* Ascending z-index so each section covers the previous */
.home .wp-block-amanda-hansen-group-philosophy-section { z-index: 1; display: flex; align-items: center; justify-content: center; }
.home .wp-block-amanda-hansen-group-info-banner      { z-index: 2; }
.home .wp-block-amanda-hansen-group-expertise-section {
	position: sticky !important;
	top: 0;
	z-index: 3;
	overflow: visible !important;
	min-height: 100vh;
}
.home .wp-block-amanda-hansen-group-featured-work      { z-index: 4; }

/* Stats Banner inside a Columns wrapper — make the wrapper sticky so it participates in the parallax stack */
.home .wp-block-columns:has(.wp-block-amanda-hansen-group-info-banner) {
	position: sticky !important;
	top: 0;
	z-index: 2;
	min-height: 100vh;
	overflow: visible !important;
}

/* Remove sticky positioning from the info-banner when inside a columns wrapper — its wrapper handles the stick */
.home .wp-block-columns .wp-block-amanda-hansen-group-info-banner {
	position: static !important;
	min-height: 100%;
	top: auto;
}


/* Full-bleed carousel on home page — breaks out of container */
.home .featured-work__carousel {
	width: 100vw;
	margin-left: calc(-50vw + 50%);
}

/* Footer CTA is part of the footer — scrolls normally, above sticky sections */
.home .wp-block-amanda-hansen-group-footer-cta {
	position: relative;
	z-index: 6;
}

/* Depth shadow at the top of each stacked section */
.home .wp-block-amanda-hansen-group-philosophy-section::before,
.home .wp-block-amanda-hansen-group-info-banner::before,
.home .wp-block-amanda-hansen-group-expertise-section::before,
.home .wp-block-amanda-hansen-group-featured-work::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100px;
	z-index: 1;
	pointer-events: none;
}

/* Template footer remains in normal document flow after the home stack. */
.home .wp-site-blocks > footer {
	position: static;
	z-index: auto;
}
/* Saved FSE templates may not pick up the wrapper until they are re-saved.
   Keep those pages in normal section flow instead of hiding the footer behind
   sticky sections. */
.home .wp-site-blocks:not(:has(.home-parallax-stack)) .wp-block-amanda-hansen-group-kinetic-hero,
.home .wp-site-blocks:not(:has(.home-parallax-stack)) .wp-block-amanda-hansen-group-statement,
.home .wp-site-blocks:not(:has(.home-parallax-stack)) .wp-block-amanda-hansen-group-cta-hero,
.home .wp-site-blocks:not(:has(.home-parallax-stack)) .wp-block-amanda-hansen-group-philosophy-section,
.home .wp-site-blocks:not(:has(.home-parallax-stack)) .wp-block-amanda-hansen-group-info-banner,
.home .wp-site-blocks:not(:has(.home-parallax-stack)) .wp-block-amanda-hansen-group-expertise-section,
.home .wp-site-blocks:not(:has(.home-parallax-stack)) .wp-block-amanda-hansen-group-featured-work {
	position: relative !important;
	top: auto !important;
	z-index: auto !important;
}

.home .wp-site-blocks:not(:has(.home-parallax-stack)) .wp-block-columns:has(.wp-block-amanda-hansen-group-info-banner) {
	position: static !important;
	top: auto !important;
	z-index: auto !important;
	min-height: auto !important;
}


/* ── Short viewport: disable parallax stacking ─────────────── */
/* On landscape phones and other short screens, sticky card-stacking
   cuts off content. Let sections scroll normally. */
@media (max-height: 600px) {
	.home .wp-block-amanda-hansen-group-philosophy-section,
	.home .wp-block-amanda-hansen-group-info-banner,
	.home .wp-block-amanda-hansen-group-expertise-section,
	.home .wp-block-amanda-hansen-group-featured-work,
	.home .wp-block-columns:has(.wp-block-amanda-hansen-group-info-banner) {
		position: relative !important;
		top: auto !important;
		z-index: auto !important;
		min-height: auto !important;
	}

	/* Kinetic hero stays full-height but scrolls normally (its content is absolutely positioned).
	   Use a floor so the logo doesn't clip on very short screens. */
	.home .wp-block-amanda-hansen-group-kinetic-hero {
		position: relative !important;
		top: auto !important;
		z-index: auto !important;
		min-height: max(100vh, 500px) !important;
	}
	}
