:root {
  --bg: rgb(242, 241, 240);
  --fg: rgb(0, 0, 0);
  --ease-hero: cubic-bezier(0.11, 0, 0.5, 0);
  --dur-line: 1.05s;
  --stagger: 0.11s;
  /* Top / bottom bar: enter after headline lines are mostly settled */
  --delay-ui: 0.72s;
  --pad-x: clamp(1.25rem, 4vw, 2.75rem);
  --pad-y: clamp(1.25rem, 3vw, 2rem);
  /* 小圆环光标（热点在圆心） */
  --cursor-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E")
      12 12,
    auto;
  /* 深色背景区域用浅色圆环光标 */
  --cursor-dot-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E")
      12 12,
    auto;
  /* 左下角毛玻璃：模糊半径越大越“糊”，但个别浏览器会吃性能 */
  --hero-social-glass-blur: 120px;
  /* 案例全屏层顶栏高度 */
  --case-bar-h: 56px;
}

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

html,
body {
  height: 100%;
  margin: 0;
  cursor: var(--cursor-dot);
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: var(--cursor-dot);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: var(--cursor-dot);
}

.hero {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--pad-y) var(--pad-x);
  position: relative;
  z-index: 0;
  /* 不要用 isolation + overflow:hidden：常见会直接把子元素的 backdrop-filter「采样」弄没 */
  overflow: visible;
  color: rgb(255, 255, 255);
  cursor: var(--cursor-dot-light);
}

.hero a,
.hero button {
  cursor: var(--cursor-dot-light);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgb(32, 32, 32) 0%,
    rgb(10, 10, 10) 100%
  );
  pointer-events: none;
}

.hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 2;
  font-weight: 600;
  font-size: clamp(0.6875rem, 1.1vw, 0.8125rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  animation: heroFadeUp 0.85s var(--ease-hero) forwards;
  animation-delay: calc(var(--delay-ui) + var(--stagger) * 2.5);
}

.hero__brand {
  display: inline-block;
}

.hero__menu {
  letter-spacing: 0.12em;
}

.hero__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding-block: clamp(2rem, 6vh, 4rem);
}

.hero__head-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.35rem);
}

.hero__accent {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  align-self: center;
  margin-top: clamp(0.25rem, 1.2vw, 0.65rem);
  opacity: 0;
  scale: 0.6;
  animation: accentIn 0.7s var(--ease-hero) forwards;
  animation-delay: calc(var(--stagger) * 2 + 0.35s);
  pointer-events: none;
}

@media (max-width: 720px) {
  .hero__accent {
    display: none;
  }

  .hero__head-row {
    gap: 0;
  }
}

.hero__headlines {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.15rem, 0.6vw, 0.35rem);
}

.hero__line {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.15rem, 6.4vw, 5.85rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.hero__mask {
  display: block;
  overflow: hidden;
}

.hero__text {
  display: block;
  will-change: transform;
  transform: translate3d(0, 108%, 0);
  animation: lineRise var(--dur-line) var(--ease-hero) forwards;
}

.hero__line:nth-child(1) .hero__text {
  animation-delay: calc(var(--stagger) * 0);
}

.hero__line:nth-child(2) .hero__text {
  animation-delay: calc(var(--stagger) * 1);
}

.hero__line:nth-child(3) .hero__text {
  animation-delay: calc(var(--stagger) * 2);
}

.hero__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
  font-weight: 500;
  font-size: clamp(0.6875rem, 1.05vw, 0.8125rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* 不要用 opacity 动画包一层：会导致子元素 backdrop-filter 在 Chrome 里经常“永远不模糊” */
  opacity: 1;
  transform: translateY(10px);
  animation: heroBottomRise 0.85s var(--ease-hero) forwards;
  animation-delay: calc(var(--delay-ui) + var(--stagger) * 3.25);
}

.hero__social {
  justify-self: start;
  display: flex;
  align-items: center;
}

.hero__social-card {
  position: relative;
  z-index: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  inline-size: 198px;
  max-inline-size: min(18rem, calc(100vw - var(--pad-x) * 2));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  overflow: visible;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.08);
  transition:
    inline-size 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    z-index 0s linear 0.35s;
  transform: translateZ(0);
  will-change: backdrop-filter;
}

.hero__social-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(var(--hero-social-glass-blur)) saturate(1.9) contrast(1.14)
    brightness(0.97);
  backdrop-filter: blur(var(--hero-social-glass-blur)) saturate(1.9) contrast(1.14) brightness(0.97);
}

.hero__social-card:hover,
.hero__social-card:focus-within {
  z-index: 4;
  inline-size: min(340px, calc(100vw - var(--pad-x) * 2));
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.16),
    0 10px 28px rgba(0, 0, 0, 0.1);
  transition:
    inline-size 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    z-index 0s linear 0s;
}

