/*
Theme Name: Intuitive EV
Theme URI: https://intuitiveev.com
Description: Child theme of Twenty Twenty-Five for Intuitive EV. Dark look from intuitivedx.com, colors from the EVsure logo.
Author: Gibsonworks, LLC
Author URI: https://bekee.com
Template: twentytwentyfive
Version: 0.1.2
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: intuitive-ev
*/

/* Edge shading: the page darkens over its outer 100px on each side, fading to DX ink. */
body {
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 100px, transparent calc(100% - 100px), rgba(0, 0, 0, .35)),
		var(--wp--preset--color--dx-ink);
}

/* List markers take the link color. */
.wp-site-blocks li::marker { color: var(--wp--preset--color--ev-amber); }

/* Header: light blue band with the full-color logo. Nav dropdown arrows sit on the parent links. */
.ev-header { position: relative; z-index: 10; }
.ev-header .wp-block-site-logo img { display: block; height: 64px; width: auto; }
.ev-header .wp-block-navigation { font-size: 19px; }
.ev-header .wp-block-navigation .wp-block-navigation-item__content { padding: 8px 14px; }
/* A parent opens its dropdown on click. The arrow sits inside the toggle's right padding, so a click on it opens the menu too. */
.ev-header .wp-block-navigation .has-child > .wp-block-navigation-submenu__toggle { padding: 8px 30px 8px 14px; }
/* A mouse click shows no focus box on the toggle; keyboard focus keeps it. */
.ev-header .wp-block-navigation-submenu__toggle:focus:not(:focus-visible) { outline: none; }
.ev-header .wp-block-navigation .has-child > .wp-block-navigation-submenu__toggle +.wp-block-navigation__submenu-icon { margin: 0 14px 0 -26px; pointer-events: none; }
/* Desktop: each dropdown centers under its parent. */
@media (min-width: 600px) {
	.ev-header .wp-block-navigation .wp-block-navigation__container > .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
	}
}
/* Contact: an outlined button in EV navy, filled on hover. */
.ev-header .ev-nav-contact > .wp-block-navigation-item__content {
	border: 2px solid var(--wp--preset--color--ev-navy);
	border-radius: 6px;
	padding: 6px 16px;
	margin-left: 8px;
}
.ev-header .ev-nav-contact > .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--ev-navy);
	color: var(--wp--preset--color--white);
}
.ev-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--ev-mist) !important;
	border-radius: 6px;
	padding: 6px 0;
}
.ev-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { white-space: nowrap; }

/* Hero and title areas: one step lighter than DX ink, curved bottom, 4% logo watermark. */
.ev-hero {
	position: relative;
	overflow: hidden;
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 100px, transparent calc(100% - 100px), rgba(0, 0, 0, .35)),
		var(--wp--preset--color--hero-ink);
	border-radius: 0 0 50% 50% / 0 0 56px 56px;
}
.ev-hero::before {
	content: "";
	position: absolute;
	right: -60px;
	top: 50%;
	width: 520px;
	height: 540px;
	transform: translateY(-50%);
	background: url(assets/logos/EVsure_Icon_White.svg) no-repeat center / contain;
	opacity: .04;
	pointer-events: none;
}
.ev-hero > * { position: relative; }
/* A button after hero bullets gets more room and lines up with the bullet dots (22px at the 20px list size). */
.ev-hero ul.wp-block-list + .wp-block-buttons { margin-top: 32px; margin-left: 22px; }
@media (max-width: 480px) {
	.ev-hero::before { width: 280px; height: 290px; right: -50px; top: auto; bottom: -40px; transform: none; }
}

/* Screened logo mark on a dark section, half off the left or right edge. Same mark and strength as the hero's.
   overflow-x: clip crops it at the page edge but lets it run past the section's top and bottom. */
.ev-mark-left, .ev-mark-right { position: relative; overflow-x: clip; }
.ev-mark-left::before, .ev-mark-right::before {
	content: "";
	position: absolute;
	top: calc(50% + 100px);
	width: 520px;
	height: 540px;
	transform: translateY(-50%);
	background: url(assets/logos/EVsure_Icon_White.svg) no-repeat center / contain;
	opacity: .04;
	pointer-events: none;
}
.ev-mark-left::before { left: -260px; }
.ev-mark-right::before { right: -260px; }
.ev-mark-left > *, .ev-mark-right > * { position: relative; }
@media (max-width: 480px) {
	.ev-mark-left::before, .ev-mark-right::before { width: 280px; height: 290px; }
	.ev-mark-left::before { left: -140px; }
	.ev-mark-right::before { right: -140px; }
}

