/*
Theme Name: WMP
Theme URI: https://wmp4boats.com
Description: One-page theme for WMP — Wiring & Marine Plumbing. All content is edited under Appearance → Customize → WMP Site Content.
Author: Elder
Author URI: https://weareelder.com
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wmp
*/

/* ==========================================================================
   Tokens — from the Figma variables. Spacing and type scale fluidly from the
   375px mobile values to the 1440px desktop values (clamp), so tablet sizes
   sit between the two designs instead of jumping.
   ========================================================================== */
:root {
	/* Colour */
	--abyss: #0a1c2a;
	--abyss-2: #11293b;
	--ink: #0d1922;
	--steel: #5b6c77;
	--mist: #a9b8c1;
	--haze: #d9e1e5;
	--foam: #e3e9ec;
	--gelcoat: #f2f4f3;
	--white: #ffffff;
	--brass: #c09033;
	--brass-hi: #d4a447;
	--route-line: rgba(198, 163, 94, 0.5);
	--rule-light: rgba(13, 25, 34, 0.14);
	--rule-dark: rgba(242, 244, 243, 0.16);
	--radius: 2px;

	/* Layout */
	--content-max: 1312px;
	--gutter: clamp(16px, -0.901px + 4.5070vw, 64px);
	--section-y: clamp(72px, 44.535px + 7.3239vw, 150px);
	--section-y-lg: clamp(80px, 51.831px + 7.5117vw, 160px);
	--band-y: clamp(64px, 37.239px + 7.1362vw, 140px);
	--head-gap: clamp(48px, 33.915px + 3.7559vw, 88px);
	--head-col-gap: clamp(24px, 9.915px + 3.7559vw, 64px);
	--col-gap: clamp(40px, 23.099px + 4.5070vw, 88px);
	--card-pad-top: clamp(28px, 20.958px + 1.8779vw, 48px);
	--card-pad-bottom: clamp(32px, 23.549px + 2.2535vw, 56px);
	--card-pad-x: 48px;
	--contact-top: clamp(40px, 28.732px + 3.0047vw, 72px);
	--contact-rule-pad: clamp(32px, 26.366px + 1.5023vw, 48px);
	--hero-bottom: clamp(72px, 69.183px + 0.7512vw, 80px);
	--hero-h: clamp(747px, 718.479px + 7.6056vw, 828px);
	--engine-h: clamp(714px, 686.535px + 7.3239vw, 792px);
	--sport-h: clamp(600px, 576.761px + 6.1972vw, 666px);

	/* Type */
	--fs-display-xl: clamp(46px, 14.310px + 8.4507vw, 136px);
	--fs-display-l: clamp(48px, 19.831px + 7.5117vw, 128px);
	--fs-display-m: clamp(32px, 15.099px + 4.5070vw, 80px);
	--fs-heading-card: clamp(24px, 20.479px + 0.9390vw, 34px);
	--fs-lead-lg: clamp(18px, 16.592px + 0.3756vw, 22px);
	--fs-lead: clamp(17px, 15.944px + 0.2817vw, 20px);
	--fs-link-xl: clamp(24px, 18.366px + 1.5023vw, 40px);
	--fs-tags: clamp(12px, 11.648px + 0.0939vw, 13px);
	--ls-tags: clamp(1.68px, 1.2645px + 0.1108vw, 2.86px);
	--font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--abyss);
	color: var(--ink);
	font-family: var(--font);
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
figure,
ul,
ol {
	margin: 0;
}

