/* 생성 파일입니다. homepages/main/src/를 고친 뒤 node homepages/main/scripts/build.mjs를 실행합니다. 원본: homepages/common/css/(base, layout, review), homepages/main/src/common/css/(나머지) */

/* ── base.css ── */
/* 사이트 바탕: 랜딩 층 변수, 글자 크기, 폭, 공통 묶음.
   색, 글꼴, 간격 단계, 버튼, 배지는 공통 UI(apps/common/ui/dist/catwin.css)의 토큰과 부품을 그대로 쓴다.
   프로그램 화면에 없는 웹 페이지 전용 값만 --hp-* 변수로 둔다. */

:root {
  --hp-max: 1200px;                               /* 본문 최대 폭 */
  --hp-pad: var(--cw-space-gutter);               /* 화면 가장자리 여백 */
  --hp-header: 64px;                              /* 머리 띠 높이 */
  --hp-section: clamp(72px, 10vw, 128px);         /* 구역 위아래 여백 */
  --hp-hero-top: clamp(56px, 9vw, 112px);         /* 첫 화면 위 여백 */
  --hp-hero-gap: clamp(48px, 7vw, 88px);          /* 첫 화면 글과 대표 화면 사이 */
  --hp-fs-display: clamp(34px, 5vw, 58px);        /* 첫 화면 제목 */
  --hp-fs-h2: clamp(26px, 3.2vw, 38px);           /* 구역 제목 */
  --hp-fs-lead: clamp(16px, 1.5vw, 19px);         /* 제목 아래 설명 */
  --hp-fs-h3: 20px;                               /* 카드 제목 */
  --hp-fs-text: 16px;                             /* 웹 본문. 프로그램 본문(14px)보다 크게 읽는다 */
  --hp-fs-ui: 15px;                               /* 메뉴, 큰 버튼, 카드 설명 */
  --hp-fw-display: 700;                           /* 큰 제목 굵기. 프로그램은 600까지만 쓴다 */
  --hp-h-cta: 44px;                               /* 큰 버튼 높이 */
  --hp-h-chip: 40px;                              /* 화면 탭 높이 */
  --hp-tile: 40px;                                /* 제품 타일 */
  --hp-tile-sm: 24px;                             /* 탭 안의 제품 타일 */
  --hp-pill: 999px;                               /* 알약 모양 */
  --hp-demo-w: 1400px;                            /* 예시 화면과 영상의 최대 폭 */
  --hp-fs-detail: clamp(30px, 4vw, 48px);         /* 상세 페이지 제목 */
  --hp-tile-xl: 72px;                             /* 상세 페이지 머리의 제품 타일 */
  --hp-feature-gap: clamp(48px, 7vw, 88px);       /* 상세 페이지 기능 사이 */
  --hp-chat-w: 340px;                             /* 하려는 일 영상의 Engineer 채팅 폭 */
  --hp-chat-h: 300px;                             /* 좁은 화면에서 장면 아래 채팅 높이 */
  --hp-cap-w: 420px;                              /* 하려는 일 영상의 자막 폭 */
}
@media (max-width: 600px) { :root { --hp-pad: var(--cw-space-group); --hp-header: 56px; } }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hp-header) + var(--cw-space-group)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.site { font-size: var(--hp-fs-text); line-height: 1.7; background: var(--cw-bg); }
.site a { color: inherit; }
.site a.btn { cursor: pointer; text-decoration: none; }
.site .btn.lg { height: var(--hp-h-cta); padding: 0 var(--cw-space-panel); font-size: var(--hp-fs-ui); }
.wrap { width: 100%; max-width: calc(var(--hp-max) + var(--hp-pad) * 2); margin: 0 auto; padding: 0 var(--hp-pad); }

.skip { position: absolute; left: var(--hp-pad); top: -100px; z-index: 50; padding: var(--cw-space-item) var(--cw-space-control); border-radius: var(--cw-radius-control); background: var(--cw-action-fill); color: var(--cw-on-solid); }
.skip:focus { top: var(--cw-space-item); }
.site button.btn { cursor: pointer; }
.wrap.wide { max-width: calc(var(--hp-demo-w) + var(--hp-pad) * 2); }

/* 제품 화면 사진 */
.shot { overflow: hidden; border: 1px solid var(--cw-line-strong); border-radius: var(--cw-radius-container); background: var(--cw-surface); box-shadow: var(--cw-shadow-float); }
.hero-shot .shot { box-shadow: var(--cw-shadow-float), 0 40px 120px -24px color-mix(in srgb, var(--cw-brand) 45%, transparent); }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.shot-caption, .note { margin-top: var(--cw-space-group); font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }
.shot-caption { text-align: center; }

/* 구역 */
.section { padding: var(--hp-section) 0; border-top: 1px solid var(--cw-line); }
.section-head { max-width: 720px; margin-bottom: var(--cw-space-region); }
.kicker { font-size: var(--cw-fs-body); line-height: var(--cw-lh-small); font-weight: var(--cw-fw-strong); color: var(--cw-action); }
.section-head h2 { margin-top: var(--cw-space-control); font-size: var(--hp-fs-h2); line-height: 1.3; font-weight: var(--hp-fw-display); letter-spacing: -.02em; }
.section-head > p:not(.kicker) { margin-top: var(--cw-space-group); font-size: var(--hp-fs-lead); line-height: 1.75; color: var(--cw-text-muted); }

