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

:root {
  --orange: #f4a54a;
  --orange-deep: #e8832a;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.6);
}

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #0b0806;
  color: var(--text);
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 440px;
  align-items: center;
  gap: 24px;
  padding: 40px 6vw;
}

.stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 25% 50%, #1c1410 0%, #0b0806 70%);
}

/* FOTO: redup saat terkunci, blur saat lampu menyala. Tepi dipudarkan agar latar putih tidak terlihat. */
.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.35) contrast(1.1);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
  transition: filter 0.8s ease;
}

.stage.on .photo {
  filter: blur(14px) brightness(0.6);
}

/* Kerucut cahaya dari kap ke bawah. */
.beam {
  position: absolute;
  left: 4%;
  top: 14%;
  width: 52%;
  height: 80%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(244, 165, 74, 0.35), rgba(244, 165, 74, 0) 85%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
  opacity: 0;
  transition: opacity 0.8s ease;
}

.stage.on .beam { opacity: 1; }


/* LAMPU */
.lamp {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(300px, 30vw);
}

.lamp svg { width: 100%; height: auto; display: block; overflow: visible; }

.shade { fill: #3a3f4c; transition: fill 0.8s ease; }
.shade-rim { fill: #2a2f3b; transition: fill 0.8s ease; }
.bulb { fill: #5a5f6b; transition: fill 0.8s ease, filter 0.8s ease; }

.stage.on .shade { fill: url(#shadeLit); }
.stage.on .shade-rim { fill: #ffd9a0; }
.stage.on .bulb { fill: #fff6e0; filter: drop-shadow(0 0 12px #ffd9a0); }

.glow {
  position: absolute;
  left: 50%;
  top: 14%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -20%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 165, 74, 0.55), transparent 70%);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.stage.on .glow { opacity: 1; }

/* Tali: turun saat ditarik lalu kembali dengan efek pegas. */
.cord-group {
  transform-origin: 222px 168px;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: grab;
}

.cord-group.pulled { transform: translateY(18px); }

.cord-hit { cursor: grab; }

.hint {
  position: absolute;
  z-index: 2;
  left: 22%;
  top: 60%;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.45);
  transition: opacity 0.6s ease;
  pointer-events: none;
}


/* FORM */
.login-panel {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 400px;
  justify-self: end;
  padding: 36px 32px;
  border-radius: 24px;
  background: rgba(60, 56, 54, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.stage.on .login-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--orange);
  margin-bottom: 10px;
}

h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }

.muted { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.field { display: block; margin-bottom: 16px; }

.field > span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 8, 6, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field input::placeholder { color: rgba(255, 255, 255, 0.3); }

.field input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 165, 74, 0.18);
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 84px; }

.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--orange);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  cursor: pointer;
}

.remember input { accent-color: var(--orange); width: 16px; height: 16px; }

.submit {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1c1c1e;
  background: linear-gradient(90deg, var(--orange), var(--orange-deep));
  box-shadow: 0 8px 24px rgba(244, 165, 74, 0.35);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(244, 165, 74, 0.45); }
.submit:disabled { opacity: 0.6; cursor: wait; }

.error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: #fca5a5;
  text-align: center;
}

/* RESPONSIF: di mobile lampu di atas dan form di bawah. */
@media (max-width: 860px) {
  body { overflow-y: auto; }
  .stage {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    padding: 32px 20px;
    justify-items: center;
  }
  .photo { position: fixed; }
  .stage::before { position: fixed; }
  .beam { top: 0; height: 60%; left: 0; width: 100%; }
  .lamp { width: 180px; }
  .hint { left: 50%; transform: translateX(-50%); top: 320px; }
  .login-panel { justify-self: center; }
}

.stage.on .hint { opacity: 0; }
