html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
}

/* Global typography scaling for better mobile readability/proportion. */
@media (max-width: 640px) {
    html {
        font-size: 15px;
    }

    body {
        line-height: 1.55;
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: #fff;
    box-shadow: 0 20px 30px -12px rgba(29, 78, 216, 0.45);
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.back-to-top:hover {
    box-shadow: 0 24px 36px -12px rgba(29, 78, 216, 0.55);
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.page-shell {
    min-height: 100vh;
}

.hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.hero-home {
    min-height: 34rem;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #0f172a 100%);
}

.hero-slideshow {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.04);
    animation: heroSlideFade 18s infinite;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.72) 38%, rgba(15, 23, 42, 0.48) 100%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.hero-slide:nth-child(2) {
    animation-delay: 6s;
}

.hero-slide:nth-child(3) {
    animation-delay: 12s;
}

.hero-home-panel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero-home-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

@keyframes heroSlideFade {
    0%,
    28% {
        opacity: 1;
        transform: scale(1);
    }
    33%,
    100% {
        opacity: 0;
        transform: scale(1.04);
    }
}

@media (max-width: 768px) {
    .hero-home {
        min-height: 28rem;
    }
}

.hero-detail-bg {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    position: relative;
}

.hero-detail-bg::after {
    content: '';
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" opacity="0.1"><path d="M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H5V7h2v2h10V7h2v14z"/></svg>')
        no-repeat center;
    background-size: contain;
    pointer-events: none;
}

.guide-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #1e3a8a;
    color: white;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bg-help {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.infographic-container {
    background-color: #f1f5f9;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.aspect-poster {
    aspect-ratio: 3 / 4;
}

.dashboard-frame {
    background-color: #1e293b;
    border-radius: 1.5rem;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dashboard-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
}

details summary::-webkit-details-marker {
    display: none;
}

/* =========================================================
   Dark mode overrides
   Diaktifkan dengan class `dark` pada elemen <html>.
   Karena blade views memakai class Tailwind warna hardcoded,
   override dilakukan secara global di sini.
   ========================================================= */
html.dark {
    color-scheme: dark;
}

html.dark body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* Permukaan / kartu putih -> slate gelap */
html.dark .bg-white,
html.dark .bg-gray-50,
html.dark .bg-gray-100,
html.dark .bg-slate-50,
html.dark .bg-slate-100,
html.dark .bg-blue-50,
html.dark .bg-blue-50\/50,
html.dark .bg-violet-50,
html.dark .bg-indigo-50,
html.dark .bg-emerald-50,
html.dark .bg-amber-50,
html.dark .bg-rose-50 {
    background-color: #1e293b !important;
}

html.dark .bg-gray-200,
html.dark .bg-slate-200 {
    background-color: #334155 !important;
}

/* Nav transparan/blur tetap kelihatan di dark */
html.dark .bg-white\/95,
html.dark .bg-white\/90,
html.dark .bg-white\/80 {
    background-color: rgba(15, 23, 42, 0.92) !important;
}

/* Teks gelap -> terang */
html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700,
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700,
html.dark .text-blue-900 {
    color: #e2e8f0 !important;
}

html.dark .text-gray-600,
html.dark .text-gray-500,
html.dark .text-slate-600,
html.dark .text-slate-500 {
    color: #cbd5e1 !important;
}

html.dark .text-gray-400,
html.dark .text-slate-400 {
    color: #94a3b8 !important;
}

/* Border */
html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-blue-100 {
    border-color: #334155 !important;
}

html.dark .border-gray-300,
html.dark .border-slate-300 {
    border-color: #475569 !important;
}

html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: #334155 !important;
}

/* Hover state untuk daftar/menu */
html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover,
html.dark .hover\:bg-slate-50:hover,
html.dark .hover\:bg-slate-100:hover,
html.dark .hover\:bg-blue-50:hover {
    background-color: #334155 !important;
}

/* Form */
html.dark input,
html.dark select,
html.dark textarea {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #94a3b8;
}

/* Bayangan jadi lebih dalam */
html.dark .shadow,
html.dark .shadow-sm,
html.dark .shadow-md,
html.dark .shadow-lg,
html.dark .shadow-xl {
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6) !important;
}

/* Background bantuan yang gradient putih */
html.dark .bg-help {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Container infografis */
html.dark .infographic-container {
    background-color: #1e293b;
}

/* Backdrop blur panel */
html.dark .backdrop-blur-md {
    background-color: rgba(15, 23, 42, 0.85) !important;
}

