/* ================================================================
   THIS IS NOT A BIKE RACE — Marketing Site Stylesheet
   Faithful to the original design system provided.
   ================================================================ */

:root {
    --tinabr-black: #0d0d0d;
    --tinabr-dark: #141414;
    --tinabr-card: #1a1a1a;
    --tinabr-border: #2a2a2a;
    --tinabr-yellow: #f5e642;
    --tinabr-white: #f0f0f0;
    --tinabr-muted: #6b6b6b;
    --tinabr-font-head: 'Barlow Condensed', sans-serif;
    --tinabr-font-body: 'Inter', sans-serif;
}

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--tinabr-black);
    color: var(--tinabr-white);
    font-family: var(--tinabr-font-body);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tinabr-font-head);
}

.text-muted {
    color: var(--tinabr-muted) !important;
}

/* ── Background ──────────────────────────────────────────────── */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('https://images.unsplash.com/photo-1662502755996-ac9980b65e4b?auto=format&fit=crop&w=1920&q=60') center / cover no-repeat;
}

    .page-bg::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient( 100deg, rgba(13,13,13,0.67) 0%, rgba(13,13,13,0.92) 45%, rgba(13,13,13,0.80) 100% );
    }

    .page-bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
        opacity: 0.04;
        pointer-events: none;
    }

/* ── Navbar ────────────────────────────────────────────────── */
.tinabr-navbar {
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 1px solid var(--tinabr-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tinabr-brand {
    font-family: var(--tinabr-font-head);
    font-weight: 900;
    font-size: 0.85rem;
    line-height: 1.1;
    letter-spacing: 0.06em;
    color: #fff !important;
    text-decoration: none;
}

.brand-not {
    color: var(--tinabr-yellow);
}

.nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    text-transform: uppercase;
    font-family: var(--tinabr-font-head);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

    .nav-link:hover {
        color: var(--tinabr-yellow) !important;
    }

/* ── Hero ──────────────────────────────────────────────────── */
.tinabr-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: url('https://images.unsplash.com/photo-1662502755996-ac9980b65e4b?auto=format&fit=crop&w=1920&q=80') center / cover no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

/* Dark gradient overlay */
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( 135deg, rgba(13, 13, 13, 0.80) 0%, rgba(13, 13, 13, 0.92) 60%, rgba(13, 13, 13, 0.98) 100% );
    z-index: 0;
}

/* Grain texture */
.tinabr-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.01em;
}

    .hero-title .text-warning {
        color: var(--tinabr-yellow) !important;
    }

.hero-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 420px;
}

.hero-eyebrow .badge {
    font-family: var(--tinabr-font-head);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

/* Animated route SVG */
.hero-route-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    opacity: 0.35;
    pointer-events: none;
}

/* ── Cards ─────────────────────────────────────────────────── */
.tinabr-card {
    background: var(--tinabr-card);
    border: 1px solid var(--tinabr-border);
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .tinabr-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

.latest-route-card {
    backdrop-filter: blur(8px);
    background: rgba(26, 26, 26, 0.9);
    border-color: rgba(245, 230, 66, 0.2);
}

.feature-card {
    border-radius: 8px;
}

    .feature-card:hover {
        border-color: rgba(245, 230, 66, 0.3);
    }

/* ── Skeleton loaders ──────────────────────────────────────── */
@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

.skeleton-line,
.skeleton-btn {
    border-radius: 4px;
    background: linear-gradient(90deg, var(--tinabr-border) 25%, #333 50%, var(--tinabr-border) 75% );
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
}

    .skeleton-line.w-50 {
        width: 50%;
    }

    .skeleton-line.w-75 {
        width: 75%;
    }

    .skeleton-line.w-40 {
        width: 40%;
    }

.skeleton-btn {
    height: 38px;
    width: 100%;
    border-radius: 4px;
}

.route-stat {
    font-size: 0.875rem;
    color: rgba(240, 240, 240, 0.75);
}

/* ── How it works ──────────────────────────────────────────── */
.how-step {
    padding: 20px 16px;
}

.step-number {
    font-family: var(--tinabr-font-head);
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(245, 230, 66, 0.2);
    line-height: 1;
    margin-bottom: 4px;
}

.step-icon {
    line-height: 1;
}

/* ── Leaderboard section ───────────────────────────────────── */
.leaderboard-section {
    background: var(--tinabr-dark);
    border-top: 1px solid var(--tinabr-border);
    border-bottom: 1px solid var(--tinabr-border);
}

.leaderboard-preview-card {
    border-radius: 8px;
}

/* Spinner */
.leaderboard-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--tinabr-border);
    border-top-color: var(--tinabr-yellow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Table */
.tinabr-table {
    border-collapse: collapse;
    width: 100%;
    color: var(--tinabr-white);
    font-size: 0.9rem;
}

    .tinabr-table thead th {
        color: var(--tinabr-muted);
        text-transform: uppercase;
        font-family: var(--tinabr-font-head);
        font-size: 0.78rem;
        letter-spacing: 0.08em;
        padding: 12px 16px;
        border-bottom: 1px solid var(--tinabr-border);
        background: rgba(0, 0, 0, 0.25);
    }

    .tinabr-table td {
        padding: 14px 16px;
        border-bottom: 1px solid rgba(42, 42, 42, 0.5);
        vertical-align: middle;
    }

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

    .tinabr-table tbody tr {
        transition: background 0.15s;
    }

        .tinabr-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.03);
        }

