/* ==========================================================
   우예빈 포트폴리오 · Bright Order 디자인 시스템
   기존 Design Identity Board(identity/index.html)의 토큰을 그대로 가져와
   긴 글을 읽는 포트폴리오 구조에 맞게 확장했습니다.
   ========================================================== */
:root {
  /* Color: Identity Board와 동일 */
  --ground: #F5F7FB;
  --surface: #FFFFFF;
  --soft: #F1F3F8;
  --navy: #0D0A3A;
  --ink-2: #2A2750;
  --muted: #5A5880;
  --line: #DDE1EA;
  --cyan: #7DDCF5;
  --yellow: #F5E14E;
  --lavender: #A9A3F5;
  /* 연한 틴트: 태그·배지 배경 (글자는 항상 navy) */
  --cyan-t: #E3F7FD;
  --lav-t: #ECEAFE;
  --yel-t: #FCF7CF;
  --danger: #C2264B;
  --ok: #1F7A5A;

  --radius: 24px;
  --radius-s: 14px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --kr: 'Pretendard', 'Pretendard Variable', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --en: 'Outfit', 'Pretendard', sans-serif;
  --max: 1200px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--navy);
  font-family: var(--kr);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.02em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; border-radius: 10px; }
.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: -60px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; text-decoration: none; }
.skip:focus { top: 12px; }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: rgba(245,247,251,.92); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(245,247,251,.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--en); font-weight: 600; font-size: 14px; letter-spacing: .2em; text-decoration: none; white-space: nowrap; }
.dots3 { display: inline-flex; gap: 5px; }
.dots3 i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dots3 i:nth-child(1) { background: var(--cyan); }
.dots3 i:nth-child(2) { background: var(--yellow); }
.dots3 i:nth-child(3) { background: var(--lavender); }
.nav { display: flex; gap: 4px; }
.nav a { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { background: var(--soft); color: var(--navy); }
.nav a[aria-current="page"] { background: var(--navy); color: #fff; }

/* ---------- Common type ---------- */
.eyebrow { font-family: var(--en); font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.section { padding-block: 88px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--en); font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.section-head p { color: var(--muted); font-size: 15px; max-width: 32em; }
.tag { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--soft); color: var(--navy); white-space: nowrap; }
.tag.c { background: var(--cyan-t); } .tag.l { background: var(--lav-t); } .tag.y { background: var(--yel-t); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Hero ---------- */
.hero { padding-block: 72px 40px; }
.hero .container { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.28; font-weight: 400; letter-spacing: -.035em; margin-top: 18px; }
.hero h1 b { font-weight: 800; }
.hero .lead { margin-top: 22px; color: var(--muted); font-size: 17px; max-width: 34em; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, opacity .2s; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(13,10,58,.5); }
.btn-ghost { background: var(--surface); color: var(--navy); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--navy); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.pattern { background: var(--surface); border-radius: var(--radius); padding: 30px 28px; display: flex; flex-direction: column; justify-content: center; gap: 18px; overflow: hidden; min-height: 300px; }
.prow { display: flex; align-items: center; gap: 16px; }
.prow span { flex: none; height: 12px; border-radius: 999px; transition: transform .35s var(--ease); }
.pattern:hover .prow span.pill { transform: scaleX(1.08); transform-origin: left; }

/* ---------- Project index ---------- */
.index { display: flex; flex-direction: column; border-top: 2px solid var(--navy); }
.p-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 340px); gap: 28px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; position: relative; }
.p-row::before { content: ""; position: absolute; inset: 8px -16px; border-radius: var(--radius); background: var(--surface); opacity: 0; transform: scale(.985); transition: opacity .25s var(--ease), transform .25s var(--ease); z-index: -1; }
.p-row:hover::before, .p-row:focus-visible::before { opacity: 1; transform: none; }
.p-row:focus-visible { outline: none; }
.p-row:focus-visible::before { box-shadow: 0 0 0 3px var(--lavender); }
.p-num { font-family: var(--en); font-size: 28px; font-weight: 700; letter-spacing: -.02em; align-self: start; padding-top: 2px; }
.p-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.p-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.p-title h3 { font-family: var(--en), var(--kr); font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.p-one { font-size: 18px; font-weight: 600; color: var(--ink-2); }
.p-meta { font-size: 14px; color: var(--muted); }
.p-more { font-size: 14px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; color: var(--navy); }
.p-more .arrow { transition: transform .25s var(--ease); }
.p-row:hover .p-more .arrow { transform: translateX(4px); }
.p-status { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 3px 10px; }
.p-thumb { border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 16 / 9; background: var(--soft); max-width: 100%; }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.p-row:hover .p-thumb img { transform: scale(1.04); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 28px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 28px; min-width: 0; }
.profile { display: flex; flex-direction: column; gap: 18px; }
.profile img { width: 148px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-s); background: var(--soft); }
.profile h3 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.profile .role { font-family: var(--en); font-size: 17px; font-weight: 500; color: var(--ink-2); margin-top: 4px; }
.contact { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.contact a { color: var(--navy); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.contact a:hover { border-bottom-color: var(--navy); }
.copy-btn { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 2px 10px; margin-left: 6px; }
.copy-btn:hover { color: var(--navy); }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.about-grid .card { display: flex; flex-direction: column; gap: 16px; }
.about-grid .wide { grid-column: 1 / -1; }
.profile { align-self: start; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; font-size: 15px; }
.timeline time { font-family: var(--en); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.timeline strong { font-weight: 600; display: block; }
.timeline small { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.skills { display: flex; flex-direction: column; gap: 14px; }
.skills h4 { font-family: var(--en); font-size: 12px; letter-spacing: .16em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

/* ---------- Statement band ---------- */
.statement { position: relative; overflow: hidden; border-radius: 28px; background: var(--navy); color: #fff; padding: 52px 56px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: start; }
.statement .ring { position: absolute; border-radius: 50%; pointer-events: none; }
.statement .label { position: relative; font-family: var(--en); font-size: 13px; font-weight: 600; letter-spacing: .24em; line-height: 1.7; color: #C9C6FF; }
.statement .text { position: relative; display: flex; flex-direction: column; gap: 22px; }
.statement .text p { font-size: clamp(18px, 1.7vw, 23px); font-weight: 600; line-height: 1.65; letter-spacing: -.01em; }
.statement .text p span { display: block; }
.statement a { align-self: flex-start; display: inline-flex; gap: 8px; align-items: center; color: var(--navy); background: #fff; text-decoration: none; font-weight: 700; font-size: 14px; border-radius: 999px; padding: 10px 18px; transition: transform .2s var(--ease); }
.statement a:hover { transform: translateY(-2px); }

/* ---------- Survey ---------- */
.survey { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.survey-intro h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; line-height: 1.3; letter-spacing: -.03em; margin-top: 14px; }
.survey-intro p { color: var(--muted); margin-top: 14px; font-size: 15px; }
.survey-intro .note { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; }
.survey-card { background: var(--surface); border-radius: var(--radius); padding: 32px; }
.survey-form { display: flex; flex-direction: column; gap: 30px; }
.survey-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.survey-form legend { padding: 0; margin-bottom: 14px; font-weight: 700; font-size: 17px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.q-num { font-family: var(--en); font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .08em; }
.q-req { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--yel-t); }
.q-opt { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 16px; border-radius: var(--radius-s); background: var(--soft); font-size: 15px; font-weight: 500; cursor: pointer; transition: background .2s, box-shadow .2s, transform .15s var(--ease); }
.option span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); transition: box-shadow .2s, background .2s; }
.option:hover span { background: #E8EBF4; }
.option input:checked + span { background: var(--surface); box-shadow: inset 0 0 0 2px var(--navy); font-weight: 700; }
.option input:checked + span::before { background: var(--navy); box-shadow: inset 0 0 0 4px var(--surface), 0 0 0 2px var(--navy); }
.option input:focus-visible + span { outline: 3px solid var(--lavender); outline-offset: 2px; }
.option:active span { transform: scale(.985); }
.option small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.survey-form textarea { width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: 15px; line-height: 1.6; color: var(--navy); background: var(--soft); border: 0; border-radius: var(--radius-s); padding: 14px 16px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .2s, background .2s; }
.survey-form textarea:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 2px var(--navy); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.count { font-family: var(--en); font-variant-numeric: tabular-nums; }
.count.over { color: var(--danger); font-weight: 600; }
.error { font-size: 13px; font-weight: 600; color: var(--danger); margin-top: 10px; }
fieldset.invalid .option span { box-shadow: inset 0 0 0 1px rgba(194,38,75,.45); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.submit-row .btn { min-width: 160px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { font-size: 14px; border-radius: var(--radius-s); padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; }
.status.err { background: #FCE8EE; color: var(--danger); }
.status.info { background: var(--soft); color: var(--ink-2); }
.status button { text-decoration: underline; font-weight: 700; }
.done { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 8px 0; }
.done .check { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.done .check svg { width: 26px; height: 26px; }
.done h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.done p { color: var(--muted); font-size: 15px; }
.done .summary { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 40px 56px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; }
.site-footer a { color: var(--ink-2); }

/* ==========================================================
   Case study
   ========================================================== */
.case-hero { padding-block: 56px 48px; }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 28px; }
.back:hover { color: var(--navy); }
.case-hero .grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.case-hero h1 { font-family: var(--en); font-size: clamp(48px, 7vw, 88px); line-height: .95; font-weight: 700; letter-spacing: -.045em; margin-top: 14px; }
.case-hero .tagline { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; margin-top: 22px; letter-spacing: -.02em; line-height: 1.45; }
.case-hero .desc { color: var(--muted); margin-top: 14px; font-size: 16px; max-width: 36em; }
.case-hero .visual { border-radius: var(--radius); overflow: hidden; background: var(--surface); max-width: 100%; }
.case-hero .visual.phone { background: transparent; border-radius: 0; display: flex; justify-content: center; }
.case-hero .visual.phone img { max-height: 540px; width: auto; border-radius: 28px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius-s); overflow: hidden; margin-top: 32px; }
.facts div { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts dt { font-family: var(--en); font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.facts dd { margin: 0; font-size: 14px; font-weight: 600; }

.case-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; align-items: start; padding-block: 24px 88px; }
/* 과정 표시: 단계는 점(dot), 지금 읽는 단계는 pill로 늘어남 — Identity Board의 Dot/Line 토큰 */
.rail { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 2px; }
.rail .eyebrow { margin-bottom: 10px; }
.rail a { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s; }
.rail a i { flex: none; width: 10px; height: 10px; border-radius: 999px; background: var(--line); transition: width .3s var(--ease), background .3s; }
.rail a:hover { color: var(--navy); }
.rail a.active { color: var(--navy); font-weight: 700; }
.rail a.active i { width: 28px; background: linear-gradient(90deg, var(--cyan), var(--lavender)); }
.case-body { display: flex; flex-direction: column; gap: 96px; min-width: 0; }
.chapter { display: flex; flex-direction: column; gap: 24px; }
.chapter > header { display: flex; flex-direction: column; gap: 10px; }
.chapter > header .eyebrow b { color: var(--navy); }
.chapter h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.35; letter-spacing: -.03em; }
.chapter .intro { font-size: 17px; color: var(--ink-2); max-width: 40em; }
.chapter h3 { font-size: 19px; font-weight: 700; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.box { background: var(--surface); border-radius: var(--radius-s); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.box .k { font-size: 13px; font-weight: 700; color: var(--muted); }
.box h4 { font-size: 17px; font-weight: 700; line-height: 1.45; }
.box p { font-size: 15px; color: var(--ink-2); }
.box .src { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.stat { font-family: var(--en); font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat small { font-size: 18px; }
.quote { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.quote span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.callout { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 28px 30px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; }
.callout .k { font-family: var(--en); font-size: 12px; letter-spacing: .18em; color: #C9C6FF; font-weight: 600; }
.callout h4 { font-size: 21px; font-weight: 700; line-height: 1.5; margin-top: 8px; }
.callout p { color: #DCDAF5; font-size: 15px; align-self: center; }
.chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.chain .box:last-child { background: var(--navy); color: #fff; }
.chain .box:last-child .k { color: #C9C6FF; }
.chain .box:last-child p, .chain .box:last-child h4 { color: #fff; }
.methods { display: flex; flex-wrap: wrap; gap: 8px; }
.methods span { background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 14px; }
.methods b { margin-right: 6px; }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--lav-t); align-self: flex-start; }
.evidence { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.evidence span { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; }
.evidence span::before { content: "근거"; flex: none; font-size: 11px; font-weight: 700; background: var(--cyan-t); padding: 1px 7px; border-radius: 999px; height: fit-content; }

.journey { background: var(--surface); border-radius: var(--radius-s); padding: 24px 22px 20px; overflow-x: auto; }
.journey ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); position: relative; min-width: 660px; }
.journey ol::before { content: ""; position: absolute; left: 5px; right: 5px; top: 5px; height: 2px; background: var(--line); }
.journey li { position: relative; display: flex; flex-direction: column; gap: 4px; padding-top: 22px; font-size: 12px; color: var(--muted); }
.journey li::before { content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--muted); }
.journey li b { font-family: var(--en); font-size: 13px; letter-spacing: .06em; color: var(--navy); }
.journey li.pivot::before { width: 40px; background: linear-gradient(90deg, var(--yellow), var(--lavender)); box-shadow: none; border-radius: 999px; }
.journey li.planned::before { box-shadow: inset 0 0 0 2px var(--line); }
.journey .cap { font-size: 13px; color: var(--ink-2); margin-bottom: 18px; font-weight: 600; }

.table-wrap { background: var(--surface); border-radius: var(--radius-s); padding: 20px; overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.cmp caption { text-align: left; font-weight: 700; margin-bottom: 4px; }
.cmp .legend { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.cmp th, .cmp td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp thead th { font-weight: 700; font-size: 13px; }
.cmp td { font-family: var(--en); font-weight: 600; color: var(--muted); }
.cmp td:first-child { font-family: var(--kr); color: var(--navy); font-weight: 500; }
.cmp .me { background: var(--yel-t); color: var(--navy); }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: f; }
.flow li { counter-increment: f; background: var(--surface); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.flow li::before { content: counter(f); font-family: var(--en); font-size: 12px; color: var(--muted); }
.flow li.key { background: var(--navy); color: #fff; }
.flow li.key::before { color: #C9C6FF; }
.flow li small { font-weight: 400; color: var(--muted); font-size: 12px; }
.flow li.key small { color: #C9C6FF; }

figure.shot { margin: 0; display: flex; flex-direction: column; gap: 10px; }
figure.shot button { display: block; width: 100%; border-radius: var(--radius-s); overflow: hidden; background: var(--navy); position: relative; cursor: zoom-in; }
figure.shot button img { width: 100%; transition: transform .5s var(--ease); }
figure.shot button:hover img { transform: scale(1.015); }
figure.shot button::after { content: "확대"; position: absolute; right: 12px; bottom: 12px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.92); color: var(--navy); border-radius: 999px; padding: 4px 10px; opacity: 0; transition: opacity .2s; }
figure.shot button:hover::after, figure.shot button:focus-visible::after { opacity: 1; }
figure.shot figcaption { font-size: 13px; color: var(--muted); }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog.lightbox::backdrop { background: rgba(13,10,58,.82); }
dialog.lightbox img { max-height: calc(100vh - 96px); width: auto; border-radius: 12px; margin: 0 auto; }
dialog.lightbox .lb-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--navy); font-size: 22px; line-height: 1; display: grid; place-items: center; }

.list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.pending { border: 1.5px dashed var(--line); border-radius: var(--radius-s); padding: 22px; color: var(--muted); font-size: 15px; background: rgba(255,255,255,.5); }
.pending b { color: var(--navy); }

.next-project { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 28px 30px; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.next-project:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(13,10,58,.4); }
.next-project h3 { font-family: var(--en), var(--kr); font-size: 26px; font-weight: 700; margin-top: 6px; }
.next-project p { color: var(--muted); font-size: 15px; }
.next-project .arrow { font-size: 28px; }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--soft); border-radius: var(--radius); padding: 26px 30px; }
.cta-band p { font-weight: 700; font-size: 18px; }

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding-block: 80px; }
.nf h1 { font-family: var(--en); font-size: clamp(72px, 14vw, 160px); line-height: .9; font-weight: 700; letter-spacing: -.05em; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  html { scroll-padding-top: 132px; }
  .p-row { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 260px); gap: 20px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .profile { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .profile .who { flex: 1; min-width: 200px; }
  .contact { flex-basis: 100%; }
  .case-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail { position: sticky; top: calc(68px + env(safe-area-inset-top, 0px)); flex-direction: row; overflow-x: auto; gap: 4px; background: rgba(245,247,251,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter); z-index: 10; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .rail::-webkit-scrollbar { display: none; }
  .rail .eyebrow { display: none; }
  .rail a { white-space: nowrap; padding: 6px 10px; border-radius: 999px; }
  .rail a.active { background: var(--surface); }
  .case-body { padding-top: 40px; }
}
@media (max-width: 820px) {
  .section { padding-block: 64px; }
  .hero { padding-block: 40px 16px; }
  .hero .container, .case-hero .grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pattern { min-height: 0; padding: 24px 20px; gap: 14px; }
  .p-row { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 28px 0; }
  .p-num { font-size: 18px; padding: 0; }
  .p-row::before { inset: 6px -10px; }
  .p-thumb { order: -1; }
  .about-grid, .survey, .cols-3, .cols-2, .chain, .callout { grid-template-columns: minmax(0, 1fr); }
  .statement { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 36px 26px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .survey-card { padding: 22px 18px; }
  .nav a { padding: 8px 9px; }
}
@media (max-width: 520px) {
  .options { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .brand .brand-text { display: none; }
  .nav { gap: 0; }
  .nav a { font-size: 13px; padding: 7px 8px; }
  .submit-row .btn { width: 100%; }
  .next-project { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================
   포트폴리오 슬라이드 뷰어 + 프로토타입 임베드
   ========================================================== */
.deck { display: flex; flex-direction: column; gap: 14px; }
.deck figure.shot { gap: 0; }
.deck figure.shot button { background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.slide-count { font-family: var(--en); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.proto { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 40px; overflow: hidden; position: relative; }
.proto .k { font-family: var(--en); font-size: 12px; letter-spacing: .2em; color: #C9C6FF; font-weight: 600; }
.proto h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.02em; margin-top: 10px; line-height: 1.35; }
.proto p { color: #DCDAF5; font-size: 15px; margin-top: 12px; max-width: 30em; }
.proto .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.proto .btn-light { background: #fff; color: var(--navy); }
.proto .btn-light:hover { transform: translateY(-2px); }
.proto .btn-line { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.proto .btn-line:hover { box-shadow: inset 0 0 0 1px #fff; }
.proto small { display: block; margin-top: 14px; font-size: 12px; color: #A9A6D6; }
.device { position: relative; width: 390px; max-width: 100%; aspect-ratio: 390 / 844; border-radius: 44px; background: #05041F; padding: 12px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.12); }
.device .screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: var(--soft); position: relative; }
.device iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.device .poster { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: var(--navy); background-size: 100% auto; background-repeat: no-repeat; background-position: center top; }
.device .poster::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(245,247,251,.2), rgba(245,247,251,.92) 70%); }
.device .poster > * { position: relative; }
.device .poster .btn { background: var(--navy); color: #fff; }
.device .poster span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
@media (max-width: 900px) {
  .proto { grid-template-columns: minmax(0, 1fr); padding: 28px 20px; gap: 28px; justify-items: center; }
  .proto > div:first-child { justify-self: stretch; }
  .device { width: min(360px, 100%); }
}
