/* ==================== RESET & BASE ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Light Mode — matches the app */
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --fg: #0a0e1a;
    --fg-secondary: #64748b;
    --fg-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.1);
    --primary-glow: rgba(59, 130, 246, 0.25);
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 10px 40px rgba(0,0,0,0.08);
    --gradient-start: #3b82f6;
    --gradient-end: #8b5cf6;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --nav-border: rgba(226, 232, 240, 0.8);
    --code-bg: #f1f5f9;
    --shield-color: rgba(59, 130, 246, 0.15);
    --preview-bg: #0f172a;
    --preview-sidebar: #1e293b;
    --preview-text: #cbd5e1;
    --preview-active: #3b82f6;
}

html.dark {
    /* Dark Mode — matches the app */
    --bg: #080c19;
    --bg-secondary: #0f1629;
    --bg-card: #111827;
    --fg: #f1f5f9;
    --fg-secondary: #94a3b8;
    --fg-muted: #64748b;
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: rgba(96, 165, 250, 0.1);
    --primary-glow: rgba(96, 165, 250, 0.2);
    --border: #1e293b;
    --border-light: #1e293b;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
    --card-shadow-hover: 0 10px 40px rgba(0,0,0,0.4);
    --gradient-start: #60a5fa;
    --gradient-end: #a78bfa;
    --nav-bg: rgba(8, 12, 25, 0.85);
    --nav-border: rgba(30, 41, 59, 0.8);
    --code-bg: #1e293b;
    --shield-color: rgba(96, 165, 250, 0.12);
    --preview-bg: #060a15;
    --preview-sidebar: #0f172a;
    --preview-text: #94a3b8;
    --preview-active: #60a5fa;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ==================== UTILITIES ==================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section { padding: 120px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.section-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--fg-secondary);
    line-height: 1.7;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-outline {
    background: transparent;
    color: var(--fg);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.btn-ghost {
    background: transparent;
    color: var(--fg);
}
.btn-ghost:hover { color: var(--primary); }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nav-border);
    transition: all 0.3s ease;
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--fg);
    font-weight: 700;
    font-size: 1.2rem;
}
.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border-radius: 10px;
}
.nav-links {
    display: flex;
    gap: 8px;
}
.nav-links a {
    text-decoration: none;
    color: var(--fg-secondary);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}
