/* Final page polish. Everything is scoped to the editable AHK homepage. */
.ahk-homepage-story-page {
	background: #0c0e10;
}

/* Extendable already draws the navigation underline. Prevent a second plugin border. */
.ahk-homepage-story-page :is(header, .wp-block-template-part) .wp-block-navigation a,
.ahk-homepage-story-page :is(header, .wp-block-template-part) .wp-block-navigation a:is(:hover, :focus-visible, [aria-current="page"]) {
	border-bottom: 0 !important;
	box-shadow: none !important;
}

/* Hero action buttons: one shared blue language with distinct primary/secondary states. */
.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 14px 30px !important;
	color: #fff !important;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	border: 1px solid transparent !important;
	border-radius: 999px !important;
	box-shadow: 0 14px 34px rgba(27, 105, 204, .28), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease !important;
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button:first-child .wp-block-button__link {
	background: linear-gradient(135deg, #2499e8 0%, #2766d4 52%, #274cba 100%) !important;
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button:first-child .wp-block-button__link:is(:hover, :focus-visible) {
	color: #fff !important;
	background: linear-gradient(135deg, #3aaff5 0%, #3279e2 52%, #3159c8 100%) !important;
	box-shadow: 0 18px 42px rgba(30, 125, 232, .42), inset 0 1px 0 rgba(255, 255, 255, .24) !important;
	transform: translateY(-2px);
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button:not(:first-child) .wp-block-button__link {
	color: #fff !important;
	background: rgba(7, 11, 15, .34) !important;
	border-color: rgba(255, 255, 255, .86) !important;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
	backdrop-filter: blur(5px);
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button:not(:first-child) .wp-block-button__link:is(:hover, :focus-visible) {
	color: #fff !important;
	background: linear-gradient(135deg, rgba(36, 153, 232, .38), rgba(39, 76, 186, .34)) !important;
	border-color: #65b8f5 !important;
	box-shadow: 0 16px 38px rgba(20, 107, 203, .3), inset 0 1px 0 rgba(255, 255, 255, .14) !important;
	transform: translateY(-2px);
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button__link:focus-visible {
	outline: 3px solid rgba(105, 190, 255, .68) !important;
	outline-offset: 4px;
}

/* Give the family-story CTA the same primary treatment as the other page actions. */
.ahk-homepage-story-page .ahk-editable-story .ahk-editable-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 14px 30px !important;
	color: #fff !important;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	background: linear-gradient(135deg, #2499e8 0%, #2766d4 52%, #274cba 100%) !important;
	border: 1px solid transparent !important;
	border-radius: 999px !important;
	box-shadow: 0 14px 34px rgba(27, 105, 204, .28), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease !important;
}

.ahk-homepage-story-page .ahk-editable-story .ahk-editable-button .wp-block-button__link:is(:hover, :focus-visible) {
	color: #fff !important;
	background: linear-gradient(135deg, #3aaff5 0%, #3279e2 52%, #3159c8 100%) !important;
	box-shadow: 0 18px 42px rgba(30, 125, 232, .42), inset 0 1px 0 rgba(255, 255, 255, .24) !important;
	transform: translateY(-2px);
}

.ahk-homepage-story-page .ahk-editable-story .ahk-editable-button .wp-block-button__link:focus-visible {
	outline: 3px solid rgba(105, 190, 255, .68) !important;
	outline-offset: 4px;
}

/* Contact block and map retain the restrained graphite card treatment. */
.ahk-homepage-story-page :is(.ahk-editable-visit, .ahk-visit) {
	padding: clamp(54px, 6vw, 90px) 24px !important;
	background: transparent !important;
}

.ahk-homepage-story-page :is(.ahk-editable-visit__grid, .ahk-visit-grid) {
	display: grid !important;
	grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
	width: 100% !important;
	max-width: 1360px !important;
	margin: 0 auto !important;
	background: rgba(255, 255, 255, .035);
	border: 1px solid rgba(155, 179, 202, .2);
	border-radius: 18px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .24);
	overflow: hidden;
}

.ahk-homepage-story-page :is(.ahk-editable-visit__copy, .ahk-visit-copy) {
	padding: clamp(32px, 4vw, 58px) !important;
}

.ahk-homepage-story-page :is(.ahk-editable-visit__map, .ahk-map-placeholder, .ahk-visit-grid iframe) {
	width: 100% !important;
	min-height: 330px;
	height: 100% !important;
	margin: 0 !important;
	border: 0 !important;
}

/* Match the independently editable WordPress footer to the homepage canvas. */
.ahk-homepage-story-page footer.wp-block-template-part,
.ahk-homepage-story-page footer.wp-block-template-part > .wp-block-group,
.ahk-homepage-story-page footer.wp-block-template-part .has-foreground-background-color {
	color: #f6f8fa !important;
	background-color: #0d1013 !important;
	background-image:
		radial-gradient(ellipse at 18% 0%, rgba(255, 255, 255, .055) 0, rgba(255, 255, 255, 0) 46%),
		radial-gradient(ellipse at 82% 12%, rgba(76, 92, 105, .13) 0, rgba(25, 30, 35, 0) 54%),
		linear-gradient(135deg, #171b1f 0%, #0c0f12 52%, #15191d 100%) !important;
	background-repeat: no-repeat !important;
	background-size: 100% 100% !important;
}

.ahk-homepage-story-page footer.wp-block-template-part a {
	color: #fff !important;
}

.ahk-homepage-story-page footer.wp-block-template-part a:is(:hover, :focus-visible) {
	color: #69b9f4 !important;
}

/* Keep the small fixed quick navigation above page content on all viewports. */
.ahk-homepage-story-page .ahk-quicknav {
	position: fixed;
	top: max(18px, env(safe-area-inset-top));
	right: max(24px, env(safe-area-inset-right));
	z-index: 9998;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px;
	background: rgba(10, 14, 18, .82);
	border: 1px solid rgba(123, 161, 194, .35);
	border-radius: 999px;
	box-shadow: 0 12px 38px rgba(0, 0, 0, .28);
	backdrop-filter: blur(14px);
}

.ahk-homepage-story-page .ahk-quicknav a {
	padding: 12px 20px;
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	border: 0 !important;
	border-radius: 999px;
}

.ahk-homepage-story-page .ahk-quicknav a:first-child {
	background: linear-gradient(135deg, #2499e8, #274cba);
}

@media (max-width: 820px) {
	.ahk-homepage-story-page :is(.ahk-editable-visit__grid, .ahk-visit-grid) {
		grid-template-columns: minmax(0, 1fr);
	}

	.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions {
		gap: 12px !important;
	}

	.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button,
	.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button__link {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.ahk-homepage-story-page :is(.ahk-editable-visit, .ahk-visit) {
		padding: 44px 16px !important;
	}

	.ahk-homepage-story-page .ahk-quicknav {
		top: auto;
		right: 14px;
		bottom: calc(14px + env(safe-area-inset-bottom));
		left: 14px;
		justify-content: center;
	}

	.ahk-homepage-story-page .ahk-quicknav a {
		flex: 1;
		padding-inline: 12px;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button__link {
		transition: none !important;
	}
}

/* 0.13.1: restore the established homepage geometry from the previous release. */
.ahk-homepage-story-page main:has(.ahk-editable-home) {
	padding-bottom: 0 !important;
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero {
	align-items: center !important;
	text-align: left !important;
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero > :is(.ahk-editable-hero__title, .ahk-editable-hero__copy, .ahk-editable-actions) {
	box-sizing: border-box;
	width: 100% !important;
	max-width: 1360px !important;
	margin-right: auto !important;
	margin-left: auto !important;
	text-align: left !important;
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions {
	display: flex !important;
	flex-flow: row nowrap !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 14px !important;
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions > .wp-block-button {
	flex: 0 0 auto !important;
	width: auto !important;
}

.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button__link {
	width: auto !important;
	min-width: 280px;
}

/* Contact and map return to one coherent card, matching the prior version. */
.ahk-homepage-story-page .ahk-editable-contact {
	box-sizing: border-box;
	margin: 0 !important;
	padding: clamp(54px, 6vw, 88px) 24px !important;
	background: transparent !important;
}

.ahk-homepage-story-page .ahk-editable-contact > .ahk-editable-contact__grid {
	display: grid !important;
	grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr) !important;
	align-items: stretch !important;
	gap: 0 !important;
	width: 100% !important;
	max-width: 1360px !important;
	margin: 0 auto !important;
	background: linear-gradient(145deg, rgba(38, 54, 72, .78), rgba(22, 28, 34, .84)) !important;
	border: 1px solid rgba(126, 168, 202, .28) !important;
	border-radius: 18px !important;
	box-shadow: 0 26px 70px rgba(0, 0, 0, .27), inset 0 1px 0 rgba(255, 255, 255, .045);
	overflow: hidden;
}

.ahk-homepage-story-page .ahk-editable-contact__grid > .wp-block-column {
	box-sizing: border-box;
	min-width: 0;
	margin: 0 !important;
}

.ahk-homepage-story-page .ahk-editable-contact__grid > .wp-block-column:first-child {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(34px, 4.4vw, 66px) !important;
}

.ahk-homepage-story-page .ahk-editable-contact__grid > .wp-block-column:last-child {
	min-height: 390px;
	padding: 0 !important;
}

.ahk-homepage-story-page .ahk-editable-contact__grid iframe {
	display: block;
	width: 100% !important;
	height: 100% !important;
	min-height: 390px;
	margin: 0 !important;
	border: 0 !important;
}

/* Apply the hero button system to the contact actions as well. */
.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions {
	display: flex !important;
	flex-flow: row wrap !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 12px !important;
}

.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 13px 25px !important;
	color: #fff !important;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	border: 1px solid transparent !important;
	border-radius: 999px !important;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease !important;
}

.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions .wp-block-button:first-child .wp-block-button__link {
	background: linear-gradient(135deg, #2499e8 0%, #2766d4 52%, #274cba 100%) !important;
	box-shadow: 0 14px 34px rgba(27, 105, 204, .28), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
}

.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions .wp-block-button:first-child .wp-block-button__link:is(:hover, :focus-visible) {
	background: linear-gradient(135deg, #3aaff5 0%, #3279e2 52%, #3159c8 100%) !important;
	box-shadow: 0 18px 42px rgba(30, 125, 232, .42), inset 0 1px 0 rgba(255, 255, 255, .24) !important;
	transform: translateY(-2px);
}

.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions .wp-block-button:not(:first-child) .wp-block-button__link {
	background: rgba(7, 11, 15, .34) !important;
	border-color: rgba(255, 255, 255, .86) !important;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions .wp-block-button:not(:first-child) .wp-block-button__link:is(:hover, :focus-visible) {
	background: linear-gradient(135deg, rgba(36, 153, 232, .38), rgba(39, 76, 186, .34)) !important;
	border-color: #65b8f5 !important;
	box-shadow: 0 16px 38px rgba(20, 107, 203, .3), inset 0 1px 0 rgba(255, 255, 255, .14) !important;
	transform: translateY(-2px);
}

.ahk-homepage-story-page.admin-bar .ahk-quicknav {
	top: 50px;
}

@media (max-width: 700px) {
	.ahk-homepage-story-page .ahk-editable-home > .ahk-hero {
		padding-right: 16px !important;
		padding-left: 16px !important;
	}

	.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions {
		flex-flow: row nowrap !important;
		gap: 8px !important;
	}

	.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions > .wp-block-button {
		flex: 1 1 0 !important;
		width: auto !important;
		min-width: 0 !important;
	}

	.ahk-homepage-story-page .ahk-editable-home > .ahk-hero .ahk-editable-actions .wp-block-button__link {
		width: 100% !important;
		min-width: 0 !important;
		min-height: 48px;
		padding: 11px 8px !important;
		font-size: clamp(12px, 3.35vw, 14px);
		white-space: nowrap;
	}

	.ahk-homepage-story-page .ahk-editable-contact {
		padding: 48px 16px !important;
	}

	.ahk-homepage-story-page .ahk-editable-contact > .ahk-editable-contact__grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.ahk-homepage-story-page .ahk-editable-contact__grid > .wp-block-column:first-child {
		padding: 34px 24px !important;
	}

	.ahk-homepage-story-page .ahk-editable-contact__grid > .wp-block-column:last-child,
	.ahk-homepage-story-page .ahk-editable-contact__grid iframe {
		min-height: 320px;
	}

	.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions {
		flex-flow: row nowrap !important;
	}

	.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions > .wp-block-button {
		flex: 1 1 0 !important;
		min-width: 0 !important;
	}

	.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions .wp-block-button__link {
		width: 100% !important;
		padding: 11px 8px !important;
		font-size: 13px;
		white-space: nowrap;
	}

	.ahk-homepage-story-page.admin-bar .ahk-quicknav {
		top: auto;
	}
}

/* 0.13.2: let the map occupy the complete right side of the rounded card. */
.ahk-homepage-story-page .ahk-editable-contact__grid > .wp-block-column {
	align-self: stretch !important;
}

.ahk-homepage-story-page .ahk-editable-contact__grid > .wp-block-column:last-child {
	display: flex !important;
	align-items: stretch !important;
	height: auto !important;
}

.ahk-homepage-story-page .ahk-editable-contact__grid iframe {
	flex: 1 1 auto;
	height: 100% !important;
	min-height: 100% !important;
}

.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions {
	flex-flow: row nowrap !important;
}

.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions > .wp-block-button {
	flex: 0 1 auto !important;
	min-width: 0 !important;
}

.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions .wp-block-button__link {
	padding-right: 18px !important;
	padding-left: 18px !important;
	font-size: 14px;
	white-space: nowrap;
}

/* Continue with the exact final canvas tone instead of restarting the texture. */
.ahk-homepage-story-page footer.wp-block-template-part,
.ahk-homepage-story-page footer.wp-block-template-part > .wp-block-group,
.ahk-homepage-story-page footer.wp-block-template-part .has-foreground-background-color {
	background-color: #15181b !important;
	background-image: none !important;
}

@media (max-width: 700px) {
	.ahk-homepage-story-page .ahk-editable-contact__grid iframe {
		min-height: 320px !important;
	}

	.ahk-homepage-story-page .ahk-editable-contact .ahk-editable-actions .wp-block-button__link {
		padding-right: 8px !important;
		padding-left: 8px !important;
		font-size: 12px;
	}
}
