/* Echo – Festival coordination. Clean, calm, mobile-first. */

:root {
  --bg: #0f172a;
  --bg-elevated: #1e293b;
  --bg-card: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --success: #34d399;
  --danger: #f87171;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --tap: 44px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}

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

/* Layout */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.logo:hover {
  text-decoration: none;
  color: var(--text);
  opacity: 0.9;
}
.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
}
.nav a {
  color: var(--text-muted);
}
.nav a:hover {
  color: var(--accent);
}

main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: 2rem;
}

/* Auth */
.auth {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 22rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.auth-logo {
  margin: 0 0 0.5rem;
  text-align: center;
}
.auth-logo img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.tagline {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-card form label {
  display: block;
  margin-bottom: 1rem;
}

.auth-card form label span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  background: var(--bg);
  border: 1px solid var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-card .error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.auth-card button {
  width: 100%;
  padding: 0.75rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: var(--tap);
}
.auth-card button:hover {
  background: var(--accent-dim);
}

.auth-footer {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: var(--tap);
  text-decoration: none;
}
.btn:hover {
  background: var(--accent-dim);
  text-decoration: none;
  color: var(--bg);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
}
.btn-secondary:hover {
  background: #334155;
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.card h2, .card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

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

/* Page titles */
.page-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 1rem;
}

/* List */
.list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.list-item:last-child {
  border-bottom: none;
}

/* Heart / attending */
.heart-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.7;
  min-width: var(--tap);
  min-height: var(--tap);
}
.heart-btn:hover {
  opacity: 1;
}
.heart-btn.hearted {
  opacity: 1;
}

/* Stage / set chips */
.chip {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  background: var(--bg-elevated);
  border-radius: 999px;
  color: var(--text-muted);
}

/* Favourite star (invisible to others) */
.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1rem;
  opacity: 0.5;
  min-width: var(--tap);
  min-height: var(--tap);
}
.fav-btn:hover,
.fav-btn.fav {
  opacity: 1;
}

/* Presence */
.presence-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--success);
  color: var(--bg);
}

/* Mobile nav: reduce links to icons on small screens */
@media (max-width: 640px) {
  .nav {
    font-size: 0.85rem;
  }
  .nav a[href="/profile.php"] { display: none; }
  .nav a[href="/logout.php"] { display: none; }
}

/* Utility */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