.hero__social-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hero__social-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hero__social-img {
  width: 32px;
  height: 32px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  flex: 0 0 auto;
}

.hero__social-name {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__social-role {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.hero__social-expand {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 12px;
  background: transparent;
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.08);
  opacity: 1;
  visibility: hidden;
  transform: translate3d(0, 10px, 0) scale(0.985);
  transition:
    visibility 0s linear 0.34s,
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  will-change: backdrop-filter;
}

.hero__social-expand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(var(--hero-social-glass-blur)) saturate(1.8) contrast(1.18);
  backdrop-filter: blur(var(--hero-social-glass-blur)) saturate(1.8) contrast(1.18);
}

.hero__social-expand-inner {
  position: relative;
  z-index: 1;
  min-height: 0;
  display: grid;
  gap: 10px;
}

.hero__social-card:hover .hero__social-expand,
.hero__social-card:focus-within .hero__social-expand {
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    visibility 0s linear 0s,
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.hero__social-bio {
  margin: 0;
  padding: 0;
  max-width: 100%;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: normal;
  color: rgba(255, 255, 255, 0.92);
}

.hero__social-panel {
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero__social-panel--bio {
  padding: 18px 16px;
  background: rgba(0, 0, 0, 0.34);
}

.hero__social-panel--cta {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.42);
  display: grid;
  place-items: center;
}

.hero__social-cta {
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hero__social-card::before {
    background: rgba(0, 0, 0, 0.88);
  }

  .hero__social-expand::before {
    background: rgba(0, 0, 0, 0.88);
  }
}

.hero__social-gap::after {
  content: " ";
  white-space: pre;
}

.hero__scroll {
  justify-self: center;
  font-size: 1.1em;
  font-weight: 500;
  letter-spacing: 0;
  color: inherit;
  text-decoration: none;
  animation: scrollNudge 2.4s ease-in-out infinite;
  animation-delay: 1.8s;
}

.hero__copy {
  justify-self: end;
  letter-spacing: 0.04em;
}

@keyframes lineRise {
  from {
    transform: translate3d(0, 108%, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroBottomRise {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes accentIn {
  from {
    opacity: 0;
    scale: 0.6;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes scrollNudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__text,
  .hero__top,
  .hero__bottom,
  .hero__accent,
  .hero__scroll {
    animation: none !important;
  }

  .hero__text {
    transform: none;
  }

  .hero__top,
  .hero__bottom {
    opacity: 1;
    transform: none;
  }

  .hero__accent {
    opacity: 1;
    scale: 1;
  }

  .spray__img,
  .spray__img.is-out {
    filter: none !important;
    transition: none !important;
  }

  .hero__social-card,
  .hero__social-expand {
    transition: none !important;
  }
}

.spray {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.spray__img {
  position: absolute;
  left: var(--x, 0px);
  top: var(--y, 0px);
  width: var(--w, 110px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform-origin: 50% 50%;
  border-radius: 14px;
  background: rgb(222, 222, 222);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.16),
    0 8px 24px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translate3d(0, 10px, 0) rotate(var(--r, 0deg)) scale(0.94);
  filter: blur(0);
  transition:
    opacity 420ms ease,
    transform 560ms cubic-bezier(0.11, 0, 0.5, 0),
    filter 420ms ease;
  will-change: transform, opacity;
}

.spray__img.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)) scale(1);
  filter: blur(0);
}

.spray__img.is-out {
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)) scale(0);
  filter: blur(14px);
  will-change: transform, opacity, filter;
  transition:
    opacity 3600ms ease,
    transform 3600ms cubic-bezier(0.22, 0.06, 0.18, 1),
    filter 3600ms ease;
}

@media (pointer: coarse), (hover: none) {
  .spray {
    display: none !important;
  }
}

/* —— Work: full-width list; 16:9 preview only on row hover / focus —— */
.work {
  background: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  --work-pad: 60px;
  padding-block: 100px;
  padding-inline: 0;
  position: relative;
}

.work__inner {
  width: 100%;
  max-width: none;
  margin: 0;
}

.work__main {
  width: 100%;
  min-width: 0;
}

.work__heading {
  margin: 0 0 100px;
  padding-inline: var(--work-pad);
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: capitalize;
}

.work__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work__item {
  position: relative;
}

.work__item::before {
  content: "";
  position: absolute;
  left: var(--work-pad);
  right: var(--work-pad);
  top: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.14);
}

.work__item:last-child::after {
  content: "";
  position: absolute;
  left: var(--work-pad);
  right: var(--work-pad);
  bottom: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.14);
}

