/* Modern Homepage Styles - Figma/Notion/Linear inspired */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #6366f1;
    --primary-hover: #5855eb;
    --primary-light: #eef2ff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Dark theme support - using data-theme attribute */
:root[data-theme="dark"] {
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #334155;
    --border-color: #475569;
    --border-light: #334155;
}

/* Also support system preference as fallback */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --bg-primary: #1e293b;
        --bg-secondary: #0f172a;
        --bg-tertiary: #334155;
        --border-color: #475569;
        --border-light: #334155;
    }
}

/* Base styles - Override main.css overflow settings for homepage */
html:has(.homepage),
body.homepage {
    overflow-y: scroll !important;
    overflow-x: hidden;
    height: auto !important;
    scrollbar-gutter: stable;
}

.homepage {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
}

/* Prevent text from causing layout shifts */
.homepage * {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Header */
.modern-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg, rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 0;
}

/* Dark mode header background */
:root[data-theme="dark"] .modern-header {
    background: rgba(30, 41, 59, 0.9);
}

.header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    box-sizing: border-box;
}

.logo-section .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo svg {
    color: var(--primary-color);
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.language-selector select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-selector select:hover {
    border-color: var(--primary-color);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 64px);
}

/* Hero Section */
.hero-section {
    padding: 80px 0 100px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 24px 0;
    color: var(--text-primary);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-subtitle {
    font-size: 22px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 40px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-cta {
    margin-bottom: 40px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-color);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button svg {
    width: 20px;
    height: 20px;
}

.paste-hint {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.paste-hint kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 60px;
    min-height: 80px;
    align-items: center;
}

.tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    height: 38px;
    box-sizing: border-box;
    white-space: nowrap;
}

.tag svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

/* Preview Canvas */
.preview-canvas {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.canvas-container {
    width: 700px;
    height: 394px;
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

.canvas-container:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.canvas-placeholder {
    text-align: center;
    padding: 40px;
}

.upload-hint svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-hint h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    min-height: 27px;
}

.upload-hint p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    min-height: 21px;
}

.upload-hint kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
}

/* Features Section */
.features-section {
    padding: 120px 0;
    background: var(--bg-primary);
}

.features-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 280px;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Quick Links Section */
.quick-links-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.quick-links-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quick-link-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.quick-link-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.quick-link-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.quick-link-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.quick-link-card p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

/* Footer */
.modern-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}

.footer-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.footer-left .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.footer-left .logo svg {
    color: var(--primary-color);
}

.footer-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    display: none;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cookie-text {
    display: flex;
    gap: 12px;
    flex: 1;
}

.cookie-text svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-text p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-accept,
.btn-decline {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-accept {
    background: var(--primary-color);
    color: white;
}

.btn-accept:hover {
    background: var(--primary-hover);
}

.btn-decline {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-decline:hover {
    background: var(--bg-tertiary);
}

/* Responsive Design */

@media (max-width: 768px) {
    .nav-section {
        gap: 16px;
    }
    
    .nav-link {
        display: none;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .canvas-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 16px;
    }
    
    .cookie-notice {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .cookie-actions {
        justify-content: stretch;
    }
    
    .btn-accept,
    .btn-decline {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 16px;
    }
    
    .logo-text {
        display: none;
    }
    
    .hero-section {
        padding: 48px 0 80px;
    }
    
    .hero-container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .feature-tags {
        gap: 8px;
    }
    
    .tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .features-section {
        padding: 80px 0;
    }
    
    .features-container {
        padding: 0 16px;
    }
    
    .footer-container {
        padding: 0 16px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.cta-button:focus,
.footer-link:focus,
.language-selector select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
}

/* Vertical Layout Styles */
.hero-container-vertical {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.hero-content-center {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* SEO Content Section */
.seo-content-section {
    padding: 80px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
}

.content-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.seo-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.seo-text p {
    margin: 0 0 24px 0;
    text-align: justify;
}

.seo-text p:last-child {
    margin-bottom: 0;
}

/* Language-specific text display */
.seo-text[data-lang] {
    display: none;
}

.seo-text[data-lang="en"] {
    display: block;
}

/* Responsive adjustments for SEO content */
@media (max-width: 768px) {
    .seo-content-section {
        padding: 60px 0;
    }
    
    .content-container {
        padding: 0 20px;
    }
    
    .seo-text {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .seo-text p {
        text-align: left;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .seo-content-section {
        padding: 48px 0;
    }
    
    .content-container {
        padding: 0 16px;
    }
    
    .seo-text {
        font-size: 14px;
        line-height: 1.6;
    }
}
