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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Korean must never break mid-word: "스 튜디오" is the default behaviour
     otherwise, because the browser treats every syllable as a break point. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

body.is-locked {
  overflow: hidden;
  height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
p,
figure,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* hide native scrollbar — we draw our own */
body::-webkit-scrollbar {
  width: 0;
}

/* ── shared primitives ─────────────────────────────── */

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

.label {
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.section--light .label {
  color: rgba(11, 13, 18, 0.42);
}

.display {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

/* Korean needs a real bold sans, not Anton */
.display--kr {
  font-family: var(--f-sans);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-transform: none;
}

/* word-mask reveal: each word wrapped in .w > span */
/* The mask has to sit outside the Korean glyph box or ascenders and the
   descender on ㅂ/ㅍ get sheared off. Padding opens it up, the matching
   negative margin keeps layout identical. */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0.16em 0 0.28em;
  margin: -0.16em 0 -0.28em;
}

.w > span {
  display: inline-block;
  will-change: transform;
}

.section {
  position: relative;
  z-index: 2;
}

.section--light {
  background: var(--paper-0);
  color: var(--fg-ink);
}

.section--dark {
  background: var(--ink-1);
}

.section--pad {
  padding-block: clamp(6rem, 14vh, 11rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.05rem 2.4rem;
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease-out), background 0.3s, color 0.3s;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  border-color: var(--line);
  color: var(--fg);
}

.btn--ghost:hover {
  background: var(--fg);
  color: var(--ink-0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
