:root {
  --bg: #0B0B0F;
  --card: #17141F;
  --plum: #2A1B3D;
  --text: #F2EDE4;
  --muted: #9C93A8;
  --gold: #F4A93F;
  --coral: #E8543F;
  --teal: #3FA9A0;
  --sunset: linear-gradient(135deg, #F4A93F 0%, #E8543F 100%);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Work Sans", -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.display {
  font-family: "Anton", "Work Sans", sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

a { color: inherit; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 96px;
}

/* Header */
.header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11,11,15,0.9);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sunset);
}

.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

.brand-tagline {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Hero: flyer carousel */
.hero {
  padding: 4px 0 8px;
}

.hero-label {
  font-size: 12px;
  color: var(--muted);
  padding: 0 20px 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.flyer-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 20px 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.flyer-scroll::-webkit-scrollbar { display: none; }

.flyer-card {
  scroll-snap-align: start;
  flex: 0 0 56%;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--plum);
  aspect-ratio: 9/16;
}

.flyer-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flyer-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,15,0.85) 0%, rgba(11,11,15,0) 40%);
}

.flyer-info {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 14px;
}

.flyer-date {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.flyer-title {
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sections */
.section {
  padding: 28px 20px 8px;
  scroll-margin-top: 76px;
}

.section-title {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

/* Join card */
.join-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1px solid rgba(244,169,63,0.15);
}

.join-headline {
  font-size: 22px;
  margin: 0 0 6px;
  line-height: 1.15;
}

.join-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.4;
}

.field-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

input[type="email"] {
  flex: 1;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

input[type="email"]:focus {
  border-color: var(--gold);
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--sunset);
  color: #17110A;
}

.btn-secondary {
  width: 100%;
  background: rgba(63,169,160,0.12);
  color: var(--teal);
  border: 1px solid rgba(63,169,160,0.3);
}

.form-status {
  font-size: 13px;
  margin-top: 10px;
  min-height: 16px;
}

.form-status.ok { color: var(--teal); }
.form-status.err { color: var(--coral); }

/* Event list */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
}

.event-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.event-meta { flex: 1; min-width: 0; }

.event-name {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-date {
  font-size: 12px;
  color: var(--muted);
}

.ticket-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(244,169,63,0.4);
  border-radius: 10px;
  padding: 8px 12px;
  white-space: nowrap;
}

/* Bottom nav */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  background: rgba(23,20,31,0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 4px 12px;
  transition: color 0.15s ease;
}

.tab:active {
  color: var(--gold);
}

.tab-icon {
  width: 22px;
  height: 22px;
}

/* Install banner */
.install-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 20px 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--plum);
}

.install-banner.show { display: flex; }

.install-text {
  font-size: 13px;
  color: var(--text);
}

.install-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

/* Event detail modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,11,15,0.7);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  position: relative;
  animation: sheet-up 0.2s ease-out;
}

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

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.close-btn svg {
  width: 18px;
  height: 18px;
}

.close-btn-dark {
  background: rgba(0,0,0,0.55);
  color: #fff;
}

.close-btn-light {
  background: rgba(0,0,0,0.5);
  color: #fff;
  top: calc(16px + env(safe-area-inset-top));
}

.modal-flyer {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  margin-bottom: 16px;
}

.modal-date {
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.modal-title {
  font-size: 24px;
  margin: 0 0 14px;
  line-height: 1.15;
}

.modal-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
  margin: 0 0 20px;
}

.modal-instagram {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-bottom: 10px;
}

.modal-ticket {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-bottom: 10px;
}

.modal-share {
  width: 100%;
}

/* Fullscreen flyer viewer */
.flyer-viewer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.flyer-viewer-overlay.show {
  display: flex;
}

.flyer-viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.flyer-viewer-scroll {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.flyer-viewer-scroll::-webkit-scrollbar { display: none; }

.flyer-viewer-scroll img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
}

.flyer-viewer-dots {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.flyer-viewer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.15s ease;
}

.flyer-viewer-dot.active {
  background: #fff;
}



/* Flyer title as its own tappable target within the hero card */
.flyer-title-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  display: block;
  width: 100%;
  color: inherit;
}
