:root {
  color-scheme: light;
  --bg: #f6f7fa;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-soft: #f3f5f9;
  --text: #10131b;
  --muted: #667083;
  --line: #e5e8ef;
  --red: #ef2c20;
  --red-dark: #cf1e15;
  --ink: #121722;
  --blue: #347cf6;
  --green: #5fc653;
  --purple: #8757f3;
  --orange: #f18a19;
  --shadow: 0 18px 48px rgba(17, 24, 39, 0.11);
  --soft-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  --radius: 8px;
}

body.dark {
  color-scheme: dark;
  --bg: #0d1118;
  --surface: rgba(21, 26, 36, 0.94);
  --surface-solid: #151a24;
  --surface-soft: #1d2430;
  --text: #f6f8fb;
  --muted: #a7b0c0;
  --line: #293142;
  --ink: #f6f8fb;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  --soft-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  padding-bottom: 86px;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.5;
}

body.nav-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

svg {
  width: 1.25em;
  height: 1.25em;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(229, 232, 239, 0.76);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

body.dark .site-header {
  border-bottom-color: rgba(41, 49, 66, 0.82);
  background: rgba(13, 17, 24, 0.9);
}

.header-shell {
  width: min(100% - 40px, 1110px);
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: 196px;
  height: auto;
}

.primary-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.primary-nav a {
  position: relative;
  padding: 24px 0;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 13px;
  width: 0;
  height: 4px;
  border-radius: 999px;
  background: var(--red);
  transform: translateX(-50%);
  transition: width 0.18s ease;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--red);
}

