/**
 * JMC Keynote — Custom CSS
 * Effects that theme.json cannot express: glassmorphism, gradients, shadows, animations.
 * Design system: "The Visionary Ledger" (see stitch/kinetic_authority/DESIGN.md)
 */

/* ========================================
   1. GLASSMORPHIC NAVIGATION
   ======================================== */

.glass-nav {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	background: rgba(239, 244, 255, 0.8) !important;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: 0 1px 3px rgba(11, 28, 48, 0.06);
	transition: background 0.3s ease;
}

/* Compensate for fixed nav */
body {
	padding-top: 80px;
}

/* ========================================
   2. BUTTON STYLES
   ======================================== */

/* Gradient primary button */
.is-style-gradient-primary .wp-block-button__link {
	background: linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--primary-container) 100%) !important;
	border: none !important;
	box-shadow: 0 10px 25px rgba(24, 5, 188, 0.2);
	transition: opacity 0.2s ease, transform 0.15s ease;
}

.is-style-gradient-primary .wp-block-button__link:hover {
	opacity: 0.9;
	box-shadow: 0 14px 30px rgba(24, 5, 188, 0.25);
}

.is-style-gradient-primary .wp-block-button__link:active {
	transform: scale(0.97);
}

/* Orange CTA buttons */
.wp-block-button__link.has-tertiary-fixed-background-color {
	background-color: #e87a00 !important;
	color: #ffffff !important;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.wp-block-button__link.has-tertiary-fixed-background-color:hover {
	background-color: #cc6a00 !important;
	color: #ffffff !important;
}

.wp-block-button__link.has-tertiary-fixed-background-color:active {
	transform: scale(0.97);
}

/* Ghost / outline button */
.is-style-ghost .wp-block-button__link {
	background: transparent !important;
	border: 1px solid rgba(199, 196, 216, 0.3) !important;
	color: var(--wp--preset--color--primary) !important;
	transition: border-color 0.2s ease;
}

.is-style-ghost .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--primary) !important;
}

/* Tertiary / text button */
.is-style-tertiary .wp-block-button__link {
	background: transparent !important;
	color: var(--wp--preset--color--primary) !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--secondary-fixed);
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
}

.is-style-tertiary .wp-block-button__link:hover {
	text-decoration-color: var(--wp--preset--color--primary);
}

/* ========================================
   3. CARD STYLES
   ======================================== */

.is-style-card {
	background: var(--wp--preset--color--surface-container-lowest);
	border-radius: var(--wp--custom--border-radius--xl);
	box-shadow: var(--wp--custom--shadow--ambient);
}

