/* Claude vs. The Machines — vintage fight-poster / letterpress system */

:root {
  --cream: #f3edde;
  --paper: #f3edde;
  --ink: #141414;
  --red: #c8102e;
  --gold: #b78a2e;
  --line: 3px solid var(--ink);
  --shadow-off: 6px 6px 0 var(--ink);
  --shadow-off-sm: 4px 4px 0 var(--ink);
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Oswald", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(20, 20, 20, 0.045) 1px, transparent 1px),
    radial-gradient(rgba(20, 20, 20, 0.03) 1px, transparent 1px);
  background-size: 5px 5px, 11px 11px;
  background-position: 0 0, 3px 6px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--ink);
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

img {
  max-width: 100%;
}

.section-kicker {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1.2rem;
  position: relative;
  display: inline-block;
}

.section-kicker::after {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  background: var(--red);
  margin-top: 0.35rem;
}

/* ---------- Hero ---------- */

.hero {
  border-bottom: var(--line);
  padding: 4rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(20, 20, 20, 0.035) 0,
    rgba(20, 20, 20, 0.035) 2px,
    transparent 2px,
    transparent 14px
  );
  pointer-events: none;
}

.hero-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.badge-live {
  display: inline-block;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-off-sm);
  margin-bottom: 1.8rem;
}

.badge-404 {
  background: var(--ink);
}

.hero-title {
  font-size: clamp(2.8rem, 10vw, 6.5rem);
  line-height: 0.94;
  transform: rotate(-1deg);
  margin-bottom: 1.3rem;
}

.hero-sub {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  font-weight: 500;
  max-width: 32ch;
  margin: 0 auto 2.2rem;
}

.hero-cta {
  display: inline-block;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-display);
  text-transform: uppercase;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 1rem 2rem;
  border: var(--line);
  box-shadow: var(--shadow-off);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hero-cta:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---------- Ledger ---------- */

.ledger {
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--line);
}

.ledger-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem 2.4rem;
  font-family: var(--font-mono);
}

.ledger-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ledger-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.ledger-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
}

.ledger-scoreboard {
  margin-left: auto;
}

.ledger-link {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

.share-button {
  font-family: var(--font-mono);
  background: transparent;
  color: var(--paper);
  border: 2px solid var(--paper);
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.share-button:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Pitch ---------- */

.pitch {
  border-bottom: var(--line);
}

.pitch-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.pitch-inner p {
  font-size: 1.15rem;
}

.pitch-inner p:last-child {
  font-weight: 600;
  font-style: italic;
}

/* ---------- Flash / error banner ---------- */

.flash-banner {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border: var(--line);
  border-left-width: 8px;
  border-left-color: var(--red);
  background: var(--paper);
  font-weight: 500;
}

/* ---------- Buy panel ---------- */

.buy-panel {
  border-bottom: var(--line);
  background: var(--paper);
}

.buy-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.tier-card {
  background: var(--paper);
  border: var(--line);
  box-shadow: var(--shadow-off);
  padding: 1.6rem 1.4rem 1.8rem;
  position: relative;
  border-bottom-style: dashed;
}

.tier-card::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: -1px;
  height: 0;
  border-bottom: 2px dashed var(--ink);
}

.tier-cornerman {
  border-color: var(--red);
  box-shadow: 6px 6px 0 var(--red);
}

.tier-patron {
  border-color: var(--gold);
  box-shadow: 6px 6px 0 var(--gold);
}

.tier-stub-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px dashed var(--ink);
  padding-bottom: 0.8rem;
  margin-bottom: 0.8rem;
}

.tier-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.tier-price {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
}

.tier-description {
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  min-height: 3.2em;
}

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
  margin-top: 0.9rem;
}

.field-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 0.7rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.field-textarea {
  min-height: 4.4rem;
  resize: vertical;
}

.field-input:focus {
  outline: none;
  border-color: var(--red);
}

