/* ==========================================================================
   opensource.bar — Swiss aesthetic / pastel retro / minimal-navigation
   Palette:
     #2A2A30 warm charcoal (text)
     #F8F4F0 cream white (lightest)
     #D0E8E0 pastel mint (secondary bg)
     #5080C0 retro blue (secondary accent)
     #E0D8F0 pastel lavender (primary bg)
     #E05040 swiss red (primary accent)
     #F0D8C8 soft peach (card bg)
   Type: Jost (geometric sans, Futura-ish)
   ========================================================================== */

:root {
    --color-bg-primary: #E0D8F0;
    --color-bg-secondary: #D0E8E0;
    --color-bg-card: #F0D8C8;
    --color-bg-light: #F8F4F0;
    --color-text: #2A2A30;
    --color-accent-red: #E05040;
    --color-accent-blue: #5080C0;
    --color-lavender: #E0D8F0;
    --color-mint: #D0E8E0;
    --color-peach: #F0D8C8;
    --color-cream: #F8F4F0;

    --grid-gutter: 20px;
    --baseline: 8px;

    --font-display: 'Jost', 'Futura', 'Inter', system-ui, sans-serif;
    --font-body: 'Jost', 'Futura', 'Inter', system-ui, sans-serif;

    --shadow-soft: 0 2px 8px rgba(42, 42, 48, 0.10);
    --shadow-lifted: 0 6px 18px rgba(42, 42, 48, 0.14);

    --radius-soft: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-text);
    background: linear-gradient(180deg, var(--color-lavender) 0%, var(--color-mint) 100%);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
}

/* Swiss grid alignment lines (3% opacity vertical column boundaries) */
.grid-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: repeating-linear-gradient(
        90deg,
        var(--color-text) 0,
        var(--color-text) 1px,
        transparent 1px,
        transparent calc((100% - 11 * var(--grid-gutter)) / 12 + var(--grid-gutter))
    );
    transition: opacity 600ms ease;
}

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

