/* ============================================
   비현실 스튜디오 — Design System & Styles
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-accent: #FFD600;
  --color-accent-hover: #FFC400;
  --color-black: #111111;
  --color-dark: #1A1A1A;
  --color-gray-900: #222222;
  --color-gray-700: #444444;
  --color-gray-500: #888888;
  --color-gray-300: #CCCCCC;
  --color-gray-100: #F5F5F5;
  --color-white: #FFFFFF;

  --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 72px;
  --max-width: 1200px;
  --section-padding: 120px 40px;

  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;
  --transition-slow: 0.6s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition-base), box-shadow var(--transition-base);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 40px;
  position: relative;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 32px;
  width: auto;
}

.nav-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-link {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-gray-700);
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--color-black);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-black);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-black);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- SECTIONS COMMON ---------- */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-padding);
  position: relative;
}

.section-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-heading {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--color-black);
}

.accent {
  color: var(--color-accent);
  position: relative;
}

.section-desc {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--color-gray-700);
  line-height: 1.8;
  font-weight: 400;
  word-break: keep-all;
}

.section-desc strong {
  color: var(--color-black);
  font-weight: 700;
}

/* ---------- SECTION 1: MAIN ---------- */
.section-main {
  position: relative;
  width: 100%;
  height: 100vh;
  /* Full screen height for impact */
  min-height: 700px;
  overflow: hidden;
  background: #000;
}

.main-content-centered {
  position: relative;
  z-index: 10;
  /* Above the overlay */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  padding-top: var(--nav-height);
}

.main-heading {
  font-size: clamp(48px, 6.5vw, 76px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: #ffffff;
}

.main-desc {
  font-size: clamp(19px, 2.5vw, 24px);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.main-desc strong {
  font-weight: 700;
  color: #ffffff;
}

/* Continuous Video Grid Marquee Background */
.video-marquee-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2vh;
  /* Fixed vertical gap */
  transform: scale(1.02);
}

.marquee-row {
  display: flex;
  width: max-content;
  animation: scrollMarquee 45s linear infinite;
}

.marquee-row.reverse {
  animation-direction: reverse;
}

@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Drama Popup Specifics */
.drama-process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.process-note {
  color: var(--color-gray-500);
  font-size: 13px;
  margin-top: 15px;
  font-weight: 500;
}

.drama-package-grid {
  grid-template-columns: 1fr 1fr !important;
  max-width: 900px;
  margin: 0 auto;
}

/* Coming Soon State */
.package-card.coming-soon {
  position: relative;
  opacity: 0.6;
  filter: grayscale(0.5);
  pointer-events: none;
}

.coming-soon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 20px;
}

.coming-soon-overlay span {
  background: var(--color-accent);
  color: var(--color-black);
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 30px rgba(255, 214, 0, 0.3);
  transform: rotate(-5deg) translateY(-5px); /* Adjusted up to align with separator */
}

/* Section 4 Popup Responsive */
@media (max-width: 1100px) {
  .drama-process-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .drama-package-grid {
    grid-template-columns: 1fr !important;
  }
}

.marquee-video-item {
  height: 42vh;
  /* Use vh to guarantee row visibility regardless of width */
  width: auto;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
  margin-right: 2.5vh;
}

.marquee-video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-marquee-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  /* 70% opacity black layer */
  z-index: 2;
  pointer-events: none;
}

/* ---------- SECTION 2: BReal ---------- */
.section-breal {
  background: var(--color-white);
  padding-top: 40px;
  /* Reduced to lift position */
}

.section-heading--xl {
  font-size: clamp(56px, 7vw, 90px);
  font-weight: 900;
  margin-bottom: 32px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-breal .section-inner {
  position: relative;
  z-index: 5;
}

/* Comparison Cards Layout - Modern Asymmetrical & Depth */
.compare-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1000px;
  margin: 80px auto 0;
  perspective: 2000px;
  /* Enable 3D perspective */
  padding: 0 40px;
}

.compare-card {
  padding: 64px 40px;
  border-radius: 40px;
  text-align: center;
  position: relative;
  z-index: 2;
  /* Premium Glassmorphism V2 (Apple Liquid Glass Style) */
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition:
    transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.6s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Light Refraction Border Effect */
.compare-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent, rgba(255, 255, 255, 0.2));
  border-radius: 42px;
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.compare-card:hover {
  transform: translateZ(50px) rotateX(4deg) rotateY(-2deg);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
}

.compare-card:hover::before {
  opacity: 1;
}

