@import 'tailwindcss';

@source '../../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';

@theme {
    --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Poppins', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;

    /* Brand: hijau emerald (identitas islami modern) */
    --color-brand-50: #ecfdf5;
    --color-brand-100: #d1fae5;
    --color-brand-200: #a7f3d0;
    --color-brand-300: #6ee7b7;
    --color-brand-400: #34d399;
    --color-brand-500: #10b981;
    --color-brand-600: #059669;
    --color-brand-700: #047857;
    --color-brand-800: #065f46;
    --color-brand-900: #064e3b;
    --color-brand-950: #022c22;

    /* Aksen emas */
    --color-gold-300: #fcd34d;
    --color-gold-400: #fbbf24;
    --color-gold-500: #f59e0b;
    --color-gold-600: #d97706;

    --shadow-soft: 0 10px 30px -12px rgb(2 44 34 / 0.18);
    --shadow-lift: 0 22px 45px -18px rgb(2 44 34 / 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    text-rendering: optimizeLegibility;
}

::selection {
    background: #059669;
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #ecfdf5; }
::-webkit-scrollbar-thumb { background: linear-gradient(#059669, #047857); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #047857; }

/* ===================== ANIMASI ===================== */

@keyframes blob-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(36px, -42px) scale(1.1); }
    66% { transform: translate(-28px, 22px) scale(0.94); }
}
.animate-blob { animation: blob-drift 16s ease-in-out infinite; }
.animate-blob-slow { animation: blob-drift 24s ease-in-out infinite reverse; }

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}
.animate-float { animation: float-y 5s ease-in-out infinite; }
.animate-float-delay { animation: float-y 7s ease-in-out 1.2s infinite; }

@keyframes marquee-x {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.animate-marquee { animation: marquee-x 32s linear infinite; }
.animate-marquee:hover { animation-play-state: paused; }

@keyframes shine-sweep {
    0% { left: -80%; }
    55%, 100% { left: 130%; }
}
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 45%; height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-22deg);
    animation: shine-sweep 3.2s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes pulse-ring {
    0% { transform: scale(0.85); opacity: 0.75; }
    80%, 100% { transform: scale(1.9); opacity: 0; }
}
.pulse-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: currentColor;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    z-index: -1;
}

@keyframes spin-slow { to { transform: rotate(360deg); } }
.animate-spin-slow { animation: spin-slow 22s linear infinite; }

@keyframes pop-in {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.06); }
    100% { transform: scale(1); opacity: 1; }
}
.animate-pop-in { animation: pop-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }

@keyframes draw-stroke { to { stroke-dashoffset: 0; } }
.draw-check {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: draw-stroke 0.9s ease-out 0.35s forwards;
}
.draw-circle {
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    animation: draw-stroke 1.1s ease-out forwards;
}

@keyframes confetti-fall {
    0% { transform: translateY(-8vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(740deg); opacity: 0.15; }
}
.confetti-piece {
    position: absolute;
    top: 0;
    width: 10px; height: 16px;
    border-radius: 3px;
    animation: confetti-fall linear forwards;
}

@keyframes shake-x {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-7px); }
    40%, 80% { transform: translateX(7px); }
}
.animate-shake { animation: shake-x 0.5s ease-in-out; }

@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.animate-gradient {
    background-size: 220% 220%;
    animation: gradient-flow 8s ease infinite;
}

@keyframes fade-slide-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-slide-in { animation: fade-slide-in 0.6s ease-out both; }

@keyframes tick-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.animate-tick { animation: tick-glow 1.6s ease-in-out infinite; }

/* ===================== POLA LATAR ===================== */
.bg-dots-light {
    background-image: radial-gradient(circle at 1px 1px, rgb(2 44 34 / 0.10) 1.5px, transparent 0);
    background-size: 26px 26px;
}
.bg-dots-dark {
    background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.14) 1.5px, transparent 0);
    background-size: 26px 26px;
}

.text-gradient-gold {
    background-image: linear-gradient(92deg, #fcd34d 10%, #fbbf24 45%, #34d399 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-lift {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}
.card-lift:hover {
    transform: translateY(-9px);
    box-shadow: var(--shadow-lift);
}

/* Timeline alur pendaftaran */
.step-line::after {
    content: '';
    position: absolute;
    top: 2.4rem; left: calc(50% + 3rem);
    width: calc(100% - 6rem);
    height: 3px;
    background: repeating-linear-gradient(90deg, #a7f3d0 0 10px, transparent 10px 18px);
}

/* Formulir */
.field-input {
    @apply w-full rounded-xl border border-slate-300 bg-white px-4 py-3 text-sm text-slate-800 shadow-sm transition-all duration-300 outline-none placeholder:text-slate-400;
}
.field-input:focus {
    @apply border-brand-500 ring-4 ring-brand-500/15;
}
.field-input.has-error {
    @apply border-rose-400 ring-4 ring-rose-400/10;
}
.field-label {
    @apply mb-1.5 block text-sm font-semibold text-slate-700;
}

/* Nomor halaman pagination */
.page-link {
    @apply inline-flex h-10 min-w-10 items-center justify-center rounded-xl border border-slate-200 bg-white px-3 text-sm font-semibold text-slate-600 transition hover:border-brand-400 hover:text-brand-700;
}
.page-link.active {
    @apply border-brand-600 bg-brand-600 text-white shadow-md shadow-brand-600/30;
}

/* ===================== PRINT (bukti pendaftaran) ===================== */
@media print {
    body * { visibility: hidden !important; }
    .print-area, .print-area * { visibility: visible !important; }
    .print-area {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    .no-print { display: none !important; }
    @page { margin: 14mm; }
}

/* Kurangi gerakan bagi pengguna yang memilihnya */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
