:root {
  --navy: #071b46;
  --blue: #0b3a86;
  --sky: #1b83d4;
  --red: #e31912;
  --green: #0f9f76;
  --gold: #c88a10;
  --violet: #7057d8;
  --ink: #101828;
  --muted: #5b667a;
  --line: #dde5ef;
  --soft: #f5f8fc;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(10, 27, 70, 0.14);
  --radius: 8px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.section {
  padding: 96px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(221, 229, 239, 0.8);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(100% - 32px, 1240px);
  height: 78px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand img,
.footer-brand img {
  width: 188px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius);
  color: #2e3a4f;
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--soft);
  color: var(--blue);
}

.nav-cta,
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
}

.nav-cta,
.button.primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(227, 25, 18, 0.2);
}

.button.secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
}

.nav-cta:hover,
.button.primary:hover {
  background: #c9130d;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 18px 40px rgba(7, 27, 70, 0.24);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  z-index: 60;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover,
.scroll-top:focus-visible {
  background: var(--blue);
}

.button.secondary:hover {
  border-color: #b8c5d7;
  background: var(--soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--navy);
}

.hero {
  min-height: min(820px, calc(100vh - 78px));
  display: flex;
  align-items: center;
  padding: 76px 0 54px;
  background:
    radial-gradient(circle at 10% 8%, rgba(227, 25, 18, 0.13), transparent 30%),
    linear-gradient(120deg, #ffffff 0%, #f6f9fd 54%, #edf5ff 100%);
  overflow: hidden;
}

.hero-grid,
.feature-grid,
.contact-grid,
.why-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: clamp(3.8rem, 9vw, 7.5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.25;
}

.hero-lede,
.section-heading p,
.feature-copy p,
.contact-grid p,
.split p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 34px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-metrics li {
  padding: 16px;
  border: 1px solid rgba(221, 229, 239, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.hero-metrics strong {
  display: block;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 800;
}

.hero-metrics small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% -8% auto auto;
  width: 82%;
  aspect-ratio: 1;
  background: #dfeaff;
  border-radius: 50%;
  filter: blur(10px);
}

.dashboard-frame {
  position: relative;
  z-index: 1;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background: rgba(7, 27, 70, 0.94);
  box-shadow: var(--shadow);
  color: var(--white);
}

.dashboard-topbar {
  display: flex;
  gap: 7px;
  margin-bottom: 16px;
}

.dashboard-topbar span,
.terminal-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff625b;
}

.dashboard-topbar span:nth-child(2),
.terminal-head span:nth-child(2) {
  background: #f0b429;
}

.dashboard-topbar span:nth-child(3),
.terminal-head span:nth-child(3) {
  background: #21c985;
}

.dashboard-panel,
.chart-card,
.signal-list {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.dashboard-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
}

.dashboard-panel p,
.chart-card span {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
}

.dashboard-panel strong {
  font-size: 1.35rem;
}

.status-pill {
  align-self: start;
  border-radius: 999px;
  padding: 7px 11px;
  color: #061d4f;
  background: #9ff7cf;
  font-size: 0.78rem;
  font-weight: 800;
}

.chart-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 14px;
  margin: 14px 0;
}

.chart-card {
  padding: 18px;
  min-height: 168px;
}

.radial {
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  margin: 12px auto 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--navy) 0 55%, transparent 56%),
    conic-gradient(#31d49b 0 92%, rgba(255, 255, 255, 0.14) 92% 100%);
}

.radial strong {
  font-size: 1.7rem;
}

.bar-chart {
  height: 110px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 18px;
}

.bar-chart i {
  flex: 1;
  min-width: 16px;
  display: block;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #42a5ff, #78e1b8);
}

.bar-chart i:nth-child(1) { height: 50%; }
.bar-chart i:nth-child(2) { height: 78%; }
.bar-chart i:nth-child(3) { height: 62%; }
.bar-chart i:nth-child(4) { height: 88%; }
.bar-chart i:nth-child(5) { height: 70%; }

.signal-list {
  display: grid;
  gap: 11px;
  padding: 18px;
  color: rgba(255, 255, 255, 0.84);
}

.signal-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
}

.signal-list span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #31d49b;
}

.intro {
  padding: 72px 0;
  background: var(--white);
}

.section-heading {
  width: min(100%, 780px);
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading .eyebrow {
  justify-content: center;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.solution-card,
.process-steps article,
.approach-card,
.portfolio-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

.solution-card {
  position: relative;
  min-height: 238px;
  padding: 26px;
  overflow: hidden;
}

.solution-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--sky);
}

.solution-card.accent-red::before {
  background: var(--red);
}

.solution-card.accent-green::before {
  background: var(--green);
}

.solution-card.accent-gold::before {
  background: var(--gold);
}

.solution-card.accent-blue::before {
  background: var(--blue);
}

.solution-card.accent-violet::before {
  background: var(--violet);
}

.card-number {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--blue);
  font-weight: 800;
}

.solution-card p,
.process-steps p,
.approach-card p,
.portfolio-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.feature {
  background: #f8fbff;
}

.arbitrage {
  background:
    linear-gradient(120deg, rgba(7, 27, 70, 0.96), rgba(9, 43, 98, 0.94)),
    #071b46;
  color: var(--white);
}

.arbitrage h2,
.arbitrage h3 {
  color: var(--white);
}

.arbitrage .feature-copy p {
  color: rgba(255, 255, 255, 0.75);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.feature-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 151, 183, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.91rem;
  font-weight: 600;
}

.feature-list span::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
}

