/* ===== Variables ===== */
:root {
  --navy:        #0b1a33;
  --navy-mid:    #162545;
  --accent:      #3d7eff;
  --accent-dark: #2b6bf0;
  --accent-glow: rgba(61, 126, 255, 0.22);
  --bg:          #f3f6fb;
  --surface:     #ffffff;
  --text:        #1a2a42;
  --text-muted:  #64748b;
  --border:      #e1e7f0;
  --shadow-sm:   0 1px 4px rgba(11, 26, 51, 0.07);
  --shadow:      0 4px 20px rgba(11, 26, 51, 0.10);
  --shadow-up:   0 8px 32px rgba(11, 26, 51, 0.14);
  --radius:      14px;
  --radius-sm:   8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ===== Loading ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

/* ===== Error ===== */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.error-content { max-width: 400px; }

.error-icon {
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  margin: 0 auto 1.5rem;
  display: block;
}

.error-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.error-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.875rem; }

.btn-hero {
  background: var(--accent);
  color: #fff;
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-hero:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 28px var(--accent-glow);
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.025) 0px,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 32px
    ),
    linear-gradient(145deg, #0b1a33 0%, #162c55 55%, #0c2347 100%);
  color: #fff;
  padding: 5rem 2rem 5.5rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(61, 126, 255, 0.13) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
}

.crowd-logo {
  width: 108px;
  height: 108px;
  border-radius: 20px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.75rem;
}

.crowd-name {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.report-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.report-links a,
.report-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.event-action .report-link {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  text-align: center;
}

.crowd-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 460px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

/* ===== Main ===== */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

/* ===== Sections ===== */
.section { margin-bottom: 3rem; }

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== Info cards ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-sm);
}

.info-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--accent);
  text-decoration: none;
}

.info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.info-icon--blue   { background: #e8f0fe; color: #3d7eff; }
.info-icon--green  { background: #e6f9f1; color: #10b877; }
.info-icon--purple { background: #f0ebff; color: #7c3aed; }
.info-icon--red    { background: #fff0f0; color: #ef4444; }

.info-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.info-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.info-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Social buttons ===== */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: filter 0.2s, transform 0.15s;
  color: #fff;
  text-decoration: none;
}

.social-btn:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }
.social-btn--fb { background: #1877f2; }
.social-btn--ig { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }

/* ===== Location card ===== */
.location-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.address-text {
  font-style: normal;
  font-size: 0.975rem;
  line-height: 1.9;
  color: var(--text);
  padding-top: 0.2rem;
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, #0b1a33 0%, #162c55 100%);
  color: #fff;
  padding: 4.5rem 2rem;
  text-align: center;
  margin-top: 1rem;
}

.cta-inner { max-width: 560px; margin: 0 auto; }

.cta-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.cta-sub {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer a { color: var(--text-muted); font-weight: 600; }
.footer a:hover { color: var(--accent); }

/* ===== Public Events ===== */
.events-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.event-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.event-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  flex-grow: 1;
}

.event-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}

.event-datetime,
.event-location {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.event-icon-svg {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.85;
}

.event-action {
  margin-left: 1.5rem;
  flex-shrink: 0;
}

.btn-register {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

/* Badge for invite only events */
.badge-invite-only {
  display: inline-block;
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.badge-invite-only:hover {
  background: #e2e8f0;
  color: var(--text);
  border-color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero { padding: 3.5rem 1.5rem 4rem; }
  .crowd-description { font-size: 1rem; }
  .main { padding: 2rem 1rem 1rem; }
  .info-grid { grid-template-columns: 1fr; }
  .nav-inner { padding: 0 1rem; }
  
  .event-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }
  .event-action {
    margin-left: 0;
    text-align: left;
  }
  .event-action .btn,
  .event-action .badge-invite-only {
    width: 100%;
    display: block;
    text-align: center;
  }
}
