/* ===================================================================
   4nt - site styles
   One stylesheet shared by every page.
   Colors are defined once here as CSS variables so you can re-theme
   the whole site by editing the values in :root below.
   =================================================================== */

:root {
  --soil:        #1a1410;   /* page background (dark soil) */
  --soil-2:      #241b14;   /* card background */
  --soil-3:      #2f241a;   /* raised / hover */
  --line:        #3d2f22;   /* borders */
  --amber:       #e8a33d;   /* primary accent (amber) */
  --amber-dim:   #b97f2a;
  --leaf:        #7fa84f;   /* secondary accent (leaf green) */
  --text:        #f2e9dd;   /* main text */
  --text-dim:    #b6a690;   /* muted text */
  --danger:      #d9694a;
  --radius:      14px;
  --maxw:        1080px;
  --font:        system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:        "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--soil);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
p  { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Top navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(26,20,16,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex; align-items: center; gap: 8px;
  height: 64px;
}
.brand {
  font-weight: 800; font-size: 1.4rem; letter-spacing: -1px;
  color: #b34a44; display: inline-flex; align-items: baseline; gap: 0;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: inherit; }
.nav-links { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-dim); padding: 8px 14px; border-radius: 9px;
  font-size: .95rem; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--soil-3); text-decoration: none; }
.nav-links a.active { color: var(--amber); background: var(--soil-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--amber); color: #2a1c08; font-weight: 700;
  padding: 12px 22px; border-radius: 10px; border: 0; cursor: pointer;
  font-size: 1rem; transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: #f4b352; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--soil-3); }
.btn.ghost { background: var(--soil-3); color: var(--text); }
.btn.big { padding: 16px 30px; font-size: 1.1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 90px 0 80px;
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(232,163,61,.18), transparent),
    radial-gradient(700px 500px at -10% 30%, rgba(127,168,79,.12), transparent);
  border-bottom: 1px solid var(--line);
}
.hero .tag {
  display: inline-block; color: var(--leaf); font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; font-size: .8rem;
  margin-bottom: 14px;
}
.hero p.lead { font-size: 1.25rem; color: var(--text-dim); max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Sections / cards ---------- */
.section { padding: 64px 0; }
.section.tight { padding: 40px 0; }
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--soil-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { color: var(--amber); }
.card .ico { font-size: 1.8rem; margin-bottom: 8px; }

.page-head { padding: 56px 0 24px; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--text-dim); max-width: 680px; }

/* ---------- Forms / inputs ---------- */
label { display: block; font-weight: 600; margin: 0 0 6px; font-size: .95rem; }
input[type=text], input[type=search], textarea, select {
  width: 100%; background: var(--soil); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-size: 1rem; font-family: inherit;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--amber-dim); border-color: transparent; }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }

/* file drop zone */
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 30px; text-align: center; color: var(--text-dim);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--amber); background: var(--soil-3); color: var(--text); }

/* ---------- Notices ---------- */
.notice {
  background: var(--soil-3); border: 1px solid var(--line);
  border-left: 4px solid var(--amber); border-radius: 8px;
  padding: 12px 16px; margin: 0 0 20px; color: var(--text-dim); font-size: .92rem;
}
.notice strong { color: var(--text); }
.notice.demo { border-left-color: var(--leaf); }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 6px;
  background: var(--soil-3); color: var(--leaf); border: 1px solid var(--line);
}

/* ---------- Forum ---------- */
.thread {
  background: var(--soil-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; cursor: pointer;
  transition: border-color .15s;
}
.thread:hover { border-color: var(--amber-dim); }
.thread h3 { color: var(--text); margin-bottom: 4px; font-size: 1.15rem; }
.meta { color: var(--text-dim); font-size: .85rem; }
.reply {
  background: var(--soil); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
}
.reply .meta { margin-bottom: 6px; }

/* ---------- Tip buttons ---------- */
.tip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 10px; }
.tip-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 8px; background: var(--soil-3); color: var(--amber);
  border: 1px solid var(--amber); border-radius: 10px; font-weight: 700; cursor: pointer;
  transition: transform .08s ease, background .15s ease, color .15s ease;
}
.tip-btn:hover { background: var(--amber); color: #2a1c08; text-decoration: none; transform: translateY(-1px); }
.tip-btn .amt { font-size: 1.35rem; line-height: 1.1; }
.tip-btn .lbl { font-size: .82rem; font-weight: 600; opacity: .85; }
.tip-other { display: block; width: 100%; }
.btn.tip-other { color: var(--text-dim); }
.btn.tip-other:hover { color: var(--text); }
/* Disabled = not clickable, but still shown at full strength so the buttons
   look like real, available buttons (they activate once Stripe links are set). */
.is-disabled { pointer-events: none; }

/* ---------- Votes + sort ---------- */
.vote {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--soil-3); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: 20px; padding: 4px 12px; cursor: pointer; font-size: .85rem;
  font-family: inherit; font-weight: 600; line-height: 1; transition: all .12s;
}
.vote:hover { border-color: var(--amber-dim); color: var(--text); }
.vote .arrow { font-size: .9rem; }
.vote.voted { background: rgba(232,163,61,.18); border-color: var(--amber); color: var(--amber); }
.sort-bar { display: inline-flex; gap: 0; border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; }
.sort-bar button { background: var(--soil-2); border: 0; color: var(--text-dim);
  padding: 6px 14px; cursor: pointer; font-size: .85rem; font-family: inherit; }
.sort-bar button:hover { color: var(--text); }
.sort-bar button.active { background: var(--amber); color: #2a1c08; font-weight: 700; }
.head-row { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; }

/* ---------- Config cards ---------- */
.config-list { display: grid; gap: 14px; grid-template-columns: repeat(2,1fr); }
.config {
  background: var(--soil-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
.config h3 { color: var(--amber); font-size: 1.05rem; margin: 0; }
.config pre {
  background: var(--soil); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; font-family: var(--mono); font-size: .8rem; color: var(--text-dim);
  max-height: 120px; overflow: auto; margin: 0; white-space: pre-wrap;
}
.config .actions { display: flex; gap: 8px; margin-top: auto; }
.tagline { color: var(--text-dim); font-size: .9rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .75rem; background: var(--soil-3); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 20px; color: var(--text-dim); }

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: none; align-items: flex-start; justify-content: center; z-index: 100;
  padding: 40px 16px; overflow-y: auto;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--soil-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; max-width: 640px; width: 100%;
}
.modal .close { float: right; background: none; border: 0; color: var(--text-dim);
  font-size: 1.5rem; cursor: pointer; line-height: 1; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 30px 0; color: var(--text-dim); font-size: .9rem;
}
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Misc ---------- */
.center { text-align: center; }
.muted { color: var(--text-dim); }
.mono { font-family: var(--mono); }
.empty { text-align: center; color: var(--text-dim); padding: 40px; }
.spacer { height: 24px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .grid.cols-3, .grid.cols-2, .config-list { grid-template-columns: 1fr; }
  .nav .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .nav-links { width: 100%; margin-left: 0; }
}
