:root {
  color-scheme: light;
  --ink: #0e1d16;
  --muted: #66786e;
  --green: #123f2c;
  --green-2: #1f7a4d;
  --lime: #a8d646;
  --gold: #d9a43a;
  --blue: #2f80ed;
  --line: rgba(210, 222, 215, 0.9);
  --surface: rgba(255, 255, 255, 0.88);
  --shadow: 0 28px 90px rgba(21, 44, 32, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(18, 63, 44, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(168, 214, 70, 0.22), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(47, 128, 237, 0.13), transparent 28%),
    linear-gradient(145deg, #edf4ee 0%, #f7faf7 44%, #eef3ef 100%);
  background-size: 52px 52px, 100% 100%, 120% 120%, 100% 100%;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

a {
  color: inherit;
}

.portal-shell {
  width: min(1560px, calc(100vw - 32px));
  margin: 16px auto 30px;
}

.portal-hero {
  position: relative;
  min-height: 650px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 74% 36%, rgba(168, 214, 70, 0.18), transparent 26%),
    linear-gradient(135deg, #092519 0%, #123f2c 48%, #0c2c1f 100%);
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(90deg, black, transparent 72%);
}

.portal-nav {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-nav strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 17px;
}

.portal-nav strong::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--lime), #fff);
  box-shadow: 0 0 18px rgba(168, 214, 70, 0.65);
}

.portal-nav div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.portal-nav a,
.primary-link,
.secondary-link,
.module-card b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 15px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.portal-nav a {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.portal-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(460px, 0.86fr) 1fr;
  gap: 34px;
  align-items: center;
  min-height: 574px;
  padding: 58px 48px 64px;
}

.hero-copy span,
.storyline span,
.metrics-band span,
.module-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy span {
  color: rgba(226, 245, 213, 0.74);
}

.hero-copy h1 {
  max-width: 720px;
  margin: 14px 0 18px;
  color: #fff;
  font-size: clamp(54px, 6.6vw, 104px);
  line-height: 0.94;
}

.hero-copy p {
  max-width: 650px;
  margin: 0;
  color: rgba(239, 248, 240, 0.84);
  font-size: 19px;
  line-height: 1.76;
}

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

.primary-link,
.secondary-link {
  min-height: 52px;
  padding: 0 24px;
}

.primary-link {
  background: #fff;
  color: var(--green);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(12px);
}

.command-map {
  position: relative;
  min-height: 470px;
  border-radius: 12px;
  overflow: hidden;
  background: #123827;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 28px 70px rgba(0, 0, 0, 0.26);
}

.map-photo,
.map-shade,
.map-glow,
.command-map svg,
.map-core {
  position: absolute;
}

.map-photo {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.12) contrast(1.08);
}

.map-shade {
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(168, 214, 70, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(5, 28, 18, 0.78), rgba(10, 54, 34, 0.5));
}

.map-glow {
  inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 214, 70, 0.26), transparent 62%);
  filter: blur(4px);
  animation: glowBreath 2.8s ease-in-out infinite;
}

.map-core {
  left: 50%;
  top: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--green);
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 14px rgba(168, 214, 70, 0.15),
    0 24px 54px rgba(0, 0, 0, 0.24);
  animation: corePulse 2.8s ease-in-out infinite;
}

.map-core strong {
  font-size: 25px;
  line-height: 1;
}

.map-core span {
  margin-top: 8px;
  color: #64776b;
  font-size: 12px;
  font-weight: 900;
}

.command-map svg {
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(255, 255, 255, 0.52);
  stroke-dasharray: 10 13;
  stroke-width: 2.2;
  animation: lineMove 3.5s linear infinite;
}

.node {
  position: absolute;
  z-index: 5;
  width: 164px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(10, 39, 27, 0.72);
  color: #fff;
  padding: 15px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  animation: nodeFloat 3.2s ease-in-out infinite;
}

.node span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 900;
}

.node strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.node-uav {
  left: 6%;
  top: 18%;
}

.node-ai {
  right: 8%;
  top: 18%;
  animation-delay: 160ms;
}

