/* ==========================================================================
   eventIX storefront
   Same tokens as the console so both read as one product.
   No framework, no webfonts — this page loads on a phone, on mobile data.
   ========================================================================== */

:root {
    --ink:        #0A1410;
    --ink-2:      #10201A;
    --ink-3:      #16291F;
    --ink-4:      #1D3427;

    --bone:       #EAE7DC;
    --bone-dim:   #8FA396;
    --bone-faint: #5E7268;

    --gold:       #E8B22C;
    --gold-soft:  rgba(232, 178, 44, .13);
    --magenta:    #FF2E88;
    --magenta-soft: rgba(255, 46, 136, .13);

    --mint:       #7BD8A6;
    --amber:      #F5A524;
    --red:        #FF6B6B;

    --line:       rgba(232, 178, 44, .16);
    --line-soft:  rgba(232, 178, 44, .07);

    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;

    --shell: 940px;
    --bar-h: 78px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--bone);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 20px; }
.nums { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

/* ---------- top ---------- */
.top {
    position: sticky; top: 0; z-index: 30;
    background: rgba(10, 20, 16, .8);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.top-in { display: flex; align-items: center; gap: 12px; height: 56px; }
.mark {
    width: 29px; height: 29px; border-radius: 8px; flex: none;
    background: linear-gradient(140deg, var(--gold), #B4831A);
    display: grid; place-items: center;
}
.mark svg { width: 16px; height: 16px; }
.word { font-family: var(--mono); font-weight: 700; letter-spacing: -.01em; }
.top-dial {
    margin-left: auto; font-family: var(--mono); font-size: .72rem;
    color: var(--bone-dim); border: 1px solid var(--line-soft);
    padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.top-dial b { color: var(--gold); font-weight: 700; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(10,20,16,.34) 0%, rgba(10,20,16,.8) 58%, var(--ink) 100%),
        radial-gradient(120% 80% at 18% 0%, rgba(255,46,136,.22), transparent 62%);
}
.hero-in { position: relative; padding: 74px 0 40px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--mono); font-size: .68rem; letter-spacing: .22em;
    text-transform: uppercase; color: var(--gold); margin: 0 0 15px;
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--gold); }

.hero-title {
    font-family: var(--mono); font-weight: 700;
    font-size: clamp(2.1rem, 8vw, 3.9rem); line-height: 1.02;
    letter-spacing: -.035em; text-transform: uppercase;
    margin: 0 0 20px; text-wrap: balance;
}

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 13px; border-radius: 999px;
    background: rgba(255,255,255,.06); border: 1px solid var(--line-soft);
    font-size: .85rem;
}
.chip svg { width: 14px; height: 14px; color: var(--gold); flex: none; }
.chip.is-price { background: var(--gold-soft); border-color: var(--line); }
.chip.is-price b { color: var(--gold); font-weight: 700; }

/* ---------- sections ---------- */
.sec { padding: 44px 0; }
.sec-head { margin-bottom: 22px; }
.sec-title {
    font-family: var(--mono); font-weight: 700; font-size: 1.3rem;
    letter-spacing: -.02em; text-transform: uppercase; margin: 0 0 5px;
}
.sec-sub { margin: 0; color: var(--bone-dim); font-size: .92rem; }
.prose { color: var(--bone-dim); max-width: 64ch; margin: 0; }

/* ---------- tiers ---------- */
.tiers { display: grid; gap: 12px; }

.tier { position: relative; }
.tier input { position: absolute; opacity: 0; width: 0; height: 0; }

.tier-card {
    display: grid; grid-template-columns: 72px 1fr 24px; gap: 16px; align-items: center;
    padding: 16px; cursor: pointer;
    background: var(--ink-2); border: 1px solid var(--line-soft);
    border-radius: 14px;
    transition: border-color .2s ease, background .2s ease, transform .18s ease;
}
.tier-card:hover { border-color: var(--line); transform: translateY(-2px); }
.tier input:focus-visible + .tier-card { outline: 2px solid var(--gold); outline-offset: 3px; }
.tier input:checked + .tier-card {
    border-color: var(--gold);
    background: linear-gradient(140deg, var(--gold-soft), var(--ink-2) 62%);
}
/* the stub perforation marks the chosen ticket */
.tier input:checked + .tier-card::before {
    content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px;
    border-radius: 3px;
    background: repeating-linear-gradient(180deg, var(--gold) 0 6px, transparent 6px 12px);
}

.tier-thumb { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--ink-4); }
.tier-thumb img { width: 100%; height: 100%; object-fit: cover; }

.tier-main { min-width: 0; }
.tier-name { font-weight: 600; font-size: 1.02rem; display: block; }
.tier-desc {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    color: var(--bone-dim); font-size: .84rem; margin: 2px 0 7px;
}
.tier-price { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; color: var(--gold); }

