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

:root {
  --text-xs:   clamp(0.75rem,  0.9vw,  0.875rem);
  --text-body: clamp(0.9rem,   1.2vw,  1.05rem);
  --text-head: clamp(1.6rem,   2.8vw,  2.6rem);
}

@property --o {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

@keyframes ripple {
  from { --o: 0%; }
  to   { --o: 80%; }
}

html { scroll-behavior: smooth; background: #1c1c1e; overscroll-behavior: none; }
html, body { overscroll-behavior: none; }

body {
  color: #e8e8e8;
  font-family: "PretendardNum", "ogg-text", "Pretendard", sans-serif;
  font-weight: 300;
  min-height: 250vh;
  padding: clamp(1rem, 3vw, 2.5rem);
}

/* 물결 배경 — 예전에는 body의 background(+background-attachment:fixed)였다.
 * body에 두면 8초짜리 --o 애니메이션이 매 프레임 body 전체의 페인트를 무효화하고,
 * attachment:fixed 때문에 스크롤마다 배경을 다시 칠하느라 스크롤이 메인 스레드에 묶인다.
 * 뷰포트 크기의 전용 레이어로 분리하면 칠해지는 픽셀은 완전히 같으면서
 * (attachment:fixed의 페인팅 영역 = 뷰포트 = 이 요소의 크기)
 * 다시 칠하는 범위가 이 레이어 안으로만 한정된다. */
#bg-ripple {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  animation: ripple 8s linear infinite;
  background: repeating-radial-gradient(
    ellipse 130vw 130vw at 50% 120%,
    #1c1c1e calc(0%  + var(--o)),
    #2a2826 calc(20% + var(--o)),
    #1c1c1e calc(40% + var(--o)),
    #2a2826 calc(60% + var(--o)),
    #1c1c1e calc(80% + var(--o))
  );
  contain: paint;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle 300px at var(--mx, -9999px) var(--my, -9999px), #2a2826, transparent 70%);
}

/* 블롭 캔버스: 처음엔 화면 정중앙, 텍스트 등장 시 위로 이동 */
#canvas-holder {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0; /* 스크롤 0vh~20vh 구간에서 about.js가 페이드인 제어 */
  transform: translateY(0); /* 기본: 가로·세로 정중앙 */
  transition: transform 0.8s ease;
}
/* 소개 텍스트가 올라오면 블롭이 위로 비켜 자리를 내준다 */
body.text-on #canvas-holder {
  transform: translateY(-8vh);
}
#canvas-holder canvas { display: block; }

/* 개념 다이어그램: 블롭이 위로 올라간 가운데 자리에 등장 */
#idea-diagram {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(42rem, 62vw);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
  transition: opacity 600ms ease;
}
#idea-diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.dg-node {
  fill: rgba(232, 232, 232, 0.92);
  font-family: "PretendardNum", "ogg-text", "Pretendard", sans-serif;
  font-weight: 400;
  font-size: 42px;
}
.dg-cap {
  fill: rgba(232, 232, 232, 0.55);
  font-family: "PretendardNum", "ogg-text", "Pretendard", sans-serif;
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 1px;
}
.dg-line { fill: none; stroke: rgba(232, 232, 232, 0.45); stroke-width: 1.5; }

/* ───────── 좌측 고정 컬럼 ───────── */
#left-col {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  padding: 2.4rem 2.6rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

/* 우측 네비 — Corners 스타일 (텍스트 + 가로선) */
#left-nav {
  margin-top: auto;
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}
#left-nav a {
  display: flex;
  align-items: center;
  font-family: "PretendardNum", "ogg-text", "Pretendard", sans-serif;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(232, 232, 232, 0.58);
  text-decoration: none;
  transition: color 220ms ease;
  white-space: nowrap;
}
#left-nav a span {
  display: inline-block;
  min-width: 6rem;
}
#left-nav a::after {
  content: "";
  display: inline-block;
  height: 1px;
  width: 1.75rem;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.65;
  transition: width 220ms ease, opacity 220ms ease;
}
#left-nav a:hover {
  color: rgba(232, 232, 232, 0.78);
}
#left-nav a.active {
  color: rgba(232, 232, 232, 0.9);
}
#left-nav a.active::after {
  width: 3.25rem;
  opacity: 1;
}

