/* ── Post-Event Thank You + QR Referral — after-show stage glow ─────
   Indigo-to-black wash with warm bokeh orbs, relaxed script over a
   tall condensed event name, torn ticket-stub referral panel with
   perforated edge and QR gate, tour-merch letterspaced labels. */

:root {
  --indigo: #191537;
  --night: #0c0a1c;
  --amber: #ffb163;
  --coral: #ff7a59;
  --magenta: #d96bff;
  --paper: #f7f2ea;
  --text: #f2eee7;
  --text-soft: rgba(242, 238, 231, 0.7);
  --ink: #2a2438;
  --ink-soft: #7d7591;
  --err: #ff9d8a;
  --script: 'Caveat', cursive;
  --cond: 'Oswald', sans-serif;
  --body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--body);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--indigo), var(--night) 70%);
  background-attachment: fixed;
  min-height: 100vh;
}

.page { position: relative; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 24px; flex: 1 0 auto; }

/* ── Bokeh ────────────────────────────────────────────────────────── */
.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(38px);
  opacity: 0.4;
  pointer-events: none;
  animation: breathe 8s ease-in-out infinite;
}

.b1 { width: 220px; height: 220px; background: var(--amber); top: -40px; left: -60px; }
.b2 { width: 150px; height: 150px; background: var(--coral); top: 16%; right: -40px; animation-delay: 2s; }
.b3 { width: 120px; height: 120px; background: var(--magenta); top: 44%; left: -30px; animation-delay: 4s; opacity: 0.3; }
.b4 { width: 180px; height: 180px; background: var(--amber); bottom: 12%; right: -70px; animation-delay: 5s; opacity: 0.25; }
.b5 { width: 90px; height: 90px; background: var(--coral); bottom: 4%; left: 12%; animation-delay: 3s; opacity: 0.3; }

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 74px 0 16px; }

.script {
  font-family: var(--script);
  font-weight: 700;
  font-size: clamp(3.4rem, 13vw, 6rem);
  line-height: 0.8;
  color: var(--amber);
  transform: rotate(-4deg);
  text-shadow: 0 0 34px rgba(255, 177, 99, 0.4);
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(2.1rem, 8vw, 3.4rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: -0.35em;
  position: relative;
  z-index: 1;
}

.thanks-line { margin: 18px auto 0; max-width: 440px; color: var(--text-soft); }

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  background: rgba(247, 242, 234, 0.06);
  border: 1px solid rgba(247, 242, 234, 0.16);
  border-radius: 16px;
  padding: 30px 28px;
  margin-top: 34px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.label {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

.card-copy { color: var(--text-soft); font-size: 0.96rem; max-width: 440px; margin: 0 auto 20px; }

.input-row { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }

input[type="email"],
input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font-family: var(--body);
  font-size: 0.98rem;
  color: var(--text);
  background: rgba(12, 10, 28, 0.55);
  border: 1px solid rgba(247, 242, 234, 0.22);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--amber); }
input.error { border-color: var(--err); }
input::placeholder { color: rgba(242, 238, 231, 0.35); }

.btn {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--night);
  background: linear-gradient(135deg, var(--amber), var(--coral));
  border: none;
  border-radius: 10px;
  padding: 14px 26px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px rgba(255, 122, 89, 0.35);
}

.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 122, 89, 0.5); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.btn-small { padding: 12px 20px; font-size: 0.8rem; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(247, 242, 234, 0.3);
  box-shadow: none;
  font-size: 0.78rem;
  padding: 11px 18px;
}

.btn-ghost:hover:not(:disabled) { border-color: var(--amber); color: var(--amber); box-shadow: none; }

.form-error { color: var(--err); font-weight: 600; font-size: 0.9rem; margin-top: 12px; }

.fine-print { font-size: 0.75rem; color: rgba(242, 238, 231, 0.45); margin-top: 16px; }

.rules-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: var(--amber);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(12, 10, 28, 0.35);
  border-top-color: var(--night);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Ticket stub ──────────────────────────────────────────────────── */
.stub {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 168px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  margin-top: 34px;
  overflow: hidden;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.45);
}

/* punched notches */
.stub::before, .stub::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--night);
  right: 168px;
  transform: translateX(50%);
  z-index: 2;
}

.stub::before { top: -13px; }
.stub::after { bottom: -13px; }

.stub-main { padding: 30px 26px; text-align: left; }

.stub-main .label { color: #b0722e; text-align: left; }

.stub-main h2 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}

.stub-main .card-copy { color: var(--ink-soft); margin: 0 0 18px; }

.share-line { display: flex; gap: 8px; margin-bottom: 12px; }

.share-line input {
  background: #fff;
  border: 1px solid #ddd4c4;
  color: var(--ink);
  font-size: 0.85rem;
}

.share-line input:focus { border-color: var(--coral); }

.social-row { display: flex; gap: 8px; flex-wrap: wrap; }

.social-row .btn-ghost { color: var(--ink); border-color: #cfc5b2; }
.social-row .btn-ghost:hover:not(:disabled) { border-color: var(--coral); color: var(--coral); }

.stub-tear { border-left: 2px dashed #c9bfab; }

.stub-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 18px;
  background: #fffdf8;
}

.qr-label {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.qr-img {
  width: 120px;
  height: 120px;
  border: 1px solid #e5dccb;
  border-radius: 6px;
  background: #fff;
}

.qr-fallback { font-size: 0.72rem; color: var(--ink-soft); text-align: center; max-width: 120px; }

.qr-admit {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  color: var(--coral);
}

/* ── Rules modal ──────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 28, 0.88);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  padding: 34px 30px;
  overflow-y: auto;
}

.modal-card h3 { font-family: var(--cond); text-transform: uppercase; font-size: 1.2rem; letter-spacing: 0.06em; margin-bottom: 14px; }

.rules-body { white-space: pre-wrap; font-size: 0.88rem; color: var(--ink-soft); }

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
}

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--night);
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 10px;
  z-index: 200;
  box-shadow: 0 10px 28px rgba(255, 177, 99, 0.4);
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 40px 20px 28px;
  color: rgba(242, 238, 231, 0.45);
  font-size: 0.78rem;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .stub { grid-template-columns: 1fr; }
  .stub::before, .stub::after { display: none; }
  .stub-tear { border-left: none; border-top: 2px dashed #c9bfab; }
  .stub-qr { flex-direction: row; justify-content: space-around; padding: 18px; }
  .input-row { flex-direction: column; }
}