/* Card Dominance: BReal Card */
.compare-card--breal {
  transform: scale(1.05);
  z-index: 3;
  border: 1px solid rgba(255, 214, 0, 0.4);
}

.compare-card--breal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 214, 0, 0.1), transparent 70%);
  pointer-events: none;
}

.compare-card--breal:hover {
  transform: scale(1.08) translateZ(60px) rotateX(4deg) rotateY(-2deg);
}

.compare-card-badge {
  font-size: 20px;
  /* 50% increase from 13px approx */
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  color: var(--color-gray-500);
}

.compare-card--breal .compare-card-badge {
  color: var(--color-black);
}

.compare-icon {
  font-size: 52px;
  display: block;
  margin-bottom: 32px;
}

.compare-icon svg {
  width: 64px;
  height: 64px;
}

.compare-card--other .compare-icon {
  color: #CCCCCC;
}

.compare-card--breal .compare-icon {
  color: var(--color-accent);
}

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-list li {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
}

.compare-card--other .compare-list li {
  color: #999999;
  /* Gray tone */
}

.compare-card--breal .compare-list li {
  color: var(--color-black);
  font-weight: 700;
  /* Bold black for readability */
}

/* Certification Grid - Optimized */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 140px auto 0;
  /* Increased from 100px to move down */
  align-items: flex-start;
}

/* Specific reduction for YouTube Shorts logo (005) */
.cert-item img[src*="section2_logo005"] {
  height: 24px;
  /* Fixed height instead of scale for stability */
  width: auto;
}

/* Fix for logo002 (SVG) scaling issues */
.cert-item img[src*="section2_logo002"] {
  height: 24px;
  width: auto;
}

.cert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cert-logo {
  height: 40px;
  /* 50% reduction from 80px */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.cert-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.4;
  /* Slightly more subtle */
  transition: all var(--transition-base);
}

.cert-item:hover .cert-logo img {
  filter: grayscale(0%);
  opacity: 1;
}

.cert-text {
  font-size: 12px;
  /* Smaller, logo-like font */
  line-height: 1.5;
  color: var(--color-gray-500);
  /* Gray color */
  font-weight: 400;
  word-break: keep-all;
}

/* Mobile adjustments */
@media (max-width: 992px) {
  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
}

@media (max-width: 576px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 20px;
  }

  .cert-grid .cert-item:nth-last-child(-n+2) {
    grid-column: span 1;
  }

  /* If there are 5 items, the last row has only item 5. 
     To make 4 and 5 centered, we could make row 2 have item 3 alone centered?
     User wants logo001 (item 4) and logo002 (item 5) centered.
  */
  .cert-item:nth-child(4) {
    grid-column: 1 / 2;
  }

  .cert-item:nth-child(5) {
    grid-column: 2 / 3;
  }

  /* Let's use flexbox for the grid container on mobile for better centering of odd items */
  .cert-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px 20px;
  }

  .cert-item {
    width: calc(50% - 10px);
    max-width: 160px;
  }

  .compare-cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .compare-card {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px;
  }

  .compare-icon {
    margin-bottom: 20px;
  }
}

/* ---------- SECTION 3: BRANDED ---------- */
.section-branded {
  background: var(--color-gray-100);
  padding: var(--section-padding);
}

.section-branded .section-header {
  margin-bottom: 60px;
}

.stat-number {
  font-size: clamp(60px, 10vw, 110px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.popup-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: -0.02em;
}

.branded-split-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
}

.branded-info {
  flex: 1;
  text-align: left;
}

.branded-message {
  max-width: 580px;
}

.branded-stat-mini {
  margin-top: 24px;
}

.stat-caption {
  font-size: 14px;
  color: var(--color-gray-500);
  line-height: 1.6;
}

.branded-media {
  flex: 1.2;
  display: flex;
  justify-content: flex-end;
}

.main-video-box {
  width: 100%;
  max-width: 600px;
  /* Removed white background for transparency */
  background: transparent;
}

