/* 디자인니오 — «픽셀과 물방울» 편집 디자인 (2026-10-08 msg 7458 재디자인 — AHA 의 밤하늘·얇은 거대 글씨·좌우 번갈이 글 상자·알약 단추를 쓰지 않는다)
   바탕: 모눈종이 #F3F3EF(밝음 기본) / 밤 #0B0B0F · 글: 잉크 #16141C · 직각 · 가는 선(헤어라인) · 굵은 산세리프 제목 + 라틴 세리프 이탤릭 꼬리말
   기술 = 파랑 네모 · 사람 = 산호 동그라미 · 그 사이 = 보라 */
:root,
:root[data-theme="light"] {
  --bg: #F3F3EF;
  --paper: rgba(243, 243, 239, 0.9);
  --ink: #16141C;
  --muted: #5A5765;
  --hair: rgba(22, 20, 28, 0.22);
  --hair-2: rgba(22, 20, 28, 0.1);
  --tech: #1478C2;
  --human: #E24A2B;
  --between: #5B3FD6;
  --gold: #A9771A;
  --pink: #D6286F;
  --focus: #5B3FD6;
  --serif: "Instrument Serif", "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme]) {
    --bg: #0B0B0F; --paper: rgba(11, 11, 15, 0.86); --ink: #EDEAF4; --muted: #A6A2B4; --hair: rgba(237, 234, 244, 0.26); --hair-2: rgba(237, 234, 244, 0.12);
    --tech: #4FB8FF; --human: #FF7A59; --between: #9479FF; --gold: #FFE0A6; --pink: #FF5FA2; --focus: #FFB547;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0B0F;
  --paper: rgba(11, 11, 15, 0.86);
  --ink: #EDEAF4;
  --muted: #A6A2B4;
  --hair: rgba(237, 234, 244, 0.26);
  --hair-2: rgba(237, 234, 244, 0.12);
  --tech: #4FB8FF;
  --human: #FF7A59;
  --between: #9479FF;
  --gold: #FFE0A6;
  --pink: #FF5FA2;
  --focus: #FFB547;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-anchor: none; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 17px; font-weight: 400; line-height: 1.7; letter-spacing: -0.01em;
  word-break: keep-all; overflow-wrap: break-word;
  transition: background-color 0.4s ease, color 0.4s ease;
}
h1, h2, h3 { text-wrap: balance; }
p { margin: 0 0 1em; }
strong { font-weight: 650; }
em[lang="en"], .kicker em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

#field { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; display: block; z-index: 0; background: var(--bg); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 30; background: var(--ink); color: var(--bg); padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ── 머리: 왼쪽 로고 · 오른쪽 종이/밤 + 인터뷰 신청 ── */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--hair-2);
  background: var(--paper); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.mark { display: inline-flex; align-items: baseline; gap: 7px; color: var(--ink); text-decoration: none; line-height: 1; padding: 4px 0; }
/* 로고 SVG 는 글자 테두리에 맞춰 잘라(viewBox) 아랫변 = nio 글자 바닥 → «design» 글자의 바닥선(baseline)에 정확히 얹힌다(msg 7477 «떠 보인다») */
.mark-logo { width: 42px; height: auto; display: inline-block; vertical-align: baseline; overflow: visible; transform: translateY(1.2px); }   /* 실측: 둥근 글자(e·s)는 바닥선 아래로 살짝 내려온다(오버슈트) → nio 도 1.2px 내려 눈높이를 맞춘다 */
.mark-name { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1; }
.top-right { display: flex; align-items: center; gap: 10px; }
.theme-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--ink); background: transparent; border: 1px solid var(--hair);
}
.tb-px, .tb-dot { width: 9px; height: 9px; background: var(--tech); display: inline-block; }
.tb-dot { border-radius: 50%; background: var(--human); }
:root[data-theme="dark"] .tb-px { background: var(--ink); }
/* 언어 전환(msg 7539): 직각·헤어라인 두 칸 — 고른 쪽만 잉크로 채운다 */
.lang-switch { display: inline-flex; align-items: stretch; min-height: 40px; border: 1px solid var(--hair); }
.lang-switch[hidden] { display: none; }
.lang-switch button {
  font: inherit; font-size: 13px; letter-spacing: 0; line-height: 1; cursor: pointer; padding: 0 10px; min-width: 0;
  color: var(--muted); background: transparent; border: 0; border-radius: 0;
  transition: background-color 0.18s steps(3), color 0.18s steps(3);
}
.lang-switch button + button { border-left: 1px solid var(--hair); }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { color: var(--bg); background: var(--ink); cursor: default; }
.lang-switch button:focus-visible { outline-offset: -3px; }
.btn {
  font: inherit; font-size: 15.5px; font-weight: 550; letter-spacing: -0.01em; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 20px; color: var(--ink); background: transparent; border: 1.5px solid var(--ink); border-radius: 0;
  transition: background-color 0.18s steps(3), color 0.18s steps(3), transform 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--between); border-color: var(--between); color: #fff; }
