/* WP OneePage - Public Page (Scoped, Anti-Slop CSS) */

:root {
	color-scheme: light dark;
}

.wp-onepage-wrapper {
	--color-primary: #030303;
	--color-primary-light: #1d2025;
	--color-secondary: #6c7789;
	--color-accent: #5ec269;
	--color-accent-messaging: #25d366;
	--color-accent-contact: #4a90e2;
	--color-bg: #ffffff;
	--color-bg-secondary: #f9f9f9;
	--color-border: #e5e5e5;
	--color-text: #1d2025;
	--color-text-muted: #6c7789;

	--space-xs: 8px;
	--space-sm: 12px;
	--space-md: 16px;
	--space-lg: 24px;
	--space-xl: 32px;

	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-pill: 50px;

	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

	--transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
	--transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
	.wp-onepage-wrapper {
		--color-bg: #0f0f0f;
		--color-bg-secondary: #1a1a1a;
		--color-border: #2a2a2a;
		--color-text: #f5f5f5;
		--color-text-muted: #b0b0b0;
	}
}

.wp-onepage-wrapper {
	font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	margin: 0;
	padding: 0;
	background-color: var(--color-bg);
	color: var(--color-text);
	transition: background-color var(--transition-normal), color var(--transition-normal);
}

.wp-onepage-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-md);
	max-width: 100%;
	margin: 0 auto;
	padding: var(--space-lg) var(--space-md);
}

@media (min-width: 640px) {
	.wp-onepage-container {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--space-lg);
		padding: var(--space-xl) var(--space-md);
	}
}

@media (min-width: 1024px) {
	.wp-onepage-container {
		grid-template-columns: repeat(3, 1fr);
		max-width: 1200px;
	}
}

/* Link Block - with optional image */
.wp-onepage-link-block {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.wp-onepage-link-image {
	width: 100%;
	overflow: hidden;
	border-radius: var(--radius-md);
	aspect-ratio: 16 / 9;
	background-color: var(--color-bg-secondary);
}

.wp-onepage-link-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Link Button - Card Style */
.wp-onepage-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	padding: var(--space-md);
	background-color: var(--color-button-bg, var(--color-bg-secondary));
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	color: var(--color-button-text, var(--color-text));
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.063);
	overflow: hidden;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
	transition: all var(--transition-normal);
	min-height: 44px;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
}

/* Hover State - Desktop only */
@media (hover: hover) and (pointer: fine) {
	.wp-onepage-link:hover {
		background-color: var(--color-primary);
		color: var(--color-bg);
		border-color: var(--color-primary);
		box-shadow: var(--shadow-md);
		transform: translateY(-1px);
	}
}

/* Active State */
.wp-onepage-link:active {
	transform: scale(0.98);
}

.wp-onepage-link:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* Link Icons */
.wp-onepage-link-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
}

.wp-onepage-link-text {
	flex: 1;
	text-align: center;
}

/* Link Type Variants */
.wp-onepage-link-social:hover {
	background-color: var(--color-accent);
	border-color: var(--color-accent);
	color: var(--color-bg);
}

.wp-onepage-link-contact:hover {
	background-color: var(--color-accent-contact);
	border-color: var(--color-accent-contact);
	color: white;
}

.wp-onepage-link-messaging:hover {
	background-color: var(--color-accent-messaging);
	border-color: var(--color-accent-messaging);
	color: white;
}

/* Empty State */
.wp-onepage-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: var(--space-xl) var(--space-md);
	color: var(--color-text-muted);
	font-size: 15px;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.wp-onepage-wrapper * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.wp-onepage-link {
		transform: none;
	}
}

/* Touch Optimization */
@media (hover: none) and (pointer: coarse) {
	.wp-onepage-link {
		padding: var(--space-md);
		min-height: 48px;
	}

	.wp-onepage-link:active {
		background-color: var(--color-primary);
		color: var(--color-bg);
		border-color: var(--color-primary);
	}
}

/* Standalone page: the shortcode page renders without the theme's chrome, so
   the body is ours to style. Scoped to .wp-onepage-standalone so nothing here
   can reach a normal theme page. */
body.wp-onepage-standalone {
	margin: 0;
	background: #ffffff;
}

@media (prefers-color-scheme: dark) {
	body.wp-onepage-standalone {
		background: #0f0f0f;
	}
}

.wp-onepage-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: var(--space-xl, 32px) var(--space-md, 16px);
	box-sizing: border-box;
}

.wp-onepage-page .wp-onepage-wrapper {
	width: 100%;
	max-width: 560px;
}

.wp-onepage-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-sm, 12px);
	margin-bottom: var(--space-xl, 32px);
	text-align: center;
}