/* 제품 타일: 프로그램 타이틀바의 타일과 같은 20% 모서리, 대표색 바탕에 바탕색 선 */
.tile { --size: var(--hp-tile); display: grid; place-items: center; flex: none; width: var(--size); height: var(--size); border-radius: calc(var(--size) / 5); background: var(--product); color: var(--cw-bg); }
.tile svg { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Catwin 앱의 아이콘은 브랜드 심벌 타일(dist/assets/brand-symbol-tile.svg)을 그대로 쓴다 */
.app-tile { display: block; flex: none; }

/* ── layout.css ── */
/* 모든 페이지가 함께 쓰는 틀: 머리 띠, 위쪽 메뉴(프로그램 펼침 목록, 준비 중 항목), 옆 메뉴, 바닥글, 창 */

/* 머리 띠 */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--hp-header); background: color-mix(in srgb, var(--cw-bg) 84%, transparent); -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--cw-line); }
.site-header > .wrap { display: flex; align-items: center; gap: var(--cw-space-section); height: 100%; }
.logo { display: inline-flex; align-items: center; gap: var(--cw-space-item); font-size: var(--cw-fs-title); line-height: 28px; font-weight: var(--hp-fw-display); letter-spacing: -.01em; text-decoration: none; }
.logo img { width: 28px; height: 28px; }
.nav { display: flex; gap: var(--cw-space-tight); }
.nav a { display: inline-flex; align-items: center; height: var(--cw-h-control); padding: 0 var(--cw-space-control); border-radius: var(--cw-radius-control); font-size: var(--hp-fs-ui); color: var(--cw-text-muted); text-decoration: none; }
.nav a:hover { color: var(--cw-text); background: var(--cw-hover); }
.header-end { display: flex; align-items: center; gap: var(--cw-space-item); margin-left: auto; }
.menu-btn { display: none; }
.menu-btn svg.i { width: 20px; height: 20px; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: var(--hp-header); left: 0; right: 0; flex-direction: column; padding: var(--cw-space-item) var(--hp-pad) var(--cw-space-group); background: var(--cw-bg); border-bottom: 1px solid var(--cw-line); }
  .site-header.is-open .nav { display: flex; }
  .nav a { height: 48px; font-size: var(--hp-fs-text); }
}
@media (max-width: 420px) { .header-end .btn.primary { display: none; } }

/* 위쪽 메뉴: 프로그램 펼침 목록과 준비 중 항목 */
.nav a[aria-current="page"], .nav-btn.is-current { color: var(--cw-text); }
.nav-group { position: relative; }
.nav-btn { display: inline-flex; align-items: center; gap: var(--cw-space-tight); height: var(--cw-h-control); padding: 0 var(--cw-space-control); border: 0; border-radius: var(--cw-radius-control); background: transparent; font-size: var(--hp-fs-ui); color: var(--cw-text-muted); cursor: pointer; }
.nav-btn:hover, .nav-btn[aria-expanded="true"] { color: var(--cw-text); background: var(--cw-hover); }
.nav-btn .chev { transition: transform var(--cw-dur-fast) var(--cw-ease); }
.nav-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.mega { position: absolute; top: calc(100% + var(--cw-space-item)); left: 0; z-index: 30; display: grid; gap: 2px; width: 340px; padding: var(--cw-space-item); border: 1px solid var(--cw-line-strong); border-radius: var(--cw-radius-container); background: var(--cw-surface); box-shadow: var(--cw-shadow-float); }
.mega[hidden] { display: none; }
.nav .mega-item { display: flex; align-items: center; gap: var(--cw-space-control); height: auto; padding: var(--cw-space-item) var(--cw-space-control); color: var(--cw-text); }
.nav .mega-item[aria-current="page"] { background: var(--cw-selected); }
.mega-item .tile { --size: 32px; }
.mega-item b { display: block; font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); font-weight: var(--cw-fw-strong); }
.mega-item small { display: block; font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }
.nav .mega-all { display: flex; align-items: center; justify-content: space-between; height: var(--cw-h-control); margin-top: var(--cw-space-tight); padding: 0 var(--cw-space-control); border-top: 1px solid var(--cw-line); border-radius: 0 0 var(--cw-radius-control) var(--cw-radius-control); font-size: var(--cw-fs-body); color: var(--cw-action); }
.nav-soon { display: inline-flex; align-items: center; gap: var(--cw-space-item); height: var(--cw-h-control); padding: 0 var(--cw-space-control); font-size: var(--hp-fs-ui); color: var(--cw-text-disabled); cursor: default; }
.nav-soon small { padding: 0 var(--cw-space-tight); border: 1px solid var(--cw-line); border-radius: var(--hp-pill); font-size: var(--cw-fs-caption); line-height: var(--cw-lh-caption); color: var(--cw-text-muted); }
.foot-soon { display: block; padding: 3px 0; font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); color: var(--cw-text-disabled); }
@media (max-width: 860px) {
  .nav-btn, .nav-soon { height: 48px; font-size: var(--hp-fs-text); }
  .nav-btn { width: 100%; }
  .mega { position: static; width: auto; margin-bottom: var(--cw-space-item); box-shadow: none; }
}