/* ───────── 중앙 하단 고정 섹션 텍스트 (블롭 아래) ───────── */
#section-text {
  position: fixed;
  top: 63%;
  left: 50%;
  transform: translateX(-50%);
  width: min(42rem, 90vw);
  text-align: center;
  z-index: 5;
  pointer-events: none;
  /* 패널이 겹쳐 쌓이도록 */
  display: grid;
  grid-template-areas: "stack";
  justify-items: center; /* 패널을 grid 안에서 가로 가운데로 */
}
.st-panel {
  grid-area: stack;
  max-width: 31.25rem;
  opacity: 0;
  transform: translateY(0.875rem);
  transition: opacity 600ms ease, transform 600ms ease;
}
.st-panel.active {
  opacity: 1;
  transform: none;
}
.st-eye {
  display: block;
  font-family: "PretendardNum", "ogg-text", "Pretendard", sans-serif;
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.42;
  margin-bottom: 0.85rem;
}
.st-head {
  font-family: "PretendardNum", "ogg", "Pretendard", serif;
  font-weight: 400;
  font-size: var(--text-head);
  line-height: 1.22;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.5);
}
.st-body {
  margin: 1.05rem auto 0;
  font-size: var(--text-body);
  line-height: 1.82;
  opacity: 1;
  max-width: 28rem;
  text-wrap: pretty; /* widow/orphan 자동 회피 */
}
.st-body + .st-body {
  margin-top: 0.7rem;
}
#st-intro .st-panel { max-width: 40rem; }
#st-intro .st-body  { max-width: none; text-wrap: auto; }

/* 감정 카테고리 칩 */
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin-top: 1.2rem;
  font-size: 0.71875rem;
  opacity: 0.78;
}
.cats span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}
.cats i {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* 근본 개념 흐름: Fear ↓ Bravery ↓ Being genuine */
.idea-flow {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: "PretendardNum", "ogg-text", "Pretendard", sans-serif;
}
.idea-flow .node {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.idea-flow .link {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
}
.idea-flow .link::before {
  content: "↓\00a0\00a0";
}

/* 감정→색 쌍: 그라데이션 스와치 */
.pairs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.2rem;
  font-size: 0.71875rem;
  opacity: 0.82;
}
.pairs span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: 0.02em;
}
.pairs i {
  width: 2.25rem;
  height: 0.5rem;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

/* 저음↔고음 돌기 비교 */
.pitch {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
  font-family: "PretendardNum", "ogg-text", "Pretendard", sans-serif;
}
.pitch-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.pitch-item b {
  font-size: 1.05rem;
  font-weight: 400;
}
.pitch-item em {
  font-style: normal;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.5;
}
.pitch-arrow {
  opacity: 0.4;
  font-size: 1.1rem;
}

/* ───────── 애니메이션 전용 구간 (150vh) ───────── */
#sec-anim {
  position: relative;
  min-height: 150vh;
}

/* 애니메이션이 끝나기 전(scrollP<1)엔 텍스트·네비를 숨긴다 */
#section-text,
#left-nav {
  opacity: 0;
  transition: opacity 0.8s ease;
}
#left-nav {
  pointer-events: none;
}
body.text-on #section-text,
body.text-on #left-nav {
  opacity: 1;
}
body.text-on #left-nav {
  pointer-events: auto;
}

