/* ============================================================
   base — 리셋 · 타이포그래피 · 공통 유틸리티
   ============================================================ */

/* 페이지 이동 시 부드러운 교차 페이드 (지원 브라우저에서만 동작) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.32s; }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--header-h) + var(--bar-h) + 1.5rem);
  background: var(--paper);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.05em;
  line-break: strict;
  overflow-wrap: anywhere;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-min);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  font-feature-settings: "palt" 1;
  word-break: auto-phrase; /* 일본어를 문절 단위로 줄바꿈 */
  text-wrap: balance;
}
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- 유틸리티 ---------- */
.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.wrap--narrow { --wrap: 62rem; }
.sec { padding-block: var(--sec); }
.sec--tight { padding-block: calc(var(--sec) * 0.6); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -5rem; z-index: 200;
  padding: 0.6rem 1.1rem; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 0.8rem; transition: top 0.25s;
}
.skip:focus { top: 1rem; }

.ic { width: 1.25rem; height: 1.25rem; flex: none; }
/* 문구 덩어리 : 이 단위 안에서는 줄이 끊기지 않게 (일본어 카피용) */
.ph { display: inline-block; }
/* 짧은 카피는 문절 단위로 줄바꿈 */
.pd__lead, .svc__lead, .fhero__lead, .steaser__body, .look__title, .voice h3, .rcard__title, .sec-note, .phead__note, .ahero__lead, .hero__lead { word-break: auto-phrase; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.6875rem; font-weight: 500; line-height: 1.6;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--mute);
}
.eyebrow i { font: italic 400 1.15em/1 var(--font-en); letter-spacing: 0.04em; color: var(--brass); margin-right: 0.7em; text-transform: none; }
.en { font-family: var(--font-en); }

/* 섹션 제목 */
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap;
  margin-bottom: clamp(2.25rem, 4.5vw, 4rem);
}
.sec-title { font-size: clamp(1.6rem, 3vw, 2.5rem); margin-top: 0.9rem; }
.sec-note { max-width: 28rem; font-size: 0.875rem; color: var(--ink-2); }

main { display: block; padding-top: calc(var(--header-h) + var(--bar-h)); }
body.home main { padding-top: 0; }

/* ---------- 스크롤 등장 (JS 가 켜져 있을 때만 숨김) ---------- */
.js .rv {
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 0.9s var(--ease-out) calc(var(--d, 0) * 90ms), transform 1.2s var(--ease-expo) calc(var(--d, 0) * 90ms);
}
.js .rv.is-in { opacity: 1; transform: none; }

html.is-locked { overflow: hidden; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(0.6rem); } }
@keyframes rise { to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
}

/* ---------- 본문형 문서 (가이드 · 약관) ---------- */
.prose { font-size: 0.9rem; color: var(--ink-2); }
.prose h3 { font-size: 1.05rem; color: var(--ink); margin: 2rem 0 0.6rem; }
.prose p + p { margin-top: 0.9rem; }
.prose ul { display: grid; gap: 0.35rem; margin-top: 0.6rem; }
.prose li { position: relative; padding-left: 1.1rem; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 0.4rem; height: 1px; background: var(--brass); }
.prose a { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--line-2); transition: text-decoration-color 0.3s; }
.prose a:hover { text-decoration-color: currentColor; }

.table { font-size: 0.85rem; }
.table th, .table td { padding: 0.95rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; }
.table th { width: 30%; min-width: 8rem; color: var(--ink-2); font-size: 0.78rem; letter-spacing: 0.1em; background: color-mix(in srgb, var(--paper-2) 60%, transparent); }
.table--center th, .table--center td { text-align: center; width: auto; min-width: 0; }
.table--center thead th { background: var(--ink); color: var(--paper); border-color: var(--ink); }
