/* ───────── 토큰 ───────── */
/* 제목 글꼴: Hahmlet(OFL)에서 제목에 쓴 글자만 잘라 둔 파일 (scripts/subset-fonts.py) */
@font-face {
  font-family: "Hahmlet";
  src: url("assets/fonts/hahmlet-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Hahmlet";
  src: url("assets/fonts/hahmlet-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

/* 화면 짜임: 첫 화면과 맨 끝은 밤하늘, 그 사이 본문은 지평선 위로 떠오른 낮의 땅.
   글꼴은 세 가지 목소리로 나눈다. 이름과 제목은 Hahmlet, 설명은 IBM Plex Sans KR,
   잰 값(날짜·커밋 수)은 IBM Plex Mono. */
:root {
  --paper: #EEECF6;      /* 낮의 땅 */
  --card: #F9F8FD;       /* 종이 위에 얹는 밝은 면 */
  --ink: #17152D;        /* 본문 글자 */
  --muted: #5A5673;      /* 보조 글자 */
  --line: #D5D1E4;       /* 선 */
  --night: #121027;      /* 밤하늘 꼭대기 */
  --night-mid: #1C1942;  /* 밤하늘 가운데 */
  --night-low: #2B2462;  /* 지평선 가까이 */
  --night-line: rgba(233, 231, 245, 0.13);
  --night-text: #EDEBF8;
  --night-muted: #A9A5C4;
  --signal: #12795A;     /* 출처 표시 */
  --star: #F1B52E;       /* 강조: 별빛·형광펜 */

  --font-display: "Hahmlet", "Apple SD Gothic Neo", "Noto Serif KR", serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "IBM Plex Sans KR", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 4vw, 40px);
  --section-gap: clamp(88px, 11vw, 168px);
  --entry-gap: clamp(72px, 9vw, 132px);   /* 큰 작품 사이 */
  --horizon: clamp(40px, 8.5vw, 132px);   /* 지평선 곡선 높이 */
  --plate-radius: 14px;
  --plate-shadow:
    0 0 0 1px rgba(23, 21, 45, 0.08),
    0 36px 64px -36px rgba(46, 36, 110, 0.5),
    0 12px 24px -16px rgba(46, 36, 110, 0.24);
}

/* ───────── 기본 ───────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

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

.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-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 10px;
  background: var(--paper); color: var(--ink); text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.ext { margin-left: 0.3em; font-family: var(--font-mono); font-size: 0.85em; }
.nobr { white-space: nowrap; }

/* ───────── 머리 (밤하늘 위) ───────── */
.site-header {
  padding-block: 22px;
  background: var(--night);
  color: var(--night-text);
}
.site-header :focus-visible,
.hero :focus-visible,
.outro :focus-visible,
.site-footer :focus-visible { outline-color: var(--star); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}
.brand__mark {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 0 4px rgba(241, 181, 46, 0.16), 0 0 14px 2px rgba(241, 181, 46, 0.5);
  align-self: center;
}
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.brand__handle { font-family: var(--font-mono); font-size: 0.8rem; color: var(--night-muted); }

.site-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: none;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--night-muted);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.site-nav a:hover { background: rgba(233, 231, 245, 0.09); color: var(--night-text); }

/* ───────── 첫 화면: 밤하늘 ───────── */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--night-text);
  padding-top: clamp(28px, 4.6vw, 68px);
  /* 사진 아랫부분이 지평선 뒤로 조금 잠기게, 지평선 높이보다 덜 띄운다 */
  padding-bottom: calc(var(--horizon) * 0.8);
  background:
    radial-gradient(46% 22% at 50% 100%, rgba(255, 214, 150, 0.16), transparent 74%),   /* 지평선 너머 새벽빛 */
    radial-gradient(120% 58% at 50% 100%, rgba(132, 112, 255, 0.36), transparent 76%),
    linear-gradient(var(--night) 0%, var(--night-mid) 56%, var(--night-low) 100%);
}
/* 붙박이 별: 크기가 다른 두 판을 겹쳐 되풀이가 눈에 띄지 않게 한다. 지평선 쪽으로 갈수록 옅어진다 */
.hero::before,
.outro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 31px 44px, rgba(255, 255, 255, 0.7), transparent 100%),
    radial-gradient(1px 1px at 142px 212px, rgba(255, 255, 255, 0.45), transparent 100%),
    radial-gradient(1.4px 1.4px at 263px 97px, rgba(255, 255, 255, 0.6), transparent 100%),
    radial-gradient(1px 1px at 338px 281px, rgba(255, 255, 255, 0.35), transparent 100%),
    radial-gradient(1px 1px at 86px 318px, rgba(255, 255, 255, 0.5), transparent 100%),
    radial-gradient(1.6px 1.6px at 421px 168px, rgba(241, 181, 46, 0.75), transparent 100%),
    radial-gradient(1px 1px at 498px 61px, rgba(255, 255, 255, 0.4), transparent 100%),
    radial-gradient(1px 1px at 577px 342px, rgba(255, 255, 255, 0.55), transparent 100%),
    radial-gradient(1.3px 1.3px at 204px 402px, rgba(255, 255, 255, 0.5), transparent 100%),
    radial-gradient(1px 1px at 655px 229px, rgba(255, 255, 255, 0.3), transparent 100%);
  background-size:
    389px 353px, 389px 353px, 389px 353px, 389px 353px, 389px 353px,
    683px 467px, 683px 467px, 683px 467px, 683px 467px, 683px 467px;
  -webkit-mask-image: linear-gradient(#000 30%, transparent 92%);
  mask-image: linear-gradient(#000 30%, transparent 92%);
}
.hero > * { position: relative; }

/* 지평선: 본문 땅이 둥글게 올라온다. 가장자리에 대기 빛이 얇게 번진다 */
.horizon {
  position: absolute !important;
  left: 50%;
  bottom: -1px;
  width: max(118vw, 520px);
  height: var(--horizon);
  transform: translateX(-50%);
  background: var(--paper);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  z-index: 1; /* 떠오르는 사진들보다 앞 */
  box-shadow:
    0 -1.5px 0 0 rgba(255, 247, 228, 0.95),
    0 -3px 14px 0 rgba(255, 226, 170, 0.45),
    0 -22px 70px 0 rgba(150, 132, 255, 0.42);
  pointer-events: none;
}
.horizon--down {
  top: -1px;
  bottom: auto;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow:
    0 1.5px 0 0 rgba(255, 247, 228, 0.95),
    0 3px 14px 0 rgba(255, 226, 170, 0.45),
    0 22px 70px 0 rgba(150, 132, 255, 0.42);
}

/* 글은 가운데로 모은다 */
.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--night-muted);
  margin-bottom: 22px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.55rem, 4.7vw + 0.9rem, 4.9rem);
  line-height: 1.13;
  letter-spacing: -0.028em;
  color: #F6F4FF;
  text-wrap: balance;
}
.hero__title mark {
  color: var(--star);
  background: none;
}

