/* ============================================================
   Open Source Page — Cerosoft AirPoint
   Inherits all design tokens from style.css
   ============================================================ */

/* ── Hero Badge ── */
.oss-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #ffffff;
    border: 2px solid var(--text-primary);
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    box-shadow: 3px 3px 0px rgba(15, 23, 42, 1);
    margin-bottom: 24px;
    animation: ossBadgeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes ossBadgeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.oss-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    animation: ossDotPulse 2s ease-in-out infinite;
}

@keyframes ossDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

/* ── Hero Layout ── */
.oss-hero {
    text-align: center;
    padding-top: 150px;
    padding-bottom: 60px;
}

.oss-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 20px;
}

.oss-hero-desc {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.oss-hero-app {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.oss-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    border: 2px solid var(--text-primary);
    box-shadow: 4px 4px 0px rgba(15, 23, 42, 1);
    overflow: hidden;
}

.oss-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.oss-hero-app-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ── Repo Cards Grid ── */
.oss-repos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 80px;
}

@media (max-width: 768px) {
    .oss-repos-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Repo Card ── */
.oss-repo-card {
    background: #ffffff;
    border: 2px solid var(--text-primary);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 8px 8px 0px rgba(15, 23, 42, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.oss-repo-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px rgba(15, 23, 42, 0.15);
}

.oss-repo-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.oss-repo-gh-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--text-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--text-primary);
    box-shadow: 3px 3px 0px rgba(15, 23, 42, 0.3);
}

.oss-repo-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}

.oss-repo-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 24px;
}

/* ── Repo Meta Tags ── */
.oss-repo-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.oss-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--bg-color);
    border: 1.5px solid rgba(15, 23, 42, 0.12);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.oss-meta-tag svg {
    flex-shrink: 0;
}

/* ── Repo Action Buttons ── */
.oss-repo-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.oss-btn-github {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--text-primary);
    color: #ffffff !important;
    border: 2px solid var(--text-primary) !important;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 4px 4px 0px rgba(15, 23, 42, 1) !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.oss-btn-github:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(15, 23, 42, 1) !important;
}

.oss-btn-github:active {
    transform: translate(4px, 4px) scale(0.98);
    box-shadow: 0px 0px 0px rgba(15, 23, 42, 1) !important;
}

.oss-btn-star {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #ffffff;
    color: var(--text-primary);
    border: 2px solid var(--text-primary) !important;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 4px 4px 0px rgba(15, 23, 42, 1) !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.oss-btn-star:hover {
    background: #fef9c3;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(15, 23, 42, 1) !important;
}

.oss-btn-star:active {
    transform: translate(4px, 4px) scale(0.98);
    box-shadow: 0px 0px 0px rgba(15, 23, 42, 1) !important;
}

.oss-btn-star .star-icon {
    transition: transform 0.3s ease;
}

.oss-btn-star:hover .star-icon {
    transform: scale(1.25) rotate(15deg);
}

/* ── Star CTA Banner ── */
.oss-star-cta {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
    border: 2px solid var(--text-primary) !important;
    border-radius: 24px;
    padding: 56px 48px;
    text-align: center;
    box-shadow: 6px 6px 0px rgba(15, 23, 42, 0.1) !important;
    margin-bottom: 80px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.oss-star-cta:hover {
    transform: scale(1.01);
    box-shadow: 10px 10px 0px rgba(15, 23, 42, 0.15) !important;
}

.oss-star-cta h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.oss-star-cta p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.oss-star-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Why Open Source Section ── */
.oss-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
    margin-bottom: 80px;
}

@media (max-width: 900px) {
    .oss-why-grid {
        grid-template-columns: 1fr;
    }
}

.oss-why-card {
    background: #ffffff;
    border: 2px solid var(--text-primary);
    border-radius: 20px;
    padding: 36px 28px;
    box-shadow: 4px 4px 0px rgba(15, 23, 42, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.oss-why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.oss-why-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-color);
    border: 1.5px solid rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-primary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.oss-why-card:hover .oss-why-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--accent-blue);
}

.oss-why-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.oss-why-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ── Back to Product Link ── */
.oss-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 32px;
    transition: color 0.2s, gap 0.2s;
}

.oss-back-link:hover {
    color: var(--text-primary);
    gap: 12px;
}

/* ── Responsive Fine-tuning ── */
@media (max-width: 480px) {
    .oss-repo-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .oss-repo-actions {
        flex-direction: column;
    }

    .oss-btn-github,
    .oss-btn-star {
        width: 100%;
        justify-content: center;
    }

    .oss-star-cta {
        padding: 40px 20px;
    }

    .oss-star-cta h2 {
        font-size: 1.5rem;
    }

    .oss-hero h1 {
        font-size: 2rem;
    }
}
