/* =========================================================
   0) Global Reset / Base
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  scroll-behavior: smooth;
}

/* ✅ 스크롤 스냅 구조 안정화
   - html: 스크롤 차단
   - body: 실제 스크롤 컨테이너 */
html { overflow: hidden; }
body {
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch; /* iOS 스크롤 안정 */
}


/* =========================================================
   1) Section Indicator
   ========================================================= */
#section-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  font-family: "Inter", sans-serif;
  font-size: 12rem;
  font-weight: 900;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  text-shadow:
    0 0 20px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(255, 255, 255, 0.6),
    0 0 80px rgba(255, 255, 255, 0.4);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 9000; /* ✅ 모달(9999)보다 아래로 */
}

#section-indicator.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.5);
}

@media (max-width: 1200px) {
  #section-indicator { font-size: 8rem; }
}


/* =========================================================
   2) Sections (Scroll Snap Items)
   ========================================================= */
.section {
  scroll-snap-align: start;
  width: 100%;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  color: #fff;
  background: #000;
  position: relative;

  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

#section4 {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7)),
    url("./rd.jpg") center/cover no-repeat;
}


/* =========================================================
   3) Common Layout Blocks
   ========================================================= */
.container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.top-left {
  position: absolute;
  top: 3vh;
  left: 3vw;
  z-index: 1000;
}

.logo {
  width: 10vw;
  min-width: 150px;
  height: auto;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .logo { width: 150px; }
}

.top-right {
  position: absolute;
  top: 4vh;
  right: 4vw;
  z-index: 100;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1rem, 2vw, 3rem);
}

.top-right h1 {
  font-size: clamp(1.8rem, 2.5vw, 6rem);
  line-height: 1.1;
  color: #fff;
}

@media (min-width: 2048px) {
  .top-right { font-size: calc(clamp(1rem, 2vw, 3rem) * 1.6); }
  .top-right h1 { font-size: calc(clamp(1.8rem, 2.5vw, 6rem) * 1.6); }
}


/* =========================================================
   4) Main Visual / Caption
   ========================================================= */