.hero__lede {
  margin-top: 28px;
  max-width: 31em;
  font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.14rem);
  color: var(--night-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* 처음 열면 글이 먼저 떠오르고, 이어서 사진이 지평선 뒤에서 올라온다 */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}
.hero__copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__copy > :nth-child(2) { animation-delay: 0.08s; }
.hero__copy > :nth-child(3) { animation-delay: 0.18s; }
.hero__copy > :nth-child(4) { animation-delay: 0.26s; }

/* ───────── 다이얼 ─────────
   작품 화면을 큰 원 위에 둘러 세운다. 가운데 장이 가장 높고, 양옆으로 갈수록 기울면서
   지평선 뒤로 더 잠긴다. 끌거나 화살표로 돌리고(main.js), 한 장을 누르면 그 작품 소개로 간다.
   main.js가 장마다 --i(가운데에서 몇 장 떨어졌는지), --o(불투명도), --z(앞뒤 순서)를 적는다.
   스크립트가 안 돌면 index.html에 적어 둔 --i 그대로 앞쪽 다섯 장이 보인다. */
.fan {
  --w: clamp(176px, 21vw, 310px);   /* 사진 한 장 너비 */
  --step: 6.6deg;                    /* 이웃한 장 사이 각도 (main.js의 STEP_DEG와 같아야 한다) */
  --r: calc(var(--w) * 7.5);         /* 사진 아래에서 원 중심까지 (main.js의 R_PER_W와 같아야 한다) */
  z-index: 0;
  margin-top: clamp(28px, 3.6vw, 48px);
  cursor: grab;
  touch-action: pan-y; /* 세로로 밀면 페이지가 내려가고, 가로로 끌면 돈다 */
  user-select: none;
  -webkit-user-select: none;
}
.fan.is-dragging { cursor: grabbing; }
.fan.is-dragging .fan__link { pointer-events: none; }

