.page-shell--home {
  --page-gutter: clamp(24px, 6vw, 96px);
  grid-template-rows: auto minmax(calc(100svh - 116px), auto) auto auto;
}

.system-section {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(560px, 1.28fr);
  align-items: center;
  gap: clamp(52px, 7vw, 132px);
  min-height: 100svh;
  margin-inline: calc(-1 * var(--page-gutter));
  padding: clamp(96px, 9vw, 172px) var(--page-gutter);
  overflow: hidden;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 30%, rgba(214, 164, 58, .16), transparent 30%),
    linear-gradient(132deg, #eceae3, #f7f5ef 48%, #e8e5dc);
}

.system-section::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .42;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(90deg, #000, transparent 42%, #000);
  content: "";
}

.system-section__copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.system-section__eyebrow {
  margin: 0 0 28px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.system-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(48px, 4.7vw, 84px);
  font-weight: 560;
  letter-spacing: -.06em;
  line-height: .98;
  text-wrap: balance;
}

.system-section h2 > span {
  display: block;
}

.system-section__accent {
  margin-top: .12em;
  color: var(--accent);
  font-weight: 380;
}

.system-section__description {
  max-width: 560px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.55;
  text-wrap: balance;
}

.system-section__insight {
  display: grid;
  grid-template-columns: minmax(100px, auto) 1fr;
  gap: 18px;
  max-width: 590px;
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.system-section__insight > span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
}

.system-section__insight p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

