/* ============================================================
   3P Power Group - design system
   Concept: control-room calm. Dark "midnight substation" navy,
   one electric-blue "live conductor" accent, sparing safety amber.
   Type: Space Grotesk (display) · Inter (body) · IBM Plex Mono (labels)
   ============================================================ */

:root {
  /* palette */
  --ink:        #0A1626;   /* primary dark bg */
  --ink-2:      #0E1F38;   /* panel navy (cards on dark) */
  --ink-3:      #122846;   /* raised navy */
  --steel:      #1C3A5E;   /* borders on dark */
  --conductor:  #2E7CF6;   /* electric blue accent */
  --conductor-2:#5AA0FF;   /* brighter blue */
  --conductor-btn:#1856C4; /* AA-safe blue for white text on solid fills (6.6:1) */
  --conductor-ink:#1A5FD0; /* AA-safe blue for small text on light bg (5.4:1+) */
  --arc:        #FFB020;   /* safety amber (sparing) */
  --arc-2:      #FFC961;

  --paper:      #F4F7FB;   /* light section bg */
  --paper-2:    #FFFFFF;
  --slate-900:  #0E1B2E;   /* dark text on light */
  --slate-700:  #2C3E55;
  --slate-500:  #54657D;   /* muted text on light */
  --slate-300:  #C7D2DF;

  --on-dark:    #EAF1FA;   /* primary text on dark */
  --on-dark-mut:#9DB1C9;   /* muted text on dark */

  --line-dark:  rgba(90, 160, 255, 0.16);
  --line-light: rgba(14, 27, 46, 0.10);

  /* type */
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* layout */
  --container: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -24px rgba(7, 18, 36, 0.55);
  --shadow-soft: 0 10px 30px -18px rgba(7, 18, 36, 0.4);

  --header-h: 70px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--f-body);
  color: var(--slate-900);
  background: var(--paper-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

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

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--conductor-btn); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 8px;
  z-index: 200; transition: top .2s ease; font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--conductor);
  margin-bottom: .85rem;
  font-weight: 500;
}
/* darker blue for eyebrows on light-background sections (AA contrast) */
.services .eyebrow, .approach .eyebrow, .about .eyebrow, .specialty .eyebrow { color: var(--conductor-ink); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head h2,
h1, h2 { font-family: var(--f-display); line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.6rem); }
h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.01em; }
.section-sub { color: var(--slate-500); font-size: clamp(1rem, 1.6vw, 1.12rem); margin-top: .9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .98rem; line-height: 1;
  padding: .85rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .14s ease, background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap; min-height: 44px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--conductor-btn); color: #fff; box-shadow: 0 10px 24px -12px rgba(46,124,246,.8); }
.btn-primary:hover { background: #1F6BE0; }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: var(--line-dark); }
.btn-ghost:hover { border-color: var(--conductor-2); background: rgba(90,160,255,.08); }
.btn-arc { background: var(--arc); color: #1a1203; box-shadow: 0 10px 24px -12px rgba(255,176,32,.8); }
.btn-arc:hover { background: var(--arc-2); }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-mark { flex: none; }
.brand-text { display: inline-flex; align-items: baseline; gap: .35rem; line-height: 1; }
.brand-3p { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--conductor); letter-spacing: .02em; }
.brand-name { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .2em; color: var(--on-dark-mut); font-weight: 500; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 22, 38, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--on-dark);
}
.site-header.is-scrolled { background: rgba(10, 22, 38, 0.94); }
.header-inner { display: flex; align-items: center; gap: 1.2rem; min-height: var(--header-h); }
.nav { margin-left: auto; }
.nav-list { display: flex; gap: 1.6rem; }
.nav-list a {
  font-size: .95rem; font-weight: 500; color: var(--on-dark-mut);
  padding: .35rem 0; position: relative; transition: color .16s ease;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--conductor); transition: width .2s ease;
}
.nav-list a:hover { color: var(--on-dark); }
.nav-list a:hover::after { width: 100%; }
.header-cta { margin-left: .4rem; padding-block: .65rem; }

