/* 
 * Keobooks - Premium SaaS Design System
 * -------------------------------------
 */

:root {
    /* Color Palette - Premium Dark Theme */
    --bg-main: #0B0E14;
    --bg-secondary: #131722;
    --bg-card: rgba(19, 23, 34, 0.6);
    --bg-card-hover: rgba(28, 33, 47, 0.8);
    
    --text-primary: #FFFFFF;
    --text-secondary: #9BA1A6;
    
    --accent-primary: #3B82F6; /* Bright Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --accent-secondary: #10B981; /* Emerald Green */
    
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Spacing & Sizing */
    --max-width: 1200px;
    --nav-height: 80px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

ul {
    list-style: none;
}

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

/* Typography Utilities */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; }

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-weight: 500;
    transition: all var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    background-color: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

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

.btn-text {
    color: var(--text-secondary);
    font-weight: 500;
}
.btn-text:hover {
    color: #fff;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: transform var(--transition-smooth);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #60A5FA 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

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

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

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

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 101;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    transition: all var(--transition-fast);
}

.mobile-menu-btn span:nth-child(1) { top: 0; }
.mobile-menu-btn span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-menu-btn span:nth-child(3) { bottom: 0; }

/* Hero Section */
.hero {
    position: relative;
    padding-top: calc(var(--nav-height) + 6rem);
    padding-bottom: 6rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vw;
    max-width: 800px;
    max-height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(11, 14, 20, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin: 1.5rem auto 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    perspective: 1000px;
}

.dynamic-dash {
    width: 100%;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: rotateX(5deg) scale(0.95);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05) inset;
    transition: transform var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dynamic-dash:hover {
    transform: rotateX(0deg) scale(1);
}

.dash-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dash-dots {
    display: flex;
    gap: 8px;
}

.dash-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.2);
}
.dash-dots span:nth-child(1) { background-color: #ff5f56; }
.dash-dots span:nth-child(2) { background-color: #ffbd2e; }
.dash-dots span:nth-child(3) { background-color: #27c93f; }

.dash-user {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dash-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.dash-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.04);
}

.card-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.card-trend {
    font-size: 0.875rem;
    font-weight: 500;
}
.card-trend.positive { color: var(--accent-secondary); }
.card-trend.negative { color: #f87171; }

.card-chart {
    height: 50px;
    margin-top: 1.5rem;
    width: 100%;
}

.chart-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawPath 3s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.5s;
    filter: drop-shadow(0px 4px 8px rgba(59, 130, 246, 0.4));
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

.card-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    margin-top: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f87171, #ef4444);
    border-radius: 100px;
    width: 0;
    animation: fillProgress 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.8s;
}

@keyframes fillProgress {
    to { width: 45%; }
}

.dash-transactions {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1.5rem;
}

.tx-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.tx-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tx-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.02);
    transition: background var(--transition-fast), border-color var(--transition-fast);
    animation: slideInTx 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateX(-15px);
}
.tx-item:nth-child(1) { animation-delay: 1s; }
.tx-item:nth-child(2) { animation-delay: 1.2s; }
.tx-item:nth-child(3) { animation-delay: 1.4s; }

@keyframes slideInTx {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tx-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    margin-right: 1.25rem;
}

.tx-icon.receive { background: rgba(16, 185, 129, 0.15); color: var(--accent-secondary); }
.tx-icon.send { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.tx-details { flex-grow: 1; }
.tx-name { font-size: 1rem; font-weight: 500; color: var(--text-primary); }
.tx-date { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }

.tx-amount {
    font-size: 1rem;
    font-weight: 600;
}
.tx-amount.positive { color: var(--accent-secondary); }
.tx-amount.negative { color: var(--text-primary); }

@media (max-width: 768px) {
    .dash-grid { grid-template-columns: 1fr; }
}

/* Logo Cloud */
.logo-cloud {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.logo-cloud-title {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4rem;
    opacity: 0.5;
}

.logo-item {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    filter: grayscale(100%);
    transition: filter var(--transition-fast), opacity var(--transition-fast);
}

.logos:hover .logo-item {
    opacity: 0.3;
}
.logos .logo-item:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Features */
.features {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

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

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

.feature-card {
    padding: 2.5rem;
    transition: transform var(--transition-smooth), border-color var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

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

/* Pricing */
.pricing {
    padding: 8rem 0;
    background-color: var(--bg-secondary);
    position: relative;
}

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

.pricing-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-smooth);
}

.pricing-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.pricing-card.popular {
    border-color: var(--accent-primary);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.1);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--accent-primary);
    color: #fff;
    padding: 0.25rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-header h3 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin-bottom: 1rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.amount {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.period {
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.pricing-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pricing-features {
    flex-grow: 1;
    margin-bottom: 2.5rem;
}

.pricing-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.pricing-features li::before {
    content: '✓';
    color: var(--accent-secondary);
    margin-right: 0.75rem;
    font-weight: bold;
}

.pricing-btn {
    width: 100%;
    justify-content: center;
}

.pricing-card .btn-primary:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}

.pricing-card .btn-secondary:hover {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    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;
    font-size: 0.875rem;
    max-width: 250px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.slide-up-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-up-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .pricing-card.popular {
        transform: scale(1);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-auth {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding-top: 8rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .pricing-card {
        padding: 2rem;
    }
}

.logo-icon-img { height: 28px; width: auto; border-radius: 4px; }
