/* ------------------------------------------------------------
   chiango · design tokens, reset, type, primitives
   팔레트: 오프화이트 지면 + 잉크 + 탠저린 단일 액센트 (라이트 기본, 다크 자동)
   모서리 규칙: 인터랙티브 = pill / 컨테이너·이미지 = 20px / 입력 = 14px
   ------------------------------------------------------------ */
:root {
  --bg: #f4f4f1;
  --bg-2: #eaebe6;
  --surface: #ffffff;
  --surface-2: #f8f8f6;
  --ink: #15181a;
  --ink-2: #3c4144;
  --muted: #6b7175;
  --line: rgba(21, 24, 26, 0.1);
  --line-strong: rgba(21, 24, 26, 0.22);
  --accent: #e4572e;
  --accent-hover: #cf4a24;
  --accent-ink: #ffffff;
  --accent-soft: #fbe7df;
  --dark-bg: #131517;
  --dark-surface: #1c1f22;
  --dark-ink: #f1f0eb;
  --dark-muted: #9aa0a5;
  --dark-line: rgba(241, 240, 235, 0.12);
  --shadow-card: 0 1px 2px rgba(21, 24, 26, 0.04), 0 14px 40px -18px rgba(21, 24, 26, 0.28);
  --shadow-float: 0 24px 60px -24px rgba(21, 24, 26, 0.45);

  --font-ko: "Wanted Sans Variable", "Pretendard Variable", "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-display: "Bricolage Grotesque", "Wanted Sans Variable", "IBM Plex Sans KR", sans-serif;

  --radius-card: 20px;
  --radius-input: 14px;
  --radius-pill: 999px;

  --container: 1280px;
  --gutter: clamp(20px, 3vw, 40px);
  --nav-h: 72px;
  --section-gap: clamp(72px, 9vw, 128px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.22s;
  --dur: 0.5s;
  --dur-slow: 0.9s;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131517;
    --bg-2: #1a1d20;
    --surface: #1c1f22;
    --surface-2: #22262a;
    --ink: #f1f0eb;
    --ink-2: #cfd1cc;
    --muted: #9aa0a5;
    --line: rgba(241, 240, 235, 0.11);
    --line-strong: rgba(241, 240, 235, 0.26);
    --accent: #ff7a52;
    --accent-hover: #ff8f6e;
    --accent-ink: #1a0d08;
    --accent-soft: #3a2118;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 40px -18px rgba(0, 0, 0, 0.7);
    --shadow-float: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131517;
  --bg-2: #1a1d20;
  --surface: #1c1f22;
  --surface-2: #22262a;
  --ink: #f1f0eb;
  --ink-2: #cfd1cc;
  --muted: #9aa0a5;
  --line: rgba(241, 240, 235, 0.11);
  --line-strong: rgba(241, 240, 235, 0.26);
  --accent: #ff7a52;
  --accent-hover: #ff8f6e;
  --accent-ink: #1a0d08;
  --accent-soft: #3a2118;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-float: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ko);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, address { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- type ---------- */
.h-display {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  font-size: clamp(2.35rem, 4.4vw, 3.9rem);
  word-break: keep-all;
  text-wrap: balance;
}
.h-section {
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.14;
  font-size: clamp(1.7rem, 2.9vw, 2.5rem);
  word-break: keep-all;
  text-wrap: balance;
}
.h-card {
  font-weight: 640;
  letter-spacing: -0.02em;
  line-height: 1.32;
  font-size: 1.06rem;
  word-break: keep-all;
}
.lead {
  color: var(--ink-2);
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  line-height: 1.72;
  max-width: 34em;
  word-break: keep-all;
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.small { font-size: 0.875rem; color: var(--muted); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.045em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
  color: var(--ink);
}
.wordmark .o {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  border: 0.17em solid var(--accent);
  border-radius: 50%;
  transform: translateY(-0.02em);
}

/* ---------- layout ---------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-gap); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .stack { display: grid; gap: 12px; }
.section-head .lead { margin-top: 4px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; white-space: nowrap; color: var(--ink);
  transition: gap var(--dur-fast) var(--ease-out), color var(--dur-fast);
}
.link-arrow .ico { width: 18px; height: 18px; }
.link-arrow:hover { gap: 10px; color: var(--accent); }

/* ---------- icons ---------- */
.ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.fill { fill: currentColor; stroke: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding-inline: 22px;
  border-radius: var(--radius-pill);
  font-weight: 650; font-size: 0.98rem; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast), border-color var(--dur-fast);
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--ink-2); }
.btn-ghost { border: 1.5px solid var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn-light:hover { border-color: var(--line-strong); }
.btn-sm { height: 40px; padding-inline: 16px; font-size: 0.9rem; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.btn .ico { width: 18px; height: 18px; }

/* 다크 블록 위에서는 액센트 대비를 보장 */
.on-dark { --ink: var(--dark-ink); --ink-2: #d8d9d4; --muted: var(--dark-muted); --line: var(--dark-line); --line-strong: rgba(241, 240, 235, 0.3); --surface: var(--dark-surface); --surface-2: #24282c; --bg: var(--dark-bg); --bg-2: #1a1d20; --accent: #ff7a52; --accent-hover: #ff8f6e; --accent-ink: #1a0d08; --accent-soft: #3a2118; color: var(--ink); background: var(--bg); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.js .reveal-scale { opacity: 0; transform: scale(0.96) translateY(14px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); transition-delay: var(--d, 0s); }
.reveal-scale.in { opacity: 1; transform: none; }

/* ---------- media ---------- */
.frame { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--bg-2); isolation: isolate; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(21, 24, 26, 0.08); pointer-events: none; }

/* ---------- utilities ---------- */
.br-m { display: none; }
@media (max-width: 600px) { .br-m { display: inline; } .h-display { font-size: clamp(2.05rem, 9.6vw, 2.6rem); } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chip { display: inline-flex; align-items: center; height: 30px; padding-inline: 12px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 560; color: var(--ink-2); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--surface); }
.avatar.sm { width: 28px; height: 28px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-scale { opacity: 1; transform: none; transition: none; }
  .btn, .link-arrow { transition: none; }
}
