.ie-page {
  padding: 0;
  overflow-y: auto;
  height: 100%;
  background: #f0f0f0;
  color: #222;
  position: relative;
  overflow-x: hidden;
  container-type: size;
  container-name: ie-browser;
}

.ie-page,
.ie-page * {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto,
    'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR',
    'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    sans-serif !important;
  font-size: 1.4rem;
}

.ie-page-header h2 {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.ie-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.2rem;
}

.ie-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  border: 0.2rem solid var(--button-dark-shadow);
  background: linear-gradient(to bottom, #ffffff, #dcdcdc);
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  box-shadow: inset 0.1rem 0.1rem 0 var(--button-highlight), inset -0.1rem -0.1rem 0 var(--button-shadow);
}

.ie-link-button:active {
  box-shadow: inset -0.1rem -0.1rem 0 var(--button-highlight), inset 0.1rem 0.1rem 0 var(--button-shadow);
}

body[data-theme='dark'] .ie-link-button {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.35));
}

.ie-card {
  padding: 1.2rem;
  border: 0.2rem solid var(--button-dark-shadow);
  box-shadow: inset 0.1rem 0.1rem 0 var(--button-highlight), inset -0.1rem -0.1rem 0 var(--button-shadow);
  background: rgba(255, 255, 255, 0.85);
}

.ie-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.6rem;
}

body[data-theme='dark'] .ie-card {
  background: rgba(20, 20, 20, 0.8);
}

.ie-note {
  font-size: 1.3rem;
  color: rgba(0, 0, 0, 0.7);
}

body[data-theme='dark'] .ie-note {
  color: rgba(255, 255, 255, 0.75);
}

.ie-note code {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  padding: 0.2rem 0.4rem;
  border: 0.1rem solid var(--button-shadow);
  background: rgba(0, 0, 0, 0.04);
}

body[data-theme='dark'] .ie-note code {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/*상단 메뉴 영역*/
.ie-menu-top {
  position: sticky;
  top: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem;
  pointer-events: auto;
  border-bottom: 1px solid;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.0);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter:blur(7px);
}

.is-page-menu {
  display: flex;
  gap: 3rem;
}
.is-page-menu a{
  text-decoration: none;
  color: #222;
}

/* --- 모바일 메뉴 버튼 --- */
.ie-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  margin: 2rem;
  border: none;
  background: transparent;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 99999; /* 메뉴보다 위에 있도록 */
}

.ie-menu-toggle__line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #000000;
  transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
  position: absolute;
  left: 0;
}

.ie-menu-toggle__line:first-child {
  top: 3px;
}

.ie-menu-toggle__line:last-child {
  top: 14px; /* 3px + 8px(공간) + 3px */
}

/* --- 모바일 메뉴 --- */
.ie-nav-mobile {
  position: absolute; /* .ie-page(position: relative) 기준 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* .ie-page를 꽉 채움 */
  background: rgba(0, 0, 0, 1); /* 어두운 배경 */
  color: #fff;
  z-index: 99998;

  /* 오른쪽 밖으로 숨김 */
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  
  /* Safari/Chrome에서 transform 깜빡임 방지 */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.ie-nav-mobile__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 1.5rem;
}

.ie-nav-mobile__link {
  color: #fff;
  text-decoration: none;
  font-size: 2.2rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  position: relative;
}

/* 활성 메뉴 밑줄 */
.ie-nav-mobile__link.is-active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0.5rem;
  right: 0.5rem;
  height: 3px;
  background-color: #ffffff;
}

.ie-page.is-menu-open {
  overflow-y: hidden;
}
.ie-page.is-menu-open .ie-menu-toggle__line{
  background-color: #fff;
}

.ie-page.is-menu-open .ie-menu-top {
  position: static;
}

/* --- 메뉴 열기/닫기 애니메이션 --- 
 .ie-page에 .is-menu-open 클래스가 추가될 때 작동
*/

/* 메뉴 슬라이드 인 */
.ie-page.is-menu-open .ie-nav-mobile {
  transform: translateX(0);
}

/* 버튼 X자 애니메이션 */
.ie-page.is-menu-open .ie-menu-toggle__line:first-child {
  top: 8px; /* 중앙으로 이동 */
  transform: rotate(45deg);
}

.ie-page.is-menu-open .ie-menu-toggle__line:last-child {
  top: 8px; /* 중앙으로 이동 */
  transform: rotate(-45deg);
}


/*콘텐츠 영역*/
.ie-page-container {
  position: relative;
  height: calc(100% - 6.5rem);
  z-index: 1;
}

.ie-content {
  position: relative;
  min-height: 46rem;
  perspective: 600px;
  transform-style: preserve-3d;
  isolation: isolate;
}

.ie-rotator {
  position: absolute;
  top: 20vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  width: 100%;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
  user-select:none
}

.ie-rotator__viewport {
  width: min(30vw, 28rem);
  aspect-ratio: 16 / 9;
  perspective: 1000px;
  position: relative;
  cursor: grab;
  touch-action: none;
}