/* Floating geometric elements */
.floaters {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floater {
    position: absolute;
    display: block;
    will-change: transform, opacity;
    opacity: 0;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

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

.floater-square {
    width: 10px;
    height: 10px;
    border-radius: 1px;
}

.floater-triangle {
    width: 14px;
    height: 14px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Twelve floaters with varied positions, colors, durations */
.f1 { top: 12%; left: 8%; background: var(--color-accent-red); animation: drift-a 16s linear infinite; animation-delay: -2s; }
.f2 { top: 22%; left: 78%; background: var(--color-accent-blue); animation: drift-b 18s linear infinite; animation-delay: -4s; }
.f3 { top: 35%; left: 25%; background: var(--color-peach); animation: drift-c 14s linear infinite; animation-delay: -6s; }
.f4 { top: 48%; left: 88%; background: var(--color-lavender); animation: drift-d 19s linear infinite; animation-delay: -1s; }
.f5 { top: 60%; left: 14%; background: var(--color-accent-blue); animation: drift-a 17s linear infinite; animation-delay: -7s; }
.f6 { top: 72%; left: 62%; background: var(--color-accent-red); animation: drift-b 15s linear infinite; animation-delay: -3s; }
.f7 { top: 82%; left: 32%; background: var(--color-mint); animation: drift-c 20s linear infinite; animation-delay: -9s; }
.f8 { top: 18%; left: 48%; background: var(--color-peach); animation: drift-d 13s linear infinite; animation-delay: -5s; }
.f9 { top: 90%; left: 76%; background: var(--color-accent-red); animation: drift-a 18s linear infinite; animation-delay: -11s; }
.f10 { top: 6%; left: 92%; background: var(--color-accent-blue); animation: drift-b 16s linear infinite; animation-delay: -8s; }
.f11 { top: 54%; left: 4%; background: var(--color-peach); animation: drift-c 12s linear infinite; animation-delay: -10s; }
.f12 { top: 28%; left: 56%; background: var(--color-lavender); animation: drift-d 19s linear infinite; animation-delay: -2s; }

@keyframes drift-a {
    0%   { transform: translate(0, 0); opacity: 0; }
    10%  { opacity: 0.45; }
    50%  { transform: translate(40px, -32px); opacity: 0.5; }
    90%  { opacity: 0.45; }
    100% { transform: translate(80px, -8px); opacity: 0; }
}

@keyframes drift-b {
    0%   { transform: translate(0, 0); opacity: 0; }
    12%  { opacity: 0.4; }
    50%  { transform: translate(-50px, 30px); opacity: 0.5; }
    88%  { opacity: 0.4; }
    100% { transform: translate(-90px, 12px); opacity: 0; }
}

@keyframes drift-c {
    0%   { transform: translate(0, 0); opacity: 0; }
    15%  { opacity: 0.35; }
    50%  { transform: translate(36px, 36px); opacity: 0.45; }
    85%  { opacity: 0.35; }
    100% { transform: translate(70px, 50px); opacity: 0; }
}

@keyframes drift-d {
    0%   { transform: translate(0, 0); opacity: 0; }
    10%  { opacity: 0.4; }
    50%  { transform: translate(-30px, -40px); opacity: 0.5; }
    90%  { opacity: 0.4; }
    100% { transform: translate(-60px, -70px); opacity: 0; }
}

.floater.paused {
    animation-play-state: paused !important;
}

.floater.settled {
    animation-duration: 36s !important;
}

/* Swiss 12-column grid shell */
.grid-shell {
    width: min(1280px, 92vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 var(--grid-gutter);
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Bar entrance / Hero
   ========================================================================== */
.entrance {
    min-height: 100vh;
    padding: calc(var(--baseline) * 4) 0 calc(var(--baseline) * 6);
    background: linear-gradient(180deg, var(--color-lavender) 0%, var(--color-mint) 100%);
    position: relative;
    display: flex;
    align-items: stretch;
}

.entrance .grid-shell {
    align-content: start;
    row-gap: calc(var(--baseline) * 5);
}

.bar-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--baseline) * 2) 0 calc(var(--baseline) * 3);
    border-bottom: 1px solid rgba(42, 42, 48, 0.18);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.bar-header.in {
    opacity: 1;
    transform: translateY(0);
}

.bar-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
}

.mark-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent-red);
    box-shadow: 0 0 0 4px rgba(224, 80, 64, 0.18);
}

.bar-nav {
    display: inline-flex;
    gap: calc(var(--baseline) * 4);
}

.nav-link {
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color 200ms ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 1px;
    background: var(--color-accent-blue);
    transition: right 240ms ease;
}

.nav-link:hover {
    color: var(--color-accent-blue);
}

.nav-link:hover::after {
    right: 0;
}

.entrance-content {
    grid-column: 1 / 9;
    display: flex;
    flex-direction: column;
    gap: calc(var(--baseline) * 3);
    align-self: center;
}

.overline {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-accent-red);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms ease 100ms, transform 600ms ease 100ms;
}

.overline.in { opacity: 1; transform: translateY(0); }

.title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(48px, 8vw, 132px);
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--color-text);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms ease 220ms, transform 600ms ease 220ms;
}

.title.in { opacity: 1; transform: translateY(0); }

.subtitle {
    font-size: clamp(15px, 1.2vw, 19px);
    line-height: 1.6;
    max-width: 56ch;
    color: var(--color-text);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms ease 360ms, transform 600ms ease 360ms;
}

.subtitle.in { opacity: 1; transform: translateY(0); }

.entrance-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--grid-gutter);
    padding-top: calc(var(--baseline) * 3);
    border-top: 1px solid rgba(42, 42, 48, 0.16);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms ease 480ms, transform 600ms ease 480ms;
}

.entrance-meta.in { opacity: 1; transform: translateY(0); }

.meta-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(42, 42, 48, 0.6);
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.entrance-figure {
    grid-column: 9 / -1;
    align-self: end;
    display: flex;
    flex-direction: column;
    gap: calc(var(--baseline) * 1.5);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 700ms ease 540ms, transform 700ms ease 540ms;
}

