/* ===== EP:FONTS ===== */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* ===== /EP:FONTS ===== */

/* ===== EP:TOKENS (mirror) =====
   Etch keeps the token set in the :root style RECORD so the Variable Manager
   can edit it, but that record is only emitted when a block references it -
   and a class-first build never does. This mirror is what actually paints on
   the front end. The two are written together, always. */
:root {
  /* ---------- Brand primitives (the only raw brand hexes in the system) ---------- */
  --_brand-1: #0c419c;
  --_brand-2: #ffc107;
  --_brand-3: #ff3000;

  /* ---------- Semantic colour ---------- */
  --primary: var(--_brand-1);
  --primary-deep: #082f70;
  --secondary: var(--_brand-2);
  --accent: var(--_brand-3);
  /* --accent is 3.70:1 on white and fails AA as label TEXT. --accent-text is the
     minimal darkening that reaches 4.5:1 on both white and tint. Fills, icons and
     decorative marks keep the full-strength brand red. */
  --accent-text: #df1000;

  --text-primary: #1a1c1e;
  --text-secondary: #5a5f66;
  /* was #8a8f96 in the Astro build — 3.26:1 on white, below AA for normal text */
  --text-tertiary: #6b7077;

  --bg-primary: #ffffff;
  --bg-secondary: var(--surface-container-low);
  --bg-footer: #f6f3f2;

  /* ---------- Surface scale (warm neutral) ---------- */
  --surface: #fbf9f8;
  --surface-container-low: #f5f3f1;
  --surface-container: #efedeb;
  --surface-container-high: #e9e7e5;
  --surface-container-highest: #e3e1df;

  /* ---------- On-colours ---------- */
  --on-primary: #ffffff;
  --on-secondary: #1a1a1a;
  --on-surface: #1a1c1e;
  --on-surface-variant: #5a5f66;

  /* ---------- Lines ---------- */
  --outline-variant: #c8c6c4;
  --outline-card: rgba(200, 198, 196, 0.3);
  --outline-faint: rgba(200, 198, 196, 0.15);

  /* ---------- Soft fills (the design's recurring alpha vocabulary) ---------- */
  --fill-navy-soft: rgba(12, 65, 156, 0.08);
  --fill-navy-soft-2: rgba(12, 65, 156, 0.1);
  --fill-navy-strong: rgba(12, 65, 156, 0.12);
  --fill-amber-soft: rgba(255, 193, 7, 0.15);
  --fill-accent-soft: rgba(255, 48, 0, 0.08);
  --fill-accent-soft-2: rgba(255, 48, 0, 0.1);

  /* ---------- Spacing (4px grid) ---------- */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;  --space-4: 1rem;
  --space-5: 1.25rem;  --space-6: 1.5rem;   --space-8: 2rem;     --space-10: 2.5rem;
  --space-12: 3rem;    --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;
  --space-32: 8rem;

  /* ---------- Type scale ---------- */
  --text-xs: 0.75rem;   --text-sm: 0.875rem; --text-base: 1rem;   --text-lg: 1.125rem;
  --text-xl: 1.25rem;   --text-2xl: 1.5rem;  --text-3xl: 1.875rem; --text-4xl: 2.25rem;
  --text-5xl: 3rem;     --text-6xl: 3.75rem; --text-7xl: 4.5rem;

  /* ---------- Line heights (were inline per component in the Astro build) ---------- */
  --lh-display: 0.95;
  --lh-heading: 1.05;
  --lh-sub: 1.1;
  --lh-title: 1.3;
  --lh-body: 1.6;
  --lh-lead: 1.7;
  --lh-prose: 1.8;

  /* ---------- Tracking ladder ---------- */
  --tracking-display: -0.04em;
  --tracking-heading: -0.03em;
  --tracking-tight: -0.02em;
  --tracking-eyebrow: 0.2em;
  --tracking-label: 0.15em;
  --tracking-label-2: 0.1em;
  --tracking-label-3: 0.08em;
  --tracking-label-4: 0.05em;

  /* ---------- Fonts ---------- */
  --font-heading: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --weight-body: 400;
  --weight-medium: 500;
  --weight-semi: 600;
  --weight-bold: 700;
  --weight-display: 800;

  /* ---------- Shadows ---------- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-2xl: 0 32px 64px rgba(0, 0, 0, 0.14), 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-navbar: 0 20px 40px rgba(27, 28, 28, 0.06);
  --shadow-form: 0 30px 60px -15px rgba(0, 0, 0, 0.05);
  --shadow-primary: 0 12px 24px rgba(12, 65, 156, 0.15);
  --shadow-secondary: 0 12px 24px rgba(255, 193, 7, 0.2);

  /* ---------- Radii ---------- */
  --radius-sm: 0.25rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem;    --radius-full: 9999px;

  /* ---------- Z-index ladder ---------- */
  --z-base: 1; --z-fab: 40; --z-navbar: 50; --z-modal: 60;

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 200ms;
  --dur-mid: 300ms;
  --dur-slow: 500ms;

  /* ---------- Layout ---------- */
  --max-width: 80rem;
  --container: 80rem;
  --gutter: var(--space-8);
  --navbar-h: 5rem;

  /* ---------- Section rhythm: every section carries ONE named variant ---------- */
  --section-space: var(--space-24);
  --section-space-sm: var(--space-12);
  --section-space-lg: var(--space-32);
  --hero-space-top: 11rem;

  /* ---------- SURFACE CONTRACT ----------
     Every consumer class reads these and never a raw colour, so putting one
     surface class on a section re-themes every descendant. Defaults = WHITE. */
  --sf-bg: var(--bg-primary);
  --sf-text: var(--text-primary);
  --sf-fg: var(--text-secondary);
  --sf-heading: var(--primary);
  --sf-title: var(--text-primary);
  --sf-muted: var(--text-tertiary);
  --sf-eyebrow: var(--accent-text);
  --sf-line: var(--outline-card);
  --sf-rule: var(--outline-variant);
  --sf-card-bg: var(--bg-primary);
  --sf-card-line: var(--outline-card);
  --sf-link: var(--primary);
  --sf-link-hover: var(--text-primary);
  --sf-btn-bg: var(--primary);
  --sf-btn-fg: var(--on-primary);
  --sf-btn-shadow: var(--shadow-primary);
  --sf-ghost-fg: var(--primary);
  --sf-ghost-line: var(--outline-variant);
  --sf-ghost-bg: var(--bg-primary);
  --sf-ghost-hover-bg: var(--surface-container-low);
  --sf-icon: var(--primary);
  --sf-icon-tile: var(--fill-navy-soft);
  --sf-icon-hover-bg: var(--primary);
  --sf-icon-hover-fg: var(--on-primary);
  --sf-star: var(--secondary);
  --sf-dot: rgba(12, 65, 156, 0.04);
}

