/* ============================================================
   清醒梦 LUCID — 对照组(推翻重来版)
   Skills applied:
   - webgl-3d-object       (hero 梦境核心:真实几何 + PBR + 灯光)
   - gooey-blob-system     (深梦层:SVG filter 融合流体)
   - cinematic-gsap-lenis-motion-system (Lenis / 遮罩揭示 / 视差 / 磁吸 / 光标)
   - animation-systems     (动效基调:克制、编排序列、hover lift+glow)
   叙事装置:滚动驱动「昼 → 夜 → 昼」的世界变化 + 深度计
   ============================================================ */

:root {
  --dawn: #f1ece2;
  --dusk: #4a4172;
  --night: #0c0a1c;
  --ink: #1d1932;
  --ink-dim: rgba(29, 25, 50, 0.6);
  --ink-faint: rgba(29, 25, 50, 0.35);
  --line: rgba(29, 25, 50, 0.16);
  --night-ink: #e9e5f7;
  --night-dim: rgba(233, 229, 247, 0.6);
  --night-faint: rgba(233, 229, 247, 0.32);
  --night-line: rgba(233, 229, 247, 0.14);
  --accent: #5b4bd6;
  --accent-soft: #a78bfa;
  --display: "Noto Serif SC", serif;
  --en: "Cormorant Garamond", serif;
  --sans: "Space Grotesk", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

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

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

::selection { background: var(--accent); color: #fff; }

.mono {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

/* ---------- 自定义光标(difference 混合,昼夜自适应) ---------- */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.35s, height 0.35s;
}

.cursor span {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: #000;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.25s;
}

.cursor.is-active { width: 64px; height: 64px; }
.cursor.is-active span { opacity: 1; }

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .cursor { display: none; }
}

/* ---------- 导航(difference 混合,随世界变色) ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3vw;
  mix-blend-mode: difference;
  color: #fff;
}

.nav__logo {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  display: flex;
  align-items: baseline;
  gap: 0.7em;
}

.nav__logo .mono { opacity: 0.6; font-size: 0.62rem; }

.nav__links { display: flex; gap: 2.4rem; }

.nav__links a { opacity: 0.65; transition: opacity 0.35s; }
.nav__links a:hover { opacity: 1; }

.nav__cta {
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0.55em 1.3em;
  display: inline-block;
  transition: background 0.35s, color 0.35s;
}

.nav__cta:hover { background: #fff; color: #000; }

/* ---------- 深度计 ---------- */

.gauge {
  position: fixed;
  right: 2.2vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  mix-blend-mode: difference;
  color: #fff;
  pointer-events: none;
}

.gauge__label {
  writing-mode: vertical-rl;
  letter-spacing: 0.3em;
  opacity: 0.85;
}

.gauge__track {
  width: 1px;
  height: 26vh;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
}

.gauge__track i {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  transform: scaleY(0);
  transform-origin: top;
}

/* ---------- 动效基础(cinematic skill) ---------- */

html.has-motion [data-motion-text],
html.has-motion [data-reveal],
html.has-motion [data-reveal-item],
html.has-motion [data-hero-fade] {
  visibility: hidden;
}

.motion-line-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.motion-line {
  display: inline-block;
  will-change: transform, opacity;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-block;
  border: 1px solid currentColor;
  padding: 1em 2.6em;
  transition: background 0.4s, color 0.4s, border-color 0.4s, box-shadow 0.4s;
  will-change: transform;
}

.hero .btn:hover, .visit .btn:hover {
  background: var(--ink);
  color: var(--dawn);
  box-shadow: 0 12px 32px rgba(29, 25, 50, 0.25);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--dawn);
  box-shadow: 0 12px 32px rgba(29, 25, 50, 0.25);
}

