/* ==========================================================
   우와랩스 Uwa Labs — uwalabs.com
   색은 셋뿐이다. 차콜(사람·사실) · 스노우(지면) · 오렌지(우와, 한 점).
   그라데이션·그림자·둥근 모서리·카드 없음. 화려함은 움직임과 글자로.
   ========================================================== */

:root {
  --ink: #1A1B1E;
  --ink-2: #4B4D52;
  --ink-3: #8A8D93;
  --rule: #DDDFE3;
  --ground: #F8F9FA;
  --sheet: #FFFFFF;
  --night: #1A1B1E;
  --night-ink: #F8F9FA;
  --night-2: rgba(248, 249, 250, 0.62);
  --night-3: rgba(248, 249, 250, 0.38);
  --night-rule: rgba(248, 249, 250, 0.14);
  --spark: #FF5722;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1320px;
  --bar-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.012em;
  color: var(--ink);
  background: var(--ground);
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--ground); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 공통 글자 ---------- */
.label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink-2);
}
.display {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 78px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
  text-wrap: balance;
}
.lead {
  margin: 0;
  max-width: 34em;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.75;
  color: var(--ink-2);
}
.tone-dark { background: var(--night); color: var(--night-ink); }
.tone-dark .label { color: var(--night-2); }
.tone-dark .lead { color: var(--night-2); }

/* ---------- 로고 ---------- */
.qmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.1em;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
}
.qmark::after {
  content: "";
  width: 0.26em;
  height: 0.26em;
  margin-bottom: 0.04em;
  border-radius: 50%;
  background: var(--spark);
}

.mark {
  display: inline-flex;
  align-items: flex-end;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.82;
}
.mark .bang {
  height: 1.32em;
  width: auto;
  margin-left: -0.31em;
  margin-bottom: -0.22em;
  overflow: visible;
}
.bang .tilt { fill: var(--spark); }
.bang .stars { fill: var(--spark); }
.bang .arc { fill: none; stroke: var(--spark); stroke-linecap: round; stroke-dasharray: 1; }
.bang .a1 { stroke-width: 1.8; opacity: 0.92; }
.bang .a2 { stroke-width: 1.5; opacity: 0.5; }
.bang .bar, .bang .pt, .bang .stars path { transform-box: fill-box; }
.bang .bar { transform-origin: 50% 100%; }
.bang .pt { transform-origin: 50% 50%; }
.bang .stars path { transform-origin: 50% 50%; }

/* Quiet 상태 = 점만. Spark 상태 = 느낌표·반짝임 */
.mark.is-quiet .bar, .motion .mark.wait .bar { transform: scaleY(0); opacity: 0; }
.mark.is-quiet .stars path, .motion .mark.wait .stars path { transform: scale(0) rotate(-90deg); opacity: 0; }
.mark.is-quiet .arc, .motion .mark.wait .arc { stroke-dashoffset: 1; opacity: 0; }
.mark .bar, .mark .stars path, .mark .arc { transition-property: transform, opacity, stroke-dashoffset; }
.mark .bar { transition-duration: 0.26s; transition-timing-function: var(--ease-pop); transition-delay: 0.14s; }
.mark .stars path { transition-duration: 0.5s; transition-timing-function: var(--ease-pop); transition-delay: calc(0.24s + var(--d, 0s)); }
.mark .arc { stroke-dashoffset: 0; transition-duration: 0.8s; transition-timing-function: var(--ease); transition-delay: 0.28s; }
.mark.is-popping .pt { animation: hop 0.38s var(--ease) both; }
.mark.is-quiet .bar, .mark.is-quiet .stars path, .mark.is-quiet .arc,
.motion .mark.wait .bar, .motion .mark.wait .stars path, .motion .mark.wait .arc { transition-delay: 0s; transition-duration: 0.3s; }
@keyframes hop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-15px) scale(1.12); }
  100% { transform: translateY(0) scale(1); }
}

