/* atlftw — clean brutalism.
   All colors, fonts, and the gridline system come from CSS variables set
   in base.html by the admin-editable Site theme:
     --bg --ink --grid --accent --display --body --meta
     --rule (1px solid | none)  --gap (1px | 24px)  --grid-bg
   No shadows, no radii, no decoration that doesn't work for a living. */

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Full-bleed: the grid runs edge to edge and simply gains columns
   on wider windows. */
.frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- notice strip ---------- */

.notice {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--meta);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 6px 12px;
}

.notice-scroll { overflow: hidden; white-space: nowrap; padding-left: 0; padding-right: 0; }
.notice-track {
  display: inline-block;
  animation: notice-marquee 28s linear infinite;
}
.notice-track > span { padding-right: 64px; }
@keyframes notice-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- title bar ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: var(--rule);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 16px;
}

/* The wordmark is just another menu item, NTS-style — same font as the
   tag boxes (the body grotesk), bold for wayfinding. */
.wordmark {
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}
.wordmark-star { color: var(--accent); }

.site-nav { display: flex; gap: 20px; }

.nav-link {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 4px 0;
}
.nav-link:hover { color: var(--accent); }

/* NTS-style search: a magnifier and a flat underline. */
.header-search { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.search-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--ink);
  display: flex;
}
.search-btn:hover { color: var(--accent); }
.header-search input {
  font-family: var(--body);
  font-size: 13px;
  border: none;
  border-bottom: 1px solid var(--grid);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 4px 2px;
  width: 150px;
  transition: width 120ms;
}
.header-search input:focus { outline: none; border-bottom-color: var(--accent); width: 220px; }

/* ---------- buttons & chips ---------- */

.btn {
  font-family: var(--meta);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--grid);
  border-radius: 0;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-block;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-accent { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-accent:hover { background: var(--accent); border-color: var(--accent); }

.chip { display: inline-flex; cursor: pointer; user-select: none; position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  font-family: var(--meta);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--grid);
  padding: 5px 10px;
  background: transparent;
}
.chip:hover span { border-color: var(--accent); color: var(--accent); }
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); }

/* Spiritland-style tag boxes: 1px rule, square corners, tight padding,
   uppercase regular-weight body grotesk. */
.minitag {
  display: inline-block;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid var(--grid);
  border-radius: 0;
  padding: 1px 6px;
  margin: 0 4px 4px 0;
}

/* ---------- toolbar + collapsible filters ---------- */

/* The toolbar sticks under the header and slides back into view
   whenever the visitor scrolls up (JS toggles .filterbar-hidden). */
.filterbar {
  border-bottom: var(--rule);
  position: sticky;
  z-index: 9;
  background: var(--bg);
  transition: transform 180ms ease-out;
}
.filterbar-hidden { transform: translateY(-110%); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
}

.toolbar-right { display: flex; align-items: center; gap: 20px; }

/* Poster size switcher */
.grid-zoom { display: inline-flex; }
.zoom-btn {
  font-family: var(--meta);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--grid);
  padding: 3px 9px;
  cursor: pointer;
}
.zoom-btn + .zoom-btn { border-left: 0; }
.zoom-btn:hover { color: var(--accent); }
.zoom-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.toolbar-count {
  font-family: var(--meta);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toolbar-toggle {
  font-family: var(--meta);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 4px 0;
}
.toolbar-toggle:hover { color: var(--accent); }

.filter-panel[hidden] { display: none; }

.filter-panel {
  border-top: var(--rule);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.filter-label {
  font-family: var(--meta);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.filter-field { display: inline-flex; align-items: center; gap: 8px; }

.filter-input {
  font-family: var(--meta);
  font-size: 12px;
  border: 1px solid var(--grid);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 7px 9px;
  appearance: none;
}
.filter-input:focus { outline: none; border-color: var(--accent); }
.filter-search { flex: 1 1 200px; min-width: 160px; }

.mode-toggle { display: inline-flex; }
.mode-toggle .chip + .chip span { border-left: 0; }

.filter-clear {
  font-family: var(--meta);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}
.filter-clear:hover { opacity: 1; color: var(--accent); }

/* ---------- event grid ---------- */

.event-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--gap);
  background: var(--grid-bg);
}
.event-grid.grid-size-m { grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); }
.event-grid.grid-size-l { grid-template-columns: repeat(auto-fill, minmax(640px, 1fr)); }

