/* [Define404] */
/* Define404 site. 토큰 원본 = define404/design-system/tokens.json (v0.1) */

/* 사이트용 축소본(자주 쓰는 한글 2,350자 + 라틴). 없는 글자가 나오면 그때만 전체본을 받는다 */
@font-face {
  font-family: "Wanted Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 1000;
  src: url("/assets/fonts/WantedSansVariable-sub.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Wanted Sans Full";
  font-style: normal;
  font-display: swap;
  font-weight: 400 1000;
  src: url("/assets/fonts/WantedSansVariable.woff2") format("woff2-variations");
}

:root {
  --paper: #F6F4EF;
  --paper-raised: #FBFAF7;
  --paper-sunk: #EDEAE3;
  --ink-1: #141414;
  --ink-2: #4A4844;
  --ink-3: #6E6A63;
  --line-1: #D6D1C7;
  --line-2: #B9B3A7;
  --sky: #6CC4F2;
  --sky-soft: #DDF0FB;
  --sky-ink: #0A6797;
  --danger: #DA2D2D;

  --font-sans: "Wanted Sans Variable", "Wanted Sans Full", "Wanted Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;

  --fs-label: 12px;
  --fs-small: 14px;
  --fs-body: 16px;
  --fs-lead: 19px;
  --fs-h3: 22px;
  --fs-h2: clamp(30px, 4.6vw, 64px);
  --fs-h1: clamp(40px, 7.4vw, 112px);

  --lh-tight: 1.08;
  --lh-snug: 1.35;
  --lh-body: 1.65;
  --tr-display: -0.035em;
  --tr-label: 0.08em;

  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 160px;
  --r-sm: 2px;
  --bw: 1px;

  /* 모션 기준: 서명 곡선 1개, 시간 3단 */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-in: cubic-bezier(0.05, 0.7, 0.1, 1);
  --t-quick: 160ms;
  --t-std: 420ms;
  --t-slow: 900ms;

  --gutter: clamp(16px, 4vw, 56px);
  --head-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--sky-soft); color: var(--ink-1); }

.d404 {
  background: var(--paper);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
.d404-label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  font-feature-settings: "tnum" 1;
  color: var(--ink-3);
}
.d404-wordmark { font-weight: 850; letter-spacing: -0.02em; white-space: nowrap; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink-1); color: var(--paper); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--sky-ink); outline-offset: 3px; }

/* 상단 진행선 */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--sky); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* 머리 */
.site-head {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  padding: 0 max(var(--gutter), calc((100vw - 1360px) / 2 + var(--gutter)));
  transition: background var(--t-std) var(--ease), border-color var(--t-std) var(--ease), transform var(--t-std) var(--ease);
  border-bottom: var(--bw) solid transparent;
}
.site-head.is-solid { background: rgba(246, 244, 239, 0.94); border-bottom-color: var(--line-1); }
.site-head.is-hidden { transform: translateY(-100%); }
.brand { display: block; color: var(--ink-1); }
.wordmark { width: 132px; height: auto; overflow: visible; }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); font-size: var(--fs-small); font-weight: 600; }
.site-nav a:not(.nav-cta) { position: relative; padding: 4px 0; }
.site-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink-1); transform: scaleX(0); transform-origin: 100% 50%; transition: transform var(--t-std) var(--ease); }
.site-nav a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav-cta { padding: 9px 16px; border: var(--bw) solid var(--ink-1); border-radius: var(--r-sm); background: var(--ink-1); color: var(--paper); transition: background var(--t-quick) var(--ease), color var(--t-quick) var(--ease); }
.nav-cta:hover { background: transparent; color: var(--ink-1); }

