/* 칼티 사이트: 밝은 안(2026-11-05 저녁, 사용자가 준 시안을 따름).
   바탕은 연회색(--page) 하나로 깔고 흰 카드와 가는 선(--line)으로 칸을 나눈다. 포인트 색은 주황 하나만 쓴다.
   주황은 바탕에 따라 진하기가 셋이다.
   --point 점·줄·채운 단추. 흰 바탕 대비가 2.8:1이라 글자에는 쓰지 않는다.
   --point-text 밝은 바탕 위 주황 글자(숫자, 카드 번호, 링크)와 햄버거 단추. 흰 바탕 5.2:1, 연회색 바탕 4.7:1.
   --point-on-dark 먹색·숯색 바탕 위 주황.
   첫 화면은 왼쪽에 글, 세로선 오른쪽에 가는 선 2×2 숫자 칸과 옅은 큰 KALTI(build.py의 {{giant}})를 둔다.
   휴대폰(720px 이하)에서는 위 막대 메뉴를 햄버거 단추(details) 안으로 접고 첫 화면을 한 열로 쌓는다(큰 KALTI는 뺀다).
   탭 아이콘 바탕은 --ink를 읽는다(tools/make_icons.py). 링크 공유 그림 kalti-og.png는 예전 먹색 첫 화면 모양 그대로이고,
   tools/make_og.py가 --dark·--giant·--point-on-dark를 읽는다. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Noto Sans KR", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;   /* 블로그 글 속 코드만(시스템 고정폭 글꼴) */
  --bg: #ffffff;
  --page: #f3f3f3;
  --ink: #151515;
  --muted: #555555;
  --faint: #6b6b6b;
  --dim: #888888;           /* 큰 제목의 회색 낱말에만(연회색 바탕 3.2:1) */
  --line: #e0e0e0;
  --card: #ffffff;
  --charcoal: #2b2b2b;      /* 제품 카드 */
  --giant-soft: #e4e4e4;    /* 첫 화면 큰 KALTI */
  --point: #ff6b2c;
  --point-on-dark: #ff7a3d;
  --point-text: #c2410c;
  --dark: #141414;          /* 첫 단추(PC·휴대폰 같은 색, 11-10). 공유 그림 바탕도 이 색 */
  --giant: #2c2c2c;         /* 공유 그림의 큰 KALTI(tools/make_og.py만 읽음) */
  --maxw: 1080px;
  color-scheme: light;
}

