/* --- Global Styles & Fonts --- */
:root {
    --bg-dark-blue: #0a1420; /* Trustworthy deep navy */
    --glass-bg: rgba(15, 25, 40, 0.65); /* Darker, slightly blue glass */
    --glass-bg-solid: rgb(15, 25, 40); /* Solid version for wave */
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --accent-green: #2ecc71; /* "Safety" green (Emerald) */
    --accent-green-hover: #27ae60; /* Darker green for hover */
    --accent-blue: #5DADE2; /* A light, calm blue */
    --alert-red: #d9534f;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-dark-blue);
    color: var(--text-primary);
    line-height: 1.6;
}

h1, h2, h3 {
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

p {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* --- 1. Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 2rem;
    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.nav-scrolled {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-green);
}

.nav-button {
    background: var(--accent-green);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--accent-green);
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.3);
}
.nav-button:hover {
    background: var(--accent-green-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* --- Mobile Menu --- */
.menu-icon {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}
.menu-icon span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* --- 2. Parallax Background --- */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background-image: linear-gradient(rgba(10, 20, 32, 0.6), rgba(10, 20, 32, 0.6)), url('https://images.unsplash.com/photo-1589182373726-e4f647e3e1f4?auto=format&fit=crop&w=1920&q=80');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* --- 3. Scroll Container --- */
.scroll-container {
    position: relative;
    z-index: 1;
}

/* --- 4. Hero Section --- */
.hero {
    height: 100vh; /* Full screen */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}
.hero p {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    max-width: 700px;
}
#typed-text-container {
    height: 3rem; /* Give space for text to type */
}

/* --- 5. Wave Divider --- */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
    margin-top: -100px;
}
.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
}
.wave-divider .wave-fill {
    fill: var(--glass-bg-solid);
}

/* --- 6. Main Frosted Glass Pane --- */
.glass-pane {
    width: 90%;
    max-width: 950px;
    margin: 0 auto;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 1.5rem 3rem;
    position: relative;
    z-index: 1;
}
.section-content {
    padding: 4rem 0; /* More spacing */
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}
.section-content:last-of-type {
    border-bottom: none;
}

/* --- 7. NEW: "Why Critical" Section --- */
.flex-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    text-align: left;
}
.flex-text {
    flex: 1;
}
.flex-text p {
    text-align: left;
}
.flex-image {
    flex: 1;
    min-width: 300px;
}
.flex-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* --- 8. Video Demo --- */
.video-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
}
.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* --- 9. Feature & Step Lists --- */
.feature-list, .steps-list, .tech-stack {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
}
.feature-item, .step-item, .tech-item {
    flex-basis: 30%;
    min-width: 250px;
    flex-grow: 1;
    text-align: left;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.feature-item:hover, .step-item:hover, .tech-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.feature-icon {
    font-size: 2rem;
    color: var(--accent-green);
    float: left;
    margin-right: 1rem;
    margin-top: 0;
    width: 44px;
    height: 44px;
    stroke: var(--accent-green);
}
.feature-item h3 {
    margin-top: 0;
    font-size: 1.25rem;
}
.feature-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: left;
}
.step-item {
    text-align: center;
}
.step-item p {
    text-align: center;
}
.step-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 0.5rem;
}
.tech-item {
    text-align: center;
    padding: 1.5rem;
}
.tech-item p {
    font-size: 0.95rem;
    text-align: center;
}
.tech-item h3 {
    color: var(--accent-blue); /* Different accent color */
    font-size: 1.2rem;
}