.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; background: transparent; border: 0; padding: .5rem; margin-left: auto; }
.nav-toggle-bar { display: block; width: 24px; height: 2px; background: var(--on-dark); border-radius: 2px; transition: transform .22s ease, opacity .22s ease; }
.nav-toggle-bar + .nav-toggle-bar { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  background: var(--ink-2); border-bottom: 1px solid var(--line-dark); color: var(--on-dark);
}
.mobile-menu ul { display: flex; flex-direction: column; padding: 1rem var(--gutter) 1.6rem; gap: .35rem; }
.mobile-menu a { display: block; padding: .85rem .25rem; font-size: 1.05rem; font-weight: 500; border-bottom: 1px solid var(--line-dark); color: var(--on-dark); }
.mobile-menu .btn { display: flex; justify-content: center; text-align: center; border-bottom: 0; padding: 1rem 1.4rem; margin-top: .8rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(46,124,246,.20), transparent 60%),
    radial-gradient(800px 480px at 8% 8%, rgba(90,160,255,.10), transparent 55%),
    linear-gradient(180deg, var(--ink) 0%, #0B1A30 60%, var(--ink) 100%);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 6.5rem);
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(110% 80% at 60% 0%, #000 35%, transparent 78%);
          mask-image: radial-gradient(110% 80% at 60% 0%, #000 35%, transparent 78%);
}
.hero-inner {
  position: relative; display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1.1fr 1fr; align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.85rem);
  margin: .2rem 0 1.1rem;
  letter-spacing: -0.03em;
}
.hero h1 .hl {
  color: var(--arc);
  position: relative; white-space: nowrap;
}
.hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.06em; height: 2px;
  background: linear-gradient(90deg, var(--conductor-2), var(--arc));
  transform: scaleX(0); transform-origin: left;
  animation: hl-energize 1.1s ease .8s forwards;
}
@keyframes hl-energize { to { transform: scaleX(1); } }
.hero-lede { color: var(--on-dark-mut); font-size: clamp(1.02rem, 1.8vw, 1.2rem); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.credential-strip {
  display: flex; flex-wrap: wrap; gap: .5rem .55rem; margin-top: 2.2rem;
}
.credential-strip li {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-dark); padding: .4rem .7rem; border: 1px solid var(--line-dark); border-radius: 999px;
  background: rgba(90,160,255,.06);
}

/* hero diagram panel (frames the failover single-line) */
.hero-diagram {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: clamp(1rem, 2.4vw, 1.8rem);
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(90,160,255,.04);
  box-shadow: inset 0 0 60px rgba(46,124,246,.06);
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .hl::after { animation: none; transform: scaleX(1); }
}

/* ---------- positioning / stats ---------- */
.positioning { background: var(--ink); color: var(--on-dark); border-top: 1px solid var(--line-dark); }
.positioning .container { padding-block: clamp(2rem, 4vw, 3rem); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.4rem); }
.stat { border-left: 2px solid var(--conductor); padding-left: 1.1rem; }
.stat-k { display: block; font-family: var(--f-display); font-weight: 600; font-size: 1.18rem; color: var(--on-dark); }
.stat-v { display: block; color: var(--on-dark-mut); font-size: .96rem; margin-top: .3rem; }

/* ---------- services ---------- */
.services { background: var(--paper); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.card {
  position: relative; background: var(--paper-2); border: 1px solid var(--line-light);
  border-radius: var(--radius); padding: 1.6rem 1.5rem 1.7rem; box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(46,124,246,.35); }
.card-icon {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(46,124,246,.14), rgba(46,124,246,.06));
  border: 1px solid rgba(46,124,246,.25); margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--conductor); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card-index { font-family: var(--f-mono); font-size: .72rem; color: var(--conductor-ink); letter-spacing: .12em; }
.card h3 { font-size: 1.16rem; margin: .15rem 0 .7rem; color: var(--slate-900); }
.card ul { display: flex; flex-direction: column; gap: .5rem; }
.card li { position: relative; padding-left: 1.05rem; color: var(--slate-500); font-size: .94rem; line-height: 1.5; }
.card li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--conductor); }

/* ---------- expertise ---------- */
.expertise { background: var(--ink); color: var(--on-dark); }
.expertise .eyebrow { color: var(--conductor-2); }
.expertise h2 { color: var(--on-dark); }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.4rem); }
.spec-card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink)); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 1.5rem 1.4rem 1.7rem;
}
.spec-title {
  font-size: 1.1rem; color: var(--on-dark); padding-bottom: .9rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--line-dark); position: relative;
}
.spec-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 42px; height: 2px; background: var(--conductor); }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-list li {
  font-family: var(--f-mono); font-size: .76rem; letter-spacing: .02em;
  color: var(--on-dark-mut); background: rgba(90,160,255,.06);
  border: 1px solid var(--line-dark); border-radius: 7px; padding: .32rem .55rem;
}

