/* =========================================================================
   AI PIXELL — Base / Design Tokens / Global Components
   Pretendard Variable (KR) · Montserrat (EN labels)
   ========================================================================= */

/* ----- Design Tokens ---------------------------------------------------- */
:root {
  /* Colors */
  --black: #202020;
  --white: #ffffff;
  --orange: #ff401d;
  --gray-100: #f4f4f4;
  --gray-200: #e9e9e9;
  --gray-400: #b4b4b4;
  --gray-500: #8a8a8a;
  --text: #202020;
  --text-sub: #5a5a5a;

  /* Typography */
  --font-kr: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-en: "Montserrat", var(--font-kr);

  /* Type scale (design @1440) */
  --fs-xl: 60px;  --lh-xl: 76px;
  --fs-l:  40px;  --lh-l:  54px;
  --fs-m:  26px;  --lh-m:  39px;
  --fs-s:  20px;  --lh-s:  31px;
  --fs-xs: 15px;  --lh-xs: 31px;

  /* Layout */
  --page-pad: 100px;
  --content-w: 1240px;
  --frame-w: 1440px;
  --header-h: 67px;
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-pill: 50px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

/* ----- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-kr);
  font-size: var(--fs-s);
  line-height: var(--lh-s);
  color: var(--text);
  background: var(--white);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

/* ----- Layout helpers --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--frame-w);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}
.section { padding-block: 75px; }
.section--tight { padding-block: 50px; }
.eng { font-family: var(--font-en); }
.accent { color: var(--orange); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ----- Type utilities --------------------------------------------------- */
.t-xl { font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 700; letter-spacing: -0.01em; }
.t-l  { font-size: var(--fs-l);  line-height: var(--lh-l);  font-weight: 700; letter-spacing: -0.01em; }
.t-m  { font-size: var(--fs-m);  line-height: var(--lh-m);  font-weight: 500; }
.t-s  { font-size: var(--fs-s);  line-height: var(--lh-s);  font-weight: 600; }
.t-s-reg { font-size: var(--fs-s); line-height: var(--lh-s); font-weight: 400; }

/* ============================ HEADER / GNB ============================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 2px solid var(--gray-100);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(32,32,32,0.06); }
.gnb {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.gnb__left, .gnb__right { display: flex; align-items: center; gap: 30px; }
.gnb__logo { width: 182px; }
.gnb__logo img { width: 100%; height: auto; }
.gnb__nav { display: flex; align-items: center; gap: 30px; }
.gnb__link {
  font-family: var(--font-en);
  font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: 600;
  color: var(--black);
  position: relative;
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}
.gnb__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.gnb__link:hover { color: var(--orange); }
.gnb__link:hover::after { transform: scaleX(1); }
.gnb__link.is-active { color: var(--orange); }
.gnb__lang {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-en); font-size: var(--fs-xs); font-weight: 600;
  color: var(--black);
}
.gnb__lang svg { width: 10px; height: auto; transition: transform 0.2s var(--ease); }
.gnb__lang:hover svg { transform: translateY(2px); }
.gnb__cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--orange); color: var(--white);
  font-family: var(--font-en); font-size: var(--fs-xs); font-weight: 600; line-height: var(--lh-xs);
  padding: 3px 25px; border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease);
}
.gnb__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(255,64,29,0.32); background: #ff401d; }
.gnb__cta:active { transform: translateY(0); }
/* Download — 인사이트 우측 nav CTA */
.gnb__cta--nav { gap: 5px; padding: 7px 18px 7px 14px; line-height: 1; }
.gnb__cta--nav .material-symbols-outlined {
  font-size: 18px;
  /* 아이콘 폰트 로드 전 ligature 텍스트("download")가 버튼 폭을 늘렸다 줄이는
     깜빡임 방지: 글리프 1개 크기로 폭을 고정하고 넘치는 글자를 잘라낸다. */
  width: 18px; overflow: hidden;
}

/* Download 버튼 아래 둥둥 떠다니는 말풍선 툴팁 (14일 무료 체험) */
.gnb__dl { position: relative; display: inline-flex; }
.gnb__dl-tip {
  position: absolute; top: calc(100% + 9px); left: 50%;
  white-space: nowrap; pointer-events: none; z-index: 1;
  background: var(--black); color: var(--white);
  font-size: 12px; font-weight: 600; line-height: 1;
  padding: 6px 11px; border-radius: 8px;
  box-shadow: 0 8px 18px rgba(32,32,32,0.22);
  animation: gnbTipBob 2.4s var(--ease) infinite;
}
.gnb__dl-tip::before {
  content: ""; position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: var(--black);
}
@keyframes gnbTipBob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, -4px); }
}
@media (prefers-reduced-motion: reduce) {
  .gnb__dl-tip { animation: none; transform: translateX(-50%); }
}