.main-content {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.main-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.main-image img {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(200px);
  width: auto;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.main-image img.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 1200px) {
  .main-image img {
    filter: brightness(0.3);
    transition: filter 0.5s ease;
    left: 0;
    right: auto;
  }
}

.caption {
  position: relative;
  z-index: 2;
  flex: 1;
  padding-left: 8vw;
  background: transparent;
}

.caption h2 {
  font-size: clamp(1.2rem, 2.5vw, 3rem);
  margin-bottom: 1vh;
  font-weight: 700;
  color: #fff;

  overflow: hidden;
  white-space: nowrap;
  border-right: 0.15em solid #ffa94d;
  width: 0;
  animation:
    typing 3s steps(30, end) forwards,
    blink 0.6s step-end infinite,
    colorChange 0.6s ease-in forwards 3.2s,
    cursorFadeOut 0.5s ease-in forwards 3.6s;
}

@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink { 50% { border-color: transparent; } }
@keyframes colorChange { from { color: #fff; } to { color: #ffc400; } }
@keyframes cursorFadeOut { to { border-color: transparent; } }

.caption p {
  color: #fff;
  line-height: 1.6;
  margin-top: 1vh;
}

.caption h4 {
  font-family: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(0.8rem, 1vw, 1rem);
  line-height: 1.6;
  color: #ddd;
  font-weight: 300;
  margin-top: 3vh;
  max-width: 600px;
  opacity: 0.85;
  margin-right: 6vw;
  text-align: left;
}

@media (max-width: 1024px) {
  .caption h4 { margin-right: 10vw; }
}


/* =========================================================
   5) Video Gallery + Modal
   ========================================================= */
.video-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1vw;
  margin-top: 4vh;
  justify-content: flex-start;
  z-index: 200;
}

.video-thumb {
  position: relative;
  width: 14vw;
  min-width: 160px;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.4s ease, box-shadow 0.3s ease, border 0.3s ease;
  opacity: 1; /* ✅ 100% → 1 */
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.video-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.video-thumb:hover img {
  transform: scale(1.05);
  opacity: 0.3;
}

.video-thumb::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  font-size: 2.2rem;
  color: rgba(255, 0, 115, 0.9);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.video-thumb:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 1200px) {
  .video-thumb { width: 30%; min-width: 150px; }
}

@media (max-width: 768px) {
  .video-thumb { width: calc(50% - 0.5rem); }
}

/* Modal */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
  animation: fadeIn 0.4s ease;
}

.video-wrapper {
  position: relative;
  width: 80%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
}

.video-wrapper iframe,
.video-wrapper video {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  border-radius: 12px;
}

.close-btn {
  position: absolute;
  top: -40px;
  right: -10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.3s;
}

.close-btn:hover { transform: scale(1.2); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


/* =========================================================
   6) Bottom Text / Indicator
   ========================================================= */
.bottom-left,
.bottom-right {
  position: absolute;
  bottom: 20px;
  font-size: 0.7rem;
  z-index: 100;
}

.bottom-left { left: 30px; color: #5f5f5f; }
.bottom-right { right: 30px; color: #cacaca; }

@media (max-width: 1200px) {
  .bottom-left { display: none; }
}

.indicator {
  position: fixed;
  top: 0;
  right: 0;
  width: 20px;
  height: 100vh;
  z-index: 10;
  background: #111;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active { background: #ffa94d; }

@media (min-width: 1600px) {
  .indicator::before {
    content: "";
    position: absolute;
    left: -10vw;
    top: 50%;
    transform: translateY(-50%);
    width: 8vw;
    height: 1px;
    background: #fff;
    opacity: 0.5;
    z-index: 500;
    animation: smoothWave 2s cubic-bezier(0.42, 0, 0.58, 1) infinite alternate;
  }
}

@keyframes smoothWave {
  0% { transform: translateY(-50%) translateX(-12px); opacity: 0.2; }
  100% { transform: translateY(-50%) translateX(12px); opacity: 0.85; }
}


/* =========================================================
   7) Mini Galleries
   ========================================================= */
.mini-gallery2 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-bottom: 10px;
}

.mini-gallery2 img {
  flex: 1 1 calc(33.333% - 12px);
  max-width: calc(33.333% - 12px);
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

@media (min-width: 1280px) {
  .mini-gallery2 img {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
}

.mini-gallery3 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-bottom: 10px;
  cursor: pointer;
}

.mini-item {
  position: relative;
  flex: 1 1 calc(33.333% - 12px);
  max-height: 160px;
  overflow: hidden;
  border-radius: 4px;
}

.mini-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #fff;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mini-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 3, 142, 0.85);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  font-size: 0.9rem;
  text-align: center;
}

.mini-item:hover img { opacity: 0.2; }
.mini-item:hover .overlay { opacity: 1; }

@media (min-width: 1280px) {
  .mini-item { flex: 0 0 auto; height: 220px; max-height: none; }
}

@media (max-width: 1024px) {
  .mini-item { flex: 1 1 calc(50% - 12px); height: 90px; }
}


/* =========================================================
   8) Background Videos Sections (5~8, 9~10)
   ========================================================= */
#section5,
#section6,
#section7,
#section8,
#section9,
#section10 {
  position: relative;
  overflow: hidden;
}

#section5 .bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3;
}

#section6 .bg-video,
#section7 .bg-video,
#section8 .bg-video,
#section9 .bg-video,
#section10 .bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -1;
}

#section6 .bg-video,
#section7 .bg-video,
#section8 .bg-video { opacity: 0.55; }

#section9 .bg-video { opacity: 0.35; }
#section10 .bg-video { opacity: 0.65; }

/* section9/10 content layout */
#section9,
#section10 {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#section9 .container {
  position: relative;
  z-index: 200;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.img-box {
  width: 260px;
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.35s ease;
  z-index: 700;
}

.img-box:hover { transform: scale(1.06); }

@media (max-width: 1024px) {
  .image-row { flex-direction: column; gap: 20px; }
  .img-box { width: 70vw; max-width: 320px; height: 300px; }
}

@media (max-width: 600px) {
  .img-box { width: 85vw; height: 200px; }
}


/* =========================================================
   9) Split Hero (Layer System 정리 + label 전역 오염 제거)
   ========================================================= */
.split-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;

  --info-default-shift: 180px;
  --info-gap: 12px;
  --info-left: 18px;
  --desc-maxw: 560px;
}

/* BG */
.split-hero .bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: center/cover no-repeat;
  transform-origin: center;

  opacity: 0;
  transform: scale(1);
  filter: brightness(1);

  transition: opacity 520ms ease, transform 900ms ease, filter 900ms ease;
  will-change: opacity, transform, filter;
}

