:root {
  --kg-bg: #0f172a;
  --kg-bg-deep: #09111f;
  --kg-surface: #ffffff;
  --kg-surface-soft: #f3f8fd;
  --kg-surface-tint: #eaf5ff;
  --kg-border: rgba(48, 55, 81, 0.14);
  --kg-border-strong: rgba(11, 169, 226, 0.28);
  --kg-text: #1c2540;
  --kg-text-soft: #53617d;
  --kg-heading: #202a48;
  --kg-accent: #0ba9e2;
  --kg-accent-deep: #067fb0;
  --kg-navy: #303751;
  --kg-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
  --kg-radius-xl: 32px;
  --kg-radius-lg: 24px;
  --kg-radius-md: 18px;
  --kg-radius-sm: 14px;
  --kg-max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(11, 169, 226, 0.12), transparent 30%),
    linear-gradient(180deg, #f4f9fd 0%, #eef4fb 46%, #edf4fb 100%);
  color: var(--kg-text);
}

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

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

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(calc(100% - 40px), var(--kg-max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(9, 17, 31, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #ffffff;
}

.brand-lockup img {
  width: 88px;
  height: auto;
}

.brand-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.site-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 46px;
  min-height: 42px;
  width: auto;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.site-nav-toggle-label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav-toggle:hover,
.site-nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.site-nav-toggle-box {
  position: relative;
  width: 18px;
  height: 14px;
}

.site-nav-toggle-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.site-nav-toggle-line:nth-child(1) {
  top: 0;
}

.site-nav-toggle-line:nth-child(2) {
  top: 6px;
}

.site-nav-toggle-line:nth-child(3) {
  top: 12px;
}

body.nav-open .site-nav-toggle-line:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

body.nav-open .site-nav-toggle-line:nth-child(2) {
  opacity: 0;
}

body.nav-open .site-nav-toggle-line:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--kg-accent), #45c2ef);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(11, 169, 226, 0.26);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 18px 34px rgba(11, 169, 226, 0.34);
}

.btn-secondary {
  color: var(--kg-heading);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(48, 55, 81, 0.16);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: #ffffff;
}

.site-nav .btn-primary {
  min-height: 44px;
  padding: 0 18px;
}

main {
  padding-bottom: 42px;
}

.hero,
.module-hero {
  padding: 42px 0 28px;
}

.hero-grid,
.module-layout,
.two-up {
  display: grid;
  gap: 26px;
}

.hero-grid,
.module-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.hero-copy-pane,
.module-layout > div:first-child,
.image-panel,
.cta-panel,
.module-card,
.card,
.diagram-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--kg-border);
  box-shadow: var(--kg-shadow);
}

.hero-copy-pane,
.module-layout > div:first-child {
  padding: 42px;
  border-radius: var(--kg-radius-xl);
  position: relative;
  overflow: hidden;
}

.hero-copy-pane::before,
.module-layout > div:first-child::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(11, 169, 226, 0.1), transparent 42%),
    linear-gradient(180deg, transparent, rgba(48, 55, 81, 0.02));
  pointer-events: none;
}

.hero-copy-pane > *,
.module-layout > div:first-child > * {
  position: relative;
  z-index: 1;
}

.hero-copy-pane h1,
.module-layout h1 {
  margin: 0 0 18px;
  color: var(--kg-heading);
  font-size: clamp(2.7rem, 4.9vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.module-layout h1 {
  font-size: clamp(2.45rem, 4vw, 4.3rem);
  max-width: 12ch;
}

.lead,
.module-copy,
.section-copy,
.card p,
.hero-mini p,
.module-card p,
.diagram-node p,
.cta-panel p,
.footer p,
li {
  color: var(--kg-text-soft);
  line-height: 1.7;
  font-size: 1.04rem;
}

.lead,
.module-copy {
  max-width: 62ch;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--kg-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 42px;
  height: 2px;
  background: currentColor;
  opacity: 0.75;
}

.hero-actions,
.cta-actions,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions {
  margin-top: 30px;
}

.badge-row {
  margin-top: 24px;
}

.badge-row span {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(48, 55, 81, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--kg-heading);
  font-weight: 700;
  font-size: 0.93rem;
}

.hero-stack-pane,
.module-sidebar {
  padding: 32px;
  border-radius: var(--kg-radius-xl);
  background:
    linear-gradient(180deg, rgba(11, 169, 226, 0.12), rgba(11, 169, 226, 0.04)),
    linear-gradient(180deg, rgba(18, 25, 42, 0.98), rgba(10, 18, 32, 0.98));
  color: #ffffff;
  box-shadow: 0 30px 70px rgba(10, 18, 32, 0.38);
}

.hero-panel-stack {
  display: grid;
  gap: 16px;
}

.hero-mini,
.module-sidebar .module-card {
  padding: 22px;
  border-radius: var(--kg-radius-md);
  border: 1px solid rgba(11, 169, 226, 0.2);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.hero-mini .eyebrow,
.module-sidebar .module-card .eyebrow {
  margin-bottom: 12px;
  color: #7edbff;
}

.hero-mini h3,
.module-sidebar .module-card h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.2;
}

.hero-mini p,
.module-sidebar .module-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.section {
  padding: 32px 0;
}

.section-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(11, 169, 226, 0.04));
}