.main-video-asset {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.logo-marquee-container {
  margin-top: 30px; /* Brining logos closer to main content */
}

/* Section 3 Layout responsiveness */
@media (max-width: 991px) {
  .branded-split-content {
    flex-direction: column; /* Stacked layout on mobile */
    text-align: center;
    gap: 40px;
  }

  .branded-info {
    text-align: center;
  }

  .branded-media {
    width: 100%;
    justify-content: center;
  }

  .branded-message {
    margin: 0 auto;
  }
}

.mt-4 {
  margin-top: 2rem;
}

.section-branded {
  background: var(--color-gray-100);
  padding: 40px 40px; /* Further reduced vertical padding for visibility */
}

/* Symbol styling */
.symbol-black {
  color: var(--color-black);
}

/* Fix layout shift during counting */
.stat-number-wrapper {
  min-height: 120px;
  min-width: 450px; /* More rigid width */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  font-variant-numeric: tabular-nums; /* CRITICAL: Fixed width for digits */
}

.stat-number {
  font-size: clamp(60px, 10vw, 110px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0;
  letter-spacing: -0.01em; /* Reduced for tabular layout stability */
  text-shadow: none; /* Shadow removed as requested */
}

/* Branded info button alignment (Reverted to Left) */
.btn-center-wrapper {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}

.learn-more-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--color-accent);
  color: var(--color-black);
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.learn-more-btn:hover {
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Video size reduction */
.section-branded .main-video-box {
  max-width: 480px;
  background: transparent;
}

/* ========== POPUP STYLES ========== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: var(--color-dark);
  color: var(--color-white);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  border-radius: 40px;
  position: relative;
  padding: 80px 60px;
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: var(--color-gray-500);
  width: auto;
  height: auto;
  border-radius: 0;
  display: block;
  font-size: 36px;
  font-weight: 300;
  cursor: pointer;
  z-index: 2005;
  transition: color var(--transition-fast);
  backdrop-filter: none;
}

.popup-close:hover {
  background: none;
  color: var(--color-white);
  transform: none;
}

.popup-section {
  margin-bottom: 60px;
}

.popup-section:last-child {
  margin-bottom: 0;
}

.popup-subtitle {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 30px; /* Base gap for both sections */
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

/* Process Flow Zigzag (ㄹ Shape) */
.process-flow-zigzag {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0; /* Removed top padding to match grid */
  position: relative;
}

/* Connect Row 1 and Row 2 in S-shape (Grid indices: 1-2-3 -> 6-5-4) */
/* To keep it simple visually without complex SVG connectors: boxes with arrows */

.step-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px;
  border-radius: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
}

/* ㄹ shape ordering */
.process-flow-zigzag .step-card:nth-child(4) { order: 6; }
.process-flow-zigzag .step-card:nth-child(5) { order: 5; }
.process-flow-zigzag .step-card:nth-child(6) { order: 4; }

.step-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-accent);
  opacity: 0.6;
}

.step-card p {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  word-break: keep-all;
}

.step-card:hover {
  background: rgba(255, 214, 0, 0.08);
  border-color: var(--color-accent);
  transform: translateY(-5px);
}

/* Connectors for ㄹ flow */
.step-card::after {
  content: '';
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
}

/* Right arrows for 01, 02 */
.step-card:nth-child(1)::after,
.step-card:nth-child(2)::after {
  top: 50%;
  right: -20px; /* Matches gap */
  width: 20px;
  border-top: 2px dashed var(--color-accent);
  transform: translateY(-50%);
}

/* Down arrow for 03 to 06 */
.step-card:nth-child(3)::after {
  bottom: -20px;
  left: 50%;
  height: 20px;
  border-left: 2px dashed var(--color-accent);
  transform: translateX(-50%);
}

/* Left arrows for 06 -> 05 -> 04 */
.step-card:nth-child(6)::after,
.step-card:nth-child(5)::after {
  top: 50%;
  left: -20px;
  width: 20px;
  border-top: 2px dashed var(--color-accent);
  transform: translateY(-50%);
}

/* Package Grid Styling */
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.package-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease; /* Added transition */
}

.package-card:hover {
  background: rgba(255, 214, 0, 0.08); /* Yellow hover effect */
  border-color: var(--color-accent);
  transform: translateY(-5px);
}

.package-header {
  margin-bottom: 20px;
}

.package-header h4 {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-accent); /* Yellow titles */
  margin-bottom: 6px;
}

.package-price {
  font-size: 15px;
  color: var(--color-gray-400);
  font-weight: 600;
}

.package-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  margin-top: 20px;
  padding-top: 10px;
}

.vat-notice {
  position: absolute;
  top: -18px;
  right: 0;
  font-size: 11px;
  color: var(--color-gray-500);
  font-weight: 500;
}

.package-list {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.package-list li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-gray-200);
  position: relative;
  padding-left: 15px;
}

