/* ==========================================================================
   War Drum Portal — site.css (public + org)
   Path: /assets/css/site.css
   Notes:
   - ASCII only. No @import, no fonts. Uses system font stack.
   - Dark theme tuned for readability and contrast.
   - Applies to landing pages + policy pages (Privacy, Terms, Succession).
   ========================================================================== */

/* ---- CSS Reset (lightweight) ------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
main { display: block; }
h1 { font-size: 2em; margin: 0.67em 0; }
hr { height: 0; color: inherit; }
abbr[title] { text-decoration: underline dotted; }
b, strong { font-weight: bolder; }
code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.95em; }
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; } sup { top: -0.5em; }
button, input, optgroup, select, textarea { font: inherit; margin: 0; }
button, select { text-transform: none; }
button { background: none; border: 0; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

/* ---- Theme tokens ------------------------------------------------------- */
:root{
  --bg: #0b0f14;
  --panel: #111722;
  --panel-alt: #0e141d;
  --border: #1f2a3a;
  --text: #e6ebf2;
  --muted: #aab3c2;
  --link: #7ab8ff;
  --link-hover: #a3ccff;
  --primary: #4da3ff;
  --primary-600: #2e8af2;
  --primary-700: #2476cf;
  --accent: #2de3b8;
  --danger: #ff6b6b;
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 20px;
  --space-5: 28px;
  --space-6: 36px;
  --container: 1100px;
}

/* ---- Base typography/layout -------------------------------------------- */
html, body {
  height: 100%;
  background: linear-gradient(180deg, #0b0f14 0%, #0b0f14 40%, #0c121a 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji",
               "Segoe UI Emoji";
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.center { text-align: center; }

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; outline: none; }

p { margin: 0 0 var(--space-4); color: var(--text); }
.muted { color: var(--muted); }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-3);
  line-height: 1.2;
  letter-spacing: 0.2px;
}
h1, .title { font-size: 2.4rem; }
h2, .h2 { font-size: 1.8rem; margin-top: var(--space-5); }
h3, .h3 { font-size: 1.25rem; }

/* ---- Navigation (works with nav.html/admin_nav.html/org_nav.html) ------ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 20, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-list {
  display: flex; gap: var(--space-3);
  list-style: none; margin: 0; padding: 0;
}
.nav-list a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
}
.nav-list a:hover, .nav-list a:focus {
  background: var(--panel);
  text-decoration: none;
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  padding: var(--space-6) 0 var(--space-6);
  background:
    radial-gradient(1200px 500px at 50% -80%, rgba(77,163,255,0.20), rgba(0,0,0,0) 60%),
    radial-gradient(600px 300px at 15% -60%, rgba(45,227,184,0.13), rgba(0,0,0,0) 70%);
  border-bottom: 1px solid var(--border);
}
.hero .title { margin-bottom: var(--space-2); }
.subtitle { color: var(--muted); font-size: 1.1rem; margin-bottom: var(--space-4); }

.cta-row {
  display: inline-flex; gap: var(--space-3);
  align-items: center; justify-content: center;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.06s ease-out, background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn-primary {
  color: #041423;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
  border-color: #2a6bd1;
}
.btn-primary:hover { background: linear-gradient(180deg, var(--primary-600) 0%, var(--primary-700) 100%); }

.btn-ghost {
  color: var(--link);
  background: transparent;
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--panel); color: var(--link-hover); }

/* ---- Sections ----------------------------------------------------------- */
.section {
  padding: var(--space-6) 0;
  background: transparent;
}
.section.alt {
  background: linear-gradient(180deg, var(--panel-alt) 0%, rgba(14,20,29,0.6) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---- Grid + Cards ------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.card {
  background: linear-gradient(180deg, rgba(17,23,34,1) 0%, rgba(17,23,34,0.85) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: var(--space-2); }
.card p { margin: 0; color: var(--muted); }

/* ---- “Step” pill for how-it-works ------------------------------------- */
.step {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #062332;
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}

/* ---- Code blocks -------------------------------------------------------- */
pre.code {
  background: #0b121a;
  color: #dce7f5;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  overflow: auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
pre.code code { font-size: 0.92rem; line-height: 1.5; }

/* ---- Tables (basic) ----------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel);
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
thead th {
  background: #0f1621;
  text-align: left;
  font-weight: 700;
}
tbody tr:hover { background: #0f1621; }

/* ---- Forms (basic) ------------------------------------------------------ */
input[type=text],
input[type=email],
input[type=search],
input[type=password],
select, textarea {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- Policy pages spacing ---------------------------------------------- */
.section-title { margin-top: var(--space-5); }
main.container > section { margin-bottom: var(--space-5); }

/* ---- Utilities ---------------------------------------------------------- */
.hidden { display: none !important; }
.text-center { text-align: center !important; }
.max-w-800 { max-width: 800px; }
.pad-16 { padding: 16px; }
.mar-t-16 { margin-top: 16px; }
.mar-b-16 { margin-bottom: 16px; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #0b0f14;
  color: var(--muted);
  padding: var(--space-4) 0;
  font-size: 0.95rem;
}
.site-footer a { color: var(--link); }
.site-footer a:hover { color: var(--link-hover); }