.primary-nav a:hover::after,
.primary-nav a.active::after {
  width: 28px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.github-pill,
.star-pill,
.icon-button,
.button,
.bottom-dock a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.github-pill:hover,
.star-pill:hover,
.icon-button:hover,
.button:hover,
.bottom-dock a:hover {
  transform: translateY(-1px);
}

.github-pill {
  padding: 0 16px;
  background: #121722;
  color: #fff;
  box-shadow: 0 10px 24px rgba(18, 23, 34, 0.2);
  font-size: 13px;
  font-weight: 900;
}

.github-pill svg,
.star-pill svg {
  width: 17px;
  height: 17px;
}

.star-pill {
  padding: 0 10px;
  background: #fff;
  color: #4c5567;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px #121722;
}

body.dark .star-pill {
  background: #f6f8fb;
  color: #121722;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

.sun-icon,
.close-icon,
body.dark .moon-icon,
body.nav-open .menu-icon {
  display: none;
}

body.dark .sun-icon,
body.nav-open .close-icon {
  display: block;
}

.hero-section {
  position: relative;
  min-height: 425px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 75%, rgba(246, 247, 250, 1) 100%),
    url("assets/boar-red-hero-bg.jpg") center center / cover no-repeat;
}

body.dark .hero-section {
  background:
    linear-gradient(180deg, rgba(13, 17, 24, 0.12) 0%, rgba(13, 17, 24, 0.5) 75%, rgba(13, 17, 24, 1) 100%),
    url("assets/boar-red-hero-bg.jpg") center center / cover no-repeat;
}

.hero-shell {
  width: min(100% - 40px, 1110px);
  min-height: 425px;
  margin: 0 auto;
  padding: 86px 0 52px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(100%, 520px);
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.section-heading h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

.hero-copy h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  font-size: 58px;
  line-height: 1.04;
  font-weight: 950;
  white-space: nowrap;
}

.hero-copy h1 .accent,
.hero-copy h1 .dot {
  color: var(--red);
}

.hero-copy h2 {
  margin-top: 4px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 950;
}

.hero-description {
  max-width: 510px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  min-width: 116px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 950;
}

.button.primary {
  border-color: transparent;
  background: var(--red);
  color: #fff;
  box-shadow: 0 14px 28px rgba(239, 44, 32, 0.28);
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.secondary {
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}

.feature-strip,
.overview-grid,
.docs-section {
  width: min(100% - 40px, 1084px);
  margin: 0 auto;
}

.feature-strip {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.feature-card {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

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

.feature-icon,
.list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(239, 44, 32, 0.09);
  color: var(--red);
}

.feature-icon svg {
  width: 23px;
  height: 23px;
}

.feature-card h3 {
  margin: 0 0 1px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 950;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.overview-grid {
  display: grid;
  grid-template-columns: 0.98fr 1.86fr 1.1fr;
  gap: 16px;
  margin-top: 32px;
}

.panel {
  min-height: 238px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.section-heading h2 {
  font-size: 18px;
  line-height: 1.22;
  font-weight: 950;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.list-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  color: #fff;
}

.list-icon.blue {
  background: var(--blue);
}

.list-icon.purple {
  background: var(--purple);
}

.list-icon.orange {
  background: var(--orange);
}

.list-icon svg {
  width: 17px;
  height: 17px;
}

.feature-list strong {
  display: block;
  font-size: 14px;
  line-height: 1.16;
  font-weight: 950;
}

.feature-list p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.text-link::after {
  content: "→";
  margin-left: 8px;
}

.architecture-panel {
  overflow: hidden;
}

.architecture-map {
  position: relative;
  min-height: 158px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: 0.8fr 1.35fr 1.35fr 0.9fr;
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
  gap: 8px 24px;
  padding: 4px 0;
}

.architecture-map::before,
.architecture-map::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 16%;
  height: 1px;
  border-top: 1px dashed #aab7c7;
  opacity: 0.8;
}

.architecture-map::before {
  top: 32%;
}

.architecture-map::after {
  bottom: 32%;
}

.lane,
.node {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: center;
  font-weight: 900;
}

.lane {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  color: var(--muted);
}

.lane span {
  color: var(--text);
  font-size: 12px;
}

.lane b {
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-solid);
  font-size: 11px;
}

.clients {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.storage {
  grid-column: 4;
  grid-row: 1 / span 3;
}

.node {
  min-height: 52px;
  display: grid;
  place-items: center;
  padding: 9px 12px;
  color: #163052;
}

body.dark .node {
  color: #e9efff;
}

.node span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.registry {
  grid-column: 2 / span 2;
  grid-row: 1;
  width: 58%;
  justify-self: center;
  background: rgba(95, 198, 83, 0.15);
}

.gateway {
  grid-column: 2;
  grid-row: 2;
  background: rgba(52, 124, 246, 0.13);
}

.config {
  grid-column: 2;
  grid-row: 3;
  background: rgba(135, 87, 243, 0.14);
}

.services {
  grid-column: 3;
  grid-row: 2;
  background: rgba(52, 124, 246, 0.12);
}

.gateway::before,
.services::before,
.storage::before {
  content: "→";
  position: absolute;
  top: 50%;
  left: -22px;
  color: #6a7487;
  font-weight: 900;
  transform: translateY(-50%);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.tech-grid span {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-solid);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.05);
}

.tech-grid b {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.dot-net {
  background: #512bd4;
}

.spring {
  background: #52bf3c;
}

.netty {
  background: #111827;
}

.redis {
  background: #db1722;
}

.mysql {
  background: #2b83c6;
}

.kafka {
  background: #0f172a;
}

.nacos {
  background: #4c93f7;
}

.sky {
  background: #3577ec;
}

.docs-section {
  padding: 60px 0 30px;
}

.section-heading.centered {
  max-width: 790px;
  margin: 0 auto;
  text-align: center;
}

.section-heading.centered h2 {
  font-size: 28px;
}

.section-heading.centered p {
  font-size: 14px;
}

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

.quick-grid a {
  min-height: 110px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.quick-grid a:hover {
  border-color: rgba(239, 44, 32, 0.34);
}

.quick-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 950;
}

.quick-grid span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 50;
  width: min(100% - 48px, 830px);
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(18, 23, 34, 0.96);
  color: #fff;
  box-shadow: 0 20px 48px rgba(4, 9, 20, 0.38);
  transform: translateX(-50%);
}

.bottom-dock img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.bottom-dock span {
  flex: 1 1 auto;
  min-width: 180px;
  color: #e8edf7;
  font-size: 13px;
  font-weight: 850;
}

.bottom-dock a {
  min-height: 36px;
  padding: 0 18px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.bottom-dock .dock-primary {
  border-color: transparent;
  background: var(--red);
  box-shadow: 0 10px 24px rgba(239, 44, 32, 0.25);
}

.site-footer {
  flex: 0 0 auto;
  padding: 16px 20px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 650;
}

.site-footer a {
  transition: color 0.16s ease;
}

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

@media (min-width: 961px) {
  body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
  }

  .hero-section {
    flex: 1 0 425px;
    display: flex;
  }

  .docs-section {
    flex: 0 0 auto;
  }
}

@media (max-width: 1180px) {
  .header-shell,
  .hero-shell,
  .feature-strip,
  .overview-grid,
  .docs-section {
    width: min(100% - 44px, 1000px);
  }

  .header-shell {
    gap: 22px;
  }

  .brand img {
    width: 182px;
  }

  .primary-nav {
    gap: 20px;
    font-size: 13px;
  }

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

  .hero-copy h2 {
    font-size: 30px;
  }

  .overview-grid {
    grid-template-columns: 1fr 1.7fr;
  }

  .tech-panel {
    grid-column: 1 / -1;
  }

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

@media (max-width: 960px) {
  body {
    padding-bottom: 0;
  }

  .header-shell {
    height: 68px;
  }

  .primary-nav {
    position: fixed;
    inset: 68px 18px auto;
    display: none;
    max-height: calc(100vh - 90px);
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-solid);
    box-shadow: var(--shadow);
  }

  body.nav-open .primary-nav {
    display: grid;
    justify-content: stretch;
    gap: 4px;
  }

  .primary-nav a {
    padding: 13px 12px;
    border-radius: 7px;
  }

  .primary-nav a::after {
    display: none;
  }

  .primary-nav a:hover,
  .primary-nav a.active {
    background: rgba(239, 44, 32, 0.08);
  }

  .github-pill,
  .star-pill {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-section {
    min-height: 510px;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0 48%, rgba(255, 255, 255, 0.52) 75%, rgba(255, 255, 255, 0.16) 100%),
      linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(246, 247, 250, 0.82) 96%),
      url("assets/boar-red-hero-bg.jpg") 64% top / cover no-repeat;
  }

  .hero-shell {
    min-height: 510px;
    padding: 66px 0 42px;
  }

  .hero-copy {
    width: min(100%, 560px);
  }

  .hero-copy h1 {
    white-space: normal;
  }

  .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    transform: translateY(0);
  }

  .feature-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-card:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .feature-card:last-child {
    border-bottom: 0;
  }

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

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

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

  .bottom-dock {
    position: static;
    width: min(100% - 44px, 1000px);
    margin: 28px auto 20px;
    transform: none;
  }

  .site-footer {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  body {
    background: #f6f7fa;
  }

  .header-shell {
    width: calc(100% - 28px);
  }

  .brand img {
    width: 166px;
  }

  .theme-toggle {
    display: none;
  }

  .hero-section {
    min-height: 360px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0 48%, rgba(255, 255, 255, 0.46) 76%, rgba(246, 247, 250, 0.82) 100%),
      url("assets/boar-red-hero-bg.jpg") 67% bottom / auto 74% no-repeat;
  }

  .hero-shell,
  .feature-strip,
  .overview-grid,
  .docs-section {
    width: calc(100% - 28px);
  }

  .hero-shell {
    min-height: 360px;
    align-items: flex-start;
    padding: 38px 0 60px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .hero-copy h1 {
    gap: 10px;
    font-size: 38px;
  }

  .hero-copy h2 {
    margin-top: 8px;
    font-size: 24px;
  }

  .hero-description {
    margin-top: 18px;
    font-size: 15px;
  }

  .hero-actions {
    gap: 12px;
    margin-top: 24px;
  }

  .button {
    flex: 1 1 100%;
    min-height: 46px;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card:nth-child(odd) {
    border-right: 0;
  }

  .panel {
    padding: 18px;
  }

  .architecture-map {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .architecture-map::before,
  .architecture-map::after,
  .gateway::before,
  .services::before,
  .storage::before {
    display: none;
  }

  .clients,
  .storage,
  .registry,
  .gateway,
  .config,
  .services {
    grid-column: auto;
    grid-row: auto;
    width: auto;
  }

  .lane {
    min-height: 0;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
  }

  .lane span {
    grid-column: 1 / -1;
  }

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

  .docs-section {
    padding: 44px 0 0;
  }

  .section-heading.centered {
    text-align: left;
  }

  .section-heading.centered h2 {
    font-size: 23px;
  }

  .bottom-dock {
    width: calc(100% - 28px);
    flex-wrap: wrap;
    gap: 10px;
    border-radius: var(--radius);
  }

  .bottom-dock span {
    min-width: 0;
    flex: 1 1 calc(100% - 52px);
  }

  .bottom-dock a {
    flex: 1 1 100%;
  }
}

@media (max-width: 400px) {
  .brand img {
    width: 150px;
  }

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

  .hero-copy h2 {
    font-size: 22px;
  }
}
