:root {
  --ink: #f2eee8;
  --muted: #c9b9a6;
  --blood: #a31414;
  --gold: #c98a2a;
  --gold-hot: #f0b24f;
  --rust: #5a2318;
  --steel: #1a1f27;
  --steel-hi: #5c6472;
  --bg-a: #070a0d;
  --bg-b: #0f0b08;
}

* { box-sizing: border-box; }
body {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-family: 'Special Elite', monospace;
  background:
    linear-gradient(175deg, rgba(255, 255, 255, 0.03) 0%, transparent 24%),
    radial-gradient(circle at 10% 15%, rgba(201, 138, 42, 0.15), transparent 36%),
    radial-gradient(circle at 88% 80%, rgba(163, 20, 20, 0.2), transparent 44%),
    linear-gradient(135deg, var(--bg-a), var(--bg-b));
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    repeating-linear-gradient(
      -35deg,
      rgba(255, 255, 255, 0.014) 0px,
      rgba(255, 255, 255, 0.014) 2px,
      transparent 2px,
      transparent 11px
    );
  mix-blend-mode: soft-light;
}

body::after {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px);
  background-size: 4px 4px, 5px 5px;
  opacity: 0.22;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid #2f2519;
  background:
    linear-gradient(180deg, rgba(120, 123, 132, 0.16), rgba(23, 25, 31, 0.14) 36%, rgba(7, 7, 7, 0.9));
  backdrop-filter: blur(5px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #6c5030;
  background: #0b0b0b;
  padding: 3px;
  box-shadow: 0 0 0 2px rgba(36, 27, 17, 0.9);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1.2px;
  font-size: 1.4rem;
  text-shadow: 0 1px 0 #000;
}

.brand-subtitle {
  color: var(--gold-hot);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.support-site-badge {
  border-bottom: 1px solid #302519;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 7px
    ),
    linear-gradient(90deg, rgba(28, 19, 14, 0.95), rgba(40, 19, 19, 0.92));
}

.support-site-badge p {
  margin: 0 auto;
  max-width: 1100px;
  padding: 0.55rem 1rem;
  color: #e7d6c2;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
}

.support-site-badge a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px dotted #7d5a2a;
}

.nav-toggle {
  display: none;
  border: 1px solid #5f4526;
  background: linear-gradient(180deg, rgba(92, 100, 114, 0.28), rgba(16, 17, 20, 0.66));
  color: var(--muted);
  padding: 0.45rem 0.6rem;
}

.nav-links {
  display: flex;
  gap: 0.8rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border: 1px solid #3f3224;
  font-size: 0.9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(8, 8, 8, 0.35));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-color: #8c6637;
  background: linear-gradient(180deg, rgba(240, 178, 79, 0.15), rgba(77, 37, 19, 0.2));
}

main { padding: 1rem; }
.page-wrap { max-width: 1100px; margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 0;
}

.hero-text,
.hero-panel,
.card,
.banner,
.quick-card {
  border: 1px solid #2d2720;
  background:
    repeating-linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 2px,
      transparent 2px,
      transparent 9px
    ),
    linear-gradient(160deg, rgba(9, 9, 9, 0.92), rgba(19, 15, 13, 0.9));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  position: relative;
}

.hero-text::before,
.hero-panel::before,
.card::before,
.banner::before,
.quick-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(201, 138, 42, 0.16);
  pointer-events: none;
}

.hero-text { padding: 1.3rem; animation: rise 0.55s ease both; }
.hero-panel { padding: 1.1rem; animation: rise 0.7s ease both; }

/* Subtle staged reveal for homepage hero content. */
.hero-text > * {
  opacity: 0;
  transform: translateY(8px);
  animation: rollIn 0.55s ease forwards;
}

.hero-text > *:nth-child(1) { animation-delay: 0.06s; }
.hero-text > *:nth-child(2) { animation-delay: 0.14s; }
.hero-text > *:nth-child(3) { animation-delay: 0.22s; }
.hero-text > *:nth-child(4) { animation-delay: 0.30s; }
.hero-text > *:nth-child(5) { animation-delay: 0.38s; }

.hero-panel {
  background:
    linear-gradient(180deg, rgba(92, 100, 114, 0.12), transparent 28%),
    repeating-linear-gradient(
      90deg,
      rgba(201, 138, 42, 0.08) 0px,
      rgba(201, 138, 42, 0.08) 12px,
      transparent 12px,
      transparent 24px
    ),
    linear-gradient(160deg, rgba(9, 9, 9, 0.9), rgba(19, 15, 13, 0.9));
}

