/* ==========================================================================
   NSNTEK — Base (reset · typography · layout primitives · utilities)
   ========================================================================== */

/* Pretendard (가변폰트, jsDelivr) */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* 한글이 단어 중간에서 잘리지 않도록(띄어쓰기 기준 줄바꿈) */
  word-break: keep-all;
  overflow-wrap: break-word;
}

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

svg {
  height: auto;
}

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

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

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-extra);
}

h3 {
  font-size: var(--fs-h3);
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: var(--fw-bold);
}

/* --- Layout primitives --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
}

.section--soft {
  background: var(--bg-soft);
}

.section--dark {
  background: var(--navy-900);
  color: var(--color-text-invert);
}

.section--dark h2,
.section--dark h3 {
  color: #fff;
}

/* --- Section heading block --- */
.section-head {
  max-width: 760px;
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: var(--space-2);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-extra);
}

.section-desc {
  margin-top: var(--space-3);
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  line-height: 1.55;
}

.section--dark .section-desc {
  color: var(--gray-300);
}

/* --- Utilities --- */
.text-gradient {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lang-en {
  display: none;
}

/* 줄바꿈으로 끊기면 안 되는 단어(복합어·제품명) */
.nowrap {
  white-space: nowrap;
}

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

.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: var(--z-top);
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* --- Scroll reveal base state ---
   숨김 상태는 html.js 에서만 적용 → JS 미동작 시 콘텐츠는 항상 보임 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