.fan__ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: clamp(26px, 3vw, 38px);
}
.fan__hint { font-size: 0.8rem; color: var(--night-muted); }
.fan__btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(233, 231, 245, 0.28);
  border-radius: 50%;
  background: transparent;
  color: var(--night-text);
  font: 500 0.95rem var(--font-mono);
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.fan__btn:hover { background: rgba(233, 231, 245, 0.1); border-color: rgba(233, 231, 245, 0.6); }
/* 돌리는 스크립트가 없으면 조작 줄은 숨긴다 */
.fan:not(.is-live) .fan__ctrl { visibility: hidden; }

.fan__list {
  position: relative;
  height: calc(var(--w) * 0.625);
}
.fan__item {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--w);
  margin-left: calc(var(--w) / -2);
  z-index: var(--z, auto);
  opacity: var(--o, 1);
  transform-origin: 50% calc(100% + var(--r));
  transform: rotate(calc(var(--i) * var(--step)));
  will-change: transform;
}
/* 처음 열 때 가운데부터 차례로 지평선 뒤에서 올라온다 */
.fan__list.is-rising .fan__item {
  animation: fan-rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(0.3s + var(--d, 0) * 0.11s);
}
@keyframes fan-rise {
  from { opacity: 0; transform: rotate(calc(var(--i) * var(--step))) translateY(calc(var(--w) * 0.4)); }
}

.fan__link {
  position: relative;
  display: block;
  border-radius: 12px;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(233, 231, 245, 0.16),
    0 -10px 50px -6px rgba(150, 132, 255, 0.35),
    0 28px 50px -18px rgba(8, 6, 24, 0.7);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s;
}
.fan__link:hover,
.fan__link:focus-visible {
  transform: translateY(calc(var(--w) * -0.07));
  box-shadow:
    0 0 0 1px rgba(233, 231, 245, 0.45),
    0 -12px 60px -4px rgba(150, 132, 255, 0.55),
    0 28px 50px -18px rgba(8, 6, 24, 0.7);
}
.fan__link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
  -webkit-user-drag: none;
}
/* 이름표: 사진 위 모서리에 걸친다. 가운데 온 장은 노랗게 */
.fan__name {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(18, 16, 39, 0.86);
  box-shadow: 0 0 0 1px rgba(233, 231, 245, 0.16);
  color: var(--night-text);
  font-size: clamp(0.62rem, 0.5vw + 0.5rem, 0.78rem);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.fan__link:hover .fan__name,
.fan__link:focus-visible .fan__name { box-shadow: 0 0 0 1px rgba(233, 231, 245, 0.6); }
.fan__item.is-center .fan__name {
  background: var(--star);
  color: var(--ink);
  box-shadow: none;
}

/* 버튼 (밤하늘 위에서만 쓴다) */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn--solid { background: var(--night-text); color: var(--ink); }
.btn--solid:hover { background: #fff; }
.btn--line { border: 1.5px solid rgba(233, 231, 245, 0.45); color: var(--night-text); }
.btn--line:hover { border-color: var(--night-text); background: rgba(233, 231, 245, 0.07); }
.btn:active { transform: translateY(1px); }

/* ───────── 섹션 ───────── */
.section { padding-top: var(--section-gap); scroll-margin-top: 0; }
/* 지평선 바로 아래 첫 섹션은 덜 띄운다 */
.hero + .section { padding-top: clamp(36px, 5vw, 72px); }
.section--how { padding-bottom: clamp(56px, 7vw, 104px); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px 48px;
  margin-bottom: clamp(40px, 5.5vw, 72px);
}
.section-head__main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.section-head__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 2.9vw + 1.1rem, 3.3rem);
  line-height: 1.16;
  letter-spacing: -0.022em;
}
.section-head__count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
}
.section-head__desc {
  max-width: 34em;
  color: var(--muted);
}

/* ───────── 작품 ─────────
   상자에 넣지 않는다. 화면 사진은 땅 위에 놓인 인화지처럼 두고,
   사진 아래 한 줄에 잰 값(응답 시간·커밋 수·날짜)을 고정폭 글꼴로 적는다. */