/* ----- Material Symbols (전역 아이콘) ----------------------------------- */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal; font-style: normal;
  font-size: 22px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; flex: 0 0 auto;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* 언어 선택 — 지구본 아이콘 */
.gnb__lang { color: var(--black); padding: 0; }
.gnb__lang .material-symbols-outlined { font-size: 22px; }
.gnb__lang:hover { color: var(--orange); }
/* account avatar + dropdown */
.gnb__user { position: relative; display: flex; align-items: center; }
.gnb__avatar {
  padding: 0; cursor: pointer; background: none; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--black); transition: color 0.2s var(--ease);
}
.gnb__avatar img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
/* 다른 GNB 아이콘(언어팩)과 동일하게 — 배경 원 없이 무채색 사람 아이콘, 22px */
.gnb__avatar-ico { font-size: 22px; }
.gnb__avatar-ini { font-family: var(--font-en); font-weight: 700; font-size: 15px; line-height: 1; }
.gnb__dropdown {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 120;
  min-width: 220px; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(32,32,32,0.14); padding: 8px;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
/* hover bridge: 아바타↔드롭다운 사이 12px 갭을 채워 마우스 이동 시 hover 유지 */
.gnb__dropdown::before { content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 14px; }
/* hover 또는 클릭(is-open)/키보드 포커스 시 드롭다운 노출 */
.gnb__user:hover .gnb__dropdown,
.gnb__user:focus-within .gnb__dropdown,
.gnb__user.is-open .gnb__dropdown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.gnb__user:hover .gnb__avatar,
.gnb__user:focus-within .gnb__avatar { color: var(--orange); }
.gnb__dropdown-user { padding: 10px 12px 12px; border-bottom: 1px solid var(--gray-100); margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.gnb__dropdown-user .nm { font-size: 15px; font-weight: 700; color: var(--black); }
.gnb__dropdown-user .em { font-size: 12.5px; color: var(--text-sub); }
.gnb__dropdown-item {
  display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--text); background: none; border: none; cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.gnb__dropdown-item:hover { background: var(--gray-100); color: var(--orange); }
.gnb__dropdown-item--logout { color: var(--text-sub); border-top: 1px solid var(--gray-100); margin-top: 6px; border-radius: 0 0 9px 9px; }
.gnb__dropdown-item--logout:hover { color: var(--orange); }

.gnb__burger { display: none; width: 28px; height: 28px; flex-direction: column; gap: 6px; justify-content: center; }
.gnb__burger span { display: block; height: 2px; background: var(--black); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }

/* spacer pushes page content below the fixed header */
.header-spacer { height: var(--header-h); }

/* mobile slide-down menu */
.mobile-menu {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: var(--white); border-bottom: 2px solid var(--gray-100);
  display: flex; flex-direction: column; padding: 12px var(--page-pad) 24px;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  box-shadow: 0 16px 30px rgba(32,32,32,0.08);
}
.menu-open .mobile-menu { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-en); font-size: 17px; font-weight: 600; color: var(--black);
  padding: 14px 0; border-bottom: 1px solid var(--gray-100);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu__cta {
  margin-top: 22px; padding: 16px 22px !important;
  background: var(--orange); color: var(--white) !important;
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
  text-align: center; border-radius: var(--radius-pill);
  border: none !important; border-bottom: none !important;
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: 0 12px 26px rgba(255,64,29,0.28);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.mobile-menu__cta:hover { background: #ff401d; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(255,64,29,0.34); }
.mobile-menu__cta .material-symbols-outlined { font-size: 20px; }
.menu-open .gnb__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .gnb__burger span:nth-child(2) { opacity: 0; }
.menu-open .gnb__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================ FOOTER =================================== */
.site-footer {
  background: var(--black); color: rgba(255,255,255,0.72);
  padding-block: 70px 50px;
  font-size: 15px; line-height: 26px;
}
.site-footer a { color: rgba(255,255,255,0.72); transition: color 0.2s var(--ease); }
.site-footer a:hover { color: var(--white); }
.footer__top {
  display: flex; justify-content: space-between; gap: 60px; flex-wrap: wrap;
  padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer__brand { max-width: 320px; }
.footer__brand img { width: 174px; margin-bottom: 22px; }
.footer__brand p { font-size: 14px; line-height: 24px; color: rgba(255,255,255,0.5); }
.footer__cols { display: flex; gap: 80px; flex-wrap: wrap; }
.footer__col h4 {
  font-family: var(--font-en); font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--white); margin-bottom: 18px;
}
.footer__col li { margin-bottom: 12px; font-size: 15px; }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding-top: 30px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,0.4);
}
.footer__bottom .eng { letter-spacing: 0.02em; }
.footer__legal { display: inline-flex; gap: 10px; align-items: center; }
.footer__legal a { color: rgba(255,255,255,0.55); transition: color 0.2s ease; }
.footer__legal a:hover { color: #fff; }
.footer__legal > span { color: rgba(255,255,255,0.25); }

/* ============================ BUTTONS / LINKS ========================== */
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: var(--radius-pill);
  font-weight: 600; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease);
}
.btn-orange {
  background: var(--orange); color: var(--white);
  padding: 12px 34px; font-size: var(--fs-s); line-height: 1;
}
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,64,29,0.3); background: #ff401d; }