.top-cta { min-height: 40px; padding: 6px 16px; font-size: 14.5px; }
.btn.big { min-height: 58px; padding: 12px 30px; font-size: 18px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 왼쪽 세로 차례(넓은 화면) ── */
.index { position: fixed; left: clamp(14px, 2.2vw, 30px); top: 50%; transform: translateY(-50%); z-index: 9; display: flex; gap: 12px; align-items: stretch; }
.index ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; order: 2; }
.index a { display: flex; align-items: baseline; gap: 8px; padding: 4px 6px; color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.2; }
.index a b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 15px; min-width: 1.6em; }
.index a span { opacity: 0; transform: translateX(-4px); transition: opacity 0.2s ease, transform 0.2s ease; }
.index:hover a span, .index a[aria-current="true"] span, .index a:focus-visible span { opacity: 1; transform: none; }
.index a[aria-current="true"] { color: var(--ink); }
.index-bar { width: 1px; background: var(--hair); position: relative; order: 1; }
.index-bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: top; transform: scaleY(0); }

/* ── 장면 공통: 가는 선 위의 판(panel) ── */
main { position: relative; z-index: 1; }
.scene { position: relative; min-height: 135vh; display: flex; align-items: center; padding: 18vh clamp(20px, 8vw, 140px); }
.scene.right { justify-content: flex-end; }
.panel {
  width: min(31rem, 100%); position: relative;
  padding: 22px 26px 18px; background: var(--paper); border: 1px solid var(--hair);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.panel::before { content: ""; position: absolute; left: -1px; top: -1px; width: 22px; height: 3px; background: var(--ink); }
.scene.wide .panel { width: min(36rem, 100%); }
.chap { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--hair-2); font-size: 13px; color: var(--muted); }
.chap b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; color: var(--ink); }
.chap em { margin-left: auto; font-size: 16px; }
.chap.center { justify-content: center; border-bottom: 0; }
.chap.center em { margin-left: 6px; }
h2 { font-size: clamp(28px, 2.9vw, 40px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.22; margin: 0 0 0.6em; }
h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.45; margin: 0 0 0.2em; }
.quote { font-size: 19px; font-weight: 500; padding: 10px 0 10px 16px; border-left: 3px solid var(--human); }

