/* =============================================================
   DPF26 Festival Passport System — Main Stylesheet
   Font: Montserrat (loaded from Google Fonts in HTML)
   Colors: Primary #1e3a8a | Accent #41C1F9 | Dark #0f172a
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #1e3a8a;
  --primary-lt: #2563eb;
  --accent:     #41C1F9;
  --gold:       #f59e0b;
  --silver:     #94a3b8;
  --bronze:     #cd7f32;
  --success:    #22c55e;
  --danger:     #ef4444;
  --warning:    #f59e0b;
  --dark:       #0f172a;
  --card:       #1e293b;
  --border:     #334155;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --red-fest:   #ED2F54;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ── Public Layout ─────────────────────────────────────────── */
.public-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Hero Banner ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0e2058 100%);
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2341C1F9' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: .5;
}

.hero__content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero__badge {
  display: inline-block;
  background: rgba(65, 193, 249, 0.2);
  border: 1px solid rgba(65, 193, 249, 0.4);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero__emoji { font-size: 3.5rem; display: block; margin-bottom: 16px; }

.hero__title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero__title span { color: var(--accent); }

.hero__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hero__dates {
  font-size: .9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.hero__venue {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--sm { max-width: 600px; }
.container--md { max-width: 750px; }

/* ── Section ───────────────────────────────────────────────── */
.section { padding: 40px 20px; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

.card--glow {
  box-shadow: 0 0 30px rgba(65, 193, 249, 0.1);
  border-color: rgba(65, 193, 249, 0.3);
}

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card__subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-lt), var(--primary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  text-decoration: none;
  color: #fff;
}

.btn--accent {
  background: linear-gradient(135deg, #06b6d4, var(--accent));
  color: var(--dark);
  box-shadow: 0 4px 15px rgba(65, 193, 249, 0.3);
}

.btn--accent:hover { transform: translateY(-2px); color: var(--dark); text-decoration: none; }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--outline:hover { background: var(--card); text-decoration: none; }

.btn--success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
}

.btn--danger {
  background: linear-gradient(135deg, #b91c1c, var(--danger));
  color: #fff;
}

.btn--full { width: 100%; }
.btn--sm { padding: 8px 16px; font-size: .85rem; border-radius: 8px; }
.btn--lg { padding: 16px 36px; font-size: 1.05rem; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.form-label span { color: var(--red-fest); }

.form-control {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: .95rem;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(65, 193, 249, 0.15);
}

.form-control::placeholder { color: var(--text-muted); opacity: .6; }

select.form-control option { background: var(--card); color: var(--text); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: .82rem;
  color: var(--danger);
  margin-top: 5px;
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: .9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.4); color: #86efac; }
.alert-error   { background: rgba(239, 68, 68, 0.15);  border: 1px solid rgba(239, 68, 68, 0.4);  color: #fca5a5; }
.alert-info    { background: rgba(65, 193, 249, 0.15);  border: 1px solid rgba(65, 193, 249, 0.4);  color: var(--accent); }
.alert-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); color: #fcd34d; }

/* ── Passport Card ─────────────────────────────────────────── */
.passport-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border: 2px solid rgba(65, 193, 249, 0.3);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.passport-card::before {
  content: '🥁';
  position: absolute;
  right: -20px;
  top: -20px;
  font-size: 8rem;
  opacity: .05;
}

.passport-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.passport-card__org {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.passport-card__event {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
}

.passport-badge {
  background: rgba(65, 193, 249, 0.15);
  border: 1px solid rgba(65, 193, 249, 0.4);
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
}

.passport-badge__code {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: .08em;
  font-family: 'Courier New', monospace;
}

.passport-badge__label {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.passport-card__visitor {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.visitor-avatar {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-lt), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.visitor-name { font-size: 1.2rem; font-weight: 800; }
.visitor-sub  { font-size: .8rem; color: var(--text-muted); }

/* ── Status badge ──────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.status-badge--completed  { background: rgba(34,197,94,.2);  color: #86efac; border: 1px solid rgba(34,197,94,.4); }
.status-badge--in_progress{ background: rgba(245,158,11,.2); color: #fcd34d; border: 1px solid rgba(245,158,11,.4); }
.status-badge--registered  { background: rgba(148,163,184,.15); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Progress ──────────────────────────────────────────────── */
.progress-section { margin-bottom: 28px; }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: .85rem;
}

.progress-bar-wrap {
  height: 10px;
  background: rgba(255,255,255,.1);
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-lt), var(--accent));
  border-radius: 50px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

.progress-bar--complete { background: linear-gradient(90deg, #16a34a, #22c55e); }

/* ── Stamps Grid ───────────────────────────────────────────── */
.stamps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 480px) {
  .stamps-grid { grid-template-columns: repeat(6, 1fr); }
}

.stamp {
  text-align: center;
  cursor: default;
}

.stamp__inner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 6px;
  transition: all .3s;
}

.stamp--earned .stamp__inner {
  background: linear-gradient(135deg, #065f46, var(--success));
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
  border: 2px solid rgba(34, 197, 94, 0.6);
}

.stamp--empty .stamp__inner {
  background: rgba(255,255,255,.05);
  border: 2px dashed var(--border);
  color: var(--text-muted);
}

.stamp__label {
  font-size: .65rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.2;
}

.stamp--earned .stamp__label { color: var(--success); }

/* ── Reward display ────────────────────────────────────────── */
.reward-display {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  margin-bottom: 20px;
}

.reward-display__icon { font-size: 2rem; margin-bottom: 8px; }
.reward-display__title { font-size: 1rem; font-weight: 800; color: var(--gold); }
.reward-display__sub { font-size: .82rem; color: var(--text-muted); margin-top: 4px; }

.reward-display--complete {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}
.reward-display--complete .reward-display__title { color: var(--success); }

/* ── Checkpoint page ───────────────────────────────────────── */
.zone-header {
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid rgba(65, 193, 249, 0.2);
}

.zone-header__emoji { font-size: 3rem; margin-bottom: 12px; }
.zone-header__name  { font-size: 1.4rem; font-weight: 900; }
.zone-header__loc   { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }

.code-input-wrap { position: relative; }

.code-input {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  font-family: 'Courier New', monospace;
}

/* ── Already scanned ───────────────────────────────────────── */
.already-scanned {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}

.already-scanned__icon { font-size: 3rem; margin-bottom: 12px; }
.already-scanned__title { font-size: 1.2rem; font-weight: 800; color: var(--success); }

/* ── Steps progress ────────────────────────────────────────── */
.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
}

.step__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  background: var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}

.step--active .step__num { background: var(--primary-lt); color: #fff; }
.step--done   .step__num { background: var(--success); color: #fff; }
.step--active { color: var(--text); font-weight: 600; }

.step-divider { width: 30px; height: 1px; background: var(--border); }

/* ── Social CTA ────────────────────────────────────────────── */
.social-cta {
  background: rgba(65, 193, 249, 0.08);
  border: 1px solid rgba(65, 193, 249, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  margin-top: 20px;
  font-size: .88rem;
  color: var(--text-muted);
}

.social-cta strong { color: var(--accent); }

/* ── Footer ────────────────────────────────────────────────── */
.public-footer {
  text-align: center;
  padding: 30px 20px;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.public-footer a { color: var(--text-muted); }

/* ── Celebration animation ─────────────────────────────────── */
@keyframes pop-in {
  0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
  70%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.stamp--new .stamp__inner {
  animation: pop-in .5s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(34,197,94,.3); }
  50%       { box-shadow: 0 0 40px rgba(34,197,94,.7); }
}

.passport-card--complete {
  border-color: rgba(34, 197, 94, .5);
  animation: pulse-glow 2s ease infinite;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 40px 16px 36px; }
  .card { padding: 20px; }
  .passport-card { padding: 20px; }
  .stamps-grid { gap: 8px; }
  .stamp__inner { width: 48px; height: 48px; font-size: 1.2rem; }
}

/* ── Utility ───────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-gold    { color: var(--gold); }
.text-sm      { font-size: .85rem; }
.text-xs      { font-size: .75rem; }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 800; }
.mt-8         { margin-top: 8px; }
.mt-12        { margin-top: 12px; }
.mt-20        { margin-top: 20px; }
.mt-32        { margin-top: 32px; }
.mb-8         { margin-bottom: 8px; }
.mb-16        { margin-bottom: 16px; }
.mb-24        { margin-bottom: 24px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