.entrance-figure.in {
    opacity: 1;
    transform: translateY(0);
}

.figure-caption {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(42, 42, 48, 0.55);
}

.duotone {
    width: 100%;
    border-radius: var(--radius-soft);
    overflow: hidden;
    background: var(--color-peach);
    box-shadow: var(--shadow-soft);
    transition: filter 600ms ease, box-shadow 320ms ease;
    filter: grayscale(1) sepia(0.3) hue-rotate(220deg) saturate(1.1);
}

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

.duotone-entrance {
    aspect-ratio: 4 / 3;
}

.duotone-entrance svg {
    width: 100%;
    height: 100%;
}

.duotone-a {
    filter: grayscale(1) sepia(0.4) hue-rotate(220deg) saturate(1.2);
}

.duotone-b {
    filter: grayscale(1) sepia(0.5) hue-rotate(20deg) saturate(1.1);
}

.duotone.warm {
    filter: grayscale(0.7) sepia(0.6) hue-rotate(0deg) saturate(1.3);
}

.entrance-scroll {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: calc(var(--baseline) * 4);
    opacity: 0.6;
}

.scroll-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(42, 42, 48, 0.55);
}

.scroll-line {
    flex: 1;
    height: 1px;
    background: rgba(42, 42, 48, 0.18);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 64px;
    background: var(--color-accent-blue);
    animation: scroll-glide 4s ease-in-out infinite;
}

@keyframes scroll-glide {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(2400%); }
}

/* ==========================================================================
   Sections — common heading
   ========================================================================== */
.boards, .snapshot, .house {
    padding: calc(var(--baseline) * 12) 0;
    position: relative;
}

.boards { background: var(--color-mint); }
.snapshot { background: var(--color-cream); }
.house { background: var(--color-lavender); }

.section-head {
    grid-column: 1 / 9;
    display: flex;
    flex-direction: column;
    gap: calc(var(--baseline) * 2);
    margin-bottom: calc(var(--baseline) * 8);
}

.section-tag {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-accent-red);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 52px);
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--color-text);
}

.section-lede {
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.7;
    color: var(--color-text);
    max-width: 60ch;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 400ms ease, transform 400ms ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Boards (project menu)
   ========================================================================== */
.board-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gutter);
}

.board-card {
    grid-column: span 4;
    background: var(--color-cream);
    border-radius: var(--radius-soft);
    padding: calc(var(--baseline) * 4);
    display: flex;
    flex-direction: column;
    gap: calc(var(--baseline) * 2);
    box-shadow: var(--shadow-soft);
    border-left: 4px solid transparent;
    transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
    position: relative;
    overflow: hidden;
}

.board-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(224, 80, 64, 0.04) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 240ms ease;
}

.board-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lifted);
    border-left-color: var(--color-accent-red);
}

.board-card:hover::before { opacity: 1; }

.board-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid rgba(42, 42, 48, 0.15);
    padding-bottom: calc(var(--baseline) * 1.5);
}

.board-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.04em;
    color: var(--color-accent-red);
}

.board-tag {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(42, 42, 48, 0.6);
}

.board-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(22px, 1.6vw, 28px);
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--color-text);
}

.board-desc {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(42, 42, 48, 0.85);
}

.board-meta {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: calc(var(--baseline) * 1);
    border-top: 1px dashed rgba(42, 42, 48, 0.15);
}

.board-meta li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    gap: 12px;
}

.meta-key {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    color: rgba(42, 42, 48, 0.55);
    font-size: 11px;
}

.meta-val {
    font-weight: 500;
    color: var(--color-text);
    text-align: right;
}

.board-foot {
    margin-top: auto;
    padding-top: calc(var(--baseline) * 1.5);
    border-top: 1px solid rgba(42, 42, 48, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.board-pour {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(42, 42, 48, 0.6);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pour-meter {
    display: inline-flex;
    gap: 3px;
    font-style: normal;
}

.pour-meter::before {
    content: '';
    display: block;
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--color-accent-red) var(--pct, 60%), rgba(42, 42, 48, 0.12) var(--pct, 60%));
}

.pour-2::before { --pct: 40%; }
.pour-3::before { --pct: 60%; }
.pour-4::before { --pct: 80%; }

.board-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(80, 128, 192, 0.12);
    transition: background 200ms ease, color 200ms ease;
}

