/* ============================================================================
   Inertia Resources — modern brand layer
   ----------------------------------------------------------------------------
   Loaded AFTER style.css so it cascades over the legacy rules without needing
   a risky rewrite of 2,500 lines that ~3,000 pages depend on. Everything here
   is additive: new tokens, refined typography, the expandable-content
   component, and the animated energy vectors.
   ============================================================================ */

:root {
    /* Type -------------------------------------------------------------- */
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Brand ink. The legacy --teal (#4FB3A3) sits at ~2.2:1 on white, which
       fails WCAG for text. These deeper tones are for anything you read;
       --teal stays the fill/accent colour it always was. */
    --teal-ink: #1F6B5E;
    --teal-soft: rgba(79, 179, 163, 0.10);
    --teal-tint: #F1F9F7;
    --orange-ink: #A96708;
    --ink: #14141F;
    --ink-muted: #565F6E;
    --hairline: #E8ECEF;
    --surface: #FBFCFC;

    /* Motion. One expo-out curve used everywhere reads as "smooth" far more
       than a mix of ad-hoc eases does. */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --dur: 0.45s;

    /* Shape */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 999px;

    /* Layered shadows — two stacked shadows read softer than one big blur */
    --shadow-sm: 0 1px 2px rgba(20, 20, 31, 0.04), 0 2px 6px rgba(20, 20, 31, 0.04);
    --shadow-md: 0 2px 4px rgba(20, 20, 31, 0.04), 0 8px 20px rgba(20, 20, 31, 0.06);
    --shadow-lg: 0 4px 8px rgba(20, 20, 31, 0.04), 0 18px 40px rgba(20, 20, 31, 0.08);
    --shadow-xl: 0 8px 16px rgba(20, 20, 31, 0.05), 0 32px 68px rgba(20, 20, 31, 0.12);
    --shadow-teal: 0 6px 24px rgba(47, 122, 110, 0.22);
}

/* ============================================================================
   1. Typography
   ========================================================================== */

body {
    font-family: var(--font-body);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'ss01';
    letter-spacing: -0.006em;
}

/* Deliberately sets no colour. Several sections (markets, CTA) are dark bands
   that set `color: white` on the section — pinning headings to --ink here would
   paint them near-black on near-black. Inheritance already resolves to --ink
   from body everywhere else. */
h1, h2, h3, h4, h5, h6,
.section-title, .hero-text h1, .category-title,
.hero-stat-number, .result-number, .overlay-card-value, .market-abbr {
    font-family: var(--font-display);
    font-weight: 700;
}

/* Optical letter-spacing: the larger the type, the tighter it wants to be. */
.hero-text h1 { font-size: clamp(2.4rem, 4.6vw, 3.9rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; }
.section-title { font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
h2 { letter-spacing: -0.028em; line-height: 1.15; }
h3 { letter-spacing: -0.022em; line-height: 1.25; }
h4, h5, h6 { letter-spacing: -0.015em; line-height: 1.3; }

.hero-text .subtitle,
.section-description {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.65;
    color: var(--ink-muted);
    letter-spacing: -0.008em;
    font-weight: 400;
}

/* Measure control — long lines are the main reason dense pages feel unreadable. */
.section-description { max-width: 62ch; }
.section-header .section-description { margin-left: auto; margin-right: auto; }
.service-card p, .industry-content p, .process-step p { max-width: 56ch; }

p { color: var(--ink-muted); }
.service-card h3, .industry-content h3 { color: var(--ink); }

/* Numerals: tabular so counting stats don't jitter mid-animation. */
.hero-stat-number, .result-number, .overlay-card-value, [data-count] {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    font-weight: 800;
}

/* Eyebrow labels */
.section-label {
    font-family: var(--font-display);
    background: var(--teal-soft);
    color: var(--teal-ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.45rem 1rem;
    border-radius: var(--r-pill);
}

.hero-stat-label, .result-label, .overlay-card-label {
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--ink-muted);
}

/* The highlight underline was an absolutely-positioned ::after on an
   inline-block. When the highlighted phrase wrapped to two lines the
   inline-block stretched to the full column, so the rule ran the entire width
   of the hero instead of sitting under the words. A painted background
   underline wraps with the text, and box-decoration-break gives each line
   fragment its own rule. */
.hero-text h1 .highlight {
    color: var(--teal-ink);
    display: inline;
    background-image: linear-gradient(90deg, var(--orange) 0%, var(--teal) 100%);
    background-repeat: no-repeat;
    background-position: 0 94%;
    background-size: 100% 0.11em;
    padding-bottom: 0.06em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.hero-text h1 .highlight::after { content: none; }

.js-motion .hero-text h1 .highlight { animation: brand-underline 1s var(--ease) 0.25s both; }
.section-title .highlight { color: var(--teal-ink); }

@keyframes brand-underline {
    from { background-size: 0 0.11em; }
    to { background-size: 100% 0.11em; }
}

/* ============================================================================
   2. Navigation
   ========================================================================== */

nav {
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: var(--hairline);
    box-shadow: var(--shadow-sm);
}

.nav-link {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.25s var(--ease-soft);
}

.mega-menu {
    border-radius: var(--r-lg);
    border: 1px solid var(--hairline);
    box-shadow: var(--shadow-xl);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}

.mega-menu-column h3 {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--teal-ink);
}

.mega-menu-column a { transition: color 0.2s var(--ease-soft), transform 0.2s var(--ease-soft); }
.mega-menu-column a:hover { transform: translateX(3px); }

/* Breadcrumbs on the ~2,900 programmatic pages are marked up as <nav
   class="crumbs">, so they inherited `position: fixed; top: 0; width: 100%;
   z-index: 1000` from the bare `nav` selector and were pinned on top of the
   site header — the trail sat over the menu on every one of those pages. A
   breadcrumb belongs in the document flow; .crumbs declares no `position` of
   its own, so it needs an explicit reset. Predates the brand layer. */
.crumbs {
    position: static;
    width: auto;
    z-index: auto;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 0;
    /* Clears the fixed header, which the following .hero used to do itself. */
    margin-top: 77px;
}
.crumbs + .hero { margin-top: 0; }

@media (max-width: 768px) {
    .crumbs { margin-top: 70px; }
}

/* ============================================================================
   3. Buttons
   ========================================================================== */

.btn {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.012em;
    border-radius: var(--r-pill);
    padding: 0.95rem 1.9rem;
    transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease), background-color 0.25s var(--ease-soft), color 0.25s var(--ease-soft);
    position: relative;
    overflow: hidden;
}

/* Arrows inside buttons ease forward on hover — a small, cheap sign of life. */
.btn > .btn-arrow,
.btn::after { transition: transform 0.32s var(--ease); }
.btn:hover > .btn-arrow { transform: translateX(4px); }

.btn-primary {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-ink) 100%);
    box-shadow: var(--shadow-teal);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(47, 122, 110, 0.32); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    border: 1.5px solid rgba(47, 122, 110, 0.35);
    color: var(--teal-ink);
    background: transparent;
}
.btn-secondary:hover { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; transform: translateY(-2px); }

