:root {
  color-scheme: light;
  --ink: #121821;
  --muted: #5b6776;
  --soft: #eef3f7;
  --line: #d5dde6;
  --paper: #ffffff;
  --paper-warm: #fbfcfd;
  --blue: #0b66b2;
  --teal: #168875;
  --gold: #b77913;
  --coral: #c44f3d;
  --shadow: 0 28px 80px rgba(18, 24, 33, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(11, 102, 178, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(22, 136, 117, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, #f7fafc 0%, #eef4f8 42%, #fbfcfd 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  min-height: 86px;
  padding: 20px 0 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-mark {
  width: 44px;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.brand-mark span {
  border: 2px solid rgba(18, 24, 33, 0.14);
  background: var(--paper);
  box-shadow: 0 8px 20px rgba(18, 24, 33, 0.08);
}

.brand-mark span:nth-child(1) {
  grid-column: span 2;
  border-color: rgba(11, 102, 178, 0.42);
}

.brand-mark span:nth-child(2) {
  border-color: rgba(22, 136, 117, 0.42);
}

.brand-mark span:nth-child(3) {
  border-color: rgba(183, 121, 19, 0.46);
}

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

.site-nav a {
  min-height: 38px;
  padding: 10px 13px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  outline: none;
}

.hero {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
  align-items: center;
  gap: 56px;
  padding: 18px 0 26px;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.79rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: 6.35rem;
  line-height: 0.92;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.7;
}

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

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border: 1px solid transparent;
  font-size: 0.96rem;
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(18, 24, 33, 0.18);
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.button:hover,
.button:focus-visible,
.app-link:hover,
.app-link:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

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

.quick-stats div {
  min-height: 82px;
  padding: 16px;
  border: 1px solid rgba(213, 221, 230, 0.82);
  background: rgba(255, 255, 255, 0.68);
}

.quick-stats dt {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quick-stats dd {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 850;
}

.ops-panel {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(213, 221, 230, 0.92);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(145deg, #18202b 0%, #203546 48%, #f4f7f9 49%, #ffffff 100%);
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: var(--shadow);
}

.panel-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-kicker,
.panel-state,
.app-meta {
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.panel-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e9f9f4;
}

.panel-state::before,
.signal-feed span,
.route-node span {
  content: "";
  display: inline-block;
  width: 8px;
  aspect-ratio: 1;
  background: var(--teal);
}

.route-map {
  position: relative;
  min-height: 300px;
  margin-top: 34px;
}

.route-node {
  position: absolute;
  z-index: 2;
  width: 152px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 18px 46px rgba(18, 24, 33, 0.18);
}

.route-node strong,
.route-node small {
  display: block;
}

.route-node strong {
  margin: 14px 0 5px;
  font-size: 1.02rem;
}

.route-node small {
  color: var(--muted);
  font-weight: 750;
}

.route-node.planner {
  top: 0;
  left: 4px;
}

.route-node.hub {
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
}

.route-node.agents {
  top: 0;
  right: 4px;
}

.route-node.trading {
  left: 24px;
  bottom: 0;
}

.route-node.accounts {
  right: 24px;
  bottom: 0;
  background: rgba(255, 255, 255, 0.76);
}

.route-node.planner span {
  background: var(--blue);
}

.route-node.agents span {
  background: var(--teal);
}

.route-node.trading span {
  background: var(--coral);
}

.route-node.accounts span {
  background: var(--gold);
}

.route-line {
  position: absolute;
  z-index: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  transform-origin: left center;
}

.line-one {
  top: 116px;
  left: 118px;
  width: 205px;
  transform: rotate(22deg);
}

.line-two {
  top: 116px;
  right: 118px;
  width: 205px;
  transform: rotate(-22deg);
}

.line-three {
  top: 232px;
  left: 118px;
  width: 210px;
  transform: rotate(-24deg);
}

.line-four {
  top: 232px;
  right: 118px;
  width: 210px;
  transform: rotate(24deg);
}

.signal-feed {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.signal-feed div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(213, 221, 230, 0.86);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.apps-section {
  padding: 10px 0 70px;
}

.section-heading {
  max-width: 560px;
  margin-bottom: 22px;
}

h2 {
  margin-bottom: 0;
  font-size: 3.3rem;
  line-height: 1;
  letter-spacing: 0;
}

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

.app-link {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.app-link::before {
  content: "";
  width: 46px;
  aspect-ratio: 1;
  margin-bottom: 10px;
  border: 2px solid currentColor;
  background:
    linear-gradient(currentColor, currentColor) 50% 50% / 18px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 50% 50% / 2px 18px no-repeat;
  opacity: 0.78;
}

.app-link:hover,
.app-link:focus-visible {
  border-color: rgba(11, 102, 178, 0.52);
  box-shadow: 0 18px 48px rgba(18, 24, 33, 0.11);
}

.app-meta {
  color: var(--blue);
}

.app-link strong {
  font-size: 1.55rem;
  line-height: 1.05;
}

.app-link span:not(.app-meta) {
  color: var(--muted);
  line-height: 1.5;
}

.app-link em {
  margin-top: auto;
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
}

.planner-card {
  color: var(--blue);
}

.agents-card {
  color: var(--teal);
}

.trading-card {
  color: var(--coral);
}

.app-link.muted {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.58);
}

.app-link.muted span:not(.app-meta),
.app-link.muted em {
  color: var(--muted);
}

.site-footer {
  padding: 24px 0 38px;
  border-top: 1px solid rgba(213, 221, 230, 0.86);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 50px;
  }

  .hero-copy {
    max-width: 760px;
  }

  h1 {
    font-size: 5rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  .ops-panel {
    min-height: 500px;
  }

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

@media (max-width: 680px) {
  .page {
    width: min(100% - 28px, 560px);
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .hero {
    gap: 24px;
    padding: 28px 0 28px;
  }

  h1 {
    font-size: 3.35rem;
  }

  h2 {
    font-size: 2.3rem;
  }

  .lead {
    font-size: 1.04rem;
  }

  .button {
    width: 100%;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

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

  .ops-panel {
    display: none;
  }

  .app-link {
    min-height: 212px;
  }
}

@media (max-width: 390px) {
  h1 {
    font-size: 3rem;
  }
}