/* ---------- HERO:清醒(昼) ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6vw;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 4vw;
  width: 100%;
}

.hero__kicker { color: var(--accent); margin-bottom: 2.8rem; }

.hero__title {
  font-family: var(--display);
  font-size: clamp(4.5rem, 12vw, 10.5rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero__en {
  font-family: var(--en);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  color: var(--ink-dim);
  margin-bottom: 2rem;
}

.hero__sub {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  margin-bottom: 2.4rem;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 1.4em;
  color: var(--ink-dim);
  margin-bottom: 3rem;
}

.hero__meta i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.hero__core {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  justify-self: center;
  width: 100%;
  will-change: transform;
}

.hero__core canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__footnote {
  position: absolute;
  bottom: 2rem;
  left: 6vw;
  right: 6vw;
  display: flex;
  justify-content: space-between;
  color: var(--ink-faint);
}

/* ---------- 下潜:昼 → 夜(滚动驱动的世界变化) ---------- */

.descent {
  position: relative;
  height: 175vh;
  background: linear-gradient(180deg, var(--dawn) 0%, var(--dusk) 42%, var(--night) 78%, var(--night) 100%);
  background-size: 100% 240%;
  background-position: 50% 0%;
}

/* sticky 全屏文案:世界变色时,这句话停留在原地 */
.descent__line {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.5;
  text-align: center;
  color: #fff;
  mix-blend-mode: difference;
}

.descent__markers {
  position: absolute;
  inset: 0;
  list-style: none;
}

.descent__markers li {
  position: absolute;
  left: 6vw;
  color: #fff;
  mix-blend-mode: difference;
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: 1em;
}

.descent__markers li::before {
  content: "";
  width: 3em;
  height: 1px;
  background: currentColor;
}

/* ---------- 梦境:夜 ---------- */

.dream {
  background: var(--night);
  color: var(--night-ink);
  padding: 14vh 6vw 10vh;
}

.layer {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5vw;
  padding: 8vh 0;
}

.layer--flip .layer__head { order: 2; }
.layer--flip .layer__copy { order: 1; }

.layer__no {
  color: var(--accent-soft);
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 1.6rem;
}

.layer__no::before {
  content: "";
  width: 3em;
  height: 1px;
  background: var(--accent-soft);
}

.layer__title {
  font-family: var(--display);
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 1.15;
}

.layer__en {
  font-family: var(--en);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  color: var(--night-dim);
  margin-top: 0.8rem;
}

.layer__copy {
  max-width: 30em;
  color: var(--night-dim);
  font-size: clamp(0.95rem, 1.25vw, 1.1rem);
  position: relative;
  z-index: 2;
}

.layer__visual { position: absolute; pointer-events: none; z-index: 1; }

/* 浅眠:上浮的微光粒子(置于标题侧,避免压住正文) */
.layer__visual--float {
  left: 6vw;
  bottom: 6vh;
  width: 40vmin;
  height: 60vmin;
}

.layer__visual--float i {
  position: absolute;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: 0;
  animation: rise 7s ease-in infinite;
}

.layer__visual--float i:nth-child(1) { left: 12%; animation-delay: 0s; }
.layer__visual--float i:nth-child(2) { left: 30%; animation-delay: 1.4s; width: 4px; height: 4px; }
.layer__visual--float i:nth-child(3) { left: 48%; animation-delay: 2.8s; }
.layer__visual--float i:nth-child(4) { left: 63%; animation-delay: 0.9s; width: 3px; height: 3px; }
.layer__visual--float i:nth-child(5) { left: 78%; animation-delay: 2.1s; width: 5px; height: 5px; }
.layer__visual--float i:nth-child(6) { left: 90%; animation-delay: 3.6s; width: 3px; height: 3px; }

@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  12% { opacity: 0.9; }
  100% { transform: translateY(-52vmin) scale(0.4); opacity: 0; }
}

