/* Registrasi: tiket event + form 2 langkah. Butuh token warna dari style.css. */

.daftar { position: relative; overflow: hidden; }
.daftar::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
    mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
    pointer-events: none;
}
.daftar > .container { position: relative; }

.daftar-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.daftar-head p { font-size: clamp(16px, 2vw, 19px); margin-bottom: 0; }
.daftar-belief { max-width: 720px; margin: 40px auto 0; text-align: center; font-weight: 700; font-style: italic; color: #fff; }

.reg { display: grid; gap: 20px; max-width: 1060px; margin: 0 auto; }
.reg .reg-card { order: -1; }
@media (min-width: 960px) {
    .reg { grid-template-columns: .92fr 1.08fr; gap: 28px; align-items: stretch; }
    .reg .reg-card { order: 0; }
}

/* ---------- Tiket ---------- */

.ticket {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    color: var(--on-dark);
    background:
        radial-gradient(420px 260px at 100% 0%, rgba(63, 208, 255, .18), transparent 70%),
        linear-gradient(165deg, rgba(47, 124, 255, .22), rgba(10, 23, 51, .55) 55%);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    overflow: hidden;
}
.ticket-main { padding: 26px 24px 24px; }
@media (min-width: 600px) { .ticket-main { padding: 32px 30px 26px; } }

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(239, 68, 68, .15);
    border: 1px solid rgba(239, 68, 68, .45);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    line-height: 1.3;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); opacity: .55; } 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); } }

