/* ============================================================
   Hinay Admin 介绍站 — 蓝图 (Blueprint) 主题
   ============================================================ */

:root {
  --bp-deep:    #0E2347;   /* 最深的蓝,顶栏/页脚/深色块 */
  --bp-base:    #16366E;   /* 图纸主底色 */
  --bp-panel:   #1A3E7C;   /* 略亮的区块 */
  --ink:        #EAF1FB;   /* 主文字(白墨) */
  --ink-dim:    #A8BCDD;   /* 次要文字 */
  --ink-faint:  #7E94BC;   /* 注释文字 */
  --line-soft:  rgba(234, 241, 251, 0.14);  /* 细分隔线 */
  --line-hard:  rgba(234, 241, 251, 0.38);  /* 主图框线 */
  --grid-fine:  rgba(234, 241, 251, 0.045); /* 细网格 */
  --grid-bold:  rgba(234, 241, 251, 0.09);  /* 粗网格 */
  --amber:      #F2B33D;   /* 图钉黄,仅用于关键点 */
  --cyan:       #7FC4F5;   /* 次要强调 */
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono-font: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 网格子元素允许收缩,防止 pre/表格内容撑破窄屏布局 */
.feat-group, .step, .frame, .bom-wrap, .bom, .arch-wrap > *,
.layers, .arch-side, .step-body, .deploy, .terminal { min-width: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bp-base);
  /* 蓝图网格纸 */
  background-image:
    linear-gradient(var(--grid-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px),
    linear-gradient(var(--grid-bold) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-bold) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono-font); }

::selection { background: var(--amber); color: var(--bp-deep); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 28px;
  height: 60px;
  background: rgba(14, 35, 71, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

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

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--amber);
}

.brand-name {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-name em {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-dim);
  margin-left: 2px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-dim);
  padding: 6px 12px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  border-color: var(--line-hard);
}

.repo-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--bp-deep);
  background: var(--amber);
  padding: 7px 16px;
  transition: background 0.15s;
}

.repo-link:hover { background: #ffc85e; }

/* ============ Hero ============ */
.hero {
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(1100px 500px at 18% 0%, rgba(127, 196, 245, 0.10), transparent 60%);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 28px 88px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-tag {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(56px, 8vw, 104px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin-top: 18px;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  color: var(--ink);
}

.hero-sub::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--amber);
  margin-top: 14px;
}

.hero-desc {
  margin-top: 20px;
  max-width: 34em;
  color: var(--ink-dim);
  font-size: 16px;
}

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

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 26px;
  border: 1px solid var(--line-hard);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bp-deep);
}

.btn-primary:hover { background: #ffc85e; border-color: #ffc85e; }

.btn-ghost { color: var(--ink); }

.btn-ghost:hover { background: rgba(234, 241, 251, 0.08); }

.hero-version {
  margin-top: 26px;
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* 终端卡片 */
.hero-copy, .hero-side { min-width: 0; }

.hero-side { display: flex; flex-direction: column; gap: 22px; }

.terminal {
  border: 1px solid var(--line-hard);
  background: var(--bp-deep);
  box-shadow: 0 24px 60px rgba(6, 16, 36, 0.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid var(--line-hard);
}

.dot:first-child { background: var(--amber); border-color: var(--amber); }

.terminal-title {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

.terminal-body {
  padding: 20px 22px;
  font-size: 13.5px;
  line-height: 1.9;
  overflow-x: auto;
  color: var(--ink);
}

.c-dim { color: var(--ink-faint); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-hard);
}

.hero-stats > div {
  padding: 16px 18px;
  border-left: 1px solid var(--line-soft);
}

.hero-stats > div:first-child { border-left: none; }

.hero-stats dt {
  font-size: 20px;
  font-weight: 600;
  color: var(--amber);
}

.hero-stats dd {
  font-size: 12.5px;
  color: var(--ink-dim);
  margin-top: 2px;
}

/* ============ 图纸区块通用 ============ */
.sheet {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 28px;
  border-bottom: 1px solid var(--line-soft);
}

.sheet-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 24px;
  align-items: baseline;
  margin-bottom: 56px;
}

.fig {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--bp-deep);
  background: var(--amber);
  padding: 3px 10px;
  font-weight: 600;
}

.sheet-head h2 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: 0.01em;
}

.sheet-note {
  grid-column: 2;
  color: var(--ink-dim);
  font-size: 15px;
  margin-top: 6px;
}

/* ============ 特性 ============ */
.feat-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.feat-group {
  background: var(--bp-base);
  padding: 34px 32px 30px;
}

.feat-group h3 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.group-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--line-hard);
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
}

.feat-list { list-style: none; }

.feat-list li {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px dashed var(--line-soft);
  font-size: 14px;
}

.feat-list strong { font-weight: 700; }
.feat-list span { color: var(--ink-dim); }

/* ============ 技术栈 BOM ============ */
.bom-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.bom {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line-hard);
  font-size: 14px;
}

.bom caption {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  padding-bottom: 10px;
}

.bom th, .bom td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.bom thead th {
  background: var(--bp-deep);
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line-hard);
}

.bom tbody tr:last-child td { border-bottom: none; }

.bom tbody tr:hover td { background: rgba(234, 241, 251, 0.05); }

.bom td:nth-child(2) { font-weight: 700; }
.bom td:nth-child(4) { color: var(--ink-dim); }

