/* LinePro Energy. Tokens live in theme.json; this file is layout and components. */

:root {
	--navy: var(--wp--preset--color--navy);
	--gray: var(--wp--preset--color--gray);
	--steel: var(--wp--preset--color--steel);
	--amber: var(--wp--preset--color--amber);
	--gutter: clamp(16px, 4vw, 40px);
	--section: clamp(56px, 8vw, 112px);
	--head: var(--wp--preset--font-family--heading);
}

html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
.lp-main > *, .lp-main .wp-block-post-content > .lp-section { margin-block: 0; }
.wp-site-blocks > * { margin-block: 0; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.lp-white :focus-visible, .lp-gray :focus-visible { outline-color: var(--navy); }

h1, h2, h3 { margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
a { text-underline-offset: .18em; }

/* Sections */
.lp-section { padding-block: var(--section); }
.lp-wrap { box-sizing: content-box; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* Grid and flex children: cancel WordPress's flow-layout top margin so items line up */
.lp-header > *, .lp-services__grid > *, .lp-split > *, .lp-values > *,
.lp-steps > *, .lp-photo-row > *, .lp-strip__photos > *, .lp-strip__head > *, .lp-contact__grid > *,
.lp-hero > *, .wp-block-buttons > *, .lp-events .wp-block-post-template > * { margin-block: 0; }
.lp-white { background: #fff; color: var(--navy); }
.lp-gray { background: var(--gray); color: var(--navy); }
.lp-navy { background: var(--navy); color: #fff; }
.lp-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.45; }

/* Buttons */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.wp-block-button { margin: 0; }
.wp-block-button__link {
	display: inline-block;
	padding: 13px 24px;
	background: var(--amber);
	color: var(--navy);
	border: 2px solid var(--amber);
	border-radius: 2px;
	font-family: var(--head);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}
.wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--navy); }
.lp-white .wp-block-button__link:hover, .lp-gray .wp-block-button__link:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.is-style-outline .wp-block-button__link { background: transparent; border-color: currentColor; color: inherit; }
.is-style-outline .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--navy); }

/* Header */
.lp-header {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 72px;
	padding-inline: max(var(--gutter), calc((100% - 1200px) / 2));
	background: var(--navy);
	color: #fff;
}
.admin-bar .lp-header { top: 32px; }
.lp-logo { display: block; margin-right: auto; line-height: 0; }
.lp-logo img { width: 158px; height: auto; }
.lp-header .wp-block-buttons { margin: 0; flex: none; }
.lp-header .wp-block-button__link { padding: 8px 14px; font-size: 1.125rem; white-space: nowrap; }
.lp-nav { font-family: var(--head); font-size: 1.25rem; font-weight: 600; order: 3; }
.lp-nav a { text-decoration: none; }
.lp-nav .wp-block-navigation__responsive-container-open { color: #fff; padding: 8px; }
.lp-nav .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }
.lp-header .lp-nav:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open { background: var(--navy); color: #fff; padding: 20px var(--gutter); }
.lp-nav .is-menu-open .wp-block-navigation__responsive-container-content { font-size: 2rem; }
.lp-nav .wp-block-navigation__responsive-container-close svg { width: 30px; height: 30px; }
.lp-nav .wp-block-navigation-item__content { display: inline-block; padding-block: 6px; }
.lp-nav .wp-block-navigation-item__content:hover { color: var(--amber); }

@media (min-width: 960px) {
	.lp-logo img { width: 180px; }
	.lp-nav { order: 0; margin-right: 12px; }
	.lp-nav-contact { display: none !important; }
	.lp-nav .wp-block-navigation__container { gap: 28px; }
	.lp-header .wp-block-button__link { padding: 9px 20px; font-size: 1.25rem; }
}

/* Hero: the one loud thing on the site */
.lp-hero {
	position: relative;
	display: grid;
	align-items: end;
	min-height: min(88svh, 860px);
	background: var(--navy);
	color: #fff;
	isolation: isolate;
}
.lp-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(to right, rgb(18 38 58 / .8) 0%, rgb(18 38 58 / .55) 60%, rgb(18 38 58 / 0) 92%),
		linear-gradient(to top, rgb(18 38 58 / .92) 0%, rgb(18 38 58 / .55) 45%, rgb(18 38 58 / .1) 80%);
}
.lp-hero .wp-block-image { position: absolute; inset: 0; z-index: -2; margin: 0; }
.lp-hero .wp-block-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.lp-hero__content {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(1200px + 2 * var(--gutter));
	margin-inline: auto;
	padding: 120px var(--gutter) clamp(40px, 6vw, 72px);
}
.lp-hero h1 {
	margin-bottom: .32em;
	font-size: clamp(2.55rem, 6.6vw, 5.75rem);
	line-height: .98;
	text-wrap: wrap;
	letter-spacing: -.005em;
}
.lp-hero p { max-width: 52ch; font-size: var(--wp--preset--font-size--large); line-height: 1.4; }