/* ---------- approach / lifecycle ---------- */
.approach { background: var(--paper); }
.lifecycle { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.5rem); counter-reset: phase; }
.phase {
  position: relative; background: var(--paper-2); border: 1px solid var(--line-light);
  border-radius: var(--radius); padding: 1.5rem 1.35rem 1.6rem; box-shadow: var(--shadow-soft);
}
.phase::before {
  content: ""; position: absolute; top: -1px; left: 1.35rem; right: 1.35rem; height: 3px;
  background: linear-gradient(90deg, var(--conductor), transparent); border-radius: 3px;
}
.phase-no { font-family: var(--f-mono); font-size: .8rem; color: var(--conductor-ink); letter-spacing: .12em; }
.phase h3 { font-size: 1.1rem; margin: .35rem 0 .55rem; color: var(--slate-900); }
.phase p { color: var(--slate-500); font-size: .93rem; }

/* ---------- industries ---------- */
.industries { background: var(--ink-2); color: var(--on-dark); }
.industries .eyebrow { color: var(--conductor-2); }
.industries h2 { color: var(--on-dark); }
.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.7rem, 1.6vw, 1.1rem); }
.industry-grid li {
  display: flex; align-items: center; gap: .8rem; font-family: var(--f-display); font-weight: 600;
  font-size: 1.04rem; color: var(--on-dark);
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm); padding: 1.05rem 1.2rem;
}
.industry-grid li::before {
  content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--arc); box-shadow: 0 0 10px rgba(255,176,32,.7);
}

/* ---------- about ---------- */
.about { background: var(--paper-2); }
.about-inner { display: grid; grid-template-columns: 1.6fr .9fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.about-copy p { color: var(--slate-700); font-size: 1.04rem; margin-top: 1rem; max-width: 44rem; }
.about-copy p:first-of-type { margin-top: 1.2rem; }
.service-area-line { color: var(--slate-500) !important; font-size: .96rem !important; font-style: italic; }
.about-side { position: sticky; top: calc(var(--header-h) + 1rem); }
.std-list {
  background: var(--paper); border: 1px solid var(--line-light); border-radius: var(--radius); padding: .5rem 1.3rem;
}
.std-list li { display: grid; grid-template-columns: 1fr; padding: 1rem 0; border-bottom: 1px solid var(--line-light); color: var(--slate-500); font-size: .92rem; }
.std-list li:last-child { border-bottom: 0; }
.std-list li span { font-family: var(--f-display); font-weight: 700; color: var(--slate-900); font-size: 1.05rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 80% 20%, rgba(255,176,32,.14), transparent 60%),
    linear-gradient(120deg, var(--conductor) 0%, #1856C4 100%);
  color: #fff;
}
.cta-inner { padding-block: clamp(2.8rem, 6vw, 4.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); max-width: 30ch; color: #fff; }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--on-dark); }
.contact .eyebrow { color: var(--conductor-2); }
.contact h2 { color: var(--on-dark); }
.contact-inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-info p { color: var(--on-dark-mut); margin-top: 1rem; max-width: 34rem; }
.contact-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; flex-direction: column; gap: .15rem; border-top: 1px solid var(--line-dark); padding-top: 1rem; }
.contact-label { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--conductor-2); }
.contact-list a { color: var(--on-dark); font-weight: 600; }
.contact-list a:hover { color: var(--conductor-2); }
.contact-list span:last-child { color: var(--on-dark); }

