/* ============================================
   xvcl Website Styles
   Modern, Professional, Corporate Design
   ============================================ */

/* ============================================
   CSS Variables & Design System
   ============================================ */
:root {
    /* Colors - Modern High Contrast Palette */
    --color-primary: #0EA5E9;
    --color-primary-dark: #0284C7;
    --color-primary-light: #38BDF8;
    --color-secondary: #8B5CF6;
    --color-accent: #F59E0B;
    --color-background: #FFFFFF;
    --color-background-alt: #F8FAFC;
    --color-surface: #F1F5F9;
    --color-dark: #0F172A;
    --color-dark-light: #1E293B;
    --color-text: #0F172A;
    --color-text-light: #475569;
    --color-text-muted: #94A3B8;
    --color-border: #CBD5E1;
    --color-code-bg: #1E293B;

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

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Layout */
    --max-width: 1200px;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --nav-height: 70px;

    /* Shadows - Enhanced for depth */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 10px 15px -3px rgba(14, 165, 233, 0.3), 0 4px 6px -2px rgba(14, 165, 233, 0.2);

    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

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

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

img {
    max-width: 100%;
    height: auto;
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background-color: var(--color-surface);
    padding: 0.2em 0.5em;
    border-radius: 0.375rem;
    color: var(--color-primary-dark);
    font-weight: 600;
    border: 1px solid var(--color-border);
}

pre {
    margin: 0;
    overflow-x: auto;
}

pre code {
    display: block;
    padding: 1.25rem;
    background-color: var(--color-code-bg);
    color: #ABB2BF;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ============================================
   Layout & Container
   ============================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

section {
    padding: var(--spacing-3xl) 0;
}

/* ============================================
   Navigation Bar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--color-dark);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-light);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    color: #E5E7EB;
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--color-primary-light);
    background-color: rgba(14, 165, 233, 0.15);
}

.nav-github {
    background-color: var(--color-primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
}

.nav-github:hover {
    background-color: var(--color-primary-dark);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E40AF 50%, #0EA5E9 100%);
    color: white;
    padding: calc(var(--nav-height) + var(--spacing-3xl)) 0 var(--spacing-3xl);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    font-weight: 800;
    line-height: 1.1;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    text-align: left;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.05rem;
    color: white;
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    min-width: 150px;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--color-primary-dark);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-code {
    margin-top: var(--spacing-2xl);
}

.code-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--spacing-md);
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
}

.code-block {
    background-color: var(--color-code-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: var(--shadow-md);
}

.code-header {
    background-color: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.arrow {
    font-size: 2rem;
    color: white;
    font-weight: bold;
}

/* ============================================
   Why Section
   ============================================ */
.why-section {
    background-color: var(--color-background-alt);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
    position: relative;
    padding-bottom: var(--spacing-md);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.why-card {
    background-color: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.why-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.why-card:hover {
    box-shadow: var(--shadow-primary);
    transform: translateY(-5px);
    border: 2px solid var(--color-primary);
}

.why-card h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
}

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

.why-solution {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.why-solution h3 {
    color: white;
    margin-bottom: var(--spacing-md);
    font-size: 1.75rem;
}

.why-solution p {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.95;
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    background: linear-gradient(180deg, white 0%, var(--color-background-alt) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.feature-card {
    background-color: var(--color-surface);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--color-border);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-primary);
    transform: translateY(-5px);
    background-color: white;
}

.feature-icon-large {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.feature-card h3 {
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
}

.feature-card p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.feature-card pre {
    margin-top: var(--spacing-md);
}

.feature-card pre code {
    font-size: 0.8rem;
}

/* ============================================
   Examples Section
   ============================================ */
.examples-section {
    background-color: var(--color-background-alt);
}

.example {
    margin-bottom: var(--spacing-3xl);
    opacity: 0;
    transform: translateY(20px);
}

.example.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.example:last-child {
    margin-bottom: 0;
}

.example-title {
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    font-size: 1.75rem;
}

.code-comparison-horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    background-color: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.code-pane {
    display: flex;
    flex-direction: column;
}

.code-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-pane:first-child .code-label {
    color: var(--color-primary);
}

/* ============================================
   Quick Start Section
   ============================================ */
.quickstart-section {
    background: linear-gradient(180deg, var(--color-background-alt) 0%, white 100%);
}

.quickstart-content {
    max-width: 900px;
    margin: 0 auto;
}

.installation h3,
.first-steps h3,
.workflow h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-2xl);
    font-size: 1.75rem;
}

.installation h3:first-child {
    margin-top: 0;
}

.installation p,
.first-steps p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.install-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.install-option {
    background-color: var(--color-surface);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 2px solid var(--color-border);
    transition: var(--transition);
}

.install-option:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    background-color: white;
}

.install-option h4 {
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    font-size: 1.125rem;
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.workflow-step {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.step-content h4 {
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

.step-content p {
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ============================================
   Documentation Section
   ============================================ */
.docs-section {
    background-color: var(--color-background-alt);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-3xl);
}

.doc-card {
    background-color: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 2px solid var(--color-border);
    opacity: 0;
    transform: translateY(20px);
}

.doc-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.doc-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-primary);
    transform: translateY(-5px);
    background-color: var(--color-background);
}

.doc-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.doc-card h3 {
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

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

.integration-info {
    background-color: white;
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.integration-info h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.75rem;
}

.integration-info p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.integration-example h4 {
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--color-dark);
    color: #E5E7EB;
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
}

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

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
}

.footer-brand {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-light);
}

.footer-tagline {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

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

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: #D1D5DB;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    border-top: 1px solid var(--color-dark-light);
    padding-top: var(--spacing-lg);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .hero-title {
        font-size: 3rem;
    }

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

@media (max-width: 768px) {
    section {
        padding: var(--spacing-2xl) 0;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background-color: var(--color-dark);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-sm);
        transform: translateX(-100%);
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        align-items: flex-start;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: calc(var(--nav-height) + var(--spacing-2xl)) 0 var(--spacing-2xl);
        min-height: auto;
    }

    .hero-title {
        font-size: 2.25rem;
    }

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

    .code-comparison {
        grid-template-columns: 1fr;
    }

    .arrow {
        transform: rotate(90deg);
        margin: var(--spacing-md) 0;
    }

    .code-comparison-horizontal {
        grid-template-columns: 1fr;
    }

    .why-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .install-options {
        grid-template-columns: 1fr;
    }

    .docs-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .hero-title {
        font-size: 1.875rem;
    }

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

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
    }

    .hero-cta {
        flex-direction: column;
    }

    pre code {
        font-size: 0.75rem;
        padding: 1rem;
    }
}

/* ============================================
   Animation Classes
   ============================================ */
.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