/* Service cards */
.lp-services__grid { display: grid; gap: 32px 40px; }
@media (min-width: 620px) { .lp-services__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .lp-services__grid { grid-template-columns: repeat(4, 1fr); } }
.lp-lead + .lp-services__grid, .lp-lead + .lp-steps { margin-top: 36px; }
.lp-service { padding-top: 16px; border-top: 4px solid var(--navy); }
.lp-service h3 { margin-bottom: .45em; }

/* Text beside photo */
.lp-split { display: grid; gap: 36px clamp(40px, 6vw, 88px); align-items: center; }
@media (min-width: 800px) { .lp-split { grid-template-columns: 1fr 1fr; } }
.lp-split__media .wp-block-image { margin: 0; }
.lp-split__media img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 799px) {
	.lp-split--reverse .lp-split__media { order: 2; }
	.lp-split__media img { aspect-ratio: 5 / 4; }
}
.lp-split__media .wp-element-caption { margin: 12px 0 0; font-size: var(--wp--preset--font-size--small); line-height: 1.4; text-align: left; color: inherit; }

/* Rodeo strip: tall photos butted together like a line of structures */
.lp-strip { padding-bottom: 0; }
.lp-strip__head { display: grid; gap: 0 48px; margin-bottom: clamp(32px, 5vw, 56px); }
.lp-strip__head .wp-block-buttons { margin-top: 12px; }
@media (min-width: 800px) {
	.lp-strip__head { grid-template-columns: 1fr auto; align-items: end; }
	.lp-strip__head .wp-block-buttons { margin-top: 0; }
}
.lp-strip__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
@media (min-width: 800px) { .lp-strip__photos { grid-template-columns: repeat(4, 1fr); } }
.lp-strip__photos .wp-block-image { margin: 0; }
.lp-strip__photos img { display: block; width: 100%; aspect-ratio: 3 / 5; object-fit: cover; }

/* Message band */
.lp-band h2 { max-width: 20ch; }

/* Interior page opener */
.lp-pagehead { padding-block: clamp(48px, 7vw, 88px); }
.lp-pagehead h1 { margin-bottom: .3em; }
.lp-pagehead p { max-width: 62ch; }
.lp-pagehead p:only-of-type { margin-bottom: 0; }

