/*
 * =================================================================================================
 * NEXETH OPTIMIZED STYLESHEET
 * Version: 2.0
 * Description: Fully optimized for animation performance and mobile compatibility.
 * =================================================================================================
 */


/* --- 1. FONTS & ROOT VARIABLES --- */

@font-face {
    font-family: 'Aeonik';
    src: url('../fonts/Aeonik-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap; /* OPTIMIZATION: Prevents invisible text during font loading. */
}

@font-face {
    font-family: 'Aeonik';
    src: url('../fonts/Aeonik-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* OPTIMIZATION: Prevents invisible text during font loading. */
}

@font-face {
    font-family: 'Aeonik';
    src: url('../fonts/Aeonik-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap; /* OPTIMIZATION: Prevents invisible text during font loading. */
}

@font-face {
    font-family: 'Aeonik';
    src: url('../fonts/Aeonik-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap; /* OPTIMIZATION: Prevents invisible text during font loading. */
}

:root {
    --litefy-dark: #0A0A0A;
    --litefy-dark-accent: #141414;
    --litefy-light: #F0F0F0;
    --litefy-orange: #8165d7;
    --litefy-gray: #A0A0A0;
    --font-sans: 'Aeonik', sans-serif;
    --font-mono: 'Space Mono', monospace;
}


/* --- 2. BASE & RESET STYLES --- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--litefy-dark);
    color: var(--litefy-light);
    font-family: var(--font-sans);
    overflow-x: hidden;
    cursor: none; /* For custom cursor */
}

body.mobile-menu-is-active,
html.mobile-menu-is-active {
    overflow: hidden;
    position: fixed; /* Prevents background scroll when mobile menu is open */
}

.container-custom {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 640px) { .container-custom { max-width: 1023px; } }
@media (min-width: 1024px) { .container-custom { max-width: 1024px; } }
@media (min-width: 1280px) { .container-custom { max-width: 1280px; } }
@media (min-width: 1536px) { .container-custom { max-width: 1536px; } }


/* --- 3. SCROLL-REVEAL ANIMATIONS (PERFORMANCE OPTIMIZED) --- */

/*
  OPTIMIZATION:
  - 'will-change' hints the browser to prepare for animation by creating a separate compositor layer.
    This is key to preventing stuttering and achieving smooth animations on all devices.
  - We only animate 'transform' and 'opacity' as they are handled by the compositor thread
    and do not trigger expensive layout recalculations.
  - Conflicting/duplicate animation rules have been consolidated here.
*/
.animate-on-scroll,
.stagger-child {
    opacity: 0;
    will-change: transform, opacity; /* This is the performance hint */
}

.animate-on-scroll {
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1),
                transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.stagger-child {
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.19, 1, 0.22, 1),
                transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    /* Note: transition-delay is applied dynamically via JavaScript for the stagger effect */
}

.animate-on-scroll.is-visible,
.stagger-child.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- 4. UI COMPONENTS & GENERAL STYLES --- */

/* Custom Cursor (Optimized) */
.custom-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--litefy-orange);
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: exclusion;
    transition: transform 0.2s cubic-bezier(0.19, 1, 0.22, 1), background-color 0.2s ease;
}
.custom-cursor.hovered {
    transform: scale(2.8);
    background-color: var(--litefy-light);
}
.custom-cursor.text-hovered {
    /* OPTIMIZATION: Using scale transform instead of animating width/height is more performant. */
    transform: scale(0.4, 2.5);
    border-radius: 4px;
}

/* Noise Overlay & Abstract Shapes */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.025;
    pointer-events: none;
    z-index: 9997;
}
#orb-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: lighten;
    filter: blur(60px); /* Note: Heavy filter, performance handled by JS pausing. */
}
.abstract-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.04;
    filter: blur(100px); /* Note: Heavy filter, but on background elements. */
    animation: subtleShift 20s ease-in-out infinite alternate;
    pointer-events: none;
}
.shape1 { width: 500px; height: 500px; background-color: var(--litefy-orange); top: 5%; left: 0; animation-duration: 25s; }
.shape2 { width: 400px; height: 400px; background-color: var(--litefy-light); bottom: 5%; right: 0; animation-duration: 22s; animation-delay: -6s; }
.shape3 { width: 450px; height: 450px; background-color: var(--litefy-orange); top: 35%; right: 20%; opacity: 0.025; filter: blur(120px); animation-duration: 28s; animation-delay: -12s; }

/* Links and Buttons */
.kinetic-link {
    position: relative;
    display: inline-block;
    color: var(--litefy-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.2rem;
    overflow: hidden;
    transition: color 0.4s ease;
    letter-spacing: 0.025em;
}
.kinetic-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--litefy-orange);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.kinetic-link:hover {
    color: var(--litefy-orange);
}
.kinetic-link:hover::before {
    transform: scaleX(1);
}
.kinetic-cta {
    border: 1px solid var(--litefy-orange);
    color: var(--litefy-orange);
    background-color: transparent;
    padding: 0.9rem 2.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    border-radius: 4px;
}
.kinetic-cta:hover {
    background-color: var(--litefy-orange);
    color: var(--litefy-dark);
    box-shadow: 0 0 25px rgba(129, 101, 215, 0.6);
}