.is-style-card-hover {
	background: var(--wp--preset--color--surface-container-lowest);
	border-radius: var(--wp--custom--border-radius--xl);
	box-shadow: var(--wp--custom--shadow--ambient);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.is-style-card-hover:hover {
	transform: translateY(-8px);
	box-shadow: var(--wp--custom--shadow--elevated);
}

/* ========================================
   4. PERSPECTIVE BOX (Signature Component)
   ======================================== */

.perspective-stat {
	position: relative;
}

.perspective-stat::before {
	content: '';
	position: absolute;
	width: 120%;
	height: 120%;
	background: var(--wp--preset--color--tertiary-fixed);
	opacity: 0.1;
	z-index: -1;
	transform: rotate(-3deg) translate(-10%, -10%);
	border-radius: var(--wp--custom--border-radius--xl);
}

/* Decorative accent shapes */
.accent-blob-primary {
	position: absolute;
	width: 200px;
	height: 200px;
	background: var(--wp--preset--color--primary);
	opacity: 0.05;
	border-radius: 50%;
	filter: blur(60px);
	pointer-events: none;
}

.accent-blob-secondary {
	position: absolute;
	width: 150px;
	height: 150px;
	background: var(--wp--preset--color--secondary);
	opacity: 0.06;
	border-radius: 50%;
	filter: blur(40px);
	pointer-events: none;
}

/* ========================================
   5. LOGO STRIP
   ======================================== */

.is-style-grayscale img {
	filter: grayscale(1);
	opacity: 0.5;
	transition: filter 0.4s ease, opacity 0.4s ease;
}

.is-style-grayscale:hover img {
	filter: grayscale(0);
	opacity: 1;
}

/* Text-based logo strip */
.logo-strip-text {
	opacity: 0.4;
	transition: opacity 0.4s ease;
}

.logo-strip-text:hover {
	opacity: 1;
}

/* Uniform logo strip */
.logo-strip-uniform .wp-block-image {
	width: 100px;
	height: 50px;
	flex-shrink: 0;
}

.logo-strip-uniform .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* ========================================
   6. EYEBROW LABEL
   ======================================== */

.eyebrow-label {
	display: inline-block;
	font-family: var(--wp--preset--font-family--headline);
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.2em;
}

/* ========================================
   7. MATERIAL SYMBOLS ICONS
   ======================================== */

.material-symbols-outlined {
	font-family: 'Material Symbols Outlined';
	font-weight: normal;
	font-style: normal;
	font-size: 24px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	font-feature-settings: 'liga';
	-webkit-font-smoothing: antialiased;
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
	vertical-align: middle;
}

/* ========================================
   8. MARQUEE ANIMATION (Social Proof Strip)
   ======================================== */

@keyframes marquee-scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

.marquee-track {
	display: flex;
	gap: 3rem;
	animation: marquee-scroll 30s linear infinite;
	white-space: nowrap;
}

.marquee-track:hover {
	animation-play-state: paused;
}

/* ========================================
   9. SELECTION COLOR
   ======================================== */

::selection {
	background: var(--wp--preset--color--primary-fixed);
	color: var(--wp--preset--color--primary);
}

/* ========================================
   10. RESPONSIVE ADJUSTMENTS
   ======================================== */

/* EY badge overlap — ensure it sits above the image */
.wp-block-group.has-tertiary-fixed-background-color[style*="margin-top:-1.5rem"] {
	position: relative;
	z-index: 1;
}

/* Logo in nav */
.glass-nav .custom-logo-link img,
.glass-nav .nav-logo img {
	height: 40px;
	width: auto;
}

/* Logo in footer */
.footer-logo img {
	height: 36px;
	width: auto;
}

/* ========================================
   RESPONSIVE NAVIGATION
   ======================================== */

/*
 * WP's overlayMenu:"mobile" isn't generating hidden-by-default,
 * so we handle desktop vs mobile via CSS media queries.
 */

/* --- DESKTOP: hide hamburger, show inline links --- */
@media (min-width: 782px) {
	/* Hide hamburger on desktop */
	.glass-nav .wp-block-navigation__responsive-container-open {
		display: none !important;
	}

	/* Show nav container inline (not overlay) */
	.glass-nav .wp-block-navigation__responsive-container {
		position: relative !important;
		display: block !important;
		width: auto !important;
		background: transparent !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		bottom: auto !important;
		padding: 0 !important;
		overflow: visible !important;
		z-index: auto !important;
	}

	/* Hide close button on desktop */
	.glass-nav .wp-block-navigation__responsive-container-close {
		display: none !important;
	}

	/* Inline flex for links on desktop */
	.glass-nav .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		gap: 2rem;
		align-items: center;
	}

	.glass-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
		border-bottom: none !important;
	}
}

/*
 * When the mobile menu is open, remove backdrop-filter from the nav.
 * backdrop-filter creates a containing block per CSS spec, which traps
 * the position:fixed overlay inside the nav bar height. Firefox & Safari
 * follow the spec; Chrome does not (yet). Removing it lets the overlay
 * fill the full viewport.
 */