@media (max-width: 1024px) {
  :root { --text-7xl: 3.5rem; --text-4xl: 2rem; }
}
@media (max-width: 768px) {
  :root {
    --text-7xl: 2.75rem; --text-4xl: 1.75rem; --text-xl: 1.125rem;
    --space-24: 4rem; --space-16: 3rem;
    --gutter: var(--space-5);
    --hero-space-top: 7rem;
  }
}
@media (max-width: 480px) {
  :root { --text-7xl: 2.25rem; }
}
/* ===== /EP:TOKENS ===== */

/* ===== EP:RESET =====
   Base/reset only. Anything a client should be able to click and edit lives in a
   style RECORD, not here - a global-sheet rule shows nothing in the CSS box. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: calc(var(--navbar-h) + var(--space-4));
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

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

/* The theme's reset reserves a scrollbar gutter. That narrows every full-bleed
   band by the scrollbar width, which shows up as a white stripe down the right
   edge of the navy sections, and shifts the centred container off-centre. */
html { scrollbar-gutter: auto; }

/* Headings default to the heading face. The Astro build had no such rule, so any
   component that forgot font-family silently fell back to Inter.

   Face and style only. Setting weight and line-height here as well made every
   heading that does not declare its own 1.05/800 — the footer column headings
   are the clearest case — a third shorter than the reference, because Astro
   leaves those inheriting the body's 1.6 and the UA's bold. */