.btn-white { border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 700; }

:where(a, button, summary):focus-visible {
    outline: 2px solid var(--teal-ink);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

/* ============================================================================
   4. Surfaces & cards
   ========================================================================== */

.service-card, .industry-card, .result-card, .market-card,
.hero-overlay-card, .stat-card, .content-card {
    border-radius: var(--r-lg);
    border-color: var(--hairline);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.service-card { padding: 2rem; background: #fff; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(79, 179, 163, 0.4); }
.service-card::before { background: linear-gradient(90deg, var(--teal) 0%, var(--orange) 100%); height: 3px; }

.industry-card { overflow: hidden; }
.industry-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.industry-card img { transition: transform 0.7s var(--ease); }
.industry-card:hover img { transform: scale(1.05); }

.hero-image-container { border-radius: var(--r-xl); box-shadow: var(--shadow-xl); }
.hero-overlay-card { border-radius: var(--r-lg); box-shadow: var(--shadow-xl); }
.hero-badge { border-radius: var(--r-pill); box-shadow: 0 8px 26px rgba(245, 166, 35, 0.35); animation: brand-bob 5s var(--ease-soft) infinite; }

.result-card { background: #fff; }
.result-number { color: var(--teal-ink); }

/* The checkmark bullets were a glyph from whatever font the OS fell back to,
   so they rendered a different size and weight on every machine. A drawn mark
   is consistent everywhere and reads lighter next to the new type. */
.industry-list li { color: var(--ink-muted); padding-left: 1.6rem; }
.industry-list li::before {
    content: '';
    top: 0.95em;
    width: 9px;
    height: 5px;
    border-left: 2px solid var(--teal);
    border-bottom: 2px solid var(--teal);
    border-radius: 1px;
    transform: rotate(-45deg);
}

.service-link {
    color: var(--teal-ink);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.3s var(--ease), color 0.25s var(--ease-soft);
}
.service-link:hover { gap: 0.7rem; color: var(--orange-ink); }

@keyframes brand-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================================================
   5. Expandable content
   ----------------------------------------------------------------------------
   <details class="xp"> with a <summary class="xp-head"> and a
   <div class="xp-body"><div class="xp-inner">…</div></div>. The
   grid-template-rows 0fr → 1fr trick animates to the content's real height
   with no JS measuring and no max-height guesswork.
   ========================================================================== */

.xp {
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    background: #fff;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.xp:hover { border-color: rgba(79, 179, 163, 0.45); }
.xp[open] { border-color: rgba(79, 179, 163, 0.5); box-shadow: var(--shadow-sm); }

.xp-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.018em;
    color: var(--ink);
    transition: background-color 0.25s var(--ease-soft), color 0.25s var(--ease-soft);
}

.xp-head::-webkit-details-marker { display: none; }
.xp-head:hover { background: var(--teal-tint); }
.xp[open] > .xp-head { color: var(--teal-ink); }

/* The label may be a span or a real heading (xp_open's 'as' option). Either
   way it must look identical — headings otherwise drag in their own size,
   weight and margins from the base sheet. */
.xp-head .xp-label {
    flex: 1;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.4;
    letter-spacing: inherit;
    color: inherit;
}

/* Optional short summary line that stays visible when collapsed */
.xp-hint {
    display: block;
    font-family: var(--font-body);
    font-size: 0.87rem;
    font-weight: 400;
    color: var(--ink-muted);
    letter-spacing: -0.005em;
    margin-top: 0.2rem;
}

/* Count chip, e.g. "6 sectors" */
.xp-count {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--teal-ink);
    background: var(--teal-soft);
    padding: 0.22rem 0.6rem;
    border-radius: var(--r-pill);
    white-space: nowrap;
}

/* Plus → minus chevron */
.xp-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--teal-soft);
    display: grid;
    place-items: center;
    transition: background-color 0.3s var(--ease-soft), transform 0.4s var(--ease);
}
.xp-icon svg { width: 12px; height: 12px; stroke: var(--teal-ink); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.xp[open] > .xp-head .xp-icon { transform: rotate(180deg); background: var(--teal); }
.xp[open] > .xp-head .xp-icon svg { stroke: #fff; }

.xp-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--dur) var(--ease);
}
.xp[open] > .xp-body { grid-template-rows: 1fr; }

/* .is-closing is set by main.js for the duration of the collapse, while [open]
   is still on the element — a closed <details> hides its children instantly,
   which would kill the transition. These rules must stay AFTER the [open] rules
   above: identical specificity, so source order decides the winner. */
.xp.is-closing > .xp-body { grid-template-rows: 0fr; }
.xp.is-closing > .xp-body .xp-inner > * { opacity: 0; transform: translateY(-4px); transition-delay: 0s; }
.xp.is-closing > .xp-head { color: var(--ink); }
.xp.is-closing > .xp-head .xp-icon { transform: none; background: var(--teal-soft); }
.xp.is-closing > .xp-head .xp-icon svg { stroke: var(--teal-ink); }

.xp-inner {
    overflow: hidden;
    min-height: 0;
}

/* Content fades in slightly behind the height so it doesn't look squashed */
.xp-inner > * {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.35s var(--ease-soft) 0.1s, transform 0.35s var(--ease) 0.1s;
}
.xp[open] > .xp-body .xp-inner > * { opacity: 1; transform: none; }

.xp-pad { padding: 0.25rem 1.4rem 1.4rem; }
.xp-pad p { margin-bottom: 0.9rem; }
.xp-pad p:last-child { margin-bottom: 0; }

/* Two-column list inside an expandable — used for service breakdowns */
.xp-list {
    display: grid;
    /* 300px, not 260: inside the 900px accordion this resolves to two
       columns instead of three, and three left each blurb about 24 characters
       wide — narrower than the text wants to be. */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.3rem 2.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.xp-list li { padding-left: 1.4rem; position: relative; }
.xp-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--orange));
}
.xp-list strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.015em;
    margin-bottom: 0.15rem;
}
.xp-list span { font-size: 0.93rem; color: var(--ink-muted); line-height: 1.55; }

