/* ==========================================
   KEEPOTRACK — Landing Page
   Modest, clean, dark theme matching app style
   ========================================== */

/* --- CSS Variables (matching app) --- */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 50, 0.7);
    --bg-card-hover: rgba(40, 40, 65, 0.85);
    --text-primary: #e8e8f0;
    --text-secondary: #bebecf;
    --text-muted: #8a8aa8;
    --accent-primary: #6c5ce7;
    --accent-primary-hover: #7d6ff0;
    --accent-secondary: #00cec9;
    --accent-gradient: linear-gradient(135deg, #6c5ce7, #a855f7, #ec4899);
    --border-color: rgba(255, 255, 255, 0.06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}


/* ==========================
   NAVBAR
   ========================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.nav-brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links .nav-cta {
    background: var(--accent-gradient);
    color: white !important;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.25);
}

.nav-links .nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.35);
    background: linear-gradient(135deg, #7d6ff0, #b366f8, #f05aa0);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent-primary);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}


/* ==========================
   HERO
   ========================== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    text-align: center;
}

.hero-content {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    color: var(--accent-primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    margin-bottom: 32px;
    box-shadow: 0 10px 40px rgba(108, 92, 231, 0.4);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-gradient);
    color: white !important;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.35);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.45);
}

.hero-cta svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.hero-cta:hover svg {
    transform: translateX(4px);
}


/* ==========================
   SECTIONS
   ========================== */
.section {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}


/* ==========================
   FEATURES GRID
   ========================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    margin-bottom: 18px;
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent-primary);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

/* Alternate icon colors */
.feature-card:nth-child(2) .feature-icon {
    background: rgba(0, 206, 201, 0.1);
    color: var(--accent-secondary);
}

.feature-card:nth-child(3) .feature-icon {
    background: rgba(0, 184, 148, 0.1);
    color: #00b894;
}

.feature-card:nth-child(4) .feature-icon {
    background: rgba(253, 203, 110, 0.1);
    color: #fdcb6e;
}

.feature-card:nth-child(5) .feature-icon {
    background: rgba(225, 112, 85, 0.1);
    color: #e17055;
}

.feature-card:nth-child(6) .feature-icon {
    background: rgba(162, 155, 254, 0.1);
    color: #a29bfe;
}

.feature-card:nth-child(7) .feature-icon {
    background: rgba(116, 185, 255, 0.1);
    color: #74b9ff;
}

.feature-card:nth-child(8) .feature-icon {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
}


/* ==========================
   HOW IT WORKS
   ========================== */
.how-section {
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 840px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 20px;
    position: relative;
}

.step-number {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(108, 92, 231, 0.12);
    border: 2px solid rgba(108, 92, 231, 0.3);
    color: var(--accent-primary);
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 auto 20px;
    position: relative;
}

/* Connector line between steps */
.step-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 46px;
    right: -16px;
    width: calc(100% - 72px);
    height: 2px;
    background: rgba(108, 92, 231, 0.15);
    transform: translateX(50%);
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* ==========================
   ABOUT
   ========================== */
.about-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 18px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.2);
    color: #00b894;
    font-size: 1.5rem;
    margin: 0 auto 24px;
}


/* ==========================
   FOOTER
   ========================== */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-color);
    padding: 32px 24px;
    text-align: center;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

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

.footer-links a {
    font-size: 0.82rem;
    color: var(--text-muted);
}

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


/* ==========================
   ANIMATIONS
   ========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}


/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 26, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        gap: 4px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        display: block;
        padding: 12px 16px;
        width: 100%;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: 75vh;
        padding: 100px 20px 60px;
    }

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

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

    .section {
        padding: 60px 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-card:not(:last-child)::after {
        display: none;
    }

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

    .feature-card {
        padding: 22px 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}