/* ========================================================================
   IVE Company — style.css
   전역 스타일, CSS 변수, 리셋, 공통 컴포넌트
   ======================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Color System */
  --color-bg-dark:    #0D0D0D;
  --color-bg-card:    #1A1A1A;
  --color-bg-light:   #F7F7F7;

  /* 라이트 섹션 기본 — 블루 액센트 */
  --color-accent:     #0057FF;
  --color-accent-hover: #003dc7;
  --color-accent-contrast: #FFFFFF; /* accent 배경 위 텍스트 색 */

  --color-text-white: #FFFFFF;
  --color-text-gray:  #999999;
  --color-text-dark:  #111111;
  --color-border:     rgba(255, 255, 255, 0.12);
  --color-border-light: rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-sans: 'Inter', 'Noto Sans KR', 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;

  /* Layout */
  --container-max: 1280px;
  --container-pad: clamp(20px, 5vw, 64px);
  --section-pad-y: clamp(80px, 12vw, 160px);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.25s;
  --dur-base: 0.45s;
  --dur-slow: 0.8s;
}

/* ----------
   다크 섹션(Hero / Team / Footer / Nav)에서는 액센트 컬러를 크림톤으로 자동 전환.
   이 섹션들 내부의 어떤 요소든 var(--color-accent)를 참조하면 아래 값이 적용됨.
   ---------- */
.hero,
.team,
#footer,
#main-nav {
  --color-accent: #FBF2D9;        /* 크림 / 웜 베이지 */
  --color-accent-hover: #e9ddb8;
  --color-accent-contrast: #111111; /* 크림 배경 위 어두운 텍스트 */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text-dark);
  background: var(--color-bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* 한글 어절 단위로 줄바꿈 (마지막 글자만 떨어지는 현상 방지) */
  word-break: keep-all;
  overflow-wrap: break-word;
}
body.nav-open { overflow: hidden; }

img, video, svg { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

section {
  position: relative;
  padding: var(--section-pad-y) 0;
}

/* ---------- Common Typography ---------- */
.section-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 24px;
}

.team .section-label {
  color: var(--color-accent);
}

.section-title {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.4px;
  margin-bottom: 56px;
  max-width: 820px;
}

.section-desc {
  max-width: 640px;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.75;
  color: var(--color-text-gray);
  margin-bottom: 64px;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 0;
  text-transform: none;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-2px); }

/* ---------- Contact Pill (재사용 CTA) ---------- */
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  border-radius: 999px;
  align-self: flex-start;
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.contact-pill:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -12px currentColor;
}
.contact-pill-arrow {
  display: inline-block;
  font-size: 14px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.contact-pill:hover .contact-pill-arrow { transform: translateX(4px); }

.btn-outline {
  background: transparent;
  color: var(--color-text-white);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn-outline:hover {
  background: var(--color-text-white);
  color: var(--color-text-dark);
  border-color: var(--color-text-white);
  transform: translateY(-2px);
}

/* ---------- Custom Cursor ---------- */
.cursor,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.08s linear, width 0.2s var(--ease-out), height 0.2s var(--ease-out), opacity 0.2s;
  opacity: 0;
}
.cursor {
  width: 32px;
  height: 32px;
  border: 1px solid #fff;
  border-radius: 50%;
}
.cursor-dot {
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
}
.cursor.active { width: 56px; height: 56px; }
.cursor.visible, .cursor-dot.visible { opacity: 1; }

@media (hover: none), (max-width: 1024px) {
  .cursor, .cursor-dot { display: none; }
}

/* ---------- Selection ---------- */
::selection { background: var(--color-accent); color: #fff; }

/* ---------- Reveal base (for GSAP fallback) ---------- */
.reveal { opacity: 0; transform: translateY(40px); }

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