/* ========================================================
   LBI FIB UI - Landing Page Styles
   Responsive, Pixel-Perfect & Modern
   ======================================================== */

:root {
  --ui-yellow: #fed525;
  --ui-yellow-hover: #ffe04d;
  --lbi-blue: #2050a4;
  --lbi-blue-hover: #2b65ce;
  --navy-text: #193e7f;
  --text-white: #ffffff;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-family);
  background-color: #1a1e27;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow: hidden;
  position: relative;
}

/* ========================================================
   1. Header & Logo (Universitas Indonesia + LBI FIB UI)
   ======================================================== */
.logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  line-height: 0;
  pointer-events: auto;
}

.logo a {
  display: block;
  outline: none;
}

.logo a:focus-visible {
  outline: 3px solid var(--ui-yellow);
  outline-offset: 3px;
}

.logo-img {
  display: block;
  height: 72px;
  width: auto;
  user-select: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
  transition: transform 0.25s var(--transition-smooth), filter 0.25s ease;
}

.logo-img:hover {
  transform: scale(1.015);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

/* ========================================================
   2. Split Panels
   ======================================================== */
.split {
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.panel {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.65s var(--transition-smooth);
}

/* Subtle responsive hover expansion on desktop */
.split:hover .panel {
  flex: 0.9;
}

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

/* Background image layer */
.panel-bg {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.85s var(--transition-smooth), filter 0.5s ease;
  z-index: 0;
}

.bipa .panel-bg {
  background-image: url("../img/bipa.jpg");
  background-position: center 45%;
}

.ppb .panel-bg {
  background-image: url("../img/ppb.jpg");
  background-position: center 30%;
}

.panel:hover .panel-bg {
  transform: scale(1.04);
}

/* Soft natural overlay for high contrast & legibility without dimming too much */
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.24) 100%);
  transition: background 0.45s ease;
  z-index: 1;
}

.panel:hover::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.16) 100%);
}

/* Content Container */
.panel-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px 32px;
  max-width: 620px;
  text-align: center;
}

/* ========================================================
   3. Buttons & Typography
   ======================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  border-radius: 14px;
  font-size: 30px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--transition-smooth), box-shadow 0.25s ease, background-color 0.2s ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-2px) scale(1.05);
}

.btn:active {
  transform: translateY(0) scale(1.01);
}

.btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

/* BIPA Yellow Button */
.yellow {
  background-color: var(--ui-yellow);
  color: var(--navy-text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.yellow:hover {
  background-color: var(--ui-yellow-hover);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

/* PPB Blue Button */
.blue {
  background-color: var(--lbi-blue);
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.blue:hover {
  background-color: var(--lbi-blue-hover);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* Titles */
h2 {
  color: var(--text-white);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.9);
  transition: transform 0.3s ease;
}

.panel:hover h2 {
  transform: translateY(-1px);
}

/* ========================================================
   4. Language Selector
   ======================================================== */
.lang {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 40;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  background: #ffffff;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 19px;
  font-family: inherit;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
  background-color: #fafafa;
}

.lang-btn:focus-visible,
.lang-menu li:focus-visible {
  outline: 3px solid var(--lbi-blue);
  outline-offset: 2px;
}

.lang-btn img {
  width: 34px;
  height: 22px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.lang-btn svg {
  color: #222222;
  transition: transform 0.25s ease;
}

.lang-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 170px;
  list-style: none;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  animation: fadeInMenu 0.2s ease;
}

@keyframes fadeInMenu {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #222222;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-menu li img {
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.lang-menu li:hover,
.lang-menu li[aria-selected="true"] {
  background-color: #ecf2fe;
  color: var(--lbi-blue);
}

/* ========================================================
   5. Responsive Breakpoints
   ======================================================== */

/* Laptops & Tablets Landscape (<= 1200px) */
@media (max-width: 1200px) {
  .btn {
    font-size: 26px;
    padding: 14px 30px;
  }
  h2 {
    font-size: 32px;
  }
  .panel-content {
    gap: 26px;
    padding: 20px 24px;
  }
}

/* Tablets Portrait & Small Desktops (<= 992px) */
@media (max-width: 992px) {
  .logo-img {
    height: 58px;
  }
  .btn {
    font-size: 23px;
    padding: 13px 26px;
    border-radius: 12px;
  }
  h2 {
    font-size: 28px;
  }
  .panel-content {
    gap: 22px;
  }
}

/* Mobile Screens (Vertical Stack, <= 768px) */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .split {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }

  /* Disable flex hover grow on mobile */
  .split:hover .panel,
  .split .panel:hover {
    flex: 1 0 50dvh;
  }

  .panel {
    min-height: 50dvh;
    height: 50dvh;
    flex: 1 0 50dvh;
    padding: 24px 16px;
  }

  .panel-content {
    gap: 18px;
    padding: 16px 20px;
    max-width: 460px;
  }

  .btn {
    font-size: 22px;
    padding: 12px 28px;
    border-radius: 12px;
  }

  h2 {
    font-size: 24px;
    line-height: 1.28;
  }

  .logo-img {
    height: 48px;
  }

  .lang {
    left: 16px;
    bottom: 16px;
  }

  .lang-btn {
    font-size: 16px;
    padding: 7px 12px;
    gap: 8px;
  }

  .lang-btn img {
    width: 28px;
    height: 18px;
  }
}

/* Compact Smartphones (<= 480px) */
@media (max-width: 480px) {
  .logo-img {
    height: 42px;
  }

  .panel {
    padding: 20px 14px;
  }

  .panel-content {
    gap: 14px;
    padding: 10px 14px;
  }

  .btn {
    font-size: 19px;
    padding: 10px 22px;
    border-radius: 10px;
  }

  h2 {
    font-size: 20px;
    line-height: 1.3;
  }

  .lang-btn {
    font-size: 14px;
    padding: 6px 10px;
  }

  .lang-btn img {
    width: 24px;
    height: 16px;
  }
}

/* Very Small Smartphones (<= 360px) */
@media (max-width: 360px) {
  .logo-img {
    height: 36px;
  }

  .btn {
    font-size: 17px;
    padding: 9px 18px;
  }

  h2 {
    font-size: 18px;
  }
}

/* Landscape Mobile Orientation */
@media (max-height: 520px) and (orientation: landscape) {
  .split {
    flex-direction: row;
    height: 100vh;
  }

  .panel {
    min-height: 100vh;
    height: 100vh;
  }

  .logo-img {
    height: 40px;
  }

  .panel-content {
    gap: 12px;
    padding: 10px;
  }

  .btn {
    font-size: 18px;
    padding: 8px 18px;
    border-radius: 8px;
  }

  h2 {
    font-size: 18px;
  }

  .lang {
    left: 12px;
    bottom: 12px;
  }

  .lang-btn {
    font-size: 13px;
    padding: 5px 8px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
