/* ============================================================
   비개발자의 개발이야기 — 공통 스타일 (다크 고정)
   허브 포인트: 앰버 / 프로젝트별 포인트는 --accent 를 페이지에서 덮어쓴다
   자바스크립트 없음. 모든 페이지가 이 한 벌을 공유한다.
   ============================================================ */

:root {
  --bg: #0b0d12;
  --bg-2: #10131a;
  --surface: #14181f;
  --surface-2: #1b2029;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);

  --text: #f3f5f9;
  --text-2: #bcc3d0;
  --text-3: #848c9c;

  /* 허브 기본 포인트 = IMAGO 브랜드 노랑. 프로젝트 페이지에서 body[style] 로 교체된다 */
  --accent: #ffcd00;
  --accent-soft: rgba(255, 205, 0, 0.13);
  --accent-line: rgba(255, 205, 0, 0.32);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;

  --maxw: 1120px;
  --maxw-narrow: 760px;

  --shadow: 0 22px 64px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Noto Sans KR", -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

/* 한국어 줄바꿈 — 어절 단위로만 자르고, 제목은 줄 길이 균형 */
h1, h2, h3, h4, p, li, dd, dt, figcaption, th, td {
  word-break: keep-all;
  overflow-wrap: break-word;
}
h1, h2, h3, h4 { text-wrap: balance; margin: 0; line-height: 1.24; letter-spacing: -0.028em; font-weight: 700; }
p, li { text-wrap: pretty; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #10131a;
  font-weight: 700;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.wrap { width: min(var(--maxw), calc(100% - 40px)); margin: 0 auto; }
/* 읽는 글은 한 줄이 짧아야 한다. 다만 페이지의 왼쪽 기준선은 넓은 단과 맞춰
   가운데로 밀려 보이지 않게 한다 — 폭만 좁히고 위치는 그대로 둔다. */
.wrap-narrow { width: min(var(--maxw), calc(100% - 40px)); margin: 0 auto; }
.wrap-narrow > * { max-width: var(--maxw-narrow); }

/* ---------- 헤더 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 13, 18, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.01rem;
}
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; display: block; border-radius: 8px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
  color: var(--text-3);
  list-style: none;
  flex-wrap: wrap;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--accent); }

/* ---------- 버튼 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 700;
  font-size: 0.96rem;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent-line); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0d12;
}
.btn-primary:hover { background: var(--accent); filter: brightness(1.07); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 공통 섹션 ---------- */

.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.kicker {
  display: block;
  color: var(--accent);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.section-head { max-width: 720px; }
.section-head h2 { margin-top: 12px; font-size: clamp(1.65rem, 3.4vw, 2.5rem); }
.section-head > p { margin-top: 14px; color: var(--text-2); font-size: 1.02rem; }

/* ---------- 히어로 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 460px at 88% -12%, var(--accent-soft), transparent 62%),
    radial-gradient(700px 420px at 4% 4%, rgba(255, 255, 255, 0.045), transparent 60%),
    var(--bg);
}
.hero-inner { padding: 82px 0 76px; }
/* 홈 히어로 — 문장 옆에 캐릭터가 선다 */
.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
}
.hero-character { position: relative; justify-self: end; }
/* 캐릭터 뒤에 옅은 빛을 깔아, 검은 머리·바지가 어두운 배경에 묻히지 않게 한다 */
.hero-character::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 118%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 62%);
}
.hero-character img {
  position: relative;
  width: clamp(220px, 26vw, 340px);
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55));
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}
.hero h1 {
  margin-top: 22px;
  max-width: 15ch;
  font-size: clamp(2.2rem, 6.4vw, 4.1rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.hero-lead {
  margin-top: 22px;
  max-width: 60ch;
  color: var(--text-2);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
}
.hero .btn-row { margin-top: 32px; }

/* 프로젝트 상세 히어로 (아이콘 + 텍스트 2단) */
.hero-project { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: start; }
.hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.hero-project h1 { margin-top: 16px; max-width: 21ch; font-size: clamp(1.9rem, 5vw, 3.15rem); }
.hero-project .hero-lead { margin-top: 18px; }

/* ---------- 상태 배지 ---------- */

.badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-size: 0.81rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-live { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 여정(연대기) ---------- */

.journey {
  margin-top: 44px;
  list-style: none;
  display: grid;
  gap: 0;
}
.journey-step {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 190px;
  gap: 0 26px;
  padding-bottom: 56px;
}
.journey-step:last-child { padding-bottom: 0; }
/* 칸과 칸을 잇는 세로선 — 마지막 칸에서는 끊는다 */
.journey-step::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 62px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent-line), var(--border) 55%);
}
.journey-step:last-child::before { display: none; }
.journey-marker {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.journey-body { padding-top: 4px; max-width: 74ch; }
/* 칸마다 다른 표정. 원본 비율이 제각각이라 폭이 아니라 높이를 맞춰 크기를 고른다. */
.journey-character {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  padding-top: 10px;
  display: flex;
  justify-content: center;
}
.journey-character img {
  width: auto;
  max-width: 100%;
  max-height: 176px;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.5));
}
.journey-when {
  display: block;
  color: var(--text-3);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.journey-body h3 { margin-top: 8px; font-size: clamp(1.25rem, 2.6vw, 1.72rem); }
.journey-body > p { margin-top: 14px; color: var(--text-2); font-size: 1.01rem; }
.journey-body strong { color: var(--text); font-weight: 700; }
.journey-learned {
  margin-top: 18px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.98rem;
}
.journey-learned span {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.journey-note { margin-top: 12px; color: var(--text-3); font-size: 0.9rem; }
.journey-visual {
  position: relative;
  display: block;
  margin-top: 22px;
  max-width: 560px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.journey-visual:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.journey-visual img { width: 100%; }
.journey-visual-label {
  display: block;
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.94rem;
}

/* ---------- 의견 요청 ---------- */

.journey-link { margin-top: 20px; }
.journey-link a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.94rem;
}
.journey-link a:hover { border-color: var(--accent-line); }

/* ---------- FAQ ---------- */

.faq { margin-top: 30px; display: grid; gap: 14px; }
.faq-item {
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.faq-item h3 { font-size: 1.06rem; color: var(--text); }
.faq-item h3::before { content: "Q. "; color: var(--accent); font-weight: 800; }
.faq-item p { margin-top: 12px; color: var(--text-2); font-size: 0.99rem; }
.faq-item strong { color: var(--text); font-weight: 700; }
.faq-item a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 의견 요청 ---------- */

.feedback-actions { margin-top: 28px; }
.hero-lead-sub { margin-top: 16px; color: var(--text-2); }
.hero-lead-sub strong { color: var(--accent); font-weight: 700; }

/* ---------- 프로젝트 카드 (허브) ---------- */

.card-grid { margin-top: 42px; display: grid; gap: 22px; }
.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}
.project-card:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.project-card-body { padding: 34px; display: flex; flex-direction: column; gap: 16px; }
.project-card-head { display: flex; align-items: center; gap: 14px; }
.project-card-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-2);
}
.project-card h3 { font-size: 1.4rem; }
.project-card-kind { color: var(--text-3); font-size: 0.86rem; font-weight: 700; }
.project-card p { color: var(--text-2); font-size: 0.99rem; }
.project-card-more { margin-top: auto; color: var(--accent); font-weight: 700; font-size: 0.95rem; }
.project-card-visual { position: relative; background: var(--bg-2); border-left: 1px solid var(--border); }
.project-card-visual img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 사실 목록 ---------- */

