/* BananaWiki Landing Page — Dark theme matching BananaWiki's UI */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
    color-scheme: dark;
    --primary: #8fa0d4;
    --secondary: #1e1e2c;
    --accent: #7e9ada;
    --text: #c8ccd8;
    --sidebar: #1a1a24;
    --bg: #16161f;
    --card-bg: #1e1e2c;
    --border: rgba(255,255,255,.08);
    --border-hover: rgba(255,255,255,.15);
    --glow: rgba(143,160,212,.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ——— Container ——— */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ——— Topbar / Navigation ——— */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 1.5rem;
    background: var(--secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.topbar-left { display: flex; align-items: center; gap: .6rem; }

.logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .3px;
    text-decoration: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.nav-link {
    font-size: .85rem;
    color: var(--text);
    opacity: .65;
    transition: opacity .15s;
    text-decoration: none;
}
.nav-link:hover { opacity: 1; text-decoration: none; }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .3rem;
}
.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

/* ——— Buttons ——— */
.btn {
    display: inline-block;
    padding: .45rem 1rem;
    border-radius: 5px;
    font-size: .85rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all .15s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
    background: var(--primary);
    color: #0d0d14;
}
.btn-primary:hover { opacity: .88; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255,255,255,.03);
}

.btn-lg { padding: .6rem 1.5rem; font-size: .95rem; }

/* ——— Hero ——— */
.hero {
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(143,160,212,.08) 0%, transparent 70%),
        var(--bg);
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    background: rgba(143,160,212,.1);
    border: 1px solid rgba(143,160,212,.2);
    padding: .3rem .8rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #e8ecf4;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    opacity: .7;
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

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

.hero-tech-badges {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: .7;
}
.hero-tech-badges img { height: 22px; }
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0;
    height: 20px;
    font-size: .7rem;
    font-weight: 600;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    text-decoration: none;
    cursor: default;
    vertical-align: middle;
}
.tech-badge-label {
    padding: 0 .4rem;
    background: rgba(255,255,255,.12);
    color: var(--text);
    height: 100%;
    display: flex;
    align-items: center;
}
.tech-badge-value {
    padding: 0 .4rem;
    height: 100%;
    display: flex;
    align-items: center;
    color: #fff;
}
.tech-badge-blue   { background: #3572a5; }
.tech-badge-grey   { background: #555; }
.tech-badge-teal   { background: #003B57; }
.tech-badge-green  { background: #2d6a2e; }

/* ——— Sections ——— */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #e8ecf4;
    margin-bottom: .5rem;
}

.section-subtitle {
    text-align: center;
    font-size: .95rem;
    opacity: .5;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ——— Features Grid ——— */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.2rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color .2s, box-shadow .2s;
}
.feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 24px rgba(0,0,0,.2);
}

.feature-card-highlight {
    border-color: rgba(143,160,212,.15);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(143,160,212,.04) 100%);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: .6rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8ecf4;
    margin-bottom: .5rem;
}

.feature-card p {
    font-size: .87rem;
    opacity: .7;
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    margin-top: .8rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .3rem;
}
.feature-list li {
    font-size: .8rem;
    opacity: .6;
    padding-left: 1rem;
    position: relative;
}
.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    opacity: .7;
}

/* ——— Roles ——— */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.role-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.3rem;
    text-align: center;
    transition: border-color .2s;
}
.role-card:hover { border-color: var(--border-hover); }

.role-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(143,160,212,.15);
    color: var(--primary);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .6rem;
}

.role-card h4 {
    font-size: .95rem;
    color: #e8ecf4;
    margin-bottom: .3rem;
}

.role-card p {
    font-size: .82rem;
    opacity: .6;
    line-height: 1.5;
}

/* ——— Screenshots ——— */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}

.screenshot-card {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card-bg);
    transition: border-color .2s, transform .2s;
}
.screenshot-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.screenshot-card img {
    width: 100%;
    display: block;
}

.screenshot-label {
    display: block;
    padding: .5rem .8rem;
    font-size: .8rem;
    opacity: .55;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* ——— Story / Timeline ——— */
.story-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.story-timeline {
    position: relative;
    padding-left: 2rem;
}
.story-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), rgba(143,160,212,.15));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: .35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg);
    transform: translateX(-4px);
}

.timeline-date {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary);
    margin-bottom: .3rem;
}

.timeline-body h4 {
    font-size: 1rem;
    color: #e8ecf4;
    margin-bottom: .3rem;
}

.timeline-body p {
    font-size: .87rem;
    opacity: .7;
    line-height: 1.6;
}

.story-info-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
}

.info-card h4 {
    font-size: 1rem;
    color: #e8ecf4;
    margin-bottom: .5rem;
}

.info-card p {
    font-size: .85rem;
    opacity: .65;
    line-height: 1.6;
    margin-bottom: .5rem;
}

.info-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent);
}

/* ——— Quick Start ——— */
.quickstart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.2rem;
}

.quickstart-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.quickstart-card h4 {
    font-size: 1rem;
    color: #e8ecf4;
    margin-bottom: .8rem;
}