.ticket-title {
    margin: 18px 0 4px;
    font-size: clamp(36px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.04em;
    color: #fff;
    background: linear-gradient(95deg, #fff 35%, #8fdcff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ticket-sub { margin: 0 0 22px; font-weight: 600; color: #9fb3d9; }

.ticket-host { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; line-height: 1.35; }
.ticket-host img { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; box-shadow: 0 0 0 2px var(--navy-950), 0 0 0 4px var(--cyan); }
.ticket-host b { display: block; color: #fff; font-size: 16px; }
.ticket-host span { font-size: 13px; color: #9fb3d9; }

.ticket-desc { font-size: 15.5px; line-height: 1.65; margin: 0 0 22px; }
.ticket-desc strong { color: #fff; }

.ticket-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.meta {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    line-height: 1.3;
}
.meta svg { display: block; color: var(--cyan); margin-bottom: 8px; }
.meta b { display: block; color: #fff; font-size: 14px; }
.meta span { display: block; margin-top: 2px; font-size: 12px; color: #9fb3d9; }

.ticket-perf { position: relative; margin: 0 24px; border-top: 2px dashed rgba(255, 255, 255, .16); }
@media (min-width: 600px) { .ticket-perf { margin: 0 30px; } }

.ticket-foot { margin-top: auto; padding: 22px 24px 26px; }
@media (min-width: 600px) { .ticket-foot { padding: 24px 30px 30px; } }
.cd-label { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd div {
    padding: 10px 4px 8px;
    border-radius: 14px;
    background: rgba(6, 13, 32, .55);
    border: 1px solid rgba(255, 255, 255, .1);
    text-align: center;
    line-height: 1.1;
}
.cd b { display: block; font-size: clamp(24px, 3.4vw, 30px); font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.cd small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9fb3d9; }
.scarce { margin: 14px 0 0; font-size: 14px; font-weight: 600; line-height: 1.5; color: #ffd77a; }

/* ---------- Kartu form ---------- */

.reg-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px 18px 20px;
    border-radius: 28px;
    background: #fff;
    color: var(--ink-2);
    box-shadow: 0 40px 100px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06);
}
@media (min-width: 600px) { .reg-card { padding: 30px 32px 26px; } }

.stepper { display: flex; align-items: center; gap: 10px; list-style: none; margin: 0 0 24px; padding: 0; }
.stepper li { display: flex; }
.stepper button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}
.stepper button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
.stepper .num {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: var(--bg-soft);
    font-size: 13px;
    font-weight: 800;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.stepper .bar { flex: 1; height: 3px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.stepper .bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}
.stepper .is-active button { color: var(--ink); }
.stepper .is-active .num { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(47, 124, 255, .15); }
.stepper .is-done .num { background: var(--green) var(--icon-check) center / 13px no-repeat; border-color: var(--green); color: transparent; }
.reg-card[data-step="2"] .stepper .bar::after,
.reg-card[data-step="done"] .stepper .bar::after { transform: scaleX(1); }

.step { margin: 0; padding: 0; border: 0; min-width: 0; }
.step-title { padding: 0; margin: 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -.015em; color: var(--ink); }
.step-sub { margin: 0 0 18px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }

/* Tanpa JavaScript: tampilkan semua langkah; dengan JS: satu langkah per layar. */
.reg-card:not([data-step]) .stepper,
.reg-card:not([data-step]) .picked,
.reg-card:not([data-step]) .btn-next,
.reg-card:not([data-step="done"]) .reg-success { display: none; }
.reg-card:not([data-step]) .step-2 { margin-top: 26px; }
.reg-card[data-step="1"] .step-2,
.reg-card[data-step="2"] .step-1,
.reg-card[data-step="done"] .step,
.reg-card[data-step="done"] .reg-foot { display: none; }
.reg-card[data-step] .step { animation: step-in .35s ease both; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } }

/* Pilihan jadwal */
.slots { display: grid; gap: 10px; }
.slot { position: relative; display: block; cursor: pointer; }
.slot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px 12px 12px;
    border: 1.5px solid var(--line);
    border-radius: 18px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
}
.slot:hover .slot-card { border-color: #b8c9e6; transform: translateY(-1px); box-shadow: var(--shadow); }
.slot-cal {
    flex: none;
    width: 60px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    text-align: center;
    line-height: 1.15;
}
.slot-cal small:first-child { display: block; padding: 3px 0; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.slot-cal b { display: block; padding-top: 4px; font-size: 26px; font-weight: 800; color: var(--ink); }
.slot-cal small:last-child { display: block; padding-bottom: 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.slot-info { flex: 1; min-width: 0; line-height: 1.35; }
.slot-info b { display: block; font-size: 16px; color: var(--ink); }
.slot-info > span { display: block; font-size: 14px; color: var(--muted); }
.slot-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.slot-info .tag-rel { padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.slot-info .tag-near { background: #fff3d1; color: #8a5a00; }
.slot-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #c3cfe2; background: #fff; transition: background .15s, border-color .15s; }
.slot input:checked + .slot-card { border-color: var(--blue); background: #f3f8ff; box-shadow: 0 0 0 4px rgba(47, 124, 255, .12); }
.slot input:checked + .slot-card .slot-radio { border-color: var(--blue); background: var(--blue) var(--icon-check) center / 12px no-repeat; }
.slot input:focus-visible + .slot-card { outline: 3px solid var(--blue); outline-offset: 2px; }
.slots.has-error .slot-card { border-color: var(--red); }
.slots.has-error + .slot-error { display: block; }

.btn-next {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 15px 20px;
    border: 0;
    border-radius: 14px;
    background: var(--navy-900);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.btn-next:hover { background: var(--navy-800); }
.btn-next:active { transform: translateY(1px); }
.btn-next:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Ringkasan jadwal terpilih */
.picked {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px 8px 10px 14px;
    border-radius: 14px;
    background: #f3f8ff;
    border: 1px solid #d6e5ff;
    line-height: 1.35;
}
.picked > svg { flex: none; color: var(--blue); }
.picked small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.picked b { font-size: 14.5px; color: var(--ink); }
.link-btn { margin-left: auto; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--blue); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.link-btn:hover { background: #e3eeff; }

/* Input dengan label mengambang */
.ff { position: relative; margin-bottom: 14px; }
.ff input {
    width: 100%;
    height: 58px;
    padding: 22px 44px 6px 48px;
    border: 1.5px solid #d5ddea;
    border-radius: 14px;
    background: #f8fafd;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.ff input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(47, 124, 255, .14); }
.ff label {
    position: absolute;
    left: 48px; top: 18px;
    font-size: 16px;
    line-height: 1.4;
    color: #7b8aa3;
    pointer-events: none;
    transition: top .15s ease, font-size .15s ease, color .15s ease;
}
.ff input:focus + label,
.ff input:not(:placeholder-shown) + label { top: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ff input:focus + label { color: var(--blue); }
.ff-icon { position: absolute; left: 16px; top: 19px; color: #8a9ab3; pointer-events: none; transition: color .15s; }
.ff-icon svg { display: block; }
.ff input:focus ~ .ff-icon { color: var(--blue); }

.ff-hint { margin: 6px 2px 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.ff.has-error .ff-hint { display: none; }

.ff-ok {
    position: absolute;
    right: 14px; top: 19px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--green) var(--icon-check) center / 11px no-repeat;
    opacity: 0;
    transform: scale(.5);
    transition: opacity .2s, transform .2s;
}
.ff.is-valid .ff-ok { opacity: 1; transform: none; }

.ff-error { display: none; margin: 6px 2px 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--red); }
.ff.has-error input { border-color: var(--red); background: #fff; }
.ff.has-error label,
.ff.has-error .ff-icon { color: var(--red); }
.ff.has-error .ff-error { display: block; }

.ff-suggest { display: block; margin: 6px 2px 0; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink-2); text-align: left; cursor: pointer; }
.ff-suggest[hidden] { display: none; }
.ff-suggest b { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tombol kirim */
.reg-submit { position: relative; margin-top: 6px; }
.reg-submit .spinner {
    display: none;
    position: absolute;
    right: 22px; top: 50%;
    width: 20px; height: 20px;
    margin-top: -12px;
    border: 3px solid rgba(26, 19, 0, .2);
    border-top-color: var(--cta-ink);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.reg-card.is-loading .reg-submit { cursor: progress; filter: saturate(.7); }
.reg-card.is-loading .reg-submit .spinner { display: block; }
.reg-card.is-loading .reg-submit .btn-main svg { visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }

.reg-alert { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #fff1f1; border: 1px solid #ffd6d6; color: #991b1b; font-size: 14px; font-weight: 600; line-height: 1.45; }
.reg-alert[hidden] { display: none; }

.reg-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.reg-foot span { display: inline-flex; align-items: center; gap: 5px; }
.reg-foot a { color: var(--muted); }

/* Testimoni singkat di bawah form (di desktop menempel ke dasar kartu) */
.reg-proof { margin: 20px 0 0; padding: 16px 18px; border-radius: 16px; background: var(--bg-soft); border: 1px solid var(--line); }
.reg-proof blockquote { margin: 0 0 12px; font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.reg-proof figcaption { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.reg-proof img { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.reg-proof b { display: block; color: var(--ink); }
@media (min-width: 960px) { .reg-proof { margin-top: auto; } .reg-foot { margin-bottom: 24px; } }

/* Sukses */
.reg-success { padding: 18px 4px 4px; text-align: center; animation: step-in .4s ease both; }
.reg-success:focus { outline: none; }
.reg-success h3 { margin: 16px 0 8px; font-size: 26px; }
.reg-success p { margin: 0 0 12px; font-size: 15.5px; }
.success-icon svg { width: 76px; height: 76px; margin: 0 auto; }
.success-icon circle { fill: #e8f8ee; stroke: var(--green); stroke-width: 2.5; stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .6s ease forwards; }
.success-icon path { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .5s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-slot { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #f3f8ff; border: 1px solid #d6e5ff; color: var(--ink); font-weight: 700; }
.success-slot svg { color: var(--blue); }
.success-next { margin-top: 10px; color: var(--muted); font-size: 14px; }
.success-progress { height: 4px; margin: 0 auto 20px; max-width: 240px; border-radius: 4px; background: var(--line); overflow: hidden; }
.success-progress span { display: block; height: 100%; background: var(--blue); transform-origin: left; animation: progress 2.4s linear forwards; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Halaman /daftar/ ---------- */

.page-daftar { background: var(--navy-950); }
.mini-head { position: relative; z-index: 2; background: var(--navy-950); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mini-head .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.mini-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: -.01em; text-decoration: none; }
.mini-brand .live-dot { flex: none; }
.mini-head a.back { color: #9fb3d9; font-size: 14px; font-weight: 600; text-decoration: none; }
.mini-head a.back:hover { color: #fff; }
.daftar--page { padding: 44px 0 72px; }
.daftar--page h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); margin: 16px 0 12px; }
.daftar--page .daftar-head p { color: var(--on-dark); }
.footer--slim { padding: 32px 0; }

@media (prefers-reduced-motion: reduce) {
    .success-icon circle, .success-icon path { stroke-dashoffset: 0; }
}

/* ---------- Modal registrasi ---------- */

html.modal-open { overflow: hidden; }

.reg-modal {
    width: min(560px, calc(100% - 32px));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    color: var(--ink-2);
}
.reg-modal::backdrop { background: rgba(3, 7, 18, .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.reg-modal[open] { animation: modal-in .28s cubic-bezier(.2, .8, .2, 1); }
.reg-modal[open]::backdrop { animation: backdrop-in .28s ease; }
.reg-modal.is-closing { animation: modal-out .18s ease forwards; }
.reg-modal.is-closing::backdrop { animation: backdrop-out .18s ease forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes backdrop-out { to { opacity: 0; } }

.reg--modal {
    display: block;
    max-width: none;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 40px 120px rgba(0, 0, 0, .55);
}
.reg--modal .reg-card { box-shadow: none; border-radius: 0; }
.reg--modal .reg-foot { margin-bottom: 0; }

.modal-head {
    position: relative;
    padding: 26px 64px 22px 24px;
    color: var(--on-dark);
    background:
        radial-gradient(420px 220px at 100% 0%, rgba(63, 208, 255, .25), transparent 70%),
        linear-gradient(160deg, var(--navy-800), var(--navy-950));
}
@media (min-width: 600px) { .modal-head { padding: 30px 72px 24px 32px; } }
.modal-title { margin: 12px 0 10px; font-size: clamp(20px, 3vw, 24px); font-weight: 800; line-height: 1.25; letter-spacing: -.015em; color: #fff; }
.modal-host { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; line-height: 1.4; color: #b8c7e6; }
.modal-host img { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; box-shadow: 0 0 0 2px var(--cyan); }
.modal-host b { color: #fff; }
.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s;
}
.modal-close:hover { background: rgba(255, 255, 255, .22); }
.modal-close:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* HP: muncul dari bawah sebagai bottom sheet */
@media (max-width: 599px) {
    .reg-modal { width: 100%; margin: auto 0 0; }
    .reg--modal { max-height: 92dvh; border-radius: 24px 24px 0 0; }
    .reg-modal[open] { animation-name: sheet-in; }
    .reg-modal.is-closing { animation-name: sheet-out; }
    @keyframes sheet-in { from { transform: translateY(100%); } }
    @keyframes sheet-out { to { transform: translateY(100%); } }
}

@media (prefers-reduced-motion: reduce) {
    .reg-modal[open], .reg-modal.is-closing, .reg-modal[open]::backdrop, .reg-modal.is-closing::backdrop { animation: none; }
}
