/* ============================================================
   St. Thomas Chamber Summer Fun Passport — Global Styles
   ============================================================ */

/* Custom Properties */
:root {
  --green-dark: #0f2d1a;
  --green-surface: #1a5c30;
  --green-mid: #1e6b38;
  --green-light: #2a8045;
  --gold: #c8981a;
  --gold-light: #f0c040;
  --gold-pale: #fdf3d0;
  --cream: #f5f0e8;
  --cream-dark: #ede6d6;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-mid: #3a3a3a;
  --text-muted: #6b6b6b;
  --text-light: #f5f0e8;
  --red: #c0392b;
  --red-light: #fdecea;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.12);
  --shadow-gold: 0 4px 16px rgba(200,152,26,0.35);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: 0.22s ease;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: var(--green-surface); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  background: var(--green-dark);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-logo:hover { text-decoration: none; color: var(--white); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--green-surface);
  color: var(--gold-light);
  text-decoration: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  background: var(--green-dark);
  background-image:
    radial-gradient(ellipse at 30% 60%, rgba(26,92,48,0.55) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(200,152,26,0.12) 0%, transparent 50%);
  padding: 80px 20px 90px;
  text-align: center;
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.015) 40px,
    rgba(255,255,255,0.015) 80px
  );
  pointer-events: none;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(245,240,232,0.85);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-body);
}

.btn:hover { text-decoration: none; }

.btn-gold {
  background: var(--gold);
  color: var(--green-dark);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,152,26,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-light);
  border-color: rgba(245,240,232,0.5);
}

.btn-outline:hover {
  background: rgba(245,240,232,0.1);
  border-color: var(--text-light);
  color: var(--white);
}

.btn-green {
  background: var(--green-surface);
  color: var(--white);
  border-color: var(--green-surface);
}

.btn-green:hover {
  background: var(--green-light);
  border-color: var(--green-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   Containers & Sections
   ============================================================ */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 20px;
}

.section-dark {
  background: var(--green-dark);
  color: var(--text-light);
}

.section-green {
  background: var(--green-surface);
  color: var(--text-light);
}

.section-cream {
  background: var(--cream);
}

.section-white {
  background: var(--white);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: inherit;
  margin-bottom: 8px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: rgba(245,240,232,0.75);
  margin-bottom: 40px;
}

.section-cream .section-subtitle,
.section-white .section-subtitle {
  color: var(--text-muted);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-cream .section-title,
.section-white .section-title {
  color: var(--green-dark);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 20px 22px;
}

.card-header {
  background: var(--green-dark);
  color: var(--text-light);
  padding: 16px 22px;
}

.card.visited {
  border: 2px solid var(--gold);
  box-shadow: 0 4px 16px rgba(200,152,26,0.2);
}

/* ============================================================
   Business Grid
   ============================================================ */
.businesses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
}

.business-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}

.business-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.business-card.visited {
  border-color: var(--gold);
}

.business-card-emoji {
  font-size: 3rem;
  text-align: center;
  padding: 24px 20px 12px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
}

.business-card-body {
  padding: 0 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.business-card-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.business-card-category {
  display: inline-block;
  background: var(--green-dark);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.business-card-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 12px;
  flex: 1;
}

.business-card-address {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.business-card-stamp-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--cream-dark);
}

.business-card-qr {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.business-card-qr .qr-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   Stamp Seal
   ============================================================ */
.stamp-seal {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
  margin: 0 auto;
  transition: all var(--transition);
}

.stamp-seal.unvisited {
  background: #e0e0e0;
  border: 3px dashed #b0b0b0;
  filter: grayscale(1);
  opacity: 0.55;
}

.stamp-seal.visited {
  background: var(--gold-pale);
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(200,152,26,0.2), inset 0 1px 6px rgba(200,152,26,0.3);
  animation: stamp-pop 0.45s ease forwards;
}

.stamp-seal.visited::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dotted rgba(200,152,26,0.45);
}

/* ============================================================
   Stamp Pop Animation
   ============================================================ */
@keyframes stamp-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  80%  { transform: scale(0.92); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes checkmark-draw {
  0%   { stroke-dashoffset: 100; opacity: 0; }
  20%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes fade-in-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,152,26,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(200,152,26,0); }
}

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

/* ============================================================
   Stamp Success State
   ============================================================ */
.stamp-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  background: linear-gradient(135deg, #f0faf4, #e6f7ed);
  border: 2px solid #2a8045;
  border-radius: var(--radius-lg);
  animation: fade-in-up 0.35s ease;
  text-align: center;
}