.split-hero .bg.is-active { opacity: 1; }
.split-hero .bg.is-enter { transform: scale(1.08); filter: brightness(0.72); }
.split-hero .bg.is-active:not(.is-enter) { transform: scale(1); filter: brightness(1); }

/* Panels */
.split-hero .panels {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 5;
}

.split-hero .panel {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  position: relative;
  outline: none;
}

/* Divider + overlay (필요 시 여기서 글라스 추가 가능) */
.split-hero .panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0);
  transition: background 220ms ease;
}

.split-hero .panel.is-active::before { background: rgba(0, 0, 0, 0.40); }
.split-hero .panel:hover::before,
.split-hero .panel:focus-visible::before { background: rgba(0, 0, 0, 0.5); }

/* info */
.split-hero .panel .info {
  position: absolute;
  left: var(--info-left);
  top: 50%;
  z-index: 6;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--info-gap);

  transform: translate3d(0, calc(-50% + var(--info-default-shift)), 0);
  transition: transform 520ms ease-in;
  will-change: transform;
}

.split-hero .panel:hover .info,
.split-hero .panel:focus-visible .info {
  transform: translate3d(0, -50%, 0);
}

/* ✅ label: 전역(.label) 제거하고 여기서만 관리 */
.split-hero .label {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;

  text-decoration: none;
  cursor: pointer;

  background: rgba(255, 255, 255, 0);
  color: rgba(255, 255, 255, 0.98);
  font: 800 18px/1.1 "Noto Sans KR", sans-serif;

  letter-spacing: 0.12em;
  text-transform: uppercase;

  opacity: 0.9;
  transform: translate3d(0, 0, 0);
  transition: background 280ms ease-in, box-shadow 280ms ease-in, transform 420ms ease-in, opacity 240ms ease-in;
}

.split-hero .panel:hover .label,
.split-hero .panel:focus-visible .label {
  color: #ff006f;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  transform: translate3d(0, -4px, 0);
  opacity: 1;
}

/* desc */
.split-hero .desc {
  display: block;
  max-width: min(var(--desc-maxw), 86vw);
  margin: 0 16px;

  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;

  color: rgba(255, 255, 255, 0.86);
  font: 300 12px/1.4 "Noto Sans KR", sans-serif;
  letter-spacing: 0.02em;

  opacity: 0;
  transform: translate3d(0, 10px, 0);
  pointer-events: none;

  transition: opacity 260ms ease-in, transform 420ms ease-in;
}

.split-hero .panel:hover .desc,
.split-hero .panel:focus-visible .desc {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* hero-content (레이어 정리: 99999 제거) */
.split-hero .hero-content {
  position: relative;
  z-index: 8; /* ✅ panels(5) 보다 위, 모달보다 아래 */
  padding: 10px 48px;
  margin-top: 0;

  color: #fff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  pointer-events: none;

  opacity: 0;
  transform: translate3d(200px, 0, 0);
  filter: blur(10px);
  transition: transform 1500ms cubic-bezier(.2, .9, .2, 1), opacity 1500ms ease, filter 900ms ease;
}

.split-hero.is-ready .hero-content {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .split-hero .hero-content {
    transition: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (max-width: 900px) {
  .split-hero .hero-content { padding: 48px 18px; }
  .split-hero { --info-left: 12px; --info-default-shift: 140px; --info-gap: 10px; }
  .split-hero .desc { font-size: 13px; }
}

.hero-content p { color: rgba(170, 170, 170, 0.85); }

.hero-content h1 {
    color: aqua;
    font-size: 3rem;
    font-weight: 800;
}


@media (max-width: 1599px) {
   .hero-content h1 {
    font-size: 1.8rem;
    color: #cacaca;
   }

  
}

@media (max-width: 1400px) {
    .split-hero .desc {
        display: none;
    }
}



/* =========================================================
   10) Footer (전화번호/링크 스타일 제거)
   ========================================================= */
.site-footer {
  padding: 18px 16px;
  background: transparent;
  color: rgba(140, 140, 140, 0.95);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer .footer-inner { margin: 0 auto; }
.site-footer .footer-line { margin: 6px 0; font-variant-numeric: tabular-nums; }

.site-footer a,
.site-footer a:visited,
.site-footer a:hover,
.site-footer a:active {
  color: inherit;
  text-decoration: none;
}

.site-footer a[x-apple-data-detectors],
.site-footer a[x-apple-data-detectors]:hover,
.site-footer a[x-apple-data-detectors]:active {
  color: inherit !important;
  text-decoration: none !important;
}