/* --- 10. Telegram Mockup --- */
.telegram-mockup {
    background: #18222d;
    border-radius: 12px;
    max-width: 600px;
    margin: 2rem auto 0 auto;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.telegram-header {
    background: #212d3b;
    padding: 10px 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.telegram-header-icon { font-size: 1.5rem; margin-right: 10px; }
.telegram-header-text { display: flex; flex-direction: column; line-height: 1.2; }
.telegram-header-text span { font-size: 0.85rem; font-weight: 300; color: #aaa; }
.telegram-message { padding: 15px; font-family: 'Helvetica', sans-serif; font-size: 0.95rem; line-height: 1.5; }
.telegram-message p { margin: 0.5rem 0; font-size: 0.95rem; color: #e0e0e0; text-align: left; }
.telegram-message b { color: #ffffff; }
.telegram-message code {
    background: #101820;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    border: 1px solid #333;
}
.alert-message { border-left: 4px solid var(--alert-red); background: rgba(217, 83, 79, 0.1); }
.alert-message-hi { border-left: 4px solid var(--alert-red); background: rgba(217, 83, 79, 0.1); margin-top: 8px; }
.alert-message p:first-child, .alert-message-hi p:first-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--alert-red);
}

/* --- 11. Final CTA & Footer --- */
.final-cta {
    padding: 6rem 2rem;
    text-align: center;
    background: #070c18;
    margin-top: 4rem;
}
.final-cta h2 { font-size: 2.8rem; }
.final-cta p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

footer {
    padding: 4rem 2rem 2rem 2rem;
    background: #050810;
    color: #aaa;
    margin-top: 0;
    text-align: center; /* Center footer content */
}
.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--accent-green);
}
.footer-disclaimer {
    font-size: 0.9rem;
    max-width: 600px;
    margin: 1rem auto;
}
.footer-copyright {
    font-size: 0.8rem;
    margin-top: 2rem;
}


/* --- 12. CTA Buttons (Primary & Secondary) --- */
.cta-button {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--accent-green);
    border: 1px solid var(--accent-green);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    animation: pulse 2.5s infinite; /* Pulse animation */
}
.cta-button:hover {
    background: var(--accent-green-hover);
    border-color: var(--accent-green-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
    animation-play-state: paused; /* Pause pulse on hover */
}
.cta-button-secondary {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    margin-top: 1rem;
}
.cta-button-secondary:hover {
    background: rgba(93, 173, 226, 0.1);
    transform: translateY(-2px);
}

/* =========================================
=== 13. ANIMATION STYLES
=========================================
*/

/* --- Hero Load-in Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-anim {
    opacity: 0; /* Start hidden */
    animation: fadeInUp 0.8s ease-out forwards;
}
.hero-anim-delay1 { animation-delay: 0.3s; }
.hero-anim-delay2 { animation-delay: 0.6s; }

/* --- Hero Typing Animation --- */
#typed-text-container {
    position: relative; /* For cursor positioning */
}
#typed-text {
    /* CSS-only typing would be here, but JS controls it */
}
.cursor {
    display: inline-block;
    background: var(--accent-green);
    width: 3px;
    margin-left: 2px;
    height: 1.4rem;
    animation: blink-caret .75s step-end infinite;
    position: relative;
    top: 4px;
}
@keyframes blink-caret {
    from, to { background-color: transparent }
    50% { background-color: var(--accent-green); }
}

/* --- Button Pulse Animation --- */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* --- Scroll Down Indicator --- */
.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeIn 2s ease-out 2s forwards; /* Fades in after hero text */
    opacity: 0;
    z-index: 5;
    text-decoration: none;
}
.scroll-down-indicator span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--accent-green);
    border-right: 2px solid var(--accent-green);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(10px) rotate(45deg); }
    60% { transform: translateY(5px) rotate(45deg); }
}

/* --- Animate on Scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
=== 14. RESPONSIVE (MOBILE) STYLES
=========================================
*/
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    /* --- Mobile Nav --- */
    .nav-menu {
        display: none; /* Hide menu by default */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Position below navbar */
        left: 0;
        background: var(--glass-bg-solid); /* Solid background for mobile menu */
        padding: 1rem 0;
    }
    .nav-menu.active {
        display: flex; /* Show when active */
    }
    .nav-menu li {
        margin: 1rem 0;
        text-align: center;
    }
    .nav-button {
        width: 80%;
        margin: 0 auto;
        text-align: center;
    }
    .menu-icon {
        display: flex; /* Show hamburger */
    }
    /* Hamburger "X" animation */
    .menu-icon.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-icon.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-icon.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    /* --- End Mobile Nav --- */

    .hero { height: 90vh; }
    #typed-text-container {
        font-size: 1.2rem;
        height: 5rem; /* More height for line wrap */
    }

    .glass-pane {
        width: 95%;
        margin-top: 0;
        padding: 1rem 1.5rem;
        border-radius: 12px;
    }
    .wave-divider { margin-top: -80px; height: 80px; }
    .wave-divider svg { height: 80px; }
    .section-content { padding: 2rem 0; }

    .flex-container {
        flex-direction: column-reverse; /* Show image *after* text on mobile */
    }
    .flex-text p {
        text-align: center;
    }

    .feature-list, .steps-list, .tech-stack {
        flex-direction: column;
        gap: 1.5rem;
    }
    .feature-item, .step-item, .tech-item {
        min-width: unset;
        text-align: center;
    }
    .feature-item p, .step-item p, .tech-item p {
        text-align: center;
    }
    .feature-icon {
        float: none;
        margin: 0 0 1rem 0;
        display: inline-block; /* Center it */
    }
    .telegram-mockup { width: 100%; }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}