/* ============================================================
   opensource.bar — Swiss-style open-source community hub
   Palette: Pastel retro-computing
   Font: Jost (Google Fonts) — geometric sans-serif
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pastel-lavender: #E0D8F0;
    --pastel-mint: #D0E8E0;
    --swiss-red: #E05040;
    --warm-charcoal: #2A2A30;
    --soft-peach: #F0D8C8;
    --retro-blue: #5080C0;
    --cream-white: #F8F4F0;

    --font-main: 'Jost', sans-serif;
    --grid-columns: 12;
    --gutter: 20px;
    --baseline: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.8;
    color: var(--warm-charcoal);
    background-color: var(--cream-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Swiss Grid Alignment Lines --- */
.grid-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background: repeating-linear-gradient(
        to right,
        var(--warm-charcoal) 0px,
        var(--warm-charcoal) 1px,
        transparent 1px,
        transparent calc(100% / 12)
    );
    transition: opacity 600ms ease;
}

.grid-lines.flash {
    opacity: 0.15;
}

/* --- Floating Geometric Elements --- */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    opacity: 0;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.floating-shape--circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.floating-shape--square {
    width: 10px;
    height: 10px;
}

.floating-shape--triangle {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 14px solid currentColor;
    background: none !important;
}

@keyframes floatDrift1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(80px, -60px) rotate(90deg); }
    50% { transform: translate(20px, -120px) rotate(180deg); }
    75% { transform: translate(-60px, -60px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes floatDrift2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-50px, -80px) rotate(60deg); }
    50% { transform: translate(-100px, -30px) rotate(180deg); }
    75% { transform: translate(-40px, 40px) rotate(240deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes floatDrift3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(60px, 50px) rotate(120deg); }
    50% { transform: translate(-30px, 100px) rotate(180deg); }
    75% { transform: translate(-80px, 30px) rotate(300deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

.floating-shape.settling {
    animation-duration: 40s !important;
    opacity: 0.15 !important;
    transition: opacity 2s ease, animation-duration 2s ease;
}

/* --- Bar Entrance (Hero) --- */
.bar-entrance {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pastel-lavender) 0%, var(--pastel-mint) 100%);
    overflow: hidden;
    z-index: 1;
}

.entrance-content {
    text-align: center;
    z-index: 10;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInUp 600ms ease forwards;
    animation-delay: 200ms;
}

.domain-title {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 52px);
    letter-spacing: -0.01em;
    color: var(--warm-charcoal);
    margin-bottom: 16px;
}

.entrance-tagline {
    font-weight: 400;
    font-size: clamp(15px, 1.2vw, 19px);
    color: var(--warm-charcoal);
    opacity: 0.7;
    max-width: 480px;
    margin: 0 auto;
}

.duotone-illustration {
    z-index: 8;
    width: 80%;
    max-width: 800px;
    margin-top: 48px;
    opacity: 0;
    animation: fadeIn 800ms ease forwards;
    animation-delay: 600ms;
    filter: grayscale(0.3) sepia(0.3) hue-rotate(10deg);
}

.community-illustration {
    width: 100%;
    height: auto;
}

.scroll-hint {
    position: absolute;
    bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 600ms ease forwards;
    animation-delay: 1200ms;
    z-index: 10;
}

.scroll-hint-text {
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--warm-charcoal);
    opacity: 0.5;
}

.scroll-hint svg {
    animation: bobDown 2s ease infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bobDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* --- Community Boards --- */
.community-boards {
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

.swiss-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* --- Board Panels --- */
.board-panel {
    grid-column: 3 / 11;
    background: var(--cream-white);
    border-radius: 8px;
    padding: 48px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(42, 42, 48, 0.06);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 400ms ease, transform 400ms ease;
    border-left: 4px solid transparent;
}

.board-panel:hover {
    border-left-color: var(--swiss-red);
}

.board-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-label {
    display: inline-block;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--retro-blue);
    margin-bottom: 12px;
}

.panel-label:hover {
    text-decoration: underline;
    text-decoration-color: var(--retro-blue);
}

.panel-title {
    font-weight: 700;
    font-size: clamp(24px, 2.5vw, 40px);
    letter-spacing: -0.01em;
    color: var(--warm-charcoal);
    margin-bottom: 32px;
}

/* --- Project Cards --- */
.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.project-card {
    position: relative;
    background: var(--soft-peach);
    border-radius: 8px;
    padding: 28px;
    transition: transform 200ms ease, box-shadow 200ms ease;
    cursor: default;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42, 42, 48, 0.1);
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 8px 0 0 8px;
    background: var(--swiss-red);
    opacity: 0;
    transition: opacity 200ms ease;
}

.project-card:hover .card-accent {
    opacity: 1;
}

.card-label {
    display: inline-block;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--retro-blue);
    margin-bottom: 8px;
}

.card-title {
    font-weight: 700;
    font-size: clamp(18px, 1.5vw, 22px);
    letter-spacing: -0.01em;
    color: var(--warm-charcoal);
    margin-bottom: 12px;
}

