/* ===== Font ===== */
@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/PretendardVariable.woff2') format('woff2-variations');
}

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

html {
  scroll-behavior: smooth;
}

/* 스크롤 리빌 진입 전 요소가 화면 밖으로 밀려 있어도 가로 스크롤이 생기지 않게 가둔다.
   (overflow:clip 미지원 구버전 사파리는 hidden 으로 폴백) */
html, body {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  word-break: keep-all;        /* 단어 중간에서 줄을 바꾸지 않는다 */
  overflow-wrap: break-word;
  text-wrap: pretty;           /* 마지막 줄에 한두 글자만 남지 않게 한다 */
  color: var(--text);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

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

ul, ol {
  list-style: none;
}

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

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

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

/* ===== CSS Variables ===== */
:root {

  /* ── Navy: 앤티에스 브랜드 메인 ──
     로고, 메뉴, 띠 배경, 주요 버튼.            */
  --navy-900: #0B2A59;
  --navy-800: #0F3A7A;
  --navy-700: #144999;
  --navy-600: #2A62B5;

  /* ── Blue: 강조 ──
     섹션 라벨, 질문 말풍선, 알약 버튼.          */
  --blue-700: #006BCC;
  --blue-600: #0085FF;
  --blue-100: #E5F3FE;
  --blue-50:  #F2F9FF;

  /* ── Red: 로고 포인트 ── */
  --red-600: #C8173E;

  /* ── Gray ── */
  --gray-950: #0E0E0E;
  --gray-900: #1E1E1E;
  --gray-700: #444444;
  --gray-600: #555555;
  --gray-500: #888888;
  --gray-400: #AFAFAF;
  --gray-300: #D9D9D9;
  --gray-200: #E8E8E8;
  --gray-100: #F7F7F7;
  --slate-100: #E8EEF5;

  /* ── 솔루션별 포인트 색 (OKESTRO 제품군) ── */
  --okestro-symphony: #6560FF;
  --okestro-cmp: #1D80F8;
  --okestro-contrabass: #F76205;
  --okestro-viola: #32CD32;
  --okestro-trombone: #00BDAA;
  --okestro-clarinet: #965AB9;
  --nabipangea:         #EE622F;

  /* ── Semantic ── */
  --primary:       var(--navy-700);
  --accent:        var(--blue-600);

  --text: #0E0E0F;
  --text-muted: #4C4C4D;
  --text-light: #6B6B6B;
  --text-on-dark: #A9A9A9;
  --accent-text: var(--blue-700);

  --border: #DEDEDE;

  --bg-white:    #FFFFFF;
  --bg-gray:     var(--gray-100);
  --bg-hero-card: rgba(255, 255, 255, 0.55);  /* 솔루션 히어로 안 카드 */
  --bg-card:     #F0F2F4;  /* 흰 배경에서 경계가 보이는 회색 카드 */
  --bg-blue:     var(--blue-100);
  --bg-answer:   var(--slate-100);
  --bg-dark:     var(--gray-950);

  /* ── Layout ── */
  --container: 1160px;       /* 모든 섹션, 헤더, 푸터의 폭 */
  --container-narrow: 800px; /* 읽거나 입력하는 내용: 문의 폼, 공지 본문 */
  --container-pad:  24px;
  --header-h:       88px;

  /* 글자 크기. 모바일 값은 아래 @media 에서 바뀐다. 용도는 CLAUDE.md "글자" */
  --fs-display: 96px;
  --fs-hero: 60px;
  --fs-title: 36px;
  --fs-subtitle: 26px;
  --fs-heading: 20px;
  --fs-lead: 18px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-tiny: 12px;

  /* 줄간격 */
  --lh-display: 1.1;
  --lh-title: 1.3;
  --lh-text: 1.7;

  /* 모서리. 용도는 CLAUDE.md "모서리" */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --section-space: 120px;   /* 섹션 위아래 여백 */
  --pill-gap: 32px;         /* 알약 라벨 아래 */
  --title-gap: 20px;        /* 섹션 제목과 설명 사이 */
  --content-gap: 80px;      /* 제목 묶음과 내용 사이 */
  --card-gap: 24px;         /* 카드와 카드 사이 */
  --section-join: 80px;     /* 같은 배경색이 이어지는 쪽의 여백 */
  --reveal-distance: 40px;  /* 등장 효과: 떠오르는 거리 */
  --reveal-duration: 0.9s;  /* 등장 효과: 걸리는 시간 */
  --reveal-step: 0.1s;      /* 등장 효과: 다음 요소가 나오는 간격 */
  --return-distance: -16px; /* 되돌아올 때: 내려오는 거리 */
  --return-duration: 0.5s;  /* 되돌아올 때: 걸리는 시간 */
  --hover-lift: -6px;       /* 클릭되는 카드: 떠오르는 높이 */
  --hover-arrow: 6px;       /* 문의 링크: 화살표가 움직이는 거리 */
}

/* ===== Typography ===== */
.heading-lg {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--text);
}

.heading-md {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--text);
}

.section-desc {
  font-size: var(--fs-lead);
  line-height: var(--lh-text);
  color: var(--text);
}

.section-label {
  font-size: var(--fs-subtitle);
  font-weight: 700;
  color: var(--accent-text);
  line-height: var(--lh-title);
}

/* ===== Layout Utilities ===== */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--container-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* 고정 헤더 높이만큼 본문을 내린다. */
.page-main {
  padding-top: var(--header-h);
}

/* 섹션 위아래 여백은 모두 여기서 정한다. 규칙은 CLAUDE.md "폭과 여백". */
.section {
  padding-block: var(--section-space);
}