.glass-nav:has(.is-menu-open),
.glass-nav.menu-open {
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

/* --- MOBILE: show hamburger, hide inline links --- */
@media (max-width: 781px) {
	/* Show hamburger button */
	.glass-nav .wp-block-navigation__responsive-container-open {
		display: flex;
		align-items: center;
		justify-content: center;
		background: none;
		border: none;
		cursor: pointer;
		padding: 0.5rem;
	}

	.glass-nav .wp-block-navigation__responsive-container-open svg {
		width: 24px;
		height: 24px;
		fill: var(--wp--preset--color--on-surface);
	}

	/* Hide nav container by default on mobile */
	.glass-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}

	/* Overlay when open */
	.glass-nav .wp-block-navigation__responsive-container.is-menu-open {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		z-index: 100000 !important;
		background: rgba(239, 244, 255, 0.97) !important;
		backdrop-filter: blur(24px);
		-webkit-backdrop-filter: blur(24px);
		display: flex !important;
		flex-direction: column;
		padding: 1.5rem !important;
		overflow: auto;
	}

	/* Close button */
	.glass-nav .wp-block-navigation__responsive-container-close {
		background: none;
		border: none;
		cursor: pointer;
		padding: 0.5rem;
		align-self: flex-end;
		margin-bottom: 1rem;
	}

	.glass-nav .wp-block-navigation__responsive-container-close svg {
		width: 24px;
		height: 24px;
		fill: var(--wp--preset--color--on-surface);
	}

	/* Vertical stacked links inside overlay */
	.glass-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		flex: 1;
		gap: 0;
	}

	.glass-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		display: flex !important;
		flex-direction: column !important;
		width: 100%;
		gap: 0 !important;
	}

	.glass-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		width: 100%;
		text-align: center;
		border-bottom: 1px solid rgba(118, 117, 135, 0.12);
	}

	.glass-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child {
		border-bottom: none;
	}

	.glass-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		display: block;
		padding: 1rem 0;
		font-family: var(--wp--preset--font-family--headline);
		font-size: 1.125rem;
		font-weight: 600;
		color: var(--wp--preset--color--on-surface);
		text-decoration: none;
		transition: color 0.2s ease;
	}

	.glass-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
		color: var(--wp--preset--color--primary);
	}

	/* Hide Book a Call button on mobile */
	.glass-nav > .wp-block-group > .wp-block-buttons {
		display: none;
	}

	body {
		padding-top: 64px;
	}

	/* Reduce hero top spacing on mobile */
	.hero-home-section {
		padding-top: var(--wp--preset--spacing--40) !important;
	}

	/* Stack columns on mobile */
	.wp-block-columns {
		flex-wrap: wrap;
	}

	/* Logo size on mobile */
	.glass-nav .custom-logo-link img,
	.glass-nav .nav-logo img {
		height: 32px;
	}
}

/* ========================================
   11. CONTACT FORM 7
   ======================================== */

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="date"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	color: var(--wp--preset--color--on-surface);
	background: var(--wp--preset--color--surface-container-lowest);
	border: 1px solid var(--wp--preset--color--surface-container-high);
	border-radius: 8px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px var(--wp--preset--color--primary-fixed);
}

.wpcf7 select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23464555' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
	cursor: pointer;
}

.wpcf7 textarea {
	min-height: 150px;
	resize: vertical;
}

.wpcf7 label {
	display: block;
	font-family: var(--wp--preset--font-family--headline);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--on-surface);
	margin-bottom: 0.375rem;
}

.wpcf7 label br {
	display: none;
}

.wpcf7 p {
	margin-bottom: 1.25rem;
}

.wpcf7 input[type="submit"] {
	display: inline-block;
	padding: 0.875rem 2.5rem;
	font-family: var(--wp--preset--font-family--headline);
	font-size: 1rem;
	font-weight: 700;
	color: #ffffff;
	background: #e87a00;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.wpcf7 input[type="submit"]:hover {
	background-color: #2e7d32;
	color: #ffffff;
}

.wpcf7 input[type="submit"]:active {
	transform: scale(0.97);
}

/* Validation */
.wpcf7-not-valid {
	border-color: #d32f2f !important;
}

.wpcf7-not-valid-tip {
	color: #d32f2f;
	font-size: 0.8125rem;
	margin-top: 0.25rem;
}

.wpcf7 .wpcf7-response-output {
	padding: 0.75rem 1rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	margin: 1.5rem 0 0;
}

/* ========================================
   12. UTILITY CLASSES
   ======================================== */

/* Remove default list bullets for footer/nav lists */
.is-style-no-bullets {
	list-style: none !important;
	padding-left: 0 !important;
}

.is-style-no-bullets li {
	list-style: none;
}

/* Tonal section shift — use as className on Group blocks */
.tonal-shift {
	background: var(--wp--preset--color--surface-container-low);
}

.tonal-shift-high {
	background: var(--wp--preset--color--surface-container);
}

/* Quote icon watermark effect */
.quote-watermark {
	position: relative;
}

.quote-watermark::before {
	content: '\201C';
	position: absolute;
	top: -0.5em;
	left: -0.1em;
	font-size: 8rem;
	font-family: var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--tertiary);
	opacity: 0.1;
	line-height: 1;
	pointer-events: none;
}