/* 深梦:gooey 融合流体(gooey-blob-system skill),置于标题侧 */
.goo-field {
  right: 2vw;
  top: 50%;
  transform: translateY(-50%);
  width: 44vmin;
  height: 44vmin;
  filter: url(#goo);
  opacity: 0.85;
}

.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.b1 { width: 46%; height: 46%; left: 8%; top: 22%; background: #6a5ae0; animation: drift1 9s ease-in-out infinite; }
.b2 { width: 38%; height: 38%; left: 44%; top: 8%; background: #a78bfa; animation: drift2 11s ease-in-out infinite; }
.b3 { width: 34%; height: 34%; left: 50%; top: 48%; background: #5b4bd6; animation: drift3 10s ease-in-out infinite; }
.b4 { width: 26%; height: 26%; left: 22%; top: 58%; background: #c4b5fd; animation: drift1 12s ease-in-out infinite reverse; }
.b5 { width: 20%; height: 20%; left: 62%; top: 30%; background: #8b7cf6; animation: drift2 8s ease-in-out infinite reverse; }

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(26%, -18%); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-24%, 22%); }
}

@keyframes drift3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-14%, -26%); }
}

/* 清醒梦:虹膜(从标题左缘探出,瞳孔藏于屏外) */
.layer__visual--iris {
  left: -20vw;
  opacity: 0.75;
  top: 50%;
  width: 42vmin;
  height: 42vmin;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, #0c0a1c 0 16%, transparent 16.5%),
    repeating-conic-gradient(from 0deg, rgba(167, 139, 250, 0.5) 0deg 4deg, transparent 4deg 9deg),
    radial-gradient(circle, rgba(106, 90, 224, 0.4), transparent 62%);
  -webkit-mask-image: radial-gradient(circle, transparent 0 15%, #000 15.5%);
  mask-image: radial-gradient(circle, transparent 0 15%, #000 15.5%);
  animation: iris-spin 26s linear infinite;
}

@keyframes iris-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .layer__visual--float i,
  .blob,
  .layer__visual--iris { animation: none; }
}

/* ---------- 碎片:作品网格(视差漂浮) ---------- */

.fragments {
  background: var(--night);
  color: var(--night-ink);
  padding: 12vh 6vw 18vh;
  border-top: 1px solid var(--night-line);
}

.fragments__head { margin-bottom: 9vh; }

.fragments__label { color: var(--accent-soft); display: block; margin-bottom: 1.4rem; }

.fragments__title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.2;
  margin-bottom: 1.6rem;
}

.fragments__meta { color: var(--night-faint); }

.fragments__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10vh 5vw;
}

.work {
  border: 1px solid var(--night-line);
  background: rgba(233, 229, 247, 0.03);
  transition: border-color 0.45s, box-shadow 0.45s, transform 0.45s;
  will-change: transform;
}

.work:nth-child(even) { margin-top: 12vh; }

.work:hover {
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(167, 139, 250, 0.25);
  transform: translateY(-6px);
}

.work__art {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
}

.work__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 10, 28, 0.5), transparent 45%);
}

.work__info { padding: 1.4rem 1.5rem 1.6rem; }

.work__info .mono { color: var(--accent-soft); display: block; margin-bottom: 0.7rem; }

.work__info h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.work__info p { color: var(--night-dim); font-size: 0.66rem; }

