/* =========================================================
   HALAMAN LOGIN — "liquid" beranimasi
   Tetap memakai material kaca (.glass) & palet monokrom tema dasar;
   gerak hanya transform/opacity (murah untuk GPU), mati otomatis
   bila pengguna memilih "kurangi gerakan".
   ========================================================= */

body.masuk { overflow: hidden; }

/* ---------- latar: gumpalan cahaya cair ---------- */
.lq-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.lq-b {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  mix-blend-mode: screen; opacity: .55; will-change: transform;
  background: radial-gradient(circle at 50% 50%, var(--c) 0%, transparent 62%);
}
.lq-b.b1 { --c: rgba(157, 188, 255, .42); left: -12vmax; top: -14vmax; animation: lqAlir1 22s ease-in-out infinite alternate; }
.lq-b.b2 { --c: rgba(255, 255, 255, .26); right: -16vmax; top: 8vh; animation: lqAlir2 26s ease-in-out infinite alternate; }
.lq-b.b3 { --c: rgba(176, 140, 255, .26); left: 18vw; bottom: -22vmax; animation: lqAlir3 30s ease-in-out infinite alternate; }
.lq-b.b4 { --c: rgba(62, 207, 154, .18); right: 8vw; bottom: -10vmax; width: 30vmax; height: 30vmax; animation: lqAlir1 19s ease-in-out -6s infinite alternate-reverse; }
@keyframes lqAlir1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(14vw, 10vh) scale(1.18); } 100% { transform: translate(4vw, 26vh) scale(.92); } }
@keyframes lqAlir2 { 0% { transform: translate(0, 0) scale(1.1); } 50% { transform: translate(-18vw, 14vh) scale(.9); } 100% { transform: translate(-6vw, -8vh) scale(1.2); } }
@keyframes lqAlir3 { 0% { transform: translate(0, 0) scale(.95); } 50% { transform: translate(-10vw, -16vh) scale(1.15); } 100% { transform: translate(16vw, -6vh) scale(1); } }

/* gelembung kaca yang naik pelan */
.lq-bub i {
  position: absolute; bottom: -40px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .9) 0 8%, rgba(255, 255, 255, .18) 22%, rgba(255, 255, 255, .04) 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset -2px -3px 6px rgba(255, 255, 255, .12);
  animation: lqNaik var(--d) linear var(--t) infinite; will-change: transform, opacity;
}
@keyframes lqNaik {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  10% { opacity: .9; }
  50% { transform: translate(18px, -55vh) scale(1); }
  90% { opacity: .7; }
  100% { transform: translate(-14px, -112vh) scale(1.15); opacity: 0; }
}
.lq-svg { position: absolute; width: 0; height: 0; }

/* riak air saat klik/tap */
.lq-riak {
  position: fixed; z-index: 50; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7), inset 0 0 8px rgba(255, 255, 255, .35);
  animation: lqRiak .75s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes lqRiak { to { transform: scale(7); opacity: 0; } }

