/* Fringe Fringe: scaffold stylesheet
   Black + white. Courier. Dotted-box placeholders for all imagery.
   Keep this file the single source of truth for design tokens. */

:root {
  --ink: #000;
  --paper: #ffffff;
  --muted: #555;
  --rule: 3px dashed var(--ink);
  --rule-thin: 2px dashed var(--ink);
  --space: 1rem;
  --space-lg: 2rem;
  --max: 880px;
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

/* Layout shell */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Top nav */
.nav {
  border-bottom: var(--rule);
  padding: 1rem 0;
  margin-bottom: 2.5rem;
}
.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 1rem;
  text-decoration: none;
}
.brand:hover { background: transparent; color: var(--ink); }
.nav-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.nav-links a {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}
.nav-links a.current { border-bottom: 2px solid var(--ink); padding-bottom: 2px; }

/* Footer */
.foot {
  border-top: var(--rule);
  margin-top: 4rem;
  padding: 1.25rem 0 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.05em;
}
.foot a { color: var(--muted); }

/* Typography */
h1, h2, h3, h4 {
  font-family: inherit;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
h1 { font-size: 2.25rem; line-height: 1.15; margin-bottom: 1rem; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; letter-spacing: 0.12em; }
p { margin-bottom: 1rem; max-width: 65ch; }
.lede { font-size: 1.1rem; max-width: 60ch; }

ul, ol { padding-left: 1.25rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; }

/* Dotted-box image / logo placeholder, used everywhere */
.box {
  border: var(--rule);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: transparent;
  font-size: 0.85rem;
  min-height: 80px;
}
.box.hero { min-height: 240px; font-size: 1rem; margin: 1.5rem 0; }
.box.logo { min-height: 110px; }
.box.thumb { width: 100%; aspect-ratio: 1; min-height: 0; font-size: 0.75rem; }
.image-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: var(--rule);
}

/* Hero block */
.hero-block {
  padding: 0 0 2rem;
  border-bottom: var(--rule);
  margin-bottom: 2rem;
}

/* Commitments grid */
.commitments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.commitment {
  border: var(--rule-thin);
  padding: 1rem;
}
.commitment h3 { margin-top: 0; }
.commitment p { margin-bottom: 0; font-size: 0.9rem; }

/* Live counts strip */
.counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--rule);
  margin: 2rem 0;
}
.count {
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: var(--rule-thin);
}
.count:last-child { border-right: none; }
.count .n {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 0.05em;
}
.count .l {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.25rem;
  color: var(--muted);
}
@media (max-width: 600px) {
  .counts {
    grid-template-columns: 1fr;
    border: none;
  }
  .count {
    border: var(--rule);
    border-bottom: none;
  }
  .count:last-child { border-bottom: var(--rule); }
}

/* Buttons / CTAs */
.btn {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

/* Forms */
form { margin: 1.5rem 0; }
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  border: var(--rule-thin);
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  color: var(--ink);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Interest prompt */
.interest-block {
  border: var(--rule);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

/* FAQ accordion (native details) */
.faq {
  border-bottom: var(--rule-thin);
  padding: 1rem 0;
}
.faq summary {
  font-weight: bold;
  letter-spacing: 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; }
.faq[open] summary::before { content: "− "; }
.faq p { margin-top: 0.75rem; font-size: 0.95rem; }

/* Directory */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  border-top: var(--rule-thin);
  border-bottom: var(--rule-thin);
  padding: 0.75rem 0;
}
.filter-bar button {
  border: 2px solid var(--ink);
  background: transparent;
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}
.filter-bar button.active { background: var(--ink); color: var(--paper); }

.cards {
  display: grid;
  /* 190px min lets 4 fit per row at the 880px content max. */
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
}
.card {
  border: var(--rule-thin);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Venue cards: rounded thumbs to differentiate from people cards. */
.card[data-role="venue"] .image-thumb,
.card[data-role="venue"] .box.thumb {
  border-radius: 16px;
}
.card .role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.card .name { font-weight: bold; font-size: 1rem; }
.card .meta { font-size: 0.8rem; color: var(--muted); }
.card .supporters {
  border-top: var(--rule-thin);
  padding-top: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Soft password gate (gate.js): on-brand overlay */
#ff-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: "Courier New", Courier, monospace;
  color: var(--ink);
  overflow: auto;
}
.ff-gate-card {
  width: min(100%, 420px);
  max-width: 420px;
  border: var(--rule);
  padding: 1.5rem;
  background: var(--paper);
}
.ff-gate-brand {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: bold;
  border-bottom: var(--rule-thin);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
.ff-gate-title {
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem;
}
.ff-gate-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  max-width: none;
}
.ff-gate-error {
  margin-top: 0.75rem;
  border-left: 3px solid var(--ink);
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
}

/* Modal: native <dialog> styled on-brand.
   Use:
     <dialog id="my-modal" class="modal">...</dialog>
     document.getElementById('my-modal').showModal();
*/
dialog.modal {
  border: var(--rule);
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 2rem);
  font-family: inherit;
  /* Restore native dialog centering — the global `* { margin: 0 }` reset
     wipes the user-agent `margin: auto` that centers open modals. */
  margin: auto;
}
dialog.modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: var(--rule-thin);
}
.modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
}
.modal-close {
  border: var(--rule-thin);
  background: transparent;
  font-family: inherit;
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
}
.modal-close:hover { background: var(--ink); color: var(--paper); }
.modal-body { padding: 1.25rem; }
.modal-body p { margin-bottom: 1rem; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-top: var(--rule-thin);
}

/* Timeline (one row per week, grouped by month) */
.timeline-list {
  margin-top: 1rem;
}
.timeline-month {
  margin: 1.75rem 0 0.25rem;
  padding-bottom: 0.35rem;
  border-bottom: var(--rule-thin);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
}
.timeline-month:first-child { margin-top: 0; }
.timeline-week {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px dashed var(--ink);
  font-size: 0.9rem;
}
.timeline-week .dates { font-variant-numeric: tabular-nums; }
.timeline-week .event { color: var(--muted); }
.timeline-week.is-now {
  font-weight: bold;
}
.timeline-week.is-now .event { color: var(--ink); }
.timeline-week.is-festival {
  background: var(--ink);
  color: var(--paper);
  border-bottom-color: var(--paper);
}
.timeline-week.is-festival .event { color: var(--paper); }
@media (max-width: 520px) {
  .timeline-week {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* Utility */
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono-note {
  border-left: 3px solid var(--ink);
  padding: 0.5rem 0.85rem;
  background: transparent;
  font-size: 0.85rem;
  margin: 1rem 0;
}
.rule { border: none; border-top: var(--rule); margin: 2.5rem 0; }

@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .nav-links { gap: 0.85rem; }
  .nav-links a { font-size: 0.75rem; }
  #ff-gate { padding: 1rem; }
}