/* Contact band: the hero's blue with a curved top, so each page opens and closes on the same color. */
.ev-band {
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 100px, transparent calc(100% - 100px), rgba(0, 0, 0, .35)),
		var(--wp--preset--color--hero-ink);
	border-radius: 50% 50% 0 0 / 56px 56px 0 0;
}

/* Cards: ev-navy with the logo gradient as a 4px top edge, 8px radius. */
.ev-card {
	border-top: 4px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	background:
		linear-gradient(var(--wp--preset--color--ev-navy), var(--wp--preset--color--ev-navy)) padding-box,
		linear-gradient(90deg, var(--wp--preset--color--ev-flame), var(--wp--preset--color--ev-amber)) border-box;
}
.ev-card :where(p) { color: var(--wp--preset--color--nav-text); }

/* Research Use Only notice. */
.ev-ruo {
	display: block;
	border: 2px solid currentColor;
	padding: 8px 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* Rules: ev-orange at 60%. */
.wp-block-separator.is-style-ev-rule { border-color: rgba(206, 87, 27, .6); }

/* Eyebrow: the small label above a headline. 13px at 600, as on the published looks page. */
.ev-eyebrow {
	color: var(--wp--preset--color--ev-amber);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	margin-bottom: 0;
}

/* A product name as the eyebrow keeps its own capitalization ("EVsure," never "EVSURE"). Shawn, pin 3, 10/19. */
.ev-eyebrow.ev-eyebrow-name { text-transform: none; letter-spacing: .02em; }

/* Images in sections: 8px corners, like the cards. */
.ev-rounded img { border-radius: 8px; }

/* Card titles and links on the navy card. */
.ev-card .wp-block-post-title { font-size: var(--wp--preset--font-size--large); margin: 0; }
.ev-card .wp-block-post-title a { color: var(--wp--preset--color--white); text-decoration: none; }
/* On ev-navy, ev-mist (3.03:1) and ev-amber (3.53:1) fall short of 4.5:1, so the date and links on a card use light text (5.68:1) and white (7.03:1). */
.ev-card .wp-block-post-date { color: var(--wp--preset--color--nav-text); }
.ev-card a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--white); }
.ev-card .wp-block-read-more { text-decoration: underline; font-weight: 600; }

/* Pages open on their own hero, so nothing sits between the header and the first section, or between the last section and the footer. */
.wp-site-blocks > main,
.wp-site-blocks > main + footer,
main > .wp-block-post-content,
.wp-block-post-content > .alignfull:first-child { margin-block-start: 0; }
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }

/* Footer: the Contact band's blue with the same curved top, so every page closes on a curve.
   When the Contact band is the page's last section, the band carries the curve and the footer runs straight on from it. */
.ev-footer {
	border-radius: 50% 50% 0 0 / 56px 56px 0 0;
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 100px, transparent calc(100% - 100px), rgba(0, 0, 0, .35)),
		var(--wp--preset--color--hero-ink);
}

.wp-site-blocks:has(.wp-block-post-content > .ev-band:last-child) .ev-footer { border-radius: 0; }

/* Light Contact band (Home only; Janet, pin 14, 10/19): the header's blue, so Home closes on the color it opens with.
   The footer keeps its own curve over the band's blue. ev-navy on sky is 6.3:1. */
.ev-band-light { background: var(--wp--preset--color--sky); color: var(--wp--preset--color--ev-navy); }
.ev-band-light :where(h1, h2, h3, p) { color: var(--wp--preset--color--ev-navy); }
.wp-site-blocks:has(.wp-block-post-content > .ev-band-light:last-child) .ev-footer { border-radius: 50% 50% 0 0 / 56px 56px 0 0; }
.wp-site-blocks:has(.wp-block-post-content > .ev-band-light:last-child) > footer { background: var(--wp--preset--color--sky); }

/* Contact band: the address sits on the left and the call to action on the right, opposite the footer's Contact column.
   The call to action stays first in the reading order, and first when the columns stack on phones. */
@media (min-width: 782px) {
	.ev-band > .wp-block-columns { flex-direction: row-reverse; }
}

/* Page title: the hero band without columns, for pages that open on a title only. */
.ev-page-title h1 { margin-top: var(--wp--preset--spacing--10); }