.work__row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: 120px;
  padding: clamp(1rem, 2.2vh, 1.35rem) var(--work-pad);
  font-weight: 700;
  font-size: clamp(0.8125rem, 1.65vw, 1.0625rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition:
    background-color 0.22s ease,
    color 0.22s ease;
}

.work__item:hover .work__row,
.work__item:focus-within .work__row,
.work__item.is-active .work__row {
  background: rgb(0, 0, 0);
  color: rgb(255, 255, 255);
}

.work__row:focus-visible {
  outline: 2px solid rgb(0, 0, 0);
  outline-offset: 2px;
}

.work__item:hover .work__row:focus-visible,
.work__item:focus-within .work__row:focus-visible {
  outline-color: rgb(255, 255, 255);
}

.work__num {
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.work__slash {
  margin-left: 0.06em;
}

.work__arrow {
  font-size: 1.05em;
  line-height: 1;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.work__item:hover .work__arrow,
.work__item:focus-within .work__arrow,
.work__item.is-active .work__arrow {
  opacity: 1;
}

.work__media {
  position: fixed;
  width: min(92vw, 552px);
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  left: 0;
  top: 0;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(0.985);
  transition:
    opacity 0.45s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.work__media.is-visible {
  opacity: 1;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(1);
}

.work__media-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  background: rgb(232, 232, 232);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.14),
    0 12px 36px rgba(0, 0, 0, 0.08);
}

.work__media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.3s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

@media (max-width: 640px) {
  .work__media {
    width: min(94vw, 336px);
    left: 0;
    top: 0;
    transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(0.985);
  }

  .work__media.is-visible {
    transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .work__row,
  .work__media-img,
  .work__arrow,
  .work__media {
    transition: none !important;
  }

  .work__media {
    transform: none;
  }

  .work__media.is-visible {
    transform: none;
  }
}

/* —— Case overlay：Work 01 自上方滑入（下拉出现），顶栏固定；可多图纵向拼接 —— */
body.has-case-overlay {
  overflow: hidden;
}

.case-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.case-overlay.is-open {
  pointer-events: auto;
  visibility: visible;
}

.case-overlay__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 202;
  height: var(--case-bar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 2.75rem);
  background: rgb(242, 241, 240);
  color: rgb(0, 0, 0);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 600;
  font-size: clamp(0.625rem, 1vw, 0.75rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-overlay__brand {
  justify-self: start;
  cursor: var(--cursor-dot);
}

.case-overlay__role {
  justify-self: center;
  font-weight: 500;
  letter-spacing: 0.14em;
  opacity: 0.88;
  text-align: center;
  white-space: nowrap;
}

.case-overlay__menu-wrap {
  justify-self: end;
  position: relative;
}

.case-overlay__menu {
  letter-spacing: 0.12em;
  cursor: var(--cursor-dot);
}

.case-overlay__nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 10rem;
  padding: 6px 0;
  background: rgb(255, 255, 255);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  display: grid;
}

.case-overlay__nav[hidden] {
  display: none !important;
}

.case-overlay__nav-link {
  padding: 12px 18px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-overlay__nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.case-overlay__sheet {
  position: fixed;
  top: var(--case-bar-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  background: rgb(250, 250, 250);
  overflow: hidden;
  /* 关闭时在视口上方，打开后向下落（下拉出现） */
  transform: translate3d(0, -100%, 0);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.case-overlay.is-open .case-overlay__sheet {
  transform: translate3d(0, 0, 0);
}

.case-overlay__scroll {
  height: 100%;
  min-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 max(0.75rem, env(safe-area-inset-bottom, 0px));
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  display: flex;
  flex-direction: column;
}

.case-overlay__kicker-wrap {
  flex: 0 0 auto;
  padding-left: max(0px, calc(var(--pad-x) - env(safe-area-inset-left, 0px)));
  box-sizing: border-box;
}

.case-overlay__kicker {
  margin: 60px 0;
  padding: 0;
  font-weight: 800;
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: rgb(0, 0, 0);
  text-transform: none;
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity 0.45s ease,
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-overlay.is-open .case-overlay__kicker {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.48s;
}

.case-overlay:not(.is-open) .case-overlay__kicker {
  transition: none;
  opacity: 0;
  transform: translate3d(0, 32px, 0);
}

.case-overlay__stack {
  display: flex;
  flex-direction: column;
}

.case-overlay__slice {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
  .case-overlay__sheet {
    transition-duration: 0.01ms;
  }

  .case-overlay__kicker {
    transition: none !important;
  }

  .case-overlay.is-open .case-overlay__kicker {
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
}