.quickstart-card pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: .8rem 1rem;
    overflow-x: auto;
    margin-bottom: .8rem;
}

.quickstart-card code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    font-size: .82rem;
    color: var(--primary);
    line-height: 1.7;
}

.quickstart-note {
    font-size: .82rem;
    opacity: .55;
    line-height: 1.5;
}
.quickstart-note code {
    font-size: .78rem;
    background: rgba(255,255,255,.06);
    padding: .1rem .35rem;
    border-radius: 3px;
}

.quickstart-steps {
    list-style: none;
    counter-reset: steps;
}
.quickstart-steps li {
    counter-increment: steps;
    font-size: .87rem;
    opacity: .75;
    padding: .4rem 0 .4rem 2rem;
    position: relative;
    line-height: 1.5;
}
.quickstart-steps li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(143,160,212,.15);
    color: var(--primary);
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quickstart-steps li code {
    font-size: .78rem;
    background: rgba(255,255,255,.06);
    padding: .1rem .35rem;
    border-radius: 3px;
    color: var(--primary);
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}

/* ——— Tech Stack ——— */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .8rem;
}

.tech-item {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    padding: .6rem .8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.tech-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary);
    opacity: .8;
    flex-shrink: 0;
    min-width: 80px;
}

.tech-value {
    font-size: .85rem;
    opacity: .7;
}

/* ——— Try Now Banner ——— */
.try-now-banner {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(143,160,212,.06) 0%, rgba(143,160,212,.02) 100%);
    border: 1px solid rgba(143,160,212,.2);
    border-radius: 12px;
    padding: 2.5rem;
}

.try-now-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.try-now-content h2 {
    font-size: 1.5rem;
    color: #e8ecf4;
    margin-bottom: .8rem;
}

.try-now-content p {
    font-size: .92rem;
    opacity: .7;
    line-height: 1.7;
    margin-bottom: .8rem;
}

.try-now-actions {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

/* ——— Featured Screenshot ——— */
.screenshot-featured {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(143,160,212,.2);
    background: var(--card-bg);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.screenshot-featured img {
    width: 100%;
    display: block;
}

.screenshot-featured .screenshot-label {
    font-size: .85rem;
    padding: .7rem 1rem;
}

/* ——— Hosting ——— */
.hosting-overview {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.hosting-main {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.hosting-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color .2s;
}
.hosting-card:hover { border-color: var(--border-hover); }

.hosting-card h3 {
    font-size: 1.05rem;
    color: #e8ecf4;
    margin-bottom: .5rem;
}

.hosting-card p {
    font-size: .87rem;
    opacity: .7;
    line-height: 1.6;
}

.hosting-card code {
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: .82rem;
    background: rgba(255,255,255,.06);
    padding: .1rem .35rem;
    border-radius: 3px;
    color: var(--primary);
}

.hosting-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    transition: border-color .2s;
}
.stat-card:hover { border-color: var(--border-hover); }

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: .2rem;
}

.stat-label {
    font-size: .72rem;
    opacity: .5;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ——— CTA ——— */
.cta-section {
    background:
        radial-gradient(ellipse 60% 50% at 50% 100%, rgba(143,160,212,.06) 0%, transparent 70%),
        var(--bg);
}

.cta-content {
    text-align: center;
    max-width: 550px;
}

.cta-content h2 {
    font-size: 1.8rem;
    color: #e8ecf4;
    margin-bottom: .5rem;
}

.cta-content p {
    font-size: .95rem;
    opacity: .55;
    margin-bottom: 1.5rem;
}

.cta-actions {
    display: flex;
    gap: .8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ——— Footer ——— */
.footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    background: var(--sidebar);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .8rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.footer-version {
    font-size: .75rem;
    opacity: .35;
}

.footer-links {
    display: flex;
    gap: 1rem;
}
.footer-links a {
    font-size: .82rem;
    opacity: .5;
    color: var(--text);
    transition: opacity .15s;
}
.footer-links a:hover { opacity: 1; text-decoration: none; }

.footer-credit {
    font-size: .75rem;
    opacity: .4;
    width: 100%;
    text-align: center;
    margin-top: .5rem;
}
.footer-credit a { color: var(--accent); }

/* ——— Responsive ——— */
@media (max-width: 768px) {
    .topbar-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: .6rem;
    }
    .topbar-right.open { display: flex; }
    .mobile-menu-btn { display: flex; }

    .hero { padding: 3rem 1rem 2.5rem; }
    .hero h1 { font-size: 1.8rem; }

    .features-grid,
    .roles-grid,
    .screenshots-grid,
    .quickstart-grid,
    .tech-grid { grid-template-columns: 1fr; }

    .story-content,
    .hosting-overview { grid-template-columns: 1fr; }

    .try-now-banner { flex-direction: column; gap: 1rem; padding: 1.5rem; }
    .try-now-icon { font-size: 2rem; }

    .feature-list { grid-template-columns: 1fr; }

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

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .btn-lg { width: 100%; text-align: center; }
}

/* ——— Language switcher ——— */
.lang-switch {
    opacity: 0.75;
    font-size: 0.85rem;
}
.lang-switch:hover { opacity: 1; }