/* form */
.contact-form {
  background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow);
}
.form-legend { font-size: .8rem; color: var(--on-dark-mut); margin: 0 0 1.1rem; }
.form-legend .req { color: var(--arc); }
.field { margin-bottom: 1.05rem; display: flex; flex-direction: column; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--on-dark); margin-bottom: .4rem; }
.field .req { color: var(--arc); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .96rem; color: var(--on-dark);
  background: var(--ink); border: 1.5px solid var(--steel); border-radius: var(--radius-sm);
  padding: .75rem .85rem; width: 100%; transition: border-color .16s ease, box-shadow .16s ease;
  min-height: 46px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235AA0FF' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem;
}
.field input::placeholder, .field textarea::placeholder { color: var(--on-dark-mut); opacity: .7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--conductor); box-shadow: 0 0 0 3px rgba(46,124,246,.25);
}
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #FF6B6B; }
.field-error { color: #FFA3A3; font-size: .8rem; margin-top: .35rem; min-height: 1em; }
.gotcha { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form .btn { margin-top: .4rem; }
.form-status { margin-top: .9rem; font-size: .92rem; min-height: 1.2em; }
.form-status.is-ok { color: var(--arc-2); }
.form-status.is-err { color: #FFA3A3; }

/* ---------- footer ---------- */
.site-footer { background: #07111F; color: var(--on-dark-mut); padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line-dark); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); padding-bottom: 2.5rem; }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-tag { color: var(--on-dark); font-weight: 500; max-width: 30rem; }
.footer-area { margin-top: .6rem; font-size: .9rem; max-width: 32rem; }
.footer-h { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-mut); margin: 0 0 1rem; font-weight: 500; }
.footer-nav ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--conductor-2); }
.footer-contact a { color: var(--on-dark); font-weight: 600; display: inline-block; margin-bottom: .6rem; }
.footer-contact p { font-size: .9rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.4rem; border-top: 1px solid var(--line-dark); font-size: .82rem; }
.footer-std { font-family: var(--f-mono); letter-spacing: .06em; }

/* ---------- failover single-line diagram (lives in the hero) ---------- */
#failover { width: min(400px, 100%); height: auto; }

/* lines / conductors */
.fo-line { fill: none; stroke: var(--steel); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .35s ease, opacity .35s ease; }
.fo-stub { stroke: var(--steel); stroke-width: 2.6; stroke-linecap: round; }
.fo-line.live { stroke: var(--conductor-2); }
.fo-line.flow { stroke-dasharray: 5 7; animation: fo-flow .8s linear infinite; }
.fo-line.dead { stroke: var(--steel); opacity: .45; }
.fo-line.faulted { stroke: #FF5A5A; opacity: .65; stroke-dasharray: 4 5; }
.fo-bus { stroke-width: 5; }
.fo-batt.live { stroke: var(--conductor-2); }      /* floating / charging */
.fo-batt.discharge { stroke: var(--arc); }          /* carrying the load */
.fo-blade { stroke: var(--steel); }
.fo-blade.open { opacity: .3; stroke-dasharray: 2.5 4.5; }   /* idle transfer contact: open, not closed */
@keyframes fo-flow { to { stroke-dashoffset: -24; } }

/* breakers */
.fo-cb { fill: var(--ink); stroke: var(--steel); stroke-width: 2; transition: stroke .35s ease; }
.fo-cb.live { stroke: var(--conductor-2); }
.fo-cb.tripped { fill: var(--ink); stroke: #FF5A5A; }        /* breaker opened to isolate the fault */

/* nodes */
.fo-node rect, .fo-node > circle { fill: var(--ink-2); stroke: var(--steel); stroke-width: 2;
  transition: stroke .35s ease, fill .35s ease, filter .35s ease; }
.fo-node.energized rect, .fo-node.energized > circle { stroke: var(--conductor); }
.fo-node.gen-on > circle { stroke: var(--arc); }
.fo-batt-sym line { stroke: var(--steel); stroke-width: 2.4; stroke-linecap: round; transition: stroke .35s ease; }
.fo-node.energized.fo-batt-sym line { stroke: var(--conductor); }
.fo-node.discharge.fo-batt-sym line { stroke: var(--arc); }

/* load: always lit */
.fo-load rect { fill: var(--ink-2); stroke: #46D38A; filter: drop-shadow(0 0 7px rgba(70,211,138,.45)); }
.fo-online { fill: #46D38A; animation: fo-pulse 2s ease-in-out infinite; }
@keyframes fo-pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* labels */
.fo-label { fill: var(--on-dark); font-family: var(--f-mono); font-size: 13px; font-weight: 500; }
.fo-sub { fill: var(--on-dark-mut); font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .04em; }

/* fault burst */
.fo-fault { fill: #FF5A5A; opacity: 0; transition: opacity .3s ease; }
.fo-fault.on { opacity: 1; animation: fo-faultpulse 1.15s ease-in-out infinite; }
@keyframes fo-faultpulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* readout (under the hero diagram) */
.fo-readout { color: var(--on-dark); }
.fo-readout-hero { width: 100%; margin-top: 1.1rem; }
.fo-readout-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.fo-status { display: inline-block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em;
  padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line-dark); }
.fo-status.is-normal { color: #6FE0A6; border-color: rgba(70,211,138,.4); background: rgba(70,211,138,.08); }
.fo-status.is-fault { color: #FF8B8B; border-color: rgba(255,90,90,.45); background: rgba(255,90,90,.10); }
.fo-status.is-gen { color: var(--arc-2); border-color: rgba(255,176,32,.4); background: rgba(255,176,32,.08); }
.fo-caption { font-size: .92rem; color: var(--on-dark); margin: .7rem 0 .8rem; min-height: 2.6em; }
.fo-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }
.fo-legend li { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--on-dark-mut); }
.fo-legend .key { width: 18px; height: 4px; border-radius: 2px; flex: none; }
.key-live { background: var(--conductor-2); }
.key-batt { background: var(--arc); }
.key-fault { background: #FF5A5A; }
.key-load { background: #46D38A; }
.fo-toggle { font: inherit; font-size: .8rem; font-weight: 600; color: var(--on-dark);
  background: rgba(90,160,255,.08); border: 1px solid var(--line-dark); border-radius: 999px;
  padding: .42rem .9rem; cursor: pointer; min-height: 36px; white-space: nowrap;
  transition: border-color .16s ease, background-color .16s ease; }
.fo-toggle:hover { border-color: var(--conductor-2); background: rgba(90,160,255,.14); }
.fo-toggle:active { transform: translateY(1px); }

@media (prefers-reduced-motion: reduce) {
  .fo-line.flow { animation: none; }
  .fo-fault.on { animation: none; opacity: 1; }
  .fo-online { animation: none; opacity: 1; }
}

/* ---------- leadership / team ---------- */
.leadership { background: var(--paper); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 380px)); justify-content: center; gap: clamp(1rem, 2vw, 1.5rem); }
.team-card {
  background: var(--paper-2); border: 1px solid var(--line-light); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; box-shadow: var(--shadow-soft); display: flex; flex-direction: column;
}
.team-avatar {
  position: relative; overflow: hidden;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: linear-gradient(180deg, rgba(46,124,246,.14), rgba(46,124,246,.05));
  border: 1px solid rgba(46,124,246,.25);
}
.team-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.team-avatar svg { width: 30px; height: 30px; fill: none; stroke: var(--conductor); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.team-name { font-size: 1.18rem; color: var(--slate-900); }
.team-role { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; color: var(--conductor-ink); margin: .3rem 0 .9rem; }
.team-bio { color: var(--slate-500); font-size: .95rem; line-height: 1.6; }
.team-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.team-tags li { font-family: var(--f-mono); font-size: .72rem; color: var(--slate-700); background: var(--paper); border: 1px solid var(--line-light); border-radius: 7px; padding: .3rem .55rem; }

/* ---------- specialty: synchronous machines ---------- */
.specialty { background: var(--paper); }
.specialty-head { max-width: 54rem; }
.specialty-lead { color: var(--slate-700); font-size: clamp(1.02rem, 1.8vw, 1.18rem); line-height: 1.65; margin-top: 1rem; }
.spec-caps { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.spec-caps li { font-family: var(--f-mono); font-size: .76rem; color: var(--slate-700); background: var(--paper-2); border: 1px solid var(--line-light); border-radius: 7px; padding: .42rem .65rem; }
.app-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2vw, 1.4rem); margin-top: clamp(1.8rem, 3vw, 2.6rem); }
.app-card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink)); color: var(--on-dark);
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 1.7rem 1.6rem; box-shadow: var(--shadow);
}
.app-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 1rem;
  background: linear-gradient(180deg, rgba(46,124,246,.16), rgba(46,124,246,.06)); border: 1px solid rgba(46,124,246,.28); }
.app-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--conductor-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-tag { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--conductor-2); }
.app-card h3 { font-size: 1.22rem; color: var(--on-dark); margin: .4rem 0 .6rem; }
.app-card p { color: var(--on-dark-mut); font-size: .95rem; line-height: 1.6; }
.specialty-credit { margin-top: clamp(1.4rem, 2.5vw, 2rem); font-size: .95rem; color: var(--slate-500); }
.specialty-credit strong { color: var(--slate-900); }

