/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #09090b;
    --bg-subtle: #0f0f12;
    --bg-card: #131316;
    --bg-elevated: #1a1a1f;
    --bg-hover: #222228;

    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    --green: #22c55e;
    --green-dim: #16a34a;
    --green-glow: rgba(34, 197, 94, 0.15);
    --teal: #14b8a6;

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --radius: 12px;
    --radius-sm: 8px;

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", "SF Mono", "Menlo", monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Subtle noise texture */
.noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Ambient glow orbs */
.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: -1;
}

.orb-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--green-glow), transparent 70%);
}

.orb-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.08), transparent 70%);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.18);
}

/* Main */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 8rem;
    padding-bottom: 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--green);
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 100px;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out 0.1s both;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(2.75rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease-out 0.2s both;
}

.gradient-text {
    background: linear-gradient(135deg, var(--green), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--text-muted);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 540px;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.5s ease-out 0.3s both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 4rem;
    animation: fadeIn 0.5s ease-out 0.4s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--green);
    color: #000;
}

.btn-primary:hover {
    background: var(--green-dim);
    transform: translateY(-1px);
    box-shadow: 0 0 40px var(--green-glow);
}

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

.btn-ghost:hover {
    color: var(--text);
    background: var(--bg-elevated);
    border-color: rgba(255, 255, 255, 0.18);
}

/* Hero Terminal */
.hero-terminal {
    width: 100%;
    max-width: 680px;
    border-radius: var(--radius);
    border: 1px solid var(--border-hover);
    background: var(--bg-subtle);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 80px var(--green-glow);
    animation: fadeUp 0.6s ease-out 0.5s both;
}

.terminal-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-hover);
}

.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #28ca41; }

.terminal-title {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.25rem 1.5rem;
    font-family: var(--mono);
    font-size: 0.85rem;
}

.terminal-line {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.t-prompt { color: var(--green); }
.t-cmd { color: var(--text-muted); }
.t-text { color: var(--text); }

.cursor {
    color: var(--green);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.terminal-content {
    opacity: 1;
}

.ascii-logo {
    color: var(--green);
    font-size: 0.7rem;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    white-space: pre;
}

.tui-prompt {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.tui-menu {
    margin-bottom: 1.25rem;
    padding-left: 0.25rem;
}

.tui-item {
    line-height: 1.9;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tui-item.active {
    color: var(--green);
}

.tui-arrow {
    color: var(--green);
    font-weight: 700;
    margin-right: 0.25rem;
}

.tui-space {
    display: inline-block;
    width: 0.85rem;
    margin-right: 0.25rem;
}

.tui-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.tui-key {
    color: var(--text-secondary);
}

/* Logos strip */
.logos-strip {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.strip-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.strip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.strip-item svg {
    color: var(--text-muted);
}

.strip-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--text-muted);
    border: 1px solid var(--border-hover);
    border-radius: 4px;
}

.strip-divider {
    width: 1px;
    height: 20px;
    background: var(--border-hover);
}

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--green);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Features */
.features {
    padding: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(12px);
}

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

.feature-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.feature-highlight {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.25rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.04), rgba(20, 184, 166, 0.02));
    border-color: rgba(34, 197, 94, 0.15);
}

.feature-highlight .feature-icon-wrap {
    grid-row: 1 / 3;
}

.feature-highlight:hover {
    border-color: rgba(34, 197, 94, 0.25);
}

.feature-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 10px;
    color: var(--green);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.feature-highlight .feature-icon-wrap {
    margin-bottom: 0;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* Installation */
.installation {
    padding: 5rem 0;
}

.install-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.25rem;
    max-width: 820px;
    margin: 0 auto;
}

.install-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
}

.install-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.primary-install {
    border-color: rgba(34, 197, 94, 0.2);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.04), transparent);
}

.install-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.install-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.install-card-header h3 {
    margin-bottom: 0;
}

.recommended-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    color: var(--green);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 100px;
}

.code-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.copy-btn:hover {
    color: var(--text);
    background: var(--bg-elevated);
    border-color: var(--border-hover);
}

.copy-btn.copied {
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.3);
}

.code-body {
    padding: 0.85rem 1rem;
    font-family: var(--mono);
    font-size: 0.82rem;
}

.code-line {
    display: flex;
    gap: 0.6rem;
    line-height: 2;
}

.line-prompt {
    color: var(--text-muted);
    user-select: none;
}

.code-text {
    color: var(--text);
}

.install-docs-hint {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.install-docs-hint a {
    color: var(--green);
    text-decoration: none;
}

.install-docs-hint a:hover {
    text-decoration: underline;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
}

.cta-card {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(20, 184, 166, 0.03));
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 20px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
}

.cta-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-card h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.cta-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.cta-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.cta-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.cta-links a:hover {
    color: var(--text-secondary);
}

.cta-divider {
    color: var(--text-muted);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-right {
    display: flex;
    gap: 1.5rem;
}

.footer-right a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-right a:hover {
    color: var(--text-secondary);
}

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

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

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a:not(.nav-btn) {
        display: none;
    }

    .hero {
        padding-top: 7rem;
    }

    .hero-terminal {
        max-width: 100%;
    }

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

    .feature-highlight {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .feature-highlight .feature-icon-wrap {
        grid-row: auto;
        margin-bottom: 1rem;
    }

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

    .strip-divider {
        display: none;
    }

    .strip-items {
        gap: 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

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

    .cta-card {
        padding: 2.5rem 1.5rem;
    }
}