/* 히어로 */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: calc(var(--head-h) + var(--s8)) 0 var(--s9); overflow: hidden; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; }
.hero-label { margin-bottom: var(--s5); }
.hero-title { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 760; letter-spacing: var(--tr-display); max-width: 15ch; }
.resolver {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s4);
  margin-top: var(--s7); font-size: clamp(22px, 3vw, 40px); font-weight: 650; letter-spacing: -0.02em; line-height: 1.3;
}
.resolver-key { color: var(--ink-3); }
.resolver-arrow { color: var(--line-2); font-weight: 400; }
.resolver-val { position: relative; display: inline-block; padding-bottom: 10px; min-width: 6ch; }
.resolver-text { font-feature-settings: "tnum" 1; }
.resolver-val.is-undef .resolver-text { color: var(--ink-3); font-style: italic; font-weight: 500; }
.lint, .ok { position: absolute; left: 0; bottom: 0; height: 10px; width: 100%; pointer-events: none; }
.lint {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10' viewBox='0 0 20 10'%3E%3Cpath d='M0 8 L5 2 L10 8 L15 2 L20 8' fill='none' stroke='%236CC4F2' stroke-width='2.4' stroke-linecap='square'/%3E%3C/svg%3E") repeat-x left bottom / 20px 10px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--t-slow) var(--ease);
}
.ok { height: 3px; background: var(--ink-1); transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--t-std) var(--ease-in); }
.resolver-val.is-undef .lint { clip-path: inset(0 0 0 0); }
.resolver-val.is-def .ok { transform: scaleX(1); }
.resolver-val.is-def .lint { clip-path: inset(0 0 0 100%); transition-duration: var(--t-std); }
.hero-foot { margin-top: var(--s8); display: grid; grid-template-columns: minmax(0, 520px) auto; justify-content: space-between; align-items: end; gap: var(--s6); }
.hero-lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.6; }
.tagline { font-size: clamp(18px, 2vw, 24px); color: var(--ink-1); }
.tagline .d404-wordmark::after { content: ""; display: inline-block; width: 0.55em; height: 0.14em; margin-left: 0.08em; background: var(--sky); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 1px; height: 56px; background: var(--line-1); overflow: hidden; }
.scroll-cue span { position: absolute; inset: 0; background: var(--ink-1); transform: translateY(-100%); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 60%, 100% { transform: translateY(100%); } }

/* 흐르는 띠 */
.ticker { border-block: var(--bw) solid var(--line-1); overflow: hidden; background: var(--paper-raised); }
.ticker-track { display: flex; width: max-content; gap: var(--s6); padding: 18px 0; white-space: nowrap; font-size: clamp(20px, 2.6vw, 34px); font-weight: 700; letter-spacing: -0.02em; will-change: transform; }
.ticker-track span { color: var(--ink-1); }
.ticker-track b { font-weight: 500; font-style: italic; color: var(--ink-3); }
.ticker-track b:nth-of-type(even) { font-style: normal; color: var(--sky-ink); }

/* 장 */
.chapter { padding: var(--s10) 0 var(--s9); }
.chapter-head { margin-bottom: var(--s8); }
.chapter-head .d404-label { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); }
.num { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border: var(--bw) solid var(--line-2); border-radius: var(--r-sm); color: var(--ink-1); }
.chapter-head h2 { font-size: var(--fs-h2); line-height: 1.12; font-weight: 750; letter-spacing: -0.03em; max-width: 18ch; }
.chapter-lead { margin-top: var(--s5); color: var(--ink-2); font-size: var(--fs-lead); max-width: 44ch; }

/* 스크롤 스토리 */
.story { position: relative; height: 260vh; border-top: var(--bw) solid var(--line-1); }
.story-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: var(--head-h); overflow: hidden; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 112px); align-items: center; }
.story-title { font-size: clamp(36px, 5vw, 72px); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; margin: var(--s4) 0 var(--s5); }
.story-en { display: block; margin-top: 10px; font-size: var(--fs-small); font-weight: 600; letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--ink-3); }
.story-lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: 36ch; }
.steps { margin-top: var(--s6); border-top: var(--bw) solid var(--line-1); }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: var(--s3); padding: 14px 0; border-bottom: var(--bw) solid var(--line-1); color: var(--ink-3); transition: color var(--t-std) var(--ease), padding var(--t-std) var(--ease); }
.steps li span { font-size: var(--fs-label); font-weight: 700; padding-top: 3px; font-feature-settings: "tnum" 1; }
.steps li.is-on { color: var(--ink-1); padding-left: 8px; }
.steps li.is-on span { color: var(--sky-ink); }
.story-links { display: flex; align-items: center; gap: var(--s5); margin-top: var(--s6); }
.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; background: var(--ink-1); color: var(--paper); font-weight: 650; border-radius: var(--r-sm); transition: background var(--t-quick) var(--ease); }
.btn:hover { background: var(--sky-ink); }
.btn-text { font-weight: 650; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color var(--t-quick) var(--ease); }
.btn-text:hover { border-color: var(--ink-1); }