.board-link:hover {
    background: var(--color-accent-blue);
    color: var(--color-cream);
}

/* ==========================================================================
   Snapshots (duotone gallery)
   ========================================================================== */
.snapshot-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: calc(var(--baseline) * 4) var(--grid-gutter);
}

.snap {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: calc(var(--baseline) * 1.5);
}

.snap-wide {
    grid-column: 1 / -1;
}

.snap .duotone {
    aspect-ratio: 16 / 11;
    transition: filter 600ms ease, box-shadow 320ms ease;
}

.snap-wide .duotone { aspect-ratio: 32 / 11; }

.snap:hover .duotone {
    filter: grayscale(0.4) sepia(0.6) hue-rotate(0deg) saturate(1.3);
    box-shadow: var(--shadow-lifted);
}

.snap figcaption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.snap-num {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--color-accent-red);
}

.snap-cap {
    font-size: 14px;
    line-height: 1.55;
    color: rgba(42, 42, 48, 0.85);
}

/* ==========================================================================
   House Rules
   ========================================================================== */
.house-rules {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gutter);
    list-style: none;
}

.rule {
    grid-column: span 6;
    background: var(--color-peach);
    border-radius: var(--radius-soft);
    padding: calc(var(--baseline) * 4);
    display: flex;
    flex-direction: column;
    gap: calc(var(--baseline) * 1.5);
    box-shadow: var(--shadow-soft);
    border-left: 4px solid transparent;
    transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease, background 240ms ease;
    position: relative;
}

.rule:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lifted);
    border-left-color: var(--color-accent-blue);
    background: var(--color-cream);
}

.rule-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 0.06em;
    color: var(--color-accent-red);
}

.rule-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(20px, 1.4vw, 26px);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--color-text);
}

.rule-body {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(42, 42, 48, 0.85);
}

/* ==========================================================================
   Footer / Last call
   ========================================================================== */
.footer {
    padding: calc(var(--baseline) * 10) 0 calc(var(--baseline) * 5);
    background: var(--color-cream);
    color: var(--color-text);
    position: relative;
}

.footer-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: var(--grid-gutter);
    padding-bottom: calc(var(--baseline) * 5);
}

.footer-cell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-mark {
    gap: 12px;
}

.footer-mark .mark-text {
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: none;
    letter-spacing: -0.005em;
    font-size: 15px;
}

.footer-blurb {
    font-size: 13px;
    line-height: 1.65;
    color: rgba(42, 42, 48, 0.7);
    max-width: 38ch;
    margin-top: 4px;
}

.footer-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-accent-red);
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: rgba(42, 42, 48, 0.85);
}

.footer-list li {
    line-height: 1.5;
}

.footer-rule {
    grid-column: 1 / -1;
    height: 1px;
    background: rgba(42, 42, 48, 0.18);
    margin: 0 0 calc(var(--baseline) * 3);
}

.footer-foot {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(42, 42, 48, 0.55);
}

.foot-tag { color: var(--color-accent-blue); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .entrance-content {
        grid-column: 1 / -1;
    }
    .entrance-figure {
        grid-column: 1 / -1;
        max-width: 70%;
    }
    .section-head { grid-column: 1 / -1; }
    .board-card { grid-column: span 6; }
    .snap { grid-column: span 12; }
    .rule { grid-column: span 12; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    :root { --grid-gutter: 14px; }
    .grid-shell { width: 92vw; }
    .bar-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .bar-nav { gap: calc(var(--baseline) * 2); }
    .entrance-meta { grid-template-columns: 1fr; }
    .board-card { grid-column: 1 / -1; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-foot { flex-direction: column; align-items: flex-start; }
    .entrance-figure { max-width: 100%; }
}
