/* ── Festival Booth Giveaway — carnival midway at dusk ──────────────
   Striped tent canopy, glowing bulb string, teal + carnival red,
   circus-poster display type, ticket-roll dividers. Mobile-first. */

:root {
  --cream: #fbf3e4;
  --card: #ffffff;
  --ink: #33272a;
  --ink-soft: #85757a;
  --red: #d7263d;
  --red-deep: #a91b2e;
  --teal: #1b9aaa;
  --bulb: #ffd97d;
  --line: #eadfce;
  --err: #d7263d;
  --font-display: 'Rye', serif;
  --font-body: 'Quicksand', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

.wrap { width: 100%; max-width: 460px; margin: 0 auto; padding: 0 20px; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Canopy ───────────────────────────────────────────────────────── */
.canopy {
  height: 42px;
  background: repeating-linear-gradient(90deg, var(--red) 0 46px, #fff 46px 92px);
  -webkit-mask-image: radial-gradient(circle 24px at 23px 0, transparent 23px, #000 24px);
  mask-image: radial-gradient(circle 24px at 23px 0, transparent 23px, #000 24px);
  -webkit-mask-size: 46px 100%;
  mask-size: 46px 100%;
  -webkit-mask-position: 0 42px;
  mask-position: 0 42px;
  transform: scaleY(-1);
}

/* ── Bulb string ──────────────────────────────────────────────────── */
.bulbs { display: flex; justify-content: space-evenly; padding: 8px 10px 0; }

.bulbs span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff3cf, var(--bulb) 70%);
  box-shadow: 0 0 14px rgba(255, 217, 125, 0.9);
  animation: twinkle 2.6s ease-in-out infinite;
}

.bulbs span:nth-child(even) { animation-delay: 1.3s; }

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 34px 0 10px; }

.event-line {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--teal);
  border: 2px solid rgba(27, 154, 170, 0.4);
  border-radius: 999px;
  padding: 6px 18px;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  line-height: 1.05;
  color: var(--red);
  text-shadow: 2px 2px 0 rgba(51, 39, 42, 0.15);
}

.hero .sub { margin-top: 12px; font-weight: 600; font-size: 1.02rem; }

/* ── Ticket divider ───────────────────────────────────────────────── */
.ticket-divider {
  height: 12px;
  margin: 20px 0;
  background-image: radial-gradient(circle 5px, var(--ink) 4px, transparent 5px);
  background-size: 24px 12px;
  background-position: center;
  background-repeat: repeat-x;
  opacity: 0.18;
}

/* ── Notes ────────────────────────────────────────────────────────── */
.note {
  margin: 16px 0;
  padding: 15px 18px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
}

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 26px 24px 28px;
  box-shadow: 0 14px 34px rgba(51, 39, 42, 0.12);
  text-align: center;
}

.card h2 { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }

.card-sub { color: var(--ink-soft); font-size: 0.92rem; margin: 6px 0 18px; font-weight: 600; }

/* Form */
form { display: flex; flex-direction: column; gap: 10px; }

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 15px 16px;
  font-size: 1.02rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--teal); }
input.error { border-color: var(--err); }
input::placeholder { color: var(--ink-soft); opacity: 0.75; }

.fine { margin-top: 10px; color: var(--ink-soft); font-size: 0.82rem; font-weight: 600; }

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

.form-error { color: var(--err); font-weight: 700; }

.booth-line {
  text-align: center;
  font-weight: 700;
  color: var(--teal);
  margin-top: 16px;
  font-size: 0.95rem;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  padding: 16px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  line-height: 1.2;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(120deg, var(--red), var(--red-deep));
  color: #fff;
  box-shadow: 0 6px 0 #7c1322;
}

.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 0 #7c1322; }

.btn-block { width: 100%; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Done ─────────────────────────────────────────────────────────── */
.admit-one {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: #fff;
  background: var(--teal);
  border-radius: 4px;
  padding: 7px 20px;
  transform: rotate(-4deg);
  margin-bottom: 14px;
}

/* ── Rules modal ──────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(51, 39, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--card);
  color: var(--ink);
  border-radius: 14px;
  max-width: 620px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 2px solid var(--line);
}

.modal-head h3 { font-family: var(--font-display); font-size: 1.15rem; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  font-size: 0.92rem;
  white-space: pre-wrap;
  font-weight: 500;
  text-align: left;
}

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 400;
  max-width: 92vw;
  text-align: center;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 24px 20px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  border-top: 2px dashed var(--line);
}

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
