/* MegaWatt Adviseur — public website. One stylesheet, no framework. Same brand as the platform. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --midnight: #0e1a2b;
  --midnight-2: #14243a;
  --midnight-3: #1c2f49;
  --copper: #b87333;
  --copper-2: #d08a48;
  --copper-soft: #f4e9dd;
  --ink: #0b1220;
  --ink-2: #475467;
  --ink-3: #8a94a6;
  --line: #e6e8ec;
  --page: #f6f7f9;
  --surface: #ffffff;
  --accent: #2a78d6;
  --good: #1f7a4d;
  --radius: 10px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Geist", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" on;
}

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

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 26, 43, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  height: 72px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  letter-spacing: 0.18em;
  font-size: 13px;
  white-space: nowrap;
}
.brand,
.brand svg,
.site-header .header-cta {
  flex-shrink: 0;
}
.brand b {
  font-weight: 650;
}
.brand span {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}
.nav {
  display: flex;
  gap: clamp(16px, 1.6vw, 24px);
  margin-left: auto;
  font-size: 15px;
}
.nav a {
  white-space: nowrap;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.15s;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
}
.header-cta {
  margin-left: 8px;
}
.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 1160px) {
  .nav,
  .site-header .header-cta {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .site-header.open .nav {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--midnight);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px var(--gutter) 20px;
  }
  .site-header.open .nav a {
    padding: 12px 0;
    font-size: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-copper {
  background: var(--copper);
  color: #fff;
}
.btn-copper:hover {
  background: #a5662c;
}
.btn-light {
  background: #fff;
  color: var(--midnight);
}
.btn-light:hover {
  background: #eef1f5;
}
.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-dark {
  background: var(--midnight);
  color: #fff;
}
.btn-dark:hover {
  background: var(--midnight-3);
}
.btn-sm {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

/* ---------------------------------------------------------------- typography */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-weight: 620;
}
h1 {
  font-size: clamp(40px, 6.2vw, 76px);
}
h2 {
  font-size: clamp(30px, 4vw, 48px);
}
h3 {
  font-size: 21px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 640px;
}
.muted {
  color: var(--ink-2);
}
.small {
  font-size: 14px;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- sections */

section {
  padding: clamp(72px, 10vw, 128px) 0;
}
.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.section-head h2 {
  margin-top: 16px;
}
.section-head .lead {
  margin-top: 20px;
}
.dark {
  background: var(--midnight);
  color: #fff;
}
.dark .lead,
.dark .muted {
  color: rgba(255, 255, 255, 0.66);
}
.dark .small {
  color: rgba(255, 255, 255, 0.45);
}
.tint {
  background: var(--page);
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 11vw, 140px) 0 clamp(64px, 9vw, 112px);
  background: radial-gradient(70% 80% at 85% 0%, rgba(42, 120, 214, 0.16), transparent 70%), var(--midnight);
  color: #fff;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero h1 {
  margin-top: 24px;
}
.hero h1 em {
  display: block;
  margin-top: 0.18em;
  font-style: normal;
  font-size: 0.6em;
  line-height: 1.12;
  color: var(--copper-2);
}
.hero .lead {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.7);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 48px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  list-style: none;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}
.hero-facts li::before {
  content: "—";
  color: var(--copper-2);
  margin-right: 10px;
}
.hero-visual {
  position: relative;
}
.hero-visual svg {
  width: 100%;
  height: auto;
}
.rings {
  position: absolute;
  inset: auto -200px -260px auto;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.rings::after {
  content: "";
  position: absolute;
  inset: 90px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    max-width: 520px;
  }
}

/* ---------------------------------------------------------------- cards & grids */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 960px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: #d0d5dd;
}
.card h3 {
  margin-top: 20px;
}
.card p {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}
.icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--copper-soft);
  color: #8a5422;
}
.dark .card {
  background: var(--midnight-2);
  border-color: rgba(255, 255, 255, 0.07);
}
.dark .card p {
  color: rgba(255, 255, 255, 0.62);
}
.dark .icon {
  background: rgba(184, 115, 51, 0.16);
  color: var(--copper-2);
}

/* ---------------------------------------------------------------- steps */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.steps li {
  counter-increment: step;
  padding: 32px 28px 0 0;
}
.steps li::before {
  content: "0" counter(step);
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.12em;
  color: var(--copper);
  margin-bottom: 18px;
  padding-top: 0;
}
.steps h3 {
  font-size: 20px;
}
.steps p {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}
@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- example (figures) */