/* 옆 메뉴: 페이지 안 구역. 1320px 이상에서 짧은 선으로 보이고, 이름은 1680px 이상에서 늘 보이며 그보다 좁으면 올렸을 때만 보인다 */
.rail { position: fixed; right: var(--cw-space-control); top: 50%; z-index: 15; display: none; flex-direction: column; align-items: flex-end; gap: 2px; transform: translateY(-50%); }
@media (min-width: 1320px) { .rail { display: flex; } }
.rail a { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: var(--cw-space-item); height: 28px; padding: 0 var(--cw-space-tight); font-size: var(--cw-fs-small); color: var(--cw-text-muted); text-decoration: none; }
.rail a::after { content: ""; width: 12px; height: 2px; border-radius: 1px; background: var(--cw-line-strong); transition: width var(--cw-dur-fast) var(--cw-ease), background-color var(--cw-dur-fast) var(--cw-ease); }
.rail a:hover::after { background: var(--cw-text-muted); }
.rail a[aria-current]::after { width: 20px; background: var(--cw-action); }
.rail a[aria-current] { color: var(--cw-text); }
.rail a span { position: absolute; right: 32px; padding: 2px var(--cw-space-item); border: 1px solid var(--cw-line-strong); border-radius: var(--cw-radius-control); background: var(--cw-surface); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--cw-dur-fast) var(--cw-ease); }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }
@media (min-width: 1680px) { .rail a span { position: static; padding: 0; border: 0; background: none; opacity: 1; } }
/* 옆 메뉴가 보일 때 넓은 예시 화면이 옆 메뉴와 겹치지 않게 한다 */
@media (min-width: 1320px) { .wrap.wide { padding-inline: var(--cw-space-region); max-width: calc(var(--hp-demo-w) + var(--cw-space-region) * 2); } }

/* 바닥글 */
.site-footer { padding: var(--cw-space-region) 0 var(--cw-space-section); border-top: 1px solid var(--cw-line); background: color-mix(in srgb, var(--cw-surface) 45%, var(--cw-bg)); }
.foot-top { display: flex; justify-content: space-between; gap: var(--cw-space-region); flex-wrap: wrap; }
.foot-brand p { margin-top: var(--cw-space-control); font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); color: var(--cw-text-muted); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(120px, auto)); gap: var(--cw-space-region); }
.foot-cols h3 { margin-bottom: var(--cw-space-control); font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); font-weight: var(--cw-fw-strong); color: var(--cw-text); }
.foot-cols a { display: block; padding: 3px 0; font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); color: var(--cw-text-muted); text-decoration: none; }
.foot-cols a:hover { color: var(--cw-text); }
.foot-cols p { max-width: 200px; font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); color: var(--cw-text-muted); }
.foot-bottom { display: flex; justify-content: space-between; gap: var(--cw-space-group); flex-wrap: wrap; margin-top: var(--cw-space-region); padding-top: var(--cw-space-gutter); border-top: 1px solid var(--cw-line); font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }
@media (max-width: 600px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cw-space-section); } }

/* 창 */
.site-dlg { width: min(400px, calc(100vw - var(--hp-pad) * 2)); padding: var(--cw-space-gutter); border: 1px solid var(--cw-line-strong); border-radius: var(--cw-radius-container); background: var(--cw-surface); color: var(--cw-text); box-shadow: var(--cw-shadow-float); }
.site-dlg::backdrop { background: color-mix(in srgb, var(--cw-bg) 70%, transparent); }
.site-dlg h2 { font-size: var(--cw-fs-title); line-height: var(--cw-lh-title); font-weight: var(--cw-fw-strong); }
.site-dlg p { margin-top: var(--cw-space-item); font-size: var(--cw-fs-body); line-height: 1.7; color: var(--cw-text-muted); }
.site-dlg .login-msg { color: var(--cw-text); }
.site-dlg-actions { display: flex; justify-content: flex-end; gap: var(--cw-space-item); margin-top: var(--cw-space-gutter); }
/* 창 안의 상태 줄 */
.dlg-status { display: flex; align-items: center; gap: var(--cw-space-item); color: var(--cw-text) !important; }
.dlg-status .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cw-warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cw-warning) 20%, transparent); }

/* ── home.css ── */
/* 메인 페이지 구역: 첫 화면, 시연 영상 자리, 프로그램 카드, 직접 써 보기, 내려받기, 커뮤니티 미리 보기
   ("Catwin이 하려는 일" 영상은 journey.css) */

