:root {
  --ink: #13202a;
  --muted: #5e6970;
  --paper: #f7f3eb;
  --white: #fffdfa;
  --navy: #0f2330;
  --blue: #1d5a72;
  --teal: #1c786d;
  --green: #6d8f46;
  --gold: #c7923e;
  --orange: #cf6a3a;
  --line: rgba(19, 32, 42, 0.14);
  --shadow: 0 24px 70px rgba(12, 27, 38, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.58;
}

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

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

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 4vw, 56px);
  color: var(--white);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  padding-top: 12px;
  padding-bottom: 12px;
  color: var(--ink);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 12px 40px rgba(12, 27, 38, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 13px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  opacity: 0.86;
}

.site-nav a:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 6px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 94vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 24, 35, 0.92) 0%, rgba(9, 24, 35, 0.72) 42%, rgba(9, 24, 35, 0.14) 76%),
    linear-gradient(0deg, rgba(9, 24, 35, 0.2), rgba(9, 24, 35, 0.08));
}

.hero-content {
  position: relative;
  width: min(860px, calc(100% - 40px));
  margin-left: clamp(20px, 7vw, 104px);
  padding-top: 90px;
  color: var(--white);
}

.eyebrow,
.section-label {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 30px;
  color: rgba(255, 253, 250, 0.84);
  font-size: clamp(17px, 2vw, 21px);
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 20px;
  font-weight: 900;
}

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

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 253, 250, 0.5);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
  margin: 0;
}

.hero-metrics div {
  padding: 14px;
  border: 1px solid rgba(255, 253, 250, 0.22);
  border-radius: 6px;
  background: rgba(255, 253, 250, 0.08);
}

.hero-metrics dt {
  font-size: 20px;
  font-weight: 900;
}

.hero-metrics dd {
  margin: 0;
  color: rgba(255, 253, 250, 0.72);
  font-size: 13px;
}

.section {
  padding: clamp(68px, 9vw, 124px) clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 920px;
  margin-bottom: 40px;
}

.section-heading p,
.copy,
.case-card p,
.timeline p,
.logic-grid p,
.contract-grid p,
.contact p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: clamp(30px, 7vw, 88px);
  align-items: start;
}

.copy {
  font-size: 18px;
}

.service-grid,
.logic-grid,
.contract-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
}

.service-grid article,
.logic-grid article,
.contract-grid article,
.case-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(12, 27, 38, 0.06);
}

.service-grid span,
.tag {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cases,
.electrical,
.contact {
  background: var(--white);
}

.case-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.case-card.featured {
  grid-row: span 2;
  background: #eef4f1;
}

.case-card ul,
.sources ul {
  margin: 18px 0 0;
  padding-left: 18px;
}

.case-card li {
  margin-bottom: 10px;
  color: #35444b;
}

.development,
.contracts {
  background: #e9eee8;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.timeline article {
  min-height: 250px;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.48);
}

.timeline span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 34px;
  color: var(--white);
  background: var(--blue);
  border-radius: 6px;
  font-weight: 900;
}

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

.controls .section-heading p,
.controls .logic-grid p {
  color: rgba(255, 253, 250, 0.72);
}

.architecture {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.node {
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(255, 253, 250, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.08);
}

.node span {
  display: block;
  margin-bottom: 18px;
  color: #a7d7cf;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.node strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.node p {
  margin-bottom: 0;
  color: rgba(255, 253, 250, 0.72);
}

.arrow {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-weight: 900;
}

.logic-grid article {
  background: rgba(255, 253, 250, 0.08);
  border-color: rgba(255, 253, 250, 0.16);
  box-shadow: none;
}

.single-line {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 18px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 8px;
}

.single-line div {
  min-height: 126px;
  display: grid;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f1;
  font-weight: 900;
}

.single-line small {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 600;
}

.single-line span {
  display: none;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.note-grid p {
  margin: 0;
  padding: 20px;
  color: #35444b;
  background: var(--paper);
  border-left: 4px solid var(--green);
}

.sources {
  padding-top: 46px;
  padding-bottom: 46px;
  background: var(--paper);
}

.sources li {
  margin-bottom: 8px;
  color: var(--blue);
  font-weight: 700;
}

.contact {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 0.75fr);
  gap: clamp(30px, 7vw, 88px);
  align-items: center;
}

.contact-panel {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f1;
  box-shadow: var(--shadow);
}

.contact-link {
  display: inline-block;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: rgba(255, 253, 250, 0.72);
  background: var(--ink);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1100px) {
  .site-nav {
    gap: 14px;
    font-size: 13px;
  }

  .service-grid,
  .logic-grid,
  .contract-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .arrow {
    min-height: 16px;
    transform: rotate(90deg);
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: 66px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    color: var(--ink);
    background: rgba(255, 253, 250, 0.97);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 13px 12px;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-content {
    width: calc(100% - 40px);
    margin: 0 auto;
  }

  .hero-metrics,
  .split,
  .case-grid,
  .contact,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .case-card.featured {
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 30px;
  }

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

  .service-grid,
  .logic-grid,
  .contract-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .single-line {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}