/* ───────── 로고: 중앙 대형 → 스크롤 시 상단 중앙 nav로 축소 이동 ───────── */
#nav-logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 12;
  pointer-events: none;
  color: #e8e8e8;
  will-change: transform;
  opacity: 0;
  transition: opacity 300ms ease;
}
#nav-logo a {
  display: block;
  pointer-events: auto;
  text-decoration: none;
  color: inherit;
  transform-origin: top center;
  will-change: transform;
}
/* 히어로 크기(450px)로 렌더한 뒤 scale로 축소 → 확대 블러 방지 */
#nav-logo svg { display: block; width: 28.125rem; }

/* 로고 축소 완료 후 등장하는 상단 nav — 좌: Archive / 우: Question */
#about-topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6.5rem; /* center(3.25rem) ≈ 축소된 로고의 세로 중심 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  z-index: 13;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms ease;
}
#about-topnav .tn-link {
  text-decoration: none;
  color: rgba(232, 232, 232, 0.82);
  font-family: "PretendardNum", "ogg", "Pretendard", serif;
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.06em;
  transition: color 150ms ease;
}
#about-topnav .tn-link:hover {
  color: #ffffff;
}

/* 스크롤 섹션 — 높이 스페이서 */
.scroll-section {
  min-height: 100vh;
  position: relative;
  z-index: 3;
}

/* ───────── 인트로 → 설문 CTA (애니메이션 완료 후 등장) ───────── */
#cta {
  position: fixed;
  top: 82%;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(0.875rem);
  z-index: 14;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease, transform 600ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
body.text-on #cta {
  opacity: 1;
  transform: translateX(-50%);
  pointer-events: auto;
}
#cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #f0f0f0;
  font-family: "PretendardNum", "ogg-text", "Pretendard", sans-serif;
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 2.2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 200ms ease, transform 200ms ease;
}
#cta a:hover { background: rgba(0, 0, 0, 0.22); }
#cta a:active { transform: translateY(1px); }
#cta .scroll-hint {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* 첫 화면 스크롤 유도 화살표 (move-hint와 동일 스타일) */
#scroll-indicator {
  position: fixed;
  /* 전체 폭 컨테이너로 두고 자식을 중앙정렬 → 화살표 위치가 문구 박스 폭(글꼴/
     letter-spacing 편차)에 흔들리지 않고 항상 화면 정중앙에 온다. */
  left: 0;
  right: 0;
  bottom: clamp(1.5rem, 5vh, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: #e8e8e8;
  opacity: 0.7;
  pointer-events: none;
  user-select: none;
  z-index: 8;
  transition: opacity 400ms ease;
}
/* "아래로 스크롤" 안내문 — archive의 이동 안내(#move-hint)와 동일한 스타일/크기 */
#scroll-indicator .si-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
#scroll-indicator svg {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}
/* 스크롤이 시작되면 사라짐 */
body.scrolled #scroll-indicator {
  opacity: 0;
}
/* 문구는 데스크탑에서만 노출 (모바일은 화살표만) */
@media (max-width: 640px) {
  #scroll-indicator .si-label {
    display: none;
  }
}

/* 태블릿 (721~1024) — 중앙 텍스트·헤드 여유 */
@media (max-width: 1024px) and (min-width: 721px) {
  #section-text { width: min(42rem, 84vw); }
  .st-head { font-size: clamp(1.8rem, 4vw, 2.4rem); }
  #idea-diagram { width: min(38rem, 70vw); }
}

@media (max-width: 720px) {
  #left-col { padding: 1.6rem; }
  #left-nav a span { min-width: 5rem; }
  #section-text { left: 1.6rem; bottom: 2rem; }
  .st-head { font-size: clamp(1.4rem, 6vw, 2rem); }
}

@media (max-width: 640px) {
  #left-col { display: none; }
  #section-text {
    left: 1.2rem; right: 1.2rem;
    width: auto;
    top: 60%;
    transform: none;
    text-align: center;
  }
  .st-panel { max-width: none; }
  .st-body { max-width: none; }
  .st-body br { display: none; }
}