.card {
  scroll-margin-top: clamp(28px, 6vh, 64px); /* 다이얼에서 눌러 왔을 때 위에 숨을 틈 */
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.shot { min-width: 0; }
.shot__frame {
  aspect-ratio: 16 / 10;
  border-radius: var(--plate-radius);
  background: #DCD8EA;
  overflow: hidden;
  box-shadow: var(--plate-shadow);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s;
}
.shot__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.card:hover .shot__frame {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(23, 21, 45, 0.1),
    0 46px 70px -36px rgba(46, 36, 110, 0.55),
    0 16px 28px -16px rgba(46, 36, 110, 0.28);
}

.shot__cap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin-top: 16px;
  padding-inline: 2px;
}
.shot__cap:empty { display: none; }

.meta {
  font-family: var(--font-mono);
  word-spacing: -0.2em;
  font-variant-numeric: tabular-nums;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--muted);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.card__kicker {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
}
.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 0.9vw + 1.2rem, 1.85rem);
  line-height: 1.22;
  letter-spacing: -0.014em;
  margin-top: -6px;
  scroll-margin-top: clamp(96px, 16vh, 180px); /* 첫 화면 사진을 눌러 왔을 때 사진 위쪽까지 보이게 */
}
.card__text { font-size: 1rem; }
.card__note { font-size: 0.92rem; color: var(--muted); line-height: 1.68; }

/* 사실 목록: 기록 막대와 같은 세로 눈금을 머리표로 쓴다 */
.facts {
  display: grid;
  gap: 7px;
  margin-block: 4px;
}
.facts li {
  position: relative;
  padding-left: 15px;
  font-variant-numeric: tabular-nums;
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.5;
}
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 3px;
  height: 0.9em;
  border-radius: 1.5px;
  background: var(--star);
}

.stack {
  font-family: var(--font-mono);
  word-spacing: -0.12em;
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--muted);
}

.card__foot {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 20px;
}
.links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; }

/* 링크: 가는 밑줄. 열어 보는 링크에는 형광펜을 긋고, 가리키면 글자 전체를 덮는다 */
.link {
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  transition: background-size 0.2s;
}
a.link:not(.link--go) { background-image: linear-gradient(var(--line), var(--line)); }
a.link:not(.link--go):hover { background-image: linear-gradient(var(--ink), var(--ink)); }
.link--go {
  padding: 1px 3px;
  margin-inline: -3px;
  background: linear-gradient(var(--star), var(--star)) 0 92% / 100% 36% no-repeat;
  transition: background-size 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.link--go:hover { background-size: 100% 100%; }
.link--muted {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
  background: none;
}

/* 큰 작품: 사진과 글을 나란히, 한 줄씩 좌우를 바꾼다 */
.card--feature { gap: 28px; }
.card--feature + .card--feature,
.card--feature + .card--study { margin-top: var(--entry-gap); }
.card--feature .card__title {
  font-size: clamp(1.95rem, 2.1vw + 1.15rem, 2.9rem);
  line-height: 1.16;
  letter-spacing: -0.022em;
  margin-top: -4px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(56px, 7vw, 88px) clamp(28px, 4.5vw, 64px);
}
.card--feature + .grid,
.card--study + .grid { margin-top: var(--entry-gap); }

/* MCP 연결 주소 */
.connect {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--night-mid);
  color: var(--night-text);
}
.connect__label { font-size: 0.8rem; color: var(--night-muted); }
.connect__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.connect__url {
  flex: 1 1 220px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  user-select: all;
}
.connect__btn {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(233, 231, 245, 0.3);
  border-radius: 999px;
  background: transparent;
  color: var(--night-text);
  font: 600 0.88rem var(--font-body);
  cursor: pointer;
}
.connect__btn:hover { background: rgba(233, 231, 245, 0.08); }
.connect__btn:focus-visible { outline-color: var(--star); }

