/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0366d6;
    --primary-dark: #0256c7;
    --secondary-color: #6c757d;
    --text-dark: #24292e;
    --text-light: #586069;
    --bg-light: #f6f8fa;
    --bg-white: #ffffff;
    --border-color: #e1e4e8;
    --success-color: #28a745;
    --shadow: 0 1px 3px rgba(27,31,35,0.12), 0 8px 24px rgba(27,31,35,0.12);
    --shadow-sm: 0 1px 0 rgba(27,31,35,0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f6f8fa 0%, #ffffff 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25em;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.hero-note {
    color: var(--text-light);
    font-size: 0.9em;
}

.hero-image {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image .screenshot {
    max-width: 450px;
    max-height: 600px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1em;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1em;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2em;
    color: var(--text-light);
}

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

.feature-card {
    padding: 30px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

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

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.screenshots-carousel {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.screenshot-item {
    text-align: center;
}

.screenshot-item img {
    max-width: 280px;
    max-height: 560px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

.screenshot-item p {
    color: var(--text-light);
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: var(--primary-color);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-note {
    margin-top: 15px !important;
    font-size: 0.9em !important;
    opacity: 0.8 !important;
}

/* Page Hero */
.page-hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #f6f8fa 0%, #ffffff 100%);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-hero h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-hero p {
    font-size: 1.2em;
    color: var(--text-light);
}

.last-updated {
    color: var(--text-light);
    font-size: 0.9em;
    font-style: italic;
}

/* Download Section */
.download-section {
    padding: 60px 0;
}

.download-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.download-info h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.requirement-box {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-top: 30px;
}

.requirement-box h3 {
    margin-bottom: 15px;
}

.requirement-box ul {
    list-style: none;
}

.requirement-box li {
    padding: 8px 0;
    color: var(--text-light);
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.download-buttons h3 {
    margin-bottom: 10px;
}

/* Store Buttons */
.store-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: var(--text-dark);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.store-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.store-button.disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.store-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

.store-icon {
    width: 40px;
    height: 40px;
}

.store-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-subtitle {
    font-size: 0.75em;
    opacity: 0.9;
}

.store-title {
    font-size: 1.3em;
    font-weight: 600;
}

.download-note {
    color: var(--text-light);
    font-size: 0.9em;
    text-align: center;
    margin-top: 10px;
}

/* Getting Started */
.getting-started {
    margin-bottom: 60px;
}

.getting-started h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step-card {
    text-align: center;
    padding: 30px;
    background: var(--bg-light);
    border-radius: 8px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h3 {
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-light);
}

/* Access Box */
.access-box {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
}

.access-box h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.access-box p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Support Section */
.support-section {
    padding: 60px 0;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.contact-card {
    text-align: center;
    padding: 40px;
    background: var(--bg-light);
    border-radius: 8px;
}

.contact-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.contact-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.contact-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.contact-detail {
    font-weight: 500;
    color: var(--text-dark) !important;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 60px;
}

.faq-section h2 {
    font-size: 2em;
    margin-bottom: 40px;
    text-align: center;
}

.faq-grid {
    display: grid;
    gap: 30px;
}

.faq-item {
    padding: 30px;
    background: var(--bg-light);
    border-radius: 8px;
}

.faq-item h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.faq-item p, .faq-item ul, .faq-item ol {
    color: var(--text-light);
    margin-bottom: 10px;
}

.faq-item ul, .faq-item ol {
    margin-left: 20px;
}

.faq-item li {
    margin-bottom: 8px;
}

.faq-item a {
    color: var(--primary-color);
}

/* Help CTA */
.help-cta {
    text-align: center;
    padding: 60px;
    background: var(--bg-light);
    border-radius: 8px;
}

.help-cta h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.help-cta p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Legal Content */
.legal-content {
    padding: 60px 0;
}

.legal-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.legal-nav-link {
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.legal-nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: -22px;
}

.legal-content h2 {
    font-size: 2em;
    margin: 40px 0 20px 0;
    color: var(--text-dark);
}

.legal-content h3 {
    font-size: 1.4em;
    margin: 30px 0 15px 0;
    color: var(--text-dark);
}

.legal-content p {
    margin-bottom: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

.legal-content ul, .legal-content ol {
    margin: 15px 0 15px 30px;
    color: var(--text-light);
}

.legal-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.contact-box {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin: 25px 0;
}

.contact-box p {
    margin-bottom: 8px;
}

.contact-box strong {
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9em;
}

.footer-bottom p {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2em;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-image .screenshot {
        max-width: 320px;
        max-height: 640px;
    }
    
    .download-card {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshot-item img {
        max-width: 240px;
        max-height: 480px;
    }
    
    .screenshots-carousel {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Placeholder for missing images */
.logo-img[src*="affinity-nxt-logo.png"],
.screenshot[src*="app-screenshot"],
.screenshot-item img {
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
}