.facts {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.fact { padding: 20px 22px; background: var(--surface); }
.fact dt { color: var(--text-3); font-size: 0.79rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.fact dd { margin: 6px 0 0; font-size: 1.02rem; font-weight: 700; }

/* ---------- 본문 블록 ---------- */

.blocks { margin-top: 40px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.block {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.block h3 { font-size: 1.14rem; }
.block p { margin-top: 10px; color: var(--text-2); font-size: 0.98rem; }
.block-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-weight: 900;
  font-size: 0.92rem;
}

.prose { margin-top: 22px; display: grid; gap: 16px; max-width: 68ch; }
.prose p { color: var(--text-2); font-size: 1.02rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 스크린샷 ---------- */

.shots { margin-top: 40px; display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shot figure { margin: 0; }
/* 스크린샷은 잘라 내지 않는다 — 실제 화면이 증거라, 아래가 잘리면 의미가 준다.
   비율을 고정하는 대신 원본 비율 그대로 세운다. */
.shot-frame {
  border: 7px solid #1a1f28;
  border-radius: 26px;
  background: #1a1f28;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.shot-frame img { width: 100%; height: auto; display: block; border-radius: 19px; }
.shot figcaption { margin-top: 12px; text-align: center; color: var(--text-3); font-size: 0.88rem; }

.wide-figure { margin: 40px 0 0; }
.wide-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.wide-figure figcaption { margin-top: 12px; color: var(--text-3); font-size: 0.9rem; }

/* ---------- 라인업 표 ---------- */

.lineup { margin-top: 34px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lineup table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.lineup th, .lineup td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lineup thead th {
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
}
.lineup tbody tr:last-child td { border-bottom: 0; }
.lineup tbody tr { background: var(--surface); }
.lineup td:first-child { font-weight: 700; color: var(--text); }
.lineup-dir { color: var(--text-2); white-space: nowrap; }

/* ---------- 배너 ---------- */

.banner {
  margin: 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(90deg, var(--accent-soft), transparent 62%), var(--bg-2);
}
.banner-inner {
  padding: 52px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}
.banner h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.banner p { margin-top: 10px; color: var(--text-2); max-width: 56ch; }

/* ---------- 문서(개인정보처리방침) ---------- */

.doc { padding: 56px 0 88px; }
.doc-head { padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.doc-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.doc-meta { margin-top: 14px; color: var(--text-3); font-size: 0.92rem; }
.doc-langs { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.doc-langs a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text-2);
}
.doc-langs a:hover { border-color: var(--accent-line); color: var(--accent); }

.doc-body { font-size: 1rem; color: var(--text-2); }
.doc-body h2 {
  margin-top: 72px;
  padding-top: 8px;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--text);
  scroll-margin-top: 90px;
}
.doc-body > h2:first-child { margin-top: 40px; }
.doc-body h3 {
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-line);
  font-size: 1.08rem;
  color: var(--text);
}
.doc-body p { margin-top: 14px; }
.doc-body ul { margin-top: 14px; padding-left: 22px; list-style: disc; }
.doc-body li { margin-top: 9px; }
.doc-body strong { color: var(--text); font-weight: 700; }
.doc-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.9em;
  word-break: break-all;
}
.doc-body .muted { color: var(--text-3); font-size: 0.92rem; }
.doc-body hr { margin: 56px 0 0; border: 0; border-top: 1px solid var(--border); }
.doc-body table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-size: 0.93rem;
  display: block;
  overflow-x: auto;
}
.doc-body th, .doc-body td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.doc-body th { background: var(--surface-2); color: var(--text); font-weight: 700; white-space: nowrap; }

/* ---------- 404 ---------- */

.notfound { padding: 120px 0; text-align: center; }
.notfound h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.notfound p { margin-top: 18px; color: var(--text-2); }
.notfound .btn-row { margin-top: 30px; justify-content: center; }

/* ---------- 푸터 ---------- */

.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner {
  padding: 38px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 0.9rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- 반응형 ---------- */

@media (max-width: 940px) {
  .hero-home { grid-template-columns: 1fr; gap: 8px; }
  .hero-character { justify-self: center; order: -1; }
  .hero-character img { width: clamp(170px, 34vw, 210px); }
  .journey-step { grid-template-columns: 66px minmax(0, 1fr) 116px; }
  .journey-character img { max-height: 112px; }
  .project-card { grid-template-columns: 1fr; }
  .project-card-visual { border-left: 0; border-top: 1px solid var(--border); aspect-ratio: 16 / 9; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner-inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap, .wrap-narrow { width: calc(100% - 32px); }
  /* 좁은 화면에서는 표정을 넣을 폭이 안 나온다. 글 폭을 지키는 쪽을 택했다
     (히어로의 큰 캐릭터가 이미 있으므로 브랜드는 유지된다). */
  .journey-step { grid-template-columns: 46px minmax(0, 1fr); gap: 0 16px; padding-bottom: 44px; }
  .journey-step::before { left: 22px; top: 50px; }
  .journey-marker { width: 46px; height: 46px; border-radius: 14px; font-size: 0.94rem; }
  .journey-character { display: none; }
  .section { padding: 60px 0; }
  .hero-inner { padding: 56px 0 52px; }
  .hero-project { grid-template-columns: 1fr; gap: 18px; }
  .hero-icon { width: 68px; height: 68px; border-radius: 17px; }
  .project-card-body { padding: 26px; }
  .shots { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; }
  .site-nav { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0; }
  .nav-links { gap: 16px; font-size: 0.87rem; }
  .doc-body table { font-size: 0.87rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