/* Typography & Section Styles */
.section-title {
    font-size: clamp(2.2rem, 7vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--litefy-light);
    margin-bottom: 4rem;
    letter-spacing: -0.02em;
    text-align: center;
    word-wrap: break-word; /* Prevents overflow */
}
.section-title .accent-orange {
    color: var(--litefy-orange);
}
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    position: relative;
    z-index: 5;
}
@media (min-width: 768px) {
    .section-padding {
        padding-top: 10rem;
        padding-bottom: 10rem;
    }
}
.section-bg-dark-accent { background-color: var(--litefy-dark-accent); }
.section-bg-orange { background-color: var(--litefy-orange); }


/* --- 5. LAYOUT SECTIONS --- */

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
#main-nav.scrolled {
    background-color: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}
#main-nav .nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-weight: 900; font-size: 2.5rem; color: var(--litefy-orange); letter-spacing: -0.05em; }
.nav-links-desktop { display: none; }
.nav-cta-desktop { display: none; }
.mobile-menu-button-container { display: block; }
@media (min-width: 1000px) {
    .nav-links-desktop { display: flex; align-items: center; }
    .nav-links-desktop > *:not(:last-child) { margin-right: 2.5rem; }
    .nav-cta-desktop { display: inline-block; }
    .mobile-menu-button-container { display: none; }
}

/* Mobile Menu */
#mobile-menu {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 998; /* Below nav controls */
    background-color: var(--litefy-dark);
}
#mobile-menu.mobile-menu--closed { display: none; }
#mobile-menu.mobile-menu--open { display: flex; }
#mobile-menu > *:not(:last-child) { margin-bottom: 2rem; }
#mobile-menu a.kinetic-link { font-size: 1.75rem; text-align: center; }
@media (min-width: 640px) { #mobile-menu a.kinetic-link { font-size: 2.25rem; } }
#mobile-menu .kinetic-cta { font-size: 1.25rem; padding: 0.75rem 1.5rem; margin-top: 2.5rem; }
#close-mobile-menu { position: absolute; top: 2rem; right: 2rem; z-index: 999; }

/* Header */
.header-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 6rem 1.5rem 0;
    overflow: hidden;
}
@media (min-width: 768px) { .header-main { padding-top: 0; } }
.header-content { max-width: 64rem; margin: 0 auto; position: relative; z-index: 10; }
.header-h1 {font-size: clamp(2rem, 10vw, 3rem) !important;font-weight: 800;margin-bottom: 1.5rem;}
.header-h1 .text-litefy-orange { color: var(--litefy-orange); }
.reveal-text span { display: inline-block; } /* For JS text reveal */
.header-paragraph {
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    color: var(--litefy-gray);
    margin: 0 auto 2.5rem;
    max-width: 42rem;
}
.scroll-down-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
.scroll-down-indicator svg { width: 2rem; height: 2rem; color: var(--litefy-orange); animation: bounce 2s infinite; }

/* Typewriter */
.typewriter-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    min-height: 2.8em;
    font-size: clamp(1.1rem, 2.8vw, 1.6rem);
    margin-bottom: 3rem;
}
.typewriter-prefix { color: var(--litefy-gray); margin-right: 0.6rem; white-space: nowrap; }
.typewriter-text-modern {
    font-family: var(--font-mono);
    line-height: 1.2;
    color: var(--litefy-orange);
    border-right: 2px solid var(--litefy-orange);
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    letter-spacing: 0.05em;
    vertical-align: baseline;
    animation: blinkCaretModern 0.75s step-end infinite;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    background-color: hsla(255, 56%, 68%, 0.44);
    border: 1px solid hsla(255, 56%, 68%, 0.44);
    padding: 1px;
}
.feature-item-modern {
    background-color: var(--litefy-dark);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.feature-item-modern:hover { transform: translateY(-8px); }
.feature-item-modern .feature-icon-modern { width: 36px; height: 36px; stroke-width: 1.2px; color: var(--litefy-orange); margin-bottom: 1.5rem; }
.feature-item-modern h3 { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--litefy-light); margin-bottom: 0.75rem; letter-spacing: 0.02em; }
.feature-item-modern p { color: var(--litefy-gray); font-size: 0.95rem; line-height: 1.65; }

/* How It Works / Security Sections */
.security-paragraph, .contact-paragraph {
    font-size: 1.25rem;
    color: var(--litefy-gray);
    max-width: 48rem;
    margin: 0 auto 5rem;
    text-align: center;
}
.security-grid { display: grid; gap: 2.5rem; text-align: left; }
@media (min-width: 768px) { .security-grid { grid-template-columns: repeat(2, 1fr); } }
.security-card { border: 1px solid var(--litefy-orange); padding: 2rem; border-radius: 0.5rem; transition: border-color 0.3s ease-in-out; }
.security-card:hover { border-color: hsla(255, 56%, 68%, 0.7); }
.security-card h3 { font-size: 1.5rem; font-weight: 600; color: var(--litefy-orange); margin-bottom: 0.75rem; }
.security-card p { color: var(--litefy-gray); }

