/* Halaman masuk PIBOHUB. Dimuat setelah hub.css dan motion.css. */
.lg-body { background: var(--bg); overflow-x: hidden; }
.lg { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }

/* ---------- Sisi kiri: hero ---------- */
.lg-hero {
  position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: 56px clamp(32px, 6vw, 84px) 150px;
  background: linear-gradient(135deg, #07431f, #0f6b32 35%, #1fa64a 70%, #4cbf63);
  background-size: 180% 180%; animation: lgShift 16s ease-in-out infinite alternate;
}
@keyframes lgShift { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }

.orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb.o1 { width: 340px; height: 340px; right: -110px; bottom: -110px; background: radial-gradient(circle at 30% 30%, #ffa04d, #f47b20 60%); opacity: .95; animation: lgFloat 11s ease-in-out infinite alternate; }
.orb.o2 { width: 190px; height: 190px; left: -60px; top: 12%; background: radial-gradient(circle at 30% 30%, #ffe08a, #ffc72c 70%); opacity: .35; animation: lgFloat 14s ease-in-out infinite alternate-reverse; }
.orb.o3 { width: 120px; height: 120px; right: 16%; top: 9%; background: radial-gradient(circle at 30% 30%, #ffffff, #bff0c9 70%); opacity: .22; animation: lgFloat 9s ease-in-out infinite alternate; }
@keyframes lgFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(-18px, -26px) scale(1.06); } }

/* Tetesan susu naik pelan */
.drop { position: absolute; bottom: -30px; width: 16px; height: 16px; background: rgba(255, 255, 255, .55); border-radius: 50% 0 50% 50%; transform: rotate(-45deg); pointer-events: none; animation: lgRise linear infinite; opacity: 0; }
.drop.d1 { left: 12%; animation-duration: 13s; }
.drop.d2 { left: 28%; width: 11px; height: 11px; animation-duration: 17s; animation-delay: 3s; }
.drop.d3 { left: 46%; width: 20px; height: 20px; animation-duration: 15s; animation-delay: 6s; }
.drop.d4 { left: 63%; width: 12px; height: 12px; animation-duration: 19s; animation-delay: 1s; }
.drop.d5 { left: 80%; animation-duration: 14s; animation-delay: 8s; }
@keyframes lgRise { 0% { transform: translateY(0) rotate(-45deg); opacity: 0; } 10% { opacity: .8; } 85% { opacity: .5; } 100% { transform: translateY(-105vh) rotate(-45deg); opacity: 0; } }

.lg-hero-inner { position: relative; z-index: 2; max-width: 560px; }
.lg-logo { background: #fff; border-radius: 26px; padding: 12px; width: 178px; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); text-align: center; color: var(--grn-d); font-weight: 700; font-size: 22px; animation: rise .8s var(--ease) both; transition: transform .4s var(--ease); }
.lg-logo:hover { transform: rotate(-2deg) scale(1.03); }
.lg-logo img { width: 100%; display: block; }
.lg-logo .fallback { display: none; padding: 40px 0; }
.lg-logo.no-logo img { display: none; }
.lg-logo.no-logo .fallback { display: block; }
.lg-kicker { margin: 30px 0 10px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--yel); font-weight: 700; animation: rise .8s .1s var(--ease) both; }
.lg-tagline { font-size: clamp(28px, 3.5vw, 54px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin: 0; animation: rise .9s .2s var(--ease) both; text-shadow: 0 4px 24px rgba(0, 0, 0, .15); }
.lg-tagline em { font-style: normal; color: var(--yel); position: relative; white-space: nowrap; }
.lg-tagline em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 8px; border-radius: 8px; background: var(--pri); opacity: .9; transform-origin: left; animation: lgUnder 1.1s .9s var(--ease) both; }
@keyframes lgUnder { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Pita nama departemen */
.lg-marquee { position: absolute; left: 0; right: 0; bottom: 62px; z-index: 2; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.lg-marquee .track { display: flex; gap: 10px; width: max-content; animation: lgMarq 38s linear infinite; }
.lg-marquee span { flex: none; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: .06em; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(4px); }
@keyframes lgMarq { to { transform: translateX(-50%); } }
.lg-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 110px; z-index: 1; fill: rgba(255, 248, 238, .16); }

/* ---------- Sisi kanan: formulir ---------- */
.lg-form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 24px; background: radial-gradient(circle at 80% 8%, #ffeccf 0, transparent 40%), radial-gradient(circle at 5% 95%, #e3f5e7 0, transparent 38%), var(--bg); }
.lg-card { width: 100%; max-width: 410px; background: #fff; border-radius: 26px; padding: 36px 34px 28px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(120, 70, 10, .14), 0 2px 6px rgba(120, 70, 10, .06); animation: rise .7s .15s var(--ease) both; position: relative; }
.lg-card::before { content: ""; position: absolute; left: 34px; right: 34px; top: 0; height: 4px; border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--grn), var(--yel), var(--pri)); }
.lg-card-logo { display: none; }
.lg-card h2 { font-size: 26px; color: var(--grn-d); margin: 0 0 4px; }
.lg-sub { margin: 0 0 22px; color: var(--mut); }

.lg-field { position: relative; display: block; margin-bottom: 14px; }
.lg-field input { width: 100%; height: 54px; padding: 18px 44px 0 44px; border: 1.5px solid var(--field); border-radius: 14px; background: #fff; color: var(--ink); font-size: 15px; transition: border-color var(--t-fast), box-shadow var(--t-mid) var(--ease), background var(--t-fast); }
.lg-field input:hover { border-color: #cdbf9f; }
.lg-field input:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 4px rgba(244, 123, 32, .16); }
.lg-field .lbl { position: absolute; left: 44px; top: 16px; color: var(--mut); pointer-events: none; transition: transform var(--t-mid) var(--ease), font-size var(--t-mid) var(--ease), color var(--t-fast); transform-origin: left; }
.lg-field input:focus + .lbl, .lg-field input:not(:placeholder-shown) + .lbl { transform: translateY(-11px); font-size: 11.5px; font-weight: 700; color: var(--pri-d); }
.lg-field .lead { position: absolute; left: 15px; top: 17px; width: 20px; height: 20px; color: #b3a78f; transition: color var(--t-fast), transform var(--t-mid) var(--ease); }
.lg-field input:focus ~ .lead { color: var(--pri); transform: scale(1.1); }
.lg-field .eye { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: #9a8f78; display: grid; place-items: center; transition: background var(--t-fast), color var(--t-fast); }
.lg-field .eye:hover { background: #fff3e3; color: var(--pri-d); }
.lg-field .eye.on { color: var(--grn); }

.lg-caps { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #9a5b00; background: #fff4de; border-radius: 10px; padding: 0 10px; max-height: 0; opacity: 0; overflow: hidden; margin: 0; transition: max-height var(--t-mid) var(--ease), opacity var(--t-mid), padding var(--t-mid), margin var(--t-mid); }
.lg-caps .ico { width: 15px; height: 15px; }
.lg-caps.show { max-height: 40px; opacity: 1; padding: 7px 10px; margin: -4px 0 10px; }

.lg-submit { width: 100%; height: 52px; justify-content: center; font-size: 16px; border-radius: 14px; margin-top: 6px; background: linear-gradient(135deg, #ff9a42, var(--pri) 55%, var(--pri-d)); box-shadow: 0 10px 22px rgba(244, 123, 32, .32); }
.lg-submit:hover { box-shadow: 0 14px 28px rgba(244, 123, 32, .42); }
.lg-submit .go { transform: rotate(180deg); transition: transform var(--t-mid) var(--ease); }
.lg-submit:hover .go { transform: rotate(180deg) translateX(-4px); }

.lg-foot { margin: 22px 0 0; text-align: center; font-size: 13px; color: var(--mut); }
.link { background: none; border: 0; padding: 0; color: var(--pri-d); font-weight: 700; cursor: pointer; border-radius: 4px; }
.link:hover { text-decoration: underline; }
.lg-copy { margin: 20px 0 0; font-size: 12px; color: #a39a86; }

/* ---------- Chat bantuan ---------- */
.help { position: fixed; right: 22px; bottom: 22px; z-index: 60; }
.help-fab { width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--grn), var(--grn-d)); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px rgba(15, 107, 50, .45); transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid); position: relative; }
.help-fab:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 16px 34px rgba(15, 107, 50, .5); }
.help-fab::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--grn); animation: lgPing 2.6s ease-out infinite; }
.help.open .help-fab::after { display: none; }
@keyframes lgPing { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }
.help-fab .ico { width: 26px; height: 26px; grid-area: 1 / 1; transition: transform var(--t-mid) var(--ease), opacity var(--t-fast); }
.help-fab .shut { opacity: 0; transform: rotate(-90deg) scale(.5); }
.help.open .help-fab .open { opacity: 0; transform: rotate(90deg) scale(.5); }
.help.open .help-fab .shut { opacity: 1; transform: none; }

.help-panel { position: absolute; right: 0; bottom: 74px; width: min(360px, calc(100vw - 32px)); background: #fff; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(40, 30, 10, .28); overflow: hidden; transform-origin: bottom right; animation: lgPanel .32s var(--ease) both; }
.help-panel[hidden] { display: none; }
@keyframes lgPanel { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
.help-panel header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, var(--grn-d), var(--grn)); }
.help-panel header .av { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--grn-d); display: grid; place-items: center; font-weight: 800; font-size: 14px; position: relative; }
.help-panel header .av::after { content: ""; position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; background: #3be06a; border: 2px solid #fff; border-radius: 50%; }
.help-panel header b { display: block; }
.help-panel header small { opacity: .85; }
.help-log { padding: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; background: #fffaf2; scroll-behavior: smooth; }
.bub { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; animation: rise .3s var(--ease) both; overflow-wrap: anywhere; }
.bub.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.bub.me { background: var(--pri); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.bub a { color: var(--pri-d); font-weight: 700; }
.help-form { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
.help-form .row { display: flex; gap: 8px; align-items: flex-end; }
.help-form textarea { resize: none; min-height: 48px; }
.help-form .btn { height: 48px; width: 48px; padding: 0; justify-content: center; flex: none; border-radius: 12px; }
.help-form small { font-size: 11.5px; }

/* ---------- Layar kecil ---------- */
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; }
  .lg-hero { padding: 30px 24px 74px; min-height: 0; flex-direction: row; align-items: center; }
  .lg-hero-inner { display: flex; align-items: center; gap: 16px; max-width: none; }
  .lg-logo { width: 84px; padding: 6px; border-radius: 18px; flex: none; }
  .lg-kicker { display: none; }
  .lg-tagline, .lg-points { display: none; }
  .lg-marquee, .orb.o3, .drop.d3, .drop.d4 { display: none; }
  .lg-wave { height: 60px; }
  .orb.o1 { width: 200px; height: 200px; right: -80px; bottom: -90px; }
  .lg-form { padding: 0 16px 28px; margin-top: -40px; position: relative; z-index: 3; background: transparent; }
  .lg-card { padding: 30px 22px 24px; }
}
@media (max-width: 380px) { .lg-tagline { font-size: 22px; } }

/* Wordmark PIBOHUB pada hero */
.lg-brand { margin-top: 26px; animation: rise .8s .05s var(--ease) both; }
.lg-brand b { display: block; font-size: clamp(34px, 4vw, 52px); letter-spacing: .32em; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .2); }
.lg-brand span { display: block; margin-top: 8px; font-size: 12.5px; letter-spacing: .06em; opacity: .88; }
@media (max-width: 760px) { .lg-brand { margin-top: 12px; } .lg-brand b { font-size: 26px; } .lg-brand span { font-size: 11px; } }

/* Poin keunggulan di bawah tagline */
.lg-points { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; animation: rise .9s .35s var(--ease) both; }
.lg-points li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .24); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lg-points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yel); box-shadow: 0 0 0 3px rgba(255, 199, 44, .25); }

/* Kartu masuk: area sentuh nyaman dan aman untuk notch */
.lg-body { padding-bottom: env(safe-area-inset-bottom); }
@media (max-width: 900px) {
  .lg-hero { padding: calc(26px + env(safe-area-inset-top)) 22px 78px; }
  .lg-brand { margin-top: 0; }
  .lg-brand b { font-size: 24px; letter-spacing: .22em; }
  .lg-brand span { font-size: 11px; letter-spacing: .04em; }
  .lg-card { box-shadow: 0 18px 44px rgba(60, 40, 10, .2); }
  .lg-field input { font-size: 16px; }
  .help { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .help-fab { width: 54px; height: 54px; }
}
/* HP: hero ringkas di atas, kartu langsung di bawahnya (tanpa ruang kosong) */
@media (max-width: 900px) {
  .lg { grid-template-rows: auto 1fr; min-height: 100dvh; }
  .lg-hero { justify-content: flex-start; min-height: 0; }
  .lg-hero-inner { width: 100%; }
  .lg-form { justify-content: flex-start; }
}
@media (max-width: 900px) { .lg-hero-inner .lg-points, .lg-hero-inner .lg-tagline { display: none; } }