.section-heading {
  max-width: 820px;
  margin-bottom: 26px;
}

.section-heading h2,
.cta-panel h2,
.module-card h3,
.card h3,
.diagram-node h3 {
  margin: 0 0 12px;
  color: var(--kg-heading);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading h2,
.cta-panel h2 {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
}

.three-up,
.four-up {
  display: grid;
  gap: 20px;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.module-card,
.diagram-panel,
.image-panel,
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--kg-radius-lg);
}

.card,
.module-card,
.cta-panel {
  padding: 28px;
}

.card::before,
.module-card::before,
.cta-panel::before,
.diagram-panel::before,
.image-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--kg-accent), rgba(69, 194, 239, 0.2));
}

.card h3,
.module-card h3,
.diagram-node h3 {
  font-size: 1.48rem;
}

.icon-tile {
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(11, 169, 226, 0.15), rgba(11, 169, 226, 0.06));
  border: 1px solid rgba(11, 169, 226, 0.14);
}

.card ul,
.module-card ul,
.cta-panel ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

.card li,
.module-card li,
.cta-panel li {
  margin-bottom: 10px;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.diagram-panel,
.image-panel {
  padding: 28px;
}

.diagram-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(234, 245, 255, 0.96));
}

.diagram-stack {
  display: grid;
  gap: 16px;
}

.diagram-node {
  padding: 24px;
  border-radius: var(--kg-radius-md);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(48, 55, 81, 0.12);
}

.diagram-arrow {
  text-align: center;
  font-size: 1.55rem;
  line-height: 1;
  color: var(--kg-accent);
  font-weight: 900;
}

.image-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(11, 169, 226, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 253, 0.96));
}

.image-panel img {
  width: 100%;
  border-radius: 18px;
}

.cta-panel {
  background:
    radial-gradient(circle at top right, rgba(11, 169, 226, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 248, 253, 0.96));
}

.footer {
  padding: 22px 0 38px;
}

.footer p {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
}

@media (max-width: 1080px) {
  .hero-grid,
  .module-layout,
  .two-up,
  .three-up,
  .four-up {
    grid-template-columns: 1fr;
  }

  .hero-copy-pane h1,
  .module-layout h1 {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .site-header {
    box-shadow: 0 14px 30px rgba(10, 18, 32, 0.24);
  }

  .site-header-inner {
    min-height: auto;
    padding: 14px 0 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 16px;
  }

  .site-nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .site-nav {
    width: 100%;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    grid-column: 1 / -1;
    padding-top: 6px;
  }

  body.nav-open .site-nav {
    display: grid;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
    padding: 9px 12px;
    font-size: 0.92rem;
  }

  .site-nav .btn-primary {
    min-height: 40px;
    grid-column: 1 / -1;
  }

  .hero-copy-pane,
  .module-layout > div:first-child,
  .hero-stack-pane,
  .module-sidebar,
  .card,
  .module-card,
  .diagram-panel,
  .image-panel,
  .cta-panel {
    padding: 24px;
    border-radius: 22px;
  }

  .hero,
  .module-hero,
  .section {
    padding: 24px 0;
  }

  .hero-copy-pane h1,
  .module-layout h1,
  .section-heading h2,
  .cta-panel h2 {
    letter-spacing: -0.04em;
  }

  body.header-compact .site-header {
    background: rgba(9, 17, 31, 0.94);
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }

  body.header-compact .site-header-inner {
    padding: 10px 0 8px;
    gap: 8px;
  }

  body.header-compact .brand-lockup img {
    width: 56px;
  }

  body.header-compact .brand-subtitle {
    font-size: 0.76rem;
  }

  body.header-compact .site-nav a {
    padding: 7px 10px;
    font-size: 0.86rem;
  }

  body.header-compact .site-nav .btn-primary {
    min-height: 36px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 24px), var(--kg-max));
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-lockup img {
    width: 72px;
  }

  .brand-subtitle {
    font-size: 0.82rem;
  }

  .hero-copy-pane h1,
  .module-layout h1 {
    font-size: 2.2rem;
  }

  .btn {
    width: 100%;
  }

  .site-nav {
    grid-template-columns: 1fr;
  }

  .site-nav .btn-primary {
    grid-column: auto;
  }

  .hero-actions,
  .cta-actions,
  .badge-row {
    flex-direction: column;
  }
}
