:root {
    --ink: #1b2733;
    --ink-soft: #5d6c7b;
    --ink-faint: #94a3b1;
    --sky: #1273c4;
    --bg: #fbfcfd;
    --line: #e2e8ee;
}

body {
    margin: 0;
    font-family: "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(180deg, #e7f2fa 0%, var(--bg) 480px)
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 22px 32px;
    border-bottom: 1px solid var(--line);
}

header h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

nav a {
    margin-left: 20px;
    font-size: 0.88rem;
    color: var(--ink-soft);
    text-decoration: none;
}

nav a:hover {
    color: var(--sky);
}

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 24px 96px;
}

footer {
    padding: 40px 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink-faint);
}

/* ── Hero ── */

.hero {
    padding: 72px 0 56px;
}

.hero-label {
    margin: 0 0 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: var(--sky);
}

.hero h2 {
    margin: 0 0 20px;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.hero-lead {
    margin: 0;
    font-size: 1rem;
    line-height: 2;
    color: var(--ink-soft);
}

.hero--home {
    padding: 120px 0 96px;
    text-align: center;
}

.cta {
    display: inline-block;
    margin-top: 40px;
    padding: 13px 40px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--sky);
    text-decoration: none;
    border: 1px solid var(--sky);
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cta:hover {
    color: white;
    background-color: var(--sky);
}

/* ── Filter ── */

.filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-label {
    width: 56px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
}

.filter-pill {
    padding: 6px 16px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.filter-pill:hover {
    color: var(--sky);
    border-color: var(--sky);
}

.filter-pill.is-active {
    color: white;
    background-color: var(--sky);
    border-color: var(--sky);
}

.filter-empty {
    padding: 48px 0;
    text-align: center;
    font-size: 0.92rem;
    color: var(--ink-faint);
}

/* ── Ride list ── */

.ride-list {
    border-top: 1px solid var(--line);
}

.ride {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 8px 40px;
    padding: 44px 0;
    border-bottom: 1px solid var(--line);
}

.ride[hidden] {
    display: none;
}

@media (max-width: 640px) {
    .ride {
        grid-template-columns: 1fr;
    }
}

.ride-when {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--ink-soft);
}

.ride-time {
    margin: 0 0 10px;
}

.ride-cc {
    display: inline-block;
    padding: 3px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--sky);
    border: 1px solid currentColor;
    border-radius: 999px;
}

.ride-roads {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: var(--ink-faint);
}

.ride-stars {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: var(--ink-faint);
}

.stars {
    margin-left: 4px;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--sky);
}

.stars-dim {
    color: #c9d6e0;
}

.ride h3 {
    margin: 0 0 18px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.ride:hover h3 {
    color: var(--sky);
}

.route {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    font-size: 0.95rem;
    font-weight: 600;
}

.route-line {
    position: relative;
    flex: 1;
    min-width: 48px;
    height: 1px;
    background: #c3d2de;
}

.route-line::after {
    content: "";
    position: absolute;
    top: -3.5px;
    right: 0;
    width: 7px;
    height: 7px;
    border-top: 1px solid #c3d2de;
    border-right: 1px solid #c3d2de;
    transform: rotate(45deg);
}

.ride-overview {
    margin: 0 0 22px;
    font-size: 0.92rem;
    line-height: 1.9;
    color: var(--ink-soft);
}

.ride-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.ride-members {
    font-size: 0.85rem;
    color: var(--ink-faint);
}

.ride-members strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.ride-join {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sky);
    text-decoration: none;
}

.ride-join:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ── Generic ── */

.card {
    margin-bottom: 20px;
    padding: 28px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.button {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 28px;
    color: white;
    background-color: var(--sky);
    border-radius: 999px;
    text-decoration: none;
}
