/* ============ MICLinker · CourrierHub — homepage ============ */
:root {
  --bg: #060b18;
  --bg-soft: #0a1226;
  --panel: rgba(16, 26, 51, 0.55);
  --panel-border: rgba(94, 234, 212, 0.14);
  --text: #e6edf7;
  --text-dim: #93a4c3;
  --cyan: #22d3ee;
  --blue: #4f7cff;
  --grad: linear-gradient(96deg, #22d3ee 0%, #4f7cff 60%, #8b5cf6 100%);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1180px, 92vw); margin: 0 auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--cyan); color: #04121c; padding: .5rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 11, 24, 0.72);
  border-bottom: 1px solid rgba(94, 234, 212, 0.1);
}
.nav { display: flex; align-items: center; gap: 2rem; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); }
.brand-name { font-weight: 700; letter-spacing: .04em; font-size: 1.02rem; display: flex; flex-direction: column; line-height: 1.25; }
.brand-name em { font-style: normal; font-size: .68rem; letter-spacing: .18em; color: var(--text-dim); text-transform: uppercase; }
.nav-links { display: flex; gap: 1.6rem; list-style: none; margin-left: auto; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--cyan); }
.nav-cta { margin-left: .5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: .68rem 1.5rem; border-radius: 999px;
  font-size: .95rem; text-decoration: none; font-weight: 600; letter-spacing: .02em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #04101f; box-shadow: 0 6px 26px rgba(34, 211, 238, .35); }
.btn-outline { border: 1px solid rgba(34, 211, 238, .55); color: var(--cyan); }
.btn-outline:hover { background: rgba(34, 211, 238, .1); }
.btn-ghost { border: 1px solid rgba(147, 164, 195, .35); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 5.5rem 0 4rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.grid-floor {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79, 124, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 124, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.glow-cyan { width: 520px; height: 520px; background: #0e7490; top: -180px; left: -120px; }
.glow-blue { width: 640px; height: 640px; background: #1e3a8a; top: -220px; right: -160px; }

.hero-inner { position: relative; text-align: center; }
.hero-kicker { font-size: .8rem; letter-spacing: .32em; color: var(--cyan); margin-bottom: 1.2rem; }
.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.22; font-weight: 800; letter-spacing: .01em;
}
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 46rem; margin: 1.4rem auto 0; color: var(--text-dim); font-size: 1.08rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 2.1rem; flex-wrap: wrap; }

.hero-map { margin: 3.2rem auto 0; max-width: 1100px; }
.map-svg { width: 100%; height: auto; display: block; }
.map-label text { fill: var(--text-dim); font-size: 15px; letter-spacing: .06em; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin: 3rem auto 0; max-width: 900px;
}
.hero-stats > div {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 1.1rem .8rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-stats dd { font-size: 2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats dt { color: var(--text-dim); font-size: .86rem; margin-top: .15rem; }
.hero-stats dd { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.hero-stats dd::after { content: attr(data-suffix); font-size: 1.1rem; }

/* ---------- sections ---------- */
.section { padding: 5.2rem 0; }
.section-alt {
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(14, 116, 144, .12), transparent),
    radial-gradient(ellipse 50% 60% at 90% 100%, rgba(30, 58, 138, .14), transparent),
    var(--bg-soft);
  border-top: 1px solid rgba(94, 234, 212, .07);
  border-bottom: 1px solid rgba(94, 234, 212, .07);
}
.kicker { font-size: .76rem; letter-spacing: .3em; color: var(--cyan); margin-bottom: .6rem; }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: .01em; }
.section-sub { color: var(--text-dim); margin: .9rem 0 0; max-width: 44rem; }
.section .section-sub { margin-bottom: 3rem; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 1.2rem; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 1.7rem 1.5rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover {
  transform: translateY(-6px); border-color: rgba(34, 211, 238, .45);
  box-shadow: 0 14px 40px rgba(6, 40, 80, .45);
}
.card h3 { font-size: 1.12rem; margin-bottom: .6rem; letter-spacing: .02em; }
.card p { color: var(--text-dim); font-size: .95rem; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(79, 124, 255, .16));
  border: 1px solid rgba(34, 211, 238, .3); color: var(--cyan); margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tags li {
  font-size: .76rem; color: var(--cyan); padding: .18rem .65rem; border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .07);
}

/* ---------- flow ---------- */
.flow { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; counter-reset: step; }
.flow li {
  position: relative; text-align: center; padding: 1.5rem .6rem 1.2rem;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
}
.flow li span {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-weight: 800; font-size: .95rem; color: #04101f; background: var(--grad); margin-bottom: .7rem;
}
.flow h3 { font-size: 1.02rem; }
.flow p { font-size: .82rem; color: var(--text-dim); margin-top: .35rem; }
.flow li:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: calc(-1rem + 2px); width: calc(1rem - 4px); height: 2px;
  background: linear-gradient(90deg, rgba(34, 211, 238, .6), rgba(79, 124, 255, .25));
}

/* ---------- platform ---------- */
.platform-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.feature-list { list-style: none; margin: 1.6rem 0; }
.feature-list li { padding-left: 1.6rem; position: relative; color: var(--text-dim); margin-bottom: .6rem; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: .85rem; height: .85rem; border-radius: 3px;
  background: var(--grad); opacity: .9;
}
.platform-copy .section-sub { margin-bottom: 0; }
.platform-copy .hero-actions { justify-content: flex-start; }

.terminal {
  background: #0a1122; border: 1px solid rgba(94, 234, 212, .2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(2, 10, 30, .6);
}
.terminal-bar {
  display: flex; align-items: center; gap: .45rem; padding: .65rem 1rem;
  background: rgba(20, 32, 60, .8); border-bottom: 1px solid rgba(94, 234, 212, .12);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #24406e; }
.terminal-bar i:first-child { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: .6rem; font-size: .74rem; color: var(--text-dim); letter-spacing: .08em; }
.terminal pre {
  padding: 1.2rem 1.3rem; overflow-x: auto;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
  font-size: .82rem; line-height: 1.75; color: #c9d6ee;
}
.c-cmd { color: #5c6f93; } .c-prompt { color: #22d3ee; } .c-str { color: #7ee7a2; }
.c-key { color: #8ab8ff; } .c-num { color: #ffb86c; }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.6rem; text-align: left; }
.contact-item {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 1.5rem;
}
.contact-item h3 { font-size: 1rem; margin-bottom: .5rem; color: var(--cyan); }
.contact-item p { color: var(--text-dim); font-size: .93rem; }
.contact-item a { color: var(--text); text-decoration: none; border-bottom: 1px dashed rgba(34, 211, 238, .5); }
.contact-item a:hover { color: var(--cyan); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid rgba(94, 234, 212, .1); padding: 1.6rem 0; background: #040914; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .86rem; color: var(--text-dim); }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--cyan); }
.footer-legal { letter-spacing: .06em; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
/* no-JS / reduced-motion fallback */
.no-js .reveal, .no-observer .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .map-svg [animate], .map-svg animate, .map-svg animateMotion { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cols-3 { grid-template-columns: 1fr 1fr; }
  .platform-grid { grid-template-columns: 1fr; gap: 2rem; }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .flow li:not(:last-child)::after { display: none; }
  .nav-links { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cols-3, .flow, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 3.5rem; }
  .nav-cta { padding: .5rem 1.1rem; }
}
