/* ========================================
   PaperReview.com - Clean Design System
   Inspired by Stanford Agentic Reviewer
   ======================================== */

/* CSS Variables */
:root {
    /* Colors - Maroon/Burgundy Theme */
    --primary: #8B1538;
    --primary-dark: #6B1028;
    --primary-light: #A91D45;
    --primary-gradient: linear-gradient(135deg, #8B1538 0%, #A91D45 100%);

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-glass: #ffffff;
    --bg-dark: #1a1a2e;

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    --border-color: #e5e7eb;
    --border-hover: #d1d5db;

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', var(--font-main);

    /* Spacing */
    --section-padding: 80px 0;
    --container-width: 1100px;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Icon Styling */
.section-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.feature-icon i,
.dropzone-icon i,
.stat-card-icon i,
.nav-item-icon {
    width: 22px;
    height: 22px;
}

.upload-label-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.check {
    width: 18px;
    height: 18px;
    color: var(--success);
    flex-shrink: 0;
}

.social-links i {
    width: 18px;
    height: 18px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    color: var(--text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Upload Card Styles (from Dashboard) */
.upload-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.upload-card h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.upload-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 10px;
    justify-content: center;
    /* Center buttons */
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mode-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.mode-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-large {
    padding: 14px 36px;
    font-size: 1rem;
}

/* Top Banner */
.top-banner {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.top-banner a {
    color: white;
    text-decoration: underline;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    padding: 10px 20px;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(139, 21, 56, 0.05);
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 60px 0 80px;
    text-align: center;
}

.hero h1 {
    color: var(--primary);
    margin-bottom: 32px;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

/* ========================================
   How It Works - Main Card Style
   ======================================== */
.how-it-works-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.how-it-works-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.how-it-works-icon {
    font-size: 1.5rem;
}

.how-it-works-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.steps-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step-item {
    display: flex;
    gap: 16px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========================================
   Upload Section
   ======================================== */
.upload-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1rem;
}

.upload-label-icon {
    color: var(--primary);
}

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    background: var(--bg-secondary);
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(139, 21, 56, 0.02);
}

.dropzone.hidden {
    display: none;
}

/* Premium Input Styling */
.premium-input-group {
    margin-bottom: 20px;
}

.premium-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.premium-input-label i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.premium-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--primary);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    background: #fff;
    transition: all var(--transition-fast);
    outline: none;
}

.premium-input:focus {
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.15);
    border-color: var(--primary);
}

.premium-input::placeholder {
    color: #9ca3af;
    opacity: 0.8;
}

.dropzone-icon {
    width: 64px;
    height: 64px;
    background: rgba(139, 21, 56, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.75rem;
    color: var(--primary);
}

.dropzone-text {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dropzone-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-label {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(139, 21, 56, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 21, 56, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========================================
   Pricing Section
   ======================================== */
.pricing {
    padding: var(--section-padding);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 36px;
    transition: all var(--transition-normal);
}

.pricing-card.featured {
    border-color: var(--primary);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pricing-header {
    text-align: center;
    margin-bottom: 24px;
}

.pricing-title {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.pricing-description {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pricing-amount {
    text-align: center;
    margin-bottom: 28px;
}

.pricing-currency {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-value {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary);
}

.pricing-period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    margin-bottom: 28px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features .check {
    color: var(--success);
    font-size: 1rem;
}

.pricing-card .btn {
    width: 100%;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item[open] {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.faq-summary {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-content {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 48px 0 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 280px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links h4 {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.social-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 36px;
    max-width: 420px;
    width: 90%;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-buttons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .steps-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }
}