/* === CodeBeats Landing Page === */
/* Palette inspired by One Dark theme */

:root {
    --bg: #1e2127;
    --bg-elevated: #282c34;
    --bg-card: #2c313a;
    --bg-status: #373b45;
    --border: #3e4451;
    --text: #abb2bf;
    --text-dim: #5c6370;
    --text-bright: #ffffff;
    --accent: #e06c75;
    --accent-hover: #ef7c85;
    --blue: #61afef;
    --green: #98c379;
    --yellow: #d19a66;
    --purple: #c678dd;
    --cyan: #56b6c4;

    --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

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

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

code {
    font-family: var(--font-mono);
    background: var(--bg-status);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--blue);
}

/* === Navbar === */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(30, 33, 39, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 18px;
    color: var(--text-bright);
}

.logo-icon {
    color: var(--accent);
    font-size: 22px;
}

.logo-text {
    letter-spacing: 0.5px;
}

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

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

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

.nav-cta {
    background: var(--accent);
    color: var(--text-bright) !important;
    padding: 8px 18px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.nav-cta:hover {
    background: var(--accent-hover);
}

/* === Hero === */
.hero {
    padding: 80px 0 60px;
    background: radial-gradient(ellipse at top, rgba(224, 108, 117, 0.08) 0%, transparent 60%);
}

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

.hero-text {
    max-width: 540px;
}

.hero-badge {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--blue);
    padding: 6px 14px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: 19px;
    color: var(--text);
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--accent);
    color: var(--text-bright);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(224, 108, 117, 0.3);
}

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

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-dim);
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    width: 100%;
    justify-content: center;
}

.btn-icon {
    font-size: 12px;
}

.hero-meta {
    color: var(--text-dim);
    font-size: 14px;
    font-family: var(--font-mono);
}

/* === Terminal Mockup === */
.terminal-mockup {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 13px;
}

