/* ===============================
   기본 테마 변수
   =============================== */
:root {
  --bg: #02030a;
  --bg-alt: #060816;
  --card: #0c1120;
  --accent: #35c3ff;
  --accent-soft: rgba(53, 195, 255, 0.15);
  --text-main: #f5f7ff;
  --text-muted: #a5b0d4;
  --danger: #ff5c7a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-xl: 24px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.6);
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.25s ease;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background-color: #050814; /* 원하는 단색 하나만 */
  color: #f5f5f5;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===============================
   3 LOGO 3D ROTATION
   =============================== */
.logo-inside-card {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  margin: 30px 0 18px;
  flex-wrap: nowrap;
  perspective: 1200px;
  /* ✅ 여기 animation: ... 이 없어야 합니다 */
}


.logo-single {
  height: 110px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.75));
  transition:
    transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
    filter 0.4s ease;
  transform-origin: center center;
  backface-visibility: hidden;
  cursor: pointer;

  /* 🔥 속도를 크게 높임 (24초 → 14초) */
  animation: logo-spin 14s linear infinite;
}

.logo-single:nth-child(1) {
  animation-duration: 14s;   /* 기본 */
}

.logo-single:nth-child(2) {
  animation-duration: 16s;   /* 약간 느림 */
  animation-direction: reverse;
}

.logo-single:nth-child(3) {
  animation-duration: 18s;   /* 가장 느림 */
}

.logo-single:hover {
  transform: rotateY(180deg) rotateX(8deg) scale(1.03);
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.9));
}

/* ===== LOGO ORBIT ANIMATION ===== */

/* ===== 각 로고 자전 애니메이션 ===== */
@keyframes logo-spin {
  0% {
    transform: rotateY(0deg) rotateX(12deg);
  }
  50% {
    transform: rotateY(180deg) rotateX(12deg);   /* 뒤로 넘어가는 중간 */
  }
  100% {
    transform: rotateY(360deg) rotateX(12deg);
  }
}


@media (max-width: 600px) {
  .logo-inside-card {
    gap: 32px;
  }
  .logo-single {
    height: 80px;
  }
  .pdf-book-section {
    padding: 20px 0 40px;
  }
  .page-slot {
    height: 65vh;
  }
}


/* ===============================
   LANG MULTILINE
   =============================== */
.lang-multiline {
  max-width: 1200px;
  margin: 14px auto 26px;
  padding: 0 20px;
  font-size: 0.63rem;
  line-height: 1.25;
  color: #aeb7d4;
  opacity: 0.85;
  text-align: center;
}
.lang-multiline div {
  margin-bottom: 4px;
}


/* ===============================
   ACCESS GATE
   =============================== */
.gate-wide {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
  margin-top: 0;
}

.gate-inner-wide {
  width: 100%;
  max-width: 900px;
  border-radius: 28px;
  background: radial-gradient(circle at top, rgba(255,255,255,0.06), #050816);
  box-shadow: 0 26px 60px rgba(0,0,0,0.8);
  padding: 26px 26px 24px;
}

.gate-card-wide {
  background: rgba(0,0,0,0.35);
  border-radius: 18px;
  padding: 24px 32px;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.1);
}
.gate-card-wide h2 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.gate-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

.gate-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.gate-input-row.single {
  gap: 10px;
}

.gate-input-row input {
  flex: 1;
  background: #050819;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}
.gate-input-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
  background: #050a1e;
}

.gate-or {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 4px;
}

.gate-helper,
.gate-hint,
.gate-error {
  font-size: 0.8rem;
  margin: 4px 2px 0;
}
.gate-helper { color: var(--text-muted); }
.gate-hint   { color: var(--text-muted); }
.gate-error  { color: var(--danger); }

.gate-password label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* BUTTONS */
.btn {
  border-radius: 999px;
  padding: 10px 20px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background var(--transition-med),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
  font-weight: 500;
}

.btn.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #40e3ff);
  color: #02030a;
  box-shadow: 0 12px 25px rgba(22, 161, 224, 0.4);
}
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 35px rgba(22, 161, 224, 0.5);
}

.btn.outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  padding-inline: 16px;
  white-space: nowrap;
}
.btn.outline:hover {
  background: var(--accent-soft);
}

/* MAIN SITE WRAPPER */
.site.hidden { display: none; }
.site {
  min-height: 100vh;
  background: #000;
}

/* ===============================
   BOOK VIEWER (2 PAGE SPREAD)
   =============================== */
.pdf-book-section {
  padding: 40px 0 60px;
  background: #000;
}

.book-wrapper {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;   /* 🔥 여백 제거 */
}

#flipbook {
  width: min(1600px, 95vw);
  height: min(1000px, 90vh);
  margin: 0 auto;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.9);
}

.flipbook-shell,
.flipbook-wrapper,
.flipbook-stage,
.book-frame {
  background: transparent;   /* 또는 background-color: #050814; */
}


.book {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  perspective: 2000px;
  position: relative;
}