.stamp-success.visible { display: flex; }

.stamp-success-icon {
  width: 80px;
  height: 80px;
  background: var(--green-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: stamp-pop 0.45s ease, pulse-glow 2s infinite;
}

.stamp-success-icon svg {
  width: 40px;
  height: 40px;
}

.stamp-success-icon svg polyline {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkmark-draw 0.6s 0.2s ease forwards;
}

.stamp-success h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--green-dark);
}

.stamp-success p {
  color: var(--text-mid);
  font-size: 0.95rem;
}

/* Error state */
.stamp-error {
  display: none;
  padding: 16px 20px;
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-weight: 500;
  text-align: center;
  animation: fade-in-up 0.3s ease;
}

.stamp-error.visible { display: block; }

/* ============================================================
   Progress Bar
   ============================================================ */
.progress-track {
  background: #d8d8d0;
  border-radius: var(--radius-full);
  height: 12px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  background: linear-gradient(90deg, var(--green-surface), var(--green-light));
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.7s cubic-bezier(0.25,0.46,0.45,0.94);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 1px; right: 0; bottom: 1px;
  width: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-full);
}

.progress-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ============================================================
   Passport Page
   ============================================================ */
.passport-header {
  background: var(--green-dark);
  color: var(--text-light);
  padding: 36px 20px;
  border-bottom: 4px solid var(--gold);
}

.passport-header-inner {
  max-width: 900px;
  margin: 0 auto;
}

.passport-id-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.passport-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--white);
  margin-bottom: 20px;
}

.passport-progress-section {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 20px;
}

/* Stamp grid on passport page */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.stamp-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 14px 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 2px solid transparent;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stamp-card.visited {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.stamp-card-name {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.3;
}

.stamp-card-date {
  font-size: 0.75rem;
  color: var(--green-surface);
  font-weight: 600;
}

.stamp-card-unvisited-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   Claim Form
   ============================================================ */
.claim-form-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 20px;
}

.claim-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.claim-form-header {
  background: var(--green-dark);
  color: var(--text-light);
  padding: 28px 32px;
  text-align: center;
}

.claim-form-header h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 6px;
}

.claim-form-header p {
  font-size: 0.9rem;
  color: rgba(245,240,232,0.75);
}

.claim-form-body {
  padding: 28px 32px 32px;
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  border: 2px solid #d0cfc9;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--green-surface);
  box-shadow: 0 0 0 3px rgba(26,92,48,0.15);
}

.form-input::placeholder { color: #aaa; }

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

/* ============================================================
   Leaderboard
   ============================================================ */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.leaderboard-table th {
  background: var(--green-dark);
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 16px;
  text-align: left;
}

.leaderboard-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.leaderboard-table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

.leaderboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--cream-dark);
  vertical-align: middle;
}

.leaderboard-table tr:last-child td { border-bottom: none; }

.leaderboard-table tbody tr {
  background: var(--white);
  transition: background var(--transition);
}

.leaderboard-table tbody tr:nth-child(even) {
  background: #fafaf8;
}

.leaderboard-table tbody tr:hover {
  background: var(--gold-pale);
}

.leaderboard-table tbody tr.current-user {
  background: var(--gold-pale) !important;
  border-left: 4px solid var(--gold);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
}

.rank-1 { background: var(--gold); color: var(--green-dark); }
.rank-2 { background: #c0c0c0; color: var(--text-dark); }
.rank-3 { background: #cd7f32; color: var(--white); }
.rank-other { background: var(--cream-dark); color: var(--text-muted); }

.leaderboard-mini-bar {
  height: 8px;
  background: var(--cream-dark);
  border-radius: var(--radius-full);
  overflow: hidden;
  min-width: 80px;
}

.leaderboard-mini-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-surface), var(--green-light));
  border-radius: var(--radius-full);
}

/* ============================================================
   Dashboard / Admin
   ============================================================ */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--green-surface);
  text-align: center;
}

.stat-card-value {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stat-card.gold-top { border-top-color: var(--gold); }

.dashboard-section {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 28px;
}

.dashboard-section-header {
  background: var(--green-dark);
  color: var(--text-light);
  padding: 16px 22px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-section-body { padding: 20px 22px; }

.perf-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.perf-bar-label {
  width: 140px;
  font-size: 0.875rem;
  color: var(--text-dark);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perf-bar-track {
  flex: 1;
  background: var(--cream-dark);
  border-radius: var(--radius-full);
  height: 20px;
  overflow: hidden;
}

.perf-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-surface), var(--green-light));
  border-radius: var(--radius-full);
  transition: width 1s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
}