.event-card { background: var(--bg); }
/* Filler cells added by JS so the ruled grid pattern continues across
   the row and down to the bottom of the window. No fixed height: they
   stretch to their row (JS sets a min-height so filler-only rows match
   the height of real rows). */
.event-card > a { display: block; text-decoration: none; height: 100%; }

.poster-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-card:hover img { opacity: 0.92; }

.poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.05;
  text-transform: uppercase;
  word-break: break-word;
}

.card-info { padding: 10px 12px 14px; }

.card-meta {
  font-family: var(--meta);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

.card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 5px;
}
.event-card:hover .card-title { color: var(--accent); }

.card-venue {
  font-size: 12.5px;
  margin: 0 0 8px;
}

.card-tags { margin: 0; }

/* ---------- empty state ---------- */

.empty-state { padding: 100px 20px; text-align: center; flex: 1; }
.empty-state p:first-child {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  text-transform: uppercase;
  margin: 0 0 8px;
}

/* ---------- event detail page ---------- */

/* Centered pair of columns; the poster grows with the window (up to
   800px) and the whole spread stays centered on wide screens. */
.event-page {
  display: grid;
  grid-template-columns: minmax(320px, 800px) minmax(340px, 600px);
  justify-content: center;
  flex: 1;
}
.event-poster-col { background: var(--bg); border-right: var(--rule); }
/* Fit the flyer to the window vertically too — the whole poster stays
   visible without scrolling, as large as the space allows. */
.event-poster {
  width: 100%;
  display: block;
  max-height: calc(100vh - 52px);
  object-fit: contain;
  object-position: top;
}
.poster-fallback-lg { aspect-ratio: 4 / 5; font-size: 40px; }

.event-info-col { background: var(--bg); padding: 24px; }

.breadcrumb {
  margin: 0 0 20px;
  font-family: var(--meta);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.event-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.event-facts { margin: 0 0 20px; }
.event-facts > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  border-top: 1px solid var(--grid);
  padding: 9px 0;
}
.event-facts > div:last-child { border-bottom: 1px solid var(--grid); }
.event-facts dt {
  font-family: var(--meta);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 3px;
}
.event-facts dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; }

.event-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }

.event-description { max-width: 62ch; font-size: 14px; }

.vouch {
  margin: 24px 0;
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
  max-width: 58ch;
}
.vouch-label {
  font-family: var(--meta);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 6px;
}
.vouch p { margin: 0 0 6px; }
.vouch cite { font-style: normal; font-family: var(--meta); font-size: 12px; }

.report-line { font-family: var(--meta); font-size: 11.5px; }
.report-line a:hover { color: var(--accent); }

/* ---------- generic page panel & forms ---------- */

.page-panel { padding: 32px 16px 56px; flex: 1; }

.page-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 3.5vw, 40px);
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 10px;
}

.page-intro { max-width: 58ch; margin: 0 0 24px; font-size: 14px; }

/* Centered column variant (suggest page): heading, intro, and form all
   share one centered column. */
.page-center .page-title { max-width: 680px; margin: 0 auto 10px; }
.page-center .page-intro { max-width: 680px; margin: 0 auto 24px; }
.page-center .form-alert { max-width: 680px; margin: 0 auto 20px; }

.form-alert {
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--meta);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  margin: 0 0 20px;
  max-width: 640px;
}

/* The form is built like the main event grid: cells on the grid
   background, separated by the same gap/rule system. */
.suggest-form {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  background: var(--grid-bg);
  border: var(--rule);
}

.suggest-form fieldset {
  border: 0;
  background: var(--bg);
  padding: 16px 16px 6px;
  margin: 0;
  min-width: 0;
}

.form-cell { background: var(--bg); padding: 16px; }

.suggest-form legend {
  float: left;             /* pulls the legend out of the border area */
  width: 100%;
  font-family: var(--meta);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0;
  margin: 0 0 14px;
}
.suggest-form legend + * { clear: both; }

