:root {
  --navy: #0d2742;
  --navy-2: #153a5f;
  --slate: #526173;
  --light-slate: #edf2f7;
  --line: #d9e2ec;
  --gold: #b88938;
  --blue: #2d6f9f;
  --white: #ffffff;
  --ink: #17212b;
  --shadow: 0 16px 40px rgba(13, 39, 66, 0.07);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(184, 137, 56, 0.45);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 max(28px, calc((100vw - var(--max-width)) / 2));
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--navy);
  font-weight: 850;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 24px;
  color: var(--slate);
  font-size: 14px;
  font-weight: 700;
}

nav a {
  position: relative;
  text-decoration: none;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--gold);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

nav a:hover,
nav a.active,
.text-link:hover {
  color: var(--navy);
}

nav a:hover::after,
nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.section-pad {
  padding: 86px max(28px, calc((100vw - var(--max-width)) / 2));
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 40px;
  align-items: stretch;
  min-height: calc(100vh - 68px);
  background:
    linear-gradient(135deg, rgba(13, 39, 66, 0.97), rgba(21, 58, 95, 0.93)),
    radial-gradient(circle at top right, rgba(184, 137, 56, 0.18), transparent 34%);
  color: var(--white);
}

.hero-copy {
  max-width: 980px;
  align-self: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  color: var(--navy);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  color: var(--navy);
  font-size: 18px;
}

.hero h1,
.hero h2 {
  color: var(--white);
}

.hero-subtitle {
  max-width: 820px;
  color: #dce7f2;
  font-size: 20px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.section-pad .button.secondary {
  color: var(--navy);
  border-color: var(--line);
  background: var(--white);
}

.hero-panel {
  align-self: center;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.panel-label {
  color: #dce7f2;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-panel ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
  font-weight: 720;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.kpi-card {
  min-height: 178px;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 2px solid transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.kpi-card:hover {
  border-bottom-color: var(--gold);
  background: #fbfdff;
  transform: translateY(-2px);
}

.kpi-card:last-child {
  border-right: 0;
}

.kpi-card span {
  display: block;
  color: var(--navy);
  font-size: 29px;
  font-weight: 850;
  line-height: 1;
}

.kpi-card .kpi-label {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
}

.kpi-card small {
  display: block;
  max-width: 210px;
  color: var(--slate);
  font-size: 12px;
  line-height: 1.45;
}

.synthetic-note {
  margin: 0;
  padding: 14px max(28px, calc((100vw - var(--max-width)) / 2));
  color: var(--slate);
  background: #fff8ec;
  border-bottom: 1px solid #eadbbf;
  font-size: 13px;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 34px;
}

.section-heading p:not(.eyebrow),
.section-pad p:not(.eyebrow) {
  color: var(--slate);
}

.section-heading p:not(.eyebrow) {
  font-size: 18px;
}

.section-heading.compact {
  max-width: 760px;
}

.muted {
  background: var(--light-slate);
}

.card-grid,
.snapshot-grid {
  display: grid;
  gap: 18px;
}

.card-grid.three,
.snapshot-grid {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.chart-card,
.doc-card,
.snapshot-card,
.module-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.card,
.snapshot-card {
  padding: 24px;
}

.snapshot-card {
  border-top: 3px solid var(--gold);
}

.card p,
.snapshot-card p {
  color: var(--slate);
  font-size: 15px;
}

.card p:last-child,
.snapshot-card p:last-child {
  margin-bottom: 0;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.workflow div {
  position: relative;
  min-height: 86px;
  padding: 20px 16px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.workflow div:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -11px;
  z-index: 1;
  color: var(--gold);
  font-weight: 900;
  content: ">";
  transform: translateY(-50%);
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.metric-row span,
.tag-cloud span,
.entity-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.module-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.module-tab {
  min-height: 98px;
  padding: 18px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(13, 39, 66, 0.04);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.module-tab:hover,
.module-tab.active {
  border-color: rgba(184, 137, 56, 0.78);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.module-tab.active {
  background: #fffaf1;
}

.module-detail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 18px;
  overflow: hidden;
}

.module-detail div {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.module-detail div:last-child {
  border-right: 0;
}

.module-detail span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.module-detail p {
  margin: 0;
  color: var(--navy);
  font-weight: 720;
}

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

.chart-card {
  margin: 0;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease;
}

.chart-card:hover {
  border-color: rgba(184, 137, 56, 0.7);
  transform: translateY(-2px);
}

.chart-trigger {
  display: block;
  width: 100%;
  padding: 0;
  background: var(--white);
  border: 0;
  cursor: zoom-in;
}

.chart-trigger img {
  display: block;
  width: 100%;
  background: var(--white);
}

.chart-card figcaption {
  display: grid;
  gap: 6px;
  padding: 18px 20px 22px;
  color: var(--slate);
}

.chart-card strong {
  color: var(--navy);
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.insight-list article {
  padding: 20px;
  color: var(--navy);
  background: var(--white);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(13, 39, 66, 0.07);
  font-weight: 760;
}

.entity-grid,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.text-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--navy);
  font-weight: 850;
}

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

.doc-card {
  display: block;
  min-height: 220px;
  padding: 24px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.doc-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 850;
}

.doc-card p {
  color: var(--slate);
  font-size: 15px;
}

.doc-card:hover {
  border-color: rgba(45, 111, 159, 0.45);
  transform: translateY(-2px);
}

.doc-card:hover span {
  color: var(--blue);
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
}

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

.final-cta p:not(.eyebrow) {
  max-width: 760px;
  color: #dce7f2;
  font-size: 18px;
}

.chart-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(8, 20, 34, 0.74);
}

.chart-modal.open {
  display: flex;
}

.modal-panel {
  position: relative;
  width: min(1120px, 96vw);
  max-height: 92vh;
  padding: 24px;
  overflow: auto;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.modal-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.modal-panel img {
  display: block;
  width: 100%;
  height: auto;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 8px 12px;
  color: var(--navy);
  background: var(--light-slate);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px max(28px, calc((100vw - var(--max-width)) / 2));
  color: #dce7f2;
  background: var(--navy);
}

.site-footer p {
  margin: 8px 0 0;
  max-width: 720px;
  color: #b9c7d6;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  color: #dce7f2;
}

@media (max-width: 1120px) {
  .hero,
  .card-grid.three,
  .snapshot-grid,
  .visual-grid,
  .documentation-grid,
  .final-cta {
    grid-template-columns: 1fr;
  }

  .final-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpi-strip,
  .module-tabs,
  .module-detail,
  .workflow,
  .insight-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .module-detail div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 18px 22px;
  }

  nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .section-pad,
  .hero {
    padding: 56px 22px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .kpi-strip,
  .workflow,
  .insight-list,
  .module-tabs,
  .module-detail {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .synthetic-note {
    padding: 14px 22px;
  }

  .workflow div:not(:last-child)::after {
    content: "";
  }

  .modal-panel {
    padding: 18px;
  }

  .site-footer {
    flex-direction: column;
    padding: 30px 22px;
  }
}