.system-map {
  --map-ink: #f3efe6;
  --map-muted: #aab2ad;
  position: relative;
  width: 100%;
  min-height: clamp(560px, 42vw, 680px);
  overflow: hidden;
  border: 1px solid rgba(225, 187, 114, .2);
  border-radius: clamp(28px, 3vw, 48px);
  background:
    radial-gradient(circle at 50% 45%, rgba(214, 164, 58, .19), transparent 24%),
    radial-gradient(circle at 10% 10%, rgba(68, 102, 95, .28), transparent 38%),
    linear-gradient(145deg, #1a2220, #101615 60%, #0b1110);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 32px 80px rgba(20, 28, 25, .15);
}

.system-map::before {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle, #000, transparent 76%);
  content: "";
}

.system-map__connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.system-map__connections path {
  fill: none;
  stroke: rgba(225, 187, 114, .25);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke 260ms ease, stroke-width 260ms ease, filter 260ms ease, stroke-dashoffset 1100ms cubic-bezier(.2, .7, .2, 1);
}

.system-map__connection--mobile {
  display: none;
}

.system-section.system-motion-ready .system-map__connections path {
  stroke-dashoffset: 1;
}

.system-section.system-motion-ready.is-visible .system-map__connections path {
  stroke-dashoffset: 0;
}

.system-map[data-active="customers"] [data-connection="customers"],
.system-map[data-active="sales"] [data-connection="sales"],
.system-map[data-active="operations"] [data-connection="operations"],
.system-map[data-active="finance"] [data-connection="finance"],
.system-map[data-active="analytics"] [data-connection="analytics"] {
  stroke: #e1bb72;
  stroke-width: 2;
  filter: drop-shadow(0 0 7px rgba(225, 187, 114, .8));
}

.system-map__interface-line {
  stroke-dasharray: .02 .035 !important;
}

.system-map__interfaces {
  position: absolute;
  top: 5%;
  left: 50%;
  padding: 8px 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(225, 187, 114, .27);
  border-radius: 999px;
  background: rgba(225, 187, 114, .08);
  color: var(--map-muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.system-map__core {
  position: absolute;
  top: 46.5%;
  left: 50%;
  display: grid;
  place-content: center;
  width: clamp(170px, 15vw, 220px);
  aspect-ratio: 1;
  padding: 24px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(225, 187, 114, .64);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #31443e, #15201d 64%, #101714);
  color: var(--map-ink);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 18px rgba(225, 187, 114, .04), 0 24px 50px rgba(0, 0, 0, .35);
}

.system-map__core::before {
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(225, 187, 114, .18);
  border-radius: 50%;
  content: "";
  animation: system-breathe 5s ease-in-out infinite;
}

.system-map__core span {
  color: var(--map-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.system-map__core strong {
  margin-top: 10px;
  font-size: clamp(19px, 1.7vw, 26px);
  font-weight: 620;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.system-map__core small {
  justify-self: center;
  margin-top: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e1bb72;
  color: #1b1508;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.system-node {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 5px;
  width: clamp(116px, 10vw, 148px);
  min-height: 70px;
  padding: 13px 15px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(243, 239, 230, .16);
  border-radius: 16px;
  background: rgba(25, 34, 31, .84);
  color: var(--map-ink);
  text-align: left;
  backdrop-filter: blur(14px);
  cursor: pointer;
  opacity: 1;
  transition: opacity 500ms ease, transform 500ms cubic-bezier(.2, .7, .2, 1), border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
  transition-delay: var(--node-delay, 0ms);
}

.system-section.system-motion-ready .system-node {
  opacity: 0;
}

.system-section.system-motion-ready.is-visible .system-node {
  opacity: 1;
}

.system-node > span {
  color: var(--map-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .1em;
}

.system-node > strong {
  overflow-wrap: anywhere;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 620;
  line-height: 1.2;
}

.system-node[aria-pressed="true"] {
  border-color: rgba(225, 187, 114, .78);
  background: rgba(66, 57, 38, .92);
  box-shadow: 0 0 0 4px rgba(225, 187, 114, .07), 0 12px 30px rgba(0, 0, 0, .28);
}

.system-node:hover {
  border-color: rgba(225, 187, 114, .55);
}

.system-node:focus-visible {
  outline: 2px solid #e1bb72;
  outline-offset: 4px;
}

.system-node--customers { top: 17%; left: 16%; --node-delay: 120ms; }
.system-node--sales { top: 18%; left: 84%; --node-delay: 200ms; }
.system-node--operations { top: 56%; left: 90%; --node-delay: 280ms; }
.system-node--finance { top: 68%; left: 15%; --node-delay: 360ms; }
.system-node--analytics { top: 88%; left: 50%; --node-delay: 440ms; }

.page-shell--home > .footer {
  margin-top: 80px;
}

html[data-theme="dark"] .system-section {
  background:
    radial-gradient(circle at 82% 30%, rgba(214, 164, 58, .12), transparent 31%),
    radial-gradient(circle at 0 100%, rgba(54, 80, 79, .15), transparent 36%),
    linear-gradient(135deg, #161a1c, #0f1315 58%, #111617);
}

html[data-theme="dark"] .system-section__description,
html[data-theme="dark"] .system-section__insight p {
  color: #b9bcb7;
}

@keyframes system-breathe {
  0%, 100% { opacity: .42; transform: scale(.97); }
  50% { opacity: 1; transform: scale(1.03); }
}

@media (min-width: 1920px) {
  .page-shell--home { --page-gutter: 240px; }
}

@media (max-width: 1100px) {
  .system-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-section__copy {
    max-width: 780px;
  }

  .system-map {
    max-width: 820px;
    margin-inline: auto;
  }
}

@media (max-width: 600px) {
  .page-shell--home { --page-gutter: 22px; }

  .system-section {
    gap: 56px;
    min-height: auto;
    padding-block: 88px 116px;
  }

  .system-section__eyebrow { margin-bottom: 20px; }
  .system-section h2 { font-size: clamp(42px, 12.2vw, 54px); }
  .system-section__description { margin-top: 28px; }
  .system-section__insight { grid-template-columns: 1fr; gap: 8px; margin-top: 38px; }

  .system-map {
    min-height: 610px;
    border-radius: 28px;
  }

  .system-map__core {
    top: 46%;
    width: 156px;
    padding: 18px;
  }

  .system-map__interfaces {
    width: max-content;
    max-width: calc(100% - 32px);
    text-align: center;
  }

  .system-map__interfaces span {
    display: block;
    white-space: nowrap;
  }

  .system-map__core strong { font-size: 18px; }
  .system-node { width: 112px; min-height: 64px; padding: 11px 12px; }
  /* Mirror the lower pair (67%) around the core center (46%). */
  .system-node--customers { left: 18%; top: 25%; }
  .system-node--sales { left: 82%; top: 25%; }
  .system-node--operations { left: 82%; top: 67%; }
  /* Match the mobile card center (82%, 67%) in the 800 x 620 SVG. */
  .system-map__connection--desktop { display: none; }
  .system-map__connection--mobile { display: inline; }
  .system-node--finance { left: 18%; top: 67%; }
  .system-node--analytics { top: 90%; }
  .page-shell--home > .footer { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .system-map__connections path,
  .system-node,
  .system-map__core::before {
    animation: none;
    transition: none;
  }

  .system-node { opacity: 1; }
}

@media (forced-colors: active) {
  .system-map,
  .system-map__core,
  .system-node {
    border: 1px solid CanvasText;
  }
}