/* 같은 배경색이 이어지는 쪽 */
.section-join-top {
  padding-top: var(--section-join);
}

.section-join-bottom {
  padding-bottom: var(--section-join);
}

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

/* 남색 배경 위에서는 파란 라벨이 묻히므로 밝게 */
.section-navy .section-label {
  color: var(--blue-100);
}

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

.section-navy {
  background: var(--primary);
}

/* 섹션 안의 세로 흐름. 자식 간격은 gap 으로만 준다. */
.section-stack {
  display: flex;
  flex-direction: column;
  gap: var(--content-gap);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--title-gap);
  text-align: center;
}

.heading-on-dark {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--bg-white);
}

/* ===== Common Components ===== */

/* 알약 라벨 (Solutions / Point / Q&A) */
.pill-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 35px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text);
  line-height: var(--lh-text);
}

/* 알약 버튼 (자세히 보기) */
/* 외곽선 알약 링크 (제조사 페이지 / DataSheet) */
.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 143px;
  padding: 8px 30px;
  white-space: nowrap;
  border: 1px solid #DDDDDD;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--text);
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline-pill:hover {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

/* 색이 채워진 버튼은 모두 같은 모양이다 (히어로, 문의 배너, 문의 폼, 공지 목록) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: var(--lh-text);
  color: var(--bg-white);
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-text);
}

/* 체크 목록 */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  color: var(--text);
}

.check-icon {
  flex-shrink: 0;
  font-size: 12px;
  line-height: calc(var(--fs-body) * var(--lh-text));
  color: var(--accent);
}

/* ===== Scroll Reveal =====
   요소 크기와 상관없이 모두 같은 거리와 속도로 한 번만 떠오른다. 규칙은 CLAUDE.md "움직임".
   js/app.js 가 화면에 들어온 요소에 .is-revealed 를 붙인다. */
@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }
}

@keyframes revealFade {
  from {
    opacity: 0;
  }
}

.scroll-reveal {
  opacity: 0;
}

.scroll-reveal.is-revealed {
  opacity: 1;
  animation: var(--reveal-name, revealUp) var(--reveal-duration) var(--ease) var(--reveal-delay, 0s) backwards;
}

/* 위로 스크롤할 때 살짝 내려오는 요소. 대상은 js/app.js 의 RETURN_TARGETS 에서 정한다. */
.scroll-return {
  transition: translate var(--return-duration) var(--ease);
}

.scroll-return.is-passed {
  translate: 0 var(--return-distance);
}

.scroll-reveal[data-reveal-delay="1"] { --reveal-delay: calc(var(--reveal-step) * 1); }
.scroll-reveal[data-reveal-delay="2"] { --reveal-delay: calc(var(--reveal-step) * 2); }
.scroll-reveal[data-reveal-delay="3"] { --reveal-delay: calc(var(--reveal-step) * 3); }
.scroll-reveal[data-reveal-delay="4"] { --reveal-delay: calc(var(--reveal-step) * 4); }
.scroll-reveal[data-reveal-delay="5"] { --reveal-delay: calc(var(--reveal-step) * 5); }
.scroll-reveal[data-reveal-delay="6"] { --reveal-delay: calc(var(--reveal-step) * 6); }
.scroll-reveal[data-reveal-delay="7"] { --reveal-delay: calc(var(--reveal-step) * 7); }

/* 모바일은 카드가 세로로 쌓이므로 간격을 줄인다. */
@media (max-width: 991px) {
  .scroll-reveal {
    --reveal-step: 0.05s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal.is-revealed {
    animation: none;
  }

  .scroll-return.is-passed {
    translate: none;
  }
}

/* 스크립트가 꺼져 있으면 내용이 숨겨진 채로 남지 않게 한다. */
.no-js .scroll-reveal {
  opacity: 1;
}

/* ===== Helpers ===== */
.br-pc {
  display: inline;
}

.section-stack-tight {
  display: flex;
  flex-direction: column;
  gap: var(--content-gap);
}

.check-icon-orange {
  flex-shrink: 0;
  font-size: 12px;
  line-height: calc(var(--fs-body) * var(--lh-text));
  color: var(--nabipangea);
}

.heading-main {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--text);
}

.section-stack-qa {
  display: flex;
  flex-direction: column;
  gap: var(--pill-gap);
}

.section-header-tight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  text-align: center;
}

.heading-lg-loose {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--text);
}

.mobile-only {
  display: none;
}

.section-desc-solution {
  font-size: var(--fs-lead);
  line-height: var(--lh-text);
  color: var(--text);
}

.heading-about {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--text);
}

.heading-lg-xl {
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--text);
}

.pill-label + *,
.pill-label-dark + * {
  padding-top: calc(var(--pill-gap) - var(--title-gap));
}

.section-header-solutions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--title-gap);
  text-align: center;
}

/* ===== Responsive ===== */

@media (max-width: 991px) {
  :root {
    --container-pad: 15px;
    --fs-display: 40px;
    --fs-hero: 28px;
    --fs-title: 24px;
    --fs-subtitle: 20px;
    --fs-heading: 18px;
    --fs-lead: 16px;
    --fs-body: 15px;
    --fs-small: 13px;
    --radius-md: 12px;
    --section-space: 60px;
    --section-join: 40px;
    --pill-gap: 20px;
    --title-gap: 12px;
    --content-gap: 40px;
    --card-gap: 12px;
    --header-h: 54px;
  }

  .br-pc {
    display: none;
  }

  .check-list {
    gap: 6px;
  }

  .mobile-only {
    display: revert;
  }

  .pc-only {
    display: none;
  }

}