/* ── 첫 화면: 가운데 위 3D 로고(캔버스) + 그 아래 제목 ── */
.hero { min-height: 100vh; min-height: 100svh; align-items: flex-end; justify-content: center; text-align: center; padding-bottom: 9vh; }
.hero-in { max-width: 54rem; }
.metaphor { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.kicker { font-size: 15px; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 14px; }
.kicker em { font-size: 22px; color: var(--ink); }
.headline { font-size: clamp(34px, 4.6vw, 70px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.12; margin: 0 0 0.45em; }
.w-px, .w-drop { position: relative; display: inline-block; }
/* «기술» 밑에는 네모 픽셀 줄, «인간» 밑에는 둥근 물방울 줄 */
.w-px::after, .w-drop::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.08em; height: 0.16em; }
.w-px { color: var(--tech); }
.w-px::after { background: repeating-linear-gradient(90deg, var(--tech) 0 0.14em, transparent 0.14em 0.26em); }
.w-drop { color: var(--human); }
.w-drop::after { background: radial-gradient(circle at 0.08em 50%, var(--human) 0.07em, transparent 0.075em) 0 0 / 0.26em 100% repeat-x; }
.lead { font-size: 19px; font-weight: 450; margin: 0 auto 1em; max-width: 34rem; }
.hint { font-size: 14.5px; color: var(--muted); max-width: 32rem; margin: 0 auto; }
.hint b { font-weight: 600; color: var(--ink); }

/* ── 원칙 ── */
.ways { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ways li { padding: 14px 0 12px 34px; border-top: 1px solid var(--hair-2); position: relative; }
.ways li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 10px; height: 10px; background: var(--tech); }
.ways li:nth-child(2)::before { border-radius: 30%; background: var(--between); }
.ways li:nth-child(3)::before { border-radius: 50%; background: var(--human); }
.ways li:nth-child(4)::before { border-radius: 50%; background: var(--pink); }
.ways p { margin: 0; font-size: 15.5px; color: var(--muted); }

/* ── 인터뷰 ── */
.finds { list-style: none; margin: 0 0 1em; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.finds li { padding: 3px 10px; font-size: 14px; border: 1px solid var(--hair); }
.mini, .concept { margin-top: 1.1em; padding: 16px 0 6px; border-top: 1px dashed var(--hair); }
.mini[hidden], .concept[hidden] { display: none; }
.mini-title { font-size: 16px; font-weight: 650; margin-bottom: 0.2em; }
.demo { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 15px; color: var(--muted); margin-left: 6px; }
.mini-step { font-size: 12.5px; color: var(--muted); margin: 0 0 0.3em; letter-spacing: 0.06em; }
.mini-q { display: block; font-size: 18px; font-weight: 550; line-height: 1.45; margin-bottom: 10px; }
.mini-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mini input {
  flex: 1 1 13rem; min-width: 0; min-height: 48px; font: inherit; font-size: 16px; padding: 10px 14px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
}
.mini input:focus-visible { outline: none; border-bottom-color: var(--between); box-shadow: 0 1.5px 0 var(--between); }
.concept:focus { outline: none; }
.concept:focus-visible { outline: 3px solid var(--focus); }
.concept-k { font-size: 12.5px; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 0.2em; }
.concept-name { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.035em; margin: 0 0 0.3em; }
.concept-line { font-size: 17px; }
.concept-meta { margin: 0 0 1em; display: grid; gap: 0; }
.concept-meta div { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--hair-2); }
.concept-meta dt { font-size: 13.5px; color: var(--muted); }
.concept-meta dd { margin: 0; font-size: 15.5px; }
.swatches { display: flex; gap: 6px; align-items: center; }
.sw { width: 28px; height: 28px; display: inline-block; border: 1px solid var(--hair); }
.sw:nth-child(2) { border-radius: 30%; }
.sw:nth-child(3) { border-radius: 50%; }
.concept-foot { font-size: 13.5px; color: var(--muted); }

/* ── 두 극점 ── */
.pairs { list-style: none; margin: 0 0 0.4em; padding: 0; }
.pairs li { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hair-2); font-size: 16px; font-weight: 500; }
.pairs .t { color: var(--tech); }
.pairs .h { color: var(--human); text-align: right; }
.pairs i { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); line-height: 1; }
.pole-label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.pole-label span:first-child { color: var(--tech); }
.pole-label span:last-child { color: var(--human); }
#poleRange { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; background: transparent; cursor: pointer; margin: 0; }
#poleRange::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--tech), var(--between), var(--human)); }
#poleRange::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--tech), var(--between), var(--human)); }
#poleRange::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; background: var(--bg); border: 2px solid var(--ink); }
#poleRange::-moz-range-thumb { width: 18px; height: 18px; background: var(--bg); border: 2px solid var(--ink); border-radius: 0; }
#poleRange:disabled { opacity: 0.5; cursor: not-allowed; }

.touch { margin-top: 1.3em; }
.touch-note { font-size: 14px; color: var(--muted); margin-top: 0.8em; min-height: 3.2em; }
.touch-note.center { text-align: center; }

/* ── 작품 목록: 잡지 차례처럼 한 줄씩 ── */
.gallery { position: relative; z-index: 1; padding: 6vh clamp(20px, 8vw, 140px) 24vh; }
.gallery-h { font-size: 15px; font-weight: 500; color: var(--muted); max-width: 1180px; margin: 0 auto 10px; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); display: flex; gap: 12px; align-items: baseline; letter-spacing: 0; }
.gallery-h em { font-size: 30px; color: var(--ink); }
.works { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; }
.work a {
  display: grid; grid-template-columns: 3.2em 220px 1fr 2em; align-items: center; gap: 22px;
  padding: 16px 6px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hair);
  background: var(--paper); transition: background-color 0.2s steps(3);
}
.work a:hover { background: color-mix(in srgb, var(--between) 9%, var(--bg)); }
.work-no { font-family: var(--serif); font-style: italic; font-size: 28px; color: var(--muted); }
.work-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--between); position: relative; display: block; border: 1px solid var(--hair); }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(0.85) contrast(1.05); transition: filter 0.35s ease, transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.work a:hover .work-thumb img, .work a:focus-visible .work-thumb img { filter: none; transform: scale(1.04); }
.work-thumb.no-img::after { content: "nio"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 40px; font-weight: 700; }
.work-body { display: grid; gap: 4px; }
.work-title { font-size: 21px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.35; }
.work-brand { display: inline-block; vertical-align: 0.15em; margin-left: 4px; padding: 1px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--human); border: 1px solid currentColor; border-radius: 999px; }
.work-desc { font-size: 15px; color: var(--muted); line-height: 1.6; }
.work-meta { font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }
.work-go { font-size: 24px; justify-self: end; transition: transform 0.2s steps(2); }
.work a:hover .work-go { transform: translate(3px, -3px); }
.work-empty { color: var(--muted); padding: 20px; text-align: center; }