.tier-stock { margin-top: 9px; max-width: 230px; }
.meter { height: 4px; border-radius: 999px; background: var(--ink-4); overflow: hidden; }
.meter > span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), #F2CE6A);
    transform-origin: left center;
}
.meter.is-hot > span { background: linear-gradient(90deg, var(--amber), var(--red)); }
.tier-left { font-family: var(--mono); font-size: .72rem; color: var(--bone-faint); margin-top: 5px; display: block; }
.tier-left.is-hot { color: var(--amber); }

.tier-check {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--line); display: grid; place-items: center;
    transition: background .2s ease, border-color .2s ease;
}
.tier-check svg { width: 12px; height: 12px; opacity: 0; color: #17120A; transition: opacity .2s ease; }
.tier input:checked + .tier-card .tier-check { background: var(--gold); border-color: var(--gold); }
.tier input:checked + .tier-card .tier-check svg { opacity: 1; }

.tier-gone .tier-card { opacity: .42; cursor: not-allowed; }
.tier-gone .tier-card:hover { transform: none; border-color: var(--line-soft); }
.tier-gone .tier-thumb img { filter: grayscale(1); }
.tier-gone .tier-check { display: none; }

.flag {
    display: inline-block; margin-top: 7px;
    font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
    text-transform: uppercase; font-weight: 700;
    padding: 3px 9px; border-radius: 999px;
}
.flag-out { background: rgba(255,255,255,.07); color: var(--bone-faint); }

/* ---------- how it works ---------- */
.steps { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.step {
    background: var(--ink-2); border: 1px solid var(--line-soft);
    border-radius: 14px; padding: 18px;
}
.step-n {
    font-family: var(--mono); font-size: .68rem; letter-spacing: .2em;
    color: var(--gold); display: block; margin-bottom: 9px;
}
.step h3 { font-size: .96rem; margin: 0 0 5px; }
.step p { margin: 0; font-size: .85rem; color: var(--bone-dim); }

/* ---------- ussd callout ---------- */
.dial {
    display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
    background: linear-gradient(140deg, var(--magenta-soft), var(--ink-2) 58%);
    border: 1px solid rgba(255,46,136,.28); border-radius: 14px; padding: 20px 22px;
}
.dial-code {
    font-family: var(--mono); font-size: 1.5rem; font-weight: 700;
    color: var(--magenta); letter-spacing: -.02em; white-space: nowrap;
}
.dial p { margin: 0; font-size: .89rem; color: var(--bone-dim); flex: 1; min-width: 220px; }

/* ---------- sticky buy bar ---------- */
.bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(16, 32, 26, .95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 13px 0 calc(13px + env(safe-area-inset-bottom));
}
.bar-in { display: flex; align-items: center; gap: 14px; }
.bar-copy { flex: 1; min-width: 0; }
.bar-label { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--bone-faint); display: block; }
.bar-value { font-weight: 600; font-size: 1rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-value b { font-family: var(--mono); color: var(--gold); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 24px; min-height: 50px;
    border: none; border-radius: 12px;
    font-family: var(--sans); font-size: .95rem; font-weight: 700;
    cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: filter .16s ease, transform .1s ease, background .16s ease;
}
.btn-gold { background: linear-gradient(140deg, var(--gold), #C08F1C); color: #17120A; }
.btn-gold:hover:not(:disabled) { filter: brightness(1.07); }
.btn-gold:active:not(:disabled) { transform: scale(.975); }
.btn-gold:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { background: var(--ink-3); border: 1px solid var(--line); color: var(--bone); }
.btn-ghost:hover { background: var(--ink-4); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- empty ---------- */
.empty {
    text-align: center; padding: 54px 24px;
    background: var(--ink-2); border: 1px dashed var(--line-soft); border-radius: 14px;
}
.empty svg { width: 36px; height: 36px; color: var(--bone-faint); opacity: .6; margin-bottom: 12px; }
.empty h3 { font-family: var(--mono); margin: 0 0 6px; font-size: 1rem; }
.empty p { margin: 0; color: var(--bone-dim); font-size: .9rem; }

/* ---------- alerts ---------- */
.note {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: 12px; margin: 18px 0 0;
    border: 1px solid; font-size: .9rem;
}
.note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.note-good { background: rgba(123,216,166,.12); border-color: rgba(123,216,166,.35); color: var(--mint); }
.note-bad  { background: rgba(255,107,107,.11); border-color: rgba(255,107,107,.34); color: var(--red); }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.note-x { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 0 3px; opacity: .75; }

/* ---------- modal ---------- */
.modal {
    position: fixed; inset: 0; z-index: 60; display: none;
    align-items: flex-start; justify-content: center;
    padding: 4vh 16px; overflow-y: auto;
    background: rgba(4, 9, 7, .78); backdrop-filter: blur(4px);
}
.modal.is-open { display: flex; }
.modal-box {
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: 16px; width: 100%; max-width: 460px; margin: auto 0;
}
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-title { font-family: var(--mono); font-size: 1rem; font-weight: 700; margin: 0; flex: 1; }
.modal-x { background: none; border: 0; color: var(--bone-dim); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-x:hover { color: var(--bone); background: var(--ink-4); }
.modal-body { padding: 20px; }

/* ---------- form ---------- */
.summary {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 15px 16px; border-radius: 12px; margin-bottom: 20px;
    background: linear-gradient(140deg, var(--gold-soft), rgba(255,46,136,.06));
    border: 1px solid var(--line);
}
.summary-what { font-size: .88rem; }
.summary-what span { display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--bone-faint); }
.summary-total { font-family: var(--mono); font-size: 1.45rem; font-weight: 700; color: var(--gold); }

.field { margin-bottom: 15px; }
.field-label {
    display: block; font-family: var(--mono); font-size: .66rem;
    letter-spacing: .16em; text-transform: uppercase; color: var(--bone-dim); margin-bottom: 7px;
}
.field-label .req { color: var(--magenta); }
.input {
    width: 100%; background: var(--ink-3); color: var(--bone);
    border: 1px solid var(--line); border-radius: 11px;
    padding: 13px 14px; min-height: 50px;
    font-family: var(--sans); font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.input::placeholder { color: var(--bone-faint); }
.hint { margin: 7px 0 0; font-size: .78rem; color: var(--bone-faint); }

/* quantity stepper */
.stepper { display: flex; align-items: stretch; gap: 0; }
.stepper button {
    width: 50px; min-height: 50px; flex: none;
    background: var(--ink-3); border: 1px solid var(--line); color: var(--bone);
    font-size: 1.3rem; line-height: 1; cursor: pointer;
    transition: background .16s ease;
}
.stepper button:hover:not(:disabled) { background: var(--ink-4); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper button:first-child { border-radius: 11px 0 0 11px; }
.stepper button:last-child { border-radius: 0 11px 11px 0; }
.stepper .input {
    border-radius: 0; border-left: 0; border-right: 0; text-align: center;
    font-family: var(--mono); font-weight: 700; font-size: 1.05rem;
    -moz-appearance: textfield;
}
.stepper .input::-webkit-outer-spin-button,
.stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.paynote {
    display: flex; gap: 12px; align-items: center;
    padding: 13px 15px; border-radius: 12px; margin-bottom: 18px;
    background: var(--ink-3); border: 1px solid var(--line-soft);
}
.paynote strong { display: block; font-size: .88rem; }
.paynote span { display: block; font-size: .79rem; color: var(--bone-faint); }

footer { border-top: 1px solid var(--line-soft); padding: 26px 0 32px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-family: var(--mono); font-size: .74rem; color: var(--bone-faint); }

/* ==========================================================================
   Motion — same language as the console
   ========================================================================== */
@keyframes rise  { from { opacity: 0; transform: translateY(11px); } to { opacity: 1; transform: none; } }
@keyframes fill  { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes veilIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes veilOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes boxIn  { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes boxOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(7px) scale(.985); } }
@keyframes barUp  { from { transform: translateY(100%); } to { transform: none; } }

.hero-in > * { animation: rise .5s cubic-bezier(.16,.84,.44,1) backwards; }
.hero-in > *:nth-child(2) { animation-delay: 70ms; }
.hero-in > *:nth-child(3) { animation-delay: 140ms; }

.tier { animation: rise .42s cubic-bezier(.16,.84,.44,1) backwards; }
.tier:nth-child(1) { animation-delay: 60ms; }
.tier:nth-child(2) { animation-delay: 110ms; }
.tier:nth-child(3) { animation-delay: 160ms; }
.tier:nth-child(n+4) { animation-delay: 200ms; }

.step { animation: rise .42s cubic-bezier(.16,.84,.44,1) backwards; }
.step:nth-child(2) { animation-delay: 70ms; }
.step:nth-child(3) { animation-delay: 140ms; }

.meter > span { animation: fill .9s cubic-bezier(.2,.75,.3,1) backwards; animation-delay: .35s; }

.bar { animation: barUp .4s cubic-bezier(.16,.84,.44,1) .25s backwards; }

.note { animation: rise .3s ease-out backwards; }
.is-going { animation: veilOut .15s ease-in forwards; }

.modal.is-open { animation: veilIn .2s ease-out; }
.modal.is-open .modal-box { animation: boxIn .27s cubic-bezier(.16,.84,.44,1); }
.modal.is-closing { animation: veilOut .15s ease-in forwards; }
.modal.is-closing .modal-box { animation: boxOut .15s ease-in forwards; }

/* ---------- responsive ---------- */
@media (max-width: 700px) {
    .steps { grid-template-columns: 1fr; }
    .hero-in { padding: 52px 0 30px; }
    .tier-card { grid-template-columns: 58px 1fr 22px; gap: 13px; padding: 13px; }
    .tier-thumb { width: 58px; height: 58px; }
    .bar-label { display: none; }
    .top-dial { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
