@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

/* Color Variables */
:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #151c2c;
    --bg-tertiary: #1e293b;
    --accent: #38bdf8;
    --accent-dark: #0284c7;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    --accent-glow: rgba(56, 189, 248, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(21, 28, 44, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --accent-glow: rgba(37, 99, 235, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(15, 23, 42, 0.08);
    --shadow-color: rgba(15, 23, 42, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(15, 23, 42, 0.06);
}

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

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

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

/* Structure & Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    text-align: center;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 3rem auto;
    text-align: center;
}

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

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

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

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

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

/* Controls & Buttons */
.controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: var(--transition);
}

/* Hide sun/moon depending on class */
body.light-theme .theme-toggle-btn .sun-icon,
body:not(.light-theme) .theme-toggle-btn .moon-icon {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

/* Dynamic grid-like background mesh for premium visual interest */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: left;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-ctas {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.app-store-badge {
    display: inline-block;
    height: 48px;
    transition: var(--transition);
}

.app-store-badge img {
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.app-store-badge:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.stat-item h4 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.hero-mockup-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
    width: 100%;
}

/* Floating animation for device mockup */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.phone-frame {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 610px;
    background: #000000;
    border: 10px solid #1e293b;
    border-radius: 44px;
    box-shadow: 0 30px 60px -15px var(--shadow-color), 0 0 50px rgba(56, 189, 248, 0.15);
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
    transition: border-color 0.3s;
}

body.light-theme .phone-frame {
    border-color: #cbd5e1;
}

.dynamic-island {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background-color: #000000;
    border-radius: 20px;
    z-index: 10;
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000000;
    border-radius: 34px;
    overflow: hidden;
}

.phone-screen .screenshot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(0.96) translateY(5px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 1;
}

.phone-screen .screenshot.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 2;
}

.phone-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 30px;
    box-shadow: 0 8px 24px var(--shadow-color);
    z-index: 5;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 20px;
    transition: var(--transition);
}

.control-btn svg {
    transition: var(--transition);
}

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

.control-btn.active {
    background-color: var(--accent);
    color: #ffffff;
}

body.light-theme .control-btn.active {
    background: var(--accent-gradient);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 35px var(--accent-glow);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.feature-icon-wrapper svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

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

/* Live Demo / VIN Decoder Section */
.demo-bg {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.demo-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: stretch;
}

.demo-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.demo-info h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.demo-info .subtitle {
    text-align: left;
    margin-left: 0;
    margin-bottom: 2rem;
}

.demo-console {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: inset 0 2px 8px var(--shadow-color), 0 10px 30px var(--shadow-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 480px;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.console-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.console-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.console-status.decoding {
    background-color: #eab308;
    box-shadow: 0 0 8px #eab308;
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.vin-input-group {
    display: flex;
    gap: 12px;
}

.vin-input-group input {
    flex: 1;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition);
}

.vin-input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-decode {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0 24px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-decode:hover {
    filter: brightness(1.1);
}

.sample-vins-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sample-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sample-vins {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.sample-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background-color: var(--bg-secondary);
}

.decode-results {
    flex: 1;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Laser Scanning Line Animation */
.scanner-laser {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent), 0 0 15px var(--accent);
    animation: scan 3s ease-in-out infinite;
    display: none;
    z-index: 10;
}

@keyframes scan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.placeholder-view {
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.placeholder-view svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

.results-table {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.4s ease;
}

.results-header-block {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.results-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.results-vin {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.result-item {
    background-color: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.result-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.result-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.error-view {
    display: none;
    text-align: center;
    color: #ef4444;
    padding: 20px;
}

/* Premium Comparison Section */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 850px;
    margin: 0 auto;
    align-items: stretch;
}

.pricing-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: var(--transition);
    position: relative;
}

.pricing-card.premium-tier {
    border: 2px solid var(--accent);
    box-shadow: 0 15px 35px var(--accent-glow);
}

.pricing-card.premium-tier::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    background-color: var(--accent);
    color: #0b0f19;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pricing-header .price {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    margin: 1.5rem 0;
}

.pricing-header .price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing-features {
    list-style: none;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.pricing-features li svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pricing-features li.included svg {
    fill: #22c55e;
}

.pricing-features li.excluded svg {
    fill: #ef4444;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 60px 0 30px 0;
    color: var(--text-secondary);
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

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

.footer-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-copy {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Animations helper classes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    section {
        padding: 80px 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-badge {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-ctas {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .demo-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .demo-info h2, .demo-info .subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }
    .nav-link {
        font-size: 0.85rem;
    }
    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    
    .footer-layout {
        flex-direction: column;
        text-align: center;
    }
}

/* Coming Soon Banner & Badge Styles */
.coming-soon-badge-lg {
    position: relative;
    display: inline-block;
    height: 48px;
    vertical-align: middle;
}

.coming-soon-badge-lg img {
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.app-store-badge-coming {
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    opacity: 0.35;
    filter: grayscale(100%);
    transition: var(--transition);
}

.coming-soon-label-lg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

body.light-theme .status-badge {
    background-color: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.3);
    color: #d97706;
}

body.light-theme .coming-soon-label-lg {
    background-color: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
}
