/* ══════════════════════════════════════════════════
   open-source.css — ZSM Digital Open Source Page
   Matches developer / our-values patterns
   ══════════════════════════════════════════════════ */

.highlight { font-weight: 300; font-style: italic; }

/* ─── Hero ─── */
.oss-hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 160px 40px 80px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 70%),
        var(--bg-color);
}
.oss-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 1;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 72%);
}
.oss-hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.015) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}
.oss-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    animation: ossHeroReveal 1s cubic-bezier(0.23, 1, 0.32, 1) 0.3s forwards;
}
@keyframes ossHeroReveal {
    to { opacity: 1; transform: translateY(0); }
}
.oss-hero .hero-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
}
.oss-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    color: white;
}
.oss-hero h1 em {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 400;
}
.oss-hero h1 strong {
    font-weight: 400;
}
.oss-hero .hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.65;
    max-width: 620px;
    margin: 0 auto 40px;
    font-weight: 400;
}
.oss-hero .hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.oss-hero .hero-cta .primary-btn,
.oss-project-actions .primary-btn {
    background: white;
    color: #000;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}
.oss-hero .hero-cta .primary-btn:hover,
.oss-project-actions .primary-btn:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
}
.oss-hero .hero-cta .secondary-btn,
.oss-project-actions .secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #ccc;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.oss-hero .hero-cta .secondary-btn:hover,
.oss-project-actions .secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ─── Shared section typography ─── */
.oss-values,
.oss-featured {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.oss-values h2,
.oss-featured h2 {
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}
.section-subtitle {
    color: #888;
    font-size: 1rem;
    margin-top: 12px;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Value cards ─── */
.oss-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: left;
}
.oss-value-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 36px 28px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}
.oss-value-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}
.oss-value-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.oss-value-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.oss-value-card p {
    color: #888;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ─── Featured project ─── */
.oss-project-card {
    max-width: 820px;
    margin: 0 auto;
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.oss-project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.oss-project-label {
    display: inline-block;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #888;
    margin-bottom: 8px;
}
.oss-project-name {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.oss-project-status {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
    padding: 6px 12px;
    border-radius: 100px;
}
.oss-project-description {
    color: #888;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 24px;
}
.oss-project-description code,
.oss-feature-list code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85em;
    color: #ccc;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}
.oss-feature-list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
}
.oss-feature-list li {
    position: relative;
    padding-left: 22px;
    color: #aaa;
    font-size: 0.92rem;
    line-height: 1.5;
}
.oss-feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}
.oss-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 16px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 28px;
    font-size: 0.85rem;
    color: #888;
}
.oss-project-meta strong {
    color: #bbb;
    font-weight: 500;
}
.oss-project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ─── Philosophy & future ─── */
.oss-philosophy,
.oss-future {
    padding: 80px 24px;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.oss-philosophy h2,
.oss-future h2 {
    font-size: 2.25rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.oss-philosophy p,
.oss-future p {
    color: #888;
    line-height: 1.75;
    font-size: 1.05rem;
}

/* ─── CTA (matches developer) ─── */
.cta-section {
    background: rgba(255, 255, 255, 0.02);
    margin: 80px 20px 0;
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.cta-section h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 16px;
}
.cta-section p {
    color: #888;
    margin-bottom: 36px;
    font-size: 1rem;
}
.cta-btn {
    background: white;
    color: #000;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}
.cta-btn:hover {
    background: #e5e5e5;
    transform: translateY(-2px);
}

/* ─── Focus states ─── */
.oss-hero a:focus-visible,
.oss-project-card a:focus-visible,
.cta-section a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .oss-values-grid {
        grid-template-columns: 1fr;
    }
    .oss-feature-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .oss-hero {
        min-height: 60vh;
        padding: 130px 20px 50px;
    }
    .oss-values,
    .oss-featured {
        padding: 72px 20px;
    }
    .oss-project-card {
        padding: 28px 22px;
    }
    .oss-project-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .oss-project-meta {
        flex-direction: column;
        gap: 8px;
    }
    .oss-hero .hero-cta,
    .oss-project-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .oss-hero .hero-cta .primary-btn,
    .oss-hero .hero-cta .secondary-btn,
    .oss-project-actions .primary-btn,
    .oss-project-actions .secondary-btn {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .cta-section {
        margin: 60px 10px 0;
        padding: 40px 20px;
    }
}

/* ══════════════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════════════ */
body.light-theme .oss-hero {
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 0, 0, 0.03) 0%, transparent 70%),
        var(--bg-main);
}
body.light-theme .oss-hero::before {
    background-image: radial-gradient(rgba(0, 0, 0, 0.10) 1px, transparent 1px);
}
body.light-theme .oss-hero::after {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 0%, transparent 70%);
}
body.light-theme .oss-hero h1 { color: var(--text-dark); }
body.light-theme .oss-hero .hero-badge {
    background: #fff;
    border: 1px solid var(--border-soft);
    color: var(--text-gray);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
body.light-theme .oss-hero .hero-subtitle { color: var(--text-gray); }
body.light-theme .oss-hero .hero-cta .primary-btn,
body.light-theme .oss-project-actions .primary-btn {
    background: #111;
    color: #fff;
}
body.light-theme .oss-hero .hero-cta .primary-btn:hover,
body.light-theme .oss-project-actions .primary-btn:hover {
    background: #333;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
body.light-theme .oss-hero .hero-cta .secondary-btn,
body.light-theme .oss-project-actions .secondary-btn {
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border-line);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
body.light-theme .oss-hero .hero-cta .secondary-btn:hover,
body.light-theme .oss-project-actions .secondary-btn:hover {
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.18);
    color: var(--text-dark);
}

body.light-theme .oss-values h2,
body.light-theme .oss-featured h2,
body.light-theme .oss-philosophy h2,
body.light-theme .oss-future h2 {
    color: var(--text-dark);
}
body.light-theme .oss-values h2 .highlight,
body.light-theme .oss-featured h2 .highlight,
body.light-theme .oss-philosophy h2 .highlight,
body.light-theme .oss-future h2 .highlight {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: var(--text-dark);
}
body.light-theme .section-subtitle,
body.light-theme .oss-philosophy p,
body.light-theme .oss-future p,
body.light-theme .oss-project-description {
    color: var(--text-gray);
}
body.light-theme .oss-value-card,
body.light-theme .oss-project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
}
body.light-theme .oss-value-card:hover,
body.light-theme .oss-project-card:hover {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-card-hover);
}
body.light-theme .oss-value-icon {
    background: linear-gradient(135deg, #111, #444);
    border: none;
}
body.light-theme .oss-value-icon svg { stroke: #fff !important; }
body.light-theme .oss-value-card h3,
body.light-theme .oss-project-name {
    color: var(--text-dark);
}
body.light-theme .oss-value-card p,
body.light-theme .oss-feature-list li {
    color: var(--text-gray);
}
body.light-theme .oss-project-label,
body.light-theme .oss-project-meta {
    color: var(--text-gray);
}
body.light-theme .oss-project-meta strong {
    color: var(--text-mid);
}
body.light-theme .oss-project-description code,
body.light-theme .oss-feature-list code {
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.05);
}
body.light-theme .oss-feature-list li::before {
    background: rgba(0, 0, 0, 0.25);
}
body.light-theme .oss-project-meta {
    border-color: var(--border-soft);
}
body.light-theme .oss-project-status {
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.25);
    background: rgba(34, 197, 94, 0.1);
}

body.light-theme .cta-section {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
}
body.light-theme .cta-section h2 { color: var(--text-dark); }
body.light-theme .cta-section p { color: var(--text-gray); }
body.light-theme .cta-btn {
    background: #111;
    color: #fff;
}
body.light-theme .cta-btn:hover {
    background: #333;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
body.light-theme .oss-hero a:focus-visible,
body.light-theme .oss-project-card a:focus-visible,
body.light-theme .cta-section a:focus-visible {
    outline-color: rgba(0, 0, 0, 0.4);
}
