:root {
    /* Colors - Matching SafeWave App */
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;

    /* Brand Colors */
    --primary-color: #4845E4;
    /* SafeWave Indigo */
    --primary-hover: #3733cc;
    --primary-light: #EEF2FF;

    --accent-color: #7c3aed;

    --border-color: #e2e8f0;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4845E4 0%, #7c3aed 100%);

    /* Fonts */
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-padding: 2.5rem;
    /* Increased from 2rem */
    --section-spacing: 8rem;
    /* Increased from 6rem to prevent cutoff */
    --header-height: 90px;

    /* Effects */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 1rem;
    --transition-speed: 0.3s;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --primary-light: rgba(72, 69, 228, 0.2);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .feature-card:hover,
[data-theme="dark"] .pricing-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.dark-mode-toggle {
    background: var(--primary-light);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
    margin-left: 1rem;
}

.dark-mode-toggle:hover {
    transform: rotate(15deg);
    background: var(--primary-color);
    color: white;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-spacing) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-white {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.btn-glow {
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.bg-white {
    background-color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(72, 69, 228, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(72, 69, 228, 0.3);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-white {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.full-width {
    width: 100%;
}

/* Cards */
.feature-card,
.testimonial-card,
.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: all var(--transition-speed);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover,
.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

/* Navbar */
.navbar {
    position: absolute;
    /* Changed from fixed to absolute for transparency */
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: transparent;
    /* Transparent by default */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
}

/* .navbar.scrolled .logo,
.navbar.scrolled .nav-links a {
} */

/* Ensure logo text is readable on blue background initially */
.navbar:not(.scrolled) .logo {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar:not(.scrolled) .nav-links a {
    color: rgba(255, 255, 255, 0.9);
}

.navbar:not(.scrolled) .nav-links a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn) {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:not(.btn):hover {
    color: var(--primary-color);
}

.mobile-toggle {
    display: none;
    color: var(--text-primary);
}

/* Hero Section - The "Login Style" */
.hero {
    background-color: var(--primary-color);
    /* Subtle mesh gradient for depth */
    background-image: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    color: white;
    padding-top: calc(var(--header-height) + 6rem);
    padding-bottom: 2rem;
    /* Waves handle bottom spacing */
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    /* Taller hero */
    display: flex;
    flex-direction: column;
}

/* Map Background Pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle Abstract Map/Grid Pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 5;
    /* Boosted z-index to be safely above overlays */
    flex-grow: 1;
    padding-bottom: 220px;
}

.hero-content {
    max-width: 600px;
    position: relative;
    /* Ensure it respects Z-Index */
    z-index: 10;
    /* Force textual content to the front */
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}



.hero-mockup {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 1rem;
    transform: rotate(2deg);
    transition: transform 0.5s ease;
}

.hero-mockup:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Moving Waves */
.waves-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    min-height: 100px;
    max-height: 150px;
    z-index: 1;
}

.wave {
    width: 100%;
    height: 100%;
}

.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* Wave Colors & Dark Mode Fix */
.wave-layer {
    transition: fill 0.3s ease;
}

/* Light Mode Defaults (White w/ Alpha) already in HTML */
.wave-4 {
    fill: var(--bg-color);
}

/* Main bottom wave matches bg */

/* Dark Mode Colors */
[data-theme="dark"] .wave-1 {
    fill: rgba(15, 23, 42, 0.7);
}

[data-theme="dark"] .wave-2 {
    fill: rgba(15, 23, 42, 0.5);
}

[data-theme="dark"] .wave-3 {
    fill: rgba(15, 23, 42, 0.3);
}

[data-theme="dark"] .wave-4 {
    fill: #0f172a;
}

/* Matches dark bg */


/* Alarm Pulse Animation */
.alarm-dot {
    animation: alarm-blink 2s infinite;
    transform-origin: center;
}

.alarm-pulse-ring {
    animation: alarm-expand 2s infinite;
    transform-origin: center;
}

@keyframes alarm-blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@keyframes alarm-expand {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.icon-box {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary-light);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
}

/* Testimonials / Community */
.testimonials {
    background-color: white;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    border: none;
    background: var(--bg-color);
}

.quote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    border: 2px solid var(--primary-color);
    position: relative;
    transform: scale(1.05);
    z-index: 10;
}

.popular-tag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.features-list {
    margin: 2rem 0;
    text-align: left;
    flex-grow: 1;
}

.features-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.features-list li i {
    color: var(--primary-color);
    width: 18px;
    height: 18px;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.2s;
}

.faq-item[open] summary:after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* CTA */
.cta-box {
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    padding: 5rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.cta-box p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    background: white;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    color: var(--text-secondary);
}

.social-icons a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-bottom: 8rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-mockup {
        max-width: 500px;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: 0;
        overflow: hidden;
        background: white;
        flex-direction: column;
        padding-top: 0;
        transition: height 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        height: calc(100vh - var(--header-height));
        padding-top: 2rem;
    }

    .mobile-toggle {
        display: block;
        color: var(--text-primary);
        /* Ensure button is visible */
    }

    /* Force dark color for mobile menu items */
    .nav-links.active a {
        color: var(--text-primary) !important;
        font-size: 1.25rem;
        margin: 1rem 0;
    }

    .logo {
        z-index: 1100;
        /* Ensure logo is above menu if needed */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 2rem;
    width: 90%;
    max-width: 550px;
    /* Increased from 400px */
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .logo {
    font-size: 1.25rem;
}

.close-btn {
    font-size: 1.5rem;
    color: var(--text-secondary);
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-body {
    padding: 2rem 1.5rem 3rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.modal-body h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 2rem;
    /* Increased from 1.5rem */
    font-weight: 800;
    /* Bolder */
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.modal-subtext {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 1.5rem !important;
}