/* ============================================
   KeyHive Landing Page
   ============================================ */

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

:root {
    --color-bg: #0a0a1a;
    --color-bg-light: #12122a;
    --color-bg-card: #1a1a2e;
    --color-bg-card-hover: #222240;
    --color-accent: #ff6b6b;
    --color-accent-light: #ff8a8a;
    --color-accent-dark: #e55555;
    --color-accent-glow: rgba(255, 107, 107, 0.15);
    --color-text: #e4e4e7;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-success: #10b981;
    --font: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --radius-lg: 20px;
    --max-width: 1140px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-accent {
    color: var(--color-accent);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.3);
}

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

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-1px);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 0;
}

.nav.scrolled,
.nav.menu-open {
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.nav-logo svg {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

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

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

.nav-github {
    display: flex;
    align-items: center;
    color: var(--color-text-secondary);
    transition: color 0.2s;
}

.nav-github:hover {
    color: var(--color-text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    z-index: 99;
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 8px 0;
}

/* ============================================
   Hero
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--color-accent-glow), transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 40px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-visual {
    display: none;
}

.hero-lock {
    width: 120px;
    height: 120px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ============================================
   Trust Banner
   ============================================ */

.trust-banner {
    position: relative;
    z-index: 1;
    padding: 32px 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.trust-banner::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--color-bg));
    pointer-events: none;
}

.trust-items {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.trust-item svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
    flex-shrink: 0;
}

/* ============================================
   Section Titles
   ============================================ */

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    text-align: center;
    max-width: 560px;
    margin: 0 auto 56px;
}

/* ============================================
   Features
   ============================================ */

.features {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: var(--color-bg-card-hover);
    border-color: rgba(255, 107, 107, 0.2);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-accent);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

/* ============================================
   How It Works
   ============================================ */

.how-it-works {
    padding: 100px 0;
    background: var(--color-bg-light);
}

.steps {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

/* ============================================
   What If
   ============================================ */

.what-if {
    padding: 100px 0;
}

.what-if-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.what-if-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
}

.what-if-card.safe {
    border-color: rgba(16, 185, 129, 0.2);
}

.what-if-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: rgba(16, 185, 129, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.what-if-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-success);
}

.what-if-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.what-if-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

/* ============================================
   Download
   ============================================ */

.download {
    padding: 100px 0;
    background: var(--color-bg-light);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.download-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-card:hover:not(.disabled) {
    border-color: rgba(255, 107, 107, 0.2);
    transform: translateY(-4px);
}

.download-card.disabled {
    opacity: 0.5;
}

.download-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-icon svg {
    width: 40px;
    height: 40px;
    color: var(--color-text);
}

.download-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.download-card p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    min-height: 2.55em;
}

.download-card .btn {
    width: 100%;
}

.download-soon {
    display: inline-block;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border: 1px dashed var(--color-border);
    border-radius: 50px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--color-border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-brand svg {
    color: var(--color-accent);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

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

.footer-copy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
    .features-grid,
    .what-if-content,
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-inner {
        padding-top: 80px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .features-grid,
    .what-if-content,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .trust-items {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 20px;
    }

    .trust-item {
        font-size: 0.7rem;
        gap: 5px;
        white-space: nowrap;
    }

    .trust-item svg {
        width: 14px;
        height: 14px;
    }

    .trust-banner {
        padding: 16px 0;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-links {
        gap: 16px;
    }

    .features,
    .how-it-works,
    .what-if,
    .download {
        padding: 64px 0;
    }
}

/* ============================================
   Legal Pages (Terms, Privacy)
   ============================================ */

.legal-page {
    padding: 120px 0 80px;
    min-height: calc(100vh - 160px);
}

.legal-container {
    max-width: 760px;
}

.legal-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.legal-updated {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 48px;
}

.legal-container h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 12px;
    color: var(--color-text);
}

.legal-container h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--color-text);
}

.legal-container p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
    margin-bottom: 12px;
}

.legal-container ul {
    margin: 0 0 16px 24px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
}

.legal-container li {
    margin-bottom: 4px;
}

.legal-container a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-container a:hover {
    color: var(--color-accent-light);
}

.legal-container strong {
    color: var(--color-text);
    font-weight: 600;
}

/* ============================================
   Hero Canvas (Honeycomb Particles)
   ============================================ */

.hero {
    position: relative;
}

#hero-canvas,
#dust-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#hero-canvas {
    z-index: 0;
}

#dust-canvas {
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
}
