/* ===== reset-ish ===== */
* {
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  text-align: center;
  max-width: 100vw;
  /* cursor: none; */
}
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
body { background: #fff; }

#entireMainPage {
  width: 1fr;
  height: auto;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
}

/* header */

header {
  width: 100vw;
  height: 96px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  position: relative;
  justify-content: center;
  align-items: center;
  top: 0px;
  z-index: 10;
  /* border: 1px solid rgb(0, 204, 255); */
}

#headerBox {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  height: 44px;
  background-color: white;
  opacity: 96%;
  border: 1px solid rgba(191, 191, 191, 0.4);
  border-radius: 30px;
  z-index: 10;
  transition: width 0.3s ease-out;
  box-shadow: 0vw 0.5vw 0.8vw -0.05vw rgba(15, 147, 255, 0.25);
}

#headerBox.scrolled {
  display: flex;
  justify-content: center;
  width: 100px; /* 필요 시 조정 */
  left: 50%;
  transform: translateX(-50%);
  position: fixed;
  top: 28px;
}

.topBox.scrolled {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  transition: visibility 0s 0.7s, opacity 0.7s ease, width 0s 0.7s, height 0s 0.7s;
}

#topBoxes.scrolled {
  margin: 10px 0px;
}

#topBoxes {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-around;
  margin: 10px 0px 8.5px 12px;
  width: auto;
}

.topBox {
  font-size: 16.5px;
  font-family: "Nunito", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  color: #484848;
  flex-grow: 1;
  text-align: center;
  margin: 0px 0px;
  padding: 0 0 0 24px;
  flex: 1;
  opacity: 1;
  transition: opacity 0.5s ease-in 0.1s, transform 0.1s ease-in;
}

#logo {
  font-size: 21px;
  margin-bottom: -1px;
  font-family: "Nunito", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  color: black;
  text-decoration: none;
  text-align: left;
  transition: transform 0.8s ease-in 0.4s;
}

/* ✅ 강조 대상: topBox2 */
#topBox2 {
  font-weight: 625;
}

.boxes { cursor: pointer; }

/* 축소 상태에서는 hover 확대 비활성화 */
#headerBox.scrolled .topBox,
#headerBox.scrolled .topBox:hover {
  transform: none !important;
  transition: none !important;
}

#headerBox.scrolled { cursor: pointer; }
/* 안쪽 요소가 커서를 덮어쓰지 않도록 상속 */
#headerBox.scrolled * { cursor: inherit; }

/* 축소 상태 topBoxes를 컨테이너 중앙 정렬 */
#topBoxes.scrolled {
  display: flex;
  justify-content: center;    /* 수평 중앙 */
  align-items: center;         /* 수직 정렬 안정화 */
  width: 100%;
  margin: 11px 0 8.5px 0;      /* 좌우 마진 0으로 중앙 유지 */
}

/* 축소 상태에선 flex 확장 제거 (늘어나며 좌표 밀림 방지) */
#headerBox.scrolled .topBox {
  flex: 0 0 auto;              /* flex:1 제거 */
  padding: 0;                  /* 패딩이 중앙 위치를 미는 것 방지 */
}

/* ✅ topBox2만 표시 + 완전 중앙 */
#headerBox.scrolled #topBox2 {
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  margin: 0 auto;              /* 요소 자체 가운데 */
  text-align: center;          /* 텍스트도 가운데 */
}

/* 로고는 축소 상태에서 숨김 */
#headerBox.scrolled #logo {
  display: none;
}


/* ===== main grid (Playground 스타일) ===== */
main {
  width: 100vw;
  display: flex;
  flex-direction: column;
  position: relative;
}
#section1 {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  margin: 0 2vw;
}

.boxes {
  position: relative;
  height: 35vw;
  border-radius: 3vw;
  margin: 0 1vw 2vw 1vw;
  opacity: 0;
  transition: opacity .7s ease-in-out;
}

.blackboxes {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 2.4vw;
  background: rgba(0,0,0,.6);
  opacity: 0; transition: all .3s ease-in-out;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  text-align: left; border-radius: 3vw; z-index: 1;
}
.boxes:hover .blackboxes { opacity: 1; }

.title {
  font-family: "Nunito", serif;
  font-weight: 350;
  font-size: 2.1vw;
  color: #fff;
  margin-bottom: -0.08vw;
}
.subtitle {
  font-family: "Nunito", serif;
  font-weight: 300;
  font-size: 1.1vw;
  color: rgb(210,210,210);
}

/* 비디오 카드 공통 */
.bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0; opacity: 1;
  transition: opacity .3s ease-in-out;
}

