/* ============================================================
   岚 — CG ARTIST Portfolio
   Scroll-based layout with dark immersive theme
   ============================================================ */

:root {
  /* ===== 基础层：白黑灰 ===== */
  --bg-base:      #F7F7F5;   /* 暖白 — 页面根背景 */
  --bg-surface:   #FFFFFF;    /* 纯白 — 表面 */
  --bg-elevated:  #EFEFEC;    /* 浅灰 — 卡片、面板 */
  --bg-dark:      #0F0F0F;    /* 深黑 — hero/footer */

  /* ===== 多色强调系统 ===== */
  --accent-blue:   #0066FF;
  --accent-green:  #2E7D32;
  --accent-orange: #FF6B00;

  /* 默认强调色：科技蓝（通过 --accent-rgb 实现 section 级动态覆盖） */
  --accent-rgb:        0, 212, 255;
  --accent:            rgb(var(--accent-rgb));
  --accent-87:         rgba(var(--accent-rgb), .87);
  --accent-60:         rgba(var(--accent-rgb), .6);
  --accent-50:         rgba(var(--accent-rgb), .5);
  --accent-45:         rgba(var(--accent-rgb), .45);
  --accent-20:         rgba(var(--accent-rgb), .2);
  --accent-15:         rgba(var(--accent-rgb), .15);
  --accent-12:         rgba(var(--accent-rgb), .12);
  --accent-10:         rgba(var(--accent-rgb), .1);
  --accent-08:         rgba(var(--accent-rgb), .08);
  --accent-06:         rgba(var(--accent-rgb), .06);
  --accent-05:         rgba(var(--accent-rgb), .05);

  /* ===== 文字层级（浅色模式黑色透明度） ===== */
  --text-primary:   rgba(0, 0, 0, .87);
  --text-secondary: rgba(0, 0, 0, .60);
  --text-tertiary:  rgba(0, 0, 0, .38);
  --text-inverse:   #FFFFFF;                  /* 反色（深色背景上） */

  /* ===== 边框与分割线 ===== */
  --border:         rgba(0, 0, 0, .08);
  --border-hover:   var(--accent-12);
  --border-accent:  var(--accent-15);

  /* ===== 功能色 ===== */
  --success: #34A853;
  --warning: #FFAA00;
  --error:   #FF4D4F;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent-15);
  color: var(--text-inverse);
}

/* ── Utilities ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5vw;
  position: relative;
  z-index: 1;
}

.section {
  padding: 12vh 0;
  position: relative;
  overflow: hidden;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--accent-87);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 3rem;
  letter-spacing: .02em;
}

/* ── HERO ── */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 暖灰白基底 */
  background: #e6e4df;
}

/* 背景曲面层 — 极 subtle 的径向渐变 */
.hero-neu-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* 中心稍亮、边缘稍暗 = 极淡的凹陷感 */
  background: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    #eceae5 0%,
    #e8e6e2 60%,
    #e2e0db 100%
  );
}

/* 顶光照明层 — 减弱 */
.hero-lighting {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.03) 75%,
    rgba(0, 0, 0, 0.08) 100%
  );
}

/* L形外框 — 只保留上边框和左边框，往右下偏移半个屏幕 */
.hero-well {
  position: absolute;
  z-index: 2;
  /* 往下偏移半个屏幕，占据下半区 */
  top: 50vh;
  left: 18vw;
  right: 0;
  bottom: 0;
  /* 只保留上、左边框 */
  border-top: 20px solid rgba(255, 255, 255, 0.95);
  border-left: 20px solid rgba(255, 255, 255, 0.95);
  border-right: none;
  border-bottom: none;
  border-radius: 12px 0 0 0;
  box-shadow:
    /* 上边框高光 */
    0 -10px 20px rgba(255, 255, 255, 0.80),
    /* 左边框高光 */
    -10px 0 20px rgba(255, 255, 255, 0.80),
    /* 外框暗阴影 */
    20px 32px 60px rgba(140, 135, 125, 0.28);
  pointer-events: none;
}

  /* 旋转180°的L形 — 只保留下边框和右边框，贴着屏幕上边缘 */
  .hero-well-reverse {
    position: absolute;
    z-index: 3;
    /* 往下偏移四分之一个屏幕 */
    top: 0;
    right: 0;
    left: 0;
    bottom: 25vh;
    /* 只保留下、右边框 */
    border-bottom: 20px solid rgba(255, 255, 255, 0.95);
    border-right: 20px solid rgba(255, 255, 255, 0.95);
    border-top: none;
    border-left: none;
    border-radius: 0 0 12px 0;
    box-shadow:
      /* 下边框高光 */
      0 10px 20px rgba(255, 255, 255, 0.80),
      /* 右边框高光 */
      10px 0 20px rgba(255, 255, 255, 0.80),
      /* 外框暗阴影 */
      -20px 32px 60px rgba(140, 135, 125, 0.28);
    pointer-events: none;
  }

