/* Reset + base typography */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Lenis가 활성화되면 CSS 스무스 스크롤을 양보한다 — 스크롤 엔진은 단 하나(Lenis)만.
   (Lenis 미로드/축소 모션 시에는 위의 CSS smooth가 그대로 동작) */
html.lenis,
html.lenis body {
  height: auto;
}

/* 양보 조건은 Lenis가 실제로 붙이는 클래스 하나(.lenis)로 건다 — 2026-09-07까지는
   `.lenis.lenis-smooth` 였는데 Lenis 1.1.14는 lenis-smooth 를 붙이지 않아 이 규칙이
   한 번도 매치되지 않았다(실측: html class = "js-header lenis", computed scroll-behavior
   = smooth, 홈·상세 전 페이지). 그래서 네이티브 스무스 스크롤이 살아 있었고, 앵커 처리를
   JS가 가로채지 않는 페이지(시네마틱 홈)에서 브라우저와 Lenis가 같은 스크롤 위치를 동시에
   써서 착지가 타이밍에 좌우됐다. 벤더 클래스 이름에 기대지 않는다. */
html.lenis {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

h1,
h2,
h3,
h4 {
  line-height: var(--line-height-tight);
  margin: 0 0 var(--space-4);
}

p {
  margin: 0 0 var(--space-4);
}

a {
  /* 본문 링크는 딥 그린 — 브랜드 그린 #3cc676은 흰 배경 위 텍스트 대비가 부족하다 */
  color: var(--color-primary-deep);
}

::selection {
  background: var(--color-glow);
  color: var(--color-ink);
}

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

:focus-visible {
  /* 포커스 링도 딥 그린 — 흰 배경 위 3:1 대비 확보 */
  outline: 2px solid var(--color-primary-deep);
  outline-offset: 2px;
}

/* Utilities */
.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 브랜드 마크 아이콘 — 공식 락업 이미지의 좌측 마크 영역만 표시(크롭 자산 불필요).
   사용처: 브랜드 페이지 킥커·GNB 사업분야 패널·브랜드 칩. width/height 속성 필수. */
.u-brandmark {
  object-fit: cover;
  object-position: left center;
}
