/* CSS Variables */
:root {
    --bg-color: #0b0f19;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: rgba(255, 255, 255, 0.1);
    --secondary-hover: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(59, 130, 246, 0.5);
    
    /* Contact Colors */
    --whatsapp-color: #25D366;
    --whatsapp-hover: #1EBE5D;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html, body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Strict horizontal scroll prevention */
    width: 100%;
    max-width: 100%;
    scroll-behavior: smooth;
    position: relative;
}

/* Prevent modal scrolling on body */
body.modal-open {
    overflow: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Ensure images never cause overflow */
img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Typography Fluid Scaling */
h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

h1 span {
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 10px;
}

p {
    color: var(--text-muted);
    font-size: clamp(0.8rem, 1vw, 0.85rem);
    margin-bottom: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: none;
    font-size: 0.85rem;
    min-height: 36px;
}

.btn-large {
    padding: 12px 24px;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-color);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.05);
}
.support-btn {
    padding: 8px 16px;
    border-radius: 6px;
    min-height: 36px;
}
.footer-support-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 400;
    padding: 0;
}
.footer-support-btn:hover {
    color: white;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
}
.logo img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}
.nav-link {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--text-color);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none; /* hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}
.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}
.mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg); }


/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
    z-index: 2;
    position: relative;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: #60a5fa;
    width: max-content;
}

.highlight-box {
    margin-top: -12px;
    margin-bottom: 24px;
}
.highlight-text {
    font-size: 1.2rem;
    color: #10b981;
    margin: 0;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

/* Trust Bar Integrated into Hero */
.trust-bar-integrated {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #cbd5e1;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 9/19;
}

.phone-mockup {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 40px;
    padding: 12px;
    background: #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
    animation: float 6s ease-in-out infinite;
}
.phone-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}
.phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
    display: block;
}

/* Background Glows */
.bg-glow {
    position: absolute;
    width: 40vw;
    height: 40vw;
    background: var(--glow-color);
    filter: blur(150px);
    border-radius: 50%;
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
    transition: background 1.5s ease-in-out, opacity 1.5s ease-in-out;
}
.glow-1 { top: -10%; left: -10%; background: rgba(168, 85, 247, 0.3); }
.glow-2 { bottom: 10%; right: -10%; background: rgba(59, 130, 246, 0.3); }

/* Dynamic Glow Colors per Section */
body.section-features .glow-1 { background: rgba(16, 185, 129, 0.3); }
body.section-features .glow-2 { background: rgba(59, 130, 246, 0.3); }

body.section-use-cases .glow-1 { background: rgba(245, 158, 11, 0.3); }
body.section-use-cases .glow-2 { background: rgba(168, 85, 247, 0.3); }

body.section-download .glow-1, body.section-contact .glow-1 { background: rgba(239, 68, 68, 0.3); }
body.section-download .glow-2, body.section-contact .glow-2 { background: rgba(245, 158, 11, 0.3); }

/* Common Section Layout */
section {
    padding: 40px 0;
    position: relative;
    z-index: 2;
}
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 24px;
}

/* Why WindPad */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}
.comparison-card { padding: 16px; }
.comparison-card h3 { margin-bottom: 12px; font-size: 1.1rem; text-align: center; }
.comparison-card ul { list-style: none; }
.comparison-card li { margin-bottom: 8px; font-size: 0.9rem; }
.windpad-card {
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}
.windpad-card h3 { color: #10b981; }
.competitor-card { opacity: 0.8; }

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.feature-card { padding: 16px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}
.icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { margin-bottom: 0; }

/* Compatibility */
.compat-table-wrapper {
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
}
.compat-table { width: 100%; border-collapse: collapse; min-width: 400px; }
.compat-table th, .compat-table td {
    padding: 20px 24px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}
.compat-table th { background: rgba(0,0,0,0.2); color: white; font-weight: 600; }
.compat-table tr:last-child td { border-bottom: none; }

/* Use Cases */
.cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.use-card { padding: 16px; transition: transform 0.3s; }
.use-card:hover { transform: translateY(-3px); }
.use-card h3 { margin-bottom: 8px; color: #60a5fa; font-size: 1.1rem; }

/* Screenshots */
.gallery-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    justify-items: center;
}
.gallery-img {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 9/19;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s;
}
.gallery-img:hover { transform: scale(1.03); }

/* Setup Steps */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.steps-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}
.step {
    display: flex;
    flex-direction: column;
    padding-left: 64px;
    position: relative;
}
.step-number {
    position: absolute;
    left: 0;
    top: -5px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}
.setup-note {
    max-width: 600px;
    margin: 48px auto 0;
    padding: 24px;
    border-left: 4px solid #f59e0b;
}

/* Privacy */
.privacy-content { max-width: 800px; margin: 0 auto; padding: 40px; }
.privacy-list { list-style: none; }
.privacy-list li { margin-bottom: 24px; font-size: 1.1rem; }
.privacy-list li strong { color: white; display: block; margin-bottom: 8px; }
.privacy-list ul { margin-top: 12px; padding-left: 24px; list-style-type: circle; }

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}
.faq-item { padding: 24px 32px; border-left: 4px solid var(--primary); }
.faq-item h4 { font-size: 1.1rem; margin-bottom: 8px; color: white; }