.hero-logo {
  width: 92px;
  height: 92px;
  display: block;
  border-radius: 16px;
  border: 1px solid #7a5933;
  background: rgba(8, 8, 8, 0.9);
  padding: 6px;
  margin-bottom: 0.7rem;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.eyebrow {
  display: inline-block;
  color: var(--gold-hot);
  letter-spacing: 1.7px;
  text-transform: uppercase;
  font-size: 0.7rem;
  border: 1px solid #5f4526;
  background: linear-gradient(180deg, rgba(80, 30, 21, 0.55), rgba(18, 15, 12, 0.85));
  padding: 0.22rem 0.45rem;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  margin: 0.4rem 0 0.7rem;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.75);
}

h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.lead { color: #dfd2c5; max-width: 62ch; }

.cta-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1rem; }
.btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-decoration: none;
  border: 1px solid #7c2017;
  background: linear-gradient(180deg, #ba2c1f, #7f1a13);
  color: #fff;
  padding: 0.62rem 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hero .btn::after {
  content: "";
  position: absolute;
  top: -140%;
  left: -42%;
  width: 28%;
  height: 380%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.62),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(22deg) translateX(-260%);
  opacity: 0;
  pointer-events: none;
}

.hero .btn:hover::after,
.hero .btn:focus-visible::after {
  animation: steelFlash 0.85s ease;
}
.btn.ghost {
  background: linear-gradient(180deg, rgba(92, 100, 114, 0.22), rgba(20, 21, 25, 0.4));
  border-color: #6a5133;
  color: var(--muted);
}

.btn:hover,
.quick-btn:hover {
  filter: brightness(1.08);
}

.big { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: var(--gold); }