/* two-column top: pitch + animated synchronous-machine diagram */
.specialty-top { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; margin-bottom: clamp(2rem, 4vw, 3rem); }
.machine-wrap { display: flex; flex-direction: column; align-items: center; gap: .85rem;
  background: linear-gradient(180deg, var(--ink-2), var(--ink)); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 1.9rem); box-shadow: var(--shadow); }
.syncmachine { width: min(320px, 100%); height: auto; }
.machine-legend { display: flex; gap: 1.2rem; }
.machine-legend span { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--f-mono); font-size: .72rem; color: var(--on-dark-mut); }
.machine-legend i { width: 10px; height: 10px; border-radius: 50%; }
.lg-a { background: #5AA0FF; } .lg-b { background: #FFB020; } .lg-c { background: #46D38A; }
.machine-cap { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .03em; color: var(--on-dark-mut); text-align: center; max-width: 30rem; line-height: 1.55; }

.sm-core { fill: none; stroke: var(--steel); stroke-width: 2.5; }
.sm-bore { fill: none; stroke: var(--steel); stroke-width: 1.5; }
#sm-coil rect { stroke: rgba(234,241,250,.18); stroke-width: 1; }
.ph-a { fill: rgba(90,160,255,.5); animation: sm-glow 5.5s ease-in-out infinite; }
.ph-c { fill: rgba(70,211,138,.5); animation: sm-glow 5.5s ease-in-out infinite 1.83s; }
.ph-b { fill: rgba(255,176,32,.5); animation: sm-glow 5.5s ease-in-out infinite 3.67s; }
@keyframes sm-glow { 0%, 100% { opacity: .45; } 10% { opacity: 1; } 32% { opacity: .45; } }
.sm-rotor { transform-origin: 150px 150px; animation: sm-spin 5.5s linear infinite; }
@keyframes sm-spin { to { transform: rotate(360deg); } }
.sm-pole-n { fill: rgba(255,176,32,.18); }
.sm-pole-s { fill: rgba(90,160,255,.12); }
.sm-rotor-body { fill: none; stroke: var(--conductor); stroke-width: 2; }
.sm-axis { stroke: var(--arc); stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255,176,32,.6)); }
.sm-axis-head { fill: none; stroke: var(--arc); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sm-shaft { fill: var(--steel); stroke: var(--conductor-2); stroke-width: 1.5; }
.sm-labels text { fill: var(--on-dark-mut); font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; }
@media (prefers-reduced-motion: reduce) {
  .sm-rotor { animation: none; }
  .ph-a, .ph-b, .ph-c { animation: none; opacity: .7; }
}

/* ---------- selected work ---------- */
.work { background: var(--ink); color: var(--on-dark); }
.work .eyebrow { color: var(--conductor-2); }
.work h2 { color: var(--on-dark); }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2vw, 1.4rem); }
.work-card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink)); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 1.6rem 1.5rem 1.5rem;
  transition: border-color .18s ease, transform .18s ease;
}
.work-card:hover { border-color: rgba(46,124,246,.35); transform: translateY(-3px); }
.work-tag { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--conductor-2); }
.work-card h3 { font-size: 1.16rem; color: var(--on-dark); margin: .5rem 0 .7rem; }
.work-desc { color: var(--on-dark-mut); font-size: .95rem; line-height: 1.6; }
.work-meta { font-family: var(--f-mono); font-size: .76rem; color: var(--on-dark-mut); margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line-dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-diagram { margin-top: 1rem; }   /* headline leads on mobile; diagram follows the copy */
  .card-grid, .spec-grid, .lifecycle, .industry-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: 1fr; gap: 1.2rem; }
  .about-inner, .contact-inner, .specialty-top { grid-template-columns: 1fr; }
  .about-side { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Collapse the horizontal nav to the hamburger before the header runs out of
   room (brand + 5 links + CTA stop fitting around ~810px). */
@media (max-width: 920px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
}
@media (min-width: 921px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 720px) {
  .card-grid, .spec-grid, .lifecycle, .industry-grid, .team-grid, .work-grid, .app-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; }
}

/* scroll-reveal (progressive enhancement; JS adds .reveal then .is-in) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