/* ---------- 머리줄 ---------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--ink);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.bar[data-tone="dark"] { color: var(--night-ink); }
.bar.is-scrolled { background: rgba(248, 249, 250, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bar.is-scrolled[data-tone="dark"] { background: rgba(26, 27, 30, 0.82); }
.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--bar-h);
  border-bottom: 1px solid transparent;
}
.bar.is-scrolled .bar-in { border-bottom-color: var(--rule); }
.bar.is-scrolled[data-tone="dark"] .bar-in { border-bottom-color: var(--night-rule); }
.bar .qmark { font-size: 24px; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.bar.on-hero .qmark { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.spine {
  display: flex;
  gap: clamp(16px, 2.4vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.spine a { text-decoration: none; opacity: 0.42; transition: opacity 0.25s var(--ease); }
.spine a:hover, .spine a.is-current { opacity: 1; }
.spine b { font-weight: 700; margin-right: 6px; }
.open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid currentColor;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.open:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.tone-dark .open:hover, .bar[data-tone="dark"] .open:hover { background: var(--night-ink); color: var(--ink); border-color: var(--night-ink); }

/* ---------- 01 첫 화면 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
  isolation: isolate;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero-in {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: clamp(20px, 3vh, 36px);
  padding-top: calc(var(--bar-h) + clamp(20px, 5vh, 56px));
  padding-bottom: 28px;
}
.hero-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero .mark { font-size: clamp(112px, 21.5vw, 320px); align-self: end; margin-bottom: 0.12em; }
.hero-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(24px, 4vw, 72px);
}
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 7.4vw, 112px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}
.hero-side { display: grid; gap: 22px; justify-items: start; }
.hero-side .lead { font-size: clamp(16px, 1.35vw, 19px); }
.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--night-rule);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--night-3);
}
.cue { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.cue i { width: 7px; height: 7px; border-radius: 50%; background: var(--night-ink); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.55; } 50% { transform: scale(1.5); opacity: 1; } }

/* 글자 하나씩 올라오기 */
.split { display: inline-block; }
.split .ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .c { display: inline-block; white-space: pre; }
.motion .split .c { transform: translateY(105%); transition: transform 0.9s var(--ease) calc(var(--k) * 32ms + var(--base, 0ms)); }
.motion .split.is-in .c { transform: none; }

/* ---------- 장면 공통 (스크롤에 묶인 장면) ---------- */
.scene { position: relative; }
.stage { padding-block: clamp(96px, 14vh, 160px); }
.motion .scene { height: var(--len, 300vh); }
.motion .scene .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding-block: calc(var(--bar-h) + 24px) 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.sec-head { display: grid; gap: 18px; }

/* 나타나기 */
.motion .rv { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--dl, 0ms); }
.motion .rv.is-in { opacity: 1; transform: none; }

/* ---------- 02 서류 ---------- */
.paper { --len: 320vh; }
.paper .wrap { display: grid; gap: clamp(28px, 5vh, 56px); }
.paper-board { position: relative; }
.sheets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
}
.sheet {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 3.6;
  padding: clamp(12px, 1.4vw, 20px);
  background: var(--sheet);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.sheet figcaption { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--ink-2); }
.sheet .typed {
  margin: 0;
  font-size: clamp(12px, 1.05vw, 15px);
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
}
.sheet .ln { display: block; height: 7px; background: var(--ground); }
.sheet .ln.s { width: 62%; }
.sheet .count {
  margin-top: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.k-hwp .tools { display: flex; gap: 5px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.k-hwp .tools i { width: 10px; height: 10px; border: 1px solid var(--rule); }
.k-xls .grid {
  display: grid;
  grid-template-columns: 2.8em 1fr;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.k-xls .grid > * { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 6px; min-height: 26px; font-size: 11px; color: var(--ink-2); }
.k-xls .grid .typed { padding: 6px; }
.k-paper .typed, .k-paper .rules {
  line-height: 26px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 25px, var(--rule) 25px 26px);
}
.k-paper .rules { flex: 1; min-height: 52px; }
.k-neis .field { border: 1px solid var(--rule); }
.k-neis .field span { display: block; padding: 5px 8px; font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--ground); border-bottom: 1px solid var(--rule); }
.k-neis .field .typed { padding: 8px; }

.promise { margin: 0; display: grid; gap: 14px; }
.promise strong { font-size: clamp(30px, 4.6vw, 64px); font-weight: 800; letter-spacing: -0.05em; line-height: 1.12; }
.promise span { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2); }