* { box-sizing: border-box; }
/* html을 연회색으로 칠해 두면, 글이 짧은 쪽(404 등)에서 바닥 아래 남는 자리도 바닥과 같은 색이 된다. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; background: var(--page); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* 첫 쪽은 연회색 바탕에 흰 카드를 띄운다. 약관 같은 긴 글 쪽은 흰 바탕 그대로이고 위 막대와 바닥만 연회색이다. */
body.index { background: var(--page); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* 위 막대: 연회색 바탕에 아래 가는 선. 메뉴는 마우스를 올리거나 키보드로 가면 주황 글자에 막대 아래 선 위로 주황 밑줄이 선다. */
.top { position: relative; background: var(--page); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; color: var(--ink); }
.brand:hover { text-decoration: none; }
/* 글자 로고(kalti-wordmark-px.svg)는 42×25px에 기둥 3px로 맞춘 판이라 이 크기 그대로 쓴다. 키우거나 줄이면 일반 모니터에서 기둥 두께가 들쭉날쭉해진다.
   T 기둥이 글자 아랫선 밑으로 7px 내려오므로, 그만큼 아래 여백을 빼서 글자(18px)만 가운데에 맞춘다. */
.brand .wordmark { display: block; width: 42px; height: 25px; margin-bottom: -7px; }
.menu { margin-left: auto; align-self: stretch; display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.menu a { position: relative; display: flex; align-items: center; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--point); opacity: 0; }
.menu a:hover, .menu a:focus-visible { color: var(--point-text); text-decoration: none; }
/* 키보드 초점은 주황 글자와 밑줄로 보인다. 막대 높이만 한 기본 테두리 대신 투명 테두리를 둬서 고대비 모드에서만 테두리가 나오게 한다. */
.menu a:focus-visible { outline: 2px solid transparent; }
.menu a:hover::after, .menu a:focus-visible::after { opacity: 1; }
.lang { border: 1px solid #d0d0d0; border-radius: 999px; padding: 2px 12px; font-size: 14px; }
.lang:hover { border-color: var(--ink); text-decoration: none; }
/* 휴대폰 메뉴: 스크립트 없이 details로 연다. 단추의 세 줄은 그림이라 3:1이 필요해서 --point 대신 --point-text로 칠한다. */
.drawer { display: none; }
.drawer summary { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -11px; list-style: none; cursor: pointer; color: var(--point-text); }
.drawer summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; border-radius: 1px; background: currentColor; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
/* 메뉴를 열면 세 줄이 ✕로 바뀐다(가운데 줄은 숨기고 위아래 줄을 가운데로 모아 돌림). */
.drawer[open] .burger { background: transparent; }
.drawer[open] .burger::before { top: 0; transform: rotate(45deg); }
.drawer[open] .burger::after { top: 0; transform: rotate(-45deg); }
.drawer-menu {
  position: absolute;
  z-index: 10;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 0 16px 6px;
  background: var(--page);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 24px -8px rgba(0, 0, 0, 0.16);
}
.drawer-menu a { padding: 13px 0; font-size: 17px; font-weight: 500; }
.drawer-menu a + a { border-top: 1px solid var(--line); }
.drawer-menu a:hover { color: var(--point-text); text-decoration: none; }

/* 첫 화면: 위 막대와 합쳐 한 화면 높이(세로로 긴 태블릿에서는 620px). 왼쪽 칸에 글, 오른쪽 칸은 세로선으로 나눠 화면 오른쪽 끝까지 간다.
   오른쪽 칸은 위에서부터 빈 자리, 가는 선 2×2 숫자 칸(숫자는 tools/lab_stats.py가 랩노트에서 셈), 옅은 큰 KALTI 칸 차례다.
   큰 KALTI 칸은 세로선·숫자 칸 아래 선·화면 오른쪽 끝·첫 화면 아래 선으로 둘러싸이고, 높이는 폭의 0.32배다.
   그림(build.py의 {{giant}})은 글자 상자로 자른 viewBox에 xMinYMin slice라서 이 칸을 빈틈없이 덮는다:
   K는 세로선에, 글자 위끝은 숫자 칸 아래 선에 딱 붙고, I는 화면 끝에 닿고, 글자 높이의 4분의 3쯤에서 아래가 잘린다. */
.hero {
  display: grid;
  grid-template-columns: minmax(20px, 1fr) minmax(0, 580px) minmax(0, 460px) minmax(20px, 1fr);
  min-height: clamp(620px, calc(100vh - 65px), 1200px);
  min-height: clamp(620px, calc(100svh - 65px), 1200px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
@media (max-aspect-ratio: 1/1) { .hero { min-height: 620px; } }
.hero-text { grid-column: 2; align-self: center; padding: 56px clamp(24px, 4vw, 56px) 64px 0; }
.eyebrow { display: inline-block; font-size: 14px; color: #444; border: 1px solid #d2d2d2; border-radius: 16px; padding: 3px 13px; }
.hero h1 { font-size: clamp(44px, 4.8vw, 66px); line-height: 1.06; letter-spacing: -0.025em; margin: 22px 0 20px; }
.hero h1 em { font-style: normal; color: var(--dim); }
.lead { font-size: clamp(18px, 1.5vw, 20px); color: var(--muted); max-width: 500px; margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-block; padding: 14px 24px; border-radius: 12px; font-weight: 650; }
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--dark); color: #fff; }
.btn.ghost { padding: 13px 23px; border: 1px solid #9a9a9a; }
.hero-side { grid-column: 3 / 5; display: grid; grid-template-rows: 0.85fr 2fr auto; border-left: 1px solid var(--line); }
.stats {
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, min(260px, 55%)) 1fr;
  grid-template-rows: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; justify-content: center; padding: 28px 24px 28px 32px; }
.stat:nth-child(odd) { border-right: 1px solid var(--line); }
.stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stat b { font-size: 76px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: var(--point-text); }
.stat b small { font-size: 18px; letter-spacing: 0; margin-left: 4px; color: var(--faint); }
.stat span { margin-top: 10px; font-size: 17px; color: var(--ink); }
.giant { grid-row: 3; display: block; width: 100%; height: auto; aspect-ratio: 25 / 8; color: var(--giant-soft); }

/* 칸 */
.section { padding: 88px 0; }
.section + .section { padding-top: 0; }
.section h2 { font-size: 36px; line-height: 1.25; letter-spacing: -0.015em; margin: 0 0 8px; }
.section .sub { font-size: 17px; color: var(--muted); margin: 0 0 32px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { display: block; background: var(--card); border-radius: 16px; padding: 28px 28px 30px; }
.card .n { font-size: 18px; font-weight: 700; color: var(--point-text); }
.card h3 { margin: 8px 0 8px; font-size: 22px; line-height: 1.35; }
.card p { margin: 0; font-size: 17px; color: var(--muted); }
.lessons { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; margin: 0; padding: 0; list-style: none; }
.lessons li { padding: 20px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.lessons b { display: block; font-size: 18px; }
.lessons span { color: var(--muted); font-size: 16px; }
.dot { flex: 0 0 8px; height: 8px; margin-top: 11px; border-radius: 50%; background: var(--point); }
/* 제품 칸: 짙은 숯색 카드. 아이콘 그림은 둘레에 투명 여백(한 변의 약 10%)이 있어서,
   그만큼 음수 여백으로 당겨 보이는 모서리를 카드 안쪽 선과 글 줄에 맞춘다. */
.product { display: flex; align-items: center; gap: 48px; padding: 44px 48px; border-radius: 20px; background: var(--charcoal); color: #fff; }
.product img { flex: 0 0 auto; width: 128px; height: 128px; margin: -12px; }
.product .name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.product h3 { margin: 0; font-size: 36px; line-height: 1.2; }
.pill { font-size: 13px; line-height: 1.5; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 999px; padding: 2px 11px; color: #dedede; }
.product .tag { margin: 6px 0 10px; font-size: 17px; font-weight: 600; color: #f0f0f0; }
.product p { margin: 0; max-width: 620px; font-size: 17px; color: #bdbdbd; }
.more { display: inline-block; margin-top: 24px; padding: 8px 18px; border: 1px solid var(--point-on-dark); border-radius: 10px; font-size: 16px; font-weight: 600; color: #fff; }
.more:hover { text-decoration: none; background: rgba(255, 122, 61, 0.14); }
.contact { text-align: center; padding: 80px 0 96px; }
.contact p { margin: 0 0 8px; font-size: 17px; color: #333; font-weight: 500; }
.contact a { font-size: 28px; font-weight: 600; color: var(--point-text); }

/* 약관 같은 글 */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 20px 72px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 40px); line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.4px; }
.doc .updated { color: var(--faint); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: 21px; margin: 38px 0 10px; color: var(--ink); }
.doc p, .doc li { color: #333333; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--point-text); text-decoration: underline; text-underline-offset: 3px; }
.doc .note { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--point); border-radius: 12px; padding: 14px 18px; }
.doc .note ul { margin: 0; }

/* 없는 쪽 */
.lost { text-align: center; padding: 96px 20px 120px; }
.lost h1 { font-size: 64px; margin: 0 0 10px; }
.lost p { color: var(--muted); }
.lost a { color: var(--point-text); font-weight: 650; }

/* 아래 */
.foot { background: var(--page); border-top: 1px solid var(--line); color: var(--faint); font-size: 15px; padding: 30px 0 44px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 8px; }
.foot-links a { color: #333; }
.foot p { margin: 0; }
.foot p a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* 휴대폰: 한 열로 쌓는다. 첫 화면 단추는 폭 전체 주황 단추와 그 아래 가운데 밑줄 글 링크, 숫자 칸은 화면 폭 전체. */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .menu, .lang { display: none; }
  .drawer { display: block; margin-left: auto; }
  .hero { display: block; min-height: 0; }
  .hero-text { padding: 60px 16px 40px; }
  .eyebrow { font-size: 13px; padding: 3px 12px; }
  .hero h1 { font-size: clamp(36px, 11.8vw, 46px); margin: 18px 0 16px; }
  .lead { font-size: 17px; }
  .cta { flex-direction: column; gap: 6px; margin-top: 28px; }
  .btn.primary { display: block; padding: 14px 20px; text-align: center; }
  .btn.ghost { align-self: center; padding: 9px 12px; border: 0; text-decoration: underline; text-underline-offset: 4px; }
  .hero-side { display: block; border-left: 0; }
  .stats { grid-template-columns: 1fr 1fr; border-bottom: 0; }
  .stat { padding: 22px 16px 24px 24px; }
  .stat b { font-size: 54px; }
  .stat b small { font-size: 16px; }
  .stat span { margin-top: 8px; font-size: 15px; }
  .giant { display: none; }
  .section { padding: 56px 0; }
  .section h2 { font-size: 28px; }
  .grid3, .lessons { grid-template-columns: 1fr; }
  .grid3 { gap: 12px; }
  .card { padding: 22px 22px 24px; }
  .card h3 { font-size: 20px; }
  .card p { font-size: 16px; }
  .section .sub { font-size: 16px; }
  .lessons li { padding: 16px 0; }
  .lessons b { font-size: 17px; }
  .lessons span { font-size: 15px; }
  .dot { margin-top: 10px; }
  .product { flex-direction: column; align-items: flex-start; gap: 24px; padding: 28px 24px 30px; }
  .product img { width: 104px; height: 104px; margin: -10px; }
  .product h3 { font-size: 30px; }
  .product .tag, .product p { font-size: 16px; }
  .more { font-size: 15px; }
  .contact { padding: 64px 0 72px; }
  .contact p { font-size: 16px; }
  .contact a { font-size: 24px; }
  .foot { font-size: 14px; }
}

/* 제품 카드 나란히(11-06, B안): Lunhand·AgentBar. 휴대폰에서는 위아래로 */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product-grid .product { flex-direction: column; align-items: flex-start; gap: 26px; padding: 36px 36px 38px; }
.product-grid .product img { width: 96px; height: 96px; margin: -8px; }
.product-grid .product h3 { font-size: 30px; }
.product-grid .product .tag, .product-grid .product p { font-size: 16px; }
@media (max-width: 760px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-grid .product { padding: 28px 24px 30px; }
}

/* 블로그(/blog/, 11-11): 약관처럼 흰 바탕에 한 열, 글 폭은 읽기 좋은 700px. 글자 모양만 칼티 색·글꼴을 따르고 장식은 두지 않는다.
   목록 쪽은 날짜·제목·설명을 가는 선으로 나누고, 글 쪽은 '← Blog', 날짜, 제목, 본문 차례다(build.py의 blog_pages). */
.blog { max-width: 740px; margin: 0 auto; padding: 56px 20px 88px; }
/* 제목은 줄 길이를 고르게 나눈다(끝 낱말 하나만 다음 줄로 넘어가지 않게). */
.blog h1, .post-list h2, .post-body h2, .post-body h3 { text-wrap: balance; }
.blog h1 { margin: 0; font-size: clamp(30px, 4.4vw, 40px); line-height: 1.2; letter-spacing: -0.02em; }
.blog .sub { margin: 10px 0 0; font-size: 17px; color: var(--muted); }
.blog .back { margin: 0 0 28px; font-size: 15px; font-weight: 600; }
.blog .back a { color: var(--point-text); }
.post-list { margin: 36px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.post-list li { padding: 26px 0 28px; border-bottom: 1px solid var(--line); }
.post-list time, .post-date { font-size: 14px; color: var(--faint); }
.post-list h2 { margin: 6px 0 8px; font-size: 23px; line-height: 1.35; letter-spacing: -0.01em; }
.post-list h2 a:hover { color: var(--point-text); text-decoration: none; }
.post-list p { margin: 0; color: var(--muted); }
.post-date { margin: 0 0 8px; }
.post-body { margin-top: 32px; font-size: 18px; line-height: 1.75; }
.post-body p { margin: 0 0 1.15em; }
.post-body h2 { margin: 2.1em 0 0.6em; font-size: 26px; line-height: 1.3; letter-spacing: -0.015em; }
.post-body h3 { margin: 1.7em 0 0.5em; font-size: 20px; line-height: 1.4; }
.post-body ul { margin: 0 0 1.15em; padding-left: 1.3em; }
.post-media { margin: 1.6em 0 1.9em; }
.post-media img, .post-media video { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #000; }
.post-media video { aspect-ratio: 16 / 10; }
.post-media figcaption { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--faint); text-align: center; text-wrap: balance; }
.post-body li { margin: 0.55em 0; padding-left: 0.2em; }
.post-body li::marker { color: var(--point); }
.post-body a { color: var(--point-text); text-decoration: underline; text-underline-offset: 3px; }
.post-body code { font-family: var(--mono); font-size: 0.86em; padding: 0.12em 0.36em; border-radius: 6px; background: var(--page); }
@media (max-width: 720px) {
  .blog { padding: 40px 16px 64px; }
  .post-list h2 { font-size: 21px; }
  .post-body { font-size: 17px; }
  .post-body h2 { font-size: 23px; }
  .post-body h3 { font-size: 19px; }
}
