/* ============================================
   ScaleKeep Documentation Site - Custom Styles
   ============================================ */

:root {
    --sk-green: #4CAF50;
    --sk-green-dark: #388E3C;
    --sk-green-light: #C8E6C9;
    --sk-bg: #ffffff;
    --sk-bg-alt: #f8faf8;
    --sk-text: #333333;
    --sk-text-light: #666666;
    --sk-border: #e0e0e0;
    --sk-radius: 12px;
    --sk-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --sk-max-width: 960px;
}

/* ---- Global Reset ---- */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--sk-text);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

/* ---- Hide default theme sidebar for legal pages ---- */
body > .wrapper {
    max-width: var(--sk-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Site Navigation ---- */
.site-nav {
    background: var(--sk-bg);
    border-bottom: 1px solid var(--sk-border);
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav .nav-inner {
    max-width: var(--sk-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--sk-text);
    font-weight: 700;
    font-size: 1.1rem;
}

.site-nav .nav-brand img {
    width: 32px;
    height: 32px;
    border-radius: 7px;
}

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

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

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
    color: var(--sk-green);
}

/* ---- Landing Page ---- */
.landing-page {
    margin: 0;
    padding: 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 64px 24px 48px;
    background: linear-gradient(180deg, var(--sk-bg-alt) 0%, var(--sk-bg) 100%);
}

.hero .app-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    box-shadow: var(--sk-shadow);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--sk-text);
}

.hero .tagline {
    font-size: 1.15rem;
    color: var(--sk-text-light);
    margin: 0 0 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero .app-store-badge {
    display: inline-block;
}

.hero .app-store-badge img {
    height: 50px;
}

/* Features Section */
.features {
    padding: 64px 24px;
    max-width: var(--sk-max-width);
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    text-align: center;
    padding: 24px 16px;
}

.feature-card .feature-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--sk-text-light);
    margin: 0;
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots {
    padding: 64px 24px;
    background: var(--sk-bg-alt);
}

.screenshots h2 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 40px;
}

.screenshots-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 0 24px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: 1100px;
    margin: 0 auto;
}

.screenshots-scroll::-webkit-scrollbar {
    height: 6px;
}

.screenshots-scroll::-webkit-scrollbar-track {
    background: var(--sk-border);
    border-radius: 3px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--sk-green);
    border-radius: 3px;
}

.screenshots-scroll img {
    width: 220px;
    height: auto;
    border-radius: var(--sk-radius);
    box-shadow: var(--sk-shadow);
    scroll-snap-align: center;
    flex-shrink: 0;
}

/* Pricing Section */
.pricing {
    padding: 64px 24px;
    max-width: var(--sk-max-width);
    margin: 0 auto;
}

.pricing h2 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 40px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 640px;
    margin: 0 auto;
}

.pricing-card {
    border: 2px solid var(--sk-border);
    border-radius: var(--sk-radius);
    padding: 32px 24px;
    text-align: center;
}

.pricing-card.pro {
    border-color: var(--sk-green);
    position: relative;
}

.pricing-card.pro .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sk-green);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.pricing-card .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--sk-green-dark);
    margin: 0 0 20px;
}

.pricing-card .price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--sk-text-light);
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.pricing-card ul li {
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--sk-text-light);
}

.pricing-card ul li::before {
    content: "✓ ";
    color: var(--sk-green);
    font-weight: 700;
}

/* CTA Section */
.cta {
    text-align: center;
    padding: 64px 24px;
    background: var(--sk-bg-alt);
}

.cta h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.cta p {
    color: var(--sk-text-light);
    margin: 0 0 24px;
}

.cta .app-store-badge img {
    height: 50px;
}

/* Footer */
.site-footer {
    background: #2c2c2c;
    color: #cccccc;
    padding: 40px 24px;
    font-size: 0.85rem;
}

.site-footer .footer-inner {
    max-width: var(--sk-max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.site-footer .footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer .footer-links a:hover {
    color: var(--sk-green-light);
}

.site-footer .footer-contact a {
    color: var(--sk-green-light);
    text-decoration: none;
}

.site-footer .footer-copyright {
    width: 100%;
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #444;
    color: #999;
}

/* ---- Legal Pages (Markdown layout) ---- */

/* Navigation banner for legal pages */
.page-nav {
    background: var(--sk-bg-alt);
    border-bottom: 1px solid var(--sk-border);
    padding: 10px 0;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.page-nav a {
    color: var(--sk-green-dark);
    text-decoration: none;
}

.page-nav a:hover {
    text-decoration: underline;
}

/* Table of Contents for long pages */
.toc {
    background: var(--sk-bg-alt);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius);
    padding: 20px 24px;
    margin: 24px 0;
}

.toc h4 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: var(--sk-text);
}

.toc ul {
    margin: 0;
    padding-left: 20px;
}

.toc ul li {
    padding: 3px 0;
}

.toc ul li a {
    color: var(--sk-green-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

.toc ul li a:hover {
    text-decoration: underline;
}

/* Typography improvements for markdown pages */
.markdown-body h1,
section h1 {
    font-size: 1.8rem;
    font-weight: 800;
    border-bottom: 2px solid var(--sk-green);
    padding-bottom: 8px;
    margin-top: 0;
}

.markdown-body h2,
section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 40px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--sk-border);
}

.markdown-body h3,
section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 28px;
}

/* Tables */
section table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

section table th,
section table td {
    padding: 10px 14px;
    border: 1px solid var(--sk-border);
    text-align: left;
}

section table th {
    background: var(--sk-bg-alt);
    font-weight: 600;
}

/* Page footer for legal pages */
.page-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--sk-border);
    font-size: 0.85rem;
    color: var(--sk-text-light);
}

.page-footer a {
    color: var(--sk-green-dark);
    text-decoration: none;
    margin-right: 16px;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero {
        padding: 40px 16px 32px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero .tagline {
        font-size: 1rem;
    }

    .features {
        padding: 40px 16px;
    }

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

    .screenshots {
        padding: 40px 0;
    }

    .screenshots-scroll {
        padding: 0 16px 16px;
    }

    .screenshots-scroll img {
        width: 180px;
    }

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

    .site-footer .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-footer .footer-links {
        justify-content: center;
    }

    .site-nav .nav-brand span {
        display: none;
    }
}

@media (min-width: 769px) {
    .hero .app-icon {
        width: 120px;
        height: 120px;
    }

    .screenshots-scroll img {
        width: 260px;
    }
}