/* Grouped accordion wrapper */
.xp-group { max-width: 900px; margin: 0 auto; }

/* ----------------------------------------------------------------------------
   Accordions built at runtime from .service-category (see main.js). The heading
   node is moved in as-is, so it arrives carrying .category-title's own 1.75rem
   display sizing and the section's left border — both have to be neutralised.
   -------------------------------------------------------------------------- */
.xp-cat { margin-bottom: 0.9rem; }
.xp-cat > .xp-head .category-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: inherit;
    border: 0;
    padding: 0;
    margin: 0;
}
.xp-cat > .xp-head .category-title::before,
.xp-cat > .xp-head .category-title::after { content: none; }

/* The moved .service-items keeps its own grid; it just needs breathing room. */
.xp-cat .xp-pad { padding: 0.4rem 1.4rem 1.4rem; }
.xp-cat .service-items { gap: 1rem; }
.xp-cat .service-item { padding: 1.15rem 1.25rem; border-radius: var(--r-sm); }
.xp-cat .service-item h4 { font-size: 1rem; margin-bottom: 0.35rem; }
.xp-cat .service-item p { font-size: 0.94rem; line-height: 1.6; margin: 0; }

/* Bare number in the chip needs to read as a count, not a random figure. */
.xp-cat .xp-count::after { content: ' details'; opacity: 0.75; }