/* Value tiles */
.lp-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 32px; }
.lp-value { padding: 28px 16px 24px; background: #fff; }
.lp-value h3 { margin: 0; }

/* Join steps: an actual sequence, so numbered */
.lp-steps { counter-reset: step; display: grid; gap: 24px; }
@media (min-width: 800px) { .lp-steps { grid-template-columns: 1fr 1fr; gap: 56px; } }
.lp-step { counter-increment: step; display: grid; grid-template-columns: 2.75rem 1fr; gap: 0 14px; align-content: start; }
.lp-step::before {
	content: counter(step);
	grid-row: span 2;
	font-family: var(--head);
	font-size: clamp(3.5rem, 6vw, 5rem);
	font-weight: 700;
	line-height: .85;
	color: var(--amber);
}
.lp-step > * { grid-column: 2; }
.lp-photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
@media (min-width: 800px) { .lp-photo-row { grid-template-columns: repeat(4, 1fr); } }
.lp-photo-row .wp-block-image { margin: 0; }
.lp-photo-row img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.lp-section.lp-photos { padding: 0; }
.lp-section.lp-photos > .lp-wrap { max-width: none; padding: 0; }

/* Events */
.lp-events .wp-block-post-template { display: grid; gap: 48px 32px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 680px) { .lp-events .wp-block-post-template { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .lp-events .wp-block-post-template { grid-template-columns: repeat(3, 1fr); } }
.lp-event__img { margin: 0 0 16px; }
.lp-event__img img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.lp-event__title { margin: 0 0 .3em; }
.lp-event__title a { text-decoration: none; }
.lp-event__title a:hover { text-decoration: underline; }
.lp-event__loc { margin: 0; font-weight: 500; }
.lp-event__date { color: var(--steel); }
.lp-gray .lp-event__date { color: #45566a; }
.lp-navy .lp-event__date { color: #fff; opacity: .85; }
.lp-pagehead .lp-event__loc { font-size: var(--wp--preset--font-size--large); }
.lp-event__more { display: inline-block; margin-top: 10px; font-weight: 600; text-decoration: underline; }
.event-cat-in-the-field .lp-event__date { display: none; }

/* Event gallery */
.lp-gallery-wrap .wp-block-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
@media (min-width: 680px) { .lp-gallery-wrap .wp-block-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .lp-gallery-wrap .wp-block-gallery { grid-template-columns: repeat(4, 1fr); } }
.lp-gallery-wrap .wp-block-gallery .wp-block-image { width: auto !important; margin: 0 !important; }
.lp-gallery-wrap .wp-block-gallery img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.lp-back { margin-top: 40px; font-weight: 600; }

/* Contact */
.lp-contact__grid { display: grid; gap: 40px clamp(40px, 7vw, 96px); }
@media (min-width: 880px) { .lp-contact__grid { grid-template-columns: 5fr 6fr; } }
.lp-contact h1 { font-size: clamp(2.5rem, 4.2vw, 3.5rem); }
.lp-people { margin-top: 28px; padding-top: 16px; border-top: 4px solid var(--navy); }
.lp-people p { margin-bottom: .35em; }

/* Contact form (Contact Form 7 markup, styled to match the site) */
.wpcf7 form > p { max-width: none; margin: 0 0 20px; }
.wpcf7 label { display: block; font-weight: 600; }
.wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.wpcf7 input:not([type="submit"]), .wpcf7 select, .wpcf7 textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 12px 14px;
	border: 2px solid var(--steel);
	border-radius: 2px;
	background-color: #fff;
	color: var(--navy);
	font: inherit;
	font-weight: 400;
}
.wpcf7 textarea { height: 170px; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { border-color: var(--navy); outline: 3px solid var(--amber); outline-offset: 0; }
.wpcf7 [aria-invalid="true"] { border-color: #B3261E; }
.wpcf7-not-valid-tip { display: block; margin-top: 6px; color: #B3261E; font-size: 1rem; font-weight: 500; }
.wpcf7 form > .lp-form-note { padding: 14px 16px; border-left: 6px solid var(--amber); background: var(--gray); }
.wpcf7-turnstile { margin-bottom: 20px; min-height: 65px; }
.wpcf7-submit {
	padding: 13px 24px;
	background: var(--amber);
	color: var(--navy);
	border: 2px solid var(--amber);
	border-radius: 2px;
	font-family: var(--head);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}
.wpcf7-submit:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.wpcf7 .wpcf7-spinner { margin: 0 0 0 12px; vertical-align: middle; }
.wpcf7 form > .lp-form__privacy { margin-bottom: 0; font-size: var(--wp--preset--font-size--small); }
.wpcf7 form .wpcf7-response-output { margin: 20px 0 0; padding: 16px 18px; border: 0; border-left: 6px solid #B3261E; background: var(--gray); font-weight: 500; }
.wpcf7 form.sent .wpcf7-response-output { border-left-color: var(--amber); font-size: var(--wp--preset--font-size--large); }
.wpcf7 form.sent > p, .wpcf7 form.sent > .wpcf7-turnstile { display: none; }

/* Prose pages */
.lp-prose { max-width: 720px; }
.lp-prose h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-top: 1.4em; }

/* Footer */
.lp-footer { padding-block: clamp(48px, 6vw, 72px) 28px; background: var(--navy); color: #fff; }
.lp-footer__inner { box-sizing: content-box; display: grid; gap: 36px; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 800px) { .lp-footer__inner { grid-template-columns: 1fr auto; gap: 96px; } }
.lp-footer__brand img { display: block; width: 216px; height: auto; margin-bottom: 18px; }
.lp-footer__brand p { max-width: 46ch; }
.lp-footer__nav { display: grid; gap: 4px; font-family: var(--head); font-size: 1.25rem; font-weight: 600; }
.lp-footer__nav a { padding-block: 5px; text-decoration: none; }
.lp-footer__nav a:hover { color: var(--amber); }
.lp-footer__copy { box-sizing: content-box; max-width: 1200px; margin: 36px auto 0; padding-inline: var(--gutter); font-size: var(--wp--preset--font-size--small); opacity: .85; }

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
