/* ==========================================================================
   BLACK CAT PLANET STUDIO — design system
   --------------------------------------------------------------------------
   Concept: deep-space ink · warm off-white · a single lime "curiosity"
   accent (the laser dot the black cat chases). Three typographic voices:
     — Noto Serif SC   : the literary / cultural voice (Chinese slogans)
     — Unbounded       : the cosmic / playful voice (English display)
     — IBM Plex Mono   : the technical / AI-lab voice (labels, data)
   ========================================================================== */

:root {
  /* color — space */
  --bg: #06070c;
  --bg-2: #0a0c15;
  --surface: #0d101b;
  --surface-2: #121625;

  --line: rgba(244, 241, 232, 0.08);
  --line-strong: rgba(244, 241, 232, 0.16);

  /* color — ink (warm, not pure white) */
  --ink: #f4f1e8;
  --ink-2: #b7b4ab;
  --ink-3: #77757c;

  /* color — lime (the curiosity accent) */
  --red: #DFFB1A;
  --red-2: #EAFF6B;
  --red-glow: rgba(223,251,26, 0.35);

  /* color — celestial blue (rare secondary) */
  --blue: #8fb0ff;
  --blue-glow: rgba(143, 176, 255, 0.18);

  /* type */
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-display: "Unbounded", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* layout */
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1280px;
  --nav-h: 76px;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: var(--red); color: #0a0c15; }

/* custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23273a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ------------------------------------------------------------------ shared atmosphere */
/* fixed starfield canvas sits behind everything */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* subtle grain + vignette over the whole page */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(3, 4, 8, 0.55) 100%),
    radial-gradient(80% 60% at 50% 100%, rgba(3, 4, 8, 0.7), transparent 70%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page { position: relative; z-index: 2; }

/* ------------------------------------------------------------------ type helpers */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.serif {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.28;
}
.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
}

/* ------------------------------------------------------------------ layout scaffold */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: clamp(88px, 12vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(64px, 8vw, 110px) 0; }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .eyebrow { display: block; margin-bottom: 18px; }
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.section-head .en {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 1.6vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 14px;
}
.section-head p.lede {
  margin-top: 22px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-2);
  max-width: 58ch;
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  transition: all 0.35s var(--ease);
  position: relative;
  white-space: nowrap;
}
.btn .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
  transition: transform 0.35s var(--ease);
}
.btn:hover { border-color: var(--red); background: rgba(223,251,26,0.06); }
.btn:hover .dot { transform: scale(1.5); }

.btn--solid {
  background: var(--red);
  border-color: var(--red);
  color: #0b0d12;
}
.btn--solid:hover { background: var(--red-2); box-shadow: 0 0 40px var(--red-glow); }

.btn--ghost { border-color: var(--line); color: var(--ink-2); }

/* ------------------------------------------------------------------ NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(6, 7, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--font-display);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}
.brand .mark { width: 38px; height: 38px; flex: none; object-fit: contain; }
.brand .brand__zh { display: block; font-family: var(--font-serif); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.04em; }
.brand .brand__en { display: block; font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.22em; color: var(--ink-3); text-transform: uppercase; }

.nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

.nav__cta { display: flex; align-items: center; gap: 16px; }

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
}
.burger span {
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* mobile menu */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 6, 10, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.mmenu.is-open { opacity: 1; visibility: visible; }
.mmenu a {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.mmenu a .idx { font-family: var(--font-mono); font-size: 0.7rem; color: var(--red); }
.mmenu a .zh { font-family: var(--font-serif); font-size: 0.8rem; color: var(--ink-3); margin-left: auto; }

/* ------------------------------------------------------------------ reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ FOOTER */
.footer {
  position: relative;
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding: clamp(80px, 10vw, 130px) 0 40px;
}
.footer__stage {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.footer__cat {
  width: clamp(120px, 18vw, 170px);
  margin: 0 auto 36px;
  opacity: 0.9;
}
.footer__slogan {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4.6vw, 3rem);
  font-weight: 700;
  line-height: 1.4;
}
.footer__name {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  letter-spacing: 0.14em;
  margin-top: 34px;
}
.footer__tagline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 12px;
}
.footer__bar {
  margin-top: clamp(60px, 8vw, 90px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.footer__bar .links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__bar a { color: var(--ink-3); transition: color 0.3s; }
.footer__bar a:hover { color: var(--red); }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__logo-mini { width: 22px; height: 22px; flex: none; }

/* ------------------------------------------------------------------ responsive nav */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__cta .btn { display: none; }
  .burger { display: flex; }
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* generic card used across pages */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

/* tag chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.tag.tag--red { color: var(--red); border-color: rgba(223,251,26,0.4); }

/* stat number */
.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.stat-num em { font-style: normal; color: var(--red); }

/* laser dot (the recurring motif) */
.laserdot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 var(--red-glow);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--red-glow); }
  60% { box-shadow: 0 0 0 16px rgba(223,251,26,0); }
  100% { box-shadow: 0 0 0 0 rgba(223,251,26,0); }
}
