/* crealium site styles
   팔레트: 바둑판의 선과 돌, 한일 공통의 쪽빛(藍)에서 가져옴 */
:root {
  --paper: #F2F3EF;       /* 배경: 약간 푸른 기가 도는 종이색 */
  --white: #FBFBF9;       /* 밝은 섹션, 흰 돌 */
  --ink: #1A1F1D;         /* 본문, 검은 돌 */
  --muted: #59615D;       /* 보조 텍스트 */
  --line: #C6CCC6;        /* 바둑판 선, 구분선 */
  --indigo: #2B3F6B;      /* 쪽빛: 강조, 버튼 */
  --indigo-deep: #1E2C4C; /* 문의 섹션 배경 */
  --on-dark: #E9ECF2;

  --serif: "Gowun Batang", "Noto Serif KR", "Noto Serif CJK KR", "Apple SD Gothic Neo", serif;
  --sans: "IBM Plex Sans KR", "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;

  --wrap: 1120px;
  --gutter: 24px;
  --section-y: clamp(64px, 9vw, 112px);
}
html[lang="ja"] {
  --serif: "Shippori Mincho B1", "Noto Serif JP", "Noto Serif CJK JP", "Hiragino Mincho ProN", serif;
  --sans: "IBM Plex Sans JP", "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
html[lang="ja"] body { word-break: normal; line-break: strict; line-height: 1.85; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 { word-break: auto-phrase; }
html[lang="ja"] h1 { font-size: clamp(1.9rem, 4.3vw, 3.05rem); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.32; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.4; }
h3 { font-size: 1.3rem; line-height: 1.5; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }

:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.section-dark :focus-visible { outline-color: var(--on-dark); }

.skip {
  position: absolute; left: 16px; top: -64px;
  background: var(--ink); color: var(--white);
  padding: 8px 14px; z-index: 10; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; letter-spacing: 0.01em; }
.brand-sub { font-size: 0.8125rem; color: var(--muted); }
.nav { display: flex; gap: 22px; font-size: 0.9375rem; }
.nav a { text-decoration: none; padding: 4px 0; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-kicker { font-size: 0.9375rem; color: var(--indigo); font-weight: 600; margin-bottom: 20px; }
.lead { font-size: 1.125rem; max-width: 34em; margin-top: 28px; color: #2E3532; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.board { margin: 0; justify-self: end; width: 100%; max-width: 420px; }
.board-lines path { stroke: var(--line); stroke-width: 1.5; fill: none; }
.board-stars circle { fill: var(--line); }
/* 첫 화면: 바둑돌이 위에서 내려와 놓이고, 놓이는 순간 파문이 한 번 퍼짐 */
.stone { fill: var(--ink); transform-box: fill-box; transform-origin: center; animation: place 800ms cubic-bezier(.3,.6,.3,1) 350ms both; }
.ripple { transform-box: fill-box; transform-origin: center; animation: ripple 1100ms cubic-bezier(.1,.6,.3,1) 900ms forwards; }
@keyframes place {
  0%   { opacity: 0; transform: translateY(-28px) scale(1.25); }
  70%  { opacity: 1; transform: translateY(0) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ripple {
  0%   { opacity: 0.45; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.6); }
}
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.count { font-variant-numeric: tabular-nums; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-size: 0.9875rem; font-weight: 600;
  text-decoration: none; border-radius: 3px; border: 1.5px solid transparent;
  transition: background-color 150ms ease, color 150ms ease;
}
.btn-primary { background: var(--indigo); color: var(--white); }
.btn-primary:hover { background: var(--indigo-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-light { background: var(--on-dark); color: var(--indigo-deep); }
.btn-light:hover { background: var(--white); }

/* Sections */
.section { padding: var(--section-y) 0; }
.section-light { background: var(--white); }
.section-dark { background: var(--indigo-deep); color: var(--on-dark); }
.section-head { max-width: 40em; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 + p { margin-top: 16px; }
.split { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(32px, 6vw, 88px); }
.split-head h2 + p { margin-top: 16px; }

/* Problem scenes */
.scenes { display: grid; gap: 0; }
.scene { position: relative; padding: 28px 0; display: grid; grid-template-columns: 13em 1fr; gap: 24px; }
.scene::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1.5px solid var(--ink); transform-origin: left center; }
.scene:last-child { border-bottom: 1px solid var(--line); }
.scene p { color: #2E3532; }

/* 진출 단계: 진입 → 안착 → 성장 (오른쪽으로 갈수록 선이 굵어짐) */
.stages { list-style: none; margin: 0 0 clamp(56px, 7vw, 88px); padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.stages li { position: relative; padding: 28px 28px 4px 0; border-top: 0; }
.stages li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 2px; background: var(--line); transform-origin: left center;
}
.stages li:nth-child(2)::before { height: 4px; background: #8D958F; }
.stages li:nth-child(3)::before { height: 6px; background: var(--ink); }

/* 스크롤 연출: 선이 진입 → 안착 → 성장 순서로 끊김 없이 이어서 뻗어나감
   (.motion 은 motion.js 가 붙임. 자바스크립트가 없으면 완성된 상태로 보임) */
.motion .stages li::before { transform: scaleX(0); transition: transform 650ms linear; }
.motion .stages li:nth-child(1)::before { transition-timing-function: cubic-bezier(.5,0,1,1); }
.motion .stages li:nth-child(2)::before { transition-delay: 650ms; }
.motion .stages li:nth-child(3)::before { transition-delay: 1300ms; transition-duration: 800ms; transition-timing-function: cubic-bezier(0,0,.2,1); }
.motion .stages.is-in li::before { transform: scaleX(1); }
.motion .stages li > * { opacity: 0; transform: translateY(8px); transition: opacity 500ms ease, transform 500ms ease; }
.motion .stages li:nth-child(1) > * { transition-delay: 350ms; }
.motion .stages li:nth-child(2) > * { transition-delay: 1000ms; }
.motion .stages li:nth-child(3) > * { transition-delay: 1700ms; }
.motion .stages.is-in li > * { opacity: 1; transform: none; }
.stages h3 { font-size: 1.45rem; margin-bottom: 8px; }
.stages p { color: #2E3532; font-size: 1rem; max-width: 22em; }
.method-title { font-size: 1.2rem; margin-bottom: 32px; color: var(--indigo); }

/* Approach steps (실제 순서가 있는 과정이라 번호 사용) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  background: var(--ink); color: var(--white);
}
.steps li::after {
  content: ""; position: absolute; top: 20px; left: 52px; right: -16px;
  border-top: 1.5px solid var(--line);
}
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: #2E3532; font-size: 1rem; }

/* ── 스크롤 연출 (.motion 은 motion.js 가 <html>에 붙임) ──
   자바스크립트가 꺼져 있거나 '동작 줄이기' 설정이면 아래 규칙은 적용되지 않고 완성된 상태로 보임 */

/* 공통: 은은하게 떠오르기 */
.motion .reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1); }
.motion .reveal.is-in { opacity: 1; transform: none; }
.motion .service-side .service:nth-child(2) { transition-delay: 120ms; }
.motion .service-side .service:nth-child(3) { transition-delay: 240ms; }

/* 현장 장면: 위쪽 선이 왼쪽에서 그어진 뒤 글이 나타남 */
.motion .scene::before { transform: scaleX(0); transition: transform 700ms cubic-bezier(.6,0,.2,1); }
.motion .scene > * { opacity: 0; transform: translateY(8px); transition: opacity 500ms ease 300ms, transform 500ms ease 300ms; }
.motion .scene.is-in::before { transform: scaleX(1); }
.motion .scene.is-in > * { opacity: 1; transform: none; }

/* 해결 방식 1→4: 돌이 차례로 놓이고 사이 선이 이어짐 */
.motion .steps li::before { transform: scale(0); transition: transform 420ms cubic-bezier(.3,1.5,.5,1); }
.motion .steps li::after { transform: scaleX(0); transform-origin: left center; transition: transform 380ms linear; }
.motion .steps li > * { opacity: 0; transform: translateY(8px); transition: opacity 500ms ease, transform 500ms ease; }
.motion .steps li:nth-child(2)::before { transition-delay: 450ms; }
.motion .steps li:nth-child(3)::before { transition-delay: 900ms; }
.motion .steps li:nth-child(4)::before { transition-delay: 1350ms; }
.motion .steps li:nth-child(1)::after { transition-delay: 150ms; }
.motion .steps li:nth-child(2)::after { transition-delay: 600ms; }
.motion .steps li:nth-child(3)::after { transition-delay: 1050ms; }
.motion .steps li:nth-child(1) > * { transition-delay: 200ms; }
.motion .steps li:nth-child(2) > * { transition-delay: 650ms; }
.motion .steps li:nth-child(3) > * { transition-delay: 1100ms; }
.motion .steps li:nth-child(4) > * { transition-delay: 1550ms; }
.motion .steps.is-in li::before { transform: scale(1); }
.motion .steps.is-in li::after { transform: scaleX(1); }
.motion .steps.is-in li > * { opacity: 1; transform: none; }

/* 숫자: 나타나면서 0부터 올라감 (카운트는 motion.js) */
.motion .figures { opacity: 0; transition: opacity 500ms ease; }
.motion .figures.is-in { opacity: 1; }

@media print {
  .motion .reveal, .motion .scene > *, .motion .steps li > *, .motion .stages li > *, .motion .figures { opacity: 1 !important; transform: none !important; }
}

/* Services */
.services { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; }
.service { padding: 32px; background: var(--white); border: 1px solid var(--line); }
.service h3 { margin-bottom: 12px; }
.service-main { background: var(--indigo); color: var(--white); border-color: var(--indigo); padding: clamp(32px, 4vw, 48px); }
.service-main h3 { font-size: 1.6rem; }
.service-side { display: grid; gap: 24px; }
.checklist { list-style: none; margin: 28px 0 0; padding: 0; }
.checklist li { padding: 14px 0 14px 30px; border-top: 1px solid rgba(255,255,255,.22); position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 50%; width: 12px; height: 12px;
  margin-top: -6px; border-radius: 50%; background: var(--white);
}

/* Proof */
.figures { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 56px; margin-bottom: 40px; }
.figure { margin: 0; }
.figure-num { display: block; font-family: var(--serif); font-weight: 700; font-size: clamp(3.4rem, 7vw, 5rem); line-height: 1; color: var(--indigo); }
.figure-unit { font-size: 0.42em; margin-left: 4px; }
.figure-sub .figure-num { font-size: clamp(2.2rem, 4vw, 2.8rem); color: var(--ink); }
.figure-label { display: block; margin-top: 10px; color: var(--muted); }
.contexts { list-style: none; margin: 0; padding: 0; }
.contexts li { padding: 22px 0; border-top: 1px solid var(--line); font-size: 1.125rem; }
.contexts li:last-child { border-bottom: 1px solid var(--line); }
.quote { margin: 40px 0 0; padding-left: 24px; border-left: 3px solid var(--indigo); }
.quote p { font-family: var(--serif); font-size: 1.2rem; }
.quote footer { color: var(--muted); font-size: 0.9375rem; margin-top: 8px; }

/* About */
.about { max-width: 38em; }
.person { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 24px; }
.person-name { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; }
.person-alt { font-family: "Shippori Mincho B1", "Noto Serif CJK JP", serif; color: var(--muted); }
.person-role { font-size: 0.9375rem; color: var(--indigo); font-weight: 600; }
.text-link { color: var(--indigo); font-weight: 600; text-underline-offset: 5px; }

/* Contact */
.section-dark h2 { color: var(--white); }
.section-dark a { color: var(--white); }
.flow { margin: 28px 0 0; padding-left: 1.3em; }
.flow li { padding: 4px 0; }
.contact-alt { margin-top: 36px; }
.contact-alt .btn { color: var(--indigo-deep); }
.contact-alt p { margin-top: 16px; font-size: 0.9375rem; }
.form-panel { background: var(--white); color: var(--ink); padding: clamp(20px, 3vw, 36px); border-radius: 3px; }
.form-frame { display: block; width: 100%; height: 980px; border: 0; }

/* Footer */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 24px 40px; align-items: start; }
.footer-brand .brand-name { font-size: 1.1rem; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.copy { color: var(--muted); }

/* Privacy / plain pages */
.doc { max-width: 46em; padding: clamp(48px, 7vw, 88px) 0; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 12px; }
.doc h2 { font-size: 1.35rem; margin: 48px 0 12px; }
.doc h3 { font-size: 1.1rem; margin: 28px 0 8px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.9375rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--white); font-weight: 600; }
.doc .divider { margin: 72px 0 0; border: 0; border-top: 1.5px solid var(--ink); }
.doc-meta { color: var(--muted); }

/* Responsive */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .steps li:nth-child(2)::after { display: none; }
  .services { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; gap: 20px; }
  .stages { grid-template-columns: 1fr; gap: 40px; }
  .scene { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .nav-hide { display: none; }
  .nav { gap: 18px; }
  .brand-sub { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .board { order: -1; justify-self: start; max-width: 168px; margin-bottom: 8px; }
  .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; row-gap: 32px; }
  .steps li { padding-top: 0; padding-left: 60px; }
  .steps li::after { display: none; }
  .service { padding: 24px; }
  .form-frame { height: 1180px; }
  .footer-inner { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stone, .ripple { animation: none; }
  .btn { transition: none; }
}