/* 페이지 박스 */
.page-slot {
  flex: 1;
  position: relative;
  background: #02030a;
  box-shadow: 0 26px 60px rgba(0,0,0,0.9);
  border-radius: 8px;
  overflow: hidden;
  height: 80vh;
  cursor: pointer;
}

.page-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  position: relative;
}

/* 이미지 */
.page-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 말려 올라가는 종이 가장자리 하이라이트 */
.page-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: radial-gradient(
    circle at 0% 0%,
    rgba(255,255,255,0.55) 0,
    rgba(255,255,255,0.18) 25%,
    rgba(0,0,0,0.4) 60%,
    rgba(0,0,0,0.75) 100%
  );
}

/* 애니메이션 중일 때는 하이라이트 보이도록 */
.flip-next .page-inner::before,
.flip-prev .page-inner::before {
  opacity: 1;
}

/* 회전 축 */
.page-left .page-inner  { transform-origin: right center; }
.page-right .page-inner { transform-origin: left center; }

/* 화살표 버튼 */
.page-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: radial-gradient(circle at 30% 30%, #4be6ff, #0079ff);
  color: #02030a;
  font-size: 26px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  z-index: 10;
}
.page-nav.prev { left: -60px; }
.page-nav.next { right: -60px; }

.page-nav:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
  opacity: 1;
}


/* ===============================
   PAGE FLIP 애니메이션 (파도치는 종이)
   =============================== */
/* ===============================
   PAGE FLIP 애니메이션 (부드러운 파도)
   =============================== */
@keyframes pageFlipNext {
  0% {
    transform: rotateY(0deg) skewY(0deg) translateZ(0);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.9);
  }
  40% {
    /* 살짝 말렸다가 */
    transform: rotateY(-60deg) skewY(-2deg) translateZ(14px);
    box-shadow: -18px 28px 70px rgba(0, 0, 0, 1);
  }
  100% {
    /* 완전히 넘어감 */
    transform: rotateY(-180deg) skewY(0deg) translateZ(0);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  }
}

@keyframes pageFlipPrev {
  0% {
    transform: rotateY(0deg) skewY(0deg) translateZ(0);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.9);
  }
  40% {
    transform: rotateY(60deg) skewY(2deg) translateZ(14px);
    box-shadow: 18px 28px 70px rgba(0, 0, 0, 1);
  }
  100% {
    transform: rotateY(180deg) skewY(0deg) translateZ(0);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  }
}

/* 애니메이션은 page-inner 에만 적용 (겉 박스는 고정) */
.flip-next .page-inner {
  animation: pageFlipNext 0.7s ease-in-out forwards;
}
.flip-prev .page-inner {
  animation: pageFlipPrev 0.7s ease-in-out forwards;
}

/* ===============================
   INVEST SECTION
   =============================== */
.invest-section {
  padding: 48px 20px 60px;
  background: radial-gradient(circle at top, #121943 0, #03040c 60%);
}

.invest-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .invest-inner {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

.invest-copy,
.invest-form {
  background: #070b1b;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-soft);
}

.invest-copy h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.4rem;
}
.invest-copy p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 10px;
}
.invest-copy ul {
  margin: 0 0 12px 18px;
  padding: 0;
}
.invest-copy li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.invest-note {
  font-size: 0.88rem;
  margin-top: 4px;
}

.bank-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  background: rgba(53, 195, 255, 0.06);
}
.bank-link:hover { background: var(--accent-soft); }

/* 투자 폼 */
.invest-form h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.invest-form-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.invest-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.invest-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  font-size: 0.9rem;
  background: #050819;
  color: #f5f5f5;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
  margin-bottom: 12px;
}
.invest-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
  background: #050a1e;
}

/* SEND BUTTON ANIMATION */
.send-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), #40e3ff);
  color: #02030a;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 14px 30px rgba(22, 161, 224, 0.5);
}
.send-btn .btn-check {
  opacity: 0;
  transform: scale(0.5) translateY(6px);
  transition: opacity var(--transition-med), transform var(--transition-med);
}
.send-btn.sent {
  background: #22c55e;
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.4);
}
.send-btn.sent .btn-label {
  opacity: 0;
  transform: translateY(-8px);
}
.send-btn.sent .btn-check {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.send-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.28),
    transparent 60%
  );
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.send-btn:hover::after {
  opacity: 1;
  transform: scale(1);
}

.sent-confirm {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease;
}
.sent-confirm.visible {
  opacity: 1;
  max-height: 80px;
}

/* UTIL */
.hidden { display: none !important; }

@media (max-width: 900px) {
  .book {
    flex-direction: column;
    max-width: 100%;
  }
  .page-slot {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
    height: 70vh;
  }
  .page-nav {
    display: none; /* 모바일에서는 페이지 탭해서 넘김 */
  }
}

/* 800px 이하에서는 flipbook 크기 조정 */
@media (max-width: 800px) {
  #flipbook {
    width: 100vw;
    height: 85vh;
  }
}