.how-it-works-grid-container { max-width: 48rem; margin: 0 auto; display: grid; gap: 3rem; text-align: left; }
@media (min-width: 768px) { .how-it-works-grid-container { grid-template-columns: repeat(3, 1fr); } }
.how-it-works-item .step-number { font-size: 3.75rem; font-family: var(--font-mono); color: var(--litefy-orange); margin-bottom: 1rem; }
.how-it-works-item h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--litefy-light); }
.how-it-works-item p { color: var(--litefy-gray); }

/* Contact Section */
.contact-title {font-size: clamp(2.25rem, 7vw, 3.75rem);font-weight: 800;color: var(--litefy-dark);margin-bottom: 1.5rem;text-align: center;}
.contact-paragraph { color: rgba(10, 10, 10, 0.8); margin-bottom: 3rem; }
.contact-form { max-width: 36rem; margin: 0 auto; }
.contact-form > *:not(:last-child) { margin-bottom: 1.5rem; }
.contact-input {
    width: 100%;
    padding: 1rem;
    background-color: rgba(10, 10, 10, 0.05);
    border: 2px solid rgba(10, 10, 10, 0.2);
    border-radius: 0.375rem;
    color: var(--litefy-dark);
    font-size: 1.125rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.contact-input::placeholder { color: rgba(10, 10, 10, 0.6); }
.contact-input:focus { border-color: var(--litefy-dark); box-shadow: 0 0 0 2px rgba(10, 10, 10, 0.2); }
.contact-submit-button {
    background-color: var(--litefy-dark);
    color: var(--litefy-orange);
    font-size: 1.125rem;
    padding: 1rem 3rem;
    width: 100%;
    border: 1px solid var(--litefy-dark);
    margin: 0 auto;
    text-align: center;
    display: block;
    max-width: 300px;
}
.contact-submit-button:hover { background-color: #000; color: var(--litefy-orange); }
@media (min-width: 768px) { .contact-submit-button { width: auto; } }
#form-message { margin-top: 1.5rem; color: var(--litefy-dark); font-weight: 600; text-align: center; }

/* Footer */
.footer-main { padding: 5rem 1.5rem; background-color: #000; color: var(--litefy-gray); position: relative; z-index: 5; }
.footer-grid { display: grid; gap: 3rem; margin-bottom: 3rem; font-size: 0.875rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-logo-title { font-size: 1.875rem; font-weight: 900; color: var(--litefy-orange); margin-bottom: 1rem; letter-spacing: -0.05em; }
.footer-description { color: rgba(160, 160, 160, 0.8); }
.footer-heading { font-weight: 600; color: var(--litefy-light); margin-bottom: 1rem; font-size: 1rem; }
.footer-links-list li:not(:last-child) { margin-bottom: 0.625rem; }
.footer-links-list a { color: var(--litefy-gray); text-decoration: none; transition: color 0.2s ease; }
.footer-links-list a:hover { color: var(--litefy-orange); }
.footer-social-links { display: flex; padding-top: 0.5rem; }
.footer-social-links > *:not(:last-child) { margin-right: 1rem; }
.footer-social-links a { color: rgba(160, 160, 160, 0.7); transition: color 0.2s ease; }
.footer-social-links a:hover { color: var(--litefy-orange); }
.footer-social-links svg { width: 1.5rem; height: 1.5rem; }
.footer-copyright { border-top: 1px solid rgba(160, 160, 160, 0.1); padding-top: 2.5rem; text-align: center; font-size: 0.75rem; color: rgba(160, 160, 160, 0.6); }


/* --- 6. LOTTIE & MISC ELEMENT STYLES --- */

#logo-animation { min-width: 100px; max-width: 200px; }
#iso { display: block !important; width: 20%; justify-content: center !important; text-align: center; margin: 0 auto; }
#noise { position: absolute; right: -12%; opacity: 0.3; pointer-events: none; }
#security2 { position: absolute; right: 0; opacity: 0.3; width: 500px; top: 0; z-index: 4; pointer-events: none; }
.contact-logo { width: 100px; height: 100px; margin: 0 auto; display: block; }
.floating-effect { animation: floatAnimation 3s infinite ease-in-out; }


/* --- 7. KEYFRAME ANIMATIONS --- */

@keyframes subtleShift {
    0% { transform: translate(0, 0) rotate(0) scale(1); }
    20% { transform: translate(8px, -12px) rotate(0.5deg) scale(1.02); }
    40% { transform: translate(-10px, 10px) rotate(-0.3deg) scale(0.98); }
    60% { transform: translate(12px, 8px) rotate(0.2deg) scale(1.03); }
    80% { transform: translate(-8px, -10px) rotate(-0.4deg) scale(0.97); }
    100% { transform: translate(0, 0) rotate(0) scale(1); }
}

@keyframes blinkCaretModern {
    from, to { border-color: transparent; }
    50% { border-color: var(--litefy-orange); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

@keyframes floatAnimation {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}