/* .services-categories is a grid; converted panels are its items now. */
.services-categories { gap: 0.9rem; }

@media (max-width: 768px) {
    .xp-cat > .xp-head .category-title { font-size: 0.98rem; }
    .xp-cat .xp-pad { padding: 0.4rem 1rem 1.1rem; }
}

/* ----------------------------------------------------------------------------
   Inline "show more" toggle — for lists that are too long to show in full but
   too short to deserve their own accordion. Progressive: without JS the button
   is hidden and the full list shows.
   -------------------------------------------------------------------------- */

.more-toggle { display: none; }

/* main.js folds items with the `hidden` property so each element keeps its own
   natural display when revealed. A few rules in the base sheet set `display`
   on these elements, which would out-specify the UA's `[hidden]` rule — hence
   the !important. */
[hidden] { display: none !important; }

/* Newly revealed items ease in instead of snapping into the layout. */
.more-shown { animation: brand-fade-up 0.4s var(--ease) both; }

.js-motion .more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0.4rem 0;
    margin-top: 0.35rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--teal-ink);
    transition: color 0.25s var(--ease-soft), gap 0.3s var(--ease);
}
.js-motion .more-toggle:hover { color: var(--orange-ink); gap: 0.65rem; }
.more-toggle svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.6; fill: none; stroke-linecap: round; transition: transform 0.35s var(--ease); }
.is-open > .more-toggle svg,
.is-open .more-toggle svg { transform: rotate(180deg); }

