/* =====================================================================================================
   Loading "air mengisi NAMA PERUSAHAAN" (dipakai Login & semua halaman Site.Master; markup dibuat js/mit-loading.js).
   2026-11-22 (diminta user): menggantikan logo MIT. Lapisan nama:
     .mit-nama-dasar = huruf bergaris tipis (kosong)    .mit-nama-isi = huruf terisi gelombang air biru yang naik-turun
     .mit-nama-kilau = sapuan cahaya melintas           .mit-garis    = garis progres tipis di bawah nama
   Ketiga lapisan berisi teks yang SAMA dan bertumpuk persis (position absolute inset 0), jadi pembungkusan baris selalu sama.
   ===================================================================================================== */
.mit-loading {
    position: fixed; inset: 0; z-index: 20000; display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 20px; padding: 24px; background: radial-gradient(ellipse at center, rgba(13, 42, 84, .78) 0%, rgba(4, 14, 32, .86) 70%);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mit-loading.aktif { display: flex; animation: mitFadeIn .25s ease-out; }
@keyframes mitFadeIn { from { opacity: 0; } to { opacity: 1; } }

.mit-nama {
    position: relative; display: block; max-width: min(92vw, 960px); text-align: center;
    font-family: 'Public Sans', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--mit-ukuran, 44px); font-weight: 800; letter-spacing: .08em; line-height: 1.18;
    overflow-wrap: anywhere; user-select: none;
}
.mit-loading.aktif .mit-nama { animation: mitMasuk .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes mitMasuk {
    from { opacity: 0; transform: translateY(10px) scale(.97); letter-spacing: .2em; filter: blur(6px); }
    to   { opacity: 1; transform: none; letter-spacing: .08em; filter: blur(0); }
}

.mit-nama-dasar { display: block; color: rgba(144, 202, 249, .10); -webkit-text-stroke: 1px rgba(144, 202, 249, .55); }

.mit-nama-isi, .mit-nama-kilau {
    position: absolute; inset: 0; display: block; color: transparent;
    -webkit-background-clip: text; background-clip: text; pointer-events: none;
}
/* Air: gambar gelombang 2x tinggi kotak; background-position-y 0% = kosong (gelombang di dasar), 100% = penuh */
.mit-nama-isi {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 200' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0.5' stop-color='%2381d4fa'/%3E%3Cstop offset='0.72' stop-color='%232196f3'/%3E%3Cstop offset='1' stop-color='%230d47a1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 100 Q30 88 60 100 T120 100 T180 100 T240 100 V200 H0 Z' fill='url(%23g)'/%3E%3C/svg%3E");
    background-repeat: repeat-x; background-size: 240px 200%; background-position: 0 0;
    animation: mitIsiNaik 3.2s ease-in-out infinite, mitIsiOmbak 1.8s linear infinite;
    filter: drop-shadow(0 0 14px rgba(64, 156, 255, .45));
}
@keyframes mitIsiNaik {
    0%   { background-position-y: 8%; }
    55%  { background-position-y: 100%; }
    80%  { background-position-y: 100%; }
    100% { background-position-y: 8%; }
}
@keyframes mitIsiOmbak { from { background-position-x: 0; } to { background-position-x: 240px; } }

/* Kilau melintas */
.mit-nama-kilau {
    background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .85) 50%, transparent 62%);
    background-size: 260% 100%; background-repeat: no-repeat; mix-blend-mode: screen;
    animation: mitKilau 2.8s ease-in-out infinite;
}
@keyframes mitKilau { 0% { background-position: 120% 0; } 60%, 100% { background-position: -20% 0; } }

/* Garis progres */
.mit-garis { position: relative; width: min(260px, 60vw); height: 3px; border-radius: 3px; overflow: hidden; background: rgba(144, 202, 249, .18); }
.mit-garis span {
    position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: 3px;
    background: linear-gradient(90deg, transparent, #4fc3f7, #e3f2fd, #4fc3f7, transparent);
    animation: mitGaris 1.4s ease-in-out infinite;
}
@keyframes mitGaris { from { transform: translateX(-110%); } to { transform: translateX(270%); } }

.mit-loading-teks { color: #e3f2fd; font-size: 15px; letter-spacing: .5px; text-align: center; font-family: inherit; }
.mit-loading-teks small { display: block; margin-top: 4px; color: #90caf9; font-size: 12px; }
.mit-titik::after { content: ''; animation: mitTitik 1.2s steps(4) infinite; }
@keyframes mitTitik { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

@media (prefers-reduced-motion: reduce) {
    .mit-loading.aktif .mit-nama, .mit-nama-isi, .mit-nama-kilau, .mit-garis span { animation: none; }
    .mit-nama-isi { background-position: 0 70%; }
    .mit-nama-kilau { display: none; }
}