.energy .feature-list span {
  background: var(--white);
}

.energy .feature-list span::before {
  background: var(--green);
}

.terminal-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.terminal-head strong {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
}

.trade-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trade-row span,
.risk-note {
  color: rgba(255, 255, 255, 0.66);
}

.trade-row strong {
  color: #9ff7cf;
}

.trade-graph {
  height: 160px;
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 26px 0 18px;
}

.trade-graph i {
  flex: 1;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #9ff7cf, #1b83d4);
}

.trade-graph i:nth-child(1) { height: 48%; }
.trade-graph i:nth-child(2) { height: 64%; }
.trade-graph i:nth-child(3) { height: 42%; }
.trade-graph i:nth-child(4) { height: 82%; }
.trade-graph i:nth-child(5) { height: 70%; }
.trade-graph i:nth-child(6) { height: 92%; }
.trade-graph i:nth-child(7) { height: 56%; }

.risk-note {
  margin: 0;
  font-size: 0.84rem;
}

.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.energy-map {
  position: relative;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.92)),
    repeating-linear-gradient(90deg, #e6edf7 0 1px, transparent 1px 54px),
    repeating-linear-gradient(0deg, #e6edf7 0 1px, transparent 1px 54px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.energy-map::before,
.energy-map::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 66%;
  height: 2px;
  transform: translate(-50%, -50%) rotate(28deg);
  background: rgba(15, 159, 118, 0.26);
}

.energy-map::after {
  transform: translate(-50%, -50%) rotate(-28deg);
  background: rgba(11, 58, 134, 0.24);
}

.energy-core,
.energy-node {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(7, 27, 70, 0.14);
}

.energy-core {
  inset: 50% auto auto 50%;
  width: 174px;
  height: 174px;
  transform: translate(-50%, -50%);
  background: var(--navy);
  color: var(--white);
  line-height: 1.35;
}

.energy-node {
  width: 104px;
  height: 104px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
}

.home-node {
  left: 8%;
  top: 11%;
}

.solar-node {
  right: 10%;
  top: 12%;
  color: var(--gold);
}

.wind-node {
  left: 12%;
  bottom: 12%;
  color: var(--sky);
}

.gas-node {
  right: 13%;
  bottom: 13%;
  color: var(--red);
}

.grid-node {
  right: 7%;
  top: 42%;
  color: var(--green);
}

.process {
  background: var(--white);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.process-steps article {
  padding: 24px;
}

.process-steps span {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--red);
  font-weight: 800;
}

.approach {
  background: #f8fbff;
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.approach-card {
  position: relative;
  min-height: 300px;
  padding: 28px;
  overflow: hidden;
}

.approach-card::after {
  content: "";
  position: absolute;
  inset: auto 24px 0 24px;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--sky), var(--green));
}

.approach-card span {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--red);
  font-weight: 800;
}

.portfolio {
  background: var(--soft);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portfolio-item {
  display: block;
  min-height: 236px;
  padding: 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.1);
}

.portfolio-item-featured {
  border-color: rgba(11, 58, 134, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.96)),
    var(--white);
}

.portfolio-item span {
  display: inline-flex;
  margin-bottom: 32px;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.why {
  background: var(--navy);
  color: var(--white);
}

.why h2 {
  color: var(--white);
}

.why-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.why-list span {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.contact {
  background: #ffffff;
}

.contact-grid {
  align-items: start;
}

.contact-details {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.contact-details a,
.contact-details span {
  display: block;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--navy);
  font-weight: 600;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cfd9e7;
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(27, 131, 212, 0.16);
  border-color: var(--sky);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-note[data-state="loading"] {
  color: var(--blue);
}

.form-note[data-state="success"] {
  color: var(--green);
}

.form-note[data-state="error"] {
  color: var(--red);
}

.form-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 20px;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1060px) {
  .nav-cta {
    display: none;
  }

  .solution-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .approach-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .section {
    padding: 72px 0;
  }

  .nav-shell {
    height: 68px;
  }

  .brand img,
  .footer-brand img {
    width: 154px;
  }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 2;
    border-color: #b8c5d7;
    background: var(--soft);
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 48px;
  }

  .hero-grid,
  .feature-grid,
  .feature-grid.reverse,
  .contact-grid,
  .why-grid,
  .split {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .energy-map {
    min-height: 430px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .nav-shell {
    width: min(100% - 24px, var(--container));
  }

  .section {
    padding: 58px 0;
  }

  h1 {
    font-size: clamp(2.9rem, 15.4vw, 4.2rem);
  }

  h2 {
    font-size: clamp(1.9rem, 11vw, 2.55rem);
  }

  .hero-actions,
  .feature-list,
  .why-list {
    grid-template-columns: 1fr;
  }

  .hero-actions .button,
  .contact-form .button {
    width: 100%;
  }

  .solution-grid,
  .portfolio-grid,
  .process-steps,
  .approach-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-frame,
  .contact-form,
  .terminal-card {
    border-radius: 14px;
    padding: 16px;
  }

  .dashboard-panel {
    flex-direction: column;
  }

  .energy-map {
    min-height: 360px;
  }

  .energy-core {
    width: 132px;
    height: 132px;
    font-size: 0.84rem;
  }

  .energy-node {
    width: 78px;
    height: 78px;
    font-size: 0.78rem;
  }

  .home-node {
    left: 5%;
  }

  .solar-node {
    right: 5%;
  }

  .wind-node {
    left: 6%;
  }

  .gas-node {
    right: 8%;
  }

  .grid-node {
    right: 1%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
