/* IWU — The Interdependent Workers Union */

:root {
  --bg: #0a0a0a;
  --bg-raised: #111111;
  --surface: #161616;
  --border: #252525;
  --border-light: #333333;
  --text: #e0dbd5;
  --text-muted: #88827c;
  --text-dim: #5a5652;
  --accent: #c4a35a;
  --accent-dim: #8a7340;
  --accent-glow: rgba(196, 163, 90, 0.08);
  --link: #c4a35a;
  --link-hover: #dcc06e;
  --code-bg: #131313;
  --max-width: 42rem;
  --gutter: 1.5rem;
  --radius: 4px;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Nav ─── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0 var(--gutter);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo {
  width: 32px;
  height: 32px;
}

.nav-title {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}

nav a:hover,
nav a:focus {
  color: var(--link-hover);
  border-bottom-color: var(--accent-dim);
}

nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Main ─── */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 4rem;
  width: 100%;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 0.6em;
}

h1 {
  font-size: 2.4rem;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.2rem;
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}

h4 {
  font-size: 1.05rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-style: italic;
}

h5, h6 {
  font-size: 0.95rem;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

p {
  margin-bottom: 1.3rem;
}

/* ─── Links ─── */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

/* ─── Bold & Italic ─── */
strong, b {
  color: var(--text);
  font-weight: 700;
}

em, i {
  font-style: italic;
  color: var(--text-muted);
}

/* ─── Lists ─── */
ul, ol {
  margin-bottom: 1.4rem;
  padding-left: 1.6rem;
}

li {
  margin-bottom: 0.5rem;
  padding-left: 0.3rem;
}

li > ul, li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Task lists (GitHub-style) */
input[type="checkbox"] {
  margin-right: 0.5rem;
  accent-color: var(--accent);
}

/* ─── Blockquotes ─── */
blockquote {
  border-left: 3px solid var(--accent-dim);
  padding: 0.8rem 1.2rem;
  margin: 2rem 0;
  background: var(--accent-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote strong {
  color: var(--text);
  font-style: normal;
}

blockquote blockquote {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ─── Code ─── */
code {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
}

/* ─── Tables ─── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

thead {
  border-bottom: 2px solid var(--border-light);
}

th {
  text-align: left;
  padding: 0.7rem 0.8rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: normal;
}

td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--accent-glow);
}

/* ─── Horizontal Rules ─── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ─── Images ─── */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

figure {
  margin: 2rem 0;
}

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-top: 0.5rem;
}

/* ─── Details / Summary ─── */
details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  background: var(--surface);
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 0.3rem 0;
}

summary:hover {
  color: var(--link-hover);
}

details[open] summary {
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Page Header ─── */
.page-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 0.4rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0;
}

/* ─── Hero (landing page) ─── */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.hero .logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  display: block;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.hero .tagline {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0;
}

/* ─── Section ─── */
section {
  margin-bottom: 2.5rem;
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem var(--gutter);
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

footer p:first-child {
  color: var(--accent-dim);
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}

footer p:last-child {
  margin-bottom: 0;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  :root {
    --gutter: 1.2rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }

  nav {
    height: 3.5rem;
  }

  .nav-title {
    font-size: 0.75rem;
  }

  nav ul {
    gap: 1.2rem;
  }

  nav a {
    font-size: 0.7rem;
  }

  .hero .logo {
    width: 80px;
    height: 80px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  table {
    font-size: 0.82rem;
  }

  th, td {
    padding: 0.5rem;
  }
}

/* ─── Focus ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* ─── Print ─── */
@media print {
  header, footer { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  h1, h2 { color: black; }
  blockquote { border-left-color: #999; background: none; }
}
