/* ===================================
   Context.ai - Product Page
   Premium SaaS Product Showcase
   =================================== */

:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    
    --green-50: #d1fae5;
    --green-500: #10b981;
    --green-700: #047857;
    
    --purple-500: #8b5cf6;
    --red-500: #ef4444;
    --yellow-500: #f59e0b;
    
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-float: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    
    --spacing: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

/* ===================================
   Navigation
   =================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    padding: calc(var(--spacing) * 2.5) 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing) * 4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 1.5);
    cursor: pointer;
    text-decoration: none;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 4);
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--blue-600);
}

.btn-nav-cta {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.25);
}

.btn-nav-cta:hover {
    transform: translateY(-2px);
}

/* ===================================
   Product Hero
   =================================== */

.product-hero {
    padding: calc(var(--spacing) * 20) calc(var(--spacing) * 4) calc(var(--spacing) * 12);
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
    text-align: center;
    position: relative;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.brain-motif {
    width: 180px;
    height: 180px;
    margin: 0 auto calc(var(--spacing) * 4);
    opacity: 0.8;
}

.mini-brain {
    width: 100%;
    height: 100%;
    animation: gentleFloat 8s ease-in-out infinite;
}

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

.brain-node {
    animation: nodeBlink 3s ease-in-out infinite;
}

@keyframes nodeBlink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.product-title {
    font-size: 52px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: calc(var(--spacing) * 2);
    letter-spacing: -0.02em;
}

.product-subtitle {
    font-size: 20px;
    color: var(--gray-600);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

.product-collaboration {
    font-size: 17px;
    color: var(--gray-700);
    font-weight: 500;
    max-width: 800px;
    margin: calc(var(--spacing) * 3) auto 0;
    line-height: 1.7;
}

/* ===================================
   Product Sections
   =================================== */

.product-section {
    padding: calc(var(--spacing) * 15) calc(var(--spacing) * 4);
    background: var(--white);
    position: relative;
}

.product-section:nth-child(even) {
    background: var(--gray-50);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: calc(var(--spacing) * 10);
    align-items: start;
}

/* Section Content */
.section-content {
    position: sticky;
    top: calc(var(--spacing) * 15);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing) * 1);
    background: var(--blue-50);
    color: var(--blue-700);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: calc(var(--spacing) * 3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: calc(var(--spacing) * 3);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: calc(var(--spacing) * 5);
}

/* Bullet Features */
.bullet-features {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 4);
}

.feature-bullet {
    display: flex;
    gap: calc(var(--spacing) * 3);
}

.bullet-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--blue-50);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--blue-600);
}

.bullet-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: calc(var(--spacing) * 1);
}

.bullet-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-600);
}

/* ===================================
   Visual Showcases
   =================================== */

.section-visual {
    position: relative;
}

.visual-showcase {
    display: grid;
    gap: calc(var(--spacing) * 3);
    position: relative;
}

.showcase-1 {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing) * 4);
}

.showcase-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing) * 3);
}

.showcase-3 {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing) * 3);
}

/* UI Panels */
.ui-panel {
    background: var(--white);
    border-radius: 16px;
    padding: calc(var(--spacing) * 3);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(40px);
}

.ui-panel:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-float);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing) * 3);
    padding-bottom: calc(var(--spacing) * 2);
    border-bottom: 1px solid var(--gray-200);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 1.5);
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
}

.status-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-600);
    background: var(--blue-50);
    padding: 4px 12px;
    border-radius: 100px;
}

.confidence {
    font-size: 12px;
    font-weight: 600;
    color: var(--green-700);
    background: var(--green-50);
    padding: 4px 12px;
    border-radius: 100px;
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 1.5);
}

.file-item {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 2);
    padding: calc(var(--spacing) * 2);
    background: var(--gray-50);
    border-radius: 10px;
    transition: all 0.3s;
}

.file-item:hover {
    background: var(--blue-50);
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--white);
}

.file-icon.excel { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.file-icon.pdf { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.file-icon.csv { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }

.file-info {
    flex: 1;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.file-meta {
    font-size: 12px;
    color: var(--gray-500);
}

.file-status {
    color: var(--green-500);
    font-size: 18px;
    font-weight: 700;
}

/* Interpretation Content */
.interpretation-content {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 2);
}

.interpretation-item {
    display: flex;
    justify-content: space-between;
    padding: calc(var(--spacing) * 1.5);
    background: var(--gray-50);
    border-radius: 8px;
}

.item-label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 600;
}

.item-value {
    font-size: 13px;
    color: var(--gray-900);
    font-weight: 600;
    text-align: right;
}

/* KPI Dashboard */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing) * 2);
}