.card-description {
    font-weight: 400;
    font-size: clamp(14px, 0.9vw, 16px);
    line-height: 1.7;
    color: var(--warm-charcoal);
    opacity: 0.8;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-tag {
    display: inline-block;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(80, 128, 192, 0.12);
    color: var(--retro-blue);
}

.meta-stars {
    font-weight: 600;
    font-size: 12px;
    color: var(--swiss-red);
    margin-left: auto;
}

/* --- Duotone Panels --- */
.duotone-panel {
    grid-column: 1 / -1;
    margin: 20px 0 40px 0;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms ease, transform 400ms ease, filter 600ms ease;
    filter: grayscale(1);
}

.duotone-panel.visible {
    opacity: 1;
    transform: translateY(0);
    filter: grayscale(0) sepia(0.3) hue-rotate(10deg);
}

.duotone-panel:hover {
    filter: grayscale(0) sepia(0.4) hue-rotate(20deg) saturate(1.1);
}

.duotone-content {
    width: 100%;
}

.duotone-scene {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Initiative Grid --- */
.initiative-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.initiative-item {
    padding: 24px;
    background: var(--pastel-lavender);
    border-radius: 8px;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.initiative-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42, 42, 48, 0.08);
}

.initiative-icon {
    margin-bottom: 16px;
}

.initiative-title {
    font-weight: 700;
    font-size: clamp(16px, 1.2vw, 20px);
    letter-spacing: -0.01em;
    color: var(--warm-charcoal);
    margin-bottom: 8px;
}

.initiative-description {
    font-weight: 400;
    font-size: clamp(13px, 0.85vw, 15px);
    line-height: 1.7;
    color: var(--warm-charcoal);
    opacity: 0.8;
}

/* --- Activity List --- */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(42, 42, 48, 0.06);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--swiss-red);
    margin-top: 8px;
}

.activity-dot--blue {
    background: var(--retro-blue);
}

.activity-content {
    flex: 1;
}

.activity-time {
    display: block;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--warm-charcoal);
    opacity: 0.5;
    margin-bottom: 4px;
}

.activity-text {
    font-weight: 400;
    font-size: clamp(14px, 0.9vw, 16px);
    line-height: 1.6;
    color: var(--warm-charcoal);
}

.activity-text strong {
    font-weight: 600;
    color: var(--warm-charcoal);
}

/* --- Join Grid --- */
.join-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.join-card {
    background: var(--pastel-mint);
    border-radius: 8px;
    padding: 28px;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.join-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42, 42, 48, 0.08);
}

.join-title {
    font-weight: 700;
    font-size: clamp(16px, 1.2vw, 20px);
    letter-spacing: -0.01em;
    color: var(--warm-charcoal);
    margin-bottom: 12px;
}

.join-description {
    font-weight: 400;
    font-size: clamp(13px, 0.85vw, 15px);
    line-height: 1.7;
    color: var(--warm-charcoal);
    opacity: 0.8;
    margin-bottom: 16px;
}

.join-link {
    display: inline-block;
    font-weight: 600;
    font-size: 14px;
    color: var(--swiss-red);
    cursor: pointer;
    transition: color 200ms ease;
    position: relative;
}

.join-link::after {
    content: ' \2192';
}

.join-link:hover {
    color: var(--retro-blue);
}

/* --- Last Call (Footer) --- */
.last-call {
    position: relative;
    z-index: 2;
    background: var(--warm-charcoal);
    color: var(--cream-white);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.footer-brand {
    grid-column: 1 / 5;
}

.footer-title {
    font-weight: 700;
    font-size: clamp(22px, 2vw, 32px);
    letter-spacing: -0.01em;
    color: var(--cream-white);
    margin-bottom: 8px;
}

.footer-tagline {
    font-weight: 400;
    font-size: clamp(14px, 0.9vw, 16px);
    color: var(--cream-white);
    opacity: 0.6;
}

.footer-links {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-label {
    display: block;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pastel-lavender);
    margin-bottom: 8px;
}

.footer-link {
    font-weight: 400;
    font-size: 14px;
    color: var(--cream-white);
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 200ms ease, color 200ms ease;
}

.footer-link:hover {
    opacity: 1;
    color: var(--swiss-red);
}

.footer-info {
    grid-column: 9 / 13;
}

.footer-text {
    font-weight: 400;
    font-size: clamp(13px, 0.85vw, 15px);
    line-height: 1.7;
    color: var(--cream-white);
    opacity: 0.6;
}

.footer-bottom {
    max-width: 1200px;
    margin: 48px auto 0;
    padding: 24px var(--gutter) 0;
    border-top: 1px solid rgba(248, 244, 240, 0.1);
}

.footer-copyright {
    font-weight: 400;
    font-size: 13px;
    color: var(--cream-white);
    opacity: 0.4;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .board-panel {
        grid-column: 1 / -1;
        padding: 32px 24px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        margin-bottom: 24px;
    }

    .footer-links {
        grid-column: span 4;
    }

    .footer-info {
        grid-column: 1 / -1;
        margin-top: 24px;
    }

    .project-cards,
    .initiative-grid,
    .join-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .swiss-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .board-panel {
        padding: 24px 20px;
    }

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

    .footer-links {
        grid-column: 1 / -1;
    }

    .duotone-illustration {
        width: 95%;
    }
}