.wp-onepage-logo {
	display: block;
	max-width: 180px;
	max-height: 180px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.wp-onepage-heading {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--color-text, #1d2025);
	line-height: 1.3;
}

/* Background media sits behind the links, never above them. */
.wp-onepage-has-background {
	position: relative;
}

.wp-onepage-background {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

.wp-onepage-background-media {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wp-onepage-background-overlay {
	position: absolute;
	inset: 0;
	background: #000;
}

/* A logo whose URL fails still reserves space and shows its alt text, which is
   what a broken image looks like. Keep it contained either way. */
.wp-onepage-logo {
	max-width: 180px;
	max-height: 180px;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: var(--radius-sm, 8px);
}

.wp-onepage-link-icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
	.wp-onepage-background-media {
		display: none;
	}
}

/* Header band. Transparent by default so nothing changes until a colour is
   chosen; the negative margins let the band span the page padding. */
.wp-onepage-header {
	background: var(--color-header-bg, transparent);
}

.wp-onepage-page .wp-onepage-header {
	margin: calc(var(--space-xl, 32px) * -1) calc(var(--space-md, 16px) * -1) var(--space-xl, 32px);
	padding: var(--space-xl, 32px) var(--space-md, 16px);
	border-radius: 0;
}

/* The standalone body must match the chosen page colour, otherwise the area
   below the content stays the stylesheet default and reads as a stray band. */
body.wp-onepage-standalone {
	background: var(--wp-onepage-page-bg, #ffffff);
}

@media (prefers-color-scheme: dark) {
	body.wp-onepage-standalone {
		background: var(--wp-onepage-page-bg, #0f0f0f);
	}
}

/* Metrics taken from the reference theme's own stylesheet, at its 14px root:
     .link-btn            padding: 1rem 4.5rem  -> 14px 63px, font-size 1.1rem
     .link-btn-round      border-radius: 50px
     .link-btn-image-wrapper  45x45, absolutely centred, margin-left -4.1rem
                          (-57.4px against 63px of padding -> 5.6px inset)
     hover/active         scale(1.025) / scale(.975) over 0.3s
   Buttons sit 14px apart (Bootstrap my-2 at that root). */
.wp-onepage-wrapper {
	font-size: 14px;
}

.wp-onepage-container {
	gap: 14px;
}

.wp-onepage-link {
	position: relative;
	min-height: 45px;
	padding: 14px 63px;
	border: 0;
	border-radius: var(--radius-pill, 50px);
	box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.06);
	font-size: 1.1em;
	text-align: center;
	white-space: normal;
	word-wrap: break-word;
	transition: opacity 0.3s, background 0.3s, transform 0.3s;
}

/* The thumbnail is round and overlaps the left padding; the label stays
   centred against the button's full width. */
.wp-onepage-link-media {
	position: absolute;
	left: 5.6px;
	top: 50%;
	margin-top: -22.5px;
	width: 45px;
	height: 45px;
	border-radius: 50px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wp-onepage-link-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wp-onepage-link-text {
	flex: 0 1 auto;
	overflow-wrap: anywhere;
}

@media (hover: hover) {
	.wp-onepage-link:hover {
		transform: scale(1.025);
	}
}

.wp-onepage-link:active {
	transform: scale(0.975);
}

@media (prefers-reduced-motion: reduce) {
	.wp-onepage-link {
		transition: none;
	}

	.wp-onepage-link:hover,
	.wp-onepage-link:active {
		transform: none;
	}
}

/* Full-width image block: a banner with no label, used for catalogues and
   promo art between the link rows. */
.wp-onepage-banner {
	display: block;
	border-radius: var(--radius-md, 12px);
	overflow: hidden;
	box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.06);
	text-decoration: none;
	color: var(--color-text);
	transition: transform var(--transition-normal, 0.3s ease);
}

.wp-onepage-banner-image {
	display: block;
	width: 100%;
	height: auto;
}

@media (hover: hover) {
	.wp-onepage-banner:hover {
		transform: translateY(-2px);
	}
}

.wp-onepage-map {
	margin-top: var(--space-lg, 24px);
	border-radius: 20px;
	overflow: hidden;
	line-height: 0;
}

.wp-onepage-map iframe {
	width: 100%;
	height: 450px;
	max-height: 65vh;
	border: 0;
	display: block;
}

/* A deliberate gap between rows — bigger than the default 14px container gap
   so it actually reads as a break rather than blending into normal spacing. */
.wp-onepage-spacer {
	height: 24px;
}

/* Decorative banner/video blocks with no destination render as a <div> rather
   than an <a>; they still need the pointer removed since nothing navigates. */
.wp-onepage-banner:not(a) {
	cursor: default;
}

/* Video shares .wp-onepage-banner-image sizing (width:100%, height:auto) with
   the image banner, so only the video-specific bits are needed here. */
video.wp-onepage-banner-image {
	background: #000;
}
