/*
 * company.ingkm.com — 회사 소개 정적 사이트.
 *
 * 색·글꼴은 www.ingkm.com(Music2Sheet_v2/frontend/src/app/globals.css)의 토큰을 그대로 옮겼다.
 * 두 사이트를 오가는 사람이 같은 회사라고 느껴야 한다 — 값을 바꿀 때는 양쪽을 함께 바꾼다.
 *
 * ⚠ 다크는 라이트를 뒤집은 것이 아니다. 원본과 같은 값을 쓴다.
 */

:root {
  color-scheme: light;

  --paper: #f0eee6;
  --paper-deep: #e9e6db;
  --surface: #faf9f5;
  --surface-sunk: #e6e3d8;

  --ink: #191917;
  --ink-2: #3d3d38;
  --muted: #5e5d56;
  --faint: #6b6a61;

  /* ⚠ --clay 는 면·선 전용, 글자에는 --clay-deep */
  --clay: #d97757;
  --clay-deep: #a94c26;
  --clay-soft: rgba(217, 119, 87, 0.14);

  --btn: #a94c26;
  --btn-hover: #8f3d1c;
  --btn-fg: #fdf7f3;

  --slate: #5b6b74;
  --slate-soft: rgba(91, 107, 116, 0.12);

  --ok-bg: #eaf3ee;
  --ok-border: #bfd9c9;
  --ok-fg: #2f6b4a;
  --warn-bg: #fdf4e3;
  --warn-border: #e8d5a8;
  --warn-fg: #7a5a12;

  --line: rgba(25, 25, 23, 0.11);
  --line-strong: rgba(25, 25, 23, 0.2);
  --shadow-md: 0 2px 4px rgba(25, 25, 23, 0.04), 0 12px 28px -14px rgba(25, 25, 23, 0.22);

  --pad: clamp(1rem, 4vw, 2.5rem);
  --shell: 1140px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");

  --font-display: "Newsreader", "Noto Serif KR", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", "Noto Sans KR", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1c1b19;
    --paper-deep: #161513;
    --surface: #262523;
    --surface-sunk: #201f1d;
    --ink: #f4f2ea;
    --ink-2: #ddd9cc;
    --muted: #a5a294;
    --faint: #86837a;
    --clay: #e08a68;
    --clay-deep: #f0a184;
    --clay-soft: rgba(224, 138, 104, 0.16);
    --btn: #e08a68;
    --btn-hover: #eb9b7c;
    --btn-fg: #241509;
    --slate: #93a5ae;
    --slate-soft: rgba(147, 165, 174, 0.14);
    --ok-bg: #16301f;
    --ok-border: #2f5a41;
    --ok-fg: #8fd4ac;
    --warn-bg: #3a2f14;
    --warn-border: #6b552a;
    --warn-fg: #e5c87f;
    --line: rgba(244, 242, 234, 0.13);
    --line-strong: rgba(244, 242, 234, 0.24);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c1b19;
  --paper-deep: #161513;
  --surface: #262523;
  --surface-sunk: #201f1d;
  --ink: #f4f2ea;
  --ink-2: #ddd9cc;
  --muted: #a5a294;
  --faint: #86837a;
  --clay: #e08a68;
  --clay-deep: #f0a184;
  --clay-soft: rgba(224, 138, 104, 0.16);
  --btn: #e08a68;
  --btn-hover: #eb9b7c;
  --btn-fg: #241509;
  --slate: #93a5ae;
  --slate-soft: rgba(147, 165, 174, 0.14);
  --ok-bg: #16301f;
  --ok-border: #2f5a41;
  --ok-fg: #8fd4ac;
  --warn-bg: #3a2f14;
  --warn-border: #6b552a;
  --warn-fg: #e5c87f;
  --line: rgba(244, 242, 234, 0.13);
  --line-strong: rgba(244, 242, 234, 0.24);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.7);
}

/* ── 기본 ─────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

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;
  -webkit-font-smoothing: antialiased;
}

/* 종이 결 — 있는 줄 모르는 정도 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.035;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--pad);
  top: 0.75rem;
  z-index: 100;
  background: var(--surface);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ── 헤더 ─────────────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.top.scrolled {
  border-bottom-color: var(--line);
}

.top .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
}

.wordmark b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.035em;
  line-height: 1;
}

.wordmark small {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 1.9rem);
  font-size: 0.9rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}

.nav a:hover {
  color: var(--ink);
}

.nav .lang {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

@media (max-width: 720px) {
  .nav .sec {
    display: none;
  }
  .wordmark small {
    display: none;
  }
}

/* ── 히어로 ───────────────────────────────────────────── */

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

:lang(ko) .hero h1 {
  /* 한글은 ch(숫자 0 폭)가 글자보다 좁아 16ch 면 한 줄이 꺾인다 — <br> 로 줄을 나눈다 */
  max-width: none;
  line-height: 1.22;
  letter-spacing: -0.04em;
}

