/* XplicMe — Design System & Styles */

:root {
    /* Brand Colors - Sophisticated Amber */
    --primary: #FFB700;
    --primary-dark: #D49000;
    --primary-soft: #FFF4D6;
    --primary-glass: rgba(255, 183, 0, 0.15);

    /* Accent - Deep Teal */
    --accent: #0D6B5E;
    --accent-light: #1F847A;

    /* Neutrals - High Contrast & Clean */
    --canvas: #FAFAFA;
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 255, 255, 0.7);
    --ink: #111111;
    --ink-secondary: #374151; /* Darker gray for better contrast */
    --ink-tertiary: #9CA3AF;
    --border: rgba(0, 0, 0, 0.06);

    /* Feedback */
    --success: #059669;
    --danger: #DC2626;

    /* Spacing System */
    --space-xs: 0.25rem;  /* 4px */
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;   /* 24px */
    --space-xl: 2rem;     /* 32px */
    --space-2xl: 3rem;    /* 48px */
    --space-3xl: 5rem;    /* 80px */

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 50px rgba(255, 183, 0, 0.25);
    
    --blur-md: 12px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #0A0A0A;
        --surface: #171717;
        --surface-glass: rgba(23, 23, 23, 0.7);
        --ink: #FFFFFF;
        --ink-secondary: #D1D5DB; /* Lighter gray for better contrast in dark mode */
        --ink-tertiary: #52525B;
        --border: rgba(255, 255, 255, 0.08);
        --primary-glass: rgba(255, 183, 0, 0.1);
    }
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    color: var(--ink-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
}

.text-gradient {
    background: linear-gradient(135deg, var(--ink) 30%, var(--ink-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

section {
    padding: var(--space-3xl) 0;
    position: relative;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) 0;
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ink);
}

.nav-cta {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #111; /* Always dark text on yellow */
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 183, 0, 0.3);
}

.btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--ink-tertiary);
    background: var(--canvas);
    transform: translateY(-1px);
}

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

/* Background mesh gradient effect */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--primary-glass) 0%, transparent 60%);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

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

.hero-content {
    max-width: 600px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-glass);
    color: var(--primary-dark);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(255, 183, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
    .badge { color: var(--primary); }
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    margin-bottom: var(--space-xl);
    font-size: 1.25rem;
    color: var(--ink-secondary);
    font-weight: 500;
}

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

/* CSS-only App Mockup */
.mockup-container {
    position: relative;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.app-card {
    width: 300px;
    max-width: 100%;
    height: 600px;
    background: var(--surface);
    border-radius: 40px;
    border: 8px solid #222;
    position: relative;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.2), 0 30px 60px -30px rgba(0,0,0,0.3);
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.app-card:hover {
    transform: rotateY(0) rotateX(0);
}

/* Dynamic Prototype Styles */
.app-interface {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--canvas);
    color: var(--ink);
    font-size: 14px;
}

.app-nav {
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 12px;
}

.app-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-icon {
    font-size: 20px;
    background: var(--primary-glass);
    padding: 6px;
    border-radius: 8px;
}

.doc-name {
    display: block;
    font-weight: 700;
    font-size: 12px;
}

.doc-status {
    font-size: 10px;
    color: var(--success);
}