/* 대화 화면 */
.device { background: var(--paper-raised); border: var(--bw) solid var(--line-1); border-radius: var(--r-sm); max-width: 440px; width: 100%; justify-self: end; }
.device-bar { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: var(--bw) solid var(--line-1); font-size: var(--fs-small); font-weight: 650; }
.device-status { color: var(--sky-ink); display: inline-flex; align-items: center; gap: 6px; }
.device-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
.chat { display: flex; flex-direction: column; gap: 0; padding: 18px; min-height: 420px; justify-content: flex-end; }
.msg { flex-shrink: 0; margin-top: 10px; max-width: 84%; padding: 10px 14px; border-radius: var(--r-sm); font-size: var(--fs-small); line-height: 1.55; }
.msg-in { align-self: flex-end; background: var(--ink-1); color: var(--paper); }
.msg-out { align-self: flex-start; background: var(--paper-sunk); }
.msg-handoff { box-shadow: inset 2px 0 0 var(--sky); }
.chip { display: inline-block; margin-top: 6px; padding: 3px 8px; border: var(--bw) solid var(--sky-ink); color: var(--sky-ink); font-size: 12px; font-weight: 650; border-radius: var(--r-sm); }
.typing { display: none; margin-top: 10px; align-self: flex-start; gap: 4px; padding: 12px 14px; background: var(--paper-sunk); border-radius: var(--r-sm); }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: dot 1s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .4; } }
.device-note { padding: 12px 18px; border-top: var(--bw) solid var(--line-1); font-size: 12px; color: var(--ink-3); }

/* 진단 보고서 */
.report { background: var(--paper-raised); border: var(--bw) solid var(--line-1); border-radius: var(--r-sm); padding: 24px; max-width: 500px; width: 100%; justify-self: end; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; }
.score b { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-feature-settings: "tnum" 1; }
.score small { color: var(--ink-3); font-weight: 600; margin-left: 2px; }
.report-q { margin-top: var(--s5); font-weight: 650; }
.report-answer { margin-top: var(--s3); padding: 16px; background: var(--paper-sunk); border-radius: var(--r-sm); font-size: var(--fs-small); line-height: 1.8; }
.fix { position: relative; transition: color var(--t-std) var(--ease); }
.fix::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 5 L2.5 1 L5 5 L7.5 1 L10 5' fill='none' stroke='%23DA2D2D' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x left bottom / 10px 6px;
  clip-path: inset(0 100% 0 0); transition: clip-path var(--t-std) var(--ease); }
.fix.is-lint::after { clip-path: inset(0 0 0 0); }
.fix.is-fixed { color: var(--sky-ink); font-weight: 650; }
.fix.is-fixed::after { background: var(--sky-ink); height: 1.5px; bottom: -2px; clip-path: inset(0 0 0 0); }
.report-sources { margin-top: var(--s5); font-size: var(--fs-small); }
.report-sources li { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s3); padding: 9px 0; border-bottom: var(--bw) solid var(--line-1); align-items: center; }
.report-sources li span { color: var(--ink-3); font-size: 12px; }
.tag { font-style: normal; font-size: 12px; font-weight: 650; padding: 2px 7px; border: var(--bw) solid var(--line-2); border-radius: var(--r-sm); color: var(--ink-2); }
.tag-bad { border-color: var(--danger); color: var(--danger); }
.tag-miss { border-style: dashed; }
.report-bars { margin-top: var(--s5); display: grid; gap: 10px; }
.report-bars div { display: grid; grid-template-columns: 40px 1fr; gap: var(--s3); align-items: center; font-size: 12px; color: var(--ink-3); }
.report-bars i { height: 6px; background: var(--paper-sunk); position: relative; overflow: hidden; border-radius: 1px; }
.report-bars i::after { content: ""; position: absolute; inset: 0; background: var(--sky); transform-origin: 0 50%; transform: scaleX(calc(var(--v) * var(--fill, 0))); }