/* 첫 화면: 도면 격자와 브랜드 파랑 빛 위에 제목과 대표 화면 */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: var(--hp-hero-top) 0 var(--hp-section); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--cw-line) 1px, transparent 1px), linear-gradient(90deg, var(--cw-line) 1px, transparent 1px); background-size: 48px 48px; background-position: center top; -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, black 0%, transparent 80%); mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, black 0%, transparent 80%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; top: -10%; height: 90%; z-index: -1; background: radial-gradient(45% 45% at 50% 35%, color-mix(in srgb, var(--cw-brand) 30%, transparent), transparent 75%); }
.hero-text { max-width: 860px; margin: 0 auto; text-align: center; }
.eyebrow { display: inline-flex; padding: var(--cw-space-tight) var(--cw-space-group); border: 1px solid var(--cw-line-strong); border-radius: var(--hp-pill); background: color-mix(in srgb, var(--cw-surface) 70%, transparent); font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }
.hero h1 { margin-top: var(--cw-space-gutter); font-size: var(--hp-fs-display); line-height: 1.18; font-weight: var(--hp-fw-display); letter-spacing: -.03em; }
.hero .lead { max-width: 660px; margin: var(--cw-space-gutter) auto 0; font-size: var(--hp-fs-lead); line-height: 1.75; color: var(--cw-text-muted); }
.hero .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--cw-space-control); margin-top: var(--cw-space-section); }
.hero-shot { margin-top: var(--hp-hero-gap); }
@media (max-width: 860px) { .wide-only { display: none; } }

/* 시연 영상 자리. 영상이 준비되면 같은 칸에 소리 없이 반복되는 영상을 넣는다.
   지금은 개발 중인 화면 사진을 보여 주고, 검토용 빌드에서만 사진을 어둡게 하고 "시연 영상 자리" 표시(.video-tag)를 얹는다 */
.video { margin-top: var(--hp-hero-gap); }
.video-frame { position: relative; box-shadow: var(--cw-shadow-float), 0 40px 120px -24px color-mix(in srgb, var(--cw-brand) 45%, transparent); }
.video-frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.video-frame:has(.video-tag) img { filter: brightness(.45) saturate(.8); }
.video-tag { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--cw-space-control); padding: var(--cw-space-gutter); background: radial-gradient(38% 34% at 50% 50%, color-mix(in srgb, var(--cw-bg) 88%, transparent), transparent); text-align: center; font-size: var(--hp-fs-text); line-height: var(--cw-lh-subtitle); font-weight: var(--cw-fw-strong); color: var(--cw-text); }
.video-tag small { max-width: 480px; font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); font-weight: var(--cw-fw-regular); color: var(--cw-text-muted); }
.play { display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid var(--cw-line-strong); border-radius: 50%; background: color-mix(in srgb, var(--cw-bg) 60%, transparent); }
.play::before { content: ""; border-left: 22px solid var(--cw-text); border-top: 13px solid transparent; border-bottom: 13px solid transparent; transform: translateX(3px); }
.hero .facts { margin-top: var(--cw-space-gutter); }
@media (max-width: 600px) {
  .video-tag { gap: var(--cw-space-item); font-size: var(--cw-fs-body); }
  .video-tag small { display: none; }
  .play { width: 48px; height: 48px; }
  .play::before { border-left-width: 15px; border-top-width: 9px; border-bottom-width: 9px; }
}
.facts { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--cw-space-item) var(--cw-space-gutter); margin: var(--cw-space-gutter) 0 0; padding: 0; list-style: none; font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); color: var(--cw-text-muted); }
.facts li { display: inline-flex; align-items: center; gap: var(--cw-space-item); }
.facts li::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--cw-steel); }

/* 프로그램 카드 */
.product { display: flex; flex-direction: column; gap: var(--cw-space-group); padding: var(--cw-space-gutter); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-container); background: linear-gradient(180deg, color-mix(in srgb, var(--product) 9%, var(--cw-surface)) 0, var(--cw-surface) 140px); scroll-margin-top: calc(var(--hp-header) + var(--cw-space-group)); }
.product-head { display: flex; align-items: center; gap: var(--cw-space-control); }
.product h3 { font-size: var(--hp-fs-h3); line-height: 28px; font-weight: var(--cw-fw-strong); }
.product .full { font-size: var(--cw-fs-small); line-height: var(--cw-lh-caption); color: var(--cw-text-muted); }
.status { align-self: flex-start; margin-left: auto; padding: 2px var(--cw-space-item); border: 1px solid var(--cw-line-strong); border-radius: var(--hp-pill); font-size: var(--cw-fs-caption); line-height: var(--cw-lh-caption); color: var(--cw-text-muted); white-space: nowrap; }
.product .desc { font-size: var(--hp-fs-ui); line-height: 1.7; }
.more { display: inline-flex; align-items: center; gap: var(--cw-space-tight); margin-top: auto; padding-top: var(--cw-space-tight); font-size: var(--cw-fs-body); font-weight: var(--cw-fw-medium); color: var(--cw-action) !important; text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }
.programs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cw-space-group); }
@media (max-width: 960px) { .programs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .programs-grid { grid-template-columns: minmax(0, 1fr); } }
.prog-when { display: flex; flex-direction: column; gap: 2px; padding: var(--cw-space-control); border-radius: var(--cw-radius-control); background: var(--cw-inset); font-size: var(--hp-fs-ui); line-height: 1.5; font-weight: var(--cw-fw-medium); }
.prog-when small { font-size: var(--cw-fs-caption); line-height: var(--cw-lh-caption); font-weight: var(--cw-fw-regular); color: var(--cw-text-muted); }
.prog-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--cw-space-control); margin-top: auto; }
.prog-foot .more { margin-top: 0; padding-top: 0; }
.more[aria-disabled="true"] { color: var(--cw-text-disabled) !important; cursor: default; }
.more[aria-disabled="true"]:hover { text-decoration: none; }
.prog-hub { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--cw-space-control); padding: var(--cw-space-gutter); border: 1px dashed var(--cw-line-strong); border-radius: var(--cw-radius-container); }
.prog-hub p { font-size: var(--hp-fs-ui); line-height: 1.7; color: var(--cw-text-muted); }
.prog-hub b { color: var(--cw-text); font-weight: var(--cw-fw-strong); }
.prog-hub .more { margin-top: 0; }

