/* FinancialTouchstone Leaderboard - University of St. Gallen Branding */

:root {
    /* HSG Official Colors */
    --hsg-green: #00802f;
    --hsg-green-dark: #006624;
    --hsg-green-light: #00993a;
    --hsg-gray: #6f706f;
    --hsg-gray-light: #9a9b9a;

    /* Semantic Colors */
    --primary-color: var(--hsg-green);
    --primary-dark: var(--hsg-green-dark);
    --primary-light: var(--hsg-green-light);
    --text-color: #333333;
    --text-light: var(--hsg-gray);
    --bg-color: #ffffff;
    --bg-alt: #f5f5f5;
    --border-color: #e0e0e0;

    /* Effects */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 4px;
    --radius-lg: 8px;
    --transition: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.7;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6, .nav-brand, .btn, .stat-number, th {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Navbar */
.navbar {
    background: var(--bg-color);
    border-bottom: 3px solid var(--hsg-green);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--text-color);
    text-decoration: none;
}

.nav-brand:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    color: var(--text-color);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: var(--hsg-green);
    color: white;
    padding: 72px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero .subtitle {
    font-family: 'Palatino Linotype', Palatino, Georgia, serif;
    font-size: 1.35rem;
    font-weight: 400;
    font-style: italic;
    opacity: 0.95;
    margin-bottom: 28px;
}

.hero .description {
    max-width: 680px;
    margin: 0 auto 44px;
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 72px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 600;
    letter-spacing: -1px;
}

.stat-label {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
    font-size: 0.85rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.version-badge {
    display: inline-block;
    margin-top: 24px;
    padding: 8px 20px;
    background: rgba(0, 128, 47, 0.15);
    color: var(--hsg-green);
    border-radius: 20px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Sections */
.section {
    padding: 72px 0;
}

.section-alt {
    background-color: var(--bg-alt);
}

.section h2 {
    font-size: 1.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 44px;
    font-size: 1.05rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 44px;
}

.about-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.about-card:hover {
    border-color: var(--hsg-green);
    box-shadow: var(--shadow-md);
}

.about-icon {
    width: 52px;
    height: 52px;
    background: rgba(0, 128, 47, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.about-icon svg {
    width: 26px;
    height: 26px;
    color: var(--hsg-green);
}

.about-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.about-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Download Section */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.download-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 36px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.download-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.download-card > p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.download-note {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.dataset-info {
    margin-top: 48px;
    padding: 32px;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.dataset-info h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.dataset-info p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.dataset-info ul {
    list-style: none;
    padding: 0;
}

.dataset-info ul li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.dataset-info ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--hsg-green);
    border-radius: 50%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--hsg-green);
    color: white;
    border-color: var(--hsg-green);
}

.btn-primary:hover {
    background: var(--hsg-green-dark);
    border-color: var(--hsg-green-dark);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-light);
    color: var(--text-color);
}

/* Leaderboard Table */
.leaderboard-wrapper {
    overflow-x: auto;
    margin-bottom: 28px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.leaderboard-table thead {
    background: var(--hsg-green);
    color: white;
}

.leaderboard-table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table tbody tr:hover {
    background-color: rgba(0, 128, 47, 0.04);
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

.col-rank {
    width: 80px;
    text-align: center;
}

.col-model {
    min-width: 180px;
    font-weight: 600;
}

.col-model a {
    text-decoration: none;
}

.col-model a:hover {
    text-decoration: underline;
}

.col-score {
    width: 70px;
    text-align: center;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-weight: 600;
    font-size: 0.95rem;
}

.col-org {
    min-width: 160px;
}

.col-date {
    width: 110px;
    color: var(--text-light);
    font-size: 0.875rem;
}

.baseline-row {
    background-color: rgba(0, 128, 47, 0.08);
}

.baseline-row:hover {
    background-color: rgba(0, 128, 47, 0.12) !important;
}

.baseline-badge {
    display: inline-block;
    background: var(--hsg-green);
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metrics-explanation {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 24px;
    border-left: 3px solid var(--hsg-green);
}

.metrics-explanation h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.metrics-explanation ul {
    list-style: none;
}

.metrics-explanation li {
    margin-bottom: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.metrics-explanation strong {
    color: var(--text-color);
}

.metrics-explanation p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 12px;
}

.metrics-note {
    font-style: italic;
}

.col-hall {
    color: var(--hsg-gray);
}

/* Submit Section */
.submit-info {
    max-width: 580px;
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 36px;
    border: 1px solid var(--border-color);
}

.submit-info p {
    margin-bottom: 14px;
    color: var(--text-color);
}

.submit-info ul {
    margin-left: 20px;
    color: var(--text-light);
}

.submit-info li {
    margin-bottom: 6px;
}

/* Footer */
.footer {
    background: #2a2a2a;
    color: white;
    padding: 44px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.15rem;
}

.footer-logo {
    height: 36px;
    width: auto;
}

.footer-info p {
    opacity: 0.75;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.footer-info a {
    color: #7fcc99;
}

.footer-info a:hover {
    color: white;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: white;
    opacity: 0.75;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.5;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .nav-links {
        display: none;
    }

    .section {
        padding: 44px 0;
    }

    .about-grid,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

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

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    .col-org,
    .col-date {
        display: none;
    }
}