/* 도구 목록 */
.tools .tool:first-child { border-top: var(--bw) solid var(--ink-1); }
.tool { border-bottom: var(--bw) solid var(--line-1); }
.tool a { position: relative; display: grid; grid-template-columns: minmax(160px, 1.1fr) 2fr 90px 40px; gap: var(--s5); align-items: center; padding: 28px 0; overflow: hidden; isolation: isolate; }
.tool a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink-1); transform: scaleY(0); transform-origin: 50% 100%; transition: transform var(--t-std) var(--ease); }
.tool-name { font-size: clamp(24px, 3vw, 40px); font-weight: 780; letter-spacing: -0.03em; transition: transform var(--t-std) var(--ease), color var(--t-std) var(--ease); }
.tool-desc { color: var(--ink-2); transition: color var(--t-std) var(--ease); }
.tool-kind { font-size: var(--fs-label); font-weight: 650; letter-spacing: var(--tr-label); color: var(--ink-3); text-transform: uppercase; }
.tool-arrow { font-size: 24px; justify-self: end; transition: transform var(--t-std) var(--ease), color var(--t-std) var(--ease); }
@media (hover: hover) {
  .tool a:hover::before { transform: scaleY(1); transform-origin: 50% 0; }
  .tool a:hover .tool-name { color: var(--paper); transform: translateX(16px); }
  .tool a:hover .tool-desc, .tool a:hover .tool-kind { color: var(--line-1); }
  .tool a:hover .tool-arrow { color: var(--sky); transform: translate(-12px, -4px) rotate(45deg); }
}

/* 로드맵 */
.road { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); padding-top: 40px; }
.road::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 1px; background: var(--line-1); }
.road::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 2px; background: var(--ink-1); transform-origin: 0 50%; transform: scaleX(var(--road, 0)); }
.road-item { position: relative; }
.road-item::before { content: ""; position: absolute; top: -45px; left: 0; width: 11px; height: 11px; border: 2px solid var(--ink-1); background: var(--paper); border-radius: 50%; }
.road-item.is-done::before { background: var(--ink-1); }
.road-item.is-next::before { border-color: var(--sky-ink); background: var(--sky); animation: pulse 1.8s var(--ease) infinite; }
.road-state { display: inline-block; font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--tr-label); color: var(--ink-3); margin-bottom: var(--s3); }
.road-item h3 { font-size: var(--fs-h3); font-weight: 750; letter-spacing: -0.02em; margin-bottom: var(--s3); }
.road-item p { color: var(--ink-2); }

/* 회사(먹 바탕) */
.chapter-ink { background: var(--ink-1); color: var(--paper); }
.chapter-ink .d404-label { color: var(--line-2); }
.chapter-ink .num { color: var(--paper); border-color: var(--ink-3); }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.principle { border-top: var(--bw) solid var(--ink-3); }
.principle { padding: var(--s6) var(--s6) var(--s6) 0; border-right: var(--bw) solid #2a2a2a; }
.principle + .principle { padding-left: var(--s6); }
.principle:last-child { border-right: 0; }
.principle-n { display: block; font-size: 64px; font-weight: 300; line-height: 1; color: var(--sky); margin-bottom: var(--s5); }
.principle h3 { font-size: var(--fs-h3); font-weight: 750; margin-bottom: var(--s3); }
.principle p { color: var(--line-2); }
.contact { margin-top: var(--s9); }
.contact-mail { display: inline-block; margin-top: var(--s4); font-size: clamp(30px, 6.4vw, 104px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; color: var(--paper); background: linear-gradient(var(--sky), var(--sky)) left 92% / 0 4px no-repeat; transition: background-size var(--t-slow) var(--ease); }
.contact-mail:hover { background-size: 100% 4px; }

/* 꼬리 */
.site-foot { background: var(--ink-1); color: var(--line-2); padding: var(--s7) 0; border-top: var(--bw) solid #2a2a2a; font-size: var(--fs-small); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s5); align-items: flex-end; }
.foot-brand { color: var(--paper); font-weight: 700; margin-bottom: 4px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: var(--s5); }
.foot-nav a:hover { color: var(--paper); }

/* 커서 */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .js .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 80; }
  .cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; border-radius: 50%; }
  .cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--sky-ink); }
  .cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid var(--ink-3); transition: width var(--t-std) var(--ease), height var(--t-std) var(--ease), margin var(--t-std) var(--ease), background var(--t-std) var(--ease), border-color var(--t-std) var(--ease); }
  .cursor.is-link .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(108, 196, 242, 0.18); border-color: var(--sky); }
}