/* 예시 화면: 칸 폭(최대 1400px)에 맞춘 5:3 창을 띄운다. 칸이 1200px보다 좁으면 1200px 창을 비율대로 줄인다(site.js가 --demo-frame-w와 --demo-scale을 정한다) */
.demo { margin-top: var(--hp-hero-gap); }
.demo-bar { display: flex; flex-direction: column; gap: var(--cw-space-control); margin-bottom: var(--cw-space-group); }
.demo-tabs { display: flex; justify-content: center; gap: var(--cw-space-item); overflow-x: auto; scrollbar-width: none; }
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab { display: inline-flex; align-items: center; gap: var(--cw-space-item); flex: none; height: var(--hp-h-chip); padding: 0 var(--cw-space-group) 0 var(--cw-space-item); border: 1px solid var(--cw-line); border-radius: var(--hp-pill); background: color-mix(in srgb, var(--cw-bg) 60%, transparent); font-size: var(--cw-fs-body); font-weight: var(--cw-fw-medium); color: var(--cw-text-muted); cursor: pointer; transition: background-color var(--cw-dur-fast) var(--cw-ease), color var(--cw-dur-fast) var(--cw-ease); }
.demo-tab .tile { --size: var(--hp-tile-sm); }
.demo-tab:hover { color: var(--cw-text); background: var(--cw-hover); }
.demo-tab[aria-selected="true"] { border-color: var(--cw-line-strong); background: var(--cw-surface); color: var(--cw-text); }
.demo-hint { text-align: center; font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); color: var(--cw-text); }
.demo-stage { position: relative; box-shadow: var(--cw-shadow-float), 0 40px 120px -24px color-mix(in srgb, var(--cw-brand) 45%, transparent); }
.demo-live { position: relative; overflow: hidden; aspect-ratio: 5 / 3; }
.demo-live iframe { position: absolute; left: 0; top: 0; width: var(--demo-frame-w, var(--hp-demo-w)); height: calc(var(--demo-frame-w, var(--hp-demo-w)) * .6); border: 0; transform: scale(var(--demo-scale, 1)); transform-origin: 0 0; background: var(--cw-bg); }
.demo-still { display: none; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.demo-caption { margin-top: var(--cw-space-group); text-align: center; font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }
.demo-narrow { display: none; }
@media (max-width: 1023px) {
  .demo-live { display: none; }
  .demo-still { display: block; }
  .demo-narrow { display: inline; }
  .demo-wide { display: none; }
  .demo-tabs { justify-content: flex-start; }
}

/* 직접 써 보기: 예시 화면 아래의 보는 법. 번호는 신호 노랑 주석 표시를 쓴다 */
.section .demo { margin-top: 0; }
.guide-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--cw-space-item) var(--cw-space-group); margin-top: var(--cw-space-section); }
.guide-head h3 { font-size: var(--hp-fs-h3); line-height: 28px; font-weight: var(--cw-fw-strong); }
.guide-head p { font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }
.guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cw-space-gutter); margin: var(--cw-space-group) 0 0; padding: var(--cw-space-gutter) 0 0; border-top: 1px solid var(--cw-line); list-style: none; }
.guide[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .guide, .guide[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .guide, .guide[data-n="4"] { grid-template-columns: minmax(0, 1fr); } }
.guide li { display: flex; align-items: flex-start; gap: var(--cw-space-control); }
.guide b { display: block; font-size: var(--hp-fs-ui); line-height: 24px; }
.guide p { margin-top: var(--cw-space-tight); font-size: var(--cw-fs-body); line-height: 1.7; color: var(--cw-text-muted); }
.mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1px solid var(--cw-emphasis); border-radius: 50%; font-family: var(--cw-font-code); font-size: var(--cw-fs-caption); line-height: 1; color: var(--cw-emphasis); }

/* 내려받기: Hub 하나 */
.dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: var(--cw-space-region); align-items: start; }
@media (max-width: 960px) { .dl { grid-template-columns: minmax(0, 1fr); } }
.dl .section-head { margin-bottom: 0; }
.dl-card { display: flex; align-items: center; flex-wrap: wrap; gap: var(--cw-space-group); margin-top: var(--cw-space-section); padding: var(--cw-space-gutter); border: 1px solid var(--cw-line-strong); border-radius: var(--cw-radius-container); background: var(--cw-surface); }
.dl-card .tile { --size: 48px; }
.dl-name { flex: 1; min-width: 160px; }
.dl-name b { display: block; font-size: var(--cw-fs-title); line-height: var(--cw-lh-title); }
.dl-name span { display: block; font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }
.dl .steps { margin-top: 0; }
.steps { display: grid; gap: var(--cw-space-group); margin: var(--cw-space-section) 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: var(--cw-space-region); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--cw-line-strong); border-radius: 50%; font-size: var(--cw-fs-body); font-weight: var(--cw-fw-strong); color: var(--cw-text); }
.steps b { display: block; font-size: var(--hp-fs-text); line-height: 32px; }
.steps span { display: block; font-size: var(--hp-fs-ui); line-height: 1.6; color: var(--cw-text-muted); }

