/* ==========================================================================
   Base: reset, type roles, links, buttons, container, header, drawer, footer
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }   /* anchors land below the sticky header */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* 한글은 어절 단위로 끊는다. 이게 없으면 '원단'이 '원/단'으로 쪼개진다. */
  word-break: keep-all;
  overflow-wrap: break-word;
}
body.nav-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
p { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, address { margin: 0; font-style: normal; }
button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 300; padding: 12px 16px; background: var(--ink); color: var(--on-ink); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.skip:focus { top: 16px; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink .display, .section--ink .lead { color: var(--on-ink); }

/* ---------- Type roles ---------- */
.display { font-family: var(--font-display); font-weight: 500; line-height: var(--display-leading, 1.04); letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.display--xl { font-size: var(--fs-display); }
.display--h2 { font-size: var(--fs-h2); line-height: 1.08; }
.display--h3 { font-size: var(--fs-h3); line-height: 1.2; }
.display--h4 { font-family: var(--font-text); font-weight: 500; font-size: var(--fs-h4); line-height: 1.3; letter-spacing: 0; color: var(--ink); }
.display em { font-style: italic; color: var(--accent); }

.label { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); }
.label--accent { color: var(--accent); }
.lead { font-size: var(--fs-lead); font-weight: 400; line-height: 1.6; color: var(--ink); max-width: 34em; }
.body { max-width: 62ch; }
.small { font-size: var(--fs-small); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Links & buttons ---------- */
.link { color: var(--accent); text-decoration: underline; text-decoration-color: var(--ornament); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: text-decoration-color var(--ease); }
.link:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.link--arrow::after { content: " \2192"; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; background: var(--accent); color: var(--on-ink); font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--accent); border-radius: var(--radius); transition: background var(--ease), color var(--ease); }
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn--outline { background: transparent; color: var(--accent); }
.btn--outline:hover { background: var(--accent); color: var(--on-ink); }
.btn--light { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.btn--light:hover { background: #fff; border-color: #fff; }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hdr__inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__text { display: grid; gap: 1px; }
.brand__logo { width: 26px; height: 33px; object-fit: contain; }
.brand__name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); line-height: 1.15; }
.brand__since { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-soft); line-height: 1.2; }
.nav__list { display: flex; gap: 28px; }
.nav__list a { font-size: 15px; font-weight: 500; color: var(--ink); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav__list a:hover, .nav__list a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; }

/* ---------- Drawer (mobile menu) ---------- */
.drawer { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; padding: 24px; background: var(--bg); }
.drawer[hidden] { display: none; }
.drawer__close { align-self: flex-end; width: 44px; height: 44px; background: none; border: 0; font-size: 20px; cursor: pointer; }
.drawer__list { margin-top: 24px; }
.drawer__list > li > a { display: block; padding: 14px 0; font-family: var(--font-display); font-size: 28px; color: var(--ink); border-bottom: 1px solid var(--line); }
.drawer__foot { margin-top: auto; }
.drawer__foot .btn { width: 100%; }

@media (max-width: 900px) {
  :root { --header-h: var(--header-h-mobile); }
  .brand__since, .nav, .hdr__cta { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Footer ---------- */
.ftr { padding: 64px 0 32px; background: var(--surface); border-top: 1px solid var(--line); font-size: var(--fs-small); }
.ftr__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 40px 32px; }
.ftr h3 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 12px; }
.ftr__tag { margin-top: 12px; max-width: 34ch; }
.ftr__list li { padding: 3px 0; }
.ftr a:hover { color: var(--accent); }
.ftr__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.ftr__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 24px; color: var(--text-soft); }
@media (max-width: 1000px) { .ftr__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .ftr__grid { grid-template-columns: 1fr; gap: 28px; } }
