/* ==========================================================================
   Motherland Tickets: app.css (public site)
   Requires base.css. One stylesheet, no !important, no per-page <style>.
   ========================================================================== */

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 680px; }
.wrap--mid { max-width: 820px; }
.on-dark { color: var(--on-dark); }

/* ── Header ─────────────────────────────────────────────── */
.site-header { background: var(--aubergine); border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 28px; width: auto; filter: brightness(0) invert(1); }
.brand-text { display: none; font-size: 1.05rem; }
.header-nav { display: flex; align-items: center; gap: 18px; font-size: var(--fs-sm); font-weight: 500; }
.header-nav a {
  white-space: nowrap; color: var(--on-dark-2); min-height: 44px; display: inline-flex; align-items: center;
  border-bottom: 2px solid transparent; transition: color .15s;
}
.header-nav a:hover, .header-nav a[aria-current] { color: #fff; border-bottom-color: var(--sun); }
.chip {
  font-size: var(--fs-xs); font-weight: 600; padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: var(--on-dark);
  white-space: nowrap;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--plum); color: var(--on-dark); isolation: isolate; }
.hero-inner { position: relative; z-index: 2; }
.hero--event .hero-inner { padding-top: clamp(40px, 8vw, 96px); padding-bottom: clamp(44px, 8vw, 96px); }
.hero--compact .hero-inner { padding-top: clamp(28px, 5vw, 52px); padding-bottom: clamp(30px, 5vw, 52px); }
.hero-title { font-size: clamp(2.5rem, 11.2vw, 6.4rem); }
.hero--compact .hero-title { font-size: clamp(2rem, 7.4vw, 3.6rem); }
.hero-tag { margin-top: 18px; font-size: clamp(1rem, 2.4vw, 1.25rem); font-weight: 500; color: var(--on-dark); max-width: 28ch; }
.hero-lead { margin-top: 14px; max-width: 52ch; color: var(--on-dark-2); }
.hero-lead strong { color: #fff; font-weight: 600; word-break: break-word; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 26px; font-weight: 500; }
.hero-facts li { display: flex; align-items: center; gap: 10px; }
.hero-facts svg { width: 20px; height: 20px; stroke: var(--sun); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.hero .steps { margin-top: 28px; }

/* The starburst from the banner. Rays draw out once on load. */
.burst { position: absolute; z-index: 1; pointer-events: none; overflow: visible; }
.hero--event .burst { right: -8%; top: 50%; width: min(56vw, 560px); transform: translateY(-50%); }
.hero--compact .burst { right: -60px; top: 50%; width: 260px; transform: translateY(-50%); opacity: .9; }
.burst line { stroke: var(--lime); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ray .9s var(--ease) forwards; animation-delay: calc(var(--i) * 32ms + 150ms); }
@keyframes ray { to { stroke-dashoffset: 0; } }
@media (max-width: 640px) {
  .hero--event .burst { width: 210px; right: -74px; top: auto; bottom: -92px; transform: none; }
  .hero--compact .burst { width: 150px; right: -60px; top: auto; bottom: -70px; transform: none; }
  .chip { display: none; }
}

/* The printed banner as a ribbon under the hero */
.ribbon { background: var(--plum); line-height: 0; }
.ribbon img { width: 100%; height: clamp(32px, 8.4vw, 120px); object-fit: cover; object-position: center; }

/* ── Steps ──────────────────────────────────────────────── */
.steps { list-style: none; display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--on-dark-2); letter-spacing: .02em; }
.step:not(:last-child)::after { content: ""; width: clamp(18px, 6vw, 44px); height: 2px; background: rgba(255,255,255,.22); margin: 0 10px; border-radius: 2px; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1.5px solid rgba(255,255,255,.35);
}
.step-num svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.step.is-active { color: #fff; }
.step.is-active .step-num { background: var(--sun); border-color: var(--sun); color: var(--aubergine); }
.step.is-done { color: #fff; }
.step.is-done .step-num { background: var(--lime); border-color: var(--lime); color: var(--aubergine); }
@media (max-width: 560px) { .step:not(.is-active) .step-name { display: none; } }

/* ── Main layout ────────────────────────────────────────── */
.main-content { padding: 40px 0 72px; }
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.main-right { position: sticky; top: 20px; }
.section-title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 20px; }
.section-note { color: var(--muted); font-size: var(--fs-sm); margin: -8px 0 20px; }
@media (max-width: 920px) {
  .main-grid { grid-template-columns: 1fr; gap: 28px; }
  .main-right { position: static; }
  .page--tickets .main-content { padding-bottom: 130px; }
}

/* ── Ticket stubs ───────────────────────────────────────── */
.tickets-table { display: grid; gap: 16px; }
.ticket {
  --tk: var(--line);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  background: var(--card); border: 2px solid var(--tk); border-radius: var(--r-lg);
  transition: border-color .15s, box-shadow .15s;
}
.ticket.is-selected { --tk: var(--plum); box-shadow: 0 10px 30px rgba(90, 42, 99, .16); }
.ticket-main { padding: 22px 24px; }
.ticket-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.ticket-desc { margin-top: 8px; color: var(--ink-2); font-size: var(--fs-sm); max-width: 52ch; }
.ticket-avail { margin-top: 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.ticket-avail.low { color: var(--red); }
.ticket-stub {
  position: relative; padding: 22px 24px; min-width: 210px;
  border-left: 2px dashed var(--line);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 16px;
}
.ticket-stub::before, .ticket-stub::after {
  content: ""; position: absolute; left: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--tk);
}
.ticket-stub::before { top: -12px; }
.ticket-stub::after { bottom: -12px; }
.ticket-price { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.ticket-price span { display: block; margin-top: 6px; font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; color: var(--muted); }
.ticket.is-soldout { background: var(--tint); }
.ticket.is-soldout .ticket-main, .ticket.is-soldout .ticket-price { opacity: .55; }
.sold-out-tag { display: inline-block; margin-top: 12px; padding: 4px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
@media (max-width: 640px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-main { padding: 20px 20px 18px; }
  .ticket-stub { border-left: 0; border-top: 2px dashed var(--line); flex-direction: row; align-items: center; justify-content: space-between; padding: 16px 20px; min-width: 0; }
  .ticket-stub::before { top: -12px; left: -12px; }
  .ticket-stub::after { top: -12px; bottom: auto; left: auto; right: -12px; }
  .ticket-price { text-align: left; }
}

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: var(--tint); border-radius: 999px; }
.qty.disabled { opacity: .4; pointer-events: none; }
.qty-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); font-size: 1.4rem; font-weight: 600; line-height: 1;
  box-shadow: 0 1px 2px rgba(34,16,42,.14); touch-action: manipulation;
  transition: background .15s, color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.qty-btn:hover:not(:disabled) { background: var(--plum); color: #fff; }
.qty-btn:active:not(:disabled) { transform: scale(.94); }
.qty-btn:disabled { color: rgba(34,16,42,.28); box-shadow: none; background: transparent; cursor: not-allowed; }
.qty-val { min-width: 42px; text-align: center; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── Order panel (plum "receipt") ───────────────────────── */
.order-panel { background: var(--plum); color: var(--on-dark); border-radius: var(--r-lg); padding: 24px; }
.panel-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; }
.panel-empty { color: var(--on-dark-2); font-size: var(--fs-sm); padding: 10px 0 6px; }
.summary { display: none; }
.summary.visible { display: block; }
.summary-line { display: flex; justify-content: space-between; gap: 16px; font-size: var(--fs-sm); color: var(--on-dark); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.summary-line.discount { color: var(--lime); }
.summary-divider { border: 0; border-top: 1px dashed rgba(255,255,255,.3); margin: 16px 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary-total-label { font-size: var(--fs-sm); font-weight: 600; }
.summary-total-amount { font-size: 1.9rem; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums lining-nums; }
.promo-row { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.16); }
.promo-toggle { font-size: var(--fs-sm); font-weight: 600; color: var(--on-dark); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.5); min-height: 32px; }
.promo-toggle:hover { text-decoration-color: var(--sun); }
.promo-field { display: none; gap: 8px; margin-top: 12px; }
.promo-field.open { display: flex; }
.promo-input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.promo-input::placeholder { text-transform: none; letter-spacing: 0; color: var(--on-dark-2); }
.promo-input:focus-visible { outline-color: var(--sun); }
.promo-btn { padding: 0 18px; border-radius: var(--r-md); background: #fff; color: var(--aubergine); font-weight: 700; font-size: var(--fs-sm); }
.promo-btn:hover { background: var(--sun); }
.promo-btn:disabled { opacity: .6; }
.promo-msg { display: none; margin-top: 10px; font-size: var(--fs-sm); font-weight: 500; }
.promo-msg.ok { display: block; color: var(--lime); }
.promo-msg.err { display: block; color: #ffb4ab; }
.cta { display: none; margin-top: 20px; }
.cta.visible { display: block; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: var(--fs-xs); color: var(--on-dark-2); }
.secure svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 920px) {
  .cta.visible {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--aubergine); border-top: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 -10px 30px rgba(34,16,42,.25);
  }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-md);
  font-weight: 700; font-size: 1rem; text-align: center; line-height: 1.2;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-block, .btn-pay, .btn-find { display: flex; width: 100%; }
.btn-primary, .btn-find { background: var(--red); color: #fff; }
.btn-primary:hover:not(:disabled), .btn-find:hover:not(:disabled) { background: var(--red-deep); }
.btn-pay { background: var(--sun); color: var(--aubergine); justify-content: space-between; padding: 0 20px; min-height: 56px; }
.btn-pay:hover:not(:disabled) { background: var(--sun-deep); }
.btn-amount { font-weight: 850; font-variant-numeric: tabular-nums lining-nums; }
.btn-secondary, .btn-back {
  border: 2px solid var(--line); background: transparent; color: var(--ink);
}
.btn-secondary:hover, .btn-back:hover { border-color: var(--plum); color: var(--plum); }
.order-panel .btn-back { border-color: rgba(255,255,255,.3); color: #fff; margin-top: 12px; min-height: 48px; }
.order-panel .btn-back:hover { border-color: #fff; color: #fff; }
.btn-stack { display: grid; gap: 12px; margin-top: 24px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(34,16,42,.25); border-top-color: var(--aubergine); border-radius: 50%; animation: spin .7s linear infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Cards, forms ───────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 28px; box-shadow: 0 1px 2px rgba(34,16,42,.04); }
.card + .card { margin-top: 20px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input {
  width: 100%; min-height: 52px; padding: 12px 16px; font-size: 1rem;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.form-input::placeholder { color: #9a8fa0; text-transform: none; }
.form-input:hover { border-color: rgba(34,16,42,.35); }
.form-input:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 4px rgba(90,42,99,.16); }
.form-input.err { border-color: var(--bad); background: var(--bad-bg); }
.form-hint { margin-top: 8px; font-size: var(--fs-sm); color: var(--muted); }
.form-error { display: none; margin-top: 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--bad); }
.form-error.show { display: block; }
.check-wrap { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; }
.check-wrap input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--sun); cursor: pointer; }
.check-label { font-size: var(--fs-sm); line-height: 1.5; cursor: pointer; }
.check-label a { text-decoration: underline; text-underline-offset: 3px; }
.check-err { display: none; margin-top: 8px; font-size: var(--fs-sm); font-weight: 500; color: #ffb4ab; }
.check-err.show { display: block; }
.order-panel .btn-pay { margin-top: 18px; }

/* ── Messages ───────────────────────────────────────────── */
.notice, .alert, .error-box {
  display: block; padding: 14px 18px; border-radius: var(--r-md);
  font-size: var(--fs-sm); line-height: 1.55; margin-bottom: 20px;
  background: var(--tint); border: 1px solid var(--line); color: var(--ink-2);
}
.notice strong { color: var(--ink); }
.notice a, .alert a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.notice-ok { background: var(--ok-bg); border-color: var(--ok-line); color: #14532d; }
.notice-error, .alert, .error-box { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); font-weight: 500; }
.alert { display: none; }
.alert.visible { display: block; }
.empty-state { text-align: center; padding: 56px 24px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--ink-2); }
.empty-state a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.help-text { margin-top: 20px; font-size: var(--fs-sm); color: var(--muted); text-align: center; line-height: 1.6; }
.help-text strong { color: var(--ink-2); }

/* ── Receipts and ticket details ────────────────────────── */
.receipt { position: relative; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 12px 40px rgba(34,16,42,.1); }
.receipt-head { padding: 16px 24px; background: var(--aubergine); color: #fff; font-weight: 800; font-size: 1rem; }
.receipt-body { padding: 8px 24px 4px; }
.ticket-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.ticket-line-name { font-weight: 700; }
.ticket-line-qty { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.ticket-line-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 24px; border-top: 2px dashed var(--line); margin-top: 8px; }
.total-label { font-weight: 600; }
.total-amount { font-size: 1.9rem; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums lining-nums; }
.detail-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; margin-top: 24px; }
.detail-head { padding: 14px 24px; background: var(--tint); font-weight: 800; font-size: var(--fs-sm); }
.detail-row { display: flex; justify-content: space-between; gap: 24px; padding: 14px 24px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.detail-row:last-child { border-bottom: 0; }
.detail-key { color: var(--muted); flex-shrink: 0; }
.detail-val { font-weight: 600; text-align: right; word-break: break-word; }
.detail-ref { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8125rem; letter-spacing: .04em; }
.subhead { font-size: var(--fs-md); font-weight: 800; letter-spacing: -.01em; margin: 32px 0 14px; }

/* Digital ticket: QR */
.status-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--r-md); font-weight: 600; font-size: var(--fs-sm); margin-bottom: 20px; }
.status-bar.valid { background: var(--ok-bg); border: 1px solid var(--ok-line); color: #14532d; }
.status-bar.checked { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); }
.status-bar svg { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.qr-block { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; text-align: center; box-shadow: 0 12px 40px rgba(34,16,42,.1); margin-bottom: 8px; }
.qr-head { padding: 14px 20px; background: var(--plum); color: #fff; font-weight: 800; }
.qr-body { padding: 28px 20px 24px; }
.qr-block img { width: min(260px, 70vw); height: auto; margin: 0 auto; image-rendering: pixelated; }
.qr-instruction { margin: 18px auto 0; max-width: 32ch; font-size: var(--fs-sm); color: var(--ink-2); }

/* Verify page status */
.status-block { display: flex; gap: 20px; align-items: flex-start; padding: 28px; border-radius: var(--r-lg); margin-bottom: 24px; border: 2px solid; }
.status-block.valid { background: var(--ok-bg); border-color: var(--ok-line); }
.status-block.used { background: var(--warn-bg); border-color: var(--warn-line); }
.status-block.invalid { background: var(--bad-bg); border-color: var(--bad-line); }
.status-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.status-icon svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.status-block.valid .status-icon { background: var(--ok); }
.status-block.used .status-icon { background: #b37a00; }
.status-block.invalid .status-icon { background: var(--bad); }
.status-title { font-size: 1.5rem; font-weight: 850; letter-spacing: -.02em; line-height: 1.15; }
.status-block.valid .status-title { color: #14532d; }
.status-block.used .status-title { color: var(--warn); }
.status-block.invalid .status-title { color: var(--bad); }
.status-msg { margin-top: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.status-msg a { text-decoration: underline; font-weight: 600; }
.scanner-notice { margin-top: 24px; padding: 16px 20px; border-radius: var(--r-md); background: var(--tint); font-size: var(--fs-sm); color: var(--ink-2); text-align: center; }
@media (max-width: 480px) { .status-block { flex-direction: column; padding: 22px; } }


/* ── Legal prose ────────────────────────────────────────── */
.content h2 { font-size: var(--fs-md); font-weight: 800; letter-spacing: -.01em; margin: 40px 0 12px; }
.content h2:first-child { margin-top: 0; }
.content p, .content li { color: var(--ink-2); line-height: 1.75; max-width: 68ch; }
.content p { margin-bottom: 14px; }
.content ul { margin: 0 0 14px 22px; }
.content li { margin-bottom: 8px; }
.content a { text-decoration: underline; text-underline-offset: 3px; color: var(--plum); font-weight: 600; }
.content strong { color: var(--ink); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--aubergine); color: var(--on-dark-2); margin-top: 24px; }
.site-footer-inner { max-width: 1120px; margin: 0 auto; padding: 32px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; font-size: var(--fs-sm); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.footer-mail { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; color: var(--on-dark); }