/* 커뮤니티 미리 보기 */
.boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--cw-space-group); }
@media (max-width: 960px) { .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .boards { grid-template-columns: minmax(0, 1fr); } }
.board { display: flex; flex-direction: column; gap: var(--cw-space-item); padding: var(--cw-space-panel); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-container); background: var(--cw-surface); text-decoration: none; transition: border-color var(--cw-dur-fast) var(--cw-ease); }
a.board:hover { border-color: var(--cw-line-strong); }
.board-name { display: flex; align-items: center; gap: var(--cw-space-item); font-size: var(--cw-fs-title); line-height: var(--cw-lh-title); font-weight: var(--cw-fw-strong); }
.board .count { font-family: var(--cw-font-code); font-size: var(--cw-fs-caption); font-weight: var(--cw-fw-regular); color: var(--cw-text-muted); }
.board-desc { font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); color: var(--cw-text-muted); }
.board-last { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: auto; padding-top: var(--cw-space-control); border-top: 1px solid var(--cw-line); font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text); }
.boards-foot { display: flex; align-items: center; gap: var(--cw-space-gutter); flex-wrap: wrap; margin-top: var(--cw-space-gutter); }
.boards-foot .note { margin-top: 0; }
/* 커뮤니티를 열기 전: 게시판 카드는 링크가 아니고, 아래에 준비 중 표시를 둔다 */
.board-soon { margin-top: auto; padding-top: var(--cw-space-control); border-top: 1px solid var(--cw-line); font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-disabled); }

/* ── journey.css ── */
/* ───────────── 메인: "Catwin이 하려는 일" 영상(교량 3D와 Engineer 채팅, journey.js) ───────────── */
.jv-stage { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(70% 70% at 40% 40%, color-mix(in srgb, var(--cw-surface) 70%, var(--cw-bg)), var(--cw-bg)); }
.jv-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* 자막: 지금 장면의 번호, 이름, 한 줄 설명 */
.jv-cap { position: absolute; left: var(--cw-space-gutter); top: var(--cw-space-gutter); display: grid; gap: 2px; max-width: var(--hp-cap-w); pointer-events: none; }
.jv-cap-n { font-family: var(--cw-font-code); font-size: var(--cw-fs-caption); line-height: var(--cw-lh-caption); color: var(--cw-text-muted); }
.jv-cap-t { font-size: var(--cw-fs-heading); line-height: var(--cw-lh-heading); font-weight: var(--cw-fw-strong); }
.jv-cap-d { font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); color: var(--cw-text-muted); }
.jv-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: var(--cw-space-item) var(--cw-space-control); border: 1px solid color-mix(in srgb, var(--cw-destructive-text) 50%, transparent); border-radius: var(--cw-radius-control); background: var(--cw-surface); font-size: var(--cw-fs-small); color: var(--cw-destructive-text); }
.jv.is-fallback .jv-canvas { display: none; }

