/* ── Weekly Winners Drawing — vintage raffle hall ───────────────────
   Warm cream, deep navy band, red-and-gold rosette, fanned raffle
   tickets, sturdy small-caps sans, stamped calendar chip. */

:root {
  --cream: #f7f1e3;
  --navy: #1d2d50;
  --navy-deep: #14213d;
  --red: #c8342c;
  --gold: #d9a43b;
  --ink: #2a2a26;
  --ink-soft: #8a8578;
  --card: #fffdf6;
  --line: #e5ddc8;
  --err: #c8342c;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Source Sans 3', 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: 560px; margin: 0 auto; padding: 0 20px; }

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

/* ── Band ─────────────────────────────────────────────────────────── */
.band {
  background: var(--navy);
  border-bottom: 4px solid var(--gold);
  padding: 11px 16px;
  text-align: center;
}

.band-text {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--cream);
}

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

/* Rosette */
.rosette { display: inline-block; position: relative; margin-bottom: 18px; }

.rosette-circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e04a41, var(--red) 65%);
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 4px var(--red), 0 8px 20px rgba(29, 45, 80, 0.3);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  position: relative;
  z-index: 2;
}

.rosette-tails {
  position: absolute;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1;
}

.rosette-tails span {
  width: 18px;
  height: 40px;
  background: var(--red);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.rosette-tails span:first-child { transform: rotate(-14deg); background: var(--gold); }
.rosette-tails span:last-child { transform: rotate(14deg); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 8vw, 3.3rem);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin-top: 20px;
}

.prize-line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--red);
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.weeks-line { color: var(--ink-soft); font-weight: 600; margin-top: 6px; }

/* Ticket strip */
.tickets { display: flex; justify-content: center; gap: 0; margin-top: 24px; transform: rotate(-2deg); }

.tkt {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--navy);
  background: var(--card);
  border: 2px dashed var(--gold);
  padding: 10px 16px;
}

.tkt:nth-child(even) { background: #fdf6df; }

/* ── Schedule chip ────────────────────────────────────────────────── */
.chip-row { text-align: center; margin: 22px 0 6px; }

.chip {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  border: 3px double var(--navy);
  padding: 8px 24px;
  transform: rotate(-1.5deg);
}

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

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 28px 26px 30px;
  margin-top: 20px;
  box-shadow: 0 16px 36px rgba(29, 45, 80, 0.12);
}

.card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  text-align: center;
}

.card-sub { color: var(--ink-soft); text-align: center; margin: 6px 0 20px; }

/* Fields */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }

label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}

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

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

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

.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-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  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(--gold); outline-offset: 2px; }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 5px 0 #8f231d;
}

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

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

.stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.26em;
  color: var(--navy);
  border: 3px double var(--navy);
  padding: 8px 26px;
  transform: rotate(-4deg);
  margin-bottom: 16px;
}

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

.modal-card {
  background: var(--card);
  color: var(--ink);
  border-radius: 12px;
  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-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.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(--navy);
  color: #fff;
  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 solid var(--line);
}

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

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .field-grid { grid-template-columns: 1fr; }
  .tickets .tkt:nth-child(4) { display: none; }
}

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