/* 연출 준비 상태: JS가 html.motion 을 붙인 뒤에만 숨겼다가 보여 준다 */
.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.motion .reveal.is-in { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; }
.motion .split .w > span { transform: translateY(105%); transition: transform var(--t-slow) var(--ease-in); transition-delay: calc(var(--i) * 45ms); }
.motion .split.is-in .w > span { transform: none; }
.motion .msg { opacity: 0; transform: translateY(14px) scale(.98); max-height: 0; padding-block: 0; margin-top: 0; overflow: hidden; transition: opacity var(--t-std) var(--ease), transform var(--t-std) var(--ease), max-height var(--t-std) var(--ease), padding var(--t-std) var(--ease), margin var(--t-std) var(--ease); }
.motion .msg.is-on { opacity: 1; transform: none; max-height: 240px; padding-block: 10px; margin-top: 10px; }
.motion .msg-in { transform-origin: 100% 100%; }
.motion .msg-out { transform-origin: 0 100%; }
.motion .typing.is-on { display: inline-flex; }
.motion .wm-wave { stroke-dasharray: 80; stroke-dashoffset: 80; }
.motion .wm-wave.is-drawn { stroke-dashoffset: 0; transition: stroke-dashoffset var(--t-slow) var(--ease-in); }
.brand:hover .wm-wave { animation: wiggle .6s var(--ease); }
@keyframes wiggle { 30% { transform: translateY(-3px); } 60% { transform: translateY(2px); } }