/* ============ 截图画廊 ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

.frame {
  position: relative;
  border: 1px solid var(--line-hard);
  background: var(--bp-deep);
  padding: 10px;
  cursor: zoom-in;
  transition: border-color 0.15s, transform 0.15s;
}

/* 图纸角标 */
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--amber);
  transition: transform 0.15s;
}

.frame::before { top: -5px; left: -5px; border-right: none; border-bottom: none; }
.frame::after { bottom: -5px; right: -5px; border-left: none; border-top: none; }

.frame:hover { border-color: var(--ink); }
.frame:hover::before { transform: translate(-3px, -3px); }
.frame:hover::after { transform: translate(3px, 3px); }

.frame img {
  display: block;
  width: 100%;
  height: auto;
}

.frame figcaption {
  padding: 10px 2px 2px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

/* ============ 架构 ============ */
.arch-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.layers {
  border: 1px solid var(--line-hard);
  padding: 26px;
  background: var(--bp-deep);
}

.layer {
  display: flex;
  align-items: baseline;
  gap: 16px;
  border: 1px solid var(--line-hard);
  padding: 13px 18px;
  background: var(--bp-base);
}

.layer-name {
  font-weight: 600;
  color: var(--amber);
  min-width: 92px;
}

.layer-desc { font-size: 13px; color: var(--ink-dim); }

.layer-arrow {
  width: 1px;
  height: 18px;
  margin-left: 64px;
  background: var(--line-hard);
  position: relative;
}

.layer-arrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -3.5px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--line-hard);
}

.arch-side h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 26px 0 12px;
}

.arch-side h3:first-child { margin-top: 0; }

.chain {
  font-size: 13px;
  line-height: 2;
  color: var(--cyan);
  border: 1px dashed var(--line-hard);
  padding: 14px 18px;
  word-break: break-all;
}

.plain-list { list-style: none; }

.plain-list li {
  padding: 12px 0;
  border-top: 1px dashed var(--line-soft);
  font-size: 14px;
  color: var(--ink-dim);
}

.plain-list strong { color: var(--ink); }

/* ============ 快速开始 ============ */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  counter-reset: step;
}

.step {
  background: var(--bp-base);
  padding: 28px 30px;
  display: flex;
  gap: 20px;
}

.step:last-child { grid-column: 1 / -1; }

.step-no {
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--bp-deep);
  background: var(--amber);
  font-weight: 600;
  height: 24px;
  line-height: 24px;
  padding: 0 8px;
  margin-top: 3px;
}

.step-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step-body p { font-size: 14px; color: var(--ink-dim); }

.step-body code,
.deploy code {
  font-family: var(--mono-font);
  font-size: 0.92em;
  background: rgba(234, 241, 251, 0.1);
  padding: 1px 6px;
}

.code {
  margin-top: 12px;
  background: var(--bp-deep);
  border: 1px solid var(--line-hard);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.9;
  overflow-x: auto;
}

.deploy {
  margin-top: 48px;
  border: 1px solid var(--line-hard);
  padding: 30px 34px;
  background: var(--bp-deep);
}

.deploy h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }

.deploy .code { margin-top: 0; }

.deploy-note { margin-top: 14px; font-size: 14px; color: var(--ink-dim); }

.notice {
  margin-top: 36px;
  border: 1px dashed var(--amber);
  padding: 16px 22px;
  font-size: 14px;
  color: var(--ink-dim);
}

.notice strong { color: var(--amber); }

/* ============ 页脚 ============ */
.footer {
  background: var(--bp-deep);
  border-top: 1px solid var(--line-soft);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-name { font-weight: 900; font-size: 17px; }

.footer-line { font-size: 13.5px; color: var(--ink-dim); margin-top: 4px; }

.footer-line a { color: var(--cyan); }

.footer-links { display: flex; gap: 22px; font-size: 12.5px; letter-spacing: 0.08em; }

.footer-links a { color: var(--ink-dim); text-decoration: none; }
.footer-links a:hover { color: var(--amber); }

/* ============ 图片放大 ============ */
.lightbox {
  border: 1px solid var(--line-hard);
  background: var(--bp-deep);
  padding: 12px;
  max-width: min(1200px, 92vw);
}

.lightbox::backdrop { background: rgba(8, 20, 42, 0.82); }

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
}

.lightbox-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 32px; height: 32px;
  border: 1px solid var(--line-hard);
  background: var(--amber);
  color: var(--bp-deep);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

/* ============ 入场动效(仅一次) ============ */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.hero-copy > *, .hero-side > * {
  animation: rise 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) both;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.02s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.20s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.26s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.32s; }
.hero-side > *:nth-child(1) { animation-delay: 0.18s; }
.hero-side > *:nth-child(2) { animation-delay: 0.30s; }

/* 滚动淡入(JS 加 .in) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; padding: 64px 24px; }
  .feat-groups, .bom-wrap, .arch-wrap, .steps, .gallery { grid-template-columns: 1fr; }
  .step:last-child { grid-column: auto; }
  .nav { display: none; }
  .feat-list li { grid-template-columns: 1fr; gap: 2px; }
  .sheet { padding: 64px 22px; }
  .sheet-head { grid-template-columns: 1fr; row-gap: 12px; }
  .sheet-note { grid-column: 1; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