.motion .paper {
  --type-0: clamp(0, calc((var(--p, 1) - 0.04) / 0.18), 1);
  --type-1: clamp(0, calc((var(--p, 1) - 0.11) / 0.18), 1);
  --type-2: clamp(0, calc((var(--p, 1) - 0.18) / 0.18), 1);
  --type-3: clamp(0, calc((var(--p, 1) - 0.25) / 0.18), 1);
  --sw-3: clamp(0, calc((var(--p, 0) - 0.5) / 0.14), 1);
  --sw-2: clamp(0, calc((var(--p, 0) - 0.57) / 0.14), 1);
  --sw-1: clamp(0, calc((var(--p, 0) - 0.64) / 0.14), 1);
  --sw-0: clamp(0, calc((var(--p, 0) - 0.71) / 0.14), 1);
  --pr: clamp(0, calc((var(--p, 0) - 0.8) / 0.12), 1);
}
.motion .sheet { transform: translate(calc(var(--sw) * 115vw), calc(var(--sw) * -8vh)) rotate(calc(var(--sw) * 16deg)); will-change: transform; }
.motion .sheet .typed { clip-path: inset(0 calc((1 - var(--ty)) * 100%) 0 0); }
.motion .s0 { --sw: var(--sw-0); --ty: var(--type-0); }
.motion .s1 { --sw: var(--sw-1); --ty: var(--type-1); }
.motion .s2 { --sw: var(--sw-2); --ty: var(--type-2); }
.motion .s3 { --sw: var(--sw-3); --ty: var(--type-3); }
.motion .promise {
  position: absolute;
  inset: 0;
  align-content: center;
  opacity: var(--pr);
  transform: translateY(calc((1 - var(--pr)) * 28px));
  pointer-events: none;
}

