:root {
  --bg: #f7f1e8;
  --panel: rgba(255, 250, 243, 0.86);
  --panel-strong: #fffaf3;
  --text: #1f1720;
  --muted: #6d6169;
  --accent: #bf5b36;
  --accent-dark: #8d351a;
  --line: rgba(31, 23, 32, 0.1);
  --seat: #efe6d8;
  --seat-selected: #bf5b36;
  --seat-occupied: #2d262f;
  --shadow: 0 18px 40px rgba(92, 58, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 208, 149, 0.55), transparent 28%),
    radial-gradient(circle at top right, rgba(191, 91, 54, 0.18), transparent 24%),
    linear-gradient(160deg, #f4ecdf 0%, #f7f1e8 45%, #efe2d3 100%);
  min-height: 100vh;
}

button {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.events-panel,
.booking-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -90px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 91, 54, 0.2), transparent 65%);
}

.topbar,
.hero-content,
.main-grid,
.section-heading,
.selected-event-card,
.summary-row,
.hero-actions,
.legend,
.brand {
  display: flex;
}

.topbar,
.selected-event-card,
.summary-row,
.hero-actions,
.legend {
  align-items: center;
  justify-content: space-between;
}

.topbar {
  gap: 16px;
}

.brand {
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #de9b6d 100%);
  color: #fff8f0;
  font-weight: 700;
}

.eyebrow,
.selected-label,
.hero-card-label {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand h1,
.section-heading h3,
.selected-event-card h4,
.hero-card h3 {
  margin: 0;
}

.ghost-button,
.primary-button {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.ghost-button {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
}

.primary-button {
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff9f3;
  box-shadow: 0 10px 24px rgba(191, 91, 54, 0.24);
}

.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.hero-content {
  gap: 22px;
  margin-top: 32px;
  align-items: stretch;
}

.hero-copy,
.hero-card {
  flex: 1;
}

.hero-copy h2 {
  margin: 10px 0 14px;
  max-width: 11ch;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.94;
  font-weight: 400;
}

.hero-text,
#heroEventMeta,
#selectedEventVenue,
.hero-note,
.booking-message,
.event-meta,
.event-description {
  color: var(--muted);
}

.hero-text,
.event-description {
  line-height: 1.7;
}

.hero-text {
  max-width: 54ch;
}

.hero-actions {
  justify-content: flex-start;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-card {
  align-self: flex-end;
  padding: 24px;
  border-radius: 24px;
  min-height: 240px;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.7), rgba(255, 240, 228, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='240' viewBox='0 0 340 240'%3E%3Cg fill='none' stroke='rgba(191,91,54,0.10)'%3E%3Cpath d='M12 192c46-72 108-108 186-108 56 0 95 18 130 54'/%3E%3Cpath d='M0 223c52-79 120-119 203-119 55 0 100 17 137 51'/%3E%3C/g%3E%3C/svg%3E");
  border: 1px solid rgba(191, 91, 54, 0.1);
}

.hero-pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-pill,
.price-chip,
.event-badge {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(191, 91, 54, 0.1);
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 500;
}

.main-grid {
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.events-panel {
  flex: 1.1;
  padding: 24px;
}

.booking-panel {
  flex: 0.9;
  padding: 24px;
  position: sticky;
  top: 18px;
}

.section-heading {
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.event-list {
  display: grid;
  gap: 16px;
}

.detector-card {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.detector-result {
  margin: 12px 0 0;
  color: var(--muted);
  min-height: 24px;
}

.event-card {
  border-radius: 22px;
  padding: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.event-card:hover,
.event-card.active {
  transform: translateY(-3px);
  border-color: rgba(191, 91, 54, 0.36);
  box-shadow: 0 16px 30px rgba(92, 58, 36, 0.08);
}

.event-card-top,
.event-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.event-card-top {
  align-items: flex-start;
}

.event-card-bottom {
  align-items: center;
  margin-top: 18px;
}

.event-title {
  margin: 8px 0 6px;
  font-size: 1.3rem;
}

.event-description {
  margin: 10px 0 0;
}

.screen-label {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.screen-curve {
  height: 22px;
  margin: 10px auto 20px;
  width: 80%;
  border-top: 4px solid rgba(191, 91, 54, 0.28);
  border-radius: 50%;
}

.legend {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.legend-box.available,
.seat {
  background: var(--seat);
}

.legend-box.selected,
.seat.selected {
  background: var(--seat-selected);
}

.legend-box.occupied,
.seat.occupied {
  background: var(--seat-occupied);
}

.seat-map {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.seat {
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 12px 12px 8px 8px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.seat:hover:not(.occupied) {
  transform: scale(1.04);
}

.seat.selected,
.seat.occupied {
  color: #fff8f0;
}

.seat.occupied {
  cursor: not-allowed;
}

.summary-card {
  margin-top: 20px;
  padding: 18px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.payment-panel {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.payment-title,
.field-label {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.payment-options {
  display: grid;
  gap: 10px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdf9;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.payment-option:hover,
.payment-option.active {
  border-color: rgba(191, 91, 54, 0.4);
  background: rgba(191, 91, 54, 0.06);
  transform: translateY(-1px);
}

.payment-option input {
  margin: 0;
}

.payment-fields {
  margin-top: 14px;
}

.text-field,
.select-field {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--text);
  font: inherit;
}

.text-field:focus,
.select-field:focus {
  outline: 2px solid rgba(191, 91, 54, 0.18);
  border-color: rgba(191, 91, 54, 0.4);
}

.hidden {
  display: none;
}

.summary-row {
  padding: 8px 0;
}

.total-row {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 1.08rem;
}

.full-width {
  width: 100%;
  margin-top: 18px;
}

.booking-message {
  min-height: 24px;
  margin: 14px 0 0;
}

.qr-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
}

.qr-modal.hidden {
  display: none;
}

.qr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 23, 32, 0.52);
  backdrop-filter: blur(6px);
}

.qr-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 380px);
  padding: 24px;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

.qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 23, 32, 0.08);
  color: var(--text);
  cursor: pointer;
}

.qr-copy {
  color: var(--muted);
  line-height: 1.6;
}

.qr-image {
  width: min(100%, 240px);
  height: auto;
  margin: 12px auto;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: white;
  padding: 10px;
}

@media (max-width: 960px) {
  .hero-content,
  .main-grid {
    flex-direction: column;
  }

  .booking-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 10px;
  }

  .hero,
  .events-panel,
  .booking-panel {
    border-radius: 22px;
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy h2 {
    max-width: 100%;
    font-size: clamp(2.4rem, 16vw, 4rem);
  }

  .seat-map {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .selected-event-card,
  .event-card-top,
  .event-card-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