/* EVsure section menu: sticks to the top of the window once the hero scrolls away. */
.ev-subnav { z-index: 5; }
/* With the script running, the bar is fixed at the top and hidden until the hero's buttons scroll away. Keyboard focus also shows it. */
.ev-js-subnav body .wp-block-group.ev-subnav {
	position: fixed;
	top: var(--wp-admin--admin-bar--position-offset, 0px);
	left: 0;
	right: 0;
	margin: 0 !important;
	z-index: 30;
	transform: translateY(-100%);
	visibility: hidden;
	transition: transform .2s ease, visibility .2s;
}
.ev-js-subnav body .wp-block-group.ev-subnav.is-shown,
.ev-js-subnav body .wp-block-group.ev-subnav:focus-within { transform: none; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .ev-js-subnav body .wp-block-group.ev-subnav { transition: none; } }
.ev-subnav .ev-subnav-menu a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ev-subnav .ev-subnav-name { margin: 0; white-space: nowrap; }
.ev-subnav .ev-subnav-menu { overflow-x: auto; flex: 1 1 auto; justify-content: center; }
.ev-subnav .ev-subnav-menu .wp-block-navigation__container { flex-wrap: nowrap; }
.ev-subnav .ev-subnav-menu a { color: var(--wp--preset--color--white); white-space: nowrap; font-size: var(--wp--preset--font-size--small); }
.ev-subnav .wp-block-button__link { padding: 6px 14px; font-size: var(--wp--preset--font-size--small); }
[id] { scroll-margin-top: 72px; }
@media (max-width: 781px) {
	.ev-subnav .ev-subnav-name, .ev-subnav .wp-block-buttons { display: none; }
	.ev-subnav .ev-subnav-menu { justify-content: flex-start; }
}

/* Specifications: a grid with thin lines between cells, an all caps label over each value. Not cards, because cards are links on this site. */
.ev-specs { gap: 0 !important; border-top: 1px solid rgba(255, 255, 255, .15); border-left: 1px solid rgba(255, 255, 255, .15); }
.ev-spec { gap: 4px !important; padding: 18px 20px; border-right: 1px solid rgba(255, 255, 255, .15); border-bottom: 1px solid rgba(255, 255, 255, .15); }
.ev-spec p { margin: 0; }
.ev-spec .ev-spec-label { color: var(--wp--preset--color--ev-mist); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.ev-spec .ev-spec-value { color: var(--wp--preset--color--white); font-weight: 600; }
* + .ev-specs { margin-top: var(--wp--preset--spacing--40); }
/* Quick specifications sits centered under its centered heading. */
.ev-specs.ev-specs-centered { max-width: 960px; margin-left: auto !important; margin-right: auto !important; }

/* Cards hold headings and text on ev-navy. */
.ev-card h3 { margin: 0; }
.ev-card p { margin: 0; }
.ev-card .ev-doc-type { color: var(--wp--preset--color--nav-text); }
/* Document cards: the title link stretches over the whole card, so the card is one link, named by its title. */
.ev-doc-card { position: relative; }
.ev-doc-card h3 a { text-decoration: none; }
.ev-doc-card h3 a::after { content: ""; position: absolute; inset: 0; }
.ev-doc-card h3 a:focus { outline: none; }
.ev-doc-card:has(h3 a:hover) h3 a { text-decoration: underline; }
.ev-doc-card:has(h3 a:hover) { background: linear-gradient(#4d63a0, #4d63a0) padding-box, linear-gradient(90deg, var(--wp--preset--color--ev-flame), var(--wp--preset--color--ev-amber)) border-box; }
.ev-doc-card:has(h3 a:focus-visible) { outline: 2px solid var(--wp--preset--color--ev-amber); outline-offset: 2px; }
/* Info items: not links, so no card. A short bar of the logo gradient sits above each one. */
.ev-info::before {
	content: "";
	display: block;
	width: 48px;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--wp--preset--color--ev-flame), var(--wp--preset--color--ev-amber));
	margin-bottom: 8px;
}
.ev-info h3, .ev-info p { margin: 0; }
.ev-info :where(p) { color: var(--wp--preset--color--nav-text); }
* + .ev-info-grid { margin-top: var(--wp--preset--spacing--40) !important; }
.ev-step-number { font-size: var(--wp--preset--font-size--x-large); font-weight: 700; color: var(--wp--preset--color--white); line-height: 1; }

/* Closing call to action: centered. */
.ev-closing h2 { margin-bottom: var(--wp--preset--spacing--30); }

/* Text links that close a section. */
.ev-text-link { font-weight: 600; }

/* FAQs (Yoast FAQ block): the GW FAQ Accordion plugin turns each question into an h3 wrapping a button.
   The gap under a question sits on the answer, so a collapsed question leaves no space below it. */
.schema-faq-section { padding: var(--wp--preset--spacing--30) 0; border-bottom: 1px solid rgba(160, 170, 198, .25); }
.schema-faq-question { display: block; margin: 0; color: var(--wp--preset--color--white); font-size: var(--wp--preset--font-size--large); }
.schema-faq-answer { margin: 0; padding-top: var(--wp--preset--spacing--10); }
.gw-faq { --gw-faq-marker-color: var(--wp--preset--color--ev-amber); --gw-faq-marker-size: 12px; }
.gw-faq .schema-faq-question button:focus-visible { outline: 2px solid var(--wp--preset--color--ev-amber); outline-offset: 4px; }

/* Contact form spot, until the form is built. */
.ev-form-placeholder { border: 2px dashed var(--wp--preset--color--ev-mist); border-radius: 8px; padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30); text-align: center; }

