/* ════════════════════════════════════════════════
   FABRICA ASSOCIATES — Quick Help FINAL EDITION
   파브리카 디자인 시스템 통일 적용
   커스텀 커서 / 배경 파티클 / 글래스 고도화
   타이포 시스템 / stagger 애니메이션
   ════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500&family=Orbitron:wght@600;700&display=swap');

/* ── CSS 변수 ─────────────────────────────────── */
:root {
  --c-gold    : #FFBB01;
  --c-pink    : #FF6B9D;
  --c-white   : rgba(255,255,255,0.90);
  --c-dim     : rgba(255,255,255,0.22);
  --glass-bg  : rgba(255,255,255,0.10);
  --glass-bd  : rgba(255,255,255,0.18);
  --glass-hover: rgba(255,255,255,0.18);
  --dark-mid  : rgba(0,0,0,0.38);
  --ease-out  : cubic-bezier(0.4,0,0.2,1);
  --ease-bounce: cubic-bezier(0.34,1.56,0.64,1);
  --font-brand: 'Orbitron', sans-serif;
  --font-ui   : 'Montserrat', sans-serif;
  --font-body : 'Noto Sans KR', sans-serif;

  /* 메뉴 레이아웃 변수 */
  --item-h    : 56px;
  --item-gap  : 8px;
  --items     : 9;
  --heading-h : 100px;
}

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

html { height: 100%; }

body {
  font-family: var(--font-body);
  min-height: 100vh;
  background: #0d1117;
  overflow-x: hidden;
  cursor: none;
  -webkit-user-select: none;
  user-select: none;
}

::selection      { background: rgba(255,107,157,0.35); color:#fff; }
:focus-visible   { outline: 2px solid var(--c-gold); outline-offset:3px; border-radius:3px; }

/* ════════════════════════════════════════════════
   배경 캔버스
   ════════════════════════════════════════════════ */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ════════════════════════════════════════════════
   커스텀 커서
   ════════════════════════════════════════════════ */
#cursor-dot,
#cursor-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%,-50%);
}

#cursor-dot {
  width: 6px; height: 6px;
  background: var(--c-gold);
  transition: background 0.15s ease, transform 0.15s var(--ease-bounce);
}

#cursor-ring {
  width: 28px; height: 28px;
  border: 1.5px solid rgba(255,187,1,0.55);
  background: transparent;
  transition: width 0.20s var(--ease-out), height 0.20s var(--ease-out),
              border 0.20s ease, opacity 0.15s ease;
}

body.c-click  #cursor-dot  { transform:translate(-50%,-50%) scale(0.5); background:var(--c-pink); }
body.c-click  #cursor-ring { width:16px; height:16px; border-color:rgba(255,107,157,0.9); }
body.c-hover  #cursor-ring { width:46px; height:46px; border-color:rgba(255,107,157,0.5); background:rgba(255,107,157,0.06); }
body.c-hover  #cursor-dot  { background:var(--c-pink); }
body.c-hidden #cursor-dot,
body.c-hidden #cursor-ring { opacity:0; }

/* ════════════════════════════════════════════════
   TOP NAV
   ════════════════════════════════════════════════ */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(0,0,0,0.40);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.06);

  opacity: 0;
  animation: fadeInDown 0.7s var(--ease-out) 0.2s forwards;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 2px;
  cursor: none;
  transition: color 0.18s ease, border-color 0.18s ease,
              background 0.18s ease, letter-spacing 0.2s ease;
}

.nav-link:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.06);
  letter-spacing: 0.18em;
}

.nav-arrow { opacity: 0.6; }

.nav-brand {
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.30em;
  color: rgba(255,255,255,0.40);
}

@keyframes fadeInDown {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ════════════════════════════════════════════════
   MAIN WRAP
   ════════════════════════════════════════════════ */
.qh-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 24px 80px;
  box-sizing: border-box;
}

/* ════════════════════════════════════════════════
   HEADING CARD
   ════════════════════════════════════════════════ */
.qh-heading {
  width: 100%;
  max-width: 680px;
  height: var(--heading-h);
  cursor: none;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--glass-bd);
  background: linear-gradient(
    120deg,
    rgba(133,213,231,0.22) 0%,
    rgba(122,158,210,0.18) 35%,
    rgba(186,106,201,0.14) 70%,
    rgba(222,84,194,0.10) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.12);

  animation: cardEntrance 1.0s var(--ease-bounce) 0.1s both;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

@keyframes cardEntrance {
  from { opacity:0; transform:translateY(30px) scale(0.96); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* shimmer 흐르는 효과 */
.qh-heading-shimmer {
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.12) 50%,
    transparent 100%
  );
  animation: shimmerFlow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmerFlow {
  0%   { left: -60%; }
  100% { left: 160%; }
}

.qh-heading:not(.open):hover {
  transform: translateY(-3px) scale(1.005);
  box-shadow: 0 16px 48px rgba(0,0,0,0.55),
              inset 0 1px 0 rgba(255,255,255,0.22),
              0 0 0 1px rgba(255,187,1,0.20);
}

/* heading 열렸을 때 위로 */
.qh-heading.open {
  transform: translateY(0);
  box-shadow: 0 4px 24px rgba(0,0,0,0.55),
              inset 0 1px 0 rgba(255,255,255,0.18);
}

.qh-heading-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 24px;
  gap: 20px;
}

/* 아이콘 */
.qh-icon-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.qh-icon-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,187,1,0.40);
  animation: iconPulse 2.5s ease-in-out infinite;
}

