:root {
  --black: #030303;
  --white: #ffffff;
  --orange: #ff8000;
  --orange-soft: rgba(255, 128, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font-family: "Noto Sans KR", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

.site-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  pointer-events: none;
}

.site-bar-inner {
  width: min(100%, 2558px);
  margin: 0 auto;
  padding: 22px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  width: min(18vw, 188px);
  height: 28px;
}

.site-logo img {
  width: 100%;
  height: auto;
  max-width: none;
  filter: brightness(0) invert(1);
}

.site-tagline {
  margin: 0;
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.slice-page {
  width: min(100%, 2558px);
  margin: 0 auto;
  background: var(--black);
}

.slice {
  position: relative;
  isolation: isolate;
  opacity: 0;
  transform: translate3d(0, 64px, 0);
  transition:
    opacity 0.8s ease,
    transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.slice.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.slice-shell {
  position: relative;
  overflow: hidden;
  background: #050505;
  clip-path: inset(0 0 10% 0 round 0);
  transition: clip-path 1.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.slice.is-active .slice-shell {
  clip-path: inset(0 0 0 0 round 0);
}

.slice-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: none !important;
  filter: saturate(1.03) contrast(1.02);
  user-select: none;
  pointer-events: none;
}

.slice-glow,
.slice-sweep,
.slice-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.slice-glow {
  z-index: 2;
  opacity: calc(0.18 + (var(--stage-visibility, 0) * 0.16));
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 128, 0, 0.2), transparent 30%),
    radial-gradient(circle at 78% 58%, rgba(255, 255, 255, 0.1), transparent 22%),
    radial-gradient(circle at 58% 78%, rgba(255, 128, 0, 0.12), transparent 28%);
  mix-blend-mode: screen;
  animation: pulseGlow 9s ease-in-out infinite;
}

.slice-sweep {
  z-index: 3;
  opacity: calc(0.22 + (var(--stage-visibility, 0) * 0.18));
  background: linear-gradient(
    104deg,
    transparent 18%,
    rgba(255, 255, 255, 0.04) 34%,
    rgba(255, 142, 48, 0.2) 48%,
    rgba(255, 255, 255, 0.07) 58%,
    transparent 74%
  );
  mix-blend-mode: screen;
  animation: sweepMotion var(--sweep-duration, 7s) cubic-bezier(0.45, 0.05, 0.2, 0.95) infinite alternate;
}

.slice-grain {
  z-index: 4;
  opacity: calc(0.06 + (var(--stage-visibility, 0) * 0.06));
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
  animation: grainShift 1.15s steps(2) infinite;
}

.slice--light .slice-shell {
  background: #f3f0eb;
}

.slice--light .slice-image {
  filter: saturate(1.01) contrast(1.01);
}

.slice--light .slice-glow {
  opacity: calc(0.12 + (var(--stage-visibility, 0) * 0.1));
  background:
    radial-gradient(circle at 48% 48%, rgba(255, 128, 0, 0.08), transparent 18%),
    radial-gradient(circle at 52% 54%, rgba(0, 0, 0, 0.045), transparent 26%);
  mix-blend-mode: multiply;
}

.slice--light .slice-sweep {
  opacity: calc(0.12 + (var(--stage-visibility, 0) * 0.08));
  background: linear-gradient(
    102deg,
    transparent 18%,
    rgba(0, 0, 0, 0.02) 34%,
    rgba(255, 128, 0, 0.1) 48%,
    rgba(255, 255, 255, 0.12) 60%,
    transparent 76%
  );
  mix-blend-mode: multiply;
}

.slice--light .slice-grain {
  opacity: calc(0.03 + (var(--stage-visibility, 0) * 0.03));
  mix-blend-mode: multiply;
}

.slice--accent .slice-shell {
  background: var(--orange);
}

.slice--accent .slice-glow {
  opacity: calc(0.12 + (var(--stage-visibility, 0) * 0.06));
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15), transparent 18%),
    radial-gradient(circle at 50% 78%, rgba(0, 0, 0, 0.05), transparent 34%);
  mix-blend-mode: screen;
}

.slice--accent .slice-sweep {
  opacity: 0.18;
  mix-blend-mode: soft-light;
}

.slice--textband .slice-glow {
  opacity: 0.24;
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }

  50% {
    transform: translate3d(1.8%, 1.4%, 0) scale(1.08);
  }
}

@keyframes sweepMotion {
  0% {
    transform: translate3d(-26%, 0, 0) skewX(-10deg) scale(1);
  }

  100% {
    transform: translate3d(24%, 0, 0) skewX(-10deg) scale(1.06);
  }
}

@keyframes grainShift {
  0% {
    transform: translate3d(0, 0, 0);
  }

  25% {
    transform: translate3d(-0.6%, 0.8%, 0);
  }

  50% {
    transform: translate3d(0.8%, -0.5%, 0);
  }

  75% {
    transform: translate3d(-0.4%, -0.8%, 0);
  }

  100% {
    transform: translate3d(0.5%, 0.5%, 0);
  }
}

@media (max-width: 900px) {
  .site-bar-inner {
    padding: 18px 18px 0;
    gap: 18px;
  }

  .site-logo {
    width: min(40vw, 168px);
    height: 24px;
  }

  .site-tagline {
    font-size: 16px;
  }

  .slice {
    transform: translate3d(0, 40px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .slice,
  .slice-shell,
  .slice-image,
  .slice-glow,
  .slice-sweep,
  .slice-grain {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    clip-path: inset(0 0 0 0 round 0) !important;
  }
}