/* Logo — 放在L形拐角内侧，不与线条重叠 */
.hero-brand {
  position: absolute;
  /* 在下方L形拐角内侧，避开20px粗边框 */
  top: calc(50vh + 40px);
  left: calc(18vw + 40px);
  z-index: 3;
}

.hero-logo {
  display: block;
  width: 80px;
  height: 80px;
  /* 纯白色 */
  filter: brightness(0) invert(1)
          drop-shadow(0 0 12px rgba(255, 255, 255, 0.30));
  transition: filter 0.4s ease;
}

/* 内容区域 — 在L形中间 */
.hero-content-well {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 500px;
  width: 100%;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 4rem;
}

/* 内框 — 已移除（改为L形构图） */
.well-inner-frame { display: none; }

/* 中间十字交叉线 — 已移除（改为L形构图） */
.well-cross-h { display: none; }
.well-cross-v { display: none; }

.hero-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.7rem, 1.2vw, .9rem);
  letter-spacing: .4em;
  text-transform: uppercase;
  /* 紫罗兰色 */
  color: rgba(139, 92, 246, 0.75);
  margin-bottom: 1.2rem;
}

.hero-desc {
  font-size: .9rem;
  color: rgba(0, 0, 0, 0.45);
  max-width: 40ch;
  line-height: 1.8;
  margin: 0;
}

.scroll-hint {
  position: absolute;
  bottom: 4vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: rgba(0, 0, 0, 0.30);
}

.scroll-hint span {
  font-size: 10px;
  letter-spacing: .2em;
  font-family: 'JetBrains Mono', monospace;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-20), transparent);
}

/* ── ABOUT ── */
.about {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6vw;
  align-items: center;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.about-media {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/5;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s ease;
}

.about-media:hover img {
  transform: scale(1.03);
}

/* ── R&D ── */
.rd {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
}

.rd-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4vw;
  align-items: center;
}

.rd-visual {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: 0 20px 50px rgba(0,0,0,.15);
}

.rd-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rd-info h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  margin-bottom: .5rem;
}

.rd-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--accent-87);
  margin-bottom: 1rem;
}

.rd-desc {
  color: var(--text-tertiary);
  font-size: .9rem;
  line-height: 1.8;
  max-width: 45ch;
}

/* ── WORKS ── */
.works {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.work-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}


.work-video {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
}

.work-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.work-card:hover .work-video video {
  transform: scale(1.03);
}

.work-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity .3s ease;
  font-size: 2rem;
  color: var(--text-primary);
}

.work-video:hover .work-play {
  opacity: 1;
}

.work-info {
  padding: 1.2rem 1.5rem;
}

.work-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .25rem;
}

.work-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--accent-87);
  margin-bottom: .5rem;
}

.work-desc {
  font-size: .8rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* ── Section-specific grids ── */
.commercial .works-grid,
.live-canvas .works-grid {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
}

.render-challenge .works-grid,
.vfx .works-grid {
  grid-template-columns: repeat(2, 1fr);
}
.render-challenge .work-card:first-child,
.vfx .work-card:first-child {
  grid-column: 1 / -1;
}

.aigc .works-grid {
  grid-template-columns: 1.25fr 1fr;
}

/* Featured cards: cinematic aspect */
.commercial .work-card .work-video,
.live-canvas .work-card .work-video,
.render-challenge .work-card:first-child .work-video,
.vfx .work-card:first-child .work-video {
  aspect-ratio: 21/9;
}

/* Hover glow */
.work-card:hover {
  border-color: var(--accent-15);
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px var(--accent-08),
    0 0 60px var(--accent-05),
    0 15px 40px rgba(0,0,0,.12);
}

/* ── NEW SECTIONS ── */
.commercial {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  --accent-rgb: 255, 107, 0;
}
.render-challenge {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
}
.vfx {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.aigc {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  --accent-rgb: 52, 168, 83;
}
.live-canvas {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

/* ── Ambient background orbs ── */
.section:not(.hero)::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-05), transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: orbDrift 20s ease-in-out infinite;
}

.section:not(.hero):nth-of-type(odd)::before {
  top: -20%;
  right: -10%;
}

.section:not(.hero):nth-of-type(even)::before {
  bottom: -20%;
  left: -10%;
  animation-delay: -10s;
  background: radial-gradient(circle, rgba(100,255,180,.03), transparent 70%);
}

@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 20px) scale(1.08); }
}

/* ── GALLERY ── */
.gallery {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform .4s ease, box-shadow .4s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 60px var(--accent-10),
    0 15px 40px rgba(0,0,0,.12);
}

