/* ============================================
   TellWang Events — Design System
   Font: Outfit (display) + JetBrains Mono (code)
   Accent: Zinc-900 / Zinc-50
   Theme: Light
   ============================================ */

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

:root {
  --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --zinc-950: #09090b;

  --accent: var(--zinc-900);
  --accent-bg: var(--zinc-900);
  --accent-text: var(--zinc-50);
  --bg: var(--zinc-50);
  --surface: #ffffff;
  --border: var(--zinc-200);
  --text: var(--zinc-900);
  --text-muted: var(--zinc-500);
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Reset all link styling */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ---- Nav ---- */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.92);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all .2s;
}

.nav-links a:hover {
  background: var(--zinc-100);
  color: var(--text);
  opacity: 1;
}

.pill-link {
  background: var(--accent-bg);
  color: var(--accent-text) !important;
  font-weight: 600;
}

.pill-link:hover {
  opacity: 0.9 !important;
  background: var(--zinc-800) !important;
}

/* ---- Hero ---- */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero-content {
  max-width: 560px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--zinc-100);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4FA86A;
  display: inline-block;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-cta {
  display: flex;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-sans);
  line-height: 1.2;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-bg);
  color: var(--accent-text);
}

.btn-primary:hover {
  opacity: .9;
}

/* ---- Events section ---- */
.events-section {
  padding: 20px 0 60px;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.region-group {
  margin-bottom: 32px;
}

.region-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.region-flag {
  font-size: 1.3rem;
  line-height: 1;
}

.region-name {
  font-weight: 600;
  font-size: 1.05rem;
}

.region-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
}

/* ---- Event card ---- */
.event-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: all .2s;
  color: var(--text);
}

.event-card:hover {
  border-color: var(--zinc-300);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  opacity: 1;
}

.event-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 8px 12px;
  background: var(--zinc-100);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.event-date-box .month {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  line-height: 1;
}

.event-date-box .day {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

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

.event-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.event-meta .icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.event-arrow {
  color: var(--zinc-300);
  flex-shrink: 0;
  transition: transform .2s;
}

.event-card:hover .event-arrow {
  transform: translateX(3px);
  color: var(--text);
}

/* ---- Loading / Empty ---- */
.loading-state, .empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.loader {
  width: 24px;
  height: 24px;
  border: 3px solid var(--zinc-200);
  border-top-color: var(--zinc-600);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}

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

/* ---- Event detail page ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color .2s;
}

.back-link:hover {
  color: var(--text);
  opacity: 1;
}

.event-page-header {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.event-hero-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 10px 14px;
  background: var(--zinc-100);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.hero-month {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 2px;
}

.hero-day {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
}

.event-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.event-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.event-poster {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 100%;
}

.event-poster img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: var(--zinc-100);
}

.event-page-desc {
  margin-bottom: 28px;
  color: var(--text);
  line-height: 1.7;
  font-size: 0.95rem;
}

.event-page-speaker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--zinc-100);
  border-radius: var(--radius);
  margin-bottom: 28px;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.speaker-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.speaker-title {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- RSVP block ---- */
.rsvp-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.rsvp-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.form-group input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}

.form-group input:focus {
  border-color: var(--zinc-600);
}

.rsvp-success {
  text-align: center;
  padding: 20px;
}

.rsvp-success .check {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 8px;
  color: #4FA86A;
}

.rsvp-success h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.rsvp-success p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--zinc-900);
  color: var(--zinc-50);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 999;
  transition: opacity .3s, transform .3s;
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  pointer-events: none;
  white-space: nowrap;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast.error {
  background: #dc2626;
}

/* ---- Footer ---- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color .2s;
}

.footer-links a:hover {
  color: var(--text);
  opacity: 1;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .event-card { flex-wrap: wrap; }
  .event-arrow { display: none; }
  .event-page-header { flex-direction: column; }
}
