/* ========================================
   Penny Landing Page - Developer Edition
   ======================================== */

:root {
    /* Dark theme colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: #16161f;
    
    /* Accent gradients */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a855f7;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    
    /* Text colors */
    --text-primary: #f0f0f5;
    --text-secondary: #9090a0;
    --text-muted: #606070;
    
    /* Code colors */
    --code-keyword: #c792ea;
    --code-string: #c3e88d;
    --code-function: #82aaff;
    --code-comment: #676e95;
    --code-boolean: #ff9cac;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    /* Spacing */
    --nav-height: 72px;
    --section-padding: 120px;
    
    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Noise texture overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Animated gradient background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.25rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code-inline {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.4rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-github {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.nav-github:hover {
    background: var(--bg-tertiary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + 40px) 24px 80px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.terminal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.terminal-prompt {
    color: var(--accent-primary);
}

.terminal-text {
    color: var(--text-secondary);
}

.cursor {
    width: 8px;
    height: 18px;
    background: var(--accent-primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero h1 {
    margin-bottom: 24px;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    position: relative;
    min-width: 300px;
}

.code-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.window-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-content {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-content pre {
    margin: 0;
}

.code-content .line {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.code-content .line.highlight {
    background: rgba(99, 102, 241, 0.1);
    margin: 0 -20px;
    padding: 0 20px;
}

.code-content .ln {
    color: var(--text-muted);
    user-select: none;
    width: 16px;
    text-align: right;
}

.code-content .kw { color: var(--code-keyword); }
.code-content .str { color: var(--code-string); }
.code-content .fn { color: var(--code-function); }
.code-content .cm { color: var(--code-comment); }
.code-content .bool { color: var(--code-boolean); }

/* Phone Mockup */
.phone-mockup {
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 200px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: rotate(5deg);
}

.phone-notch {
    width: 80px;
    height: 24px;
    background: var(--bg-primary);
    border-radius: 0 0 12px 12px;
    margin: 0 auto 8px;
}

.phone-screen {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 12px;
    min-height: 280px;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.85rem;
}

.app-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}

.instance-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 8px;
}

.instance-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.instance-status.online {
    background: #28c840;
    box-shadow: 0 0 8px rgba(40, 200, 64, 0.5);
}

.instance-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.instance-name {
    font-size: 0.75rem;
    font-weight: 500;
}

.instance-project {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.chat-preview {
    margin-top: 16px;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Features Section */
.features {
    padding: var(--section-padding) 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-top: 12px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-glow);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    padding: 80px 24px;
    text-align: center;
}

.cta-code {
    display: inline-block;
    padding: 32px 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: left;
}

.cta-code .kw { color: var(--code-keyword); }
.cta-code .str { color: var(--code-string); }
.cta-code .fn { color: var(--code-function); }

/* Download Section */
.download {
    padding: var(--section-padding) 24px;
    max-width: 900px;
    margin: 0 auto;
}

.setup-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.setup-step {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    transition: all 0.3s ease;
}

.setup-step:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.step-number {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.step-connector {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    color: var(--text-muted);
}

.download-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.store-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.store-button:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.store-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.store-name {
    font-size: 1rem;
    font-weight: 600;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 64px 24px 32px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 64px;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.heart {
    color: #ff5f57;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: calc(var(--nav-height) + 60px);
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-subtitle {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        width: 100%;
        max-width: 500px;
    }
    
    .phone-mockup {
        right: 10px;
        bottom: -20px;
        width: 160px;
    }
    
    .phone-screen {
        min-height: 220px;
    }
}

@media (max-width: 600px) {
    :root {
        --section-padding: 80px;
    }
    
    .nav-links a:not(.nav-github) {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .terminal-badge {
        font-size: 0.75rem;
    }
    
    .code-window {
        display: none;
    }
    
    .phone-mockup {
        position: relative;
        right: auto;
        bottom: auto;
        transform: none;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .phone-screen {
        min-height: 320px;
    }
    
    .cta-code {
        padding: 24px;
        font-size: 0.9rem;
    }
    
    .setup-step {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .step-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    .store-button {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}