/* 梦境碎片:纯 CSS 生成艺术(暮紫系) */
.art-1 { background: linear-gradient(180deg, #191233 0%, #3b2d7a 45%, #a78bfa 78%, #e9e5f7 100%); }
.art-2 { background: radial-gradient(ellipse 120% 60% at 50% 110%, #c4b5fd 0%, #6a5ae0 38%, #14102a 78%); }
.art-3 { background:
    radial-gradient(circle at 50% 50%, transparent 0 22%, rgba(167, 139, 250, 0.7) 22.5% 23%, transparent 23.5% 38%, rgba(167, 139, 250, 0.45) 38.5% 39%, transparent 39.5% 56%, rgba(167, 139, 250, 0.25) 56.5% 57%, transparent 57.5%),
    #100d24; }
.art-4 { background:
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(196, 181, 253, 0.35) 26px 27px),
    linear-gradient(160deg, #14102a 20%, #4a4172 70%, #6a5ae0); }
.art-5 { background: linear-gradient(200deg, #0c0a1c 30%, #3b2d7a 60%, #a78bfa 88%, #f1ece2 100%); }
.art-6 { background:
    radial-gradient(circle at 30% 28%, rgba(196, 181, 253, 0.8), transparent 34%),
    radial-gradient(circle at 72% 60%, rgba(106, 90, 224, 0.75), transparent 40%),
    radial-gradient(circle at 45% 85%, rgba(167, 139, 250, 0.5), transparent 32%),
    #14102a; }

/* ---------- 破晓:夜 → 昼 ---------- */

.dawn-break {
  height: 135vh;
  background: linear-gradient(180deg, var(--night) 0%, var(--dusk) 42%, var(--dawn) 82%, var(--dawn) 100%);
  background-size: 100% 240%;
  background-position: 50% 0%;
}

.dawn-break__line {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.4rem, 6.5vw, 5.4rem);
  line-height: 1.5;
  text-align: center;
  color: #fff;
  mix-blend-mode: difference;
}

/* ---------- 醒来 VISIT(昼) ---------- */

.visit {
  background: var(--dawn);
  color: var(--ink);
  padding: 16vh 6vw 14vh;
}

.visit__label { color: var(--accent); display: block; margin-bottom: 1.4rem; }

.visit__title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.3;
  margin-bottom: 2rem;
}

.visit__note {
  max-width: 34em;
  color: var(--ink-dim);
  margin-bottom: 9vh;
}

.visit__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 6vw;
  align-items: start;
}

.visit__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.visit__row:last-child { border-bottom: 1px solid var(--line); }

.visit__row dt { color: var(--ink-faint); padding-top: 0.3em; }

.visit__tickets { display: flex; flex-direction: column; gap: 1rem; }

.ticket {
  border: 1px solid var(--line);
  padding: 1.5rem 1.7rem;
  position: relative;
  transition: border-color 0.45s, box-shadow 0.45s, transform 0.45s;
  background: rgba(255, 255, 255, 0.35);
}

.ticket:hover {
  border-color: rgba(91, 75, 214, 0.55);
  box-shadow: 0 16px 40px rgba(29, 25, 50, 0.12);
  transform: translateY(-4px);
}

.ticket--featured { border-color: var(--accent); background: rgba(91, 75, 214, 0.07); }

.ticket__tag {
  position: absolute;
  top: -0.65em;
  left: 1.4rem;
  background: var(--accent);
  color: #fff;
  padding: 0.15em 0.8em;
  font-size: 0.6rem;
}

.ticket__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.ticket__name { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.04em; }

.ticket__name small {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 0.3em;
}

.ticket__price {
  font-family: var(--en);
  font-style: italic;
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
}

.ticket__price small { font-size: 1rem; margin-right: 0.1em; }

.visit__tickets .btn { text-align: center; margin-top: 0.6rem; }

/* ---------- FOOTER ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 3vw;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  background: var(--dawn);
}

/* ---------- 展示字重(Noto Serif SC) ---------- */

.nav__logo,
.hero__title,
.layer__title,
.fragments__title,
.visit__title { font-weight: 900; }

.hero__sub,
.work__info h3,
.ticket__name { font-weight: 600; }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .nav__links { display: none; }
  .gauge { display: none; }

  .hero__inner { grid-template-columns: 1fr; gap: 0; }
  .hero__core {
    order: -1;
    max-width: 240px;
    margin: 0 auto 2rem;
  }
  .hero { text-align: center; }
  .hero__meta { justify-content: center; }

  .layer { grid-template-columns: 1fr; gap: 2rem; min-height: auto; padding: 10vh 0; }
  .layer--flip .layer__head { order: 0; }
  .layer--flip .layer__copy { order: 0; }
  .layer__visual { opacity: 0.55; }
  .goo-field { left: auto; right: 0; }

  .fragments__grid { grid-template-columns: 1fr; gap: 6vh; }
  .work:nth-child(even) { margin-top: 0; }

  .visit__grid { grid-template-columns: 1fr; gap: 8vh; }
  .visit__row { grid-template-columns: 1fr; gap: 0.5rem; }

  .footer { flex-direction: column; gap: 0.5rem; }
}