/* Downloads */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}
.download-card { padding: 40px; text-align: center; display: flex; flex-direction: column; justify-content: space-between; }
.download-card h3 { margin-bottom: 12px; }
.download-card p { margin-bottom: 24px; flex-grow: 1; }
.download-note { margin-top: 16px; font-size: 0.85rem !important; }
.download-note a { color: var(--primary); text-decoration: underline; }

/* Contact Section */
.contact-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 64px 32px;
    text-align: center;
}
.contact-box h2 { margin-bottom: 12px; }
.contact-box p { margin-bottom: 32px; }
.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.btn-whatsapp {
    background-color: var(--whatsapp-color);
    color: white;
}
.btn-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    transform: translateY(-2px);
}
.btn-call {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}
.btn-call:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}


/* Footer */
footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--glass-border);
    padding: 48px 0;
    background: rgba(0,0,0,0.3);
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
}
.footer-bottom {
    width: 100%;
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.9rem;
}
.footer-logo { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.footer-logo img { width: 30px; height: 30px; border-radius: 8px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.3s; }
.footer-links a:hover { color: white; }

/* Animations */
@keyframes float {
    0% { transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(0px); }
    50% { transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(-20px); }
    100% { transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(0px); }
}
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- SUPPORT MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.open .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px;
}
.modal-close:hover { color: white; }
.modal-content h2 { margin-bottom: 8px; font-size: 1.5rem; }
.modal-subtitle { font-size: 0.95rem; margin-bottom: 24px; }
#supportMessage {
    width: 100%;
    height: 150px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 12px;
}
#supportMessage:focus {
    outline: none;
    border-color: var(--primary);
}
.modal-error {
    color: #ef4444;
    font-size: 0.9rem;
    margin-bottom: 16px;
    min-height: 20px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}
.modal-success {
    text-align: center;
    padding: 24px 0;
}
.modal-success p { margin-bottom: 16px; color: white; }
.modal-success strong { color: #10b981; }




/* ========================================= */
/* MEDIA QUERIES (MOBILE RESPONSIVENESS)     */
/* ========================================= */

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 64px;
    }
    .hero-text { align-items: center; }
    .hero-buttons { justify-content: center; }
    .trust-bar-integrated { justify-content: center; }
    .phone-mockup {
        transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
        animation: float-mobile 6s ease-in-out infinite;
    }
    @keyframes float-mobile {
        0% { transform: translateY(0px); }
        50% { transform: translateY(-20px); }
        100% { transform: translateY(0px); }
    }
}

@media (max-width: 900px) {
    /* Mobile Nav Menu */
    .mobile-menu-btn { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 80px; /* Below navbar */
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 40px;
        transition: left 0.3s ease;
    }
    
    .nav-links.open { left: 0; }
    .nav-links .nav-link { font-size: 1.5rem; margin-bottom: 24px; }
    .support-btn { margin-top: 16px; font-size: 1.2rem; padding: 12px 32px; }
}

@media (max-width: 768px) {
    section { padding: 40px 0; }
    .hero { padding: 80px 0 30px; min-height: auto; }
    .feature-grid, .cards-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .comparison-grid, .download-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .comparison-card, .feature-card, .use-card, .download-card {
        padding: 16px;
    }
    .feature-card h3, .use-card h3 {
        font-size: 1rem;
    }
    .feature-card p, .use-card p {
        font-size: 0.85rem;
    }
    .feature-card .icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    .contact-buttons { flex-direction: column; width: 100%; }
    .contact-buttons .btn { width: 100%; }
    .footer-top { flex-direction: column; text-align: center; gap: 20px; }
    .footer-links { justify-content: center; flex-direction: row; flex-wrap: wrap; gap: 16px; }
    .footer-bottom { margin-top: 24px; padding-top: 20px; }
    
    /* Make tables responsive */
    .compat-table-wrapper { overflow-x: auto; border-radius: 8px; }
    .compat-table { min-width: 100%; }
    
    /* FAQ & Privacy */
    .faq-item { padding: 16px; }
    .privacy-content { padding: 24px; }
    
    /* Setup steps */
    .steps-container::before { left: 20px; }
    .step { padding-left: 56px; }
    .step-number { width: 40px; height: 40px; font-size: 1.2rem; top: 0; }
    
    .gallery-track { 
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gallery-img { 
        width: 100%;
        height: auto;
        border-radius: 8px;
    }
}

@media (max-width: 430px) {
    .hero h1 { font-size: 1.8rem; margin-bottom: 16px; }
    .hero h2 { font-size: 1.2rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
    .trust-bar-integrated { flex-direction: column; gap: 12px; align-items: center; }
    
    .modal-content { padding: 24px; width: 95%; }
    .modal-actions { flex-direction: column; width: 100%; }
    .modal-actions .btn { width: 100%; margin-bottom: 8px; }
}