.terminal-header {
    background: var(--bg-status);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.term-btn.red    { background: #ff5f56; }
.term-btn.yellow { background: #ffbd2e; }
.term-btn.green  { background: #27c93f; }

.terminal-title {
    flex: 1;
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
}

.terminal-body {
    background: var(--bg);
    color: var(--text);
}

.status-bar {
    background: var(--bg-status);
    padding: 4px 10px;
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
}

.status-accent { color: var(--accent); }
.status-sep    { color: var(--border); }
.status-file   { color: var(--text); }
.status-mod    { color: var(--accent); }
.status-lang   { color: var(--cyan); }
.status-right  { margin-left: auto; color: var(--green); }

.code-block {
    padding: 12px 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    background: var(--bg);
    color: var(--text);
    white-space: pre-wrap;
    word-break: keep-all;
}

.ln  { color: var(--text-dim); margin-right: 8px; display: inline-block; min-width: 20px; text-align: right; }
.cur { color: var(--text); }
.kw  { color: var(--purple); }
.ty  { color: var(--cyan); }
.fn  { color: var(--blue); }
.num { color: var(--yellow); }
.cm  { color: var(--text-dim); font-style: italic; }
.cursor-line {
    background: rgba(97, 175, 239, 0.08);
    display: inline-block;
    padding: 0 4px;
    border-left: 2px solid var(--blue);
}

.vis-panel {
    background: var(--bg-status);
    padding: 8px 10px;
    border-top: 1px solid var(--border);
}

.vis-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 50px;
    margin-bottom: 8px;
}

.bar {
    flex: 1;
    border-radius: 2px 2px 0 0;
    animation: barPulse 1.4s ease-in-out infinite;
}

.bar:nth-child(odd)  { animation-delay: 0s;    }
.bar:nth-child(even) { animation-delay: 0.2s;  }
.bar:nth-child(3n)   { animation-delay: 0.4s;  }
.bar:nth-child(4n)   { animation-delay: 0.6s;  }
.bar:nth-child(5n)   { animation-delay: 0.8s;  }

@keyframes barPulse {
    0%, 100% { transform: scaleY(1);    opacity: 1;   }
    50%      { transform: scaleY(0.55); opacity: 0.7; }
}

.vis-track {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text);
}

.track-icon  { color: var(--accent); }
.track-title { color: var(--text); flex: 1; }
.track-bar {
    width: 100px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.track-progress {
    display: block;
    width: 37%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}
.track-time { color: var(--blue); font-size: 11px; }

.cmd-line {
    background: var(--bg-elevated);
    padding: 4px 10px;
    color: var(--text-dim);
    font-size: 11px;
    border-top: 1px solid var(--border);
}

/* === Sections génériques === */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-bright);
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 56px;
}

/* === Features === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 32px rgba(224, 108, 117, 0.15);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    color: var(--text-bright);
    font-size: 19px;
    margin-bottom: 10px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

/* === Themes === */
.themes-section {
    background: var(--bg-elevated);
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.theme-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.theme-card:hover {
    transform: translateY(-4px);
}

.theme-preview {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 22px;
    line-height: 1.8;
    min-height: 130px;
}

.theme-name {
    background: rgba(0,0,0,0.3);
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-bright);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* One Dark */
.theme-onedark .theme-preview     { background: #1e2127; }
.theme-onedark .kw                 { color: #c678dd; }
.theme-onedark .fn                 { color: #61afef; }
.theme-onedark .cm                 { color: #5c6370; font-style: italic; }
.theme-onedark .num                { color: #d19a66; }

/* Dracula */
.theme-dracula .theme-preview     { background: #282a36; }
.theme-dracula .kw                { color: #ff79c6; }
.theme-dracula .fn                { color: #50fa7b; }
.theme-dracula .cm                { color: #6272a4; font-style: italic; }
.theme-dracula .num               { color: #bd93f9; }

/* Monokai */
.theme-monokai .theme-preview     { background: #272822; }
.theme-monokai .kw                { color: #f92672; }
.theme-monokai .fn                { color: #a6e22e; }
.theme-monokai .cm                { color: #75715e; font-style: italic; }
.theme-monokai .num               { color: #ae81ff; }

/* Gruvbox */
.theme-gruvbox .theme-preview     { background: #282828; color: #ebdbb2; }
.theme-gruvbox .kw                { color: #fb4934; }
.theme-gruvbox .fn                { color: #8ec07c; }
.theme-gruvbox .cm                { color: #928374; font-style: italic; }
.theme-gruvbox .num               { color: #d3869b; }

/* Bisqwit */
.theme-bisqwit .theme-preview     { background: #080814; color: #aaafbe; }
.theme-bisqwit .kw                { color: #ffffc8; }
.theme-bisqwit .fn                { color: #dcdcdc; }
.theme-bisqwit .cm                { color: #555a6e; font-style: italic; }
.theme-bisqwit .num               { color: #8cd2b4; }

/* === Download === */
.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.download-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}

.download-card:hover {
    transform: translateY(-4px);
}

.download-card.primary {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(224, 108, 117, 0.08), var(--bg-elevated));
}

.download-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--text-bright);
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-card h3 {
    color: var(--text-bright);
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 700;
}

.download-card > p {
    color: var(--text);
    margin-bottom: 18px;
    font-size: 15px;
}

.download-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.download-features li {
    padding: 6px 0;
    color: var(--text);
    font-size: 14px;
}

.download-size {
    margin-top: 12px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
}

/* === Install === */
.install-section {
    background: var(--bg-elevated);
}

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

.install-step {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--text-bright);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 18px;
    font-family: var(--font-mono);
}

.install-step h3 {
    color: var(--text-bright);
    font-size: 19px;
    margin-bottom: 10px;
    font-weight: 700;
}

.install-step p {
    margin-bottom: 16px;
    color: var(--text);
    font-size: 15px;
}

.cmd-snippet {
    background: #0d0f12;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--green);
    overflow-x: auto;
    white-space: pre;
}

/* === Shortcuts === */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.shortcut-group h3 {
    color: var(--text-bright);
    font-size: 19px;
    margin-bottom: 18px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.shortcut-table {
    width: 100%;
    border-collapse: collapse;
}

.shortcut-table td {
    padding: 10px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.shortcut-table td:first-child {
    width: 45%;
}

.shortcut-table td:last-child {
    color: var(--text);
}

kbd {
    background: var(--bg-status);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* === Footer === */
.footer {
    background: #15171c;
    padding: 60px 0 24px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-dim);
    margin-top: 8px;
    font-size: 14px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-col h4 {
    color: var(--text-bright);
    font-size: 14px;
    margin-bottom: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--text-bright);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    font-family: var(--font-mono);
}

/* === Responsive === */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero-subtitle {
        font-size: 16px;
    }

    .nav-links {
        gap: 18px;
    }

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

    .section-title {
        font-size: 30px;
    }

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

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    section {
        padding: 60px 0;
    }

    .hero {
        padding: 50px 0 40px;
    }

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

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