.ie-rotator__viewport.is-dragging {
  cursor: grabbing;
}

.ie-rotator__stage {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 120ms ease-out;
}

.ie-rotator__stage.is-dragging {
  transition-duration: 0ms;
}

.ie-rotator__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: min(1vw, 1rem);
  border: 0.1rem solid #dddddd;
  background: transparent;
  box-shadow: inset 10rem -5rem 10rem rgba(0, 0, 0, 0.09);
  filter: saturate(0) opacity(80%);
}

.ie-rotator__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ie-menu-bottom {
  width: 100%;
  position: absolute;
  bottom: 0;
  display: flex;
  align-items: end;
  justify-content: flex-start;
  text-wrap: nowrap;
  gap:1rem;
}

.ivd,
.ivd *{
  font-family: "Aboreto" !important;
  font-weight: 900;
  line-height: 80%;
  font-size: 8cqi;
  z-index: 9999;
}
.ie-menu-bottom-locopy *{
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  font-size: 1.4rem;
}

.ie-content-approche {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  width: 50%;
  height: 50rem;
  margin: 0 auto;
}

/*work 영역*/
.ie-content-work {
  --work-gap: clamp(1.2rem, 2vw, 2.4rem);
  --work-item-min: 14rem;
  width: 100%;
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  overflow: hidden;
  position: relative;
  background: #f1efeb;
  padding: 10rem 0;
}

.ie-content-work-row {
  overflow: hidden;
  position: relative;
}

.ie-content-work-track {
  display: flex;
  align-items: center;
  gap: var(--work-gap);
  animation: ie-scroll var(--ie-scroll-duration, 60s) linear infinite;
}

.ie-content-work-track--reverse {
  animation-direction: reverse;
}

.ie-content-work-item {
  flex: 0 0 max(var(--work-item-min), calc((100% - (var(--work-gap) * 4)) / 6));
  aspect-ratio: 3 / 4;
  overflow: hidden;

}

.ie-content-work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ie-content-work-row:nth-child(1) .ie-content-work-track {
  --ie-scroll-duration: 70s;
}

.ie-content-work-row:nth-child(2) .ie-content-work-track {
  --ie-scroll-duration: 70s;
}

@keyframes ie-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-139%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ie-content-work-track {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transform: translateX(0);
  }
}

/*푸터영역*/
.footer {
  width: 100%;
  background: #e7e7e7;
  display: flex;
  flex-direction: column;
  justify-content:space-between;
}

.footer-info {
  display: flex;
  padding: 2rem;
  gap: 20cqi;
}

.footer-info-emlo *{
  font-size: clamp(1.4rem, 3cqmin, 3cqmin);
  color: #ccc;  
}

.footer-copyright {
  font-family: "Aboreto" !important;
  font-weight: 900;
  font-size: 11cqi;
  text-align: center;
}



/*해상도 대응
  노트북 & 태블릿 가로 : 1024px-1279px*/
@container (min-width:1024px) and (max-width:1279px){
  .ivd *{
  font-size: 3vmin;
  }
  .ie-menu-bottom {
    flex-direction: column;
    align-items: center;
  }
  .ie-menu-bottom-locopy {
    flex-direction: row;
  }
}

/*태블릿 가로 : 768px-1023px*/
@container (min-width:768px) and (max-width:1023px){
  .ivd *{
  font-size: 3vmin;
  }
  .ie-menu-bottom {
    flex-direction: column;
    align-items: center;
  }
  .ie-menu-bottom-locopy {
    flex-direction: row;
  }
  .ie-content-work {
    --work-item-min: 16rem;
    gap: clamp(1.6rem, 3vw, 3rem);
  }
  .ie-content-work-track {
    --ie-scroll-duration: 30s;
  }
}

/*모바일 가로 & 태블릿 세로 : 480px-767px*/
@container (min-width:480px) and (max-width:767px){
  .ivd *{
  font-size: 3vmin;
  }
  .ie-menu-bottom {
    flex-direction: column;
    align-items: center;
  }
  .ie-menu-bottom-locopy {
    flex-direction: row;
  }
  .ie-content-work {
    --work-item-min: 18rem;
    gap: clamp(1.4rem, 4vw, 2.4rem);
  }
  .ie-content-work-track {
    --ie-scroll-duration: 26s;
  }
}

/*모바일 : -479px*/
@container (max-width:479px){
  .is-page-menu {
    display: none;
  }
  .ie-menu-toggle{
    display: flex;
  }
  .ivd *{
  font-size: 3vmin;
  }
  .ie-rotator{
    top:10vh;
  }
  .ie-menu-bottom {
    flex-direction: column;
    align-items: center;
  }
  .ie-menu-bottom-locopy {
    flex-direction: row;
  }

  .ie-content-work {
    --work-item-min: 18rem;
    gap: clamp(1.2rem, 5vw, 2rem);
  }

  .footer-copyright {
  font-size: 9cqi;
  }
}