.field { margin: 0 0 16px; }

.field-label {
  display: block;
  font-family: var(--meta);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  white-space: pre-line;  /* multi-line labels (the vouch questions) stack */
}

.field input[type="text"],
.field input[type="password"],
.field input[type="email"],
.field input[type="url"],
.field input[type="date"],
.field input[type="time"],
.field input[type="file"],
.field textarea {
  font-family: var(--body);
  font-size: 14px;
  border: 1px solid var(--grid);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }

.field-help { display: block; font-size: 12px; opacity: 0.8; margin-top: 4px; }
.field-note { font-size: 12px; opacity: 0.8; margin: -6px 0 0; }

.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 140px; }

.field-check {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--meta); font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.field-check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Tooltip marker: a small ? box that explains a term on hover or focus. */
.tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--grid);
  font-family: var(--meta);
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  position: relative;
  margin-left: 2px;
}
.tip:hover, .tip:focus-visible { background: var(--ink); color: var(--bg); outline: none; }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: 260px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--meta);
  font-size: 11.5px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
  padding: 8px 10px;
  z-index: 20;
  display: none;
}
.tip:hover::after, .tip:focus-visible::after { display: block; }

.field-error input, .field-error textarea { border-color: var(--accent); }
.errorlist {
  list-style: none; margin: 6px 0 0; padding: 0;
  color: var(--accent); font-family: var(--meta); font-size: 11.5px; font-weight: 700;
}

.tag-choices { display: flex; gap: 6px; flex-wrap: wrap; }

.btn-big { font-size: 12px; padding: 12px 20px; }

/* Auth pages: same cell construction as the suggest form, narrower. */
.auth-form { max-width: 420px; }
.auth-title, .auth-width { max-width: 420px !important; margin-left: auto !important; margin-right: auto !important; }
.auth-note { font-size: 12.5px; margin-top: 20px; }
.field-help ul { margin: 4px 0 0; padding-left: 18px; }

.nav-user {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.logout-form { display: inline-flex; margin: 0; }
.nav-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  color: var(--ink);
}
.nav-button:hover { color: var(--accent); }

.thanks-panel { text-align: center; padding-top: 80px; }
.thanks-panel .page-intro { margin-left: auto; margin-right: auto; }
.thanks-panel .btn { margin: 0 4px; }

/* ---------- prose pages (privacy etc.) ---------- */

.prose-col { max-width: 680px; margin: 0 auto; }
.prose-col p { font-size: 14px; max-width: 62ch; }

.prose-head {
  font-family: var(--meta);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--grid);
  padding-top: 12px;
  margin: 28px 0 10px;
}

.prose-dated {
  font-family: var(--meta);
  font-size: 11.5px;
  opacity: 0.7;
  margin-top: 32px;
}

/* ---------- feeds directory ---------- */

.feed-grid {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
  background: var(--grid-bg);
  border: var(--rule);
}

.feed-cell {
  background: var(--bg);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.feed-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.feed-desc { font-size: 13px; margin: 0 0 10px; }

.feed-url {
  font-family: var(--meta);
  font-size: 11.5px;
  overflow-wrap: anywhere;
  margin: 0 0 12px;
  opacity: 0.8;
}

.feed-actions { margin: auto 0 0; display: flex; gap: 8px; flex-wrap: wrap; }

.feed-howto { max-width: 680px; }
.feed-howto .feed-title { margin-bottom: 12px; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: var(--rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
  background: var(--grid-bg);
}

.footer-cell {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 20px 16px 28px;
  font-family: var(--meta);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.footer-cell a { text-decoration: none; }
.footer-cell a:hover { color: var(--accent); }
/* Links inside a line of text (like the credit) keep an underline so
   they read as links. */
.footer-cell span a { text-decoration: underline; text-underline-offset: 2px; }
.footer-head {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .event-page { grid-template-columns: 1fr; }
  .event-poster-col { border-right: none; border-bottom: var(--rule); }
  .site-header { flex-wrap: wrap; gap: 10px 16px; }
  .header-search { margin-left: 0; width: 100%; }
  .header-search input { width: 100%; }
  .header-search input:focus { width: 100%; }
}
