/* =========================================================
   MinecraftGooners — stylesheet
   Structuur:
   1. Reset & base
   2. Design tokens
   3. Typografie
   4. Layout (nav, container, footer)
   5. Buttons
   6. Forms
   7. Cards & badges
   8. Home-pagina
   9. Aanmeldpagina
   10. Admin-dashboard
   11. Utilities
   12. Responsive
   13. Motion & focus
   ========================================================= */

/* ---------- 1. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------- 2. Design tokens ---------- */
:root {
  /* Achtergronden — diepe leisteen/basalt, geen zuiver zwart */
  --bg: #14171b;
  --bg-elevated: #1d2126;
  --bg-elevated-2: #262b31;
  --border: #2f353c;
  --border-soft: #262b31;

  /* Tekst */
  --text: #e8eaed;
  --text-muted: #9aa1a9;
  --text-faint: #6b7178;

  /* Accenten, geïnspireerd op ertsen/materialen uit de game */
  --gold: #e3a542;       /* primaire actie / torch-light */
  --gold-hover: #f0b75a;
  --gold-soft: rgba(227, 165, 66, 0.12);

  --emerald: #3fa187;    /* goedgekeurd */
  --emerald-soft: rgba(63, 161, 135, 0.14);

  --rust: #c0604a;       /* afgekeurd / gevaar */
  --rust-soft: rgba(192, 96, 74, 0.14);

  --lapis: #4c7ea8;      /* openstaand / info */
  --lapis-soft: rgba(76, 126, 168, 0.14);

  /* Typografie */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Overig */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --max-width: 1080px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* subtiele "torch"-gloed op de achtergrond, heel rustig */
body {
  background-image:
    radial-gradient(600px circle at 15% 0%, rgba(227, 165, 66, 0.06), transparent 60%),
    radial-gradient(500px circle at 100% 30%, rgba(76, 126, 168, 0.05), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ---------- 3. Typografie ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; color: var(--text); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1em;
  display: block;
}
.lede { color: var(--text-muted); font-size: 1.05rem; max-width: 46em; }
.mono { font-family: var(--font-mono); }

/* ---------- 4. Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.nav {
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: rgba(20, 23, 27, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-mark { color: var(--gold); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

main { padding: 88px 0 128px; }

footer {
  border-top: 1px solid var(--border-soft);
  padding: 36px 0;
  color: var(--text-faint);
  font-size: 0.85rem;
}

section + section { margin-top: 96px; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 14px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #1a1305; }
.btn-primary:hover { background: var(--gold-hover); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-muted); }
.btn-danger { background: var(--rust); color: #2a0e08; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-success { background: var(--emerald); color: #06231b; }
.btn-success:hover { filter: brightness(1.08); }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- 6. Forms ---------- */
.field { margin-bottom: 26px; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.field .hint {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 6px;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.98rem;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.field textarea { min-height: 110px; resize: vertical; }

/* honeypot-veld: onzichtbaar voor mensen, wel aanwezig voor botjes */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 44px;
  max-width: 520px;
  box-shadow: var(--shadow);
}

.form-message {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-top: 18px;
  display: none;
}
.form-message.is-success {
  display: block;
  background: var(--emerald-soft);
  color: var(--emerald);
}
.form-message.is-error {
  display: block;
  background: var(--rust-soft);
  color: var(--rust);
}

/* ---------- 7. Cards & badges ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 32px;
}
.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.badge-pending { background: var(--lapis-soft); color: var(--lapis); }
.badge-approved { background: var(--emerald-soft); color: var(--emerald); }
.badge-denied { background: var(--rust-soft); color: var(--rust); }

/* ---------- 8. Home-pagina ---------- */
.hero { padding-bottom: 8px; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 36px; flex-wrap: wrap; }
.hero-note { color: var(--text-faint); font-size: 0.88rem; max-width: 32em; }

.connect-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.connect-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(227, 165, 66, 0.16), transparent 70%);
  animation: torch-flicker 5s ease-in-out infinite;
}
.connect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}
.connect-row:last-child { border-bottom: none; }
.connect-label { color: var(--text-muted); font-size: 0.85rem; }
.connect-value { font-family: var(--font-mono); font-size: 1.02rem; }
.copy-btn {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-mono);
}
.copy-btn:hover { color: var(--text); border-color: var(--gold); }

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.rule-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px;
}
.rule-card h3 { margin-bottom: 6px; color: var(--text); }
.rule-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.rule-icon {
  width: 20px; height: 20px;
  color: var(--gold);
  margin-bottom: 10px;
}

/* ---------- 9. Aanmeldpagina ---------- */
.page-header { margin-bottom: 56px; }

/* ---------- 10. Admin-dashboard ---------- */
.login-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 14px 4px;
  margin-right: 32px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transform: translateY(1px);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.is-active { color: var(--gold); border-bottom-color: var(--gold); }

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 16px;
  flex-wrap: wrap;
}

.request-list { display: flex; flex-direction: column; gap: 18px; }
.request-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.request-info { min-width: 220px; flex: 1; }
.request-name { font-family: var(--font-mono); font-size: 1.05rem; margin-right: 10px; }
.request-sub { color: var(--text-muted); font-size: 0.85rem; margin: 4px 0; }
.request-reason { color: var(--text); font-size: 0.92rem; margin: 0; }
.request-meta { color: var(--text-faint); font-size: 0.78rem; margin-top: 8px; font-family: var(--font-mono); }
.request-actions { display: flex; gap: 10px; align-self: center; }

.request-note-wrap { flex-basis: 100%; }
.note-input {
  width: 100%;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  min-height: 56px;
  resize: vertical;
}
.note-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.note-input::placeholder { color: var(--text-faint); }

.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 64px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.dash-error {
  background: var(--rust-soft);
  color: var(--rust);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: none;
  font-size: 0.9rem;
}
.dash-error.is-visible { display: block; }

/* ---------- 11. Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 12. Responsive ---------- */
@media (max-width: 640px) {
  .container { padding: 0 22px; }
  .nav-inner { padding: 20px 22px; }
  .rules-grid { grid-template-columns: 1fr; }
  main { padding: 56px 0 88px; }
  section + section { margin-top: 64px; }
  .form-card { padding: 28px; }
  .request-card { flex-direction: column; }
  .request-actions { align-self: stretch; }
}

/* ---------- 13. Motion & focus ---------- */
@keyframes torch-flicker {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