.nav-links a:hover { color: var(--fg); background: var(--primary-light); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    color: var(--fg-secondary);
    transition: all 0.2s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
html.dark .icon-sun { display: block; }
html.dark .icon-moon { display: none; }
html:not(.dark) .icon-sun { display: none; }
html:not(.dark) .icon-moon { display: block; }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--fg);
    border-radius: 2px;
    transition: 0.3s;
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    padding: 160px 0 80px;
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
}
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 100%);
    pointer-events: none;
}
.hero-container {
    position: relative;
    text-align: center;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    margin-bottom: 32px;
    border: 1px solid var(--primary-glow);
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--fg-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 56px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}
.stat { text-align: center; }
.stat-number { display: block; font-size: 1.4rem; font-weight: 800; color: var(--fg); }
.stat-label { font-size: 13px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ==================== APP PREVIEW ==================== */
.hero-visual {
    position: relative;
    margin-top: 80px;
    display: flex;
    justify-content: center;
    z-index: 1;
}
.app-preview {
    width: 100%;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}
.app-preview-header {
    background: #1e293b;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.window-dots { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }
.app-preview-title { color: #94a3b8; font-size: 13px; font-weight: 500; }

.app-preview-body {
    display: flex;
    background: var(--preview-bg);
    min-height: 340px;
}
.preview-sidebar {
    width: 180px;
    background: var(--preview-sidebar);
    padding: 16px 12px;
    border-right: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.preview-nav-item {
    padding: 10px 14px;
    color: var(--preview-text);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: 0.2s;
}
.preview-nav-item.active {
    background: var(--preview-active);
    color: #fff;
}
.preview-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 14px 16px;
    border-radius: 10px;
    transition: 0.2s;
}
.preview-item:hover { background: rgba(255,255,255,0.06); }
.preview-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}
.pi-login { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.pi-card { background: linear-gradient(135deg, #f59e0b, #d97706); }
.pi-server { background: linear-gradient(135deg, #10b981, #059669); }
.pi-wifi { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.pi-note { background: linear-gradient(135deg, #ef4444, #dc2626); }
.preview-item-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pi-title { color: #f1f5f9; font-size: 14px; font-weight: 600; }
.pi-sub { color: #64748b; font-size: 12px; }
.preview-item-dots { color: #475569; font-weight: 700; letter-spacing: 2px; }

/* ==================== FEATURES GRID ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.3s;
}
.feature-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
    border-color: var(--primary-glow);
}
.feature-card:hover::before { opacity: 1; }
.feature-card-large { grid-column: span 1; }

.feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
    color: #fff;
}
.fi-vault { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.fi-key { background: linear-gradient(135deg, #f59e0b, #d97706); }
.fi-sync { background: linear-gradient(135deg, #10b981, #059669); }
.fi-server { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.fi-wifi { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.fi-fields { background: linear-gradient(135deg, #ef4444, #dc2626); }

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.feature-card p {
    color: var(--fg-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* ==================== SECURITY ==================== */
.security { background: var(--bg-secondary); }
.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.security-text .section-title { text-align: left; }
.security-text .section-subtitle { text-align: left; margin-bottom: 32px; }
.security-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.security-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 15px;
    color: var(--fg-secondary);
    line-height: 1.6;
}
.security-list li strong { color: var(--fg); }
.check-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    margin-top: 2px;
}

/* Shield Animation */
.security-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}
.shield-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shield-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--shield-color);
    animation: pulse 4s ease-in-out infinite;
}
.shield-ring-1 { width: 200px; height: 200px; animation-delay: 0s; }
.shield-ring-2 { width: 260px; height: 260px; animation-delay: 0.8s; }
.shield-ring-3 { width: 300px; height: 300px; animation-delay: 1.6s; }
.shield-core {
    position: relative;
    z-index: 1;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 8px 30px var(--primary-glow);
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* ==================== PLATFORMS ==================== */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.3s ease;
}
.platform-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}
.platform-card-featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-glow), var(--card-shadow);
    position: relative;
}
.platform-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 16px;
    margin: 0 auto 20px;
}
.platform-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.platform-card p { color: var(--fg-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.platform-tech {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 14px;
    border-radius: 100px;
}

/* ==================== PRICING ==================== */
.pricing { background: var(--bg-secondary); }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    transition: all 0.3s ease;
}
.pricing-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-4px); }
.pricing-card-pro {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-glow), var(--card-shadow);
}
.pricing-pro-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 20px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pricing-label { font-size: 15px; font-weight: 600; color: var(--fg-secondary); }
.pricing-amount {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin: 8px 0 12px;
}
.pricing-currency { font-size: 1.5rem; font-weight: 700; color: var(--fg); }
.pricing-value { font-size: 3.5rem; font-weight: 900; color: var(--fg); line-height: 1; }
.pricing-period { font-size: 14px; color: var(--fg-muted); margin-left: 4px; }
.pricing-desc { color: var(--fg-secondary); font-size: 14px; margin-bottom: 24px; }
.pricing-features {
    list-style: none;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pricing-features li {
    font-size: 14px;
    color: var(--fg-secondary);
    padding-left: 24px;
    position: relative;
}
.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* ==================== CTA ==================== */
.cta { padding: 80px 0 120px; }
.cta-card {
    position: relative;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 24px;
    padding: 80px 48px;
    text-align: center;
    overflow: hidden;
}
.cta-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}
.cta-card h2 {
    position: relative;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
}
.cta-card p {
    position: relative;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    max-width: 540px;
    margin: 0 auto 32px;
    line-height: 1.7;
}
.cta-actions { position: relative; }
.cta .btn-primary {
    background: #fff;
    color: var(--gradient-start);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.cta .btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ==================== FOOTER ==================== */
.footer {
    border-top: 1px solid var(--border);
    padding-top: 64px;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 48px;
}
.footer-brand { max-width: 280px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: var(--fg-muted); font-size: 14px; line-height: 1.7; }
.footer-links { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg); margin-bottom: 4px; }
.footer-col a { text-decoration: none; color: var(--fg-muted); font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-bottom p { font-size: 13px; color: var(--fg-muted); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-actions .btn { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-stats { gap: 24px; }
    .stat-number { font-size: 1.1rem; }
    .stat-divider { height: 30px; }
    .features-grid { grid-template-columns: 1fr; }
    .security-grid { grid-template-columns: 1fr; gap: 40px; }
    .security-text .section-title,
    .security-text .section-subtitle { text-align: center; }
    .security-visual { order: -1; }
    .platforms-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .preview-sidebar { width: 120px; }
    .preview-sidebar .preview-nav-item { font-size: 11px; padding: 8px 10px; }
    .pi-title { font-size: 12px; }
    .pi-sub { font-size: 10px; }
    .footer-container { flex-direction: column; }
    .footer-links { gap: 32px; flex-wrap: wrap; }
    .cta-card { padding: 48px 24px; }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-badge, .hero-title, .hero-subtitle, .hero-actions, .hero-stats {
    animation: fadeInUp 0.8s ease forwards;
}
.hero-title { animation-delay: 0.1s; }
.hero-subtitle { animation-delay: 0.2s; }
.hero-actions { animation-delay: 0.3s; }
.hero-stats { animation-delay: 0.4s; }
.hero-visual { animation: fadeInUp 1s ease 0.5s forwards; opacity: 0; }
