/* Black Holocron — design system
   Beskar/Mandalorian palette: charcoal void, brushed steel, molten copper, cold cyan HUD accent. */

:root {
  --void-950: #07080a;
  --void-900: #0b0d10;
  --void-850: #101317;
  --steel-800: #171b21;
  --steel-700: #20252d;
  --steel-600: #2b323d;
  --steel-500: #3a4350;
  --steel-line: #2a303a;

  --bone-100: #f3efe7;
  --bone-200: #e6e0d3;
  --bone-400: #b9b3a6;
  --bone-600: #837c70;

  --copper-300: #ffb26b;
  --copper-400: #f2954a;
  --copper-500: #e07b2e;
  --copper-600: #b85e1e;
  --copper-glow: rgba(224, 123, 46, 0.35);

  --cyan-300: #8fe9ec;
  --cyan-400: #4bd4d9;
  --cyan-500: #2bb8bd;
  --cyan-glow: rgba(75, 212, 217, 0.32);

  --danger: #e0523f;
  --success: #6bcf8f;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-panel: 0 20px 50px -25px rgba(0, 0, 0, 0.75);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void-950);
  color: var(--bone-200);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bone-100);
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--bone-400); }
p.lead { font-size: 1.15rem; color: var(--bone-200); }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--copper-400);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--copper-500);
  display: inline-block;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; position: relative; }
.section-tight { padding: 56px 0; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--copper-400), var(--copper-600));
  color: #1a0e02;
  box-shadow: 0 10px 30px -12px var(--copper-glow);
}
.btn-primary:hover { box-shadow: 0 14px 36px -10px var(--copper-glow); filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--bone-100);
  border-color: var(--steel-500);
}
.btn-ghost:hover { border-color: var(--cyan-400); color: var(--cyan-300); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 8, 10, 0.82);
  border-bottom: 1px solid var(--steel-line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.02rem;
  color: var(--bone-100);
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--copper-400);
  margin-top: 2px;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  color: var(--bone-400);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--copper-300); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; }

.nav-subrow {
  display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap;
  padding: 9px 24px; border-top: 1px solid var(--steel-line);
  background: var(--void-900);
}
.nav-subrow a {
  text-decoration: none; color: var(--bone-600); font-family: var(--font-mono);
  font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.15s ease;
}
.nav-subrow a:hover, .nav-subrow a.active { color: var(--copper-300); }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-subrow { display: none; justify-content: flex-start; }
  .nav-subrow.open { display: flex; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 120px 0 90px; }
.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 50% -10%, #1c1108 0%, var(--void-950) 55%);
}
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 820px; margin: 0 auto; }
.hero-sub { font-size: 1.15rem; color: var(--bone-400); max-width: 640px; margin: 0 auto 2.2em; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
}
.hero-content { text-align: left; }
.hero-content .hero-sub { margin: 0 0 2.2em; }
.hero-content .hero-actions { justify-content: flex-start; margin-bottom: 2.2rem; }
.hero-content .status-strip { display: flex; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-content { text-align: center; }
  .hero-content .hero-actions { justify-content: center; }
  .hero-content .status-strip { display: inline-flex; }
  .hero-cam { max-width: 560px; margin: 0 auto; }
}

/* Live cantina cam */
.hero-cam { width: 100%; }
.cam-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(224, 123, 46, 0.35);
  background: var(--steel-800);
  box-shadow: var(--shadow-panel);
}
#camVideo { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.cam-badge {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  background: rgba(7, 8, 10, 0.75); backdrop-filter: blur(6px);
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-100);
}
.cam-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bone-600); }
.cam-dot.live { background: #ff4d4d; box-shadow: 0 0 8px #ff4d4d; animation: camPulse 1.4s ease-in-out infinite; }
@keyframes camPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.cam-label {
  position: absolute; bottom: 12px; left: 12px; z-index: 4;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em;
  color: var(--bone-200); background: rgba(7, 8, 10, 0.65);
  padding: 5px 11px; border-radius: var(--radius-sm); font-weight: 500;
}
.cam-mute-btn {
  position: absolute; bottom: 10px; right: 10px; z-index: 4;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(7, 8, 10, 0.75); backdrop-filter: blur(6px);
  border: 1px solid rgba(224, 123, 46, 0.35); color: var(--bone-100);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cam-mute-btn:hover { background: rgba(224, 123, 46, 0.25); }
.cam-offline {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(160deg, var(--steel-800), var(--void-950));
  text-align: center; padding: 16px;
}
.cam-offline-title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--bone-400); }
.cam-offline-sub { font-size: 0.82rem; color: var(--bone-600); }

.status-strip {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--steel-line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(23, 27, 33, 0.9), rgba(11, 13, 16, 0.9));
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  flex-wrap: wrap;
}
.status-item {
  padding: 16px 26px;
  border-right: 1px solid var(--steel-line);
  text-align: left;
  min-width: 140px;
}
.status-item:last-child { border-right: none; }
.status-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-600);
  margin-bottom: 6px;
}
.status-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--bone-100);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bone-600); flex: none; }
.dot.online { background: var(--success); box-shadow: 0 0 0 0 rgba(107, 207, 143, 0.6); animation: pulse 2s infinite; }
.dot.offline { background: var(--danger); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(107, 207, 143, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(107, 207, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(107, 207, 143, 0); }
}

/* Panels / cards */
.panel {
  background: linear-gradient(180deg, var(--steel-800), var(--void-900));
  border: 1px solid var(--steel-line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-panel);
  position: relative;
}
.panel::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--copper-400), transparent);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.panel-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(224, 123, 46, 0.12);
  border: 1px solid rgba(224, 123, 46, 0.35);
  color: var(--copper-300);
  margin-bottom: 18px;
}

