/* ================================================================
   Shout — Twin Cities Music Calendar
   ================================================================ */

:root {
  --red: #e63946;
  --dark: #0d0d0d;
  --dark2: #1a1a1a;
  --dark3: #262626;
  --mid: #404040;
  --muted: #888;
  --light: #f4f4f4;
  --white: #fff;
  --border: #2e2e2e;
  --font: 'Inter', system-ui, sans-serif;
  --radius: 8px;
  --transition: 150ms ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

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

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

img { max-width: 100%; display: block; }

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header ---- */
.site-header {
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--red);
  text-decoration: none;
}

.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { color: var(--light); font-weight: 500; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; }
.main-nav a:hover { color: var(--red); }

/* ---- Footer ---- */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
  justify-content: center;
  margin-top: .6rem;
}
.footer-links a { color: var(--muted); font-size: .8rem; text-decoration: none; }
.footer-links a:hover { color: var(--light); text-decoration: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: .5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #c62b37; text-decoration: none; }
.btn-outline { background: transparent; color: var(--light); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--light); text-decoration: none; }
.btn-disabled { background: var(--mid); color: var(--muted); cursor: not-allowed; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .5rem;
  border-radius: 4px;
}
.badge-featured { background: var(--red); color: #fff; }
.badge-sold_out { background: var(--mid); color: var(--muted); }
.badge-cancelled { background: #7f1d1d; color: #fca5a5; }
.badge-postponed { background: #78350f; color: #fcd34d; }
.badge-lg { font-size: .8rem; padding: .3rem .75rem; }

/* ---- Featured Event ---- */
.featured-event {
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.featured-inner {
  display: flex;
  min-height: 280px;
}
.featured-image {
  flex: 0 0 420px;
  background-size: cover;
  background-position: center;
}
.featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  justify-content: center;
  background: var(--dark2);
}
.featured-title { font-size: 1.75rem; font-weight: 900; line-height: 1.2; }
.featured-title a { color: var(--white); }
.featured-title a:hover { color: var(--red); text-decoration: none; }
.featured-meta { color: var(--muted); font-size: .9rem; }

/* ---- Events Section ---- */
.events-section { padding: 1.5rem 0 3rem; }

.events-header {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.events-header h1 { font-size: 1.75rem; font-weight: 900; }

/* ---- Filter Form ---- */
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-left: auto;
}
.filter-input,
.filter-select {
  background: var(--dark3);
  border: 1px solid var(--border);
  color: var(--light);
  border-radius: var(--radius);
  padding: .45rem .75rem;
  font-size: .875rem;
  font-family: inherit;
}
.filter-input:focus, .filter-select:focus { outline: none; border-color: var(--red); }
.filter-input[type="search"] { min-width: 200px; }
.filter-input[type="date"] { min-width: 140px; }

/* ---- Day Group ---- */
.day-group { margin-bottom: 2.5rem; }
.day-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--red);
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}

/* ---- Event Grid ---- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ---- Event Card ---- */
.event-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition);
}
.event-card:hover { border-color: var(--red); transform: translateY(-2px); }
.event-card.is-sold-out { opacity: .6; }

.event-card-image {
  display: block;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--dark3);
}
.event-card-image--placeholder {
  background-image: repeating-linear-gradient(
    45deg,
    var(--dark3) 0px,
    var(--dark3) 10px,
    var(--border) 10px,
    var(--border) 20px
  );
}

.event-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.event-card-title { font-size: .95rem; font-weight: 700; line-height: 1.3; }
.event-card-title a { color: var(--white); }
.event-card-title a:hover { color: var(--red); text-decoration: none; }
.event-card-venue { font-size: .8rem; color: var(--muted); }
.event-card-venue a { color: var(--muted); }
.event-card-venue a:hover { color: var(--light); }
.event-card-meta { font-size: .78rem; color: var(--muted); margin-top: auto; }

.event-card-tickets {
  display: block;
  text-align: center;
  padding: .5rem;
  background: var(--dark3);
  color: var(--red);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-top: 1px solid var(--border);
  text-decoration: none;
}
.event-card-tickets:hover { background: var(--red); color: #fff; text-decoration: none; }

/* ---- Event Detail ---- */
.event-detail { padding: 2rem 0 4rem; }

.event-detail-hero {
  display: flex;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}
.event-hero-image {
  flex: 0 0 480px;
  min-height: 360px;
  background-size: cover;
  background-position: center;
}
.event-hero-body {
  flex: 1;
  padding: 2.5rem;
  background: var(--dark2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.event-hero-venue { color: var(--red); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.event-hero-venue a { color: inherit; text-decoration: none; }
.event-hero-title { font-size: 2rem; font-weight: 900; line-height: 1.15; }

.event-meta-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.event-meta-list li { font-size: .9rem; color: var(--light); }
.event-meta-list strong { color: var(--muted); font-weight: 600; margin-right: .5rem; width: 50px; display: inline-block; }

.event-description { margin-bottom: 3rem; }
.event-description h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.prose { color: var(--light); line-height: 1.8; max-width: 720px; }

.related-events h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }

/* ---- Venue Grid ---- */
.page-title { font-size: 1.75rem; font-weight: 900; margin: 2rem 0 1.5rem; }

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.venue-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), transform var(--transition);
}
.venue-card:hover { border-color: var(--red); transform: translateY(-2px); text-decoration: none; }

.venue-card-image {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--dark3);
}
.venue-card-image--placeholder {
  background-image: repeating-linear-gradient(
    -45deg,
    var(--dark3) 0px,
    var(--dark3) 10px,
    var(--border) 10px,
    var(--border) 20px
  );
}
.venue-card-body { padding: 1rem; }
.venue-card-name { font-weight: 700; margin-bottom: .2rem; }
.venue-card-location { font-size: .8rem; color: var(--muted); }
.venue-card-genre { font-size: .78rem; color: var(--red); margin-top: .25rem; }

