/* Rollercoaster Record Challenge — basisstijl */

:root {
    --bg: #f7f4ec;
    --bg-dark: #0f2622;
    --bg-darker: #0a1c19;
    --panel: #ffffff;
    --panel-dark: #15332d;
    --text: #17312f;
    --text-light: #f3f0e6;
    --text-muted: #667b77;
    --text-muted-light: #a9beb8;
    --border: rgba(23, 49, 47, 0.12);
    --border-light: rgba(255, 255, 255, 0.12);
    --gold: #f5b942;
    --gold-dark: #c98f1f;
    --orange: #ed7138;
    --radius: 14px;
    --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', system-ui, sans-serif;
    line-height: 1.5;
}

.mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

h1, h2, h3, h4 {
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 16px;
}

h1 { font-size: 56px; }
h2 { font-size: 34px; }
h3 { font-size: 22px; }

p { margin: 0 0 16px; }

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--gold-dark); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

img { max-width: 100%; display: block; }

/* NAV */
.site-header {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 22px 0;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-weight: 800;
    font-size: 15px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.brand:hover { color: var(--text-light); }
.brand .badge-circle {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gold);
    color: var(--bg-darker);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
    flex-shrink: 0;
}
.site-nav { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--text-muted-light); font-weight: 600; font-size: 14px; }
.site-nav a:hover { color: var(--text-light); }
.site-nav .btn { color: var(--bg-darker); }

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    background: var(--gold);
    color: var(--bg-darker);
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
}
.btn:hover { background: var(--gold-dark); color: var(--bg-darker); }
.btn.outline {
    background: transparent;
    border: 1.5px solid currentColor;
    color: inherit;
}
.btn.small { padding: 10px 18px; font-size: 13px; }
.btn.dark { background: var(--bg-dark); color: var(--text-light); }
.btn.danger { background: #b3392f; color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* HERO */
.hero {
    background: linear-gradient(120deg, rgba(15,38,34,0.92), rgba(15,38,34,0.55)), var(--bg-darker);
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 90px 0 70px;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--orange);
    text-transform: uppercase;
    margin-bottom: 22px;
}
.hero h1 { max-width: 780px; }
.hero .lede { max-width: 560px; font-size: 18px; color: var(--text-muted-light); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }

/* STAT TILES */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 50px;
}
@media (max-width: 800px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stat-tile {
    padding: 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}
.stat-tile.on-light { background: var(--panel); border-color: var(--border); }
.stat-tile .value { font-size: 42px; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-tile.on-light .value { color: var(--bg-dark); }
.stat-tile .label { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.05em; color: var(--text-muted-light); margin-top: 8px; text-transform: uppercase; }
.stat-tile.on-light .label { color: var(--text-muted); }

/* SECTIONS */
.section { padding: 80px 0; }
.section.cream { background: var(--bg); }
.section.dark { background: var(--bg-dark); color: var(--text-light); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head .eyebrow { color: var(--orange); }

/* CARDS */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
}
.card.dark-panel { background: var(--panel-dark); border-color: var(--border-light); color: var(--text-light); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero { padding: 60px 0 40px; }
    h1 { font-size: 38px; }
    h2 { font-size: 26px; }
}

/* PARK / ROUTE CARDS */
.park-card {
    display: block;
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.park-card:hover { border-color: var(--orange); }
.park-card .park-day { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--orange); letter-spacing: 0.05em; text-transform: uppercase; }
.park-card h3 { margin: 8px 0 4px; }
.park-card .park-count { font-size: 13px; color: var(--text-muted); }
.park-card.finish { background: var(--bg-dark); color: var(--text-light); border-color: var(--gold); }
.park-card.finish .park-day { color: var(--gold); }
.park-card.finish .park-count { color: var(--gold); }

.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}
.status-pill.upcoming { background: rgba(102,123,119,0.15); color: var(--text-muted); }
.status-pill.current { background: rgba(237,113,56,0.15); color: var(--orange); }
.status-pill.done { background: rgba(15,38,34,0.1); color: var(--bg-dark); }

/* TEAM CARDS */
.team-card { text-align: center; padding: 24px; }
.team-card .avatar {
    width: 96px; height: 96px; border-radius: 50%;
    background: var(--bg-dark);
    margin: 0 auto 16px;
    background-size: cover;
    background-position: center;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light); font-weight: 800; font-size: 26px;
}
.team-card h3 { margin-bottom: 2px; font-size: 17px; }
.team-card .role { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--orange); text-transform: uppercase; margin-bottom: 10px; }
.team-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 0; }

/* FORMS */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number],
input[type=password], textarea, select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    background: var(--panel);
    color: var(--text);
}
textarea { resize: vertical; min-height: 90px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.checkbox-row input { margin-top: 3px; }
fieldset { border: none; padding: 0; margin: 0 0 26px; }
fieldset legend { font-weight: 800; font-size: 15px; margin-bottom: 14px; padding: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* FLASH */
.flash { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; font-weight: 600; }
.flash.success { background: #dff2e6; color: #1c6b3f; }
.flash.error { background: #fbe2df; color: #a3392b; }

/* FOOTER */
.site-footer {
    background: var(--bg-darker);
    color: var(--text-muted-light);
    padding: 40px 0;
    font-size: 13px;
}
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* TIMELINE (live logboek) */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border-light); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item .time { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--gold); white-space: nowrap; padding-top: 3px; }
.timeline-item .cat { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--orange); margin-bottom: 4px; }
.timeline-item h4 { margin: 0 0 4px; font-size: 16px; }
.timeline-item p { margin: 0; font-size: 14px; color: var(--text-muted-light); }
.timeline-item img { margin-top: 10px; border-radius: 10px; max-width: 320px; }

/* RIDER LIST (live tracking) */
.rider-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 10px; background: rgba(255,255,255,0.05); margin-bottom: 8px; }
.rider-row .name { font-weight: 700; }
.rider-row .progress { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--gold); }
.rider-row .rider-status { font-size: 11px; text-transform: uppercase; font-family: 'JetBrains Mono', monospace; padding: 3px 9px; border-radius: 999px; margin-left: 10px; }
.rider-row .rider-status.on_track { background: rgba(76,175,110,0.18); color: #7fd8a0; }
.rider-row .rider-status.recovery { background: rgba(237,113,56,0.18); color: var(--orange); }
.rider-row .rider-status.finished { background: rgba(245,185,66,0.2); color: var(--gold); }

#liveMap { width: 100%; height: 420px; border-radius: var(--radius); overflow: hidden; }

/* TABLES (beheer) */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
table th { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