/* 사용 예(법령 MCP): 사진 자리에 놓는 대화 한 토막 */
.demo {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--plate-radius);
  background: #E1DDF0;
  box-shadow: inset 0 0 0 1px rgba(23, 21, 45, 0.06);
}
.demo__q {
  align-self: flex-end;
  max-width: 85%;
  padding: 10px 15px;
  border-radius: 16px 16px 4px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
}
.demo__calls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}
.demo__calls li { display: inline-flex; align-items: center; gap: 6px; }
.demo__calls li + li::before { content: "→"; color: var(--muted); }
.demo__calls code {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.demo__a {
  max-width: 92%;
  padding: 12px 15px;
  border-radius: 16px 16px 16px 4px;
  background: var(--card);
  font-size: 0.92rem;
  line-height: 1.6;
  box-shadow: 0 10px 24px -16px rgba(46, 36, 110, 0.4);
}
.demo__a strong { font-weight: 600; background: linear-gradient(transparent 62%, rgba(241, 181, 46, 0.6) 62%); }
.demo figcaption { font-size: 0.78rem; color: var(--muted); }

/* 공모전: 분석 연구 */
.card--study { gap: 32px; }
.figure img {
  border-radius: var(--plate-radius);
  box-shadow: var(--plate-shadow);
}
.figure figcaption {
  margin-top: 16px;
  padding-inline: 2px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.findings { display: grid; gap: 14px; margin-block: 6px; }
.finding {
  padding-left: 15px;
  position: relative;
}
.finding::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em; bottom: 0.3em;
  width: 3px;
  border-radius: 1.5px;
  background: var(--star);
}
.finding dt { font-weight: 600; }
.finding dd { font-size: 0.92rem; color: var(--muted); line-height: 1.62; }

/* ───────── 일하는 방식 ───────── */
.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(28px, 4vw, 56px);
}
.principle {
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}
.principle__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 0.6vw + 1.15rem, 1.55rem);
  line-height: 1.32;
  letter-spacing: -0.012em;
}
.principle__text { margin-top: 12px; }
.principle__src {
  margin-top: 14px;
  font-family: var(--font-mono);
  word-spacing: -0.12em;
  font-size: 0.76rem;
  color: var(--signal);
}

.tools-used { margin-top: clamp(64px, 8vw, 104px); }
.tools-used__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.kit__row {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 4px 24px;
  padding-block: 13px;
  border-top: 1px solid var(--line);
}
.kit__row:last-child { border-bottom: 1px solid var(--line); }
.kit__row dt { font-size: 0.88rem; font-weight: 500; color: var(--muted); padding-top: 2px; }
.kit__row dd { font-size: 0.97rem; }

/* ───────── 연락: 다시 밤하늘 ───────── */
.outro {
  position: relative;
  overflow: hidden;
  color: var(--night-text);
  padding-top: calc(var(--horizon) + clamp(72px, 10vw, 136px));
  padding-bottom: clamp(88px, 11vw, 152px);
  scroll-margin-top: 0;
  background:
    radial-gradient(46% 22% at 50% 0%, rgba(255, 214, 150, 0.16), transparent 74%),
    radial-gradient(120% 58% at 50% 0%, rgba(132, 112, 255, 0.36), transparent 76%),
    linear-gradient(var(--night-low) 0%, var(--night-mid) 46%, var(--night) 100%);
}
.outro::before {
  -webkit-mask-image: linear-gradient(transparent 12%, #000 70%);
  mask-image: linear-gradient(transparent 12%, #000 70%);
}
.outro > * { position: relative; }

.contact {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 3.4vw + 1rem, 3.7rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #F6F4FF;
}
.contact__text { margin-top: 18px; max-width: 30em; color: var(--night-muted); }
.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.site-footer {
  background: var(--night);
  color: var(--night-muted);
  border-top: 1px solid var(--night-line);
  padding-block: 26px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}

/* ───────── 넓은 화면 ───────── */
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: end;
  }
  .section-head__desc { padding-bottom: 0.5em; }
}

@media (min-width: 1024px) {
  .card--feature {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    column-gap: clamp(36px, 4.6vw, 68px);
  }
  .card--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .card--flip .shot { order: 2; }

  .card--study {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    column-gap: clamp(36px, 4.6vw, 68px);
  }
}

/* ───────── 좁은 화면 ───────── */
@media (max-width: 760px) {
  .grid,
  .principles { grid-template-columns: 1fr; }
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-nav { width: calc(100% + var(--gutter)); margin-left: -13px; padding-right: var(--gutter); }
  .kit__row { grid-template-columns: 1fr; }
  .demo { aspect-ratio: auto; }
}

@media (max-width: 420px) {
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .contact__links { flex-direction: column; width: 100%; }
  .contact__links .btn { justify-content: center; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
