/* ========================================
   BlankCard Landing Page - Dark Theme
   ======================================== */

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: #1e1e2a;
    
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --border-color: #2a2a3a;
    --border-hover: #3f3f5a;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

/* Gradient Text */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px 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 {
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo:hover {
    color: var(--text-primary);
}

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

.nav-links a:not(.btn) {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    order: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Phone Mockup */
.phone-mockup {
    order: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-frame {
    width: 280px;
    height: 560px;
    background: var(--bg-tertiary);
    border-radius: 40px;
    border: 4px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.2);
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 32px;
    background: var(--bg-primary);
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 36px;
    overflow: hidden;
    position: relative;
}

/* Demo Animation Container */
.demo-animation-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 20px 40px;
}

/* Demo Status Text */
.demo-status {
    position: absolute;
    top: 40px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all var(--transition-smooth);
    z-index: 15;
    animation: statusFade 0.3s ease-out;
}

@keyframes statusFade {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background Card */
.demo-card-bg {
    position: absolute;
    width: 120px;
    height: 72px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    opacity: 0.3;
    transform: scale(0.8);
}

/* Main Animated Card */
.demo-card {
    width: 120px;
    height: 72px;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Default animation for card with QR code */
.demo-card.has-qr:not(.programming) {
    animation: cardFloat 3s ease-in-out infinite;
}

.demo-card-main {
    z-index: 5;
}

/* Blank Card State (no QR code) */
.demo-card:not(.has-qr) .qr-pattern {
    opacity: 0;
    visibility: hidden;
}

.demo-card:not(.has-qr) {
    background: #ffffff;
    border-color: var(--border-color);
    animation: cardFloatSubtle 4s ease-in-out infinite;
}

/* Programming State */
.demo-card.programming {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    animation: programmingPulse 0.5s ease-in-out infinite;
}

/* Subtle float for blank card */
@keyframes cardFloatSubtle {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.02); }
}

@keyframes programmingPulse {
    0%, 100% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

/* QR Code Progressive Reveal */
.demo-card.has-qr .qr-pattern {
    opacity: 0;
    visibility: hidden;
    animation: qrReveal 1s ease-out forwards;
}

@keyframes qrReveal {
    0% {
        opacity: 0;
        visibility: hidden;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.7;
        visibility: visible;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }
}

/* Programming QR Pattern Animation */
.demo-card.programming .qr-corner,
.demo-card.programming .qr-center {
    animation: qrPatternPulse 0.3s ease-in-out infinite;
}

.demo-card.programming .qr-corner:nth-child(2),
.demo-card.programming .qr-corner:nth-child(3) {
    animation-delay: 0.1s;
}

.demo-card.programming .qr-corner:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes qrPatternPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* QR Pattern */
.qr-pattern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    width: 50px;
    height: 50px;
}

.qr-corner {
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.qr-corner-tl { border-radius: 4px 0 0 0; }
.qr-corner-tr { border-radius: 0 4px 0 0; }
.qr-corner-bl { border-radius: 0 0 0 4px; }

.qr-center {
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 2px;
    grid-column: 2;
    grid-row: 2;
}

/* Phone Overlay */
.phone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.phone-overlay.active {
    opacity: 1;
}

/* Camera View */
.camera-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.9);
}

.scan-frame {
    width: 140px;
    height: 140px;
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    top: 0;
    animation: scanLine 1.5s ease-in-out infinite;
}

@keyframes scanLine {
    0%, 100% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    50% { top: calc(100% - 3px); opacity: 1; }
    90%, 100% { top: calc(100% - 3px); opacity: 0; }
}

.scan-text {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Scan Success */
.scan-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-smooth);
}

.scan-success.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.scan-success svg {
    width: 40px;
    height: 40px;
    color: white;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: drawCheck 0.4s ease forwards 0.2s;
}

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

/* Content Reveal */
.content-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    text-align: center;
    opacity: 0;
    transition: all var(--transition-smooth);
}

.content-reveal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.reveal-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent-primary);
}

.reveal-icon svg {
    width: 32px;
    height: 32px;
}

.reveal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.reveal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Progress Indicator */
.demo-progress {
    position: absolute;
    bottom: 60px;
    display: flex;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    background: var(--border-color);
    border-radius: 50%;
    transition: all var(--transition-smooth);
}

.progress-dot.active {
    background: var(--accent-primary);
    width: 24px;
    border-radius: 4px;
}

/* Features Section */
.features {
    padding: 100px 24px;
    background: var(--bg-secondary);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Pricing Section */
.pricing {
    padding: 100px 24px;
}

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

.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    position: relative;
    transition: all var(--transition-normal);
}

.pricing-card:hover {
    border-color: var(--border-hover);
}

.pricing-card.featured {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-card h3 {
    margin-bottom: 16px;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
    text-align: left;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 600;
}

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

/* CTA Section */
.cta {
    padding: 100px 24px;
    background: var(--bg-secondary);
    text-align: center;
}

.cta h2 {
    margin-bottom: 16px;
}

.cta p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    padding: 80px 24px 40px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 280px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    padding: 8px 0;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        order: 1;
    }
    
    .phone-mockup {
        order: 2;
        margin-top: 40px;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 100px 16px 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}
