:root {
  --bg: #040812;
  --surface: rgba(11, 20, 38, 0.82);
  --surface-hover: rgba(18, 34, 64, 0.95);
  --azurite: #00b4ff;
  --copper: #d99b52;
  --copper-glow: rgba(217, 155, 82, 0.35);
  --text: #e8eef7;
  --muted: #94a3b8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 50% 0%, #0d1e3a 0%, var(--bg) 65%);
  color: var(--text);
  line-height: 1.6;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
  overflow-x: hidden;
}
/* Fix stacked double logo & oversized emblems */
img, svg { max-width: 180px; height: auto; display: block; margin: 0.75rem auto; }
header img + img, a img + img, body > div > img:nth-of-type(2) { display: none !important; }

/* Navigation & Header Polish */
nav, header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.25rem; padding: 1rem 1.25rem; margin-bottom: 2rem;
  background: var(--surface); border: 1px solid rgba(0, 180, 255, 0.25);
  border-radius: 12px; backdrop-filter: blur(12px);
}
a { color: var(--azurite); text-decoration: none; font-weight: 500; transition: all 0.2s ease; }
a:hover { color: var(--copper); text-shadow: 0 0 8px var(--copper-glow); }

/* Headings & Hero */
h1 { font-size: clamp(2rem, 4vw, 3rem); color: var(--copper); letter-spacing: 0.05em; margin: 1rem 0 0.75rem; text-transform: uppercase; }
h2 { font-size: 1.5rem; color: var(--azurite); margin: 1.5rem 0 0.75rem; }
h3 { font-size: 1.2rem; color: var(--copper); margin: 0.75rem 0 0.4rem; }
p { color: var(--muted); margin-bottom: 1rem; max-width: 85ch; }

/* Card & Section Grid Styling */
section, article, .card, .tile, .tier-card {
  background: var(--surface);
  border: 1px solid rgba(217, 155, 82, 0.3);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}
.grid, .cards, .marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Hide raw modals, drawers, close buttons & founder admin form until triggered */
[hidden], .hidden, .modal, .drawer, .overlay, .popup, .admin-panel, .founder-admin,
div[id*="modal" i], div[id*="inspector" i], div[id*="checkout" i], div[id*="admin" i],
section[id*="admin" i], form[id*="admin" i] {
  display: none !important;
}
.modal.active, .modal.open, .drawer.open, [data-open="true"] {
  display: block !important;
  position: fixed; inset: 10% auto auto 50%; transform: translateX(-50%);
  width: min(92vw, 680px); z-index: 9999;
  background: #081226; border: 1px solid var(--azurite); border-radius: 16px; padding: 2rem;
}

/* Buttons, Badges & Inputs */
button, .btn, input[type="submit"] {
  background: linear-gradient(135deg, rgba(0, 180, 255, 0.18), rgba(217, 155, 82, 0.22));
  color: var(--text);
  border: 1px solid var(--copper);
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  margin: 0.35rem 0.35rem 0.35rem 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
button:hover, .btn:hover {
  background: var(--copper); color: #040812; box-shadow: 0 0 14px var(--copper-glow);
}
input, textarea, select {
  width: 100%; max-width: 520px; display: block;
  background: rgba(4, 8, 18, 0.9); color: var(--text);
  border: 1px solid rgba(0, 180, 255, 0.35); border-radius: 8px;
  padding: 0.65rem 0.9rem; margin: 0.4rem 0 1rem;
}
