/* ==========================================================================
   HOME PAGE — two redesigned sections (2026-12-02, owner's selection)

   1. "One team, everything electric": a dark editorial bento, .x-bento
   2. "How a project runs": an interactive seven-step flow, .x-flow

   Nothing else on the home page changes; every other section is as it was.
   Brand tokens come from site.css. One accent (gold), one radius (4px), no
   glass, no glow. Both sections work without JavaScript and both switch all
   motion off under prefers-reduced-motion.
   ========================================================================== */

.x-sec{ position:relative; padding-block:clamp(4rem,8vw,7rem); --e:cubic-bezier(.2,.7,.2,1); --rad:4px; }
.x-dark{ background-color:var(--navy-deep); color:#fff; }
.x-dark h2{ color:#fff; }

/* --- the services section: white, with a live circuit behind it ------------
   Blue traces drawn as one inline SVG that covers the section. A second copy
   of each trace carries a short gold dash that travels its length: the
   "current". Each trace has its own speed and start so they never pulse in
   step. Decorative only (aria-hidden), and still under reduced motion. */
.x-light{ background-color:var(--paper); color:var(--navy); overflow:hidden; }
.x-light > .shell{ position:relative; z-index:1; }
/* the heading sits on a white pad so no trace runs through the words */
.x-light .x-bento__head{ background:var(--paper); box-shadow:0 0 0 1.5rem var(--paper); }
.x-circuit{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.x-circuit__lines path{ fill:none; stroke:var(--blue); stroke-opacity:.34; stroke-width:1.5; }
.x-circuit__lines circle{ fill:var(--paper); stroke:var(--blue); stroke-opacity:.6; stroke-width:1.5; }
.x-circuit__cur path{ fill:none; stroke:var(--gold); stroke-width:3; stroke-linecap:round;
  stroke-dasharray:60 940; stroke-dashoffset:1000; animation:x-current var(--d,7s) linear var(--dl,0s) infinite; }
@keyframes x-current{ to{ stroke-dashoffset:0; } }
/* schematic linework behind the dark sections */
.x-lines{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' fill='none' stroke='%234189C8' stroke-opacity='.16'%3E%3Cpath d='M0 60h90l30 30h110l30-30h60M0 230h60l30 30h70l30-30h130M160 0v60M250 90v110l-30 30M90 90v140'/%3E%3Ccircle cx='160' cy='60' r='3.5'/%3E%3Ccircle cx='90' cy='230' r='3.5'/%3E%3Ccircle cx='250' cy='200' r='3.5'/%3E%3C/svg%3E"); background-size:320px 320px; }
.x-arrow{ width:3rem; height:3rem; border-radius:50%; display:grid; place-items:center; flex:0 0 auto; border:1.5px solid currentColor;
  font-family:var(--display); font-weight:800; font-size:1.1rem; line-height:1; transition:background .25s ease, color .25s ease, border-color .25s ease, transform .35s var(--e); }
.x-ico{ width:2.75rem; height:2.75rem; stroke-width:1.85; flex:0 0 auto; }

/* ==========================================================================
   1. SERVICES — editorial bento
   ========================================================================== */
.x-bento{ display:grid; grid-template-columns:minmax(18rem,.8fr) 2fr; gap:clamp(2rem,4vw,4.5rem); align-items:start; }
.x-bento__head{ position:sticky; top:8rem; min-width:0; margin-bottom:0; }
.x-bento__head h2{ font-size:clamp(2rem,3.5vw,3.1rem); line-height:1.02; letter-spacing:-.03em; }
.x-bento__head p:not(.eyebrow){ color:var(--slate); font-size:1.125rem; line-height:1.6; margin-top:1.25rem; max-width:34rem; }
.x-dark .x-bento__head p:not(.eyebrow){ color:#C9D4E0; }
.x-bento__grid{ display:grid; grid-template-columns:repeat(12,1fr); grid-auto-rows:16.5rem; gap:18px; }
.x-tile{ position:relative; overflow:hidden; isolation:isolate; display:flex; flex-direction:column; justify-content:flex-end; border-radius:var(--rad);
  padding:1.5rem 1.6rem; background:var(--navy); color:#fff; text-decoration:none;
  /* raised off the white ground: a tight contact shadow plus a long soft one, both navy-tinted */
  box-shadow:0 2px 5px rgba(13,33,54,.16), 0 22px 40px -20px rgba(13,33,54,.5);
  transition:transform .45s var(--e), box-shadow .35s ease; }
.x-tile:hover, .x-tile:focus-visible{ transform:translateY(-8px); box-shadow:0 6px 14px rgba(13,33,54,.2), 0 38px 64px -26px rgba(13,33,54,.6); }
/* the call to action is on the card at rest, not hidden behind a hover */
.x-more{ display:inline-flex; align-items:center; gap:.5rem; align-self:flex-start; margin-top:.95rem; padding:.7rem 1.05rem; border-radius:8px;
  background:#fff; color:var(--navy); font-family:var(--display); font-weight:800; font-size:.875rem; line-height:1;
  box-shadow:0 2px 8px rgba(8,24,38,.35); transition:background .25s ease, transform .3s var(--e); }
.x-more i{ font-style:normal; transition:transform .3s var(--e); }
.x-tile:hover .x-more, .x-tile:focus-visible .x-more{ background:var(--gold); }
.x-tile:hover .x-more i, .x-tile:focus-visible .x-more i{ transform:translateX(5px); }
.x-tile--hero .x-more{ background:var(--gold); padding:.85rem 1.25rem; font-size:.9375rem; }
.x-tile--hero:hover .x-more{ background:var(--gold-bright); }
.x-tile img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; transition:transform 1.1s var(--e), filter .5s ease; filter:saturate(.92); }
.x-tile::before{ content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg, rgba(8,24,38,.6) 0%, rgba(8,24,38,.08) 30%, rgba(8,24,38,.96) 92%); }
.x-tile::after{ content:""; position:absolute; left:0; bottom:0; height:4px; width:100%; background:var(--gold); transform:scaleX(0); transform-origin:left; transition:transform .5s var(--e); }
.x-tile .x-ico{ position:absolute; top:1.35rem; left:1.5rem; color:#fff; }
.x-tile h3{ color:#fff; font-size:1.45rem; line-height:1.08; letter-spacing:-.015em; }
/* the description rides up on hover or focus; it is always in the page for readers and search */
.x-tile p{ color:#DCE4EE; font-size:.9688rem; line-height:1.5; max-width:40ch; display:grid; grid-template-rows:0fr; opacity:0; transition:grid-template-rows .45s var(--e), opacity .3s ease, margin-top .45s var(--e); }
.x-tile p > span{ overflow:hidden; }
.x-tile:hover, .x-tile:focus-visible{ color:#fff; }
.x-tile:focus-visible{ outline:3px solid var(--gold); outline-offset:2px; }
.x-tile:hover img, .x-tile:focus-visible img{ transform:scale(1.06); filter:saturate(1.08); }
.x-tile:hover::after, .x-tile:focus-visible::after{ transform:scaleX(1); }
.x-tile:hover p, .x-tile:focus-visible p{ grid-template-rows:1fr; opacity:1; margin-top:.55rem; }
.x-tile--hero{ grid-column:span 7; grid-row:span 2; padding:2rem; }
.x-tile--hero h3{ font-size:clamp(1.9rem,3.2vw,2.9rem); }
.x-tile--hero p{ grid-template-rows:1fr; opacity:1; margin-top:.7rem; font-size:1.0625rem; }
.x-tile--5{ grid-column:span 5; } .x-tile--4{ grid-column:span 4; }
/* only the large solar tile has room for its paragraph beside a button. On the other five the
   words stay in the page for readers and search but are not drawn on desktop; phones show them. */
.x-tile:not(.x-tile--hero) p{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.x-tile--4 h3{ font-size:1.3rem; }
.x-tile--5 h3{ font-size:1.6rem; }
.x-tile img.is-low{ object-position:50% 78%; }
@media (max-width:64rem){ .x-bento{ grid-template-columns:1fr; } .x-bento__head{ position:static; } }
@media (max-width:46rem){
  .x-bento__grid{ grid-template-columns:1fr; grid-auto-rows:auto; }
  .x-tile, .x-tile--hero{ grid-column:auto; grid-row:auto; min-height:20rem; padding:1.25rem; }
  .x-tile:not(.x-tile--hero) p{ position:static; width:auto; height:auto; clip-path:none; white-space:normal; display:grid; grid-template-rows:1fr; opacity:1; margin-top:.55rem; }
  .x-tile::before{ background:linear-gradient(180deg, rgba(8,24,38,.3) 0%, rgba(8,24,38,.5) 35%, rgba(8,24,38,.9) 62%, rgba(8,24,38,.97) 100%); }
  .x-tile .x-ico{ width:2.2rem; height:2.2rem; top:1.1rem; left:1.25rem; }
  .x-tile--hero{ min-height:23rem; }
}

/* ==========================================================================
   2. PROCESS — an interactive flow
   Without JavaScript this is a plain numbered list of all seven steps. The
   script adds .is-live, which turns the list into a rail of numbered nodes on
   a gold conductor and shows the chosen step large in the panel beside it.
   ========================================================================== */
.x-flow{ margin-top:3rem; }
.x-flow ol{ list-style:none; margin:0; padding:0; counter-reset:f; display:grid; gap:1.5rem 2rem; grid-template-columns:repeat(auto-fit,minmax(15rem,1fr)); }
.x-flow li{ counter-increment:f; }
.x-flow li h3{ color:#fff; font-size:1.125rem; }
.x-flow li h3::before{ content:counter(f, decimal-leading-zero); display:block; color:var(--gold); font-size:.8125rem; letter-spacing:.14em; margin-bottom:.4rem; }
.x-flow li p{ color:#C9D4E0; font-size:.9688rem; margin-top:.35rem; }
.x-flow__panel, .x-flow__ctl{ display:none; }

@media (min-width:56.01rem){
  .x-flow.is-live{ display:grid; grid-template-columns:1fr; gap:0; }
  .x-flow.is-live ol{ display:grid; grid-template-columns:repeat(7,1fr); gap:0; position:relative; }
  /* the conductor: a dim track with a gold run that reaches the chosen node */
  .x-flow.is-live ol::before, .x-flow.is-live ol::after{ content:""; position:absolute; left:calc(100% / 14); top:1.6rem; height:2px; }
  .x-flow.is-live ol::before{ right:calc(100% / 14); background:rgba(255,255,255,.2); }
  .x-flow.is-live ol::after{ width:calc((100% - 100% / 7) * var(--p, 0)); background:var(--gold); transition:width .7s var(--e); }
  .x-flow.is-live li{ text-align:center; position:relative; z-index:1; }
  .x-flow.is-live li p{ display:none; }
  .x-flow.is-live li h3::before{ display:none; }
  .x-flow.is-live li button{ all:unset; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:.9rem; width:100%; padding-bottom:.5rem; }
  .x-flow.is-live .n{ width:3.2rem; height:3.2rem; border-radius:50%; display:grid; place-items:center; position:relative;
    background:var(--navy-deep); border:2px solid rgba(255,255,255,.35); color:#fff; font-family:var(--display); font-weight:800; font-size:1.05rem;
    transition:background .3s ease, border-color .3s ease, color .3s ease, transform .4s var(--e); }
  .x-flow.is-live li h3{ font-size:.9688rem; color:#AEBBCB; transition:color .3s ease; line-height:1.2; padding-inline:.4rem; }
  .x-flow.is-live li.is-done .n{ border-color:var(--gold); color:var(--gold); }
  .x-flow.is-live li.is-on .n{ background:var(--gold); border-color:var(--gold); color:var(--navy); transform:scale(1.18); }
  .x-flow.is-live li.is-on h3, .x-flow.is-live li button:hover h3{ color:#fff; }
  .x-flow.is-live li button:hover .n{ border-color:var(--gold); }
  .x-flow.is-live li button:focus-visible .n{ outline:3px solid #fff; outline-offset:3px; }
  /* a ring around the live node counts down to the next step while it plays */
  .x-flow.is-live li.is-on .n::after{ content:""; position:absolute; inset:-9px; border-radius:50%; border:2px solid rgba(242,168,28,.55); }
  .x-flow.is-live.is-playing li.is-on .n::after{ animation:x-pulse var(--dur,5s) linear both; }
  @keyframes x-pulse{ from{ transform:scale(.82); opacity:1; } to{ transform:scale(1.25); opacity:0; } }

  .x-flow.is-live .x-flow__panel{ display:grid; grid-template-columns:auto 1fr auto; gap:clamp(1.5rem,4vw,4rem); align-items:center; margin-top:3rem;
    padding:clamp(2rem,4vw,3.25rem); background:var(--navy); border-radius:var(--rad); border-left:5px solid var(--gold); min-height:15rem; overflow:hidden; }
  .x-flow__num{ font-family:var(--display); font-weight:800; font-size:clamp(6rem,13vw,11rem); line-height:.8; letter-spacing:-.05em; color:var(--gold); min-width:1.25em; }
  .x-flow__body h3{ color:#fff; font-size:clamp(1.6rem,3vw,2.5rem); letter-spacing:-.025em; line-height:1.05; }
  .x-flow__body p{ color:#DCE4EE; font-size:1.1875rem; line-height:1.55; margin-top:.9rem; max-width:34rem; }
  .x-flow__num, .x-flow__body{ transition:opacity .35s ease, transform .5s var(--e); }
  .x-flow.is-swapping .x-flow__num{ opacity:0; transform:translateY(-24px); }
  .x-flow.is-swapping .x-flow__body{ opacity:0; transform:translateX(28px); }
  .x-flow.is-live .x-flow__ctl{ display:flex; flex-direction:column; gap:.6rem; }
  .x-flow__ctl button{ all:unset; cursor:pointer; width:3.25rem; height:3.25rem; border-radius:50%; display:grid; place-items:center; border:1.5px solid rgba(255,255,255,.45); color:#fff;
    font-family:var(--display); font-weight:800; font-size:1.1rem; transition:background .25s ease, color .25s ease, border-color .25s ease; }
  .x-flow__ctl button:hover{ background:var(--gold); border-color:var(--gold); color:var(--navy); }
  .x-flow__ctl button:focus-visible{ outline:3px solid #fff; outline-offset:2px; }
}

/* phones and tablets: a vertical conductor; each step lights as it scrolls into view */
@media (max-width:56rem){
  .x-flow.is-live ol{ grid-template-columns:1fr; gap:0; position:relative; }
  .x-flow.is-live ol::before{ content:""; position:absolute; left:1.25rem; top:.5rem; bottom:2rem; width:2px; background:rgba(255,255,255,.2); }
  .x-flow.is-live li{ display:grid; grid-template-columns:2.6rem 1fr; gap:.2rem 1.1rem; padding-bottom:1.75rem; position:relative; opacity:.45; transition:opacity .5s ease; }
  .x-flow.is-live li button{ all:unset; display:contents; }
  .x-flow.is-live .n{ grid-row:span 2; width:2.6rem; height:2.6rem; border-radius:50%; display:grid; place-items:center; background:var(--navy-deep); border:2px solid rgba(255,255,255,.35);
    font-family:var(--display); font-weight:800; font-size:.95rem; color:#fff; transition:background .4s ease, border-color .4s ease, color .4s ease; z-index:1; }
  .x-flow.is-live li h3{ align-self:center; font-size:1.1875rem; }
  .x-flow.is-live li h3::before{ display:none; }
  .x-flow.is-live li p{ grid-column:2; }
  .x-flow.is-live li.is-seen{ opacity:1; }
  .x-flow.is-live li.is-seen .n{ background:var(--gold); border-color:var(--gold); color:var(--navy); }
}

@media (prefers-reduced-motion: reduce){
  .x-tile, .x-tile *, .x-tile::after, .x-flow *, .x-flow ol::after{ transition:none !important; animation:none !important; }
  .x-tile:hover, .x-tile:focus-visible{ transform:none; }
  .x-circuit__cur{ display:none; }
  .x-tile p{ grid-template-rows:1fr; opacity:1; margin-top:.55rem; }
  .x-flow.is-live li{ opacity:1; }
}