.kpi-item {
    padding: calc(var(--spacing) * 2);
    background: var(--gray-50);
    border-radius: 10px;
    transition: all 0.3s;
}

.kpi-item:hover {
    background: var(--blue-50);
    transform: translateY(-4px);
}

.kpi-label {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 600;
    margin-bottom: calc(var(--spacing) * 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: calc(var(--spacing) * 0.5);
    line-height: 1;
}

.kpi-trend {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.kpi-trend.positive {
    background: var(--green-50);
    color: var(--green-700);
}

.kpi-trend.neutral {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Comparables */
.comparables-list {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 2);
}

.comparable-row {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 1);
}

.comp-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.comp-similarity {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 1.5);
    position: relative;
}

.similarity-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--blue-500) 0%, var(--blue-600) 100%);
    border-radius: 100px;
    transition: width 1s ease;
}

.similarity-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--blue-600);
}

/* Risk Panel */
.risk-list {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 2);
}

.risk-item {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 2);
    padding: calc(var(--spacing) * 2);
    background: var(--gray-50);
    border-radius: 10px;
}

.risk-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.risk-item.low .risk-indicator { background: var(--green-500); }
.risk-item.medium .risk-indicator { background: var(--yellow-500); }
.risk-item.high .risk-indicator { background: var(--red-500); }

.risk-content {
    flex: 1;
}

.risk-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.risk-level {
    font-size: 12px;
    color: var(--gray-600);
}

/* Map Panel */
.map-view {
    width: 100%;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
}

.map-view svg {
    width: 100%;
    height: 100%;
}

/* Presentation Panel */
.slide-counter {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 600;
}

.slide-preview {
    background: var(--gray-50);
    border-radius: 12px;
    padding: calc(var(--spacing) * 3);
    min-height: 280px;
}

.slide-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: calc(var(--spacing) * 3);
}

.slide-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing) * 3);
}

.slide-chart {
    height: 100px;
}

.slide-chart svg {
    width: 100%;
    height: 100%;
}

.slide-insights {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 1.5);
}

.insight-point {
    display: flex;
    align-items: start;
    gap: calc(var(--spacing) * 1.5);
    font-size: 13px;
    color: var(--gray-700);
}

.bullet-dot {
    width: 6px;
    height: 6px;
    background: var(--blue-600);
    border-radius: 50%;
    margin-top: 7px;
    flex-shrink: 0;
}

/* Generation Panel */
.generation-steps {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 2);
    margin-bottom: calc(var(--spacing) * 3);
}

.gen-step {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 2);
    padding: calc(var(--spacing) * 1.5);
    border-radius: 8px;
    transition: all 0.3s;
}

.gen-step.completed {
    background: var(--green-50);
}

.gen-step.active {
    background: var(--blue-50);
}

.step-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.step-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: calc(var(--spacing) * 1.5);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-500) 0%, var(--blue-600) 100%);
    transition: width 0.5s ease;
}

.time-estimate {
    font-size: 13px;
    color: var(--gray-600);
    text-align: center;
}

.spin-icon {
    animation: spin 1.5s linear infinite;
}

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

/* Export Panel */
.export-options {
    display: flex;
    gap: calc(var(--spacing) * 2);
}

.export-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 2);
    padding: calc(var(--spacing) * 2);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.export-btn:hover {
    background: var(--blue-50);
    border-color: var(--blue-300);
    transform: translateY(-4px);
}

.export-icon {
    font-size: 32px;
}

.export-format {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
}

.export-size {
    font-size: 12px;
    color: var(--gray-600);
}

/* ===================================
   CTA Section
   =================================== */

.cta-section {
    padding: calc(var(--spacing) * 15) calc(var(--spacing) * 4);
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%);
    text-align: center;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: calc(var(--spacing) * 2);
}

.cta-text {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: calc(var(--spacing) * 5);
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: calc(var(--spacing) * 2);
}

.btn-cta-primary {
    background: var(--white);
    color: var(--blue-600);
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.3);
}

.btn-cta-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 1200px) {
    .section-container {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing) * 6);
    }
    
    .section-content {
        position: relative;
        top: 0;
    }
    
    .showcase-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links a:not(.btn-nav-cta) {
        display: none;
    }
    
    .product-title {
        font-size: 36px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .slide-body {
        grid-template-columns: 1fr;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .cta-actions {
        flex-direction: column;
    }
}

/* ===================================
   Animation Classes (JS controlled)
   =================================== */

.ui-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.similarity-bar.animate {
    animation: barGrow 1.5s ease-out forwards;
}

@keyframes barGrow {
    from { width: 0%; }
}