/* ============================================================
   UNFDS® — Redefining Undefined
   暗黑奢华 · 编辑排版 · 纯 2D 动效
   ============================================================ */

:root {
  --bg: #0a0908;
  --bg-2: #12100d;
  --ink: #ece7df;
  --muted: #8a8378;
  --gold: #c9a24e;
  --gold-bright: #e8c97e;
  --line: rgba(236, 231, 223, 0.14);
  --font-display: "Fraunces", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-luxe: cubic-bezier(0.65, 0, 0.15, 1);
  --pad-x: clamp(1.5rem, 6vw, 6rem);
  --pad-y: clamp(6rem, 12vw, 10rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--bg); }

a { color: inherit; text-decoration: none; }
sup { font-size: 0.35em; vertical-align: super; letter-spacing: 0; }
em { font-style: italic; color: var(--gold-bright); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- 预加载幕布 ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: transform 1s var(--ease-luxe);
}
.preloader.is-done { transform: translateY(-100%); }
.preloader__inner { text-align: center; }
.preloader__brand {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300; letter-spacing: 0.08em;
}
.preloader__brand sup { color: var(--gold); }
.preloader__count {
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.3em;
  color: var(--muted);
  margin: 1.2rem 0 1rem;
  min-height: 1.2em;
}
.preloader__count.is-glitch { color: var(--gold); }
.preloader__bar {
  width: min(240px, 50vw); height: 1px;
  background: var(--line); margin: 0 auto;
  overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%; width: 0%;
  background: var(--gold);
  transition: width 0.2s ease;
}

/* ---------- 滚动进度 ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 120; pointer-events: none;
}
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0); transform-origin: left;
}

/* ---------- 自定义光标 ---------- */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 150;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor { width: 6px; height: 6px; background: var(--gold-bright); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(201, 162, 78, 0.55);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              border-color 0.35s, background 0.35s;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: rgba(232, 201, 126, 0.9);
  background: rgba(201, 162, 78, 0.08);
}
@media (pointer: coarse) { .cursor, .cursor-ring { display: none; } }

