/* Energy Connect website. Tokens from Branding/design-tokens.json. Square corners, navy leads, teal highlights. */
:root {
  --navy: #041C3C;
  --navy-lift: #12305A;
  --teal: #00A9B8;
  --teal-ink: #00707B;
  --teal-soft: #DDF3F5;
  --surface: #F5F8FA;
  --raised: #FFFFFF;
  --line: #D3DEE5;
  --ink: #041C3C;
  --muted: #4B5D72;
  --font-display: "Roboto", "Segoe UI", Arial, sans-serif;
  --font-text: "Inter", "Segoe UI", Arial, sans-serif;
  --font-figure: "Roboto Mono", Consolas, monospace;
  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font: 400 17px/1.6 var(--font-text);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.figure { font-family: var(--font-figure); font-weight: 500; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--raised); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- header */
.site-head { background: var(--raised); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand img { width: 168px; height: auto; }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav a { font-family: var(--font-display); font-weight: 500; font-size: 15px; color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--teal); }
.nav a[aria-current="page"] { border-bottom-color: var(--navy); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); padding: 8px 12px; font: 500 15px var(--font-display); color: var(--ink); cursor: pointer; }

/* ---- hero (the one bold element: a firm load built from a shifting mix) */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), calc(100% - 97px) 100%, 0 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { color: #fff; max-width: 14ch; }
.hero p { color: #C9D6E2; font-size: 1.1rem; max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.profile { width: 100%; }
.profile .bar { transform-origin: bottom; transform-box: fill-box; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 14px; color: #C9D6E2; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; display: inline-block; }
.legend .line-key { width: 18px; height: 0; border-top: 2px solid #fff; }
@media (prefers-reduced-motion: no-preference) {
  .profile .bar { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 18ms); }
  .profile .firm-line { animation: draw 1s ease-out .9s both; }
  @keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes draw { from { opacity: 0; } to { opacity: 1; } }
}

/* ---- buttons */
.btn { display: inline-block; font: 500 16px var(--font-display); padding: 13px 22px; text-decoration: none; border: 2px solid transparent; }
.btn-primary { background: var(--teal); color: var(--navy); }
.btn-primary:hover { background: #fff; color: var(--navy); }
.btn-ghost { border-color: #5D7590; color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-lift); color: #fff; }

/* ---- sections */
.section { padding: 88px 0; }
.section.alt { background: var(--raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.section-head { max-width: 760px; margin-bottom: 40px; }

/* services overview: three columns divided by hairlines, not cards */
.services { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--navy); }
.services article { padding: 28px 28px 8px 0; }
.services article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.services h3 a { color: var(--ink); text-decoration: none; }
.services h3 a:hover { color: var(--teal-ink); text-decoration: underline; }
.services ul { margin: 0 0 1em; padding-left: 1.1em; color: var(--muted); }
.services li { margin-bottom: .3em; }

/* portfolio figures */
.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--raised); border: 1px solid var(--line); }
.portfolio > div { padding: 28px; }
.portfolio > div + div { border-left: 1px solid var(--line); }
.portfolio .num { font-family: var(--font-figure); font-weight: 500; font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--navy); line-height: 1.1; }
.portfolio .unit { color: var(--muted); font-size: .95rem; }
.portfolio h3 { margin-top: 14px; }
.portfolio p { color: var(--muted); font-size: .97rem; }
.cells { display: flex; gap: 4px; align-items: flex-end; height: 28px; margin-bottom: 18px; }
.cells i { width: 7px; background: var(--teal); display: block; }

/* stepped development path: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; border-top: 2px solid var(--navy); }
.steps li { counter-increment: s; padding: 22px 18px 0 0; }
.steps li::before { content: counter(s); font-family: var(--font-figure); font-weight: 500; color: var(--teal-ink); display: block; margin-bottom: 6px; }
.steps strong { font-family: var(--font-display); font-weight: 500; display: block; font-size: 1.05rem; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: .95rem; }

/* call-to-action band */
.cta-band { background: var(--navy); color: #fff; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 56px; padding-bottom: 56px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .25em; }
.cta-band p { color: #C9D6E2; margin: 0; }

/* inner page header */
.page-head { background: var(--navy); color: #fff; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), calc(100% - 69px) 100%, 0 100%); }
.page-head .wrap { padding-top: 64px; padding-bottom: 76px; }
.page-head h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.9rem); max-width: 22ch; }
.page-head p { color: #C9D6E2; font-size: 1.12rem; max-width: 60ch; margin: 0; }

/* service detail blocks */
.service { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; padding: 56px 0; border-top: 1px solid var(--line); }
.service:first-child { border-top: 0; padding-top: 0; }
.service h2 { font-size: 1.8rem; }
.service dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.service dt { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; padding-top: 14px; border-top: 1px solid var(--line); }
.service dd { margin: 4px 0 14px; color: var(--muted); }
.service dt:first-of-type { border-top: 2px solid var(--navy); }
.note { background: var(--teal-soft); padding: 18px 22px; margin-top: 18px; }
.note p { margin: 0; }

/* project table */
.table-wrap { overflow-x: auto; background: var(--raised); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 500; }
td.figure, th.figure { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 600; border-bottom: 0; }
.project { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.facts { background: var(--raised); border: 1px solid var(--line); border-top: 3px solid var(--teal); padding: 8px 24px; }
.facts div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 600; }

/* people */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.person { background: var(--raised); border: 1px solid var(--line); padding: 28px; }
.person .role { color: var(--teal-ink); font-family: var(--font-display); font-weight: 500; margin-top: -6px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--navy); }
.timeline li { padding: 20px 20px 0 0; }
.timeline b { font-family: var(--font-figure); font-weight: 500; color: var(--teal-ink); display: block; }
.timeline strong { font-family: var(--font-display); font-weight: 500; display: block; font-size: 1.1rem; margin: 2px 0 4px; }
.timeline span { color: var(--muted); font-size: .95rem; }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; }
.contact .big { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem); }

/* footer */
.site-foot { background: var(--navy); color: #C9D6E2; border-top: 1px solid var(--navy-lift); font-size: 15px; }
.site-foot .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 40px; }
.site-foot img { width: 160px; margin-bottom: 14px; }
.site-foot a { color: #fff; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot h2 { font-size: 15px; color: #fff; margin-bottom: 10px; }
.legal { border-top: 1px solid var(--navy-lift); }
.legal .wrap { display: block; padding-top: 16px; padding-bottom: 20px; font-size: 13px; }

/* ---- responsive */
@media (max-width: 900px) {
  .hero .wrap, .service, .project, .contact { grid-template-columns: 1fr; gap: 32px; }
  .services, .portfolio { grid-template-columns: 1fr; }
  .services article, .services article + article { padding: 24px 0 8px; border-left: 0; border-top: 1px solid var(--line); }
  .services article:first-child { border-top: 0; }
  .portfolio > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .people { grid-template-columns: 1fr; }
  .site-foot .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; left: 0; right: 0; top: 76px; background: var(--raised); border-bottom: 1px solid var(--line); display: none; z-index: 5; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-head { position: relative; }
  .steps, .timeline { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
