/*!
 * Prime Competition — halaman masuk portal siswa.
 *
 * Terang dan ceria untuk anak SD sampai SMA: langit bergradasi lembut,
 * gelembung warna dan ikon pelajaran yang melayang pelan, kartu putih
 * yang muncul dengan pantulan kecil. Formulirnya sendiri tetap tenang
 * dan besar — yang bergerak hanya hiasan di belakangnya. Semua gerak
 * berhenti bila perangkat meminta "kurangi gerakan".
 */

body.sl {
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	color: var(--ink-900);
	background: linear-gradient(160deg, #E8F3FF 0%, #FFF4E6 45%, #FFE9EF 100%);
	background-size: 200% 200%;
	animation: sl-sky 18s ease-in-out infinite;
	overflow-x: hidden;
}
@keyframes sl-sky {
	0%, 100% { background-position: 0% 0%; }
	50%      { background-position: 100% 100%; }
}

/* --- Hiasan latar ------------------------------------------------------------- */
.sl__sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }

.sl__blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(40px);
	opacity: .55;
	animation: sl-drift 16s ease-in-out infinite;
}
.sl__blob--1 { width: 340px; height: 340px; left: -110px; top: -90px;  background: #FFC8D3; }
.sl__blob--2 { width: 300px; height: 300px; right: -120px; top: 30%;   background: #BFE3FF; animation-delay: -5s; }
.sl__blob--3 { width: 280px; height: 280px; left: 20%; bottom: -140px; background: #FFE3A3; animation-delay: -10s; }
@keyframes sl-drift {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33%      { transform: translate(30px, 20px) scale(1.08); }
	66%      { transform: translate(-20px, 30px) scale(.95); }
}

.sl__float {
	position: absolute;
	display: grid;
	place-items: center;
	width: 52px; height: 52px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .75);
	box-shadow: 0 10px 24px -12px rgba(30, 41, 59, .35);
	font-size: 1.25rem;
	animation: sl-bob 6s ease-in-out infinite;
}
.sl__float--1 { left: 6%;  top: 14%; color: #B81E33; }
.sl__float--2 { right: 8%; top: 10%; color: #2E7D32; animation-delay: -1s; }
.sl__float--3 { left: 12%; bottom: 18%; color: #E08A12; animation-delay: -2s; }
.sl__float--4 { right: 12%; bottom: 14%; color: #C77700; animation-delay: -3s; }
.sl__float--5 { left: 44%; top: 4%; color: #1565C0; animation-delay: -4s; width: 44px; height: 44px; font-size: 1.05rem; }
.sl__float--6 { right: 30%; bottom: 4%; color: #6D28D9; animation-delay: -1.5s; width: 44px; height: 44px; font-size: 1.05rem; }
.sl__float--7 { left: 30%; bottom: 6%; color: #0F766E; animation-delay: -2.5s; width: 44px; height: 44px; font-size: 1.05rem; }
@keyframes sl-bob {
	0%, 100% { transform: translateY(0) rotate(-6deg); }
	50%      { transform: translateY(-16px) rotate(6deg); }
}

/* --- Isi --------------------------------------------------------------------------- */
.sl__main {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: var(--sp-6, 32px) 16px;
	box-sizing: border-box;
}

.sl__brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-2);
	margin-bottom: var(--sp-4);
	animation: sl-drop .7s cubic-bezier(.3, 1.4, .5, 1) both;
}
.sl__logo {
	height: 64px;
	width: auto;
	border-radius: 16px;
	box-shadow: 0 12px 26px -12px rgba(184, 30, 51, .55);
	animation: sl-bob-logo 4s 1s ease-in-out infinite;
}
@keyframes sl-bob-logo {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-5px); }
}
.sl__wordmark { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--ink-900); margin: 0; }
@keyframes sl-drop {
	from { opacity: 0; transform: translateY(-18px); }
	to   { opacity: 1; transform: none; }
}

.sl__card {
	width: 100%;
	max-width: 420px;
	box-sizing: border-box;
	padding: 28px 24px 22px;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: blur(6px);
	border-radius: 24px;
	box-shadow: 0 30px 60px -30px rgba(30, 41, 59, .45), 0 0 0 1px rgba(255, 255, 255, .8) inset;
	animation: sl-card .7s .1s cubic-bezier(.2, 1.2, .3, 1) both;
}
@keyframes sl-card {
	from { opacity: 0; transform: translateY(26px) scale(.96); }
	to   { opacity: 1; transform: none; }
}

.sl__hello {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 var(--sp-2);
	padding: 5px 12px 5px 6px;
	border-radius: 999px;
	background: #FFF4D6;
	color: #7A4A00;
	font-weight: 700;
	font-size: 0.8125rem;
}
.sl__wave {
	display: grid;
	place-items: center;
	width: 24px; height: 24px;
	border-radius: 50%;
	background: #FFD36B;
	color: #8A5300;
	font-size: .75rem;
	animation: sl-wiggle 2.4s 1s ease-in-out infinite;
	transform-origin: 50% 80%;
}
@keyframes sl-wiggle {
	0%, 70%, 100% { transform: rotate(0); }
	76% { transform: rotate(-14deg); }
	82% { transform: rotate(12deg); }
	88% { transform: rotate(-8deg); }
	94% { transform: rotate(4deg); }
}

.sl__title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 var(--sp-2); }
.sl__subtitle { color: var(--ink-600); font-size: .9375rem; line-height: 1.55; margin: 0; }

.sl__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-4) 0 var(--sp-2); }
.sl__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 700;
	animation: sl-pop .5s cubic-bezier(.3, 1.6, .5, 1) both;
}
.sl__chip--mtk { background: #FDE8E8; color: #9B1C1C; animation-delay: .35s; }
.sl__chip--ipa { background: #E3F4E6; color: #1F5F23; animation-delay: .45s; }
.sl__chip--ips { background: #E3EEFB; color: #0F4C92; animation-delay: .55s; }
@keyframes sl-pop {
	from { opacity: 0; transform: scale(.5); }
	to   { opacity: 1; transform: scale(1); }
}

.sl__error { margin: var(--sp-3) 0 0; animation: sl-shake .45s ease both; }
@keyframes sl-shake {
	0%, 100% { transform: none; }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(3px); }
}

.sl__card form { margin-top: var(--sp-4); }
.sl__card .field + .field { margin-top: var(--sp-4); }
.sl__card .field__label { font-weight: 700; color: var(--ink-700); }

.sl__input { position: relative; }
.sl__input > i {
	position: absolute;
	left: 14px; top: 50%;
	transform: translateY(-50%);
	color: var(--ink-400);
	pointer-events: none;
	transition: color .2s ease;
}
.sl__input .input {
	width: 100%;
	box-sizing: border-box;
	min-height: 52px;
	padding-left: 42px;
	border: 2px solid #E3E7EE;
	border-radius: 14px;
	background: #FAFBFD;
	font-size: 1rem;
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.sl__input .input:focus {
	outline: none;
	border-color: #F47C8C;
	background: #FFFFFF;
	box-shadow: 0 0 0 4px rgba(244, 124, 140, .22);
}
.sl__input:focus-within > i { color: var(--brand-600); }

.sl__input--pin .input { padding-right: 52px; }
.input--pin {
	font-variant-numeric: tabular-nums;
	letter-spacing: .35em;
	text-align: center;
	font-weight: 700;
	font-size: 1.25rem !important;
}
.input--pin::placeholder { letter-spacing: .25em; color: #C3C8D2; }

.sl__reveal {
	position: absolute;
	right: 4px; top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	background: none;
	border: 0;
	border-radius: 12px;
	color: var(--ink-400);
	cursor: pointer;
}
.sl__reveal:hover { color: var(--brand-600); background: #FFF0F2; }

.sl__btn {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 54px;
	margin-top: var(--sp-5);
	border: 0;
	border-radius: 16px;
	background: linear-gradient(135deg, #E0334D 0%, #B81E33 55%, #9D182B 100%);
	color: #FFFFFF;
	font: inherit;
	font-weight: 800;
	font-size: 1.0625rem;
	letter-spacing: .02em;
	cursor: pointer;
	box-shadow: 0 14px 26px -12px rgba(184, 30, 51, .7);
	transition: transform .15s ease, box-shadow .2s ease;
}
.sl__btn::after {
	content: "";
	position: absolute;
	top: 0; left: -60%;
	width: 40%; height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
	transform: skewX(-20deg);
	animation: sl-shine 3.2s 1.2s ease-in-out infinite;
}
@keyframes sl-shine {
	0%   { left: -60%; }
	45%, 100% { left: 130%; }
}
.sl__btn i { transition: transform .2s ease; }
.sl__btn:hover { box-shadow: 0 18px 30px -12px rgba(184, 30, 51, .8); }
.sl__btn:hover i { transform: translateX(4px); }
.sl__btn:active { transform: scale(.98); }
.sl__btn:focus-visible { outline: 3px solid #FFC8D3; outline-offset: 3px; }

.sl__foot {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: var(--sp-5) 0 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: #F3F7FC;
	color: var(--ink-600);
	font-size: .8125rem;
	line-height: 1.5;
}
.sl__foot i { color: #1D4ED8; margin-top: 2px; }
.sl__foot strong { color: var(--ink-900); }

.sl__copy { margin: var(--sp-5) 0 0; font-size: .75rem; color: var(--ink-500); }

/* Layar sempit: ikon melayang dikurangi supaya tidak menabrak kartu. */
@media (max-width: 520px) {
	.sl__float--5, .sl__float--6, .sl__float--7 { display: none; }
	.sl__float { width: 40px; height: 40px; font-size: 1rem; opacity: .8; }
	.sl__float--1 { left: 4%; top: 4%; }
	.sl__float--2 { right: 4%; top: 6%; }
	.sl__float--3 { left: 3%; bottom: 3%; }
	.sl__float--4 { right: 3%; bottom: 4%; }
	.sl__card { padding: 24px 18px 18px; border-radius: 22px; }
	.sl__title { font-size: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
	body.sl, .sl__blob, .sl__float, .sl__brand, .sl__logo, .sl__card, .sl__wave,
	.sl__chip, .sl__error, .sl__btn::after {
		animation: none !important;
	}
	.sl__btn, .sl__btn i, .sl__input .input { transition: none !important; }
}
