:root {
  --paper: #f5f3ee;
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  background: #000;
  overflow: hidden;
}

/* Split layout */
.split {
  display: flex;
  height: 100vh;
  width: 100vw;
}

.panel {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.8s var(--transition);
}

.split:hover .panel {
  flex: 0.8;
}

.split:hover .panel:hover {
  flex: 1.4;
}

/* Panel background */
.panel-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
  transition: transform 1.2s var(--transition), filter 0.8s var(--transition);
}

.panel:hover .panel-bg {
  transform: scale(1.05);
  filter: brightness(0.8);
}

/* Overlay gradient for text legibility */
.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Panel content */
.panel-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 8%;
  gap: 56px;
}

/* Logo — invert to white, smaller */
.branch-logo {
  width: 200px;
  max-width: 50%;
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 2px 16px rgba(0, 0, 0, 0.3));
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--transition) 0.3s forwards;
}

/* Language navigation — minimal text with dividers */
.lang-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--transition) 0.6s forwards;
}

.lang-btn {
  position: relative;
  display: block;
  padding: 14px 32px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-family: 'Inter', 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s var(--transition), letter-spacing 0.3s var(--transition);
}

/* Divider between items */
.lang-btn:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.4s var(--transition), background 0.3s var(--transition);
}

.lang-btn:hover {
  color: #fff;
  letter-spacing: 0.18em;
}

.lang-btn:hover:not(:last-child)::after {
  width: 60px;
  background: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile - vertical split, two panels fit in one viewport */
@media (max-width: 768px) {
  html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  .split {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
  }

  .panel {
    flex: 1 1 50vh !important;
    flex: 1 1 50dvh !important;
    width: 100%;
    height: 50vh;
    height: 50dvh;
    min-height: 0;
  }

  .split:hover .panel,
  .split:hover .panel:hover {
    flex: 1 1 50vh !important;
    flex: 1 1 50dvh !important;
  }

  /* Disable hover effects on mobile */
  .panel:hover .panel-bg {
    transform: none;
  }

  .panel-bg {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }

  .panel-content {
    padding: 20px 24px;
    gap: 20px;
  }

  .branch-logo {
    width: 120px;
  }

  .lang-nav {
    gap: 0;
  }

  .lang-btn {
    padding: 8px 20px;
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .lang-btn:not(:last-child)::after {
    width: 28px;
  }

  .lang-btn:hover {
    letter-spacing: 0.14em;
  }

  .lang-btn:hover:not(:last-child)::after {
    width: 44px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
