:root {
  --ink: #1b1a16;
  --ink-soft: #5e5a51;
  --paper: #f7f1e6;
  --paper-2: #efe4d1;
  --surface: rgba(255, 252, 245, 0.74);
  --surface-solid: #fffaf0;
  --line: rgba(42, 37, 28, 0.12);
  --gold: #c9892f;
  --green: #587a58;
  --clay: #d86f44;
  --blue: #5f78b7;
  --container: 1160px;
  --gutter: clamp(18px, 5vw, 46px);
  --font-display: "Bodoni 72", "Didot", "Songti SC", "STSong", Georgia, serif;
  --font-body: "Avenir Next", Avenir, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 180ms var(--ease), box-shadow 180ms var(--ease);
}

.site-header.is-scrolled {
  background: rgba(247, 241, 230, 0.88);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 850;
  line-height: 1;
}

.brand-logo {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(27, 26, 22, 0.16));
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 760;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.language-link {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.62);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.7);
  color: var(--ink);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  font-size: clamp(46px, 7.6vw, 96px);
  font-weight: 700;
}

h2 {
  font-size: clamp(30px, 4.5vw, 58px);
  font-weight: 700;
}

h3 {
  font-size: clamp(22px, 2.7vw, 34px);
  font-weight: 700;
}

h4 {
  font-size: 18px;
  font-weight: 800;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.lede {
  max-width: 690px;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.56;
}

.copy {
  color: var(--ink-soft);
  font-size: 17px;
}

.copy + .copy { margin-top: 14px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: #fff8e8;
  font-weight: 820;
  line-height: 1;
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  background: #000;
}

.btn--line {
  background: rgba(255, 250, 240, 0.62);
  color: var(--ink);
  border-color: rgba(27, 26, 22, 0.08);
}

.btn--line:hover {
  background: var(--surface-solid);
}

.muguang-stage {
  position: relative;
  min-height: min(820px, 100vh);
  display: grid;
  align-items: end;
  padding: 128px 0 72px;
  overflow: hidden;
  background: var(--paper);
}

.muguang-stage::before,
.sub-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 241, 230, 0.94) 0, rgba(247, 241, 230, 0.74) 42%, rgba(247, 241, 230, 0.12) 100%),
    url("../images/brand/muguang-hero-bg.png") center / cover no-repeat;
  transform: scale(1.015);
  transform-origin: center;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.74) 72%, rgba(0, 0, 0, 0.28) 88%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.74) 72%, rgba(0, 0, 0, 0.28) 88%, transparent 100%);
  pointer-events: none;
}

.muguang-stage::after,
.sub-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: clamp(240px, 32vw, 430px);
  background:
    linear-gradient(180deg, rgba(247, 241, 230, 0) 0%, rgba(247, 241, 230, 0.5) 36%, rgba(247, 241, 230, 0.9) 72%, var(--paper) 100%);
  pointer-events: none;
}

.stage-system,
.sub-stage .container {
  position: relative;
  z-index: 1;
}

.stage-system {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.46fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: end;
}

.stage-rail {
  display: none;
}

.stage-copy h1 { margin-top: 18px; }
.stage-copy .lede { margin-top: 20px; }
.stage-copy .btn-row { margin-top: 30px; }

.stage-code {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 250, 240, 0.68);
  box-shadow: 0 24px 80px rgba(60, 45, 20, 0.12);
}

.code-line {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--ink-soft);
  font-size: 13px;
}