.cards {
  max-width: 1100px;
  margin: 1rem auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.card { padding: 1rem; animation: rise 0.7s ease both; }
.card a { color: var(--gold); }
.card p { color: #d8c8b6; }

.card h3 {
  letter-spacing: 0.4px;
}

.product .tag {
  display: inline-block;
  border: 1px solid #7b5b34;
  padding: 0.15rem 0.45rem;
  color: #f2d3a0;
  background: rgba(58, 38, 19, 0.5);
  font-size: 0.7rem;
  margin-bottom: 0.4rem;
}
.price { font-family: 'Bebas Neue', sans-serif; font-size: 1.35rem; color: #fff; }

.status {
  border-color: #4d6730;
  background: rgba(38, 73, 29, 0.5);
}

.event-card h3 {
  margin-top: 0.3rem;
}

.impact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.impact-card {
  text-align: center;
}

.impact-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #cbb9a3;
  font-size: 0.76rem;
}

.impact-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.1rem;
  margin: 0.2rem 0;
  color: #f0b24f;
}

.impact-note {
  color: #a89177;
  font-size: 0.84rem;
}

.partner-card .partner-city {
  color: #f0b24f;
  letter-spacing: 0.7px;
}

.trust-grid .card {
  border-color: #413122;
}

.page-head { margin: 0.5rem auto 0.8rem; max-width: 1100px; }

.support-logo {
  width: 86px;
  height: auto;
  display: block;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.support-link-row {
  margin-top: 0.5rem;
  color: #d8c8b6;
}

.support-link-row a {
  color: var(--gold);
}

.banner {
  max-width: 1100px;
  margin: 1rem auto;
  padding: 1rem;
  border-left: 4px solid var(--gold-hot);
}

.site-footer {
  margin-top: 1.5rem;
  border-top: 1px solid #292118;
  padding: 1rem;
  text-align: center;
  color: #b8a58f;
  background: linear-gradient(180deg, rgba(13, 11, 10, 0.2), rgba(5, 5, 5, 0.45));
}
.muted { color: #8f7f6c; font-size: 0.85rem; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.5rem 0 0;
}

.legal-links a {
  color: #d7bf98;
  text-decoration: none;
  border-bottom: 1px dotted #7d5a2a;
  font-size: 0.85rem;
}

.quick-card { max-width: 900px; margin: 0 auto; padding: 1rem; }
.quick-form { display: grid; gap: 0.7rem; }
.quick-input, .quick-form textarea, .quick-form select {
  width: 100%;
  border: 1px solid #4c3d2c;
  background: linear-gradient(180deg, #131211, #0a0a0a);
  color: var(--ink);
  padding: 0.65rem 0.72rem;
  font-family: 'Special Elite', monospace;
}
.quick-btn {
  border: 1px solid #7c2017;
  background: linear-gradient(180deg, #ba2c1f, #7f1a13);
  color: #fff;
  padding: 0.65rem;
  cursor: pointer;
  text-transform: uppercase;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
}
.quick-note { color: #a08f7b; font-size: 0.85rem; }

.quick-card h2 {
  margin-top: 0;
}

.admin-wrap {
  display: grid;
  gap: 1rem;
}

.admin-editor {
  max-width: 1100px;
}

.admin-group {
  border: 1px solid #3b2e20;
  padding: 0.8rem;
  background: linear-gradient(180deg, rgba(22, 18, 15, 0.9), rgba(11, 10, 10, 0.88));
}

.admin-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.admin-group-head h3 {
  margin: 0;
}

.admin-items {
  display: grid;
  gap: 0.75rem;
}

.admin-item {
  border: 1px dashed #705233;
  padding: 0.75rem;
  background: rgba(12, 11, 10, 0.7);
}

.admin-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.admin-item-index {
  color: #f0b24f;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.admin-item-handle {
  border: 1px dashed #7d5b34;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #e4c18b;
  cursor: grab;
}

.admin-item-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.admin-remove-btn,
.admin-add-btn {
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
}

.admin-duplicate-btn,
.admin-move-btn {
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
}

.admin-move-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-item.dragging {
  opacity: 0.6;
  border-color: #c98a2a;
}

.admin-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.admin-item-grid .quick-input {
  font-size: 0.85rem;
}

.admin-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.35rem;
  border: 1px solid #4c3d2c;
  background: linear-gradient(180deg, #131211, #0a0a0a);
  min-height: 42px;
}

.admin-checkbox {
  width: 18px;
  height: 18px;
}

.admin-checkbox-label {
  color: #e7d6c2;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-textarea {
  min-height: 240px;
  resize: vertical;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.35;
}

.admin-json-fallback {
  border: 1px solid #483421;
  padding: 0.7rem;
  background: rgba(8, 8, 8, 0.5);
}

.admin-json-fallback summary {
  cursor: pointer;
  color: #eac389;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.form-status {
  border: 1px solid #3b3023;
  padding: 0.75rem;
  margin-bottom: 0.85rem;
}

.form-status.ok {
  border-color: #2f5d2f;
  background: rgba(61, 122, 61, 0.2);
  color: #dbf2d7;
}

.form-status.bad {
  border-color: #7a1d1d;
  background: rgba(122, 29, 29, 0.2);
  color: #ffd6d6;
}

.form-status.bad p,
.form-status.ok p {
  margin: 0;
}

.form-status.bad ul {
  margin: 0;
  padding-left: 1.2rem;
}

.captcha-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rollIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes steelFlash {
  0% {
    opacity: 0;
    transform: rotate(22deg) translateX(-260%);
  }
  20% { opacity: 0.5; }
  55% { opacity: 0.85; }
  100% {
    opacity: 0;
    transform: rotate(22deg) translateX(470%);
  }
}

/* Cascade card reveal to add low-key convoy rhythm on load. */
.cards .card {
  opacity: 0;
  transform: translateY(8px);
  animation: rollIn 0.55s ease forwards;
}

.cards .card:nth-child(1) { animation-delay: 0.08s; }
.cards .card:nth-child(2) { animation-delay: 0.16s; }
.cards .card:nth-child(3) { animation-delay: 0.24s; }
.cards .card:nth-child(4) { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .hero-text > *,
  .cards .card,
  .hero-panel,
  .hero-text {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero .btn::after {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .hero-logo { width: 76px; height: 76px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-title { font-size: 1.2rem; }
  .brand-subtitle { font-size: 0.6rem; }
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    right: 1rem;
    top: 3.2rem;
    flex-direction: column;
    background: linear-gradient(180deg, #0f0f0f, #080808);
    border: 1px solid #4b3a28;
    padding: 0.5rem;
  }
  .nav-links.open { display: flex; }
  .btn,
  .quick-btn,
  .quick-input,
  .nav-links a {
    min-height: 44px;
  }
  .legal-links {
    flex-direction: column;
    gap: 0.35rem;
  }
  .admin-item-grid {
    grid-template-columns: 1fr;
  }
  .admin-group-head,
  .admin-item-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-item-controls {
    justify-content: flex-start;
  }
}
