/* Valency Site Styles - matches valency.io */

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

:root {
    --bg: #f2f2f2;
    --text: #000;
    --link: #09f;
    --border: #ccc;
    --input-bg: #fff;
    --error: #c00;
    --success: #059669;
    --code-bg: #e5e5e5;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Jura', sans-serif;
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

/* Site Navigation */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    max-width: 1100px;
    margin: 0 auto;
}

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

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

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

.nav-link {
    font-size: 15px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--text);
}

.nav-cta {
    display: inline-block;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #000;
    border-radius: 3px;
    text-decoration: none;
}

.nav-cta:hover {
    background: #222;
}

.nav-cta.active {
    background: var(--link);
}

/* Fixed Footer - bottom right like valency.io */
.footer {
    position: fixed;
    bottom: 60px;
    right: 18px;
    z-index: 100;
}

.footer a {
    color: var(--link);
    text-decoration: underline;
    font-size: 14px;
}

/* Main layout */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 40px 80px;
}

.content {
    width: 100%;
    max-width: 520px;
    margin-left: 14%;
}

@media (max-width: 1000px) {
    .content {
        margin-left: auto;
        margin-right: auto;
    }
}

.step {
    animation: fadeIn 0.3s ease;
}

.step.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Typography */
h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    margin-top: 36px;
}

.subtitle {
    font-size: 16px;
    font-weight: 300;
    color: #333;
    margin-bottom: 28px;
    line-height: 1.4;
}

/* Form */
.form {
    max-width: 320px;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 10px 12px;
    font-family: 'Jura', sans-serif;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--input-bg);
}

.field input:focus {
    outline: none;
    border-color: var(--link);
}

.field input::placeholder {
    color: #999;
}

/* Error */
.error {
    color: var(--error);
    font-size: 14px;
    margin-bottom: 16px;
}

.error.hidden {
    display: none;
}

/* Button */
.btn {
    display: inline-block;
    padding: 10px 24px;
    font-family: 'Jura', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #000;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn:hover {
    background: #222;
}

.btn:disabled {
    background: #666;
    cursor: not-allowed;
}

.btn-loading.hidden,
.btn:not(:disabled) .btn-loading {
    display: none;
}

.btn:disabled .btn-text {
    display: none;
}

.btn:disabled .btn-loading {
    display: inline;
}

/* Credentials */
.credentials {
    margin-top: 8px;
}

.credential-box {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 16px;
}

.credential-box label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.token-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--code-bg);
    border-radius: 3px;
    padding: 10px 12px;
}

.token-display code {
    flex: 1;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    word-break: break-all;
}

.copy-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
}

.copy-btn:hover {
    color: var(--link);
}

.copy-btn.copied {
    color: var(--success);
}

.hint {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* Connection Methods */
.connection-methods {
    margin-top: 8px;
}

.method-intro {
    font-size: 15px;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.4;
}

.method-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.method-tab {
    padding: 10px 16px;
    font-family: 'Jura', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.method-tab:hover {
    color: #333;
}

.method-tab.active {
    color: var(--link);
    border-bottom-color: var(--link);
}

.method-content {
    display: none;
}

.method-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.method-desc {
    font-size: 14px;
    color: #333;
    margin-bottom: 18px;
    line-height: 1.4;
}

.method-step {
    margin-bottom: 18px;
}

.method-step strong {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

.method-step p {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.code-block {
    background: var(--code-bg);
    border-radius: 3px;
    padding: 12px;
    margin-top: 6px;
}

.code-block code {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    line-height: 1.6;
    word-break: break-all;
}

/* Downloads */
.download-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    text-decoration: none;
    color: var(--text);
    flex: 1;
    min-width: 140px;
}

.download-grid .download-card {
    max-width: 160px;
}

.download-card:hover {
    border-color: var(--link);
}

.download-icon {
    color: var(--link);
    flex-shrink: 0;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.download-name {
    font-weight: 600;
    font-size: 14px;
}

.download-meta {
    font-size: 12px;
    color: #666;
    word-break: break-word;
}

/* Instructions */
.instructions ol {
    padding-left: 18px;
}

.instructions li {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.4;
}

.instructions code {
    background: var(--code-bg);
    padding: 1px 5px;
    border-radius: 2px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
}

/* Help */
.help {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.help p {
    font-size: 14px;
    color: #666;
}

.help a {
    color: var(--link);
    text-decoration: underline;
}

/* Page container — for pricing, docs, and other content pages */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 40px 80px;
}

.page-container h1 {
    margin-bottom: 24px;
}

/* Hero section — homepage */
.hero {
    text-align: center;
    padding: 140px 40px 80px;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 18px;
    max-width: 520px;
    margin: 0 auto 32px;
}

.hero-cta {
    font-size: 16px;
    padding: 12px 32px;
}

/* Features grid — homepage */
.features {
    padding: 40px 40px 60px;
    max-width: 900px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 24px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* How it works — homepage + docs */
.how-it-works {
    padding: 40px 40px 60px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.how-it-works h2 {
    margin-top: 0;
    margin-bottom: 28px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}

.step-item {
    padding: 16px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--link);
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    color: var(--link);
    margin-bottom: 12px;
}

.step-item h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-item p {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.step-item a {
    color: var(--link);
}

/* CTA section — homepage */
.cta-section {
    text-align: center;
    padding: 40px 40px 100px;
}

.cta-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Pricing */
.pricing-banner {
    background: var(--link);
    color: #fff;
    padding: 12px 20px;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 32px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pricing-card {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--link);
    border-width: 2px;
}

.pricing-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pricing-price span {
    font-size: 16px;
    font-weight: 400;
    color: #666;
}

.pricing-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}

.pricing-features li {
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.4;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-card .btn {
    text-align: center;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--text);
}

.btn-outline:hover {
    background: var(--text);
    color: var(--bg);
}

/* Docs */
.docs-section {
    margin-bottom: 40px;
}

.docs-section h2 {
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.docs-detail {
    margin-bottom: 16px;
}

.docs-detail strong {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.docs-detail p {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.docs-list {
    list-style: none;
    padding: 0;
}

.docs-list li {
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
}

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

.docs-list code {
    background: var(--code-bg);
    padding: 1px 5px;
    border-radius: 2px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
}

.docs-link {
    font-size: 14px;
    margin-top: 12px;
    color: #333;
}

.docs-link a {
    color: var(--link);
}

/* Tool grid — docs */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.tool-category {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 16px;
}

.tool-category h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-category li {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    padding: 3px 0;
    color: #333;
}

/* Nav user (logged-in state) */
.nav-user {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

/* Login page */
.login-signup-link {
    font-size: 14px;
    color: #666;
    margin-top: 24px;
}

.login-signup-link a {
    color: var(--link);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-inner {
        padding: 14px 20px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-link {
        font-size: 14px;
    }

    .features-grid,
    .steps-grid,
    .pricing-grid,
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 120px 24px 60px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .features,
    .how-it-works,
    .cta-section {
        padding-left: 24px;
        padding-right: 24px;
    }

    .page-container {
        padding: 90px 24px 60px;
    }
}

@media (max-width: 600px) {
    .footer {
        bottom: 16px;
        right: 16px;
    }

    .container {
        padding: 90px 24px 80px;
    }

    h1 {
        font-size: 24px;
    }

    .download-grid {
        flex-direction: column;
    }

    .download-card {
        min-width: auto;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-link {
        font-size: 13px;
    }

    .nav-cta {
        font-size: 13px;
        padding: 6px 14px;
    }
}
