/* Tour de Entete — tanpa build step (tidak perlu npm/Vite). */
:root {
    --ink: #221b17;
    --paper: #faf5ec;
    --card: #ffffff;
    --line: #e7dccb;
    --muted: #7a6d62;
    --brand: #9b2d1f;
    --brand-dark: #741f15;
    --gold: #e2a72a;
    --teal: #1d6b66;
    --radius: 14px;
    --font-head: "Archivo", "Arial Narrow", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.55 var(--font-body);
}
a { color: var(--brand); }
h1, h2 { font-family: var(--font-head); line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
main.wrap { padding: 28px 0 56px; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.strong { font-weight: 600; }
.r { text-align: right; }
.center { text-align: center; justify-content: center; }
.nowrap { white-space: nowrap; }

/* Motif tenun ikat sederhana */
.ikat {
    height: 8px;
    background:
        repeating-linear-gradient(90deg,
            var(--brand) 0 28px, var(--gold) 28px 40px,
            var(--ink) 40px 52px, var(--gold) 52px 64px,
            var(--teal) 64px 92px, var(--gold) 92px 104px);
}

/* Header */
.site-header { background: var(--ink); color: #fff; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-head); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.brand-mark { background: var(--gold); color: var(--ink); padding: 3px 8px; border-radius: 6px; font-size: 14px; }
.nav { display: flex; gap: 4px; }
.nav a { color: #e9dfd2; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 15px; }
.nav a:hover { background: rgba(255, 255, 255, .08); }
.nav a.active { background: var(--gold); color: var(--ink); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: 14px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 20px; border-radius: 10px; border: 2px solid transparent;
    font: 600 15px var(--font-body); text-decoration: none; cursor: pointer;
    transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost.disabled { opacity: .35; pointer-events: none; }
.btn-small { padding: 7px 14px; font-size: 14px; }
.btn.block { display: flex; width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: stretch; margin-bottom: 24px; }
.hero-text { background: var(--ink); color: #fff; border-radius: 20px; padding: 40px; position: relative; overflow: hidden; }
.hero-text::after {
    content: ""; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px;
    background: conic-gradient(from 45deg, var(--gold) 0 25%, transparent 0 50%, var(--brand) 0 75%, transparent 0);
    opacity: .85; transform: rotate(8deg);
}
.hero h1 { font-size: clamp(44px, 8vw, 84px); font-weight: 900; text-transform: uppercase; }
.hero .lead { max-width: 46ch; color: #e9dfd2; margin: 18px 0 0; font-size: 17px; position: relative; z-index: 1; }
.hero .actions { position: relative; z-index: 1; }
.hero .btn-ghost { color: #fff; border-color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: var(--ink); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; font-weight: 600; color: var(--gold); margin: 0 0 12px; }
.eyebrow.dark { color: var(--brand); }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; }
.hero-card h2 { font-size: 28px; font-weight: 800; text-transform: uppercase; }
.hero-card .date { font-weight: 600; margin: 14px 0 0; }
.countdown { margin: 6px 0 18px; color: var(--muted); }
.countdown strong { font-family: var(--font-head); font-size: 44px; color: var(--brand); line-height: 1; margin-right: 6px; }
.hero-card .btn { margin-top: auto; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; color: var(--muted); font-size: 14px; }
.stat .num { font-family: var(--font-head); font-weight: 800; font-size: 38px; color: var(--ink); line-height: 1.1; }

/* Cards & tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.section-title { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 900; text-transform: uppercase; }
.page-head p { margin: 8px 0 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font: 700 12px var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table th.r { text-align: right; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #fcf8f0; }
.table .empty { text-align: center; color: var(--muted); padding: 36px 12px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #efe8dc; color: var(--muted); }
.badge-sma { background: #d9eeec; color: var(--teal); }
.bib-chip { display: inline-block; font: 800 15px var(--font-head); background: var(--ink); color: var(--gold); padding: 3px 10px; border-radius: 6px; letter-spacing: .06em; }

/* Participant tabs / filters */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; }
.tab { flex: none; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.tab:hover { border-color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab .count { background: var(--gold); color: var(--ink); border-radius: 999px; padding: 0 8px; margin-left: 4px; font-size: 12px; font-weight: 700; }
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.list-head .section-title { margin-bottom: 2px; }
.search, .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters { margin-bottom: 16px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }

/* Forms */
.form-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.form { display: grid; gap: 20px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="tel"], input[type="search"], select, input[type="file"] {
    width: 100%; padding: 11px 13px; border: 1.5px solid #cdbfab; border-radius: 10px;
    font: 16px var(--font-body); background: #fff; color: var(--ink);
}
.search input[type="search"], .filters input[type="search"], .filters select { width: auto; min-width: 150px; padding: 8px 12px; font-size: 14.5px; }
input:focus, select:focus { outline: 3px solid rgba(226, 167, 42, .5); border-color: var(--gold); }
input[type="file"] { padding: 9px; }
.hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.err { margin: 6px 0 0; font-size: 14px; color: #b3261e; font-weight: 500; }
.alert { background: #fdecea; border: 1px solid #f3b8b3; color: #8a1c14; padding: 12px 14px; border-radius: 10px; font-weight: 500; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; display: block; cursor: pointer; margin: 0 !important; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice > span { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1.5px solid #cdbfab; border-radius: 12px; background: #fff; transition: border-color .15s, background .15s; }
.choice small { color: var(--muted); font-size: 13px; font-weight: 400; }
.choice input:checked + span { border-color: var(--brand); background: #fbeee9; box-shadow: inset 0 0 0 1px var(--brand); }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.side .checklist { margin: 0; padding-left: 18px; display: grid; gap: 10px; color: #4a3f36; }

/* BIB card */
.bib-card {
    width: min(640px, 100%); margin: 8px auto 22px; background: #fff; color: var(--ink);
    border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 8px 8px 0 var(--gold);
}
.bib-top { display: flex; justify-content: space-between; gap: 8px; background: var(--ink); color: #fff; padding: 10px 20px; font: 700 12.5px var(--font-head); letter-spacing: .14em; }
.bib-number { text-align: center; font: 900 clamp(72px, 20vw, 150px)/1 var(--font-head); letter-spacing: .02em; padding: 22px 12px 4px; color: var(--brand); }
.bib-name { text-align: center; font: 800 clamp(26px, 7vw, 44px)/1.1 var(--font-head); letter-spacing: .08em; padding: 0 12px 22px; }
.bib-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 3px dashed var(--ink); font-size: 14px; }
.bib-bottom strong, .bib-bottom span { display: block; }
.bib-bottom span { color: var(--muted); }
.receipt { width: min(640px, 100%); margin: 0 auto; display: grid; gap: 10px; }
.receipt > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.receipt > div:last-child { border: 0; padding: 0; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; text-align: right; }

/* Responsif */
@media (max-width: 860px) {
    .hero, .form-layout { grid-template-columns: 1fr; }
    .hero-text { padding: 28px; }
    .hero-text::after { width: 140px; height: 140px; }
}
@media (max-width: 640px) {
    .nav a { padding: 7px 9px; font-size: 14px; }
    .brand-name { display: none; }
    .stats { grid-template-columns: 1fr; }
    .choices { grid-template-columns: 1fr; }
    .card { padding: 18px; }

    /* Tabel jadwal menjadi kartu pada layar kecil */
    .table.stack thead { display: none; }
    .table.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .table.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; text-align: right; }
    .table.stack td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
    .table.stack td:last-child { justify-content: flex-end; padding-top: 10px; }
}

/* Cetak: hanya kartu BIB */
@media print {
    .no-print, .site-header, .site-footer, .ikat { display: none !important; }
    body { background: #fff; }
    .bib-card { box-shadow: none; margin-top: 0; }
    .card { border: 0; padding: 0; }
}