.package-list li::before {
  content: '•'; /* Dot prefix */
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
  .section-branded {
    padding: 60px 24px;
    text-align: center;
  }

  .stat-number-wrapper {
    justify-content: center;
    min-width: 100%;
  }

  .btn-center-wrapper {
    justify-content: center; /* Centered on mobile for better balance */
  }

  .section-branded .main-video-box {
    max-width: 320px; /* Further reduced for mobile */
    margin: 0 auto;
  }

  /* Process flow stacks on mobile */
  .process-flow-zigzag {
    grid-template-columns: 1fr;
  }
  
  .process-flow-zigzag .step-card {
    order: unset !important;
  }

  .package-grid {
    grid-template-columns: 1fr;
  }
  
  .popup-close {
    top: 20px;
    right: 25px;
    position: absolute;
  }

  /* Hide connectors on mobile */
  .step-card::after {
    display: none;
  }

  .logo-marquee-container {
    margin-top: 30px;
  }
}

/* ---------- SECTION 4: DRAMA ---------- */
.section-drama {
  background: var(--color-black);
  color: var(--color-white);
}

.drama-content {
  text-align: center;
}

.drama-stat {
  margin-bottom: 32px;
}

.stat-number-drama {
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  display: block;
  margin-bottom: 16px;
}

.stat-amp {
  color: var(--color-accent);
}

.drama-cases {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drama-cases .stat-caption {
  color: rgba(255, 255, 255, 0.5);
}

.drama-cases .stat-caption strong {
  color: var(--color-accent);
}

.drama-text {
  max-width: 680px;
  margin: 0 auto 60px;
}

.drama-text .section-desc {
  color: rgba(255, 255, 255, 0.7);
}

.drama-text .section-desc strong {
  color: var(--color-white);
}

/* Drama Gallery - Refined 3D Layout */
.drama-gallery-wrapper {
  perspective: 2000px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 60px; /* Reduced from 120px */
}

#section-drama .btn-center-wrapper {
  justify-content: center;
  margin-top: 0; /* Let HTML/Wrapper decide */
}

.drama-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
}

.gallery-item {
  position: relative;
  width: 260px;
  height: 420px;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Precise layering and overlap */
.item-poster-left {
  transform: rotateY(42deg) translateZ(-80px);
  z-index: 1;
  margin-right: -45px; /* ~17% overlap behind video */
  -webkit-box-reflect: below 5px linear-gradient(transparent, transparent, rgba(0, 0, 0, 0.15));
}

.item-video-left {
  transform: translateZ(0); /* Flat rectangle */
  z-index: 2;
  margin-right: 15px; /* Half of 30px central gap */
}

.item-video-right {
  transform: translateZ(0); /* Flat rectangle */
  z-index: 2;
  margin-left: 15px; /* Half of 30px central gap */
}

.item-poster-right {
  transform: rotateY(-42deg) translateZ(-80px);
  z-index: 1;
  margin-left: -45px; /* ~17% overlap behind video */
  -webkit-box-reflect: below 5px linear-gradient(transparent, transparent, rgba(0, 0, 0, 0.15));
}

/* Mobile responsive for gallery */
@media (max-width: 991px) {
  .drama-gallery-wrapper {
    perspective: 1500px;
    padding-bottom: 80px;
  }
  
  .gallery-item {
    width: 190px;
    height: 310px;
  }
  
  .item-poster-left { margin-right: -30px; }
  .item-poster-right { margin-left: -30px; }
  .item-video-left { margin-right: 10px; }
  .item-video-right { margin-left: 10px; }
}

@media (max-width: 600px) {
  .drama-gallery {
    gap: 8px;
    transform: scale(0.9);
  }
  
  .gallery-item {
    width: 130px;
    height: 220px;
    transform: none !important;
    perspective: none;
    -webkit-box-reflect: none !important;
    margin: 0 !important;
    box-shadow: none;
  }
}


/* Mobile responsive for gallery */
@media (max-width: 991px) {
  .drama-gallery-wrapper {
    perspective: 1000px;
    padding-bottom: 60px;
  }
  
  .gallery-item {
    width: 180px;
    height: 300px;
  }
  
  .item-video-left { margin-left: -30px; }
  .item-video-right { margin-right: -30px; }
}

@media (max-width: 600px) {
  .drama-gallery {
    gap: 10px;
    transform: scale(0.9);
  }
  
  .gallery-item {
    width: 120px;
    height: 200px;
    transform: none !important;
    perspective: none;
    -webkit-box-reflect: none;
  }
  
  .item-video-left, .item-video-right { margin: 0; }
}

/* ---------- SECTION 5: CONTACT ---------- */
.section-contact {
  background: var(--color-white);
}

.contact-header {
  text-align: center;
  margin-bottom: 56px;
}

.contact-form {
  max-width: 720px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
}

.required {
  color: var(--color-accent);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-gray-300);
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--color-black);
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-gray-500);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Custom Select Styling */
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-gray-300);
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--color-black);
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  cursor: pointer;
}