/* ---------- kartu ---------- */
.lq-wrap { perspective: 1400px; }
.lq-card {
  --rx: 0deg; --ry: 0deg; --mx: 30%; --my: 0%;
  width: min(920px, 100%);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  animation: lqMuncul 1.1s cubic-bezier(.2, .9, .25, 1.15) backwards;
}
@keyframes lqMuncul {
  0% { opacity: 0; transform: translateY(40px) scale(.9); filter: blur(14px); border-radius: 50%; }
  60% { opacity: 1; filter: none; border-radius: 46px; }
  100% { transform: none; }
}
/* kilau specular mengikuti kursor */
.lq-glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .16), transparent 60%);
  mix-blend-mode: soft-light; transition: background-position .2s;
}
.lq-goyang { animation: lqMuncul 1.1s cubic-bezier(.2, .9, .25, 1.15) backwards, lqGoyang .55s .9s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes lqGoyang {
  10%, 90% { translate: -2px 0; } 20%, 80% { translate: 4px 0; }
  30%, 50%, 70% { translate: -7px 0; } 40%, 60% { translate: 7px 0; }
}

/* ---------- panel kiri: lampu lava kaca ---------- */
.lq-art { position: relative; overflow: hidden; isolation: isolate; min-height: 440px; }
.lq-lava { position: absolute; inset: -10%; z-index: -1; filter: url(#lq-goo); opacity: .8; }
.lq-lava i {
  position: absolute; border-radius: 50%; will-change: transform;
  background: linear-gradient(160deg, rgba(255, 255, 255, .38), rgba(157, 188, 255, .16));
}
.lq-lava i:nth-child(1) { width: 120px; height: 120px; left: 10%; bottom: 0; animation: lqLava 13s ease-in-out infinite; }
.lq-lava i:nth-child(2) { width: 80px; height: 80px; left: 46%; bottom: -4%; animation: lqLava 11s ease-in-out -4s infinite; }
.lq-lava i:nth-child(3) { width: 150px; height: 150px; left: 58%; bottom: -16%; animation: lqLava 17s ease-in-out -9s infinite; }
.lq-lava i:nth-child(4) { width: 64px; height: 64px; left: 28%; bottom: 6%; animation: lqLava 9s ease-in-out -2s infinite; }
.lq-lava i:nth-child(5) { width: 220px; height: 120px; left: -6%; bottom: -14%; border-radius: 46%; animation: none; }
.lq-lava i:nth-child(6) { width: 260px; height: 130px; left: 44%; bottom: -16%; border-radius: 46%; animation: none; }
@keyframes lqLava {
  0%, 100% { transform: translate(0, 0) scale(1); }
  45% { transform: translate(18px, -260px) scale(.82); }
  60% { transform: translate(-10px, -300px) scale(.7); }
}

/* logo dalam tetesan yang berubah bentuk + riak */
.lq-logo { position: relative; width: 74px; height: 74px; display: grid; place-items: center; margin-bottom: 4px; }
.lq-logo::before {
  content: ""; position: absolute; inset: 0; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1) 55%, rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .6), inset 0 -6px 14px rgba(0, 0, 0, .12), 0 14px 30px -10px rgba(0, 0, 0, .5);
  animation: lqTetes 8s ease-in-out infinite;
}
@keyframes lqTetes {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; transform: rotate(0); }
  33% { border-radius: 63% 37% 45% 55% / 55% 62% 38% 45%; transform: rotate(8deg); }
  66% { border-radius: 38% 62% 52% 48% / 62% 38% 62% 38%; transform: rotate(-6deg); }
}
.lq-logo .brand-img, .lq-logo .brand-m { position: relative; margin: 0; animation: lqApung 5s ease-in-out infinite; }
@keyframes lqApung { 50% { transform: translateY(-4px) rotate(-2deg); } }
.lq-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); animation: lqCincin 3.6s ease-out infinite; }
.lq-ring.r2 { animation-delay: 1.8s; }
@keyframes lqCincin { from { transform: scale(.9); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }

.lq-art-isi { margin-top: auto; display: grid; gap: 6px; }
.auth-solo .lq-art h3 { margin: 0; font: 500 24px/1.25 var(--serif); }
.lq-type { min-height: 1.5em; font: 400 15px/1.5 var(--serif); color: rgba(255, 255, 255, .82); }
.lq-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -2px; background: currentColor; animation: lqKedip 1s steps(1) infinite; }
@keyframes lqKedip { 50% { opacity: 0; } }

