@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* =============================================
   DESIGN TOKENS — Material Design Light Theme
   ============================================= */
:root {
    /* Surfaces */
    --surface-0: #ffffff;
    --surface-1: #f8faf9;
    --surface-2: #f1f5f3;
    --surface-3: #e8eeeb;
    --surface-code: #f6f8fa;

    /* Text */
    --text-primary: #1a2e1f;
    --text-secondary: #4a6350;
    --text-tertiary: #7a9484;
    --text-inverse: #ffffff;

    /* Brand — Emerald / Frog Green */
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --primary-surface: #ecfdf5;
    --primary-glow: rgba(16, 185, 129, 0.12);

    /* Accents */
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Borders & Shadows (Material elevation) */
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.07), 0 4px 10px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.08), 0 8px 16px rgba(0,0,0,0.04);

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --max-width: 1200px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

img {
    max-width: 100%;
    display: block;
}

/* =============================================
   MATERIAL CARD
   ============================================= */
.card {
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-elevated {
    box-shadow: var(--shadow-md);
}

.card-elevated:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 64px;
    display: flex;
    align-items: center;
}

.navbar-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.navbar-brand img {
    height: 34px;
    width: 34px;
}

.navbar-brand span {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar-links a {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.navbar-links a:hover {
    background: var(--primary-surface);
    color: var(--primary-dark);
}

.navbar-links a.active {
    color: var(--primary-dark);
    font-weight: 600;
}

.navbar-links .nav-github {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.navbar-links .nav-github:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.navbar-links .nav-github svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mobile hamburger */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

.navbar-toggle svg {
    width: 24px;
    height: 24px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: var(--primary-surface);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    background:
        radial-gradient(ellipse at 20% 60%, rgba(16, 185, 129, 0.06), transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(16, 185, 129, 0.04), transparent 50%),
        var(--surface-0);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    max-width: 720px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-content h1 .text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-badges {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    background: var(--surface-2);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
    padding: 4.5rem 2rem;
}

.section-divider {
    width: min(100%, 900px);
    height: 1px;
    margin: -0.5rem auto 0;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.28), transparent);
}

.section-alt {
    background: var(--surface-0);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* =============================================
   FEATURES GRID
   ============================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    text-align: left;
}

.feature-card .icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    background: var(--primary-surface);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* =============================================
   STEPS / HOW IT WORKS
   ============================================= */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.step-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.step-item:nth-child(even) {
    direction: rtl;
}

.step-item:nth-child(even) > * {
    direction: ltr;
}

.step-text {
    padding: 1rem 0;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.step-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.step-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.step-image img {
    width: 100%;
    display: block;
}

/* =============================================
   DOWNLOAD / SETUP SECTION
   ============================================= */
.setup-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
}

.setup-step {
    margin-bottom: 2.5rem;
}

.setup-step:last-child {
    margin-bottom: 0;
}

.setup-step h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setup-step h3 .step-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-surface);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

pre {
    background: var(--surface-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-primary);
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

p code {
    background: var(--surface-code);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary-dark);
}

/* =============================================
   DOCS PAGE — SIDEBAR LAYOUT
   ============================================= */
.docs-wrapper {
    display: flex;
    max-width: 1300px;
    margin: 0 auto;
    padding: 80px 2rem 4rem;
    gap: 3rem;
    min-height: 100vh;
}

.docs-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 1.5rem 0;
}

.docs-sidebar-inner {
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.docs-sidebar h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
}

.docs-sidebar ul {
    list-style: none;
}

.docs-sidebar li {
    margin-bottom: 2px;
}

.docs-sidebar a {
    display: block;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.docs-sidebar a:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.docs-sidebar a.active {
    background: var(--primary-surface);
    color: var(--primary-dark);
    font-weight: 600;
}

.docs-main {
    flex: 1;
    min-width: 0;
}

.docs-content {
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.docs-hero {
    text-align: center;
    padding-bottom: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.docs-hero img {
    width: 72px;
    margin: 0 auto 1rem;
    animation: float 3s ease-in-out infinite;
}

.docs-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.docs-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.docs-content section {
    padding: 0;
    margin-bottom: 3.5rem;
}

.docs-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
    color: var(--text-primary);
}

.docs-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.docs-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.75;
}

.docs-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.docs-content li {
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.docs-content img {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    margin: 1.5rem 0;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.docs-content th {
    background: var(--surface-2);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-strong);
    color: var(--text-primary);
}

.docs-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.docs-content td code {
    background: var(--surface-code);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary-dark);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    background: var(--surface-0);
}

.footer a {
    color: var(--primary-dark);
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

/* =============================================
   WHAT'S NEW / RELEASE SECTION
   ============================================= */
.version-badge {
    display: inline-block;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.2em 0.7em;
    border-radius: 999px;
    background: var(--primary);
    color: var(--text-inverse);
    vertical-align: middle;
    margin-left: 0.5rem;
}

.release-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.release-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem;
}

.release-item:nth-child(even) {
    direction: rtl;
}

.release-item:nth-child(even) > * {
    direction: ltr;
}

.release-text {
    padding: 0.5rem 0;
}

.release-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    background: var(--primary-surface);
}

.release-text h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.release-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.release-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.release-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--primary-surface);
    color: var(--primary-dark);
    letter-spacing: 0.02em;
}

.release-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.release-image img {
    width: 100%;
    display: block;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
    .step-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .step-item:nth-child(even) {
        direction: ltr;
    }
    .release-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }
    .release-item:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.05rem;
    }
    .section {
        padding: 4rem 1.5rem;
    }
    .section-header h2 {
        font-size: 2rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .navbar-links {
        display: none;
    }
    .navbar-toggle {
        display: block;
    }
    .navbar-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface-0);
        border-bottom: 1px solid var(--border);
        padding: 1rem 2rem;
        box-shadow: var(--shadow-lg);
    }
    .docs-wrapper {
        flex-direction: column;
        padding-top: 72px;
    }
    .docs-sidebar {
        width: 100%;
        position: static;
        height: auto;
    }
    .docs-content {
        padding: 2rem 1.5rem;
    }
    .setup-card {
        padding: 2rem 1.5rem;
    }
}