.code-line span {
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.code-line strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.spectrum-band,
.control-board,
.terminal,
.catalog,
.workflow,
.identity-panel,
.directory {
  padding: clamp(56px, 8vw, 96px) 0;
}

.spectrum-band {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: clamp(30px, 7vw, 86px);
}

.band-copy h2 { margin-top: 14px; }
.band-copy .copy { margin-top: 18px; }

.product-spectrum {
  display: grid;
  gap: 14px;
}

.product-slice {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(60, 45, 20, 0.08);
}

.product-slice img {
  width: 74px;
  height: 74px;
  border-radius: 18px;
}

.product-slice span {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.product-slice p {
  color: var(--ink-soft);
  margin-top: 7px;
}

.product-slice em {
  color: var(--gold);
  font-style: normal;
  font-weight: 850;
}

.control-grid,
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.control-cell,
.workflow-steps article {
  min-height: 210px;
  padding: 24px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(60, 45, 20, 0.07);
}

.control-cell span,
.workflow-steps span {
  display: inline-block;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 34px;
  margin-bottom: 22px;
}

.control-cell p,
.workflow-steps p {
  margin-top: 12px;
  color: var(--ink-soft);
}

.terminal-frame {
  border-radius: 32px;
  background: rgba(255, 250, 240, 0.72);
  color: var(--ink);
  padding: clamp(22px, 4vw, 34px);
  box-shadow: 0 22px 70px rgba(60, 45, 20, 0.08);
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.terminal-body {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.terminal-body a,
.terminal-body div {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.34);
}

.terminal-body a:hover {
  background: var(--surface-solid);
}

.terminal-body span {
  color: var(--ink-soft);
  font-size: 12px;
}

.terminal-body strong {
  color: var(--ink);
  font-size: 18px;
}

.terminal-body em {
  color: var(--gold);
  font-style: normal;
  font-weight: 850;
}

.sub-stage {
  position: relative;
  min-height: 430px;
  padding: 128px 0 96px;
  overflow: hidden;
  background: var(--paper);
}

.sub-stage h1 { margin-top: 18px; max-width: 900px; }
.sub-stage .lede { margin-top: 20px; }

.app-chapter {
  display: grid;
  grid-template-columns: minmax(280px, 0.54fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 60px);
  align-items: center;
  padding: clamp(26px, 4vw, 46px);
  margin-bottom: 24px;
  border-radius: 36px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(60, 45, 20, 0.08);
}

.app-media {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.app-icon-panel {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.app-icon-large {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(27, 26, 22, 0.16);
}

.app-icon-panel span,
.store-shot-strip figcaption,
.store-note {
  color: var(--ink-soft);
  font-size: 13px;
}

.app-icon-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.store-shot-strip {
  display: flex;
  gap: 14px;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(27, 26, 22, 0.24) transparent;
}

.store-shot-strip figure {
  flex: 0 0 clamp(148px, 42%, 202px);
  margin: 0;
  scroll-snap-align: start;
}

.store-shot-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1299;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(27, 26, 22, 0.08);
  box-shadow: 0 18px 52px rgba(27, 26, 22, 0.12);
}

.store-shot-strip figcaption {
  margin-top: 9px;
  white-space: nowrap;
}

.store-note {
  max-width: 420px;
}

.chapter-text h2 { margin-top: 8px; }
.chapter-text .lede { margin-top: 16px; }
.chapter-text .btn-row { margin-top: 26px; }

.feature-tape {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.feature-tape li {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.62);
  color: var(--ink-soft);
}

.feature-tape strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
}

.identity-grid,
.directory-grid {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: clamp(28px, 6vw, 70px);
}

.nameplate {
  display: grid;
  gap: 10px;
}

.nameplate div {
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
}

.nameplate dt {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.nameplate dd {
  margin: 6px 0 0;
  color: var(--ink);
  font-weight: 820;
}

.plain-note {
  max-width: 860px;
  margin-top: 24px;
  padding: 0 var(--gutter);
}

.plain-note p { color: var(--ink-soft); }

.footer {
  padding: 44px 0;
  background: #1f201b;
  color: #f8efd9;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
}

.footer strong {
  display: block;
  color: #f0b95f;
  font-size: 18px;
}

.footer p,
.footer a { color: rgba(248, 239, 217, 0.7); }

.footer-contact {
  margin-top: 10px;
}

.footer-contact a {
  color: #f0b95f;
  font-weight: 760;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.legal-line {
  margin-top: 24px;
  color: rgba(248, 239, 217, 0.5);
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 560ms var(--ease), transform 560ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px var(--gutter);
  text-align: center;
}

.not-found h1 {
  margin-left: auto;
  margin-right: auto;
}

.not-found .btn-row {
  justify-content: center;
  margin-top: 30px;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }

  .site-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-radius: 24px;
    background: rgba(255, 250, 240, 0.96);
    box-shadow: 0 18px 60px rgba(60, 45, 20, 0.14);
  }

  body.nav-open .site-nav { display: flex; }

  .site-nav a {
    padding: 12px;
  }

  .stage-system,
  .spectrum-band,
  .app-chapter,
  .identity-grid,
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .muguang-stage {
    min-height: auto;
    padding-top: 112px;
  }

  .product-slice {
    grid-template-columns: 76px 1fr;
  }

  .product-slice em { grid-column: 2; }
  .control-grid,
  .workflow-steps,
  .feature-tape { grid-template-columns: 1fr; }
  .store-shot-strip figure { flex-basis: min(178px, 46vw); }
  .terminal-body a,
  .terminal-body div { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer nav { justify-content: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .header-inner { height: 66px; }
  .site-nav { inset-top: 66px; }
  .brand small { display: none; }
  .muguang-stage,
  .sub-stage { padding-top: 98px; }
  .product-slice { grid-template-columns: 1fr; }
  .product-slice img { width: 72px; height: 72px; }
  .app-chapter { border-radius: 26px; padding: 20px; }
  .app-icon-panel { grid-template-columns: 76px minmax(0, 1fr); }
  .app-icon-large { width: 76px; height: 76px; border-radius: 18px; }
}