/* pill CTAs (shared across detail/service/content pages) */
.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta-fill, .cta-line {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 31px; border-radius: var(--radius-pill);
  font-size: var(--fs-s); line-height: var(--lh-s); font-weight: 600;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.cta-fill { background: var(--orange); color: var(--white); }
.cta-fill:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255,64,29,0.34); background: #ff401d; }
.cta-line { background: var(--white); color: var(--orange); border: 1px solid var(--orange); }
.cta-line:hover { transform: translateY(-2px); background: var(--orange); color: var(--white); }
.btn-ico { width: 17px; height: 17px; margin-right: 8px; flex: 0 0 auto; }

/* arrow text-link (›) */
.link-arrow {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--orange); font-weight: 600; white-space: nowrap;
}
.link-arrow svg { width: 9px; height: auto; transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ============================ STUB / COMING SOON ====================== */
.stub {
  min-height: calc(100vh - var(--header-h) - 280px);
  display: flex; align-items: center;
  background:
    radial-gradient(80% 120% at 50% -10%, #fff6f3 0%, #ffffff 60%);
}
.stub__inner { text-align: center; max-width: 720px; margin-inline: auto; padding-block: 120px; }
.stub__eyebrow {
  display: inline-block; font-family: var(--font-en); font-weight: 600; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange);
  padding: 7px 16px; border: 1px solid rgba(255,64,29,0.35); border-radius: var(--radius-pill);
  margin-bottom: 28px;
}
.stub__title { font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; }
.stub__desc { font-size: var(--fs-s); line-height: var(--lh-s); color: var(--text-sub); margin-bottom: 36px; }
.stub__links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================ SCROLL REVEAL ============================ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

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

/* ============================ RESPONSIVE ============================== */
@media (max-width: 1200px) {
  :root { --page-pad: 56px; }
  .gnb__left { gap: 22px; }
  .gnb__nav { gap: 22px; }
}
@media (max-width: 900px) {
  :root {
    --fs-xl: 40px; --lh-xl: 52px;
    --fs-l: 30px;  --lh-l: 42px;
    --fs-m: 22px;  --lh-m: 33px;
    --fs-s: 18px;  --lh-s: 28px;
    --page-pad: 24px;
  }
  .gnb__nav, .gnb__left .gnb__link, .gnb__right .gnb__link, .gnb__dl, .gnb__lang { display: none; }
  .gnb__burger { display: flex; }
  .footer__top { flex-direction: column; gap: 40px; }
  .footer__cols { gap: 48px; }
}
/* 폰 단계 — 페이지 작업 기준(640px)으로 통일. 본문 토큰(--fs-s)도 모바일에서 축소. */
@media (max-width: 640px) {
  :root {
    --fs-xl: 32px; --lh-xl: 42px;
    --fs-s: 16px;  --lh-s: 25px;
  }
}
