/* ===== Northline Archive portfolio opening ===== */

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

body {
  font-family: "Overpass", sans-serif;
  background: #151515; 
  color: #fff;
  overflow: hidden; /* 揭幕期间锁滚动，结束后 JS 解锁 */
  cursor: none; /* 隐藏系统光标，用自定义 .cursor 代替 */
}

/* ---------- Opening veil and light sweep ---------- */
.preloader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  background-color: #151515;
  /* 切屏：白线走完后由 JS 把整块黑屏 yPercent:-100 往上拉走，露出下面 */
  z-index: 10;
}
.loader-bar-wrap {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 3svh, 34px));
  left: 0;
  width: 100%;
  height: 28px;
  overflow: visible;
}
.loader-bar {
  position: absolute;
  top: 12px;
  left: 6vw;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.7) 10%,
    rgba(255, 255, 255, 0.9) 55%,
    rgba(255, 255, 255, 1) 100%
  );
  /* 激光辉光：多层 bloom，亮核 + 向外溢光 */
  box-shadow:
    0 0 4px 1px rgba(255, 255, 255, 0.95),
    0 0 14px 2px rgba(255, 255, 255, 0.6),
    0 0 34px 7px rgba(255, 255, 255, 0.35),
    0 0 60px 12px rgba(255, 255, 255, 0.18);
}

/* ---------- Opening stage ---------- */
.hero {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  perspective: 1200px;
  background-color: #d4d2ce; /* 发牌舞台浅灰，让黑屏上拉的切屏看得见 */
}

/* Opening images start as small floating cards, then resolve into the hero image. */
.intro-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 2.5rem;
  will-change: transform, opacity;
  background: #141414;
  outline: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 24px 42px rgba(0, 0, 0, 0.26),
    0 72px 180px rgba(0, 0, 0, 0.52),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.intro-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04) 28%, transparent 52%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.26), transparent 38%, rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -28px 42px rgba(0, 0, 0, 0.18);
  opacity: 1;
  transition: opacity 0.22s ease;
}
.intro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
}
.hero.is-spreading .hero-img {
  box-shadow: none;
  outline-color: transparent;
}
.hero.is-spreading .hero-img::after {
  opacity: 0;
}
.hero-img {
  z-index: 2; /* 中间主图压在其它图之上，最后放大铺满 */
}

/* ---------- Cinematic edge shade ---------- */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.45) 18%,
    transparent 50%,
    rgba(0, 0, 0, 0.45) 82%
  );
  opacity: 0; /* 由 JS 在结尾淡入 */
  pointer-events: none;
}

