/*
 * ormdata.com 공용 스타일 (한국어 /, 영어 /en/ 공용)
 * - 색·글꼴은 :root 토큰으로 관리한다. 강조색은 코발트 블루(--accent).
 * - 860px 이하는 모바일 배치(고정 헤더 + 전체 화면 메뉴 + 세로 도표)로 바뀐다.
 */
:root {
  color-scheme: dark; /* 이미 어두운 페이지임을 알려 브라우저 강제 다크 모드가 색을 다시 칠하지 않게 한다 */
  --bg: #0f1012;
  --ink: #ecebe6;
  --muted: #8e8c86;
  --line: rgba(236, 235, 230, .13);
  --glyph: rgba(236, 235, 230, .26);
  --glyph-on: rgba(236, 235, 230, .78);
  --accent: #5b82ff;
  --btn-bg: #ecebe6;
  --btn-ink: #0f1012;
  --surface: rgba(236, 235, 230, .025);
  --font: Pretendard, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html, body { background: var(--bg); color: var(--ink); }
body { font-family: var(--font); -webkit-font-smoothing: antialiased; word-break: keep-all; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.split { display: grid; grid-template-columns: 5fr 7fr; column-gap: 72px; }

/* 상단 내비게이션 */
/* 헤더는 화면 위에 고정한다. 콘텐츠 폭(1280)에 맞춰 안쪽 여백을 계산해 로고·메뉴가 본문과 줄을 맞춘다.
   스크롤하면 .scrolled가 붙어 반투명 배경과 아래 선이 생긴다. */
.nav { position: sticky; top: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; height: 76px; padding: 0 max(48px, calc((100% - 1280px) / 2 + 48px)); border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
[id] { scroll-margin-top: 76px; }
.logo img { height: 24px; display: block; }
.nav nav { display: flex; gap: 32px; align-items: center; font-size: 15px; }
.nav nav a { color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.lang { font-size: 13px; letter-spacing: .04em; }
.nav nav a.cta { color: var(--btn-ink); background: var(--btn-bg); padding: 9px 18px; border-radius: 999px; }

/* 모바일 메뉴 (좁은 화면에서만 보인다) */
.menu-btn { display: none; }
.mmenu { position: fixed; top: 76px; left: 0; right: 0; bottom: 0; z-index: 55; background: var(--bg); padding: 8px 20px 40px; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; }
.mmenu[hidden] { display: none; }
.mmenu nav a { display: block; font-size: 32px; font-weight: 300; letter-spacing: -.02em; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.mmenu-foot { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 15px; }

/* 첫 화면 */
.hero { display: flex; flex-direction: column; }
.hero .wrap { width: 100%; padding-top: clamp(40px, 9vh, 112px); padding-bottom: 68px; }
h1 { font-family: var(--font); font-weight: 300; font-size: clamp(40px, 5.6vw, 80px); line-height: 1.16; letter-spacing: -.03em; }
.lede { margin-top: 28px; max-width: 30em; font-size: 18px; line-height: 1.7; color: var(--muted); }
.actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 999px; font-size: 15px; text-decoration: none; }
.btn.primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn.ghost { border: 1px solid var(--line); }
.field { position: relative; height: clamp(220px, 36vh, 340px); border-top: 1px solid var(--line); overflow: hidden; }
.field canvas, .field svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.field .curve { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.field .mark { opacity: 0; transition: opacity .5s ease; }
.field .mark.on { opacity: 1; }
.field .mark circle { fill: var(--accent); }
.field .mark text { fill: var(--ink); font: 13px Pretendard, sans-serif; }
.field .mark .no { fill: var(--muted); font: 11px var(--font); }

/* 섹션 공통 */
.sec { padding: 140px 0; border-top: 1px solid var(--line); }
.sec-head { align-items: end; margin-bottom: 72px; }
#about .sec-head { align-items: start; }
h2 { font-family: var(--font); font-weight: 300; font-size: clamp(34px, 4vw, 56px); line-height: 1.15; letter-spacing: -.03em; }
.sec-head p { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 32em; }
h3 { font-family: var(--font); font-weight: 300; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.3; letter-spacing: -.02em; }
.body { margin-top: 18px; color: var(--muted); line-height: 1.75; font-size: 16px; max-width: 30em; }

/* 서비스: 한 줄에 두 개, 도표 아래 설명 */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.svc { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.svc .panel { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 20px 20px 8px; }
.svc-text { padding: 32px 36px 36px; }
.svc h3, .proj h3 { font-weight: 500; font-size: clamp(28px, 2.8vw, 38px); letter-spacing: -.025em; }
.svc ul { list-style: none; padding: 0; margin-top: 32px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.svc li { padding: 18px 16px 0 0; font-size: 14px; line-height: 1.55; cursor: default; outline: none; transition: color .3s; }
.svc li + li { padding-left: 16px; border-left: 1px solid var(--line); }
.svc li::before { content: ""; display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-bottom: 12px; transition: background .3s, box-shadow .3s; }
.svc li.lit::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.svc li:focus-visible { color: var(--accent); }
/* 세부내용을 가리키면 도표에서 해당 부분만 켜고 나머지는 흐린다 */
.dg-node, .dg-box, .dg-zone { transition: stroke .4s, opacity .3s; }
svg .lit { stroke: var(--accent) !important; }
svg.focusing .dg-node:not(.lit), svg.focusing .dg-link:not(.lit), svg.focusing .dg-box:not(.lit), svg.focusing .dg-zone:not(.lit) { opacity: .28; }

/* 프로젝트 */
.proj { align-items: center; padding: 64px 0; }
.proj + .proj { border-top: 1px solid var(--line); }
.proj dl { margin-top: 40px; display: grid; grid-template-columns: auto 1fr; gap: 12px 28px; font-size: 14px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 30em; }
.proj dt { color: var(--muted); }
.proj dd { margin: 0; }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.panel { position: relative; }
.panel svg { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
/* 도표에 마우스를 올리면 커서 주변에 데이터 글자(숫자·기호)가 렌즈처럼 떠오른다.
   첫 화면 글리프 띠와 같은 언어를 쓴다. 커서 가까이는 강조색, 멀어질수록 옅어진다. */
.panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s ease-out; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%); }
.panel:hover::before { opacity: 1; }
.panel .lens { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; pointer-events: none; z-index: 0; }

/* 도표 공통 */
/* 상자는 바탕을 칠하지 않는다. 바탕색으로 칠하면 휴대폰 브라우저의 강제 다크 모드가 회색 상자로 다시 칠한다.
   그래서 선은 상자 테두리에서 끝나게 그리고, 선이 모이는 출발점(가설)만 속이 찬 점으로 둔다. */
.dg-node { fill: none; stroke: var(--glyph-on); stroke-width: 1; transition: stroke .4s; }
.dg-origin { fill: var(--glyph-on); }
.dg-node.hot, .dg-box.hot { stroke: var(--accent); }
.dg-box { fill: none; stroke: var(--line); }
.dg-zone { fill: none; stroke: var(--line); stroke-dasharray: 3 4; }
.dg-label { fill: var(--ink); font: 13px Pretendard, sans-serif; }
.dg-mono { fill: var(--muted); font: 11px var(--font); }
.dg-link { fill: none; stroke: var(--glyph); stroke-width: 1; transition: stroke .4s, opacity .4s; }
.dg-link.hot { stroke: var(--accent); }
.dg-line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.dg-grid { stroke: var(--line); }
.dg-bar { fill: var(--accent); opacity: .85; }
.dg-x { stroke: var(--muted); stroke-width: 1.2; }
.dot { fill: var(--accent); }
.dot-raw { fill: var(--muted); }
.dim { opacity: .45; }
.dg-task { transition: fill .4s, stroke .4s; }
.dg-task.on { fill: var(--accent); stroke: var(--accent); }
.dg-task.off { fill: none; stroke: var(--line); stroke-dasharray: 3 3; }
.dg-flow { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 2 8; animation: flow 1s linear infinite; transition: opacity .4s; }
@keyframes flow { to { stroke-dashoffset: -10; } }

/* 회사 */
.sec-head .about-lead { font-family: var(--font); font-weight: 300; font-size: clamp(24px, 2.8vw, 38px); line-height: 1.45; letter-spacing: -.02em; color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { padding: 24px 0; }
.facts div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 8px 0 0; font-size: 22px; letter-spacing: -.02em; }

/* 문의 */
.mail { display: inline-block; margin-top: 24px; font-weight: 300; font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -.01em; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.contact dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 28px; font-size: 14px; align-self: end; }
.contact dt { color: var(--muted); }
.contact dd { margin: 0; }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .wrap, .nav { padding: 0 20px; }
  .nav nav { gap: 10px; }
  .nav nav a:not(.cta) { display: none; }
  .menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer; }
  .menu-btn span { display: block; height: 1.5px; background: var(--ink); transition: transform .25s; }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  /* 모바일 도표: 세로 배치(460폭)로 그리고 글자를 키운다 */
  svg.m .dg-label { font-size: 16px; }
  svg.m .dg-mono { font-size: 13px; }
  /* 460폭 도표를 폰 폭(약 0.65~0.76배)으로 줄여 그리므로 선을 키워 화면에서 1.3px 이상이 되게 하고,
     연결선·구역선 색도 밝힌다(색은 변수로 바꿔 강조 상태 규칙을 덮지 않는다) */
  svg.m { --glyph: rgba(236, 235, 230, .45); --line: rgba(236, 235, 230, .24); }
  svg.m .dg-link, svg.m .dg-node, svg.m .dg-box, svg.m .dg-zone, svg.m .dg-x, svg.m .dg-flow, svg.m .dg-task { stroke-width: 2; }
  svg.m .dg-line { stroke-width: 2.4; }
  .panel { padding: 10px; }
  .svc .panel { padding: 12px 10px 6px; }
  .split { grid-template-columns: 1fr; }
  .sec { padding: 96px 0; }
  .sec-head { margin-bottom: 40px; row-gap: 16px; }
  .svc-grid { grid-template-columns: 1fr; gap: 20px; }
  .svc-text { padding: 24px 20px 28px; }
  .svc ul { grid-template-columns: 1fr; }
  .svc li, .svc li + li { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-left: 0; }
  .svc li + li { border-top: 1px solid var(--line); }
  .svc li::before { flex: none; margin: 0; transform: translateY(-2px); }
  .proj { row-gap: 36px; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .facts div { padding: 18px 0; }
  .contact dl { margin-top: 48px; }
}
@media (max-width: 360px) {
  .nav nav a.cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dg-flow { animation: none; }
}

/* 푸터: 저작권 + 이메일 무단수집 거부 고지(펼침) */
footer .foot { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px 32px; }
.no-harvest summary { cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.no-harvest summary::-webkit-details-marker { display: none; }
.no-harvest[open] { flex-basis: 100%; }
.no-harvest p { margin-top: 10px; max-width: 46em; line-height: 1.6; }