.app-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.proto-card {
    background: var(--surface);
    padding: 12px;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.proto-summary { animation-delay: 0.8s; }
.proto-risk    { animation-delay: 1.6s; }
.proto-action  { animation-delay: 2.4s; }
.proto-points  { animation-delay: 3.2s; }

.proto-badge {
    font-size: 9px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.proto-badge.risk { color: var(--danger); }
.proto-badge.action { color: var(--success); }
.proto-badge.points { color: #2563EB; } /* Blue for key points */

.p-line {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-bottom: 6px;
}
.p-line.w-70 { width: 70%; }

.risk-item, .action-item, .points-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}

.risk-dot { width: 6px; height: 6px; background: var(--danger); border-radius: 50%; flex-shrink: 0; }
.action-check { width: 6px; height: 6px; background: var(--success); border-radius: 50%; flex-shrink: 0; }

.proto-chat {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeInUp 0.5s ease 4.0s forwards;
    opacity: 0;
}

.chat-bubble {
    align-self: flex-end;
    background: var(--primary);
    color: #000;
    padding: 8px 12px;
    border-radius: 14px 14px 2px 14px;
    font-size: 11px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-response {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
    padding: 8px 12px;
    border-radius: 2px 14px 14px 14px;
    font-size: 11px;
    line-height: 1.4;
    max-width: 90%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.response-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary); /* Cursor */
    animation: typing-text 2s steps(40, end) 4.5s forwards, blink-caret 0.75s step-end infinite;
    width: 0; /* Start hidden */
}

@keyframes typing-text {
    from { width: 0; }
    to { width: 100%; border-color: transparent; white-space: normal; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary); }
}

/* Features Grid */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

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

.feature-card {
    background: var(--surface);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

/* Updated Feature Visuals (Mini Mockups) */
.feature-visual {
    height: 140px;
    background: var(--canvas);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

/* Visual 1: Summary - Stacked cards transforming */
.v-summary .stack-card {
    position: absolute;
    width: 140px;
    height: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 6px;
}

.v-summary .line { height: 4px; background: var(--border); border-radius: 2px; }
.v-summary .line:nth-child(1) { width: 40%; background: var(--ink-tertiary); }

.feature-card:hover .v-summary .stack-card:nth-child(1) { transform: translateY(-5px) scale(0.95); opacity: 0.7; }
.feature-card:hover .v-summary .stack-card:nth-child(2) { transform: translateY(0); }

/* Visual 2: Risk - Pulsing Alert */
.v-risk .alert-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    color: #991B1B;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.1);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Visual 3: Actions - Checklist */
.v-actions .checklist { display: flex; flex-direction: column; gap: 8px; width: 160px; }
.v-actions .check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--ink-secondary);
    background: var(--surface);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.v-actions .check-box {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.feature-card:hover .v-actions .check-item:nth-child(1) .check-box {
    background: var(--success); border-color: var(--success);
}
.feature-card:hover .v-actions .check-item:nth-child(1) .check-box::after {
    content: '✓';
}
.feature-card:hover .v-actions .check-item:nth-child(1) { text-decoration: line-through; opacity: 0.7; }


/* Visual 4: Chat - Bubbles */
.v-chat .bubble {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 11px;
    max-width: 80%;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.v-chat .b1 { align-self: flex-end; background: var(--primary); color: #000; margin-left: auto; border-bottom-right-radius: 2px; }
.v-chat .b2 { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 2px; }

.feature-card:hover .v-chat .b1 { opacity: 1; transform: translateY(0); }
.feature-card:hover .v-chat .b2 { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.v-chat { width: 80%; display: flex; flex-direction: column; }


/* Visual 5: Import - Files */
.v-import .file-icon {
    width: 40px;
    height: 50px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    position: absolute;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.v-import .f1 { transform: rotate(-10deg) translateX(-20px); z-index: 1; }
.v-import .f2 { transform: rotate(5deg) translateX(10px); z-index: 2; }
.feature-card:hover .v-import .f1 { transform: rotate(-15deg) translateX(-30px); }
.feature-card:hover .v-import .f2 { transform: rotate(10deg) translateX(20px); }


/* Visual 6: Privacy - Shield */
.v-privacy .shield {
    font-size: 48px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.feature-card:hover .v-privacy .shield { transform: scale(1.2); }


.feature-card h3 {
    margin-bottom: var(--space-sm);
}

/* Steps Section */
.steps-section {
    background: var(--canvas);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
    position: relative;
}

/* Connector Line */
.steps-container::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step-card {
    position: relative;
    z-index: 1;
    text-align: center;
    background: var(--canvas); /* hide line behind text */
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--surface);
    border: 2px solid var(--primary);
    color: var(--ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-md);
}

/* Privacy */
/* Privacy */
.privacy-wrapper {
    background: #111111;
    color: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.privacy-wrapper h2 { color: #FFFFFF; }
.privacy-wrapper p { color: rgba(255, 255, 255, 0.7); }

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    text-align: left;
}

.privacy-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.privacy-item span {
    color: #FFFFFF;
    font-size: 1rem;
    line-height: 1.4;
}

.check-circle {
    min-width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.8rem;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--surface);
    padding: var(--space-2xl) var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
    position: relative;
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-xl);
    transform: scale(1.05);
    z-index: 10;
}

.pricing-header { margin-bottom: var(--space-xl); text-align: center; }
.price { font-size: 3rem; font-weight: 800; color: var(--ink); line-height: 1; }
.price-period { font-size: 0.9rem; color: var(--ink-tertiary); }
.plan-name { font-size: 1.25rem; font-weight: 600; margin-bottom: var(--space-sm); }

.features-list { margin-bottom: var(--space-2xl); flex-grow: 1; }
.features-list li {
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.95rem;
    color: var(--ink-secondary);
}
.features-list li::before {
    content: '✓';
    color: var(--primary-dark);
    font-weight: bold;
}

/* CTA Footer */
.cta-footer {
    text-align: center;
    padding: var(--space-3xl) 0;
    background: radial-gradient(circle at center, var(--primary-glass) 0%, transparent 70%);
}

.footer {
    border-top: 1px solid var(--border);
    padding: var(--space-2xl) 0;
    margin-top: var(--space-3xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.footer-links a {
    margin-left: var(--space-xl);
    color: var(--ink-secondary);
    font-size: 0.9rem;
}
.footer-links a:hover { color: var(--primary-dark); }

/* Legal Pages Support */
.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.legal-page {
    padding-top: 140px;
    min-height: 100vh;
}

.legal-page h1 {
    margin-bottom: var(--space-lg);
    font-size: clamp(2rem, 4vw, 3rem);
}

.legal-page h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    font-size: 1.75rem;
}

.legal-page h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
}

.legal-page p, .legal-page li {
    margin-bottom: var(--space-md);
    color: var(--ink-secondary);
}

.legal-page ul {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.legal-page li {
    list-style: disc;
}

.legal-page .last-updated {
    color: var(--ink-tertiary);
    font-size: 0.9rem;
    margin-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-lg);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero {
        padding-top: 100px;
        min-height: auto;
    }
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 0;
    }
    .hero-content { margin: 0 auto; }
    .badge { margin-bottom: var(--space-md); }
    .hero h1 { margin-bottom: var(--space-sm); }
    .hero-subtitle { margin-bottom: var(--space-lg); font-size: 1.125rem; }
    .hero-actions { justify-content: center; }
    .mockup-container { margin-top: var(--space-2xl); }
    
    .steps-container { grid-template-columns: 1fr; gap: var(--space-lg); }
    .steps-container::before { display: none; } /* Hide line on mobile */
    .step-card { display: flex; align-items: center; gap: var(--space-md); text-align: left; }
    .step-number { margin: 0; min-width: 50px; }
    
    .pricing-card.popular { transform: none; }
    
    /* Disable 3D effect on tablet/mobile */
    .app-card {
        transform: none !important;
        margin: 0 auto;
    }
    .app-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 var(--space-md); }
    /* Ensure card fits without scaling */
    .app-card { 
        width: 100%; 
        max-width: 300px;
        height: auto;
        aspect-ratio: 1/2;
    }
    /* Adjust content inside if needed */
    .app-interface { font-size: 13px; }
}

@media (max-width: 600px) {
    .nav-cta { display: none; }
    
    /* Revert steps to column on small screens */
    .step-card { flex-direction: column; text-align: center; }
    .step-number { margin: 0 auto var(--space-md); }
}

/* --- Step Mockups --- */
.step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.step-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-visual {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.step-card:hover .step-visual {
    transform: translateY(-10px);
}

.phone-frame {
    width: 200px;
    height: 380px;
    background: #111;
    border-radius: 30px;
    border: 6px solid #222;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* Notch */
.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: #222;
    border-radius: 0 0 12px 12px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--canvas);
    position: relative;
    overflow: hidden;
    padding-top: 30px; /* Space for notch */
}

/* Step 1: Upload Animation */
.screen-upload {
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn {
    width: 120px;
    height: 40px;
    background: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #000;
    box-shadow: 0 4px 10px rgba(255, 183, 0, 0.3);
    z-index: 2;
}

.plus { font-size: 18px; }

.floating-doc {
    position: absolute;
    font-size: 40px;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1));
    animation: doc-float-in 3s ease-in-out infinite;
    top: 30%;
    right: 20%;
    z-index: 1;
    opacity: 0;
}

@keyframes doc-float-in {
    0% { transform: translateY(40px) scale(0.5); opacity: 0; }
    40% { transform: translateY(0) scale(1); opacity: 1; }
    80% { transform: translateY(-10px); opacity: 0; }
    100% { transform: translateY(-10px); opacity: 0; }
}


/* Step 2: Analyze Animation */
.screen-analyze {
    padding: 40px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.doc-preview {
    background: var(--surface);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.screen-analyze .line {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
}
.w-80 { width: 80%; }
.w-60 { width: 60%; }
.w-90 { width: 90%; }
.w-70 { width: 70%; }
.w-50 { width: 50%; }

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px 2px var(--primary);
    animation: scan-move 2.5s linear infinite;
    z-index: 5;
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px; /* will be animated */
    background: linear-gradient(to bottom, rgba(255, 183, 0, 0.1), transparent);
    animation: scan-overlay 2.5s linear infinite;
    pointer-events: none;
}

@keyframes scan-move {
    0% { top: 0; }
    100% { top: 100%; }
}
@keyframes scan-overlay {
    0% { top: 0; height: 0; }
    100% { top: 100%; height: 20px; }
}


/* Step 3: Result Animation */
.screen-result {
    padding: 40px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-header {
    height: 20px;
    width: 60%;
    background: #E5E7EB;
    border-radius: 4px;
    margin-bottom: 10px;
}

.result-card {
    height: 50px;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transform: translateY(20px);
    opacity: 0;
    animation: card-appear 3s ease infinite;
}

.r-1 { border-left: 4px solid var(--primary); animation-delay: 0.2s; }
.r-2 { border-left: 4px solid var(--danger); animation-delay: 0.6s; }
.r-3 { border-left: 4px solid var(--success); animation-delay: 1.0s; }

.success-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.4);
    transform: scale(0);
    animation: badge-pop 3s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
    animation-delay: 1.5s;
}

@keyframes card-appear {
    0% { transform: translateY(20px); opacity: 0; }
    20% { transform: translateY(0); opacity: 1; }
    80% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-10px); opacity: 0; }
}

@keyframes badge-pop {
    0% { transform: scale(0); }
    20% { transform: scale(1); }
    80% { transform: scale(1); }
    100% { transform: scale(0); }
}