.lq-jam {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lq-jam b { font: 600 22px/1 var(--mono); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.auth-solo .lq-art .lq-jam small, .auth-solo .lq-art .lq-kaki { color: var(--muted); }

/* ---------- form ---------- */
.lq-form { position: relative; z-index: 4; padding: 38px 36px; gap: 13px; }
.lq-judul { display: flex; font-size: 30px !important; }
.lq-judul span { display: inline-block; animation: lqJatuh .8s cubic-bezier(.3, 1.6, .5, 1) calc(.35s + var(--i) * .07s) backwards; }
.lq-judul .lq-tetes { color: var(--blue-l); }
@keyframes lqJatuh {
  0% { transform: translateY(-38px) scaleY(1.3); opacity: 0; }
  55% { transform: translateY(3px) scale(1.12, .82); opacity: 1; }
  100% { transform: none; }
}
.lq-form > * { animation: lqNaikIsi .7s var(--ease) backwards; }
.lq-form > :nth-child(3) { animation-delay: .5s; }
.lq-form > :nth-child(4) { animation-delay: .58s; }
.lq-form > :nth-child(5) { animation-delay: .66s; }
.lq-form > :nth-child(6) { animation-delay: .74s; }
.lq-form > :nth-child(7) { animation-delay: .82s; }
.lq-form > :nth-child(8) { animation-delay: .9s; }
.lq-form > .lq-judul { animation: none; }
@keyframes lqNaikIsi { from { opacity: 0; transform: translateY(12px); } }

.lq-in { position: relative; display: flex; align-items: center; }
.lq-in > svg { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--faint); transition: color .25s, transform .25s; pointer-events: none; }
.auth-solo .lq-fld input[type] { padding: 12px 40px 12px 36px; font-size: 13px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.auth-solo .lq-fld input:focus { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .11); box-shadow: 0 0 0 4px rgba(255, 255, 255, .07); }
.lq-in:focus-within > svg { color: var(--text); transform: scale(1.12); }
/* garis cair yang mengisi dari tengah saat fokus */
.lq-garis { position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent); transform: scaleX(0); transition: transform .45s var(--ease); }
.lq-in:focus-within .lq-garis { transform: scaleX(1); }
.lq-mata { position: absolute; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--faint); transition: color .2s, background .2s; }
.lq-mata:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.lq-mata.on { color: var(--text); }
.lq-mata.on svg { opacity: .55; }
.lq-caps { font-style: normal; font-weight: 600; color: var(--amber); animation: lqNaikIsi .3s var(--ease); }

/* tombol: gelombang cairan di dalam */
.auth-solo .lq-btn { position: relative; overflow: hidden; isolation: isolate; height: 46px; font-size: 13px; border-radius: 16px; }
.lq-btn .lq-teks { position: relative; z-index: 1; }
.lq-gel { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 7 Q15 0 30 7 T60 7 T90 7 T120 7 V14 H0Z' fill='%239dbcff' fill-opacity='.5'/%3E%3C/svg%3E") repeat-x 0 0 / 60px 10px, linear-gradient(rgba(157, 188, 255, .5), rgba(157, 188, 255, .5)) 0 9.5px / 100% 100% no-repeat;
  transform: translateY(78%); animation: lqOmbak 1.6s linear infinite; transition: transform .6s var(--ease); }
.lq-btn:hover .lq-gel { transform: translateY(46%); }
.lq-btn.isi .lq-gel { transform: translateY(-12px); transition-duration: 1.6s; }
.lq-btn.isi { pointer-events: none; }
@keyframes lqOmbak { to { background-position: 60px 0, 0 9.5px; } }

/* ---------- responsif ---------- */
@media (max-width: 1080px) {
  .lq-art { min-height: 0; padding: 24px 26px 20px; }
  .lq-art .lq-kaki { display: none; }
  .lq-lava { opacity: .6; }
}
/* HP: semuanya pas satu layar (tanpa gulir). Kartu mengisi tinggi layar,
   panel kiri jadi kepala ringkas (logo + nama sekolah + jam), form di tengah sisa ruang.
   Bila ruang tidak cukup (mis. keyboard terbuka), kartu boleh digulir di dalam. */