/* ---------- 03 흐름 ---------- */
.flow { --len: 340vh; border-top: 1px solid var(--rule); }
.flow .wrap { display: grid; gap: clamp(28px, 5vh, 52px); }
.flow-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
}
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--rule);
}
.step {
  position: relative;
  min-height: clamp(116px, 15vh, 150px);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--ground);
  border: 2px dashed rgba(138, 141, 147, 0.55);
  color: var(--ink-2);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.step .no { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.step b { font-size: clamp(15px, 1.35vw, 19px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; }
.step .st { margin-top: auto; font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.step .st span { display: none; }
.step .st .yet { display: inline; }
.step.is-draft { border: 2px solid var(--spark); color: var(--ink); background: var(--sheet); animation: nudge 0.5s var(--ease-pop); }
.step.is-ok { animation: nudge 0.5s var(--ease-pop); }
@keyframes nudge { 0% { transform: scale(0.94); } 100% { transform: none; } }
.step.is-draft .st .yet { display: none; }
.step.is-draft .st .draft { display: inline; color: var(--spark); }
.step.is-ok { border: 2px solid var(--ink); background: var(--ink); color: var(--ground); }
.step.is-ok .st .yet, .step.is-ok .st .draft { display: none; }
.step.is-ok .st .ok { display: inline; }

.flow-bot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.meter { display: flex; align-items: baseline; gap: 14px; }
.meter-n { font-size: clamp(64px, 8vw, 120px); font-weight: 800; letter-spacing: -0.06em; line-height: 0.9; min-width: 0.7em; }
.meter-l { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.legend { display: grid; gap: 10px; justify-items: start; }
.legend ul { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; display: inline-block; }
.legend .l-yet { border: 2px dashed rgba(138, 141, 147, 0.55); }
.legend .l-draft { border: 2px solid var(--spark); }
.legend .l-ok { background: var(--ink); }
.legend p { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }

/* ---------- 04 두 개의 우와 ---------- */
.echo { --len: 240vh; }
.echo .wrap { display: grid; gap: clamp(20px, 3.4vh, 40px); }
.echo-line {
  position: relative;
  margin: 0;
  font-size: clamp(38px, 7.2vw, 112px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.06;
}
.echo-line .w { color: var(--spark); }
.echo-b { display: grid; }
.echo-b > * { grid-area: 1 / 1; }
.echo-b .ghost { color: transparent; -webkit-text-stroke: 1.2px rgba(248, 249, 250, 0.5); }
.echo-b .ghost { display: none; }
.motion .echo-b .ghost { display: block; }
.motion .echo {
  --ea: clamp(0, calc((var(--p, 1) - 0.06) / 0.22), 1);
  --eb: clamp(0, calc((var(--p, 1) - 0.34) / 0.38), 1);
  --ec: clamp(0, calc((var(--p, 1) - 0.72) / 0.16), 1);
}
.motion .echo-a { opacity: var(--ea); transform: translateY(calc((1 - var(--ea)) * 40px)); }
.motion .echo-b .solid { opacity: var(--eb); }
.motion .echo-b .g1 { opacity: clamp(0, calc(1.5 - var(--eb) * 2.2), 1); transform: scale(calc(1 + var(--eb) * 0.09)); transform-origin: 0 100%; }
.motion .echo .lead { opacity: var(--ec); transform: translateY(calc((1 - var(--ec)) * 20px)); }

/* ---------- 05 회사 ---------- */
.company { padding-block: clamp(96px, 16vh, 180px); }
.company .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
}
.company-body { display: grid; gap: 36px; align-content: start; }
.facts { margin: 0; border-top: 2px solid var(--ink); }
.facts div {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr);
  gap: 16px;
  padding-block: 15px;
  border-bottom: 1px solid var(--rule);
}
.facts dt { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.facts dd { margin: 0; font-size: 17px; font-weight: 600; }
.facts a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.en { margin: 0; max-width: 40em; font-size: 15px; line-height: 1.7; color: var(--ink-2); }

/* ---------- 06 끝 ---------- */
.close { padding-block: clamp(96px, 16vh, 180px) 0; }
.close-in { display: grid; gap: clamp(28px, 5vh, 48px); justify-items: start; }
.close .mark { font-size: clamp(96px, 16vw, 240px); cursor: pointer; }
.close .mark.is-quiet .pt { animation: breathe-pt 3.6s ease-in-out infinite; }
@keyframes breathe-pt { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.mail {
  font-size: clamp(26px, 3.6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  border-bottom: 2px solid var(--night-rule);
  transition: border-color 0.25s var(--ease);
}
.mail:hover { border-bottom-color: var(--night-ink); }
.copy {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
  color: var(--night-ink);
  background: transparent;
  border: 1px solid var(--night-3);
  cursor: pointer;
}
.copy:hover { border-color: var(--night-ink); }
.foot {
  margin-top: clamp(80px, 12vh, 140px);
  padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid var(--night-rule);
  font-size: 13px;
  color: var(--night-3);
}

a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 900px) {
  .spine { display: none; }
  .hero-mid { grid-template-columns: minmax(0, 1fr); }
  .sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet { aspect-ratio: 3 / 2.6; }
  .flow-top { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .steps::before { display: none; }
  .step { min-height: 92px; }
  .flow-bot { grid-template-columns: minmax(0, 1fr); }
  .company .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .hero-top .label:last-child { display: none; }
  .sheet { aspect-ratio: auto; min-height: 150px; }
  .k-hwp .tools { display: none; }
  .motion .paper .lead { display: none; }
  .flow .lead { display: none; }
  .meter-n { font-size: 56px; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .open { padding: 8px 12px; font-size: 13px; }
}
@media (max-height: 760px) and (min-width: 901px) {
  .paper .lead, .flow .lead { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cue i { animation: none; }
  .close .mark.is-quiet .pt { animation: none; }
}