.form-group select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.15);
}

.form-group select option:disabled {
  color: var(--color-gray-400);
  background: #f9f9f9;
}

.form-group--full {
  margin-bottom: 20px;
}

.form-group--checkbox {
  margin-bottom: 32px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-gray-700);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-gray-300);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
}

/* Privacy Link Styling */
.privacy-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  color: var(--color-black);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.privacy-link:hover {
  color: var(--color-accent);
}

/* Privacy Popup Specifics */
.popup-content--privacy {
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.privacy-body {
  margin-top: 24px;
  text-align: left;
  overflow-y: auto;
  padding-right: 10px;
}

.privacy-body p {
  color: var(--color-gray-400);
  line-height: 1.6;
  font-size: 15px;
}

.privacy-item {
  margin-top: 24px;
}

.privacy-item strong {
  display: block;
  color: var(--color-white);
  font-size: 16px;
  margin-bottom: 8px;
}

.popup-footer {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

.privacy-confirm-btn {
  display: inline-block;
  padding: 12px 48px;
  background: var(--color-accent);
  color: var(--color-black);
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.privacy-confirm-btn:hover {
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Scrollbar for privacy body */
.privacy-body::-webkit-scrollbar {
  width: 6px;
}

.privacy-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.privacy-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.checkbox-custom::after {
  content: '✓';
  font-size: 13px;
  font-weight: 700;
  color: var(--color-black);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.checkbox-label input[type="checkbox"]:checked+.checkbox-custom::after {
  opacity: 1;
}

.submit-btn {
  width: 100%;
  padding: 18px 32px;
  font-family: var(--font-family);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-black);
  background: var(--color-accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: -0.01em;
}

.submit-btn:hover:not(:disabled) {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 214, 0, 0.35);
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--color-gray-100);
  padding: 40px;
  border-top: 1px solid var(--color-gray-300);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  height: 24px;
  width: auto;
  opacity: 0.5;
}

.footer-copy {
  font-size: 13px;
  color: var(--color-gray-500);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  :root {
    --section-padding: 80px 24px;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .compare-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: clamp(48px, 12vw, 76px);
  }

  .stat-number-drama {
    font-size: clamp(40px, 12vw, 72px);
  }

  .compare-videos-container {
    gap: 10px;
    /* Reduce gap on mobile */
    padding-top: 40px;
    /* Adjust top padding for smaller text */
    padding-left: 10px;
    padding-right: 10px;
  }

  .comp-item--left {
    flex: 0 0 calc(35% - 5px);
    width: auto;
    max-width: none;
  }

  .comp-item--right {
    flex: 0 0 calc(65% - 5px);
    width: auto;
    max-width: none;
  }

  .comp-arrow {
    flex: 0 0 30px;
    /* Smaller arrow to save horizontal space */
  }

  .comp-text-side--left {
    font-size: clamp(16px, 4vw, 24px);
    left: 8px;
  }

  .comp-text-side--right {
    font-size: clamp(20px, 5vw, 32px);
    right: 8px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 20px;
  }

  .nav-link {
    font-size: 13px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    padding: 0 16px;
  }

  .nav-menu {
    position: static;
    transform: none;
    gap: 12px;
    margin-left: auto;
  }

  .nav-link {
    font-size: 12px;
    letter-spacing: 0;
  }

  .logo-img {
    height: 24px;
  }
}

/* ---------- ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* ---------- LOGO MARQUEE ---------- */
.logo-marquee-container {
  width: 100%;
  padding: 60px 0 20px;
  overflow: hidden;
  position: relative;
}

.logo-marquee {
  width: 100%;
  display: flex;
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 80px;
  /* 일정 간격 */
  animation: scroll 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.logo-track img {
  height: 32px;
  /* 작은 크기 */
  width: auto;
  opacity: 0.3;
  /* 투명도 30% */
  filter: grayscale(1);
  /* 무채색 톤으로 세련되게 처리 */
  transition: opacity var(--transition-fast);
}

/* Specific size for logo 008 (2x larger) */
.logo-track img[src*="section3_bottom_logo008"] {
  height: 64px;
}

/* Reduce spacing for logo 010 (40% reduction of 80px gap = 32px total, so -16px each side) */
.logo-track img[src*="section3_bottom_logo010"] {
  margin: 0 -16px;
}

.logo-track img:hover {
  opacity: 0.6;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}