:where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-heading);
  color: inherit;
  font-style: normal;
}

/* Links are never browser-blue. */
:where(a) { color: var(--sf-link, var(--primary)); text-decoration: none; }

:where(button) { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:where(input, select, textarea) { font-family: inherit; font-size: inherit; color: inherit; }
:where(ul, ol) { list-style: none; }

/* A grid/flex track sized 1fr cannot shrink below its content's min-content width,
   which is the usual cause of mobile horizontal scroll. */
:where(.ep-grid, .ep-flex) > * { min-width: 0; }

/* Amber alone is 1.47:1 against the light surfaces and 1.63:1 against white,
   so on most of the site a keyboard user could not see where they were. The
   navy halo sits outside the amber ring and is 9.3:1 on white; on the navy
   sections the halo vanishes and the amber already carries 5.7:1. Both grounds
   are covered without changing the brand colour of the ring. */
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; box-shadow: 0 0 0 4px var(--primary); }
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ===== /EP:RESET ===== */

/* ===== EP:FORM (PHP-rendered markup — see note above) ===== */
.ep-form__form {
display: flex;
flex-direction: column;
gap: var(--space-5);
}
.ep-form__label {
font-family: var(--font-heading);
font-size: var(--text-xs);
font-weight: var(--weight-bold);
text-transform: uppercase;
letter-spacing: var(--tracking-label);
color: var(--text-secondary);
}
.ep-form__input {
width: 100%;
max-width: 100%;
box-sizing: border-box;
background-color: var(--surface-container-low);
border: 1px solid transparent;
border-radius: var(--radius-md);
padding: var(--space-3) var(--space-4);
font-size: var(--text-base);
color: var(--text-primary);
transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
&:focus { outline: none; border-color: var(--primary); background-color: var(--surface-container); }
&::placeholder { color: var(--text-tertiary); }
}
.ep-form__submit {
width: 100%;
justify-content: center;
}
.ep-form__fineprint {
font-size: var(--text-xs);
color: var(--text-tertiary);
margin: 0;
text-align: center;
& a { color: var(--primary); font-weight: var(--weight-semi); }
}
.ep-form__hp {
position: absolute;
width: 1px; height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.ep-form__notice {
border-radius: var(--radius-md);
padding: var(--space-4) var(--space-5);
margin-bottom: var(--space-5);
font-size: var(--text-sm);
&[data-tone="ok"] { background-color: rgba(12, 65, 156, 0.08); color: var(--primary); }
&[data-tone="error"] { background-color: var(--fill-accent-soft); color: var(--accent-text); }
}
.ep-form__row {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--space-5);
@media (max-width: 768px) { grid-template-columns: 1fr; }
}
.ep-form__group {
display: flex;
flex-direction: column;
gap: var(--space-2);
min-width: 0;
}
/* Mirror of the .ep-btn records, for markup rendered by PHP (the contact form's
   submit button). The records stay in place for authored markup and builder
   visibility — keep these values identical to them. */
.ep-form .ep-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-heading); font-weight: var(--weight-semi); font-size: var(--text-base);
  /* the submit is a <button>: the reference leaves it on the UA's `normal`,
     which is what gives it its 45px height. Forcing 1 made it 42px; letting it
     inherit the body's 1.6 made it 52px. */
  line-height: normal;
  padding: var(--space-3) var(--space-8); border-radius: var(--radius-sm); white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.ep-form .ep-btn:active { transform: scale(0.95); }
.ep-form .ep-btn--primary { background-color: var(--primary); color: var(--on-primary); }
.ep-form .ep-btn--primary:hover { box-shadow: var(--shadow-primary); }
.ep-form .ep-btn--secondary { background-color: var(--secondary); color: var(--on-secondary); }
.ep-form .ep-btn--secondary:hover { box-shadow: var(--shadow-secondary); }
/* The reference's contact submit is the navy primary (class "btn btn-primary").
   The PHP template still emits ep-btn--secondary on it, so the submit is
   anchored to primary by its own class - this stays correct once the markup
   is corrected to ep-btn--primary. */