/* Engineer 채팅: 공통 UI의 .eng 판을 장면 오른쪽에 띄운다 */
.jv-chat-host { position: absolute; top: var(--cw-space-group); right: var(--cw-space-group); bottom: var(--cw-space-group); width: var(--hp-chat-w); }
.jv-chat { position: absolute; inset: 0; z-index: 1; }
.jv-chat .eng-head { padding-right: var(--cw-space-control); }
.jv-core { display: block; flex: none; width: 28px; height: 28px; margin-right: var(--cw-space-item); }
.jv-log { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--cw-space-item); overflow: hidden; padding: var(--cw-space-item) var(--cw-space-control); justify-content: flex-end; }
.jv-msg { flex: none; font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); animation: eng-in var(--cw-dur-slow) var(--cw-ease) both; }
.jv-user { align-self: flex-end; max-width: 86%; padding: var(--cw-space-item) var(--cw-space-control); border-radius: var(--cw-radius-container) var(--cw-radius-container) var(--cw-radius-badge) var(--cw-radius-container); background: color-mix(in srgb, var(--cw-action) 22%, transparent); }
.jv-eng { display: flex; flex-direction: column; align-items: flex-start; gap: var(--cw-space-tight); }
.jv-step { display: flex; align-items: center; gap: var(--cw-space-item); padding: var(--cw-space-tight) var(--cw-space-item); border-radius: var(--cw-radius-control); background: color-mix(in srgb, var(--cw-text) 6%, transparent); color: var(--cw-text-muted); }
.jv-step .product-tile { width: var(--cw-icon-sm); height: var(--cw-icon-sm); border-radius: var(--cw-radius-badge); }
.jv-step .product-tile svg { width: 10px; height: 10px; } /* cw-allow 아주 작은 타일 */
.jv-step b { color: var(--cw-text); font-weight: var(--cw-fw-medium); }
.jv-step span:not(.product-tile) { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jv-step-state { margin-left: auto; flex: none; font-size: var(--cw-fs-caption); color: var(--cw-action); }
.jv-step.is-done .jv-step-state { color: var(--cw-success); }
.jv-gate { margin-top: 0; }
.jv-gate-sub { font-size: var(--cw-fs-caption); line-height: var(--cw-lh-caption); color: var(--cw-text-muted); }
.jv-gate .btn { pointer-events: none; }
.jv-gate .btn.primary.is-active { box-shadow: 0 0 0 3px var(--cw-focus-halo); }
.jv-gate-ok { font-size: var(--cw-fs-caption); color: var(--cw-success); }
.jv-input { min-height: calc(var(--cw-lh-body) + var(--cw-space-item)); color: var(--cw-text); }
.jv-ph { color: var(--cw-steel); }
.jv-caret { display: inline-block; width: 1px; height: 1.1em; margin-left: 1px; vertical-align: -2px; background: var(--cw-action); animation: jv-blink 1s steps(1) infinite; }
@keyframes jv-blink { 50% { opacity: 0; } }
/* 보낼 글이 없으면 공통 UI의 비활성 보내기 버튼처럼 비워 둔다(.btn.icon.eng-send보다 우선하도록 같은 클래스를 함께 쓴다) */
.btn.icon.eng-send.jv-send { margin-left: auto; }
.btn.icon.eng-send.jv-send:not(.is-ready) { background: transparent; box-shadow: none; color: var(--cw-text-disabled); }

/* 재생 장치: 재생·정지, 다섯 장면 목차(누르면 그 장면으로 간다), 시간 */
.jv-controls { display: flex; align-items: center; gap: var(--cw-space-control); margin-top: var(--cw-space-control); }
.jv-play { flex: none; color: var(--cw-text); }
.jv-play-ico { width: 12px; height: 14px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); } /* cw-allow 재생 표시 */
.jv.is-playing .jv-play-ico { clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
.jv-chapters { display: flex; flex: 1; gap: var(--cw-space-tight); min-width: 0; margin: 0; padding: 0; list-style: none; }
.jv-chapters li { flex-basis: 0; min-width: 0; }
.jv-chapters button { position: relative; display: flex; flex-direction: column; gap: var(--cw-space-tight); width: 100%; padding: var(--cw-space-item) 0 0; border: 0; background: none; color: var(--cw-text-muted); font: inherit; font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); text-align: left; cursor: pointer; }
.jv-chapters button::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 2px; background: var(--cw-line-strong); }
.jv-fill { position: absolute; left: 0; top: 0; z-index: 1; width: var(--fill, 0%); height: 3px; border-radius: 2px; background: var(--cw-action); }
.jv-chapters button b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: var(--cw-fw-medium); }
.jv-chapters button:hover, .jv-chapters button[aria-current] { color: var(--cw-text); }
.jv-time { flex: none; font-family: var(--cw-font-code); font-size: var(--cw-fs-caption); color: var(--cw-text-muted); }
.jv-note { margin-top: var(--cw-space-control); font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }

/* 1024px 미만: 채팅은 장면 아래로 내리고 대화가 몇 줄만 보이게 한다 */
@media (max-width: 1023px) {
  .jv-chat-host { position: relative; inset: auto; width: auto; height: var(--hp-chat-h); margin-top: var(--cw-space-control); }
  .jv-stage { aspect-ratio: auto; display: flex; flex-direction: column; padding: 0 0 var(--cw-space-control); }
  .jv-canvas { position: relative; aspect-ratio: 4 / 3; height: auto; }
  .jv-cap { top: var(--cw-space-group); left: var(--cw-space-group); }
  .jv-cap-t { font-size: var(--cw-fs-title); line-height: var(--cw-lh-title); }
  .jv-cap-d { display: none; }
  .jv-chat-host { margin-inline: var(--cw-space-control); }
  .jv-chapters button b { font-size: var(--cw-fs-caption); }
}
@media (max-width: 600px) { .jv-chapters button b { display: none; } .jv-chapters button { padding-top: var(--cw-space-tight); } }
@media (prefers-reduced-motion: reduce) { .jv-caret { animation: none; } .jv-msg { animation: none; } }

/* ── program.css ── */
/* 프로그램 상세 페이지: 머리, 시연 영상 자리, 주요 기능, 사양, 다른 프로그램. 페이지는 src/templates/program.html 한 틀에서 프로그램마다 만든다 */

.detail-hero { position: relative; isolation: isolate; overflow: hidden; padding: var(--cw-space-region) 0; }
.detail-hero::after { content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 120%; z-index: -1; background: radial-gradient(40% 50% at 20% 20%, color-mix(in srgb, var(--product) 18%, transparent), transparent 75%); }
.crumbs { display: flex; align-items: center; gap: var(--cw-space-item); font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }
.crumbs a { color: var(--cw-text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--cw-text); text-decoration: underline; text-underline-offset: 3px; }
.dh-main { display: flex; align-items: flex-start; gap: var(--cw-space-gutter); margin-top: var(--cw-space-gutter); }
@media (max-width: 600px) { .dh-main { flex-direction: column; } }
.tile.xl { --size: var(--hp-tile-xl); }
.dh-full { display: flex; align-items: center; flex-wrap: wrap; gap: var(--cw-space-control); font-size: var(--hp-fs-ui); line-height: var(--cw-lh-body); color: var(--cw-text-muted); }
.dh-full .status { align-self: center; margin-left: 0; }
.detail-hero h1 { margin-top: var(--cw-space-item); font-size: var(--hp-fs-detail); line-height: 1.2; font-weight: var(--hp-fw-display); letter-spacing: -.03em; }
.detail-hero .lead { max-width: 640px; margin-top: var(--cw-space-group); font-size: var(--hp-fs-lead); line-height: 1.75; color: var(--cw-text-muted); }
.detail-hero .actions { display: flex; flex-wrap: wrap; gap: var(--cw-space-control); margin-top: var(--cw-space-section); }
.detail-sec { padding-bottom: var(--hp-section); }
.detail-sec .video { margin-top: 0; }