/* ── 시작: 지평선과 해(캔버스) 위에 가운데 정렬 ── */
.closing { min-height: 150vh; }   /* 판은 왼쪽, 지평선과 해(캔버스)는 오른쪽 */
.closing-in { width: min(38rem, 100%); padding: 22px 26px 18px; background: var(--paper); border: 1px solid var(--hair); position: relative; }
.closing-in::before { content: ""; position: absolute; left: -1px; top: -1px; width: 22px; height: 3px; background: var(--ink); }
.question { font-size: clamp(30px, 3.8vw, 52px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.2; margin: 0.2em 0 0.5em; }
.closing-lead { font-size: 18px; margin: 0 0 1.2em; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 0.4em; }
.family { list-style: none; padding: 0; margin: 1.6em 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--hair); }
.family li + li a { border-left: 1px solid var(--hair); }
.family a { display: grid; gap: 2px; padding: 14px 10px 4px; text-decoration: none; color: var(--ink); }
.family em { font-size: 17px; color: var(--muted); }
.family b { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.family span { font-size: 13.5px; color: var(--muted); }
.family a[aria-current] b { color: var(--human); }

/* ── 바닥글 · 디자인니오 배지(포트폴리오 자동 등록 표식) ── */
.foot { position: relative; z-index: 1; text-align: center; padding: 34px 20px 50px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--hair-2); background: var(--bg); }
.foot p { margin: 0.4em 0 0; }
.foot-links a { color: var(--muted); }
.nio-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--ink); text-decoration: none; border: 1px solid var(--hair); font-size: 13.5px; letter-spacing: 0.02em; }
.nio-badge img { width: 32px; height: auto; display: block; }
:root[data-theme="dark"] .nio-badge img { filter: invert(1); }
.nio-badge b { font-weight: 650; }
.nojs { position: relative; z-index: 2; text-align: center; padding: 16px; }

:root[data-field="none"] body {
  background-image: radial-gradient(circle, var(--hair) 1px, transparent 1.4px); background-size: 28px 28px; background-attachment: fixed;
}
:root[data-field="none"] #field { display: none; }

/* ── 좁은 화면 ── */
@media (max-width: 1100px) {
  .index { display: none; }
  .work a { grid-template-columns: 2.4em 160px 1fr; }
  .work-go { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top { padding: 10px 14px; gap: 8px; }
  .mark-logo { width: 38px; transform: none; }
  .top-right { gap: 6px; }
  .lang-switch button { padding: 0 8px; font-size: 12.5px; }
  .theme-btn { padding: 0 9px; gap: 6px; font-size: 13px; }
  .top-cta { display: none; }
  .scene, .scene.right { min-height: 150vh; align-items: flex-end; justify-content: stretch; padding: 0 14px 14vh; }
  .panel, .scene.wide .panel { width: 100%; padding: 18px 16px 12px; }
  @supports (background: color-mix(in srgb, red 50%, transparent)) {
    .panel { background: color-mix(in srgb, var(--bg) 72%, transparent); }
  }
  .scene.hero { min-height: 100vh; min-height: 100svh; justify-content: center; padding: 0 16px 7vh; }   /* 모바일 .scene 150vh 를 첫 화면에는 쓰지 않는다(Astra F2) */
  .headline { font-size: 33px; }
  .chap em { display: none; }
  .gallery { padding: 4vh 14px 16vh; }
  .work a { grid-template-columns: 2em 1fr; gap: 10px 12px; padding: 14px 4px; }
  .work-thumb { grid-column: 2; }
  .work-body { grid-column: 2; }
  .work-no { grid-row: 1 / span 2; align-self: start; font-size: 22px; }
  .closing { min-height: 150vh; }
  .closing-in { padding: 20px 16px 16px; }
  .question { font-size: 27px; }
}
@media (max-width: 370px) {
  .mark-name { font-size: 21px; }
  .mark-logo { width: 34px; }
  .lang-switch button { padding: 0 6px; }
  .theme-btn .tb-px { display: none; }
}

/* ── 영어(msg 7539): 라틴 글자는 한글용 좁은 자간을 풀어 준다 ── */
:root[lang="en"] body { letter-spacing: 0; }
:root[lang="en"] h2, :root[lang="en"] .concept-name { letter-spacing: -0.015em; }
:root[lang="en"] .headline, :root[lang="en"] .question { letter-spacing: -0.025em; }
:root[lang="en"] .headline { font-size: clamp(32px, 4.2vw, 62px); }   /* 영어 제목은 두 줄에 들도록 조금 작게(넘치면 3D 로고와 겹친다) */
:root[lang="en"] h3, :root[lang="en"] .work-title, :root[lang="en"] .family b, :root[lang="en"] .btn { letter-spacing: 0; }
:root[lang="en"] .lead, :root[lang="en"] .hint, :root[lang="en"] .closing-lead { text-wrap: balance; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