.perf-bar-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
}

.activity-feed { display: flex; flex-direction: column; gap: 1px; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cream-dark);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-surface);
  flex-shrink: 0;
}

.activity-text {
  font-size: 0.875rem;
  color: var(--text-dark);
}

.activity-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2a8045;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.live-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fff9a;
  animation: pulse-glow 1.5s infinite;
}

/* ============================================================
   Category Filters
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 2px solid #d0cfc9;
  background: var(--white);
  color: var(--text-dark);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--gold-light);
}

/* ============================================================
   How It Works Steps
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  border: 1px solid rgba(245,240,232,0.12);
  transition: background var(--transition);
}

.step-card:hover { background: rgba(255,255,255,0.1); }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gold);
  color: var(--green-dark);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 12px;
}

.step-emoji {
  font-size: 2.8rem;
  margin-bottom: 12px;
  display: block;
}

.step-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.9rem;
  color: rgba(245,240,232,0.7);
  line-height: 1.55;
}

/* ============================================================
   Stamp Landing Page
   ============================================================ */
.stamp-landing {
  max-width: 540px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}

.stamp-landing-emoji {
  font-size: 5rem;
  margin-bottom: 20px;
  display: block;
  animation: fade-in-up 0.4s ease;
}

.stamp-landing h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--green-dark);
  margin-bottom: 10px;
}

.stamp-landing-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

/* ============================================================
   Scan Page
   ============================================================ */
.scan-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  text-align: center;
}

.scan-wrap h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--green-dark);
  margin-bottom: 8px;
}

.scan-wrap .scan-sub {
  color: var(--text-muted);
  margin-bottom: 28px;
}

#reader {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  background: #111;
  min-height: 280px;
}

.demo-mode-box {
  background: var(--cream);
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
  text-align: left;
}

.demo-mode-box h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.demo-mode-box .demo-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.demo-mode-box select {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  border: 2px solid #d0cfc9;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-dark);
  outline: none;
  cursor: pointer;
}

.demo-mode-box select:focus {
  border-color: var(--green-surface);
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

/* ============================================================
   Page Header (inner pages)
   ============================================================ */
.page-header {
  background: var(--green-dark);
  color: var(--text-light);
  padding: 40px 20px 36px;
  border-bottom: 4px solid var(--gold);
}

.page-header-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--white);
}

.page-header p {
  font-size: 0.9rem;
  color: rgba(245,240,232,0.7);
  margin-top: 4px;
}

/* ============================================================
   Alert / Info Boxes
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.alert-info {
  background: #e8f4fd;
  border: 1px solid #b0d8f5;
  color: #1a4d6b;
}

.alert-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #6d4c00;
}

.alert-demo {
  background: rgba(200,152,26,0.12);
  border: 1px solid rgba(200,152,26,0.4);
  color: var(--green-dark);
  font-weight: 500;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--text-mid); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; max-width: 320px; margin: 0 auto; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--green-dark);
  color: rgba(245,240,232,0.6);
  padding: 40px 20px;
  border-top: 3px solid var(--gold);
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(245,240,232,0.5);
}

.footer-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  opacity: 0.4;
  margin: 8px 0;
}

.footer-powered {
  font-size: 0.78rem;
  color: rgba(245,240,232,0.4);
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* Separator */
.connector {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 20px 0;
}
.connector::before,
.connector::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dark);
}

/* ============================================================
   Media Queries
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--green-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px 16px;
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 16px; }
  .nav-hamburger { display: flex; }

  .businesses-grid {
    grid-template-columns: 1fr;
  }

  .stamp-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .hero { padding: 52px 20px 64px; }

  .section { padding: 44px 20px; }

  .perf-bar-label { width: 100px; font-size: 0.8rem; }

  .stat-cards { grid-template-columns: 1fr 1fr; }

  .claim-form-body { padding: 20px 20px 24px; }
  .claim-form-header { padding: 20px 24px; }

  .page-header-inner { flex-direction: column; align-items: flex-start; }

  .demo-mode-box .demo-row { flex-direction: column; align-items: stretch; }
}

@media (min-width: 769px) {
  .businesses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 420px) {
  .stat-cards { grid-template-columns: 1fr; }
  .stamp-grid { grid-template-columns: repeat(2, 1fr); }
}