/* Scan line sweep */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, var(--accent-08) 45%, rgba(0,0,0,.08) 50%, var(--accent-08) 55%, transparent 62%);
  transform: translateX(-100%);
  transition: transform .8s ease;
  pointer-events: none;
  z-index: 3;
}

.gallery-item:hover::after {
  transform: translateX(100%);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform .6s ease, filter .4s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(.72);
}

/* Title area — always visible */
.gallery-caption {
  display: block;
  padding: 1rem 1.25rem 1.1rem;
  background: rgba(0,0,0,.04);
  border-top: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 1;
  transform: none;
  transition: color .3s ease;
}

.gallery-item:hover .gallery-caption {
  color: var(--text-primary);
}

/* ── EXPERIENCE ── */
.experience {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 800px;
}

.tl-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left .3s ease;
}

.tl-item:hover {
  padding-left: .5rem;
}

.tl-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--accent-60);
}

.tl-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tl-desc {
  font-size: .8rem;
  color: var(--text-tertiary);
}

.tl-tag {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .1em;
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ── FOOTER ── */
.footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: 8vh 0 6vh;
  text-align: center;
}

.footer-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: .1em;
  margin-bottom: .5rem;
}

.footer-logo {
  display: block;
  max-height: clamp(2rem, 5vw, 3.5rem);
  width: auto;
  margin: 0 auto .5rem;
}

.footer-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-50), var(--accent-20));
  margin: 0 auto 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: .85rem;
  color: var(--text-tertiary);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  transition: color .3s ease;
}

.footer-links a:hover {
  color: var(--accent-87);
}

