/* ============================================================
   Zenith Union — design tokens & shared shell
   Palette: harbour ink / filing paper / chop red
   ============================================================ */

:root {
  --ink: #11242a;
  --ink-2: #1b333a;
  --ink-soft: #4c5f63;
  --ink-mute: #6b7c7e;
  --paper: #f4f3ee;
  --paper-2: #e9e9e1;
  --paper-3: #dedfd4;
  --white: #fbfaf6;
  --seal: #9f2c24;
  --seal-soft: rgba(159, 44, 36, 0.09);
  --jade: #2f5d50;
  --line: rgba(17, 36, 42, 0.15);
  --line-strong: rgba(17, 36, 42, 0.32);
  --line-dark: rgba(244, 243, 238, 0.16);

  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: 20px;
  --header-h: 62px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --pad: 40px;
    --header-h: 76px;
  }
}

@media (min-width: 1200px) {
  :root {
    --pad: 56px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--seal);
  color: var(--white);
}

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

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- typography ---------- */

.display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.lead {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
  text-wrap: pretty;
}

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

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--btn-bd);
  border-radius: 2px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:hover {
  --btn-bg: var(--seal);
  --btn-bd: var(--seal);
  transform: translateY(-1px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-bd: var(--ink);
}

.btn--onDark {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bd: var(--paper);
}

.btn--onDark:hover {
  --btn-bg: var(--seal);
  --btn-fg: var(--white);
  --btn-bd: var(--seal);
}

.btn--block {
  width: 100%;
}

.btn .arrow {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.link-arrow svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover {
  color: var(--seal);
  border-color: var(--seal);
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

/* ---------- demo chip ---------- */

.demo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 6px;
  border: 1px solid rgba(159, 44, 36, 0.45);
  border-radius: 2px;
  background: var(--seal-soft);
  color: var(--seal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
  white-space: nowrap;
  vertical-align: middle;
}

.demo-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-mute);
}

.demo-note svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 3px;
  color: var(--seal);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(244, 243, 238, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.is-stuck {
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -24px rgba(17, 36, 42, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-right: auto;
  padding-block: 10px;
}

.brand-mark {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.brand-cn {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
}

@media (max-width: 400px) {
  .brand-cn {
    display: none;
  }
}

.nav {
  display: none;
  align-items: center;
  gap: 26px;
}

.nav a {
  position: relative;
  font-size: 14px;
  color: var(--ink-soft);
  padding-block: 6px;
  transition: color 0.2s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--seal);
  transition: width 0.25s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after {
  width: 100%;
}

.header-cta {
  display: none;
}

.menu-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  height: 1px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 980px) {
  .nav {
    display: flex;
  }
  .header-cta {
    display: inline-flex;
  }
  .menu-btn {
    display: none;
  }
}

/* mobile drawer */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px var(--pad) 32px;
  background: var(--paper);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
    visibility 0.25s;
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.drawer a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.drawer a .idx {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}

.drawer .drawer-foot {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.drawer-meta {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-mute);
}

@media (min-width: 980px) {
  .drawer {
    display: none;
  }
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: 52px 28px;
}

.footer-top {
  display: grid;
  gap: 36px;
}

.footer-brand .brand-mark {
  font-size: 20px;
  color: var(--paper);
}

.footer-brand .brand-cn {
  color: rgba(244, 243, 238, 0.55);
  border-color: var(--line-dark);
}

.footer-tagline {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.85;
  color: rgba(244, 243, 238, 0.6);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 243, 238, 0.45);
  margin-bottom: 12px;
}

.footer-col ul {
  display: grid;
  gap: 8px;
}

.footer-col a,
.footer-col span {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(244, 243, 238, 0.78);
}

.footer-col a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-col .lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-col .lang-row span {
  border: 1px solid var(--line-dark);
  padding: 2px 8px;
  font-size: 11px;
  color: rgba(244, 243, 238, 0.5);
}

.footer-col .lang-row span[aria-current] {
  color: var(--paper);
  border-color: rgba(244, 243, 238, 0.5);
}

.footer-legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
  display: grid;
  gap: 12px;
  font-size: 11.5px;
  line-height: 1.8;
  color: rgba(244, 243, 238, 0.48);
}

.footer-legal .footer-domain {
  color: rgba(244, 243, 238, 0.72);
  letter-spacing: 0.02em;
}

.footer-legal strong {
  color: rgba(244, 243, 238, 0.72);
  font-weight: 500;
}

.footer-legal .legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.footer-legal .legal-links a:hover {
  color: var(--paper);
}

@media (min-width: 768px) {
  .site-footer {
    padding-block: 64px 28px;
  }
  .footer-top {
    grid-template-columns: 1.1fr 1.6fr;
    gap: 48px;
  }
  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-legal {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* ---------- seal ---------- */

.seal {
  color: var(--seal);
  opacity: 0.88;
  mix-blend-mode: multiply;
  filter: saturate(0.9);
}

.seal text {
  font-family: var(--mono);
  font-weight: 500;
}

.seal--press {
  transform-origin: 50% 50%;
  animation: seal-press 0.9s var(--ease) 0.5s both;
}

@keyframes seal-press {
  0% {
    opacity: 0;
    transform: scale(1.35) rotate(-14deg);
  }
  60% {
    opacity: 0.95;
    transform: scale(0.97) rotate(-7deg);
  }
  100% {
    opacity: 0.88;
    transform: scale(1) rotate(-7deg);
  }
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .seal--press {
    animation: none;
    opacity: 0.88;
    transform: rotate(-7deg);
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