ul[role="list"],
ol[role="list"],
.area-line,
.chips {
	list-style: none;
	padding: 0;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

address {
	font-style: normal;
}

:focus-visible {
	outline: 2px solid var(--brass);
	outline-offset: 3px;
}

::selection {
	background: var(--brass);
	color: var(--abyss);
}

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 18px;
	background: var(--brass);
	color: var(--abyss);
	font-weight: 800;
	text-decoration: none;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

.container {
	width: 100%;
	max-width: calc(var(--content-max) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Display headings — Archivo Expanded (wdth 125) ExtraBold, uppercase */
.display {
	font-weight: 800;
	font-stretch: 125%;
	line-height: 0.95;
	letter-spacing: -0.005em;
	text-transform: uppercase;
	overflow-wrap: break-word;
}

.display--xl {
	font-size: var(--fs-display-xl);
}

.display--l {
	font-size: var(--fs-display-l);
}

.display--m {
	font-size: var(--fs-display-m);
}

/* Button */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0 30px;
	border-radius: var(--radius);
	background: var(--brass);
	color: var(--abyss);
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	/* Matches the rendered Figma button widths (212px / 166px). */
	letter-spacing: 0.2em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.btn:hover {
	background: var(--brass-hi);
}

/* Full-bleed photo + overlay used by the hero and both bands */
.media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.media__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.scrim {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* The bundled photos already carry the Figma overlay; don't darken twice. */
.has-baked-scrim .scrim {
	display: none;
}

/* Customizer-only placeholder for an empty phone/email field */
.is-placeholder {
	opacity: 0.55;
	outline: 1px dashed currentColor;
	outline-offset: 4px;
}

/* ==========================================================================
   Header — over the hero, scrolls away with the page
   ========================================================================== */
.site-header {
	position: absolute;
	inset: 0 0 auto;
	z-index: 10;
	background: var(--rule-light);
	color: var(--gelcoat);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 22px;
}

.brand {
	display: flex;
	align-items: baseline;
	gap: 12px;
	min-width: 0;
	text-decoration: none;
}

.brand__mark {
	font-size: 26px;
	font-weight: 900;
	font-stretch: 125%;
	line-height: 1;
	letter-spacing: 0.02em;
}

.brand__descriptor {
	display: none;
	color: var(--mist);
	font-size: 13px;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.site-header__call {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
	white-space: nowrap;
}

.site-header__call:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (min-width: 640px) {
	.brand__descriptor {
		display: inline;
	}
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: var(--hero-h);
	padding: 120px 0 var(--hero-bottom);
	background: var(--abyss);
	color: var(--gelcoat);
	isolation: isolate;
}

.hero .media {
	z-index: -1;
}

.scrim--hero {
	background:
		linear-gradient(180deg, rgba(10, 28, 42, 0.55) 0%, rgba(10, 28, 42, 0) 24%, rgba(10, 28, 42, 0) 42%, rgba(10, 28, 42, 0.88) 100%),
		linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
}

.hero__body {
	display: flex;
	flex-direction: column;
	gap: 36px;
}

.hero__copy {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.hero__title {
	max-width: 1180px;
}

.hero__text {
	max-width: 440px;
	color: var(--foam);
	font-size: var(--fs-lead-lg);
	line-height: 1.45;
}

.hero__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px 36px;
}

.area-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.area-line li + li {
	display: flex;
	align-items: center;
	gap: 14px;
}

.area-line li + li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--brass);
}

/* ==========================================================================
   Services
   ========================================================================== */
.services {
	padding-block: var(--section-y);
	background: var(--gelcoat);
}

.services__head {
	display: flex;
	flex-direction: column;
	gap: var(--head-col-gap);
	margin-bottom: var(--head-gap);
}

.services__intro {
	max-width: 440px;
	color: var(--steel);
	font-size: 18px;
}

.service-grid {
	display: grid;
	grid-template-columns: 1fr;
	margin: 0;
	border-top: 1px solid var(--rule-light);
}

.service-card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: var(--card-pad-top) 0 var(--card-pad-bottom);
	border-bottom: 1px solid var(--rule-light);
}

.service-card__head {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.kind {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--steel);
	font-size: 13px;
	font-weight: 600;
}

.kind::before {
	content: "";
	flex: none;
	width: 22px;
	height: 2px;
	background: var(--brass);
}

.service-card__title {
	color: var(--ink);
	font-size: var(--fs-heading-card);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: 0.005em;
	text-transform: uppercase;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.chip {
	padding: 9px 13px;
	border: 1px solid var(--rule-light);
	border-radius: var(--radius);
	background: var(--white);
	color: var(--ink);
	font-size: 15px;
	line-height: 1;
}

/* ==========================================================================
   Photo bands (engine room, sportfish)
   ========================================================================== */
.band {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background: var(--abyss);
	color: var(--gelcoat);
	isolation: isolate;
}

.band .media {
	z-index: -1;
}

.band--engine {
	min-height: var(--engine-h);
	padding-block: var(--band-y);
}

/* Mobile overlay: darkens toward the text at the bottom */
.scrim--engine {
	background: linear-gradient(180deg, rgba(10, 28, 42, 0.2) 0%, rgba(10, 28, 42, 0.9) 70%);
}

/* The bundled engine photo has the desktop (left-side) overlay baked in.
   Below 900px the text sits at the bottom, so the mobile overlay still applies. */
@media (max-width: 899px) {
	.band--engine.has-baked-scrim .scrim--engine {
		display: block;
	}
}

/* Keep the boat in frame when the wide photo is cropped for narrow screens */
.band--sport .media__img {
	object-position: 40% 50%;
}

.band__body {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.band__title {
	max-width: 920px;
}

.band__text {
	max-width: 440px;
	color: var(--haze);
	font-size: var(--fs-lead);
}

.band--sport {
	min-height: var(--sport-h);
	padding-bottom: 32px;
}

.scrim--sport {
	background: linear-gradient(180deg, rgba(10, 28, 42, 0) 60%, rgba(10, 28, 42, 0.75) 100%);
}

.band__tags {
	opacity: 0.9;
	font-size: var(--fs-tags);
	font-weight: 600;
	letter-spacing: var(--ls-tags);
	text-transform: uppercase;
}

/* ==========================================================================
   Service area
   ========================================================================== */
.area {
	padding-block: var(--section-y);
	background: var(--abyss);
	color: var(--gelcoat);
}

.area__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--col-gap);
	align-items: center;
}

.area__copy {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.area__heading {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.area__title {
	max-width: 560px;
}

.area__text {
	max-width: 400px;
	color: var(--haze);
	font-size: var(--fs-lead);
}

.route {
	max-width: 420px;
	margin: 0;
}

.route__stop {
	position: relative;
	display: flex;
	gap: 18px;
}

.route__marker {
	position: relative;
	flex: none;
	width: 20px;
}

/* Dot: filled for the home base, outlined for the travel area */
.route__marker::before {
	content: "";
	position: absolute;
	top: 10px;
	left: 4px;
	width: 12px;
	height: 12px;
	border: 2px solid var(--brass);
	border-radius: 50%;
}

.route__stop:first-child .route__marker::before {
	background: var(--brass);
}

/* Dashed connector between stops */
.route__stop:not(:last-child) .route__marker::after {
	content: "";
	position: absolute;
	top: 26px;
	bottom: 0;
	left: 9px;
	border-left: 2px dashed var(--route-line);
}

.route__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.route__stop:not(:last-child) .route__text {
	padding-bottom: 28px;
}

.route__place {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.route__note {
	color: var(--mist);
	font-size: 15px;
}

.area__photo {
	overflow: hidden;
	border-radius: var(--radius);
	aspect-ratio: 4 / 3;
}

.area__photo .media__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
	padding-block: var(--section-y-lg);
	border-top: 1px solid var(--rule-dark);
	background: var(--abyss-2);
	color: var(--gelcoat);
	scroll-margin-top: 0;
}

.contact__title {
	margin-bottom: var(--contact-top);
}

.contact__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px var(--col-gap);
	padding-top: var(--contact-rule-pad);
	border-top: 1px solid var(--rule-dark);
}

.contact__address {
	display: flex;
	flex-direction: column;
	color: var(--haze);
	font-size: 18px;
	line-height: 1.7;
}

.contact__address strong {
	color: var(--gelcoat);
	font-weight: 700;
}

.contact__lines {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

.contact__line {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.contact__label {
	color: var(--mist);
	font-size: 13px;
	font-weight: 600;
}

.contact__link {
	font-size: var(--fs-link-xl);
	font-weight: 700;
	line-height: 1.15;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.contact__link:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.contact__cta {
	padding-top: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	padding-block: 40px;
	border-top: 1px solid var(--rule-dark);
	background: var(--abyss);
	color: var(--mist);
	font-size: 14px;
	line-height: 1.6;
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px 40px;
}

.site-footer__site,
.site-footer__meta {
	display: flex;
	flex-direction: column;
}

.site-footer__site strong {
	color: var(--gelcoat);
	font-weight: 800;
	letter-spacing: 0.02em;
}

/* ==========================================================================
   Tablet and up (900px): two-column layouts from the desktop design
   ========================================================================== */
@media (min-width: 900px) {
	.services__head {
		flex-direction: row;
		align-items: flex-end;
	}

	.services__head .display {
		flex: 1 1 0;
	}

	.services__intro {
		flex: 1 1 0;
	}

	.service-grid {
		grid-template-columns: 1fr 1fr;
	}

	.service-card:nth-child(odd) {
		padding-right: var(--card-pad-x);
	}

	.service-card:nth-child(even) {
		padding-left: var(--card-pad-x);
		border-left: 1px solid var(--rule-light);
	}

	/* Desktop overlay: darkens from the left, where the text sits */
	.scrim--engine {
		background: linear-gradient(90deg, rgba(10, 28, 42, 0.92) 0%, rgba(10, 28, 42, 0.55) 45%, rgba(10, 28, 42, 0) 75%);
	}

	.area__grid {
		grid-template-columns: 1fr 1fr;
	}

	.area__photo {
		aspect-ratio: 4 / 5;
	}

	.contact__grid {
		grid-template-columns: minmax(0, 556fr) minmax(0, 668fr);
	}
}

/* ==========================================================================
   Inner pages (privacy policy etc.) — plain readable layout
   ========================================================================== */
.is-inner .site-header {
	position: relative;
	background: var(--abyss);
}

.page {
	padding-block: 80px;
	background: var(--gelcoat);
	max-width: none;
}

.page__article {
	max-width: 720px;
	margin-inline: auto;
}

.page__title {
	margin-bottom: 32px;
	font-size: var(--fs-display-m);
	font-weight: 800;
	font-stretch: 125%;
	line-height: 0.95;
	text-transform: uppercase;
}

.page__content > * + * {
	margin-top: 1em;
}