.hero .lead {
  margin-top: 1.5rem;
  max-width: 38rem;
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  color: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 1.2rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn.primary {
  background: var(--btn);
  color: var(--btn-fg);
}

.btn.primary:hover {
  background: var(--btn-hover);
}

.btn.ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--ink-2);
}

.btn .arr {
  transition: transform 0.15s;
}

.btn:hover .arr {
  transform: translateX(2px);
}

/* 심박 → 오선. 이름 이야기의 그림판 — "심박과 음표는 같은 선" */
.pulse {
  margin: clamp(3rem, 7vw, 4.75rem) 0 0;
  color: var(--ink);
}

.pulse svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.pulse .staff line {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.pulse .beat {
  fill: none;
  stroke: var(--clay);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.4s cubic-bezier(0.45, 0.05, 0.25, 1) 0.2s forwards;
}

.pulse .note {
  fill: var(--ink);
  opacity: 0;
  animation: rise 0.5s ease-out forwards;
}

.pulse .stem {
  stroke: var(--ink);
  stroke-width: 1.6;
}

.pulse .caption {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .pulse .beat {
    animation: none;
    stroke-dashoffset: 0;
  }
  .pulse .note {
    animation: none;
    opacity: 1;
  }
}

/* ── 섹션 공통 ────────────────────────────────────────── */

section.block {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--line);
}

.head {
  display: grid;
  gap: 0.9rem;
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.head .eyebrow {
  margin-bottom: 0;
}

.head h2 {
  font-size: clamp(1.75rem, 3.8vw, 2.6rem);
}

.head p {
  color: var(--muted);
  font-size: 1.04rem;
}

/* ── 관점: 세 원칙 ───────────────────────────────────── */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}

.principles .n {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--clay-deep);
  font-size: 0.95rem;
}

.principles h3 {
  font-size: 1.28rem;
}

.principles p {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 820px) {
  .principles {
    grid-template-columns: 1fr;
  }
}

/* ── 하는 일: 악보가 허브 ────────────────────────────── */

.hub {
  display: grid;
  grid-template-columns: 1fr auto 1.15fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.node {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  text-align: center;
  padding: 1.1rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}

.node b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.node span {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.node.core {
  background: var(--clay-soft);
  border-color: var(--clay);
  padding: 1.5rem 0.75rem;
}

.node.core b {
  font-size: 1.7rem;
}

.link {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}

.link i {
  font-style: normal;
  font-size: 1.15rem;
  color: var(--clay-deep);
  line-height: 1;
}

@media (max-width: 760px) {
  .hub {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .link {
    grid-auto-flow: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
  }
  .link i {
    transform: rotate(90deg);
  }
}

.caps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cap {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 1.35rem 1.4rem 1.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cap .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cap .route {
  font-size: 0.8rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.cap h3 {
  font-size: 1.22rem;
}

.cap p {
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 720px) {
  .caps {
    grid-template-columns: 1fr;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.live {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-fg);
}

.badge.lab {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-fg);
}

/* ── 제품 ─────────────────────────────────────────────── */

.product {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.product + .product {
  margin-top: 1.25rem;
}

.product .meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.product .meta .tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.product h3 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
}

.product .body > p {
  margin-top: 0.85rem;
  color: var(--muted);
}

.facts {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.facts li span:first-child {
  color: var(--faint);
}

.facts li span:last-child {
  text-align: right;
}

.product.quiet {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
  border-color: var(--line-strong);
}

@media (max-width: 820px) {
  .product {
    grid-template-columns: 1fr;
  }
}

/* ── 이름 ─────────────────────────────────────────────── */

.name {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.entry {
  padding: 1.6rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--clay);
  border-radius: 6px 14px 14px 6px;
}

.entry .word {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.entry .pron {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--faint);
}

.entry .pos {
  margin-top: 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--clay-deep);
}

.entry .def {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.name .story {
  display: grid;
  gap: 1rem;
  color: var(--ink-2);
  font-size: 1.04rem;
}

@media (max-width: 820px) {
  .name {
    grid-template-columns: 1fr;
  }
}

/* ── 연락 ─────────────────────────────────────────────── */

.contact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact .head {
  margin-bottom: 0;
}

/* ── 푸터 ─────────────────────────────────────────────── */

footer {
  margin-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

footer .shell {
  display: grid;
  gap: 2rem;
  padding-top: 2.5rem;
  padding-bottom: 2.75rem;
}

footer .cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
}

footer .tagline {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--faint);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
}

footer nav div {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

footer nav h2 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.15rem;
}

footer nav a {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}

footer nav a:hover {
  color: var(--ink);
}

footer .fine {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--faint);
}

/* ── 404 ─────────────────────────────────────────────── */

.lost {
  min-height: 60vh;
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 4rem 0;
}

.lost h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.lost p {
  color: var(--muted);
}

footer .fine + .fine.copy {
  padding-top: 0;
  margin-top: -1.4rem;
  border-top: 0;
}