@keyframes brand-fade-up {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: none; }
}

/* ============================================================================
   6. Animated energy vectors
   ----------------------------------------------------------------------------
   Markup comes from includes/energy-vectors.php. All motion is paused for
   prefers-reduced-motion at the bottom of this file.
   ========================================================================== */

.ev { display: block; overflow: visible; }
.ev-inline { display: inline-block; vertical-align: middle; }

/* transform-box makes percentage/keyword transform-origins resolve against the
   shape's own box instead of the whole viewBox — without it every rotation and
   scale below pivots around the wrong point. */
.ev-rotor, .ev-rays, .ev-sun, .ev-ray, .ev-dot, .ev-fill, .ev-bolt, .ev-needle {
    transform-box: fill-box;
}

/* Meter needle — sweeps back and forth instead of spinning. */
.ev-needle {
    transform-origin: center;
    animation: ev-needle 3.4s var(--ease-soft) infinite;
}
@keyframes ev-needle {
    0%, 100% { transform: rotate(-38deg); }
    50% { transform: rotate(42deg); }
}

/* --- Wind turbine: rotor spins around its hub -------------------------- */
.ev-rotor {
    transform-origin: center;
    animation: ev-spin 7s linear infinite;
}
.ev-rotor--slow { animation-duration: 11s; }
.ev-rotor--fast { animation-duration: 4.5s; }

@keyframes ev-spin { to { transform: rotate(360deg); } }

/* --- Solar: rays breathe outward, panel glints ------------------------- */
.ev-rays {
    transform-origin: center;
    animation: ev-rays 4s var(--ease-soft) infinite;
}
.ev-ray { transform-origin: center; }
.ev-sun { animation: ev-sun 4s var(--ease-soft) infinite; transform-origin: center; }

@keyframes ev-rays {
    0%, 100% { opacity: 0.45; transform: scale(0.94) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.06) rotate(15deg); }
}
@keyframes ev-sun {
    0%, 100% { opacity: 0.9; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.07); }
}

/* --- Savings curve: the line draws itself, then the fill rises --------- */
.ev-line {
    stroke-dasharray: var(--len, 400);
    stroke-dashoffset: var(--len, 400);
}
.ev-fill { opacity: 0; transform-origin: bottom; transform: scaleY(0.4); }
.ev-dot { opacity: 0; }

/* Draw on reveal (IntersectionObserver adds .in), not on page load, so the
   animation is actually seen rather than finishing above the fold. */
.ev-chart.in .ev-line { animation: ev-draw 1.6s var(--ease) forwards; }
.ev-chart.in .ev-fill { animation: ev-rise 1.1s var(--ease) 0.5s forwards; }
.ev-chart.in .ev-dot { animation: ev-pop 0.5s var(--ease) forwards; }
.ev-chart.in .ev-dot:nth-of-type(1) { animation-delay: 0.7s; }
.ev-chart.in .ev-dot:nth-of-type(2) { animation-delay: 1.0s; }
.ev-chart.in .ev-dot:nth-of-type(3) { animation-delay: 1.3s; }
.ev-chart.in .ev-dot:nth-of-type(4) { animation-delay: 1.6s; }

/* No-JS fallback: show the finished state rather than an empty box. */
html:not(.js-motion) .ev-line { stroke-dashoffset: 0; }
html:not(.js-motion) .ev-fill,
html:not(.js-motion) .ev-dot { opacity: 1; transform: none; }

