/*
Theme Name: Exmotech
Theme URI: https://www.exmotech.com
Author: Exmotech
Description: Custom block theme for Exmotech — campervan conversions, overlanding builds, grooming vans and composite panels. Black header, white-on-dark sections and orange curve accents, matching the original Squarespace design.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: exmotech
*/

/* ---------- Header ---------- */
.exmo-header {
	position: sticky;
	top: 0;
	z-index: 100;
}
.admin-bar .exmo-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .exmo-header { top: 0; } }

.exmo-header .wp-block-site-title a { text-decoration: none; }
.exmo-header .wp-block-navigation {
	text-transform: uppercase;
	row-gap: 0.25em;
}
.exmo-header .wp-block-navigation a:hover,
.exmo-header .wp-block-navigation a:focus { color: var(--wp--preset--color--orange); }
.exmo-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--black) !important;
	color: var(--wp--preset--color--white) !important;
	text-transform: uppercase;
}

/* ---------- Links & buttons ---------- */
.wp-block-button__link { transition: background-color .2s, color .2s, border-color .2s; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--black);
}

/* ---------- Section styles ---------- */
/* Dark section: black fading to charcoal, white text (homepage look) */
.is-style-exmo-dark,
.is-style-exmo-dark-curve {
	position: relative;
	background: linear-gradient(180deg, var(--wp--preset--color--black) 0%, var(--wp--preset--color--charcoal) 100%);
	color: var(--wp--preset--color--white);
}
.is-style-exmo-dark a:not(.wp-element-button),
.is-style-exmo-dark-curve a:not(.wp-element-button) { color: var(--wp--preset--color--orange); }

/* Orange curve: a thin orange arc along the bottom edge of a section */
.is-style-exmo-curve,
.is-style-exmo-dark-curve {
	position: relative;
	padding-bottom: calc(var(--wp--preset--spacing--60) + 5vw) !important;
}
.is-style-exmo-curve::after,
.is-style-exmo-dark-curve::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 6vw;
	min-height: 36px;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100 L0 70 Q720 -10 1440 70 L1440 100 Z' fill='%23ffffff'/%3E%3Cpath d='M0 70 Q720 -10 1440 70' fill='none' stroke='%23ff8a00' stroke-width='5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat bottom / 100% 100%;
}

/* Hero cover: image edge curves down into the black section below */
.wp-block-cover.is-style-exmo-hero { overflow: hidden; }
.wp-block-cover.is-style-exmo-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 7vw;
	min-height: 40px;
	z-index: 2;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0 Q720 160 1440 0 L1440 100 L0 100 Z' fill='%23000000'/%3E%3C/svg%3E") no-repeat bottom / 100% 100%;
}
.exmo-hero-title {
	font-family: var(--wp--preset--font-family--poppins);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	margin-bottom: 0.3em;
}
.exmo-hero-sub {
	font-family: var(--wp--preset--font-family--manrope);
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* ---------- Galleries ---------- */
.wp-block-gallery.has-nested-images figure.wp-block-image img { transition: transform .4s ease, opacity .3s; }
.wp-block-gallery.has-nested-images figure.wp-block-image a:hover img { transform: scale(1.03); opacity: .92; }
.wp-block-gallery.has-nested-images figure.wp-block-image { overflow: hidden; }

/* Captions under thumbnails instead of over them (gallery & build indexes) */
/* Core gallery CSS gives the link/image "flex: 1 0 0%", which collapses them to
   zero height in a column layout; every flex value below must stay explicit. */
.wp-block-gallery.is-style-exmo-captions-below.has-nested-images figure.wp-block-image:not(#individual-image) {
	flex-direction: column;
	justify-content: flex-start;
	overflow: visible;
}
.wp-block-gallery.is-style-exmo-captions-below.has-nested-images figure.wp-block-image:not(#individual-image) > a,
.wp-block-gallery.is-style-exmo-captions-below.has-nested-images figure.wp-block-image:not(#individual-image) > img {
	flex: 0 0 auto;
	height: auto;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	display: block;
	width: 100%;
}
.wp-block-gallery.is-style-exmo-captions-below.has-nested-images figure.wp-block-image:not(#individual-image) img {
	flex: none;
	aspect-ratio: 3 / 2;
	height: auto;
	width: 100%;
	object-fit: cover;
}
.wp-block-gallery.is-style-exmo-captions-below.has-nested-images figure.wp-block-image:not(#individual-image) figcaption {
	flex: 0 0 auto;
	position: static;
	background: none;
	color: inherit;
	text-shadow: none;
	padding: 0.6em 0 0;
	max-height: none;
	overflow: visible;
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Full-screen photo viewer: dark backdrop with white controls, like Squarespace */
.wp-lightbox-overlay .scrim {
	background-color: var(--wp--preset--color--black) !important;
	opacity: 1 !important;
}
.wp-lightbox-overlay button,
.wp-lightbox-overlay button svg {
	color: var(--wp--preset--color--white) !important;
	fill: var(--wp--preset--color--white) !important;
}

/* ---------- Principles (Our Vision) ---------- */
.exmo-principle .wp-block-image img { max-width: 72px; height: auto; }
.exmo-principle h4 { letter-spacing: 0.06em; }

/* ---------- Equipment list (Grooming Vans) ---------- */
.exmo-checklist {
	columns: 3 14em;
	column-gap: 2.5em;
	list-style: none;
	padding-left: 0;
}
.exmo-checklist li {
	break-inside: avoid;
	padding: 0.3em 0 0.3em 1.6em;
	position: relative;
}
.exmo-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.85em;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background: var(--wp--preset--color--orange);
}

/* ---------- Signup form (Exmotech Site Tools plugin) ---------- */
.exmo-signup { max-width: 34rem; margin-inline: auto; }
.exmo-signup__intro { margin-bottom: 0.8em; }
.exmo-signup__row { display: flex; gap: 0.5em; flex-wrap: wrap; }
.exmo-signup input[type="email"] {
	flex: 1 1 14em;
	min-width: 0;
	padding: 0.8em 1em;
	font: inherit;
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	border-radius: 0;
}
.exmo-signup button {
	flex: 0 0 auto;
	padding: 0.8em 1.6em;
	font: inherit;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border: 1px solid var(--wp--preset--color--orange);
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--black);
	cursor: pointer;
}
.exmo-signup button:hover { background: transparent; color: inherit; }
.exmo-signup__hp { position: absolute !important; left: -9999px !important; }
.exmo-signup__msg { margin-top: 0.8em; font-weight: 500; }
.exmo-signup__msg--error { color: #ff6b6b; }

/* ---------- Footer ---------- */
.exmo-footer a { text-decoration: none; }
.exmo-footer a:hover { color: var(--wp--preset--color--orange); }