.top-3-row {
    background: rgba(245, 230, 66, 0.04);
}

.rank {
    font-family: var(--tinabr-font-head);
    font-weight: 900;
    font-size: 1rem;
}

.rank-1 {
    color: var(--tinabr-yellow);
}

.rank-2 {
    color: #c0c0c0;
}

.rank-3 {
    color: #cd7f32;
}

.time-cell {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--tinabr-yellow);
    letter-spacing: 0.05em;
}

/* Podium cards */
.podium-card {
    text-align: center;
    padding: 24px 16px;
    border-radius: 8px;
}

    .podium-card.first-place {
        border-color: rgba(245, 230, 66, 0.4);
        background: rgba(245, 230, 66, 0.05);
        transform: translateY(-6px);
    }

.podium-medal {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 8px;
}

.podium-name {
    font-family: var(--tinabr-font-head);
    font-weight: 700;
    font-size: 1.1rem;
}

.podium-time {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--tinabr-yellow);
    font-size: 1.1rem;
}

.podium-bike {
    color: var(--tinabr-muted);
    font-size: 0.8rem;
}

/* ── CTA section ───────────────────────────────────────────── */
.cta-section {
    background: radial-gradient(ellipse at 50% 100%, rgba(245, 230, 66, 0.07) 0%, transparent 70%);
    border-top: 1px solid var(--tinabr-border);
}

.cta-inner {
    max-width: 560px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-warning {
    background: var(--tinabr-yellow);
    border: none;
    color: #111;
    font-family: var(--tinabr-font-head);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

    .btn-warning:hover {
        background: #ffe900;
        color: #111;
        box-shadow: 0 0 18px rgba(245, 230, 66, 0.55);
        transform: translateY(-2px);
    }

.btn-outline-warning {
    border-color: var(--tinabr-yellow);
    color: var(--tinabr-yellow);
    font-family: var(--tinabr-font-head);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

    .btn-outline-warning:hover {
        background: var(--tinabr-yellow);
        color: #111;
        box-shadow: 0 0 14px rgba(245, 230, 66, 0.45);
        transform: translateY(-2px);
    }

/* ── Section headings ──────────────────────────────────────── */
.section-heading {
    font-family: var(--tinabr-font-head);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Footer ────────────────────────────────────────────────── */
.tinabr-footer {
    background: var(--tinabr-dark);
    border-top: 1px solid var(--tinabr-border);
    position: relative;
    z-index: 9999;
}

/* Make footer feel more “designed” and taller */
.tinabr-footer {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

/* Brand block */
.tinabr-footer-brand {
    text-decoration: none;
    color: inherit;
}

.tinabr-footer-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    opacity: 0.9;
}

/* Small brand text */
.tinabr-brand-sm {
    font-family: var(--tinabr-font-head);
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: rgba(240, 240, 240, 0.6);
}

/* Footer links container */
.tinabr-footer-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

    .tinabr-footer-links a:hover {
        transform: translateY(-1px);
        color: var(--tinabr-yellow) !important;
    }

.social-links {
    display: flex;
    justify-content:center;
    gap: 18px;
    font-size: 18px;
}

    .social-links a {
        color: var(--tinabr-yellow);
        text-decoration: none;
        opacity: 0.8;
        transition: opacity 0.2s ease;
    }

        .social-links a:hover {
            opacity: 1;
        }

/* ── GSAP init states ──────────────────────────────────────── */
.gsap-fadein {
    opacity: 0;
    transform: translateY(20px);
}

/* ── Utility ───────────────────────────────────────────────── */
.text-warning {
    color: var(--tinabr-yellow) !important;
}

.border-secondary {
    border-color: var(--tinabr-border) !important;
}

.py-lg-6 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.z-1 {
    z-index: 1;
}

/* Legal content polish */
.legal-content p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: rgba(240,240,240,0.85);
}

.legal-content h2 {
    font-family: var(--tinabr-font-head);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--tinabr-yellow);
}

.legal-content strong {
    color: #fff;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 991px) {
    .tinabr-hero {
        background-attachment: scroll; /* parallax off on mobile */
        padding-top: 100px;
        padding-bottom: 60px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        max-width: 100%;
    }

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

    .podium-card.first-place {
        transform: none;
    }

    .tinabr-footer {
        text-align: center;
    }
}

/* ── Custom scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--tinabr-black);
}

::-webkit-scrollbar-thumb {
    background: var(--tinabr-border);
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #444;
    }