@keyframes ev-draw { to { stroke-dashoffset: 0; } }
@keyframes ev-rise { to { opacity: 1; transform: scaleY(1); } }
@keyframes ev-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }

/* --- Grid flow: pulses travel along the transmission path -------------- */
.ev-flow {
    stroke-dasharray: 5 13;
    animation: ev-flow 1.6s linear infinite;
}
.ev-flow--rev { animation-direction: reverse; }
.ev-flow--slow { animation-duration: 2.6s; }

@keyframes ev-flow { to { stroke-dashoffset: -36; } }

/* --- Energy bolt: a soft charge pulse ---------------------------------- */
.ev-bolt { animation: ev-charge 2.4s var(--ease-soft) infinite; transform-origin: center; }
@keyframes ev-charge {
    0%, 100% { opacity: 0.85; }
    45% { opacity: 1; filter: drop-shadow(0 0 6px rgba(245, 166, 35, 0.75)); }
}

/* --- Ambient orbit for background decoration --------------------------- */
.ev-drift { animation: ev-drift 18s var(--ease-soft) infinite; }
@keyframes ev-drift {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(12px, -16px); }
    66% { transform: translate(-10px, 10px); }
}

/* --- Icon tiles replacing the emoji service icons ---------------------- */
.ev-tile {
    width: 54px;
    height: 54px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--teal-soft) 0%, rgba(245, 166, 35, 0.12) 100%);
    margin-bottom: 1.25rem;
    transition: transform var(--dur) var(--ease), background 0.4s var(--ease-soft);
}
.ev-tile svg { width: 26px; height: 26px; fill: none; stroke: var(--teal-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-card:hover .ev-tile { transform: scale(1.08) rotate(-4deg); }

/* Emoji icons appear ~1,000 times across 62 pages, each one chosen for that
   page's specific meaning. Rather than flatten them all to a handful of
   generic vectors, give them the same gradient tile the drawn icons sit in —
   one rule, and every card frames its icon identically site-wide. The old
   rule turned the tile solid teal on hover, which left a dark emoji on a
   dark fill; this keeps the tile light and moves the motion instead. */
.service-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--teal-soft) 0%, rgba(245, 166, 35, 0.12) 100%);
    font-size: 1.55rem;
    line-height: 1;
    margin-bottom: 1.25rem;
    transition: transform var(--dur) var(--ease), background 0.4s var(--ease-soft);
}
.service-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(79, 179, 163, 0.22) 0%, rgba(245, 166, 35, 0.22) 100%);
    transform: scale(1.08) rotate(-4deg);
}

/* Hero backdrop vectors sit behind content and never intercept clicks. */
.ev-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.ev-backdrop > * { position: absolute; }

/* Kept faint on purpose. These are atmosphere behind the headline, not
   illustrations competing with it — anything above ~0.14 starts fighting
   the h1 for attention. */
.hero-ev-wind  { top: 6%;     right: 3%;   width: min(32vw, 360px); opacity: 0.13; }
.hero-ev-solar { bottom: -2%; left: -1.5%; width: min(12vw, 130px); opacity: 0.11; }

/* Hero overlay card: the savings curve is the point of the card, so it gets
   the width, and the stat below it reads as the curve's punchline. */
.hero-overlay-card { min-width: 300px; padding: 1.6rem 1.7rem; }
.hero-ev-chart { width: 100%; height: auto; margin: 0.35rem 0 0.6rem; }
.hero-overlay-card .overlay-card-value { font-size: 2rem; margin-bottom: 0.3rem; color: var(--teal-ink); }
.hero-overlay-card .overlay-card-text { color: var(--ink-muted); font-size: 0.88rem; font-weight: 400; }

