/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #8b4a8b;
  --brand-dark: #6b3a6b;
  --brand-amber: #c9821e;
  --bg: #f7f4f7;
  --surface: #ffffff;
  --text: #1e1e1e;
  --muted: #6b7280;
  --border: #e0d8e0;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.07);
}
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ── */
.site-header { background: #2d1b3d; color: #fff; padding: 1rem 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: -0.5px; text-decoration: none; }
.logo:hover { text-decoration: none; color: #d4a8d4; }
.logo-gem { font-size: 1.5rem; flex-shrink: 0; }
.logo-text { line-height: 1; white-space: nowrap; }
.site-header nav { display: flex; gap: 1.5rem; align-items: center; }
.site-header nav a { color: #c4a0c4; font-size: 0.95rem; }
.site-header nav a:hover { color: #fff; text-decoration: none; }
.btn-submit { background: #c9821e; color: #fff !important; padding: 0.5rem 1.2rem; border-radius: var(--radius); font-weight: 600; }
.btn-submit:hover { background: #a86e18 !important; }

/* ── Hero ── */
.hero { background: linear-gradient(135deg, #2d1b3d 0%, #4a2060 50%, #1d2a3a 100%); color: #fff; padding: 4rem 0 3rem; text-align: center; }
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 0.75rem; }
.hero p { font-size: 1.1rem; color: #c4a0c4; margin-bottom: 2rem; }

/* ── Search Pill ── */
.search-bar { max-width: 960px; margin: 0 auto; }
.search-pill { display: flex; align-items: center; background: #fff; border-radius: 50px; box-shadow: 0 4px 24px rgba(0,0,0,0.18); overflow: visible; flex-wrap: wrap; padding: 0; }
.sp-field { display: flex; align-items: center; gap: 0.4rem; padding: 0 1rem; flex: 1; min-width: 0; position: relative; }
.sp-field--keyword { flex: 2; min-width: 160px; }
.sp-field--location { flex: 1.5; min-width: 140px; }
.sp-field--select { flex: 0 0 auto; padding: 0 0.5rem; }
.sp-field--category { flex: 0 0 auto; min-width: 140px; }
.sp-field--daterange { flex: 0 0 auto; min-width: 200px; }
.sp-icon { width: 16px !important; height: 16px !important; max-width: 16px; max-height: 16px; color: #9ca3af; flex-shrink: 0; display: block; }
.sp-field input { border: none; outline: none; background: transparent; font-size: 0.9rem; color: var(--text); width: 100%; padding: 0.9rem 0; line-height: 1; }
.sp-field input::placeholder { color: #9ca3af; }
.sp-field select { border: none; outline: none; background: transparent; font-size: 0.88rem; color: var(--text); cursor: pointer; padding: 0.9rem 0.25rem; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 20px; }
.sp-field select:focus { outline: none; }
.sp-divider { width: 1px; height: 28px; background: #e5e7eb; flex-shrink: 0; }
.sp-btn { background: var(--brand); color: #fff; border: none; padding: 0.75rem 1.75rem; border-radius: 50px; font-size: 0.95rem; font-weight: 600; cursor: pointer; white-space: nowrap; margin: 5px 5px 5px 0; flex-shrink: 0; }
.sp-btn:hover { background: var(--brand-dark); }
.sp-error { font-size: 0.72rem; color: #c00; position: absolute; bottom: 2px; left: 2.2rem; white-space: nowrap; }

/* ── Events Grid ── */
.events-section { padding: 2.5rem 0; }
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.event-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; display: flex; flex-direction: column; color: var(--text); border: 1px solid var(--border); }
.event-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.11); text-decoration: none; }
.event-img-wrap { position: relative; height: 210px; overflow: hidden; flex-shrink: 0; }
.event-img { width: 100%; height: 100%; object-fit: contain; background: #f5f0f5; display: block; }
.event-img-placeholder { height: 210px; flex-shrink: 0; background: linear-gradient(135deg, #2d1b3d, #4a2060); display: flex; align-items: center; justify-content: center; }
.gem-icon { font-size: 3.5rem; }
.detail-hero-img { width: 100%; max-height: 480px; object-fit: contain; background: #f5f0f5; border-radius: 12px; margin: 1.25rem 0 2rem; display: block; }
.event-info { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.event-category { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand); letter-spacing: 0.5px; }
.event-info h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.event-date, .event-location { font-size: 0.875rem; color: var(--muted); }
.event-distance { font-size: 0.8rem; color: #c9821e; font-weight: 600; }
.badge-free { display: inline-block; background: #d1fae5; color: #065f46; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 99px; margin-top: auto; }
.badge-paid { display: inline-block; background: #fef3c7; color: #92400e; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 99px; margin-top: auto; }

/* ── Pagination ── */
.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 2.5rem; }
.pagination a { background: var(--surface); border: 1px solid var(--border); padding: 0.5rem 1.2rem; border-radius: var(--radius); }
.pagination span { color: var(--muted); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 4rem 0; color: var(--muted); font-size: 1.1rem; }

/* ── Event Detail ── */
.detail-meta { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.detail-row { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.95rem; }
.detail-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.detail-desc { line-height: 1.8; color: var(--text); background: var(--bg); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; border: 1px solid var(--border); }
.report-section { font-size: 0.9rem; }

/* ── Buttons ── */
.btn-primary { display: inline-block; background: var(--brand); color: #fff; padding: 0.75rem 1.75rem; border-radius: var(--radius); font-weight: 600; border: none; cursor: pointer; font-size: 1rem; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn-secondary { display: inline-block; background: var(--surface); color: var(--text); padding: 0.75rem 1.75rem; border-radius: var(--radius); font-weight: 600; border: 1px solid var(--border); cursor: pointer; font-size: 1rem; }
.btn-secondary:hover { background: var(--bg); text-decoration: none; }

/* ── Footer ── */
.site-footer { background: #2d1b3d; color: #7b5c8b; text-align: center; padding: 1.5rem 0; font-size: 0.875rem; margin-top: 3rem; }
.site-footer a { color: #c4a0c4; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .events-grid { grid-template-columns: 1fr; }
  .search-pill { border-radius: var(--radius); flex-direction: column; align-items: stretch; padding: 0.5rem; gap: 0; }
  .sp-field { border-bottom: 1px solid #f3f4f6; padding: 0 0.75rem; }
  .sp-field:last-of-type { border-bottom: none; }
  .sp-field--select, .sp-field--category, .sp-field--daterange { flex: 1; min-width: unset; }
  .sp-divider { display: none; }
  .sp-btn { margin: 0.5rem 0 0; border-radius: var(--radius); width: 100%; padding: 0.75rem; }
}

/* ── Tag list (event cards) ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.35rem; }
.event-tag { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.15rem 0.5rem; border-radius: 99px; background: color-mix(in srgb, #8b4a8b 12%, transparent); color: var(--brand); }
.event-tag--past { background: #6b7280; color: #fff; opacity: 0.85; }

/* ── Past shows checkbox ── */
.past-shows-check { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); cursor: pointer; padding-left: 0.25rem; }
.past-shows-check input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }

/* ── Patchwork Graphics ── */

/* Hero: layered quilt diamond pattern (triangle-in-corner blocks) over existing gradient */
.hero {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpolygon points='0,0 30,0 0,30' fill='%23ffffff' opacity='0.07'/%3E%3Cpolygon points='30,0 60,0 60,30' fill='%23ffffff' opacity='0.07'/%3E%3Cpolygon points='0,30 30,60 0,60' fill='%23ffffff' opacity='0.07'/%3E%3Cpolygon points='60,30 60,60 30,60' fill='%23ffffff' opacity='0.07'/%3E%3C/svg%3E") 0 0 / 60px 60px repeat,
    linear-gradient(135deg, #2d1b3d 0%, #4a2060 50%, #1d2a3a 100%);
}

/* Event card placeholder: nine-patch patchwork with stitching lines (smaller tiles) */
.event-img-placeholder {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15'%3E%3Crect width='5' height='5' fill='%238b4a8b'/%3E%3Crect x='5' width='5' height='5' fill='%23c4a0c4'/%3E%3Crect x='10' width='5' height='5' fill='%234a2060'/%3E%3Crect y='5' width='5' height='5' fill='%23c9821e'/%3E%3Crect x='5' y='5' width='5' height='5' fill='%23f0e8f0'/%3E%3Crect x='10' y='5' width='5' height='5' fill='%23c9821e'/%3E%3Crect y='10' width='5' height='5' fill='%234a2060'/%3E%3Crect x='5' y='10' width='5' height='5' fill='%23c4a0c4'/%3E%3Crect x='10' y='10' width='5' height='5' fill='%238b4a8b'/%3E%3C/svg%3E") 0 0 / 15px 15px repeat;
}
.event-img-placeholder .gem-icon {
  background: #fff;
  border-radius: 50%;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Header: thin patchwork color-block stripe along the bottom */
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    #8b4a8b 0px,   #8b4a8b 20px,
    #c9821e 20px,  #c9821e 40px,
    #4a2060 40px,  #4a2060 60px,
    #c4a0c4 60px,  #c4a0c4 80px,
    #6b3a6b 80px,  #6b3a6b 100px,
    #a86e18 100px, #a86e18 120px
  );
}

/* ── Guide hero ── */
.guide-hero {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpolygon points='0,0 30,0 0,30' fill='%23ffffff' opacity='0.07'/%3E%3Cpolygon points='30,0 60,0 60,30' fill='%23ffffff' opacity='0.07'/%3E%3Cpolygon points='0,30 30,60 0,60' fill='%23ffffff' opacity='0.07'/%3E%3Cpolygon points='60,30 60,60 30,60' fill='%23ffffff' opacity='0.07'/%3E%3C/svg%3E") 0 0 / 60px 60px repeat,
    linear-gradient(135deg, #1f0a1f 0%, #3d1a3d 60%, #2a0f2a 100%);
  color: #fff; padding: 3rem 1rem 2.5rem;
}
.guide-breadcrumb { font-size: 0.82rem; color: rgba(255,255,255,0.65); margin-bottom: 0.75rem; }
.guide-breadcrumb a { color: rgba(255,255,255,0.75); text-decoration: underline; }
.guide-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.4rem; line-height: 1.2; }
.guide-subtitle { font-size: 1rem; color: rgba(255,255,255,0.8); }

/* ── Guide body layout ── */
.guide-body { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; padding-top: 2.5rem; padding-bottom: 4rem; align-items: start; max-width: 1100px; }
.guide-content { min-width: 0; }
.guide-intro { font-size: 1.05rem; line-height: 1.8; color: var(--text); margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.guide-content h2 { font-size: 1.25rem; font-weight: 800; margin: 2rem 0 0.75rem; color: var(--text); }
.guide-content p { font-size: 0.97rem; line-height: 1.8; color: var(--text); margin-bottom: 1rem; }
.guide-content ul, .guide-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.guide-content li { font-size: 0.95rem; line-height: 1.75; color: var(--text); margin-bottom: 0.4rem; }
.guide-content strong { font-weight: 700; color: var(--text); }
.checklist { list-style: none; padding-left: 0; }
.checklist li { padding: 0.5rem 0 0.5rem 1.75rem; position: relative; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: none; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* ── Guide sidebar ── */
.guide-sidebar { position: sticky; top: 90px; }
.guide-tip-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.guide-tip-box h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.75rem; }
.guide-tip-box ul { list-style: none; padding: 0; margin: 0; }
.guide-tip-box li { font-size: 0.88rem; color: var(--text); padding: 0.35rem 0; border-bottom: 1px solid var(--border); line-height: 1.5; }
.guide-tip-box li:last-child { border-bottom: none; }
.guide-cta { display: block; background: var(--brand); color: #fff; text-align: center; padding: 0.85rem 1rem; border-radius: var(--radius); font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.guide-cta:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }

@media (max-width: 768px) {
  .guide-body { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
  .guide-hero h1 { font-size: 1.5rem; }
}
