/* ========================================
   Zimbabwe Identity Verification Agent
   Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-secondary: #0ea5e9;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    /* Zimbabwe flag colors */
    --zw-green: #009a44;
    --zw-yellow: #ffd200;
    --zw-red: #d40000;
    --zw-black: #000000;
    
    /* Neutrals */
    --color-bg: #0a0a0f;
    --color-bg-secondary: #111118;
    --color-bg-tertiary: #1a1a24;
    --color-surface: #1e1e2e;
    --color-surface-hover: #252535;
    --color-border: #2e2e3e;
    --color-text: #f8f8f8;
    --color-text-secondary: #a0a0b0;
    --color-text-muted: #606070;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-hero: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-surface: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--color-secondary);
    bottom: -150px;
    left: -150px;
    animation-delay: -10s;
}

.gradient-orb-3 {
    width: 400px;
    height: 400px;
    background: var(--zw-green);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
    opacity: 0.2;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(-30px, -20px) scale(1.02); }
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: white;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

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

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

.nav-link-cta {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
}

.nav-link-cta:hover {
    color: white;
    box-shadow: var(--shadow-glow);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    z-index: 1;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

.badge-icon {
    font-size: 1.25rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

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

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-full {
    width: 100%;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.id-card-showcase {
    position: relative;
    width: 320px;
    height: 400px;
}

.id-card {
    position: absolute;
    width: 280px;
    height: 180px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-slow);
}

.id-card.metal-card {
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #4a4a5a 0%, #2a2a3a 50%, #3a3a4a 100%);
    transform: rotate(-8deg) translateZ(20px);
}

.id-card.metal-card:hover {
    transform: rotate(-8deg) translateZ(40px) scale(1.05);
}

.id-card.plastic-card {
    bottom: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 100%);
    transform: rotate(8deg) translateZ(40px);
}

.id-card.plastic-card:hover {
    transform: rotate(8deg) translateZ(60px) scale(1.05);
}

.id-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.card-type {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.card-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
}

.card-badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.id-card-content {
    display: flex;
    gap: var(--space-md);
}

.id-photo {
    width: 60px;
    height: 75px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

.id-details {
    flex: 1;
}

.id-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.id-line.short {
    width: 60%;
}

.id-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

.barcode {
    height: 20px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0.3) 2px,
        transparent 2px,
        transparent 4px
    );
    margin-top: var(--space-sm);
    border-radius: 2px;
}

/* Features Section */
.features {
    position: relative;
    padding: var(--space-3xl) 0;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.feature-card {
    background: var(--gradient-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
}

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

.feature-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    color: var(--color-primary-light);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-icon.highlight {
    background: var(--gradient-primary);
    color: white;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-description {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    position: relative;
    padding: var(--space-3xl) 0;
    z-index: 1;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-glow);
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.step-content p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    max-width: 150px;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.modal-body {
    padding: var(--space-xl);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* Link Result */
.link-result {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.link-result.hidden {
    display: none;
}

.result-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-success);
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.result-icon {
    width: 24px;
    height: 24px;
}

.link-box {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.link-box input {
    flex: 1;
    padding: var(--space-md);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.copy-btn {
    padding: var(--space-md);
    background: var(--color-primary);
    border-radius: var(--radius-md);
    color: white;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background: var(--color-primary-dark);
}

.copy-btn svg {
    width: 20px;
    height: 20px;
}

.share-options {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.share-options span {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.share-btn {
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
}

/* Chat Modal */
.chat-modal {
    max-width: 600px;
    height: 70vh;
    display: flex;
    flex-direction: column;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
}

.chat-message {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: var(--color-secondary);
}

.message-content {
    background: var(--color-bg-secondary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    max-width: 80%;
    line-height: 1.5;
}

.chat-message.user .message-content {
    background: var(--gradient-primary);
}

.message-content ul {
    margin-top: var(--space-sm);
    padding-left: var(--space-lg);
}

.message-content li {
    margin-bottom: var(--space-xs);
}

.chat-input {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.chat-input input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-size: 1rem;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    transition: all var(--transition-fast);
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
}

/* Footer */
.footer {
    position: relative;
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid var(--color-border);
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-3xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
}

.footer-brand p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: var(--space-3xl);
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.footer-column a {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--color-primary-light);
}

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

/* Error Page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.error-container {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    max-width: 480px;
}

.error-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    margin: 0 auto var(--space-xl);
    color: var(--color-danger);
}

.error-icon svg {
    width: 40px;
    height: 40px;
}

.error-container h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.error-code {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    margin-bottom: var(--space-xl);
}

.error-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.error-help {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.error-help h4 {
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.error-help p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner.small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.rec-dot {
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin: 0 auto var(--space-xl);
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step-connector {
        width: 2px;
        height: 30px;
        background: linear-gradient(180deg, var(--color-primary), transparent);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-xl);
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: var(--space-xl);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