.footer-copy {
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: .15em;
  font-family: 'JetBrains Mono', monospace;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(245,245,240,.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transform: scale(0.96);
  transition: transform .4s cubic-bezier(0.2, 0, 0, 1);
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
}

.lightbox-close:hover {
  background: rgba(0,0,0,.08);
  border-color: var(--accent-20);
  color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,.35);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .about-grid,
  .rd-grid {
    grid-template-columns: 1fr;
  }
  .about-media {
    aspect-ratio: 16/9;
  }
  .works-grid,
  .render-challenge .works-grid,
  .vfx .works-grid,
  .aigc .works-grid {
    grid-template-columns: 1fr;
  }
  .render-challenge .work-card:first-child,
  .vfx .work-card:first-child {
    grid-column: auto;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .tl-item {
    grid-template-columns: 60px 1fr;
  }
  .tl-tag {
    grid-column: 2;
    justify-self: start;
  }
  /* Mobile: revert featured aspect */
  .commercial .work-card .work-video,
  .live-canvas .work-card .work-video,
  .render-challenge .work-card:first-child .work-video,
  .vfx .work-card:first-child .work-video {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 8vh 0;
  }
  .hero {
    padding-bottom: 6vh;
  }
}

/* ============================================================
   Loader — 5-step geometric reveal animation
   ============================================================ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0c1220;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loaderVanish 0.6s 2.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.loader-plane {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  will-change: transform, width, height, opacity;
}

.loader-plane--left {
  animation: planeLeft 2.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.loader-plane--right {
  animation: planeRight 2.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

/* ── Step 1-2: 全屏黑屏 → 两个光影平面 ── */
@keyframes planeLeft {
  0%, 20% {
    width: 200vmax;
    height: 200vmax;
    transform: translate(-50%, -50%) rotate(0deg);
    background: #000;
    box-shadow: none;
    border-color: transparent;
  }

  /* Step 2: 收缩成带光影的垂直平面，向左偏移 */
  50% {
    width: 14vw;
    height: 65vh;
    transform: translate(-50%, -50%) translateX(-8vw) rotate(0deg);
    background: linear-gradient(160deg,
      rgba(0,102,255,0.22) 0%,
      rgba(20,40,80,0.55) 35%,
      rgba(0,102,255,0.12) 100%);
    box-shadow:
      0 0 10px rgba(0,150,255,0.8),
      0 0 30px rgba(0,102,255,0.5),
      0 0 80px rgba(0,102,255,0.2),
      inset 0 0 20px rgba(0,150,255,0.15);
    border: 2px solid rgba(0,180,255,0.7);
  }

  /* Step 3: 平面缩成正方形 */
  70% {
    width: 14vw;
    height: 14vw;
    transform: translate(-50%, -50%) translateX(-8vw) rotate(0deg);
    background: linear-gradient(160deg,
      rgba(0,102,255,0.18) 0%,
      rgba(20,40,80,0.5) 35%,
      rgba(0,102,255,0.1) 100%);
    box-shadow:
      0 0 10px rgba(0,150,255,0.75),
      0 0 30px rgba(0,102,255,0.45),
      0 0 80px rgba(0,102,255,0.18),
      inset 0 0 20px rgba(0,150,255,0.12);
    border: 2px solid rgba(0,180,255,0.65);
  }

  /* Step 4: 向中心靠拢 + 旋转 45°，形成八角星交叉 */
  90% {
    width: 14vw;
    height: 14vw;
    transform: translate(-50%, -50%) rotate(45deg);
    background: linear-gradient(160deg,
      rgba(0,102,255,0.28) 0%,
      rgba(20,40,80,0.45) 35%,
      rgba(0,102,255,0.15) 100%);
    box-shadow:
      0 0 15px rgba(0,180,255,0.9),
      0 0 50px rgba(0,102,255,0.5),
      0 0 120px rgba(0,102,255,0.22),
      inset 0 0 40px rgba(0,150,255,0.18);
    border: 2.5px solid rgba(0,200,255,0.75);
  }

  /* Step 5: 放大覆盖全屏并淡出 — 轮廓光保持到最后一刻 */
  100% {
    width: 300vmax;
    height: 300vmax;
    transform: translate(-50%, -50%) rotate(45deg);
    background: linear-gradient(160deg,
      rgba(0,102,255,0.18) 0%,
      rgba(20,40,80,0.4) 35%,
      rgba(0,102,255,0.1) 100%);
    box-shadow:
      0 0 20px rgba(0,180,255,0.7),
      0 0 80px rgba(0,102,255,0.35),
      0 0 180px rgba(0,102,255,0.15),
      inset 0 0 50px rgba(0,150,255,0.12);
    border: 2.5px solid rgba(0,200,255,0.6);
    opacity: 0;
  }
}

@keyframes planeRight {
  0%, 20% {
    width: 200vmax;
    height: 200vmax;
    transform: translate(-50%, -50%) rotate(0deg);
    background: #000;
    box-shadow: none;
    border-color: transparent;
  }

  50% {
    width: 14vw;
    height: 65vh;
    transform: translate(-50%, -50%) translateX(8vw) rotate(0deg);
    background: linear-gradient(200deg,
      rgba(0,212,255,0.15) 0%,
      rgba(12,14,22,0.95) 35%,
      rgba(0,212,255,0.08) 100%);
    box-shadow:
      0 0 15px rgba(0,212,255,0.5),
      0 0 50px rgba(0,212,255,0.2),
      0 0 100px rgba(0,212,255,0.08),
      inset 0 0 30px rgba(0,212,255,0.05);
    border: 1.5px solid rgba(0,212,255,0.45);
  }

  70% {
    width: 14vw;
    height: 14vw;
    transform: translate(-50%, -50%) translateX(8vw) rotate(0deg);
    background: linear-gradient(200deg,
      rgba(0,102,255,0.18) 0%,
      rgba(20,40,80,0.5) 35%,
      rgba(0,102,255,0.1) 100%);
    box-shadow:
      0 0 10px rgba(0,150,255,0.75),
      0 0 30px rgba(0,102,255,0.45),
      0 0 80px rgba(0,102,255,0.18),
      inset 0 0 20px rgba(0,150,255,0.12);
    border: 2px solid rgba(0,180,255,0.65);
  }

  90% {
    width: 14vw;
    height: 14vw;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: linear-gradient(200deg,
      rgba(0,102,255,0.28) 0%,
      rgba(20,40,80,0.45) 35%,
      rgba(0,102,255,0.15) 100%);
    box-shadow:
      0 0 15px rgba(0,180,255,0.9),
      0 0 50px rgba(0,102,255,0.5),
      0 0 120px rgba(0,102,255,0.22),
      inset 0 0 40px rgba(0,150,255,0.18);
    border: 2.5px solid rgba(0,200,255,0.75);
  }

  /* Step 5: 放大覆盖全屏并淡出 — 轮廓光保持到最后一刻 */
  100% {
    width: 300vmax;
    height: 300vmax;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: linear-gradient(200deg,
      rgba(0,102,255,0.18) 0%,
      rgba(20,40,80,0.4) 35%,
      rgba(0,102,255,0.1) 100%);
    box-shadow:
      0 0 20px rgba(0,180,255,0.7),
      0 0 80px rgba(0,102,255,0.35),
      0 0 180px rgba(0,102,255,0.15),
      inset 0 0 50px rgba(0,150,255,0.12);
    border: 2.5px solid rgba(0,200,255,0.6);
    opacity: 0;
  }
}

@keyframes loaderVanish {
  to {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}

/* ── Hero content reveal (sync with loader exit) ── */
.hero-content {
  opacity: 0;
  transform: scale(0.92);
  animation: heroReveal 1s 2.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .hero-content { opacity: 1; transform: none; animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