@media (max-width: 760px) {
  body.masuk { height: 100vh; height: 100dvh; min-height: 0; padding: 0; overflow: hidden; }
  body.masuk .auth-solo { flex: 1 1 0; min-height: 0; padding: 10px 10px 0; display: flex; align-items: stretch; overflow-y: auto; }
  body.masuk .site-foot { padding: 6px 0 8px; font-size: 9px; }
  .lq-wrap { perspective: none; }
  .lq-card { display: flex !important; flex-direction: column; min-height: 100%; border-radius: 26px; }

  /* panel atas = "hero" di tengah ruang yang tersisa: logo, nama sekolah, tagline, jam (rata tengah) */
  .lq-art {
    flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    gap: 10px; padding: 22px 18px 18px; border-radius: 26px 26px 0 0;
  }
  .lq-logo { width: 72px; height: 72px; margin: 0; }
  .lq-art-isi { margin: 0; gap: 3px; justify-items: center; }
  .auth-solo .lq-art h3 { font-size: 19px; line-height: 1.25; }
  .lq-type { font-size: 13px; min-height: 1.45em; }
  .lq-jam { justify-content: center; padding: 7px 14px; gap: 8px; border-radius: 999px; }
  .lq-jam b { font-size: 15px; }
  .lq-jam small { font-size: 10px; }
  .lq-lava { opacity: .6; inset: -4% -10% -10%; }

  .lq-form { flex: none; align-content: center; padding: 18px 18px 20px; gap: 11px; }
  .lq-judul { font-size: 26px !important; }
  .auth-solo .lq-fld input[type] { padding-top: 11px; padding-bottom: 11px; font-size: 16px; }   /* 16px: iOS tidak memperbesar halaman saat fokus */
  .auth-solo .lq-btn { height: 46px; }
  .lq-b { opacity: .4; }
}
/* HP pendek (mis. 360×640 atau keyboard terbuka): buang yang tidak penting */
@media (max-width: 760px) and (max-height: 700px) {
  /* layar sedang (mis. 360×640): hero tetap di tengah, diperkecil */
  .lq-art { gap: 8px; padding: 16px 16px 14px; }
  .lq-logo { width: 56px; height: 56px; }
  .lq-logo .brand-img.lg, .lq-logo .brand-m.lg { width: 40px; height: 40px; border-radius: 11px; }
  .auth-solo .lq-art h3 { font-size: 17px; }
  .lq-type { display: none; }
  .lq-form { padding: 14px 16px 16px; gap: 9px; }
  .lq-form .sub { font-size: 10.5px; line-height: 1.35; }
  .lq-judul { font-size: 23px !important; }
  .lq-form .tiny { display: none; }
}
@media (max-width: 760px) and (max-height: 580px) {
  /* layar pendek (mis. 320×568, keyboard terbuka): panel atas jadi satu baris ringkas */
  .lq-art { flex: none; flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 12px 14px; }
  .lq-logo { width: 44px; height: 44px; }
  .lq-logo .brand-img.lg, .lq-logo .brand-m.lg { width: 34px; height: 34px; border-radius: 10px; }
  .lq-art-isi { justify-items: start; }
  .auth-solo .lq-art h3 { font-size: 16px; }
  .lq-jam, .lq-form .sub { display: none; }
  .lq-form { flex: 1 1 auto; }
}
/* HP mendatar: dua kolom tetap, dipadatkan */
@media (min-width: 761px) and (max-height: 560px) {
  body.masuk .auth-solo { padding: 8px 12px; }
  .lq-art { min-height: 0; padding: 16px 20px; gap: 8px; }
  .lq-logo { width: 48px; height: 48px; }
  .lq-type, .lq-art .lq-kaki { display: none; }
  .lq-form { padding: 16px 24px; gap: 8px; }
  .lq-form .sub, .lq-form .tiny { display: none; }
  .lq-judul { font-size: 24px !important; }
}

/* ---------- kurangi gerakan ---------- */
@media (prefers-reduced-motion: reduce) {
  .lq-b, .lq-bub i, .lq-lava i, .lq-logo::before, .lq-logo .brand-img, .lq-logo .brand-m, .lq-ring, .lq-caret, .lq-gel,
  .lq-card, .lq-judul span, .lq-form > * { animation: none !important; }
  .lq-bub, .lq-ring { display: none; }
  .lq-card { transform: none !important; }
}