.buy-button {
  width: 100%;
  margin-top: 1.4rem;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1rem;
  padding: 0.9rem 1rem;
  border: var(--line);
  box-shadow: var(--shadow-off-sm);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.buy-button:hover:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.buy-button:disabled {
  background: #999;
  border-color: #666;
  color: #ddd;
  cursor: not-allowed;
  box-shadow: none;
}

.field-input:disabled {
  background: #eee;
  color: #999;
}

/* ---------- Backer wall ---------- */

.wall {
  border-bottom: var(--line);
}

.wall-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.wall-tally {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}

.wall-grid-patrons {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wall-card {
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 1.1rem 1.2rem 1.3rem;
  position: relative;
}

.wall-card-house {
  border-style: solid;
  text-align: center;
  font-style: italic;
  grid-column: 1 / -1;
}

.wall-card-cornerman {
  border: 3px solid var(--red);
  border-style: solid dashed dashed dashed;
}

.wall-card-patron {
  border: 3px solid var(--gold);
  border-style: solid dashed dashed dashed;
  box-shadow: 4px 4px 0 var(--gold);
}

.wall-card-tier {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  opacity: 0.75;
}

.wall-card-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.wall-card-message {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.wall-card-taunt {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 0.15rem 0.5rem;
}

.thanks-card {
  max-width: 360px;
  margin: 1.5rem 0 2rem;
}

/* ---------- Dispatches ---------- */

.dispatches {
  border-bottom: var(--line);
  background: var(--ink);
  color: var(--paper);
}

.dispatches-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.dispatches .section-kicker::after {
  background: var(--gold);
}

.dispatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.dispatch-card {
  display: block;
  border: 2px solid var(--paper);
  padding: 1.3rem;
  color: var(--paper);
  text-decoration: none;
}

.dispatch-number {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 0.85rem;
}

.dispatch-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0.6rem 0;
  text-transform: uppercase;
}

.dispatch-teaser {
  font-size: 0.92rem;
  opacity: 0.85;
}

.dispatch-read {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--red);
}

/* ---------- Newsletter ---------- */

.newsletter-bar {
  border-bottom: var(--line);
}

.newsletter-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
  align-items: center;
  justify-content: space-between;
}

.newsletter-copy {
  max-width: 480px;
}

.newsletter-copy p {
  margin-bottom: 0;
}

.newsletter-form {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.newsletter-form .field-input {
  min-width: 220px;
}

.newsletter-form .buy-button {
  width: auto;
  margin-top: 0;
}

.newsletter-success {
  font-family: var(--font-mono);
  color: var(--red);
  font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.4rem 1.5rem;
  font-size: 0.85rem;
}

.footer-patrons {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer-label {
  color: var(--gold);
}

.footer-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--paper);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-dot {
  opacity: 0.5;
}

.footer-note {
  opacity: 0.7;
  margin: 0;
}

/* ---------- Legal / dispatch / thanks / admin pages ---------- */

.legal-page {
  border-bottom: var(--line);
}

.legal-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.legal-title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 1rem 0 1.6rem;
}

.legal-subhead {
  font-size: 1.2rem;
  margin: 2rem 0 0.8rem;
}

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.back-link:hover {
  text-decoration: underline;
}

.contact-mail {
  font-family: var(--font-mono);
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 560px) {
  .network-grid {
    grid-template-columns: 1fr;
  }
}

.network-card {
  display: block;
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 1.1rem 1.2rem 1.3rem;
  text-decoration: none;
  color: inherit;
}

.network-card-current {
  border: 3px solid var(--gold);
  border-style: solid dashed dashed dashed;
  box-shadow: 4px 4px 0 var(--gold);
}

.network-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 0.4rem;
}

.network-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.network-desc {
  margin: 0;
  font-size: 0.95rem;
}

.dispatch-number-lg {
  display: block;
  font-family: var(--font-mono);
  color: var(--red);
  margin: 1rem 0 0.5rem;
}

.dispatch-body p {
  font-size: 1.1rem;
}

.dispatch-signoff {
  font-style: italic;
  margin-top: 2rem;
}

/* ---------- Admin ---------- */

.admin-inner {
  max-width: 980px;
}

.status-grid {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  flex-wrap: wrap;
  border-bottom: 1px dashed var(--ink);
  padding-bottom: 0.6rem;
}

.status-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  flex-shrink: 0;
}

.status-green {
  background: #2e7d32;
}

.status-yellow {
  background: var(--gold);
}

.status-red {
  background: var(--red);
}

.status-label {
  font-weight: 600;
  min-width: 120px;
}

.admin-inline-form {
  margin-bottom: 2rem;
}

.admin-inline-form .buy-button {
  width: auto;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--ink);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

.admin-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.admin-actions form {
  margin: 0;
}

.admin-actions button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.admin-delete {
  color: var(--red);
  border-color: var(--red) !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .ledger-scoreboard {
    margin-left: 0;
  }
  .share-button {
    width: 100%;
  }
  .newsletter-form {
    width: 100%;
  }
  .newsletter-form .field-input {
    flex: 1;
    min-width: 0;
  }
}
