/* Global Styles */
:root {
  --bg-color: #000000;
  --text-color: #ffffff;
  --font-primary: 'Space Mono', monospace;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-primary);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

/* Background Layer */
#background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: black;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

/* Intro Layer (Step 0) */
#intro-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 30;
  transition: opacity 0.5s ease;
  pointer-events: none; /* Let clicks pass through to body */
}

.intro-logo {
  max-width: 60%;
  max-height: 40vh;
  object-fit: contain;
}

/* Visibility States */
.ui-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.ui-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* UI Layer (Fixed Right - Homepage Content) */
#ui-layer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
  min-width: 300px;
  max-width: 50vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 3rem 3rem 12rem 0;
  padding-right: 3rem;
  z-index: 10;
  text-align: right;
  pointer-events: none;
}

#ui-layer * {
  pointer-events: auto;
}

/* Global Brand Footer (Fixed Layer) */
#global-brand-footer {
  position: fixed;
  right: 32px;
  bottom: 28px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.2rem;
  pointer-events: auto;
}

/* Bottom Section (Homepage Download Link Container) */
.bottom-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Download Link (Repositioned) */
.nav-link.download-trigger {
  font-size: 1.45rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 0;
  margin-bottom: 0;
  border-bottom: 1px solid transparent;
  transition: all var(--transition-speed) ease;
  opacity: 1;
}

.nav-link.download-trigger:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
  opacity: 1;
}

.company-name {
  font-family: 'Oswald', sans-serif;
  font-size: 2.9rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  color: #EBD6AD;
  text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.7);
}

.contact-email {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  opacity: 1;
  transition: opacity var(--transition-speed) ease;
  margin-bottom: 0.2rem;
  letter-spacing: 0.5px;
  font-weight: 400;
}

.contact-email:hover {
  text-decoration: underline;
}

.copyright {
  font-size: 0.75rem;
  color: #ffffff;
  opacity: 0.7;
  white-space: nowrap;
  margin-top: 0;
}

/* ✅ Corner Nav (PRODUCT / DOWNLOAD) - 항상 우하단, 로고랑 간격 + 글씨 키움 */
.corner-nav {
  position: fixed;
  right: 35px;
  bottom: 200px; /* 로고(footer)와 떨어뜨림 */
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 1rem; /* 두 줄 간격 */
  pointer-events: auto;
}

.corner-link {
  font-family: 'Space Mono', monospace;
  font-size: 1.7rem; /* ✅ 글씨 키움 */
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.25s ease;
  line-height: 1.1;  
}

.corner-link.product-link {
  letter-spacing: 3.3px; /* 여기만 조절 */
}

.corner-link:hover {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Download Page Styles */
.download-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 50px;
  z-index: 20;
}

.download-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
}

.download-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
}

.download-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3rem 2rem;
  text-align: center;
  width: 90%;
  backdrop-filter: blur(16px);
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.download-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.version-info {
  margin: 1rem 0 2rem 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  line-height: 1.6;
}

.download-btn {
  width: 100%;
  padding: 16px 0;
  font-size: 1rem;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #ffffff;
  color: #ffffff;
  font-weight: 700;
}

.download-btn:hover {
  background: #ffffff;
  color: #000000;
  transform: none;
}

.back-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.3s ease;
  display: inline-block;
  margin-top: 0.5rem;
}

.back-link:hover {
  color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
  #ui-layer {
    padding-right: 2rem;
  }

  #global-brand-footer {
    right: 20px;
    bottom: 20px;
  }

  .corner-nav {
    right: 20px;
    bottom: 155px; /* 모바일에서도 로고랑 간격 유지 */
    gap: 0.65rem;
  }

  .corner-link {
    font-size: 0.95rem;
  }

  .company-name {
    font-size: 1.4rem;
  }

  .download-page-title {
    font-size: 1.8rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  #background-layer,
  .btn,
  .ui-hidden {
    transition: none;
  }
}

/* Product Page Styles */
.product-body {
  overflow-y: auto;
  cursor: auto;
  background-color: var(--bg-color);
}

.product-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 100;
  pointer-events: none;
}

.product-nav a,
.product-nav div {
  pointer-events: auto;
}

/* 홈으로 */
.nav-home {
  font-family: 'Space Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s ease;
  display: inline-block;
  margin-top: 0.5rem;
}

.nav-home:hover {
  color: #ffffff;
}

/* Language buttons */
.lang-selector {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.lang-sep {
  opacity: 0.3;
}

.lang-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  background: transparent;
  border: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.lang-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.lang-btn.active {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

/* Product layout */
.product-container {
  position: relative;
  max-width: 900px;
  margin: 5rem auto 10rem;
  padding: 0 2rem;
  z-index: 50;
  text-align: center;
}

.product-title {
  font-family: 'Oswald', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 5rem;
  font-weight: 400;
}

.product-section {
  margin-bottom: 4rem;
  text-align: left;
  background: rgba(0, 0, 0, 0.3);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.product-section h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #EBD6AD;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(235, 214, 173, 0.2);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.product-section p,
.product-section li {
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

.feature-list,
.step-list {
  padding-left: 1.5rem;
}

.feature-list li,
.step-list li {
  margin-bottom: 0.8rem;
}

/* Step description (2번 괄호용 보조 설명) */
.step-desc {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* 문의 메일 */
.contact-link {
  display: block;
  margin-top: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-decoration: none;
  opacity: 1;
}

.contact-link:hover {
  text-decoration: underline;
}

.product-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url('assets/img/jungle_open.png');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
}

@media (max-width: 768px) {
  .product-nav {
    padding: 1.5rem;
  }

  .product-title {
    font-size: 2.5rem;
  }

  .product-container {
    padding: 0 1.5rem;
    margin-top: 6rem;
  }
}