.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
}
.figure {
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.figure:last-child {
  border-right: 0;
}
.figure dt {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.figure dd {
  margin: 12px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 620;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.figure dd small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 860px) {
  .figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .figure:nth-child(2) {
    border-right: 0;
  }
  .figure:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.bars {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bars li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
}
.bars li span:last-of-type {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--copper-2);
}
.bar i.neg {
  background: rgba(255, 255, 255, 0.35);
}

/* ---------------------------------------------------------------- lists, faq, misc */

.checks {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.checks li {
  position: relative;
  padding: 10px 0 10px 32px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 14px;
  height: 7px;
  border-left: 2px solid var(--copper);
  border-bottom: 2px solid var(--copper);
  transform: rotate(-45deg);
}
.checks strong {
  color: var(--ink);
  font-weight: 600;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--copper);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  margin: 14px 0 0;
  color: var(--ink-2);
  max-width: 760px;
}

.note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
.dark .note {
  color: rgba(255, 255, 255, 0.42);
}

.cta {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: clamp(40px, 6vw, 72px);
  background: radial-gradient(60% 90% at 100% 0%, rgba(184, 115, 51, 0.22), transparent 70%), var(--midnight);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.cta p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.66);
  max-width: 560px;
}
@media (max-width: 760px) {
  .cta {
    grid-template-columns: 1fr;
  }
}

.page-hero {
  padding: clamp(64px, 9vw, 112px) 0 clamp(48px, 7vw, 80px);
  background: radial-gradient(60% 90% at 90% 0%, rgba(42, 120, 214, 0.14), transparent 70%), var(--midnight);
  color: #fff;
}
.page-hero h1 {
  margin-top: 20px;
  font-size: clamp(38px, 5vw, 60px);
}
.page-hero .lead {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.68);
}

.prose {
  max-width: 760px;
}
.prose h2 {
  font-size: 28px;
  margin: 48px 0 12px;
}
.prose p,
.prose li {
  color: var(--ink-2);
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-card a.mail {
  display: inline-block;
  margin-top: 8px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--copper);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--midnight);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.site-footer h4 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li {
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.site-footer a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
}
.site-footer a:hover {
  color: #fff;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- photography */
/* Photos are optional per slot (see scripts/website/photos.mjs); layouts work with and without them. */

.photo img,
.hero-photo img,
.page-hero-photo img,
.service-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero.has-photo,
.page-hero.has-photo {
  position: relative;
  isolation: isolate;
}
.hero-photo,
.page-hero-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
}
/* Midnight overlay: keeps text contrast and gives every photo the same tone */
.hero-photo::after,
.page-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 26, 43, 0.94) 0%, rgba(14, 26, 43, 0.82) 45%, rgba(14, 26, 43, 0.35) 100%);
}
.hero.has-photo {
  background: var(--midnight);
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
}
.hero.has-photo .hero-grid {
  grid-template-columns: minmax(0, 680px);
}
.hero.has-photo .rings {
  display: none;
}
.page-hero.has-photo {
  background: var(--midnight);
  padding-top: clamp(96px, 12vw, 160px);
}
.page-hero .hero-actions {
  margin-top: 32px;
}
@media (max-width: 760px) {
  .hero-photo::after,
  .page-hero-photo::after {
    background: linear-gradient(180deg, rgba(14, 26, 43, 0.7) 0%, rgba(14, 26, 43, 0.92) 55%);
  }
}

/* ---------------------------------------------------------------- services */

.services {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 24px;
}
.service-feature {
  grid-row: span 3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(70% 60% at 100% 0%, rgba(184, 115, 51, 0.2), transparent 70%), var(--midnight);
  color: #fff;
}
.service-feature .service-body {
  padding: clamp(28px, 4vw, 48px);
}
.service-feature h3 {
  margin-top: 18px;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.02em;
}
.service-feature p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.7);
}
.service-feature .checks li {
  color: rgba(255, 255, 255, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.service-feature .checks strong {
  color: #fff;
}
.service-feature .note {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.5);
}
.service-actions {
  margin-top: 28px !important;
}
.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(184, 115, 51, 0.18);
  color: var(--copper-2);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.service-card > .icon {
  margin: 32px 32px 0;
}
.service-card .service-body {
  padding: 24px 32px 32px;
}
.service-card h3 {
  font-size: 22px;
}
.service-card p {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}
.service-photo {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--midnight-2);
}
.service-card .service-photo {
  aspect-ratio: 3 / 2;
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--copper);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.more::after {
  content: "→";
  transition: transform 0.15s;
}
.more:hover::after {
  transform: translateX(3px);
}
@media (max-width: 960px) {
  .services {
    grid-template-columns: 1fr;
  }
  .service-feature {
    grid-row: auto;
  }
}

/* ---------------------------------------------------------------- products */

