/* ===========================
   Enterprise Professional Design
   =========================== */
:root {
    /* Professional Color Palette */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --accent-color: #0891b2;

    /* Neutral Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-code: #f8fafc;
    --bg-dark: #0f172a;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Borders */
    --border-color: #e2e8f0;
    --border-medium: #cbd5e1;

    /* Subtle Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 150ms ease;
}

a:hover {
    color: var(--primary-dark);
}

code {
    font-family: var(--font-mono);
    background: var(--bg-code);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
}

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

.version-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 150ms ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* Hero Section */
.hero {
    padding: calc(80px + 4rem) 0 4rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.hero-description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 200ms ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

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

.tech-stack {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tech-badge {
    background: white;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: all 200ms ease;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.feature-list {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feature-list li {
    padding: 0.375rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.feature-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Architecture Section */
.architecture-overview h3 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stack-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

.stack-item h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.stack-item ul {
    list-style: none;
}

.stack-item li {
    padding: 0.625rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.stack-item li:last-child {
    border-bottom: none;
}

.architecture-diagram {
    margin-top: 3rem;
}

.diagram {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    overflow-x: auto;
}

.diagram code {
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre;
    border: none;
}

.data-flow {
    margin-top: 3rem;
}

.flow-steps {
    counter-reset: step-counter;
    list-style: none;
    max-width: 800px;
}

.flow-steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}

.flow-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.flow-steps li strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.flow-steps li p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

/* Quick Start */
.quickstart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.quickstart-step {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    position: relative;
}

.step-number {
    position: absolute;
    top: -1rem;
    left: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.quickstart-step h3 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin: 1rem 0;
}

.code-block pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.code-block code {
    background: transparent;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    border: none;
}

.iam-policy {
    margin-top: 3rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

.iam-policy h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.iam-policy p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Deployment */
.deployment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.deployment-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

.deployment-card h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.metrics-list {
    list-style: none;
}

.metrics-list li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.metrics-list li:last-child {
    border-bottom: none;
}

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

/* Security */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.security-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

.security-card h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.security-card ul {
    list-style: none;
}

.security-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.security-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.875rem;
}

.threat-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.threat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.9rem;
}

.threat-status {
    font-weight: 600;
    min-width: 120px;
}

.threat-item.protected .threat-status {
    color: #059669;
}

.threat-item.not-protected .threat-status {
    color: #dc2626;
}

.best-practices {
    counter-reset: practice-counter;
    list-style: none;
}

.best-practices li {
    counter-increment: practice-counter;
    padding: 0.75rem 0 0.75rem 2.5rem;
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.best-practices li:last-child {
    border-bottom: none;
}

.best-practices li::before {
    content: counter(practice-counter);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Troubleshooting */
.troubleshooting-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.accordion-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    cursor: pointer;
    transition: background 150ms ease;
}

.accordion-header:hover {
    background: var(--bg-tertiary);
}

.accordion-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.accordion-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: transform 200ms ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 0 1.25rem 1.25rem;
}

.accordion-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.accordion-content ul {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section p {
    color: #94a3b8;
    font-size: 0.875rem;
}

.footer-license {
    margin-top: 1rem;
    font-size: 0.75rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.875rem;
    transition: color 150ms ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .nav-links {
        display: none;
    }

    .feature-grid,
    .stack-grid,
    .quickstart-grid,
    .deployment-grid,
    .security-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .diagram code {
        font-size: 0.7rem;
    }
}

/* Screenshots Gallery Section */
.screenshots-section {
    background: var(--bg-secondary);
    padding: 5rem 0;
}

.screenshot-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.screenshot-row:last-child {
    margin-bottom: 0;
}

.screenshot-row-reverse {
    direction: rtl;
}

.screenshot-row-reverse>* {
    direction: ltr;
}

.screenshot-content {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    background: white;
}

.screenshot-content img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-text h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.screenshot-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Responsive for screenshots */
@media (max-width: 968px) {

    .screenshot-row,
    .screenshot-row-reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
    }

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

    .screenshot-text h3 {
        font-size: 1.5rem;
    }

    .screenshot-text p {
        font-size: 1rem;
    }
}