/* Markets: the left column of the dark band. */
.markets-aside {
    align-self: center;
    color: rgba(255, 255, 255, 0.82);
}
.markets-ev { width: 100%; max-width: 260px; margin-bottom: 1.4rem; opacity: 0.95; }
.markets-aside p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 40ch;
}
.market-card-link { text-decoration: none; color: inherit; display: block; }
.market-card { height: 100%; }
.market-abbr { font-size: 1.75rem; letter-spacing: -0.03em; }
.market-full { font-size: 0.82rem; opacity: 0.72; }

/* ============================================================================
   7. Motion polish
   ========================================================================== */

.js-motion .reveal,
.js-motion [data-reveal],
.js-motion .result-card,
.js-motion .service-card,
.js-motion .industry-card,
.js-motion .market-card,
.js-motion .process-step,
.js-motion .section-header,
.js-motion .xp,
.js-motion .ev-chart {
    transition-timing-function: var(--ease);
    transition-duration: 0.7s;
}

/* Accordions stagger in like the card grids already do */
.js-motion .xp { opacity: 0; transform: translateY(14px); transition-property: opacity, transform; }
.js-motion .xp.in { opacity: 1; transform: none; }
.js-motion .xp-group > .xp:nth-child(2) { transition-delay: 0.08s; }
.js-motion .xp-group > .xp:nth-child(3) { transition-delay: 0.16s; }
.js-motion .xp-group > .xp:nth-child(4) { transition-delay: 0.24s; }
.js-motion .xp-group > .xp:nth-child(5) { transition-delay: 0.32s; }

.process-step-number {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.process-step:hover .process-step-number { transform: scale(1.1); box-shadow: var(--shadow-teal); }

.market-card { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.3s var(--ease-soft); }
.market-card:hover { transform: translateY(-4px) scale(1.02); }

/* ============================================================================
   8. Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .xp-head { padding: 1rem 1.1rem; font-size: 0.97rem; gap: 0.75rem; }
    .xp-pad { padding: 0.25rem 1.1rem 1.2rem; }
    .xp-list { grid-template-columns: 1fr; gap: 0.9rem; }
    .btn { padding: 0.9rem 1.6rem; }
    .ev-tile { width: 48px; height: 48px; margin-bottom: 1rem; }
    /* Backdrop vectors are decoration; on small screens they only add noise. */
    .ev-backdrop { display: none; }
}

/* ============================================================================
   9. Reduced motion — everything above resolves to its finished state
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .ev-rotor, .ev-rays, .ev-sun, .ev-flow, .ev-bolt, .ev-drift, .ev-needle,
    .hero-badge, .hero-overlay-card {
        animation: none !important;
    }
    .ev-line { stroke-dashoffset: 0 !important; animation: none !important; }
    .ev-fill, .ev-dot { opacity: 1 !important; transform: none !important; animation: none !important; }
    .hero-text h1 .highlight::after { animation: none !important; transform: none !important; }
    .xp-body { transition: none !important; }
    .xp-inner > * { opacity: 1 !important; transform: none !important; transition: none !important; }
    .js-motion .xp { opacity: 1 !important; transform: none !important; }
    .more-shown { animation: none !important; }
}

/* ==========================================================================
   AEO ANSWER BLOCKS
   Rendered by aeo_answer() / aeo_faq_section() in includes/schema.php.

   These carry the short, self-contained, quotable answers that retrieval-based
   assistants chunk and cite. The styling stays deliberately quiet: the blocks
   have to read as reference material a person would trust, not as a pull-quote
   or a promo band. High contrast, generous line-height, no decoration that
   competes with the sentence.
   ========================================================================== */

.aeo-answer {
    max-width: 820px;
    margin: 0 auto 2.5rem;
    padding: 2rem 2.25rem;
    background: var(--teal-tint);
    border: 1px solid var(--hairline);
    border-left: 4px solid var(--teal-ink);
    border-radius: var(--r-md);
}

.aeo-answer .aeo-question {
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1.35;
    color: var(--ink);
    margin: 0 0 0.85rem;
}

.aeo-answer .aeo-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ink);
}

