/* =====================================================================
   DOUBLE LEVEL 홈페이지 스타일
   참고: ctgamusic.com · kreation.co.kr 의 구조(풀스크린 비주얼 → 소개 → 로스터/작업물
         그리드 → 뉴스 → 연락처)를 따르되, 색은 DBLV 브랜드(다크 + 바이올렛)로.
   ===================================================================== */
:root {
  --bg: #0A0810;
  --bg2: #110D1C;
  --panel: #171226;
  --light: #EDEAF5;
  --text: #F3F0FA;
  --dim: #9B94B8;
  --dim2: #6A6488;
  --accent: #8C6BFF;
  --accent2: #E44DFF;
  --line: rgba(255, 255, 255, .10);
  --line2: rgba(255, 255, 255, .06);
  --display: "Bebas Neue", "Pretendard Variable", Pretendard, sans-serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  --wrap: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { width: min(var(--wrap), 100% - 48px); margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 공통 타이포 ---------- */
.eyebrow {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: .32em;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  display: inline-block; width: 22px; height: 1px; vertical-align: middle;
  background: var(--accent); margin-right: 12px;
}
.h2 {
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 96px);
  line-height: .95;
  letter-spacing: .01em;
  font-weight: 400;
}
.h3 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; line-height: 1.35; letter-spacing: -.015em; white-space: pre-line; }
.lead { color: var(--dim); font-size: clamp(15px, 1.6vw, 17.5px); line-height: 1.9; }

/* 버튼: 글자가 위로 스르륵 바뀌는 효과 (KMR 스타일) */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 26px;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  font-family: var(--display); font-size: 17px; letter-spacing: .2em;
  overflow: hidden; position: relative;
  transition: border-color .3s, background .3s, color .3s;
}
.btn .t { display: grid; height: 1.1em; overflow: hidden; }
.btn .t span { transition: transform .45s var(--ease); line-height: 1.1; }
.btn:hover .t span { transform: translateY(-100%); }
.btn:hover { border-color: var(--accent); background: rgba(140, 107, 255, .10); }
.btn.fill { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.fill:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn .arrow { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }

/* ---------- 헤더 ---------- */
#header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 76px;
  transition: background .4s, backdrop-filter .4s, border-color .4s, height .4s;
  border-bottom: 1px solid transparent;
}
#header.scrolled {
  height: 64px;
  background: rgba(10, 8, 16, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: var(--line2);
}
#header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
#header .logo img { height: 22px; width: auto; }
#gnb { display: flex; gap: 38px; }
#gnb a {
  font-family: var(--display); font-size: 17px; letter-spacing: .22em;
  color: rgba(243, 240, 250, .82); position: relative; padding: 6px 0;
}
#gnb a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
#gnb a:hover::after { transform: scaleX(1); }
#gnb a:hover { color: #fff; }

/* 햄버거 (모바일) */
#ham { display: none; width: 44px; height: 44px; position: relative; z-index: 60; }
#ham span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: #fff;
  transition: transform .35s var(--ease), opacity .3s, top .35s;
}
#ham span:nth-child(1) { top: 15px; }
#ham span:nth-child(2) { top: 27px; }
body.menu-open #ham span:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.menu-open #ham span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

#mobile-menu {
  position: fixed; inset: 0; z-index: 55; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; padding: 80px 32px 40px;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
body.menu-open #mobile-menu { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }
#mobile-menu a {
  font-family: var(--display); font-size: 48px; letter-spacing: .08em; line-height: 1.25;
  transform: translateY(20px); opacity: 0; transition: transform .5s var(--ease), opacity .5s;
}
body.menu-open #mobile-menu a { transform: none; opacity: 1; }
#mobile-menu a:nth-child(2) { transition-delay: .05s } #mobile-menu a:nth-child(3) { transition-delay: .1s }
#mobile-menu a:nth-child(4) { transition-delay: .15s } #mobile-menu a:nth-child(5) { transition-delay: .2s }
#mobile-menu a:nth-child(6) { transition-delay: .25s } #mobile-menu a:nth-child(7) { transition-delay: .3s }
#mobile-menu .tag { margin-top: 36px; color: var(--dim); font-size: 14px; line-height: 1.8; }