/* ===== 카드 사이즈 배치 (2열/1열 혼합) ===== */
#box15 { width: calc(25vw - 5vw);}
#box16 {  width: calc(75vw  - 5vw);}
#box17 { width: calc(50vw  - 5vw); }
#box2  {width: calc(40vw  - 5vw); }
#box3  { width: calc(60vw  - 5vw); }
#box11 { width: calc(50vw  - 5vw); }
#box18 {width: calc(50vw  - 5vw); }
#box13 { width: calc(50vw  - 5vw);}
/* #box14 { width: calc(100vw - 8vw); } */

/* ===== 개별 카드 배경 이미지 ===== */
#box17 { /* Podscribe */
  background: url(../files/podscribe/podscribe_hero_1.jpg) center/cover no-repeat;
}
#box2 { /* With */
  background: url(../files/with2-main.jpg) center/cover no-repeat;
}
#box3 { /* Nebula */
  background: url(../files/nebula-main.jpg) center/cover no-repeat;
}
#box11 { /* Type Play */
  background: url(../files/type/type-main-ss.jpg) center/cover no-repeat;
}
#box18 { /* Apple Clock */
  background: url(../files/clock/clock00.jpg) center/cover no-repeat;
}
#box13 { /* Heesoo portfolio */
  background: url(../files/heesoo-main.jpg) center/130% no-repeat;
}
#box14 { /* Kinetic Pose */
  background: url(../files/Kineticpose/KineticPose_main000.jpg) center/cover no-repeat;
}

/* 비디오 미세 스케일 (옵션) */
#video_box15 { scale: 1.25; }



/* footer */

footer {
  font-family: "Nunito", serif;
  font-optical-sizing: auto;


  font-style: normal;

  width: 100vw;
  background-color: white;
  border-top: black solid 1.4px;
  height: 64px;
  position: relative;
  bottom: 0px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  margin: 0px;
  /* border-radius: */
  /* border: rgb(255, 0, 212) solid 1px; */
}

#bottomLogo {
  font-size: 17.5px;
  font-weight: 600;
  font-style: normal;
  text-align: center;
  margin-left: 30px;
  margin-bottom: -1px;
  /* border: rgb(0, 159, 37) solid 1px; */
}

#bottomBoxes {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;

  font-size: 17px;
  font-weight: 370;
  font-style: normal;

  text-align: center;
  align-items: center;
  margin-right: 20px;
  margin-bottom: -1px;
  /* border: rgb(0, 76, 207) solid 1px; */
}

.bottomBox {
  margin: 0px 10px;
  /* border: rgb(207, 0, 7) solid 1px; */
  align-items: center;
  /* padding: 0 5px; */
}


@media only screen and (min-device-width: 768px) and (max-device-width: 1200px) {
  footer {
    border-top: black solid 1px;
  }
}

@media (max-width: 1024px) {
  .blackboxes {
    pointer-events: none;
    display: none;
  }

  .boxes:hover .blackboxes {
    opacity: 0;
  }
}


/* 마우스 인터렉션 */

#mouse-cursor {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  transform: translate3d(-100%, -100%, 0);
  pointer-events: none;
  z-index: 50;
  color: #000000;
  mix-blend-mode: difference;
}

#mouse-cursor>div {

  position: relative;
  width: 30px;
  height: 30px;
  background-color: #ffffff;
  font-size: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  --cursur-scale: 1;
  transform: scale3d(var(--cursor-scale), var(--cursor-scale), 1);
  will-change: transform;
  transition: transform 150ms ease-in-out,
    background-color 150ms ease-in-out;
}

#mouse-cursor>div::after {
  content: attr(data-name);
  position: absolute;
  /* color: #fff; */
  transform: scale(0.45);
  white-space: nowrap;
}


.topBox:hover {
  transition: scale 0.2s ease-in-out;
  transform: scale(1.06);
  /* font-size: 20px;
  font-weight: 600; */
  /* padding: 5px; */
}

#bottomBoxes li a {
  display: inline-block;
  transition: transform 0.2s ease-in-out;
  /* padding: 2px 0;  */
}

#bottomBoxes li a:hover {
  /* font-size: 18px;
  font-weight: 600;
  padding: 0px 0;  */
  transition: all 0.2s ease-in-out;
  transform: scale(1.3);
  /* 원하는 크기로 조정 */
}


/* 애니메이션 추가 */





/* 부모 카드가 자식을 잘라내도록 */
.boxes {
  border-radius: 3vw;   /* 이미 있음 */
  overflow: hidden;     /* ← 이게 핵심 */
}

/* 절대배치된 비디오도 둥근 모서리를 따르게 */
.bg-video {
  border-radius: inherit;
}