.aeo-answer .aeo-body p { margin: 0 0 0.9rem; }
.aeo-answer .aeo-body p:last-child { margin-bottom: 0; }
.aeo-answer .aeo-body strong { color: var(--ink); font-weight: 650; }
.aeo-answer .aeo-body a { color: var(--teal-ink); }

/* Fact list. A <dl> is the densest, least ambiguous way to present
   attribute/value pairs to a parser, and it renders cleanly to a human. */
.aeo-facts {
    margin: 1.4rem 0 0;
    padding: 1.2rem 0 0;
    border-top: 1px solid var(--hairline);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem 1.75rem;
}

.aeo-facts .aeo-fact { min-width: 0; }

.aeo-facts dt {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.25rem;
}

.aeo-facts dd {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
    font-weight: 600;
}

/* --- FAQ section -------------------------------------------------------- */

.aeo-faq {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}

.aeo-faq > h2 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: var(--ink);
    margin: 0 0 1.75rem;
}

.aeo-faq-item {
    padding: 1.4rem 0;
    border-top: 1px solid var(--hairline);
}

.aeo-faq-item:last-child { border-bottom: 1px solid var(--hairline); }

.aeo-faq-item h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--ink);
    margin: 0 0 0.6rem;
}

.aeo-faq-item p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink-muted);
}

.aeo-faq-item a { color: var(--teal-ink); }

/* --- Prose sections on the AEO reference pages -------------------------- */

.aeo-prose {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
}

.aeo-prose h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1.3;
    color: var(--ink);
    margin: 2.5rem 0 1rem;
}

.aeo-prose h2:first-child { margin-top: 0; }

.aeo-prose h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--ink);
    margin: 1.75rem 0 0.6rem;
}

.aeo-prose p,
.aeo-prose li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink-muted);
}

.aeo-prose p { margin: 0 0 1.1rem; }
.aeo-prose strong { color: var(--ink); font-weight: 650; }
.aeo-prose a { color: var(--teal-ink); }
.aeo-prose ul, .aeo-prose ol { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.aeo-prose li { margin-bottom: 0.6rem; }

/* Comparison and criteria tables. Wrapped in .aeo-table-wrap so a wide table
   scrolls inside its own box instead of forcing the page to scroll sideways. */
.aeo-table-wrap {
    overflow-x: auto;
    margin: 0 0 1.75rem;
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
}

.aeo-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.97rem;
}

.aeo-table th,
.aeo-table td {
    padding: 0.85rem 1.1rem;
    text-align: left;
    vertical-align: top;
    line-height: 1.6;
    border-bottom: 1px solid var(--hairline);
}

.aeo-table thead th {
    background: var(--surface);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-muted);
    white-space: nowrap;
}

.aeo-table tbody th {
    font-weight: 650;
    color: var(--ink);
    width: 30%;
}

.aeo-table td { color: var(--ink-muted); }
.aeo-table tbody tr:last-child th,
.aeo-table tbody tr:last-child td { border-bottom: none; }

/* The honest-limits block. Visually distinct from the sales copy on purpose —
   it is the part of the page that earns the rest of it credibility. */
.aeo-limits {
    max-width: 820px;
    margin: 0 auto 2.5rem;
    padding: 1.75rem 2rem;
    background: #FFFBF3;
    border: 1px solid #F2E3C9;
    border-radius: var(--r-md);
}

.aeo-limits h2,
.aeo-limits h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--ink);
    margin: 0 0 0.9rem;
}

.aeo-limits ul { margin: 0; padding-left: 1.25rem; }

.aeo-limits li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink-muted);
    margin-bottom: 0.7rem;
}

.aeo-limits li:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
    .aeo-answer { padding: 1.5rem 1.25rem; }
    .aeo-answer .aeo-question { font-size: 1.15rem; }
    .aeo-facts { grid-template-columns: 1fr; }
    .aeo-limits { padding: 1.35rem 1.25rem; }
}