/* ---------- 颗粒噪点 ---------- */
.grain {
  position: fixed; inset: -100px; z-index: 110;
  pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%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");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-40px, 30px); }
  40% { transform: translate(30px, -50px); }
  60% { transform: translate(-50px, -20px); }
  80% { transform: translate(40px, 40px); }
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--pad-x);
  transition: transform 0.6s var(--ease-out), background 0.4s, backdrop-filter 0.4s;
}
.nav.is-scrolled {
  background: rgba(10, 9, 8, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo {
  font-size: 1.25rem; letter-spacing: 0.1em; font-weight: 400;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.nav__logo sup { color: var(--gold); }
.nav__logo-mark {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold);
  opacity: 0; transform: rotate(-90deg);
  transition: opacity 0.5s, transform 0.8s var(--ease-out);
}
.nav.is-scrolled .nav__logo-mark { opacity: 1; transform: rotate(0deg); }
.nav__links { display: flex; gap: 2.4rem; }
.nav__links a {
  font-size: 0.92rem; color: var(--muted);
  position: relative; transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__right { display: flex; align-items: center; gap: 1.6rem; }
.nav__lang { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.15em; color: var(--muted); cursor: default; }
.nav__lang sup { color: var(--gold); }
.nav__cta {
  font-size: 0.85rem; padding: 0.55rem 1.2rem;
  border: 1px solid var(--line); border-radius: 999px;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.nav__cta:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(201,162,78,0.06); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem var(--pad-x) 5rem;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__content { position: relative; z-index: 2; max-width: 1200px; }
.hero__kicker { color: var(--gold); margin-bottom: 1.6rem; min-height: 1.2em; }
.hero__title {
  font-size: clamp(4.5rem, 17vw, 15rem);
  font-weight: 300; line-height: 0.92;
  letter-spacing: -0.02em;
  display: flex; align-items: baseline;
  margin-left: -0.06em;
}
.hero__title-line { display: inline-block; }
.hero__title-sup {
  display: inline-block;
  font-size: 0.14em; color: var(--gold);
  margin-left: 0.15em; align-self: flex-start;
  transform: translateY(1.2em);
}
.hero__tagline {
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  margin-top: 2.2rem; font-weight: 300;
}
.hero__sub {
  color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin-top: 1.1rem;
}
.hero__actions { display: flex; gap: 1.2rem; margin-top: 2.8rem; flex-wrap: wrap; }
.hero__footnote { color: var(--muted); margin-top: 1rem; opacity: 0.7; text-transform: none; letter-spacing: 0.08em; }
.hero__scrollcue {
  position: absolute; bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  color: var(--muted); z-index: 2;
}
.hero__scrollcue-line {
  width: 1px; height: 52px; background: var(--line);
  position: relative; overflow: hidden;
}
.hero__scrollcue-line::after {
  content: ""; position: absolute; top: -50%; left: 0;
  width: 100%; height: 50%; background: var(--gold);
  animation: scrollcue 2.2s var(--ease-luxe) infinite;
}
@keyframes scrollcue {
  0% { top: -50%; } 60%, 100% { top: 110%; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.95rem 2.2rem; border-radius: 999px;
  font-family: var(--font-display); font-size: 0.95rem;
  transition: background 0.35s, color 0.35s, border-color 0.35s, box-shadow 0.35s;
  will-change: transform;
}
.btn--solid { background: var(--gold); color: #14110a; font-weight: 400; }
.btn--solid:hover { background: var(--gold-bright); box-shadow: 0 8px 40px rgba(201, 162, 78, 0.25); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn--ghost sup { color: var(--gold); }

/* ---------- 通用 section ---------- */
.section { padding: var(--pad-y) var(--pad-x); position: relative; }
.section__label {
  color: var(--muted); margin-bottom: 3.2rem;
  display: flex; align-items: center; gap: 0.9rem;
}
.section__label span { color: var(--gold); }
.section__label::after { content: ""; flex: 0 0 64px; height: 1px; background: var(--line); }
.section__title {
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  font-weight: 300; line-height: 1.2;
  margin-bottom: 4.5rem;
}

.divider {
  height: 1px; margin: 0 var(--pad-x);
  background: var(--line);
  transform-origin: left;
  transition: transform 1.6s var(--ease-luxe);
}
.js .divider { transform: scaleX(0); }
.divider.is-inview { transform: scaleX(1); }

/* ---------- 愿景 ---------- */
.manifesto__text {
  font-size: clamp(1.55rem, 3.3vw, 2.9rem);
  line-height: 1.75; font-weight: 300;
  max-width: 23em;
}
.js .manifesto__text .split-char {
  display: inline-block;
  opacity: 0.08;
  transform: translateY(0.35em);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.manifesto__text.is-inview .split-char { opacity: 1; transform: translateY(0); }
.manifesto__sign {
  margin-top: 4rem; display: flex; align-items: center; gap: 1.4rem;
  color: var(--muted); font-size: 0.95rem;
}
.manifesto__sign em { font-size: 0.85em; }
.manifesto__sign-mark {
  font-family: var(--font-mono); font-size: 2.4rem; color: var(--gold);
  border: 1px solid var(--line); border-radius: 50%;
  width: 72px; height: 72px; flex: 0 0 72px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 影响 / 数据 ---------- */
.metrics__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 3rem 2rem;
}
.metric { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.metric__value {
  font-size: clamp(3.4rem, 7vw, 6.2rem);
  font-weight: 300; line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
  min-height: 1em;
}
.metric:hover .metric__value { color: var(--gold-bright); }
.metric__value { transition: color 0.4s; }
.metric__label { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }
.metric__label sup { color: var(--gold); }
.metrics__footnote { color: var(--muted); margin-top: 3.5rem; opacity: 0.75; text-transform: none; letter-spacing: 0.06em; }

/* ---------- 产品 ---------- */
.products__list { list-style: none; border-top: 1px solid var(--line); }
.product {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto 40px;
  align-items: center; gap: 2rem;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer; overflow: hidden;
}
.product::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(201, 162, 78, 0.07), transparent 70%);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.7s var(--ease-luxe);
}
.product:hover::before { transform: scaleX(1); }
.product__index { color: var(--muted); transition: color 0.4s, transform 0.5s var(--ease-out); position: relative; }
.product:hover .product__index { color: var(--gold); transform: translateX(8px); }
.product__body { position: relative; }
.product__name {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 300;
  transition: transform 0.5s var(--ease-out), color 0.4s;
}
.product:hover .product__name { transform: translateX(10px); color: var(--gold-bright); }
.product__name sup { color: var(--gold); }
.product__desc { color: var(--muted); margin-top: 0.5rem; font-size: 0.98rem; max-width: 34em; }
.product__status {
  color: var(--muted); border: 1px solid var(--line);
  padding: 0.45rem 1rem; border-radius: 999px;
  white-space: nowrap; position: relative;
  transition: color 0.4s, border-color 0.4s;
}
.product:hover .product__status { color: var(--gold-bright); border-color: rgba(201,162,78,0.5); }
.product__arrow {
  font-size: 1.3rem; color: var(--gold);
  opacity: 0; transform: translateX(-14px);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
  position: relative;
}
.product:hover .product__arrow { opacity: 1; transform: translateX(0); }

/* ---------- 媒体跑马灯 ---------- */
.press { padding: var(--pad-y) 0; overflow: hidden; }
.press .section__label { padding: 0 var(--pad-x); }
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 2.6rem 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: inline-flex; align-items: baseline;
  white-space: nowrap; width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee__item {
  font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-style: italic;
  padding-right: 1.2rem;
}
.marquee__item i {
  font-family: var(--font-mono); font-style: normal;
  font-size: 0.68rem; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase;
}
.marquee__item::after {
  content: "∅"; font-style: normal; color: var(--gold);
  padding: 0 2.6rem 0 1.6rem; font-size: 0.8em;
}

/* ---------- CTA ---------- */
.cta { text-align: center; overflow: hidden; }
.cta .section__label { justify-content: center; }
.cta .section__label::after { display: none; }
.cta__glow {
  position: absolute; left: 50%; top: 55%;
  width: min(720px, 90vw); height: min(720px, 90vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201, 162, 78, 0.13) 0%, transparent 62%);
  animation: glow-drift 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glow-drift {
  from { transform: translate(-54%, -52%) scale(1); }
  to   { transform: translate(-46%, -48%) scale(1.12); }
}
.cta__title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 300; line-height: 1.25;
  position: relative;
}
.cta__form {
  margin: 3.4rem auto 0;
  display: flex; justify-content: center; align-items: stretch;
  gap: 1rem; max-width: 560px; position: relative;
}
.cta__input {
  flex: 1; min-width: 0;
  background: transparent; border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink); font-family: var(--font-mono);
  font-size: 0.95rem; padding: 0.9rem 0.2rem;
  outline: none; transition: border-color 0.4s;
  border-radius: 0;
}
.cta__input::placeholder { color: var(--muted); }
.cta__input:focus { border-color: var(--gold); }
.cta__button { flex: 0 0 auto; }
.cta__button.is-success { background: transparent; border: 1px solid var(--gold); color: var(--gold-bright); }
.cta__note { color: var(--muted); margin-top: 1.6rem; opacity: 0.75; text-transform: none; letter-spacing: 0.06em; position: relative; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 4.5rem var(--pad-x) 2rem;
  position: relative; overflow: hidden;
  background: var(--bg-2);
}
.footer__terminal {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0.9rem 1.3rem; color: var(--muted);
  font-size: 0.78rem; letter-spacing: 0.06em; text-transform: none;
  background: rgba(0, 0, 0, 0.3);
  min-width: min(460px, 100%);
  min-height: 3.2rem;
  margin-bottom: 4rem;
}
.footer__prompt { color: var(--gold); }
.footer__caret {
  display: inline-block; width: 8px; height: 1.05em;
  background: var(--gold); vertical-align: text-bottom;
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.footer__grid {
  display: grid; grid-template-columns: repeat(3, minmax(140px, 200px));
  gap: 2.5rem; margin-bottom: 5rem;
}
.footer__col { display: flex; flex-direction: column; gap: 0.85rem; }
.footer__col h4 { color: var(--gold); font-weight: 500; margin-bottom: 0.5rem; }
.footer__col a { color: var(--muted); font-size: 0.92rem; width: fit-content; position: relative; transition: color 0.3s; }
.footer__col a:hover { color: var(--ink); }
.footer__col a[data-undefined]::after {
  content: "→ 未定义";
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%) translateX(-6px);
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.12em; color: var(--gold);
  opacity: 0; transition: opacity 0.3s, transform 0.4s var(--ease-out);
  white-space: nowrap;
}
.footer__col a[data-undefined]:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.footer__giant {
  font-size: clamp(5rem, 21vw, 20rem);
  font-weight: 300; line-height: 0.85; letter-spacing: -0.02em;
  text-align: center; user-select: none;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 231, 223, 0.16);
  transition: color 1.2s var(--ease-out);
  margin-bottom: 3rem;
}
.footer__giant:hover { color: rgba(201, 162, 78, 0.08); }
.footer__giant sup { -webkit-text-stroke: 1px rgba(201, 162, 78, 0.4); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--muted); border-top: 1px solid var(--line);
  padding-top: 1.6rem; text-transform: none; letter-spacing: 0.08em;
  font-size: 0.68rem;
}

/* ---------- 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-inview { opacity: 1; transform: translateY(0); }

/* HERO 字符入场 */
.js .hero__title [data-hero-char] {
  opacity: 0; transform: translateY(0.35em) rotate(2deg);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.hero__title.is-inview [data-hero-char] { opacity: 1; transform: translateY(0) rotate(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .metrics__grid { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 0.8rem 1.2rem; }
  .product__status { grid-column: 2; justify-self: start; }
  .product__arrow { display: none; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav__lang { display: none; }
  .metrics__grid { grid-template-columns: 1fr 1fr; gap: 2.2rem 1.4rem; }
  .cta__form { flex-direction: column; }
  .cta__input { text-align: center; }
  .hero__scrollcue { display: none; }
  .footer__bottom { justify-content: center; text-align: center; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], .hero__title [data-hero-char], .manifesto__text .split-char { opacity: 1; transform: none; }
  .divider { transform: scaleX(1); }
  .cursor, .cursor-ring { display: none; }
}