.node-work {
  left: 10%;
  bottom: 13%;
  animation-delay: 320ms;
}

.node-report {
  right: 9%;
  bottom: 14%;
  animation-delay: 480ms;
}

.metrics-band,
.module-grid,
.storyline {
  margin-top: 14px;
}

.metrics-band {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 1.1fr 0.9fr;
  gap: 14px;
}

.metrics-band article,
.module-card,
.storyline {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(31, 52, 41, 0.09);
}

.metrics-band article {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  padding: 22px;
}

.metrics-band article:first-child {
  background:
    linear-gradient(145deg, rgba(18, 63, 44, 0.96), rgba(30, 112, 72, 0.94)),
    var(--green);
  color: #fff;
}

.metrics-band article:first-child span,
.metrics-band article:first-child p {
  color: rgba(255, 255, 255, 0.72);
}

.metrics-band article::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(168, 214, 70, 0.13);
}

.metrics-band strong {
  position: relative;
  display: block;
  margin-top: 14px;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1;
  z-index: 1;
}

.metrics-band p {
  position: relative;
  margin: 14px 0 0;
  color: var(--muted);
  z-index: 1;
}

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

.module-card {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  padding: 24px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--lime));
}

.module-card.active:hover {
  border-color: rgba(31, 122, 77, 0.5);
  box-shadow: 0 26px 64px rgba(31, 52, 41, 0.15);
  transform: translateY(-5px);
}

.module-card h2 {
  margin: 28px 0 14px;
  font-size: 27px;
  line-height: 1.15;
}

.module-card p {
  min-height: 112px;
  margin: 0;
  color: #40554a;
  font-size: 16px;
  line-height: 1.72;
}

.module-card b {
  width: fit-content;
  margin-top: 22px;
  background: #e8f4ec;
  color: var(--green);
}

.module-card:nth-child(4) {
  background:
    linear-gradient(145deg, rgba(18, 63, 44, 0.94), rgba(25, 86, 58, 0.9)),
    var(--green);
  color: #fff;
}

.module-card:nth-child(4) span,
.module-card:nth-child(4) p {
  color: rgba(255, 255, 255, 0.72);
}

.module-card:nth-child(4) b {
  background: #fff;
}

.storyline {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 26px;
  padding: 28px;
}

.storyline h2 {
  margin: 12px 0 0;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.1;
}

.storyline ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.storyline li {
  position: relative;
  border-left: 4px solid var(--lime);
  border-radius: 8px;
  background: #f7faf7;
  padding: 18px;
}

.storyline strong {
  color: var(--green);
  font-size: 18px;
}

.storyline p {
  margin: 10px 0 0;
  color: #40554a;
  line-height: 1.65;
}

@keyframes lineMove {
  to {
    stroke-dashoffset: -46;
  }
}

@keyframes glowBreath {
  0%,
  100% {
    opacity: 0.68;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes corePulse {
  0%,
  100% {
    box-shadow:
      0 0 0 14px rgba(168, 214, 70, 0.15),
      0 24px 54px rgba(0, 0, 0, 0.24);
  }
  50% {
    box-shadow:
      0 0 0 24px rgba(168, 214, 70, 0.08),
      0 24px 54px rgba(0, 0, 0, 0.29);
  }
}

@keyframes nodeFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@media (max-width: 1120px) {
  .hero-grid,
  .storyline {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .portal-shell {
    width: min(100% - 20px, 720px);
    margin: 10px auto 20px;
  }

  .portal-hero {
    min-height: auto;
  }

  .portal-nav,
  .hero-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .portal-nav,
  .portal-nav div,
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .command-map {
    min-height: 430px;
  }

  .map-core {
    width: 126px;
    height: 126px;
  }

  .map-core strong {
    font-size: 21px;
  }

  .node {
    width: 132px;
    padding: 12px;
  }

  .node strong {
    font-size: 17px;
  }

  .metrics-band,
  .module-grid,
  .storyline ol {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 240px;
  }

  .storyline {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
