/* ── Summer BBQ Bundle Giveaway — retro roadside cookout ────────────
   Kraft-paper tan, gingham header band, vintage script + slab serif,
   smoke curls, diner menu board prize list. */

:root {
  --kraft: #ecdcbe;
  --kraft-deep: #e2cda4;
  --card: #fdf8ee;
  --ink: #43301f;
  --ink-soft: #8a7358;
  --red: #c3402f;
  --red-deep: #9e2f21;
  --char: #2e2118;
  --line: rgba(67, 48, 31, 0.2);
  --err: #c3402f;
  --font-slab: 'Alfa Slab One', serif;
  --font-script: 'Kalam', cursive;
  --font-body: 'PT Sans', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background-color: var(--kraft);
  background-image: radial-gradient(rgba(67, 48, 31, 0.05) 1px, transparent 1.5px);
  background-size: 22px 22px;
  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: 600px; margin: 0 auto; padding: 0 20px; }

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

/* ── Gingham band ─────────────────────────────────────────────────── */
.gingham {
  height: 26px;
  background:
    repeating-linear-gradient(90deg, rgba(195, 64, 47, 0.85) 0 18px, rgba(195, 64, 47, 0.35) 18px 36px),
    repeating-linear-gradient(0deg, #fff 0 13px, rgba(255, 255, 255, 0.55) 13px 26px);
  background-blend-mode: multiply;
}

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

.smoke { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 26px; }

.smoke span {
  width: 10px;
  height: 34px;
  border-radius: 50%;
  background: rgba(67, 48, 31, 0.18);
  filter: blur(3px);
  animation: drift 4s ease-in-out infinite;
}

.smoke span:nth-child(2) { animation-delay: 1.2s; height: 44px; }
.smoke span:nth-child(3) { animation-delay: 2.2s; }

@keyframes drift {
  0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.6; }
  50% { transform: translateY(-12px) scaleX(1.6); opacity: 0.25; }
}

.script-line {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--red);
  transform: rotate(-2deg);
  margin-bottom: 4px;
}

.hero h1 {
  font-family: var(--font-slab);
  font-size: clamp(2.2rem, 8.5vw, 3.4rem);
  line-height: 1.05;
  color: var(--char);
  text-shadow: 3px 3px 0 rgba(195, 64, 47, 0.25);
}

.value-line {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--char);
  color: var(--kraft);
  padding: 7px 20px;
  border-radius: 3px;
  transform: rotate(-1deg);
}

/* ── Menu board ───────────────────────────────────────────────────── */
.menu-board {
  background: var(--char);
  color: var(--kraft);
  border-radius: 10px;
  border: 4px solid #1e150e;
  padding: 24px 26px;
  margin: 22px 0;
  box-shadow: 0 14px 34px rgba(46, 33, 24, 0.3);
}

.menu-title {
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: #f0c983;
  text-align: center;
  margin-bottom: 14px;
}

.menu-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.menu-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.02rem;
  font-weight: 700;
  border-bottom: 1px dashed rgba(236, 220, 190, 0.25);
  padding-bottom: 10px;
}

.menu-list li:last-child { border-bottom: none; padding-bottom: 0; }

.ticket { flex-shrink: 0; font-size: 1.1rem; }

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

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 28px 26px 32px;
  box-shadow: 0 12px 30px rgba(67, 48, 31, 0.15);
}

.card h2 {
  font-family: var(--font-slab);
  font-size: 1.45rem;
  text-align: center;
  margin-bottom: 20px;
  color: var(--char);
}

/* Fields */
.field { margin-bottom: 16px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label {
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

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

.fine { margin-top: 14px; text-align: center; color: var(--ink-soft); font-size: 0.85rem; }

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

.form-error { color: var(--err); font-weight: 700; text-align: center; margin-top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-slab);
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  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(--char); outline-offset: 2px; }

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

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

.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 ─────────────────────────────────────────────────────────── */
.done-card { text-align: center; }

.done-icon { font-size: 2.4rem; display: block; margin-bottom: 8px; }

.card-sub { color: var(--ink-soft); margin-top: 6px; max-width: 380px; margin-left: auto; margin-right: auto; }

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

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

.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-slab); 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;
}

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--char);
  color: var(--kraft);
  padding: 14px 26px;
  border-radius: 8px;
  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;
  border-top: 2px dashed var(--line);
}

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

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .field-grid { grid-template-columns: 1fr; }
}

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