/* ---------- 히어로 ---------- */
#hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  overflow: hidden; text-align: center; padding: 120px 24px 90px;
  background:
    radial-gradient(900px 520px at 18% 8%, rgba(140, 107, 255, .26), transparent 62%),
    radial-gradient(760px 520px at 86% 96%, rgba(228, 77, 255, .18), transparent 62%),
    var(--bg);
}
#wave { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .85; }
#hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero-in { position: relative; z-index: 2; }
.hero-in .logo { width: min(560px, 78vw); margin: 0 auto 34px; filter: drop-shadow(0 20px 60px rgba(140, 107, 255, .35)); }
.hero-in .tagline {
  font-family: var(--display); font-size: clamp(22px, 3.6vw, 40px);
  letter-spacing: .34em; margin-left: .34em; /* 글자 사이 간격 때문에 오른쪽이 남는 것을 보정 */
  background: linear-gradient(90deg, #fff 0%, #CDBEFF 55%, #E9A6FF 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-in .sub { margin-top: 16px; color: var(--dim); letter-spacing: .28em; font-size: 13px; }
.hero-in .cta { margin-top: 44px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 2; color: var(--dim2); font-family: var(--display); font-size: 12px; letter-spacing: .32em;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue i {
  display: block; width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent);
  animation: cue 1.8s var(--ease) infinite; transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0) } 50% { transform: scaleY(1) } 100% { transform: scaleY(0); transform-origin: bottom } }

/* 등장 애니메이션(진입 시) */
.hero-in > * { opacity: 0; transform: translateY(18px); animation: rise 1s var(--ease) forwards; }
.hero-in > :nth-child(2) { animation-delay: .15s } .hero-in > :nth-child(3) { animation-delay: .3s } .hero-in > :nth-child(4) { animation-delay: .45s }
@keyframes rise { to { opacity: 1; transform: none } }

/* ---------- 섹션 공통 ---------- */
section.sec { padding: clamp(90px, 12vw, 160px) 0; position: relative; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head .h2 { color: #fff; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s } .reveal.d2 { transition-delay: .2s } .reveal.d3 { transition-delay: .3s } .reveal.d4 { transition-delay: .4s }

/* ---------- ABOUT ---------- */
#about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about-grid .lead { margin-top: 22px; max-width: 520px; }
.about-grid .lead + .lead { margin-top: 12px; }
.about-grid .btnrow { margin-top: 36px; }
.stats { display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap; }
.stats div b { display: block; font-family: var(--display); font-size: 46px; line-height: 1; color: #fff; }
.stats div span { color: var(--dim); font-size: 13px; letter-spacing: .08em; }
/* 사진이 없을 때를 위한 추상 콜라주(사진이 생기면 .about-art 안에 <img>만 넣으면 됨) */
.about-art { position: relative; aspect-ratio: 4 / 5; }
.about-art .tile {
  position: absolute; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(140, 107, 255, .55), rgba(228, 77, 255, .12) 60%, rgba(255, 255, 255, .04));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.about-art .t1 { inset: 0 18% 26% 0; }
.about-art .t2 { inset: 34% 0 0 32%; background: linear-gradient(160deg, rgba(228, 77, 255, .45), rgba(140, 107, 255, .10) 55%, rgba(255, 255, 255, .03)); }
.about-art .t3 { inset: 66% 52% 0 6%; background: linear-gradient(200deg, #fff, rgba(255, 255, 255, .55)); }
.about-art .tile::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 22px);
  mask: linear-gradient(to bottom, transparent, #000 40%, transparent);
}
.about-art .t3::after { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px 10px); }

/* ---------- SERVICES ---------- */
#services { background: var(--bg2); border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line2); border: 1px solid var(--line2); }
.svc {
  background: var(--bg2); padding: 40px 30px 44px; min-height: 300px;
  display: flex; flex-direction: column; transition: background .4s, transform .5s var(--ease);
}
.svc:hover { background: var(--panel); transform: translateY(-6px); }
.svc .num { font-family: var(--display); color: var(--dim2); letter-spacing: .2em; font-size: 14px; }
.svc .en { font-family: var(--display); font-size: clamp(38px, 3.6vw, 52px); line-height: 1; margin-top: 26px; color: #fff; }
.svc .ko { font-weight: 800; margin-top: 8px; color: var(--accent); letter-spacing: .02em; }
.svc p { color: var(--dim); font-size: 14.5px; margin-top: 18px; line-height: 1.8; }

/* ---------- KEYWORDS (밝은 띠 — 스크롤하면 단어가 하나씩 떠오름) ---------- */
#keywords { background: var(--light); color: var(--bg); padding: clamp(80px, 11vw, 150px) 0; overflow: hidden; }
#keywords .words { display: flex; flex-direction: column; gap: .02em; }
#keywords .w {
  font-family: var(--display); font-size: clamp(64px, 12.5vw, 176px); line-height: .92; letter-spacing: .01em;
  color: var(--bg); opacity: 0; transform: translateY(40px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
#keywords .w.in { opacity: 1; transform: none; }
#keywords .w:nth-child(even) { color: transparent; -webkit-text-stroke: 1.5px var(--bg); }
#keywords .note { margin-top: 30px; font-size: 14px; color: #5B5670; letter-spacing: .06em; }

/* ---------- ROSTER ---------- */
.roster-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.person { position: relative; }
.person .ph {
  aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line2); display: grid; place-items: center;
}
.person .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.person:hover .ph img { transform: scale(1.06); }
.person .ph .ini { font-family: var(--display); font-size: 56px; color: rgba(255, 255, 255, .18); }
.person .nm { margin-top: 14px; font-weight: 800; font-size: 16px; }
.person .rl { color: var(--dim); font-size: 13px; }

/* ---------- WORKS ---------- */
#works { background: var(--bg2); border-top: 1px solid var(--line2); }
.works-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.work .cv {
  aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line2); display: grid; place-items: center; position: relative;
}
.work .cv img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work:hover .cv img { transform: scale(1.06); }
.work .cv .ini { font-family: var(--display); font-size: 40px; color: rgba(255, 255, 255, .18); letter-spacing: .1em; }
.work .cv::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 55%);
  opacity: 0; transition: opacity .4s;
}
.work:hover .cv::after { opacity: 1; }
.work .ti { margin-top: 12px; font-weight: 800; font-size: 15px; }
.work .ar { color: var(--dim); font-size: 13px; }
.work .cr { color: var(--dim2); font-size: 12px; margin-top: 2px; }

/* ---------- NEWS (가로 스크롤 카드) ---------- */
.news-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin;
}
.news-row > a { scroll-snap-align: start; }
.news .th { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line2); }
.news .th img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.news:hover .th img { transform: scale(1.05); }
.news .dt { margin-top: 14px; color: var(--dim2); font-size: 12.5px; letter-spacing: .08em; }
.news .ti { font-weight: 800; margin-top: 4px; line-height: 1.5; }

