:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #14141a;
  --text-muted: #62626d;
  --border: #e6e4de;
  --accent: #00693e;
  --accent-dark: #004d2e;
  --accent-ink: #ffffff;
  --accent-gold: #f2a93b;
  --accent-gold-dark: #96650f;
  --accent-red: #e4002b;
  --success: #1f9d55;
  --warn: #b4750a;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20,20,26,0.06);
  --shadow-lg: 0 12px 32px rgba(20,20,26,0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Anchor targets must clear the sticky header. */
[id] { scroll-margin-top: 110px; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 92px;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
/* Stacked lockup (emblem over wordmark), so it needs real height to stay legible. */
.brand img {
  height: 72px;
  width: auto;
  display: block;
}
@media (max-width: 640px) {
  .site-header .container { height: 74px; }
  .brand img { height: 56px; }
}
.header-nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
}
.header-nav a:hover { color: var(--text); background: rgba(20,20,26,0.06); }

/* Photo-led banner: real crowd shot under a brand-green wash, weighted to the
   left so the headline always has enough contrast regardless of the image. */
.hero {
  position: relative;
  background-image:
    linear-gradient(100deg, rgba(3,42,26,0.88) 0%, rgba(3,42,26,0.66) 46%, rgba(3,42,26,0.22) 100%),
    url('/images/hero-crowd.jpg');
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center, center 34%;
  color: #fff;
  padding: 84px 0 92px;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #ffe7b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.btn-on-photo { background: #fff; color: var(--accent-dark); }
.btn-on-photo:hover { filter: brightness(0.93); }
.btn-ghost {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
@media (max-width: 640px) {
  .hero { padding: 56px 0 64px; }
}
.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 14px;
  max-width: 20ch;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero p {
  color: rgba(255,255,255,0.88);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  max-width: 48ch;
}

.section { padding: 44px 0; }
.section h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Small brand tick before section headings. */
.section h2::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* Visible keyboard focus everywhere (was relying on browser defaults). */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.event-card .banner {
  position: relative;
  height: 168px;
  background: linear-gradient(135deg, var(--accent), var(--accent-gold));
  background-size: cover;
  background-position: center;
}
/* Scrim keeps the date chip legible over any photo. */
.event-card .banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0) 45%);
}
.event-card:hover .banner { transform: none; }
.event-card .banner .date-chip {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.94);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.event-card .body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.event-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.event-card .venue { color: var(--text-muted); font-size: 13px; }
.event-card .price-row {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.event-card .price { font-weight: 800; font-size: 15px; }
.event-card .price small { font-weight: 600; color: var(--text-muted); font-size: 11px; }
.event-card .cta {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: filter .12s ease, transform .05s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(0.94); }
.btn-primary:disabled { background: #ddd; color: #999; cursor: not-allowed; }
.btn-secondary { background: #ececeb; color: var(--text); }
.btn-secondary:hover { filter: brightness(0.96); }
.btn-block { width: 100%; }

.event-detail {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 800px) {
  .event-detail { grid-template-columns: 1fr; }
}
.event-banner {
  width: 100%;
  height: 280px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-gold));
  background-size: cover;
  background-position: center;
  margin-bottom: 20px;
}
.event-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; color: var(--text-muted); font-size: 14px; }
.event-meta strong { color: var(--text); }
.event-description { white-space: pre-line; color: var(--text); }

.ticket-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 112px;             /* clears the 92px sticky header */
  box-shadow: var(--shadow);
}
.ticket-panel h3 { margin: 0 0 14px; font-size: 16px; }
.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ticket-row:last-of-type { border-bottom: none; }
.ticket-row .name { font-weight: 700; font-size: 14px; }
.ticket-row .desc { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.ticket-row .price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.ticket-row .state-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-control button {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.qty-control button:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-control .qty-value { min-width: 20px; text-align: center; font-weight: 700; }

.ticket-summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 16px;
  padding: 16px 0;
  border-top: 2px solid var(--text);
  margin-top: 4px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-field label { font-size: 13px; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-error { color: #d32f2f; font-size: 13px; margin: -6px 0 12px; }

.checkout-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 800px) { .checkout-layout { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 20px; }
.card h3 { margin: 0 0 16px; font-size: 16px; }

.order-summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.order-summary-line.total {
  font-weight: 800;
  font-size: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff3cd;
  color: #8a6100;
}

.test-mode-banner {
  background: #fff3cd;
  color: #8a6100;
  border: 1px solid #f0d78c;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.ticket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.ticket-card img { margin: 0 auto 12px; border-radius: 8px; }
.ticket-card .ticket-type { font-weight: 800; font-size: 15px; }
.ticket-card .ticket-code { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer {
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.countdown { font-weight: 700; color: var(--accent-dark); }

.stack-gap { display: flex; flex-direction: column; gap: 12px; }