/* ---- Venue Detail ---- */
.venue-detail { padding: 2rem 0 4rem; }
.venue-detail-header {
  display: flex;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}
.venue-hero-image {
  flex: 0 0 400px;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  background-color: var(--dark3);
}
.venue-hero-body { flex: 1; padding: 2.5rem; background: var(--dark2); }
.venue-hero-body h1 { font-size: 2rem; font-weight: 900; margin-bottom: .75rem; }
.venue-meta { color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }
.venue-genre { color: var(--red); font-size: .85rem; margin-bottom: .5rem; }
.venue-capacity { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }

.venue-events-section { margin-bottom: 3rem; }
.venue-events-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; }

.past-events-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.past-events-list li { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.past-date { color: var(--muted); font-size: .8rem; }

/* ---- View toggle ---- */
.view-controls {
  display: flex;
  gap: .2rem;
  align-items: center;
}
.view-toggle-btn {
  background: var(--dark3);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius);
  padding: .4rem .55rem;
  cursor: pointer;
  line-height: 0;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.view-toggle-btn:hover { color: var(--light); border-color: var(--mid); }
.view-toggle-btn.is-active { color: var(--red); border-color: var(--red); background: var(--dark2); }

/* ---- List view ---- */
.events-section[data-view="list"] .event-grid {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.events-section[data-view="list"] .event-card {
  flex-direction: row;
  align-items: stretch;
}
.events-section[data-view="list"] .event-card-image {
  flex: 0 0 72px;
  height: auto;
  min-height: 64px;
  border-radius: 0;
  order: 2;
}
.events-section[data-view="list"] .event-card-body {
  order: 1;
  flex: 1;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  padding: .6rem 1rem;
  gap: .5rem 1.25rem;
}
.events-section[data-view="list"] .event-card-title {
  font-size: .9rem;
  flex: 1 1 180px;
}
.events-section[data-view="list"] .event-card-venue {
  flex: 0 0 auto;
  order: -1;
}
.events-section[data-view="list"] .event-card-meta {
  flex: 0 0 auto;
  margin-top: 0;
  margin-left: auto;
}
.events-section[data-view="list"] .event-card-tickets {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: .5rem 1rem;
  border-top: none;
  border-left: 1px solid var(--border);
  white-space: nowrap;
  order: 3;
}

/* ---- Content pages (privacy, terms, accessibility, sitemap) ---- */
.content-page {
  padding: 2rem 0 4rem;
  max-width: 720px;
}
.content-meta {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 2rem;
}
.content-page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--light);
  margin: 2rem 0 .5rem;
}
.content-page p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: .75rem;
}
.content-page ul {
  color: var(--muted);
  line-height: 1.8;
  padding-left: 1.5rem;
  margin-bottom: .75rem;
}
.content-page a { color: var(--red); }

.sitemap-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 0;
}
.sitemap-list li::before {
  content: '→';
  color: var(--red);
  margin-right: .5rem;
  font-size: .85rem;
}
.sitemap-list a { color: var(--light); text-decoration: none; }
.sitemap-list a:hover { color: var(--red); text-decoration: none; }

.sitemap-venues {
  columns: 2;
  column-gap: 2rem;
}

/* ---- Contact ---- */
.contact-section { padding: 2rem 0 4rem; }

.contact-form-wrap { max-width: 600px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

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

.form-group label { font-size: .875rem; font-weight: 600; color: var(--light); }
.form-group .required { color: var(--red); }

.form-group input,
.form-group textarea {
  background: var(--dark3);
  border: 1px solid var(--border);
  color: var(--light);
  border-radius: var(--radius);
  padding: .6rem .85rem;
  font-size: .9rem;
  font-family: inherit;
  transition: border-color var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group.has-error input,
.form-group.has-error textarea { border-color: var(--red); }

.field-error { font-size: .8rem; color: var(--red); }

.contact-success {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-left: 3px solid #22c55e;
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  color: var(--light);
  max-width: 600px;
}

.contact-error {
  background: #450a0a;
  border: 1px solid #7f1d1d;
  border-radius: var(--radius);
  padding: .85rem 1rem;
  color: #fca5a5;
  font-size: .875rem;
  margin-bottom: 1.25rem;
  max-width: 600px;
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .featured-inner { flex-direction: column; }
  .featured-image { flex: none; height: 200px; }
  .event-detail-hero { flex-direction: column; }
  .event-hero-image { flex: none; height: 220px; }
  .venue-detail-header { flex-direction: column; }
  .venue-hero-image { flex: none; height: 180px; }
  .events-header { flex-direction: column; }
  .filter-form { width: 100%; }
  .filter-input[type="search"] { min-width: 100%; }
  .events-section[data-view="list"] .event-card-image { display: none; }
  .events-section[data-view="list"] .event-card-meta { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