/* ---------- CONTACT ---------- */
#contact {
  background:
    radial-gradient(700px 400px at 80% 10%, rgba(140, 107, 255, .20), transparent 60%),
    var(--bg);
  border-top: 1px solid var(--line2);
}
#contact .h2 { max-width: 12ch; }
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: end; }
.contact-list { display: grid; gap: 14px; }
.contact-list a, .contact-list div { display: flex; gap: 14px; align-items: center; color: var(--text); font-size: 15px; }
.contact-list .k { font-family: var(--display); letter-spacing: .2em; color: var(--dim2); font-size: 13px; width: 72px; flex: none; }
.contact-list a:hover { color: var(--accent); }
.contact-list .lb {
  font-style: normal; font-size: 11.5px; color: var(--accent); border: 1px solid rgba(140, 107, 255, .45);
  border-radius: 999px; padding: 1px 8px; margin-right: 8px; letter-spacing: .04em;
}
.mail-big {
  display: inline-flex; margin-top: 28px; font-size: clamp(18px, 2.6vw, 30px); font-weight: 800;
  border-bottom: 2px solid var(--accent); padding-bottom: 6px; transition: color .3s;
}
.mail-big:hover { color: var(--accent); }

/* ---------- 푸터 ---------- */
footer { border-top: 1px solid var(--line2); padding: 44px 0 40px; color: var(--dim2); font-size: 13px; }
footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer .mark { height: 26px; opacity: .7; }
footer .links { display: flex; gap: 22px; }
footer .links a:hover { color: #fff; }
#top-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(23, 18, 38, .9); border: 1px solid var(--line); color: #fff; display: grid; place-items: center;
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; backdrop-filter: blur(8px);
}
#top-btn.show { opacity: 1; transform: none; }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .roster-grid, .works-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  #gnb { display: none; }
  #ham { display: block; }
  #header .wrap { width: calc(100% - 40px); }
  .about-grid { grid-template-columns: 1fr; }
  .about-art { max-width: 420px; aspect-ratio: 5 / 4; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc { min-height: 0; padding: 30px 24px 32px; }
  .roster-grid, .works-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .hero-in .cta .btn { height: 46px; padding: 0 20px; font-size: 15px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, #keywords .w, .hero-in > * { opacity: 1; transform: none; transition: none; animation: none; }
  .scroll-cue i { animation: none; }
}