/* ---------- Portfolio index ---------- */
.p {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #e5e1d8; 
  color: rgb(21, 21, 21);
  font-size: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5; /* 揭幕结束后盖在 hero 之上 */
}
.p.is-active {
  opacity: 1;
  pointer-events: auto;
}
.p-container {
  position: relative;
  height: 100%;
}
/* Desktop columns use a light virtual-scroll interaction. */
.p-m {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 11.2rem 1.2rem 3.2rem;
}
.p-col {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
  width: 50%;
  will-change: transform;
}
.p-el {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.p-el_a {
  display: block;
}
.p-el_fig {
  /* Project cover frame. */
  width: 100%;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #c9c1b6;
}
.p-el_fig.ar-16-9 {
  aspect-ratio: 16 / 9;
}
.p-el_mt {
  font-size: 1.2rem;
  line-height: 1.2;
  color: rgb(21, 21, 21);
  font-weight: 300;
}

/* 页脚 */
.p-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 12rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(21, 21, 21, 0.2);
  font-size: 1.2rem;
  color: rgb(21, 21, 21);
  font-weight: 300;
}
.p-footer_logo {
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.p-footer_offices {
  display: flex;
  gap: 4rem;
}
.p-footer_office {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.p-footer_office_time {
  color: rgba(21, 21, 21, 0.5);
}
.p-footer_right {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}
.p-footer_social {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* 列表项序号（点缀） */
.p-el_idx {
  color: rgba(21, 21, 21, 0.45);
  margin-right: 0.4rem;
}

/* Index corner labels. */
.p-ui {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  font-size: 1.1rem;
  font-weight: 400;
  color: rgb(21, 21, 21);
}
.p-ui_item {
  position: absolute;
  top: 2rem;
}
.p-ui_tl {
  left: 1.2rem;
}
.p-ui_tr {
  right: 1.2rem;
  color: rgba(21, 21, 21, 0.5);
}

/* Hero corner labels. */
.hero-ui {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #fff;
  mix-blend-mode: difference;
}
.hero-ui_item {
  position: absolute;
}
.hero-ui_tl {
  top: 2rem;
  left: 2.5rem;
}
.hero-ui_bl {
  bottom: 2rem;
  left: 2.5rem;
}
.hero-ui_br {
  bottom: 2rem;
  right: 2.5rem;
}

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999999;
  will-change: transform;
  mix-blend-mode: difference;
  color: #fff;
}
.cursor_svg {
  width: 1.6rem;
  height: 1.6rem;
  margin-left: -0.8rem;
  margin-top: -0.8rem;
  background: currentColor;
  border-radius: 50%;
  transition: width 0.3s ease, height 0.3s ease, margin-left 0.3s ease,
    margin-top 0.3s ease;
}
.cursor.is-hover .cursor_svg {
  width: 4rem;
  height: 4rem;
  margin-left: -2rem;
  margin-top: -2rem;
}
@media (hover: none) {
  .cursor {
    display: none;
  }
  body {
    cursor: auto;
  }
}


/* ---------- Originalization pass ---------- */
.hero-ui_tl {
  font-size: 1.05rem;
  line-height: 1.2;
}

.p-el_a {
  color: inherit;
  text-decoration: none;
}

.p-el_fig {
  position: relative;
  background: #c9c1b6;
  box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.06);
}

.p-el_mt {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  letter-spacing: 0;
}

.p-el_mt span {
  color: rgba(21, 21, 21, 0.42);
}

@media (max-width: 700px) {
  body {
    cursor: auto;
  }

  .hero-ui {
    font-size: 0.95rem;
    line-height: 1.25;
    mix-blend-mode: normal;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.38);
  }

  .hero-ui_tl {
    top: 2rem;
    left: 1.25rem;
    right: 1.25rem;
  }

  .hero-ui_bl {
    left: 1.25rem;
    right: 1.25rem;
    bottom: 4.2rem;
  }

  .hero-ui_br {
    left: 1.25rem;
    right: auto;
    bottom: 1.55rem;
  }

  .p {
    overflow-y: auto;
  }

  .p-container {
    height: auto;
    min-height: 100%;
  }

  .p-ui {
    font-size: 0.92rem;
  }

  .p-ui_tl {
    left: 1.25rem;
  }

  .p-ui_tr {
    right: 1.25rem;
  }

  .p-m {
    position: relative;
    display: block;
    padding: 7.2rem 1.25rem 3rem;
  }

  .p-col {
    width: 100%;
    gap: 2.2rem;
    transform: none !important;
  }

  .p-col--right {
    margin-top: 2.2rem;
  }

  .p-el {
    gap: 0.85rem;
  }

  .p-el_fig {
    border-radius: 0.7rem;
  }

  .p-el_mt {
    font-size: 1rem;
  }
}


/* Empty 16:9 index windows. */
.p-el_fig {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 42%),
    var(--window-tone, #c9c1b6);
}

.p-el_fig::after {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 0.45rem;
}

.tone-1 {
  --window-tone: #c9c1b6;
}

.tone-2 {
  --window-tone: #bfc4bd;
}

.tone-3 {
  --window-tone: #c7c4cb;
}

.tone-4 {
  --window-tone: #d0c7bb;
}


.p-el_fig img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(0.94) contrast(1.02);
}