.features { display: grid; gap: var(--hp-feature-gap); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--cw-space-region); }
.feature:nth-child(even) .feature-pic { order: 2; }
/* 가로로 넓은 사진(계산서, 그래프, 3D 모델)은 사진 칸을 넓혀 글자가 읽히게 한다 */
.feature.pic-wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.feature.pic-wide:nth-child(even) { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (max-width: 860px) { .feature, .feature.pic-wide, .feature.pic-wide:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: var(--cw-space-gutter); } .feature:nth-child(even) .feature-pic { order: 0; } }
.feature-pic { display: grid; place-items: center; padding: var(--cw-space-section) var(--cw-space-gutter); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-container); background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--product) 12%, var(--cw-surface)), var(--cw-surface)); }
/* 화면 사진 한 장(1600×900 기준)에서 --x, --y 위치의 --w×--h 부분만 보인다. 사진은 요소마다 --shot으로 준다 */
.crop { width: 100%; max-width: var(--crop-max, 100%); aspect-ratio: var(--w) / var(--h); border: 1px solid var(--cw-line-strong); border-radius: var(--cw-radius-control); background: var(--cw-bg) var(--shot) no-repeat; background-size: calc(1600 / var(--w) * 100%) auto; background-position: calc(var(--x) / (1600 - var(--w)) * 100%) calc(var(--y) / (900 - var(--h)) * 100%); box-shadow: var(--cw-shadow-float); }
.feature-text h3 { font-size: var(--cw-fs-heading); line-height: var(--cw-lh-heading); font-weight: var(--cw-fw-strong); letter-spacing: -.01em; }
.feature-text p { margin-top: var(--cw-space-control); font-size: var(--hp-fs-ui); line-height: 1.8; color: var(--cw-text-muted); }
.more-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--cw-space-gutter); margin: var(--hp-feature-gap) 0 0; padding: var(--cw-space-gutter) 0 0; border-top: 1px solid var(--cw-line); list-style: none; }
@media (max-width: 960px) { .more-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .more-features { grid-template-columns: minmax(0, 1fr); } }
.more-features b { display: block; font-size: var(--hp-fs-ui); line-height: 24px; }
.more-features span { display: block; margin-top: var(--cw-space-tight); font-size: var(--cw-fs-body); line-height: 1.7; color: var(--cw-text-muted); }

.specs { width: 100%; max-width: 760px; border-collapse: collapse; font-size: var(--hp-fs-ui); line-height: 1.6; }
.specs th, .specs td { padding: var(--cw-space-control) 0; border-bottom: 1px solid var(--cw-line); text-align: left; vertical-align: top; }
.specs th { width: 200px; padding-right: var(--cw-space-group); font-weight: var(--cw-fw-regular); color: var(--cw-text-muted); }
.specs tr:first-child > * { border-top: 1px solid var(--cw-line); }

.others-title { margin-bottom: var(--cw-space-gutter); font-size: var(--hp-fs-h3); line-height: 28px; font-weight: var(--cw-fw-strong); }
.others { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--cw-space-group); }
@media (max-width: 860px) { .others { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .others { grid-template-columns: minmax(0, 1fr); } }
.other { display: flex; align-items: center; gap: var(--cw-space-control); padding: var(--cw-space-group); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-container); background: var(--cw-surface); text-decoration: none; transition: border-color var(--cw-dur-fast) var(--cw-ease); }
.other:hover { border-color: color-mix(in srgb, var(--product) 45%, var(--cw-line)); }
.other .tile { --size: 32px; }
.other b { display: block; font-size: var(--cw-fs-body); line-height: var(--cw-lh-body); }
.other small { display: block; font-size: var(--cw-fs-small); line-height: var(--cw-lh-small); color: var(--cw-text-muted); }

/* Plugins: 호스트 프로그램별 지원 표 */
.hosts { width: 100%; max-width: 760px; margin-top: var(--cw-space-section); border-collapse: collapse; font-size: var(--hp-fs-ui); line-height: 1.6; }
.hosts caption { margin-bottom: var(--cw-space-control); text-align: left; font-size: var(--hp-fs-h3); line-height: 28px; font-weight: var(--cw-fw-strong); }
.hosts th, .hosts td { padding: var(--cw-space-control) var(--cw-space-group) var(--cw-space-control) 0; border-bottom: 1px solid var(--cw-line); text-align: left; }
.hosts thead th { border-top: 1px solid var(--cw-line); font-weight: var(--cw-fw-medium); color: var(--cw-text-muted); }
.hosts tbody th { font-weight: var(--cw-fw-regular); }
.hosts td { color: var(--cw-text-muted); }
.hosts-note { margin-top: var(--cw-space-control); }
