/* =========================================
   LOKUADS — style.css
   Modernized: fonts, animations, mobile nav,
   scroll effects, fixed layout bugs
   ========================================= */

/* --- CSS Custom Properties --- */
:root {
    --bg:          #07040f;
    --bg-card:     #100d1a;
    --bg-card2:    #0e0b17;
    --border:      rgba(157, 78, 221, 0.18);
    --border-dim:  rgba(255,255,255,0.06);
    --purple:      #9d4edd;
    --purple-dim:  #7b2cbf;
    --purple-glow: rgba(157, 78, 221, 0.25);
    --text:        #f0eaf8;
    --text-muted:  #8b8399;
    --text-dim:    #c4b8d8;
    --radius:      14px;
    --radius-lg:   22px;
    --nav-h:       80px;
    --ease:        cubic-bezier(0.22, 1, 0.36, 1);
    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
}

/* --- Base Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

/* --- Utility --- */
.highlight {
    color: var(--purple);
}

/* --- Fade-up Animation --- */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--nav-h);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(7, 4, 15, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-color: var(--border-dim);
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}

.logo-bracket {
    color: var(--purple);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s ease;
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--purple);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

/* Buttons */
.btn-primary {
    background: var(--purple-dim);
    color: #fff;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--purple);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--purple-glow);
}

.btn-ghost {
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s ease;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 2px;
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--purple);
}

/* --- Hamburger --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.25s;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.25s ease, width 0.25s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger:hover { border-color: var(--purple); }

/* --- Nav Overlay --- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 4, 15, 0.7);
    backdrop-filter: blur(4px);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.visible {
    opacity: 1;
}

/* =========================================
   HERO
   ========================================= */
.hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    padding: calc(var(--nav-h) + 4rem) 5% 5rem;
    min-height: 100svh;
    overflow: hidden;
}

/* Noise texture overlay */
.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Background glow */
.hero-bg-glow {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 55vw;
    height: 55vw;
    max-width: 700px;
    max-height: 700px;
    background: radial-gradient(ellipse at center, rgba(157, 78, 221, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: glow-pulse 8s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    from { opacity: 0.7; transform: scale(1); }
    to   { opacity: 1;   transform: scale(1.08); }
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(157, 78, 221, 0.12);
    border: 1px solid var(--border);
    color: var(--purple);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1.8rem;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 1.4rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 420px;
    line-height: 1.7;
}

.hero-cta-group {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    flex-wrap: wrap;
}

.hero-cta-group .btn-primary {
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
}

/* --- Hero Visuals --- */
.hero-visuals {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.mockup-card {
    position: relative;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-card2));
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    transition: transform 0.4s var(--ease), box-shadow 0.4s ease, border-color 0.3s ease;
}

.card-top {
    transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}

.card-bottom {
    transform: perspective(1200px) rotateY(-4deg) rotateX(1deg);
    margin-left: 1.5rem;
}

.mockup-card:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
    box-shadow: 0 20px 50px rgba(157, 78, 221, 0.2);
    border-color: var(--border);
}

.card-tag {
    color: var(--purple);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.mockup-card h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.mockup-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-glow {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.card-glow--secondary {
    background: radial-gradient(circle, rgba(100, 60, 200, 0.2) 0%, transparent 70%);
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.services-section {
    padding: 6rem 5%;
    position: relative;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: var(--border-dim);
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    color: var(--purple);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}

.service-card:hover {
    border-color: var(--border);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(157, 78, 221, 0.1);
}

.service-card .icon {
    font-size: 1.8rem;
    background: rgba(157, 78, 221, 0.1);
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    line-height: 1;
    transition: background 0.3s ease;
}

.service-card:hover .icon {
    background: rgba(157, 78, 221, 0.2);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* =========================================
   CTA SECTION
   ========================================= */
.cta-section {
    padding: 2rem 5% 6rem;
}

.cta-box {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-box:hover {
    border-color: var(--border);
}

.cta-message {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.icon-large {
    font-size: 2.5rem;
    background: rgba(157, 78, 221, 0.15);
    padding: 1.3rem;
    border-radius: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.cta-message h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.cta-contact {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.cta-contact p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.cta-contact a {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.25s ease;
}

.cta-contact a:hover {
    color: var(--purple);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    border-top: 1px solid var(--border-dim);
    padding: 3rem 5%;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 0.4rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-dim);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 968px) {
    /* Show hamburger, hide nav links + cta in header */
    .hamburger {
        display: flex;
    }

    .navbar .btn-primary {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(280px, 80vw);
        height: 100svh;
        background: rgba(10, 7, 18, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-dim);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 4rem 2.5rem;
        gap: 2rem;
        z-index: 99;
        transition: right 0.4s var(--ease);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-overlay {
        display: block;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    /* Hero stacks */
    .hero {
        flex-direction: column;
        padding-top: calc(var(--nav-h) + 2.5rem);
        padding-bottom: 4rem;
        min-height: unset;
        gap: 3rem;
    }

    .hero-content h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    .subtitle {
        max-width: 100%;
    }

    .hero-visuals {
        max-width: 100%;
        width: 100%;
    }

    .card-top,
    .card-bottom {
        transform: none;
    }

    .card-bottom {
        margin-left: 0;
    }

    /* CTA stacks */
    .cta-box {
        flex-direction: column;
        text-align: center;
        padding: 2.5rem;
    }

    .cta-message {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 520px) {
    .hero-cta-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .badge {
        font-size: 0.72rem;
    }
}