/* 반응형 */
@media (max-width: 900px) {
  :root { --head-h: 60px; }
  .site-nav a:not(.nav-cta) { display: none; }
  .wordmark { width: 112px; }
  .hero { align-items: flex-end; padding-bottom: var(--s8); }
  .scroll-cue { display: none; }
  .hero-foot { grid-template-columns: 1fr; gap: var(--s4); margin-top: var(--s7); }
  .story { height: auto; }
  .story-sticky { position: relative; height: auto; padding: var(--s8) 0; }
  .story-grid { grid-template-columns: 1fr; }
  .device, .report { justify-self: stretch; max-width: none; }
  .chat { min-height: 0; }
  .tool a { grid-template-columns: 1fr 32px; gap: 6px var(--s4); padding: 22px 0; }
  .tool-desc { grid-column: 1 / -1; grid-row: 2; font-size: var(--fs-small); }
  .tool-kind { display: none; }
  .tool-arrow { grid-column: 2; grid-row: 1; }
  .road { grid-template-columns: 1fr; padding-top: 0; padding-left: calc(var(--gutter) + 28px); gap: var(--s7); }
  .road::before, .road::after { left: calc(var(--gutter) + 5px); right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .road::after { width: 2px; transform-origin: 50% 0; transform: scaleY(var(--road, 0)); }
  .road-item::before { top: 4px; left: -28px; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: var(--s6) 0; border-right: 0; }
  .chapter { padding: var(--s9) 0 var(--s8); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 정책 문서 */
.doc { padding-top: calc(var(--head-h) + var(--s8)); padding-bottom: var(--s9); max-width: 820px; }
.doc h1 { font-size: clamp(32px, 4.4vw, 56px); font-weight: 780; letter-spacing: -0.03em; line-height: 1.15; margin: var(--s4) 0 var(--s3); }
.doc-meta { color: var(--ink-3); font-size: var(--fs-small); margin-bottom: var(--s7); }
.doc section { padding: var(--s5) 0; border-top: var(--bw) solid var(--line-1); }
.doc h2 { font-size: var(--fs-h3); font-weight: 720; letter-spacing: -0.01em; margin-bottom: var(--s3); }
.doc p + p { margin-top: var(--s3); }
.doc p, .doc li { color: var(--ink-2); }
.doc-list { display: grid; gap: var(--s2); }
.doc-list li { padding-left: 16px; position: relative; }
.doc-list li::before { content: ""; position: absolute; left: 0; top: .8em; width: 6px; height: 1px; background: var(--ink-3); }

/* 머리 버튼은 한 줄로 */
.nav-cta { white-space: nowrap; }
@media (max-width: 480px) { .nav-cta { padding: 8px 12px; font-size: 13px; } }

/* 제품 구간 (부킹냥, 진단): 왼쪽 설명, 오른쪽 체험 */
.product { border-top: var(--bw) solid var(--line-1); }
.product-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.product-copy { position: sticky; top: calc(var(--head-h) + var(--s6)); }
.product-copy > .d404-label { display: flex; align-items: center; gap: var(--s3); }
.demo-mount { display: flex; justify-content: flex-end; }
.demo-mount > .device, .demo-mount > .report { justify-self: auto; width: 100%; }
.challenge { position: relative; margin-top: var(--s6); padding: var(--s5); border: var(--bw) solid var(--line-1); border-radius: var(--r-sm); background: var(--paper-raised); }
.challenge-lead { margin-top: var(--s2); color: var(--ink-2); font-size: var(--fs-small); line-height: 1.6; padding-right: 40px; }
@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-copy { position: static; }
  .demo-mount { justify-content: stretch; }
}

/* 문단을 문장 단위 p로 나눈 리드 */
.hero-lead p + p, .chapter-lead p + p, .story-lead p + p { margin-top: 6px; }
.hero-lead { max-width: 600px; }
.hero-hint { margin-top: var(--s4) !important; font-size: var(--fs-small); color: var(--ink-3); }
.chapter-lead { max-width: 640px; }
.chapter-lead-wide { max-width: none; }
.story-lead { max-width: 640px; }
.challenge-lead + .challenge-lead { margin-top: 2px; }

/* 5장(마감): 내용에 맞게 작게 */
#close { padding: var(--s8) 0 var(--s7); }
#close .chapter-head { margin-bottom: var(--s6); }
#close .ledger { margin-bottom: var(--s7); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s6); }
#close .ledger-row { border-top: var(--bw) solid var(--ink-3); padding: var(--s4) 0 var(--s3); grid-template-columns: 1fr; gap: var(--s2); }
#close .ledger-row > span { padding-bottom: 0; font-size: var(--fs-small); }
#close .ledger-row b { font-size: clamp(36px, 4.4vw, 60px); padding-bottom: 12px; justify-self: start; }
#close .principles { margin-top: 0; }
#close .principle { padding-block: var(--s5); }
#close .principle-n { font-size: 32px; margin-bottom: var(--s3); }
#close .principle h3 { font-size: 18px; }
#close .principle p { font-size: var(--fs-small); }
#close .contact { margin-top: var(--s7); }
#close .contact-mail { font-size: clamp(26px, 3.6vw, 48px); }
@media (max-width: 900px) {
  #close .ledger { grid-template-columns: 1fr; }
}


/* 히어로 첫 줄: 사례 셋을 빗금으로 이어 한 줄에 */
.hero-pains i { font-style: normal; color: var(--line-2); margin: 0 2px; }
.hero-pains span { white-space: nowrap; }
@media (min-width: 901px) {
  .hero-lead { max-width: none; }
  .hero-lead p { max-width: 600px; }
  .hero-lead p.hero-pains { max-width: none; white-space: nowrap; }
}

.contact-more { margin-top: var(--s4); }
.chapter-ink .contact-more .btn-text { color: var(--paper); border-color: var(--ink-3); }

/* 히어로 제목: '작은 가게 사장님의 / 손을 덜어드려요' 로 접히는 폭 (실측 7.05em과 8.9em 사이) */
html.has-town .hero-title, .hero-title { max-width: 7.6em; }
/* 문장 안 줄바꿈 위치 (실측 폭 + 여유 12px, 넓은 화면) */
@media (min-width: 901px) {
  #booking .story-lead p:first-child { max-width: 390px; }
  #close .principle:nth-child(3) p { max-width: 223px; }
}

/* 머리 = 떠 있는 상자 (김팀장 10-14): 본문 최대 폭과 같은 폭, 위 15px 띄움, 내려갈 때 숨고 올라갈 때만 나타남 */
.site-head {
  top: 15px; left: 50%; right: auto; bottom: auto;
  width: calc(min(100vw, 1360px) - 2 * var(--gutter)); height: 64px;
  padding: 0 clamp(14px, 1.8vw, 24px); gap: var(--s4);
  transform: translateX(-50%);
  background: rgba(246, 244, 239, 0.72); border: var(--bw) solid rgba(17, 17, 17, 0.1); border-radius: 12px;
  box-shadow: 0 10px 30px -12px rgba(17, 17, 17, 0.28);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.site-head.is-solid { background: rgba(246, 244, 239, 0.9); border-color: var(--line-1); }
/* 평소에는 문서 맨 위에 놓여 함께 흘러가고, 위로 올릴 때만 화면에 붙어 내려온다 */
.site-head { position: absolute; transition: background var(--t-std) var(--ease), border-color var(--t-std) var(--ease); }
.site-head.is-hidden { transform: translateX(-50%); }
.site-head.is-pinned { position: fixed; animation: head-in 320ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes head-in { from { transform: translate(-50%, calc(-100% - 24px)); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .site-head.is-pinned { animation: none; } }
.site-head .nav-cta { padding: 8px 14px; }
@media (max-width: 720px) {
  .site-head { top: 10px; height: 56px; padding: 0 12px; border-radius: 10px; }
}