.subnav {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px;
}
.subnav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--steel-line);
  color: var(--bone-400);
}
.subnav a.active { color: var(--void-950); background: var(--copper-400); border-color: var(--copper-400); }

/* Table / board */
.board-table { width: 100%; border-collapse: collapse; }
.board-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-600);
  padding: 10px 14px;
  border-bottom: 1px solid var(--steel-line);
}
.board-table td {
  padding: 14px;
  border-bottom: 1px solid var(--steel-line);
  color: var(--bone-200);
}
.board-table tr:last-child td { border-bottom: none; }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.tag-open { background: rgba(224, 123, 46, 0.14); color: var(--copper-300); border: 1px solid rgba(224, 123, 46, 0.4); }
.tag-claimed { background: rgba(107, 207, 143, 0.12); color: var(--success); border: 1px solid rgba(107, 207, 143, 0.35); }
.credits { font-family: var(--font-mono); color: var(--cyan-300); }
.rank-1 { color: var(--copper-300); }
.rank-2 { color: var(--bone-100); }
.rank-3 { color: var(--copper-500); }

/* Forms */
.form-field { margin-bottom: 20px; text-align: left; }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-400);
  margin-bottom: 8px;
}
.form-field input, .form-field textarea {
  width: 100%;
  background: var(--void-900);
  border: 1px solid var(--steel-line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--bone-100);
  font-family: var(--font-body);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}
.form-hint { font-size: 0.82rem; color: var(--bone-600); margin-top: 6px; }
.form-error {
  background: rgba(224, 82, 63, 0.12);
  border: 1px solid rgba(224, 82, 63, 0.4);
  color: #ffb4a8;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.form-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* Footer */
.footer { border-top: 1px solid var(--steel-line); padding: 56px 0 40px; background: var(--void-900); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 0.85rem; letter-spacing: 0.12em; color: var(--bone-400); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; }
.footer a { text-decoration: none; color: var(--bone-400); font-size: 0.92rem; }
.footer a:hover { color: var(--copper-300); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--steel-line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.8rem; color: var(--bone-600); font-family: var(--font-mono);
}

/* Holomap */
.holomap { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.planet-chip {
  border: 1px solid var(--steel-line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--void-900);
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.planet-chip.hot { border-color: rgba(75, 212, 217, 0.5); box-shadow: 0 0 22px -8px var(--cyan-glow); }
.planet-name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; color: var(--bone-100); }
.planet-count { font-family: var(--font-mono); color: var(--cyan-300); font-size: 1.3rem; margin-top: 6px; }

/* Devlog */
.devlog-entry { border-bottom: 1px solid var(--steel-line); padding: 24px 0; }
.devlog-entry:last-child { border-bottom: none; }
.devlog-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--copper-400); letter-spacing: 0.1em; text-transform: uppercase; }

/* Misc */
.center { text-align: center; }
.text-muted { color: var(--bone-600); }
.mt-0 { margin-top: 0; }
.flash-success {
  background: rgba(107, 207, 143, 0.12);
  border: 1px solid rgba(107, 207, 143, 0.4);
  color: var(--success);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.scroll-fade { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.scroll-fade.in-view { opacity: 1; transform: translateY(0); }

/* Donation meter + amount picker */
.meter-track { height: 12px; background: var(--void-900); border: 1px solid var(--steel-line); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--copper-500), var(--copper-300)); box-shadow: 0 0 12px var(--copper-glow); transition: width 1s ease; }
.meter-fill.full { background: linear-gradient(90deg, var(--success), #8dffce); }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.amount-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.amount-opt label {
  display: block; padding: 13px; border: 1px solid var(--steel-line); border-radius: var(--radius-sm);
  text-align: center; cursor: pointer; font-weight: 700; font-family: var(--font-mono); font-size: 1rem; color: var(--bone-400);
}
.amount-opt input:checked + label { border-color: var(--copper-400); color: var(--copper-300); background: rgba(224, 123, 46, 0.08); }
.donor-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--void-900); border: 1px solid var(--steel-line); border-radius: var(--radius-sm); flex-wrap: wrap; margin-bottom: 8px;
}
.donor-rank { font-family: var(--font-mono); font-weight: 800; font-size: 0.8rem; color: var(--copper-300); width: 24px; }
.donor-name { font-weight: 600; font-size: 0.9rem; flex: 1; min-width: 100px; color: var(--bone-100); }
.donor-total { font-family: var(--font-mono); font-weight: 800; font-size: 0.9rem; color: var(--copper-300); }
.opt-in-box { background: rgba(224, 123, 46, 0.05); border: 1px solid rgba(224, 123, 46, 0.18); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 4px; }
.checkline { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; font-size: 0.82rem; color: var(--bone-400); cursor: pointer; }
.checkline input { margin-top: 3px; }

/* Shop */
.shop-card { display: flex; flex-direction: column; }
.shop-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 16px; background: var(--void-900); }
.shop-price { font-family: var(--font-mono); font-size: 1.15rem; color: var(--copper-300); font-weight: 700; margin: 4px 0 16px; }
