/* ============================================================
   Diddly Squat — RAGBRAI 2026 Team Hub
   ============================================================ */

:root {
    --bg: #1a0a2e;
    --bg-alt: #0f1b3d;
    --surface: #1e1245;
    --border: #3a2a6a;
    --text: #fff5e6;
    --text-dim: #c8a8d8;
    --accent: #ffb347;
    --accent-glow: rgba(255, 179, 71, 0.2);
    --green: #40e0d0;
    --orange: #ff6b35;
    --red: #ff4081;
    --purple: #b266ff;
    --hot-pink: #ff4081;
    --teal: #40e0d0;
    --sunset-start: #ff4081;
    --sunset-mid: #ff6b35;
    --sunset-end: #ffb347;
    --radius: 20px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-groovy: 'Lobster', cursive;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Nav ---- */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-groovy);
    font-size: 22px;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--sunset-start), var(--sunset-mid), var(--sunset-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-logo:hover { text-decoration: none; }

.nav-links {
    display: flex;
    gap: 24px;
    font-size: 14px;
    font-weight: 600;
}
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-chat {
    background: linear-gradient(135deg, var(--hot-pink), var(--orange));
    color: #fff !important;
    padding: 6px 18px;
    border-radius: 50px;
    font-weight: 700;
}
.nav-chat:hover { opacity: 0.9; text-decoration: none !important; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
}

/* ---- Hero ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px 60px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 64, 129, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 107, 53, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(178, 102, 255, 0.08) 0%, transparent 60%),
        var(--bg);
}

.hero-tag {
    font-family: var(--font-groovy);
    font-size: 18px;
    letter-spacing: 1px;
    color: var(--teal);
    margin-bottom: 16px;
}

.hero h1 {
    font-family: var(--font-groovy);
    font-size: clamp(56px, 12vw, 120px);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    background: linear-gradient(135deg, var(--sunset-start), var(--sunset-mid), var(--sunset-end), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.hero-sub {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 40px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 48px;
}

.countdown-unit {
    text-align: center;
}

.countdown-num {
    display: block;
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(180deg, var(--sunset-end), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.countdown-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--hot-pink), var(--orange));
    color: #fff;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }

/* ---- Sections ---- */
.section {
    padding: 80px 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.section-alt {
    max-width: 100%;
    background: var(--bg-alt);
}
.section-alt > * {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.section h2 {
    font-family: var(--font-groovy);
    font-size: 40px;
    font-weight: 400;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--sunset-end), var(--hot-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-sub {
    color: var(--text-dim);
    margin-bottom: 40px;
    font-size: 16px;
}

/* ---- Day Grid ---- */
.day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.day-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background: linear-gradient(145deg, var(--surface), rgba(178, 102, 255, 0.08));
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.day-card:hover {
    border-color: var(--hot-pink);
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(255, 64, 129, 0.15);
}

.day-num {
    font-family: var(--font-groovy);
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--teal);
}

.day-date {
    font-size: 13px;
    color: var(--text-dim);
}

.day-card strong {
    font-size: 17px;
}

.day-miles {
    font-size: 14px;
    color: var(--text-dim);
}

/* ---- Map Preview ---- */
.map-preview-box {
    margin-bottom: 16px;
}

.map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    transition: border-color 0.2s;
}
.map-placeholder:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.map-how {
    color: var(--text-dim);
    font-size: 14px;
}

/* ---- Checklist ---- */
.checklist-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.checklist-group h3 {
    font-family: var(--font-groovy);
    font-size: 20px;
    color: var(--teal);
    margin-bottom: 12px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}

.check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
    cursor: pointer;
    flex-shrink: 0;
}

.check-item:has(input:checked) {
    color: var(--text-dim);
    text-decoration: line-through;
}

/* ---- Comms Grid ---- */
.comms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.comms-card {
    padding: 32px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.comms-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.comms-card h3 {
    font-family: var(--font-groovy);
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--sunset-end);
}

.comms-card p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
}

/* ---- Team Grid ---- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.team-member {
    padding: 24px 16px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.team-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.2), rgba(255, 179, 71, 0.2));
    border: 2px solid var(--hot-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-family: var(--font-groovy);
    font-size: 24px;
    font-weight: 400;
    color: var(--sunset-end);
}

.team-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.team-role {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding: 40px 24px;
    font-size: 13px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 16px;
    }
    .nav-toggle { display: block; }

    .hero h1 { letter-spacing: -1px; }
    .countdown { gap: 16px; }
    .countdown-num { font-size: 28px; }

    .section { padding: 60px 16px; }
    .day-grid { grid-template-columns: 1fr; }
    .comms-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Map Page ---- */
.map-page {
    padding-top: 56px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.map-container {
    flex: 1;
    position: relative;
}

.map-container #map {
    width: 100%;
    height: 100%;
}

.map-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    max-width: 280px;
    font-size: 13px;
}

.map-panel h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.rider-list {
    list-style: none;
}

.rider-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.rider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rider-dot.active { background: var(--green); }
.rider-dot.stale { background: var(--orange); }
.rider-dot.offline { background: var(--red); }

/* ---- Print Link ---- */
.print-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.print-link:hover { text-decoration: underline; }

/* ---- Print Styles ---- */
@media print {
    body { background: #fff; color: #000; }
    .top-nav, .hero, #route, #lodging, #map-preview, #comms, #team,
    .site-footer, .hero-actions, .print-link { display: none !important; }

    #gear { display: block !important; padding: 0; }
    #gear h2 { color: #000; font-size: 24px; margin-bottom: 4px; }
    #gear .section-sub { color: #444; }

    .checklist-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .checklist-group h3 { color: #000; }
    .check-item {
        color: #000;
        border-bottom-color: #ccc;
        font-size: 13px;
        padding: 4px 0;
    }
    .check-item input[type="checkbox"] {
        accent-color: #000;
        width: 14px;
        height: 14px;
    }
    .check-item:has(input:checked) {
        color: #999;
    }
}