.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.product {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: box-shadow 0.2s, transform 0.2s;
}
.product-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #f4f5f7, #e9ecf0);
}
.product-photo img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  mix-blend-mode: multiply;
}
.product-body {
  padding: 28px;
}
.product-brand {
  color: var(--copper);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.product h3 {
  margin-top: 6px;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.specs {
  margin: 18px 0 0;
}
.specs div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.specs dt {
  color: var(--ink-2);
}
.specs dd {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.product p {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}
@media (max-width: 960px) {
  .products {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .product {
    grid-template-columns: 1fr;
  }
  .product-photo img {
    max-height: 240px;
  }
}

/* ---------------------------------------------------------------- strategy chain */

.chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}
.chain li {
  position: relative;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.chain li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 49px;
  right: -21px;
  width: 22px;
  height: 2px;
  background: var(--copper);
  opacity: 0.6;
}
.chain li.key {
  background: var(--midnight);
  border-color: var(--midnight);
  color: #fff;
}
.chain li.key p {
  color: rgba(255, 255, 255, 0.7);
}
.chain li.key .icon {
  background: rgba(184, 115, 51, 0.2);
  color: var(--copper-2);
}
.chain h3 {
  margin-top: 18px;
  font-size: 18px;
}
.chain p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}
@media (max-width: 1080px) {
  .chain {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .chain li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 20px;
    padding: 22px 24px;
  }
  .chain li .icon {
    grid-row: span 2;
  }
  .chain h3 {
    margin-top: 0;
  }
  .chain li:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -15px;
    left: 45px;
    width: 2px;
    height: 16px;
  }
}

/* ---------------------------------------------------------------- factors, callouts, illustrations */

.factors {
  gap: 0;
  border-top: 1px solid var(--line);
}
.factors > div {
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--line);
}
.factors h3 {
  font-size: 18px;
}
.factors p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}
.callout {
  padding: 24px 28px;
  border-left: 3px solid var(--copper);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--copper-soft);
}
.callout p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
}
.callout p + p {
  margin-top: 12px;
}
.callout strong {
  color: var(--ink);
}
.illustration {
  padding: clamp(16px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: var(--midnight-2);
}
.illustration svg {
  width: 100%;
  height: auto;
}
.link-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s;
}
.link-card:hover {
  border-color: var(--copper);
}
.link-card h3 {
  font-size: 20px;
}
.link-card p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}
.pair {
  gap: 24px;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------- energy illustration (static base) */

.energy .pulse {
  stroke-dasharray: 0.01 26;
}
.energy .sun,
.energy .led {
  transform-box: fill-box;
  transform-origin: center;
}

/* ---------------------------------------------------------------- micro-interactions */

.card,
.service-card,
.link-card,
.chain li,
.product {
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
}
.service-card:hover,
.link-card:hover,
.product:hover {
  box-shadow: 0 18px 40px -24px rgba(14, 26, 43, 0.35);
}
.nav a {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  padding-bottom: 3px;
  transition: color 0.15s, background-size 0.25s;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background-size: 100% 1px;
}
.site-header {
  transition: background 0.25s, box-shadow 0.25s;
}
.site-header.scrolled {
  background: rgba(14, 26, 43, 0.97);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.6);
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
  .flow {
    stroke-dasharray: 6 10;
    animation: flow 2.4s linear infinite;
  }
  @keyframes flow {
    to {
      stroke-dashoffset: -32;
    }
  }

  /* Staggered reveal inside grids */
  .js .grid-3 > .reveal:nth-child(2),
  .js .grid-4 > .reveal:nth-child(2),
  .js .services > .reveal:nth-child(2) {
    transition-delay: 0.08s;
  }
  .js .grid-3 > .reveal:nth-child(3),
  .js .grid-4 > .reveal:nth-child(3),
  .js .services > .reveal:nth-child(3) {
    transition-delay: 0.16s;
  }
  .js .grid-4 > .reveal:nth-child(4),
  .js .services > .reveal:nth-child(4) {
    transition-delay: 0.24s;
  }
  .service-card:hover,
  .link-card:hover,
  .product:hover {
    transform: translateY(-3px);
  }
  /* Energy illustration: energy flows as moving dots, the battery charges cell by cell */
  .energy .pulse {
    animation: energy-flow 1.6s linear infinite;
  }
  .energy .pulse.d2 {
    animation-delay: -0.5s;
  }
  .energy .pulse.d3 {
    animation-delay: -1s;
  }
  .energy .pulse.grid {
    animation-duration: 2.6s;
  }
  .energy .cell {
    animation: energy-charge 7s ease-in-out infinite;
  }
  .energy .c2 {
    animation-delay: 0.7s;
  }
  .energy .c3 {
    animation-delay: 1.4s;
  }
  .energy .c4 {
    animation-delay: 2.1s;
  }
  .energy .sun {
    animation: energy-sun 5s ease-in-out infinite alternate;
  }
  .energy .led {
    animation: energy-led 2.4s ease-in-out infinite;
  }
  @keyframes energy-flow {
    to {
      stroke-dashoffset: -26;
    }
  }
  @keyframes energy-charge {
    0%,
    100% {
      opacity: 0.22;
    }
    30%,
    80% {
      opacity: 1;
    }
  }
  @keyframes energy-sun {
    from {
      opacity: 0.55;
      transform: scale(0.92);
    }
    to {
      opacity: 1;
      transform: scale(1.06);
    }
  }
  @keyframes energy-led {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.35;
    }
  }
}