/* Body text in a full-width section stays at a readable line length (46rem) and lines up with the headings' left edge.
   The left margin replaces the constrained layout's centering: it is the gap a 1140px column leaves on the left.
   A centered paragraph keeps the full column, so it centers on the row. */
.wp-block-post-content > .alignfull > p:not(.ev-eyebrow):not(.has-text-align-center),
.wp-block-post-content > .alignfull > .wp-block-list {
	max-width: 46rem;
	margin-left: max(0px, calc((100% - 1140px) / 2)) !important;
	margin-right: auto !important;
}
.wp-block-yoast-faq-block .schema-faq-answer { max-width: 46rem; }

/* A diagram drawn for a white page gets a white backing, so its labels stay readable on the dark theme. */
.ev-on-light img { background: #fff; padding: 16px; } /* True white: the diagram itself is drawn on white. */

/* Event date and place: hidden when a post has none (news posts). */
.ev-event-date:empty, .ev-event-place:empty { display: none; }
.ev-event-date { font-weight: 600; color: var(--wp--preset--color--white); }
.ev-card .ev-event-date, .ev-card .ev-event-place { font-size: var(--wp--preset--font-size--small); }
.ev-page-title .ev-event-date, .ev-page-title .ev-event-place, .ev-page-title .ev-post-date { margin: 0; }
.ev-page-title .ev-eyebrow a { color: inherit; text-decoration: none; }
.ev-card .wp-block-post-featured-image { margin: 0 0 var(--wp--preset--spacing--10); }
.ev-card .wp-block-post-featured-image img { border-radius: 6px; }
/* An event shows its event date, not the date it was posted. */
.ev-page-title:has(.ev-event-date:not(:empty)) .ev-post-date { display: none; }

/* Contact form (Fluent Forms). The Send button matches the site's buttons; focus uses the amber ring; error text stays readable at body size. */
.fluentform .ff-el-form-control:focus { outline: 2px solid var(--wp--preset--color--ev-amber); outline-offset: 2px; }
.fluentform .ff-el-form-check-input { accent-color: var(--wp--preset--color--ev-amber); width: 1.125rem; height: 1.125rem; margin-right: 0.5rem; vertical-align: -0.2em; }
.fluentform .ff-el-form-check-input:focus-visible { outline: 2px solid var(--wp--preset--color--ev-amber); outline-offset: 2px; }
.fluentform .ff-el-is-error .text-danger { font-size: var(--wp--preset--font-size--small, 1rem); margin-top: 0.375rem; }
.fluentform .ff-btn-submit.ff-btn {
	background: var(--wp--preset--color--ev-amber); color: var(--wp--preset--color--dx-ink); border: 0; border-radius: 6px;
	font-size: var(--wp--preset--font-size--medium); font-weight: 700; padding: 10px 20px; opacity: 1;
}
.fluentform .ff-btn-submit.ff-btn:hover { background: var(--wp--preset--color--white); color: var(--wp--preset--color--dx-ink); }
.fluentform .ff-btn-submit.ff-btn:focus-visible { outline: 2px solid var(--wp--preset--color--ev-amber); outline-offset: 2px; }
.fluentform .ff-message-success { background: transparent; border: 1px solid var(--wp--preset--color--ev-mist); color: var(--wp--preset--color--body-text); box-shadow: none; }

/* Workflow images above each step on EVsure. The crops are drawn on white. */
.ev-workflow .ev-workflow-img { margin: 0 0 var(--wp--preset--spacing--30); }
.ev-workflow .ev-workflow-img img { width: 100%; height: auto; }
/* Stacked on a phone, the narrow crops would fill the width and tower; cap their height instead. */
@media (max-width: 781px) {
	.ev-workflow .ev-workflow-img img { width: auto; max-width: 100%; max-height: 220px; }
}
