/* ==========================================================================
   ASAL Aesthetic - Dynamic SaaS (Paynest style)
   ========================================================================== */

:root {
    --bg-main: #0a0914;
    /* Deep Indigo Void */
    --text-primary: #f8fafc;
    --text-muted: #8b99ac;
    --accent: #00f2fe;
    /* Electric Blue */
    --accent-hover: #a855f7;
    /* Purple */
    --border-color: rgba(168, 85, 247, 0.15);
    /* Purple tint */
    --card-bg: rgba(48, 43, 99, 0.15);
    /* Indigo tint */

    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* --- Dynamic Mesh Background --- */
body::before,
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    pointer-events: none;
    filter: blur(100px);
}

body::before {
    background: radial-gradient(circle at 50% 50%, rgba(0, 242, 254, 0.15), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.15), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(48, 43, 99, 0.3), transparent 40%);
    animation: rotateMesh 25s linear infinite;
}

body::after {
    background: radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.1), transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(0, 242, 254, 0.15), transparent 40%);
    animation: rotateMesh 35s linear infinite reverse;
}

@keyframes rotateMesh {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* --- Typography --- */
h1,
h2,
h3 {
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Navbar (Glassmorphism) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    background: rgba(5, 5, 5, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.scrolled .navbar {
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.navbar-logo-icon {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-status {
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.nav-status-icon {
    margin-left: 5px;
}

.hidden {
    display: none !important;
}

.site-footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 10;
}

.nav-links a:hover {
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-link {
    color: var(--text-muted);
    transition: color 0.2s;
}

.login-link:hover {
    color: var(--text-primary);
}

.btn-primary-small {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    color: var(--bg-main);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* --- Button Defaults --- */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #00f2fe, #8a2be2);
    color: #ffffff;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.15);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 5% 1rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
}

.hero-content {
    max-width: 800px;
    margin-bottom: 1.5rem;
    transition: transform 0.1s ease-out;
}

.headline {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #00f2fe, #ffffff);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.subtext {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.no-cc {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Video Mockup Core Visual --- */
.video-container {
    width: 100%;
    max-width: 1000px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.1) 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 255, 255, 0.05);
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

.video-mockup {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 19px;
    overflow: hidden;
    cursor: pointer;
}

.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.video-mockup:hover .video-bg {
    opacity: 0.8;
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity 0.5s ease;
}

/* Spinner State */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin-bottom: 1.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Playing State */
.play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: auto;
    margin-top: auto;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-mockup:hover .play-btn {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.25);
}

.agent-name {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.subtitles {
    position: absolute;
    bottom: 30px;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 12px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}


/* --- Motivational Quote --- */
.quote-section {
    text-align: center;
    padding: 0 5% 1rem;
    max-width: 800px;
    margin: 2.5rem auto 0;
    position: relative;
    z-index: 10;
}

.quote-section blockquote {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 600;
    font-style: italic;
    color: var(--accent);
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
    line-height: 1.4;
    letter-spacing: 1px;
}

/* --- Footer --- */
.social-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 5%;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.social-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.social-footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.social-footer .social-icons a {
    color: var(--text-muted);
    font-size: 1.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-footer .social-icons a:hover {
    color: var(--text-primary);
    transform: scale(1.3) translateY(-5px);
}

.social-footer .social-icons a::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-footer .social-icons a:hover::after {
    opacity: 1;
}

.copyright {
    color: #444;
    font-size: 0.85rem;
}

/* --- Utilities & Initial Animations --- */
.fade-up-1 {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.fade-up-2 {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.fade-up-3 {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.fade-up-4 {
    animation: fadeUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scroll Reveals managed by JS */
.reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

/* --- Floating Logo Cluster --- */
.icon-cluster {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.center-asal-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    z-index: 15;
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.5));
    animation: core-pulse 3s infinite alternate ease-in-out;
}

@keyframes core-pulse {
    0% {
        filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.4)) scale(1);
    }

    100% {
        filter: drop-shadow(0 0 35px rgba(168, 85, 247, 0.8)) scale(1.08);
    }
}

.social-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px;
    background: rgba(10, 9, 20, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    /* --x and --y define their hexagon position */
    transform: translate(var(--x), var(--y));
    animation: float-icon 4s infinite ease-in-out;
    z-index: 5;
    text-decoration: none;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.8);
    border-color: rgba(255, 255, 255, 0.8);
    z-index: 20;
    cursor: pointer;
    transform: translate(var(--x), var(--y)) scale(1.15) !important;
    animation-play-state: paused;
}

@keyframes float-icon {

    0%,
    100% {
        transform: translate(var(--x), calc(var(--y) + 0px));
    }

    50% {
        transform: translate(var(--x), calc(var(--y) - 15px));
    }
}

/* Hexagon positions + stagger delays. --x/--y were previously set via
   inline style attributes in index.html; moved here so CSP can stay strict. */
.pos-1 {
    --x: 140px;
    --y: 0px;
    animation-delay: 0s;
}

.pos-2 {
    --x: 70px;
    --y: 121px;
    animation-delay: 0.6s;
}

.pos-3 {
    --x: -70px;
    --y: 121px;
    animation-delay: 1.2s;
}

.pos-4 {
    --x: -140px;
    --y: 0px;
    animation-delay: 1.8s;
}

.pos-5 {
    --x: -70px;
    --y: -121px;
    animation-delay: 2.4s;
}

.pos-6 {
    --x: 70px;
    --y: -121px;
    animation-delay: 3.0s;
}

@media (max-width: 900px) {
    .icon-cluster {
        width: 250px;
        height: 250px;
        margin-bottom: 1rem;
        transform: scale(0.8);
    }
}