/* Magi / 麦吉 — Official site styles */
:root {
  --bg: #0b0c14;
  --bg-elevated: #12131f;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #f4f5fb;
  --text-muted: #a8adc2;
  --text-dim: #7a8098;
  --purple: #8b7cf6;
  --purple-soft: #a99bff;
  --blue: #6b8cff;
  --gold: #d4a84b;
  --gold-soft: #f5d78e;
  --gradient: linear-gradient(135deg, #8b7cf6 0%, #6b8cff 55%, #9bb0ff 100%);
  --gradient-gold: linear-gradient(135deg, #d4a84b, #f5d78e);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  --radius-sm: 14px;
  --nav-h: 72px;
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

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

/* Ambient glow */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-glow::before,
.bg-glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}
.bg-glow::before {
  width: 520px; height: 520px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(139,124,246,0.55), transparent 70%);
}
.bg-glow::after {
  width: 480px; height: 480px;
  top: 20%; right: -120px;
  background: radial-gradient(circle, rgba(107,140,255,0.4), transparent 70%);
}

/* Glass */
.glass {
  background: rgba(18, 19, 31, 0.55);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 28px rgba(107, 140, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 36px rgba(107, 140, 255, 0.45);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}
.btn-gold {
  background: linear-gradient(135deg, rgba(212,168,75,0.18), rgba(245,215,142,0.12));
  border: 1px solid rgba(212,168,75,0.45);
  color: var(--gold-soft);
}
.btn-gold:hover {
  background: linear-gradient(135deg, rgba(212,168,75,0.28), rgba(245,215,142,0.18));
  transform: translateY(-2px);
}

/* Navbar */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 12, 20, 0.72);
  border-bottom-color: var(--border-soft);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 2;
}
.brand img, .brand img.logo, svg.logo {
  width: 36px; height: 36px;
  border-radius: 10px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-cn { font-size: 1.05rem; }
.brand-en { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

.nav-links {
  display: none;
  align-items: center;
  gap: 0.15rem;
}
.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.nav-cta { display: none; }
.nav-toggle {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  display: grid;
  place-items: center;
  gap: 5px;
  z-index: 2;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(11,12,20,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: calc(var(--nav-h) + 1.5rem) 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu a {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
}
.mobile-menu .btn { margin-top: 1rem; width: 100%; }

@media (min-width: 880px) {
  .nav-links, .nav-cta { display: flex; }
  .nav-toggle { display: none; }
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + 3.5rem) 0 4.5rem;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
}
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(139,124,246,0.35);
  background: rgba(139,124,246,0.12);
  color: var(--purple-soft);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(212,168,75,0.8);
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin-bottom: 0.35rem;
}
.hero-en {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.hero-meta strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.hero-card {
  position: relative;
  border-radius: 28px;
  padding: 1.5rem;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 30% 20%, rgba(139,124,246,0.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(212,168,75,0.2), transparent 40%);
  animation: drift 12s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(-2%, -1%) rotate(0deg); }
  to { transform: translate(2%, 2%) rotate(4deg); }
}
.hero-card-inner {
  position: relative;
  display: grid;
  gap: 0.85rem;
}
.stat-pill {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-soft);
}
.stat-pill .icon-wrap {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gradient);
  flex-shrink: 0;
  color: #fff;
}
.stat-pill .icon-wrap svg { width: 22px; height: 22px; }
.stat-pill h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 0.15rem; }
.stat-pill p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }

/* Sections */
section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-soft);
  margin-bottom: 0.75rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-head p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Services */
.services-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}
.service-card {
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  transition: transform 0.35s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.35s;
  height: 100%;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139,124,246,0.4);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}
.service-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  background: linear-gradient(145deg, rgba(139,124,246,0.25), rgba(107,140,255,0.12));
  border: 1px solid rgba(139,124,246,0.3);
  color: var(--purple-soft);
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.service-card ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}
.service-card li {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.service-card li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* Process */
.process {
  background: linear-gradient(180deg, transparent, rgba(139,124,246,0.05), transparent);
}
.process-track {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
@media (min-width: 800px) {
  .process-track {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
  }
}
.process-step {
  position: relative;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  counter-increment: step;
}
.process-step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.85rem;
  letter-spacing: 0.04em;
}
.process-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.process-step p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Capabilities strip */
.caps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 2.5rem;
}
.cap-chip {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
}

/* About */
.about-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .about-layout { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
}
.about-copy {
  padding: 1.75rem;
  border-radius: var(--radius);
}
.about-copy h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.about-copy p {
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}
.about-copy p:last-child { margin-bottom: 0; }
.license-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(212,168,75,0.28);
  background:
    linear-gradient(160deg, rgba(212,168,75,0.08), transparent 40%),
    rgba(255,255,255,0.04);
}
.license-card .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}
.license-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  line-height: 1.4;
}
.license-rows {
  display: grid;
  gap: 0.75rem;
}
.license-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  font-size: 0.88rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
}
.license-row:last-child { border-bottom: none; padding-bottom: 0; }
.license-row dt {
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
}
.license-row dd {
  color: var(--text);
  word-break: break-all;
  font-weight: 500;
}
@media (max-width: 480px) {
  .license-row { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* Contact / CTA */
.cta-band {
  border-radius: 28px;
  padding: 2.5rem 1.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(139,124,246,0.35);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(139,124,246,0.3), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(107,140,255,0.22), transparent 45%),
    rgba(18,19,31,0.7);
}
.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
}
.cta-band > p {
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}
.contact-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  text-align: left;
}
@media (min-width: 720px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}
.contact-item {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
}
.contact-item .ci-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  background: rgba(139,124,246,0.15);
  color: var(--purple-soft);
}
.contact-item .ci-icon svg { width: 20px; height: 20px; }
.contact-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.contact-item p, .contact-item a {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.contact-item a:hover { color: var(--purple-soft); }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border-soft);
  margin-top: 2rem;
}
.footer-top {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 800px) {
  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.footer-brand .brand { margin-bottom: 0.25rem; }
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.88rem;
  max-width: 28rem;
}
.footer h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-links {
  display: grid;
  gap: 0.55rem;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  display: grid;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.footer-bottom .legal-line {
  color: var(--text-muted);
}
.footer-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.85;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .service-card, .hero-card::before { transition: none; animation: none; }
}

.about-layout-single { grid-template-columns: 1fr; max-width: 720px; }