@keyframes iconPulse {
  0%,100% { transform:scale(1);   opacity:0.4; }
  50%     { transform:scale(1.10); opacity:0.9; }
}

.qh-icon-img {
  width: 58px; height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.15);
}

/* 텍스트 블록 */
.qh-heading-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.qh-label {
  font-family: var(--font-brand);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--c-gold);
  opacity: 0.85;
}

.qh-question {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.90);

  /* 타이핑 클립 애니메이션 */
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  animation: textReveal 0.8s ease 1.0s forwards;
}

@keyframes textReveal {
  to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

.qh-hint {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.40);
  transition: color 0.2s ease;
}

.qh-heading:not(.open):hover .qh-hint {
  color: rgba(255,187,1,0.75);
}

/* 닫기 버튼 */
.qh-close-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.60);
  font-size: 13px;
  display: grid;
  place-content: center;
  cursor: none;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.18s ease,
              background 0.18s ease, transform 0.22s ease;
  flex-shrink: 0;
}

.qh-heading.open .qh-close-btn { opacity: 1; }
.qh-close-btn:hover { color:#fff; background:rgba(255,107,157,0.22); transform:rotate(90deg); }

/* ════════════════════════════════════════════════
   MENU LIST
   ════════════════════════════════════════════════ */
.qh-list {
  width: 100%;
  max-width: 680px;
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: var(--item-gap);

  /* 기본: 숨김 */
  pointer-events: none;
}

/* ── 개별 아이템 ─────────────────────────────────*/
.qh-item {
  height: var(--item-h);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.28),
              inset 0 1px 0 rgba(255,255,255,0.09);

  /* 진입 전: 아래 숨김 */
  opacity: 0;
  transform: translateY(16px);
  transition:
    transform    0.28s var(--ease-out),
    box-shadow   0.22s ease,
    border-color 0.22s ease,
    background   0.22s ease;
}

/* open 상태에서 stagger 진입 */
.qh-list.open .qh-item {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  animation: itemIn 0.45s var(--ease-bounce) forwards;
  animation-delay: calc(var(--n) * 55ms + 80ms);
}

@keyframes itemIn {
  from { opacity:0; transform:translateY(18px) scale(0.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* 닫힐 때 역방향 */
.qh-list.closing .qh-item {
  animation: itemOut 0.25s ease forwards;
  animation-delay: calc((var(--items) - 1 - var(--n)) * 30ms);
}

@keyframes itemOut {
  to { opacity:0; transform:translateY(12px) scale(0.97); }
}

/* hover */
.qh-item:hover {
  background: rgba(255,107,157,0.16);
  border-color: rgba(255,107,157,0.45);
  transform: translateX(4px);
  box-shadow: 0 6px 24px rgba(255,107,157,0.18),
              inset 0 1px 0 rgba(255,255,255,0.12);
}

/* active */
.qh-item:active { transform: translateX(2px) scale(0.99); }

/* 링크 */
.qh-item a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px 0 16px;
  gap: 12px;
  text-decoration: none;
  cursor: none;
}

/* 번호 */
.qh-num {
  font-family: var(--font-brand);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.25);
  width: 22px;
  flex-shrink: 0;
  transition: color 0.18s ease;
}

.qh-item:hover .qh-num { color: rgba(255,107,157,0.70); }

/* 태그 */
.qh-tag {
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.qh-item:hover .qh-tag {
  background: rgba(255,107,157,0.18);
  border-color: rgba(255,107,157,0.45);
  color: #fff;
}

/* HOT 태그 */
.tag--hot {
  background: rgba(255,187,1,0.15) !important;
  border-color: rgba(255,187,1,0.35) !important;
  color: var(--c-gold) !important;
  animation: tagBlink 1.8s ease-in-out infinite;
}

@keyframes tagBlink {
  0%,100% { opacity:1; }
  50%     { opacity:0.6; }
}

/* 메인 설명 */
.qh-desc {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s ease;
}

.qh-item:hover .qh-desc { color: #fff; }

/* 서브 텍스트 */
.qh-sub {
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.30);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.18s ease;
}

.qh-item:hover .qh-sub { color: rgba(255,255,255,0.65); }

/* 화살표 */
.qh-arrow {
  font-size: 11px;
  color: rgba(255,255,255,0.22);
  flex-shrink: 0;
  transition: color 0.18s ease, transform 0.22s var(--ease-bounce);
}

.qh-item:hover .qh-arrow {
  color: rgba(255,107,157,0.85);
  transform: translateX(4px);
}

/* ════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════ */
.qh-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  background: rgba(0,0,0,0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,0.045);
}

.qh-footer span {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════
   반응형
   ════════════════════════════════════════════════ */
@media screen and (max-width: 1024px) {
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
  .topnav { padding: 0 16px; background: rgba(255,187,0,0.92); }
  .nav-link { color: #000; border-color: rgba(0,0,0,0.20); }
  .nav-link:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.40); color:#000; }
  .nav-brand { color: rgba(0,0,0,0.40); }
  .qh-wrap { padding: 76px 16px 60px; }
  .qh-heading { height: 80px; }
  .qh-icon-wrap, .qh-icon-ring { display: none; }
  .qh-question { font-size: 12px; }
  .qh-item a { gap: 8px; padding: 0 14px 0 12px; }
  .qh-desc { font-size: 12px; }
  .qh-num { display: none; }
}

@media screen and (max-width: 480px) {
  .qh-sub { display: none; }
  .qh-desc { font-size: 11px; }
  .qh-tag { font-size: 7.5px; padding: 2px 5px; }
}

img.quick-help {
  width: 20vw !important;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto; /* 중앙 정렬 */
}