.ep-form .ep-form__submit { background-color: var(--primary); color: var(--on-primary); }
.ep-form .ep-form__submit:hover { box-shadow: var(--shadow-primary); }
/* ===== /EP:FORM ===== */

/* ===== EP:FLOW =====
   A heading must never sit flush against the paragraph under it. Scoped to a
   BARE wrapper (no class of its own) so it can only reach markup that has no
   spacing system, and written with :where() at 0,0,0 so every component record
   outranks it. Flex/grid parents are untouched, so this can never double a gap.
   NOTE: these use :is(), not :where(). A :where() fallback sits at 0,0,1 and
   loses to a component record's own `margin: 0` (.ep-lead), which is exactly
   how the gap came back at 0px the first time. :is() carries the specificity
   needed to win, while still being a relationship rule rather than a patch. */
main :is(div:not([class])) > :is(h1, h2, h3, h4, h5, h6) + :is(p) { margin-top: var(--space-3); }
main :is(div:not([class])) > :is(p) + :is(p) { margin-top: var(--space-4); }

/* A heading arriving after a block, and a list or tag row arriving after a
   heading, both had no rule at all and rendered flush. [slug].astro sets
   `.brands-section { margin-top: var(--space-8) }` above the heading and
   `.brands-heading / .issues-heading { margin-bottom: var(--space-4) }` below
   it; these are the same two values expressed as relationships, for the bare
   containers that carry no spacing system of their own. */
main :is(div:not([class])) > :is(div, p, ul, ol) + :is(h1, h2, h3, h4, h5, h6) { margin-top: var(--space-8); }
main :is(div:not([class])) > :is(h1, h2, h3, h4, h5, h6) + :is(ul, ol, div) { margin-top: var(--space-4); }
/* ===== /EP:FLOW ===== */

/* ===== EP:ADMINBAR =====
   WordPress bumps `html` by the admin bar's height for logged-in users, which
   moves static content but not a `position: fixed` element — so the fixed nav
   sat underneath the bar and had its logo clipped. Offset the two fixed
   top-anchored elements by the same amount WordPress uses.

   32px is the desktop bar. Below 782px it is 46px. Below 600px WordPress makes
   the bar `position: absolute` so it scrolls away, and the offset must go back
   to zero or the nav floats away from the top of the viewport. */
body.admin-bar .ep-nav { top: 32px; }
body.admin-bar .ep-drawer { top: 32px; }

@media screen and (max-width: 782px) {
  body.admin-bar .ep-nav { top: 46px; }
  body.admin-bar .ep-drawer { top: 46px; }
}

@media screen and (max-width: 600px) {
  body.admin-bar .ep-nav { top: 0; }
  body.admin-bar .ep-drawer { top: 0; }
}
/* ===== /EP:ADMINBAR ===== */

/* ── FurtzHub Instagram feed, skinned to ElectricalPro ─────────────────────
   The plugin ships a black follow button and an unstyled "Load More" link,
   which is its own default look rather than this brand. These rules dress its
   controls as site buttons. Plugin markup cannot carry an Etch record id, so
   this has to live in the global sheet. */
.fh-feed__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.fh-feed__follow,
.fh-feed__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: var(--weight-semi);
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.fh-feed__follow {
  background-color: var(--primary);
  color: var(--on-primary);
}
.fh-feed__follow:hover { box-shadow: var(--shadow-primary); }
.fh-feed__more {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.fh-feed__more:hover { background-color: rgba(12, 65, 156, 0.06); }
.fh-feed__follow:active,
.fh-feed__more:active { transform: scale(0.95); }
.fh-feed__follow .fh-icon,
.fh-feed__more .fh-icon { width: 1.125rem; height: 1.125rem; }
/* WordPress core: wp-img-auto-sizes-contain + wp-block-post-content (live inline styles) */
img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px}
.wp-block-post-content{display:flow-root}
