/* ============================================
   A Betrayal of Brotherhood — Base Styles
   Variables, reset, typography, layout, a11y
   ============================================ */

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

:root {
  /* Human side (Single-Sex) — warm clay / terracotta */
  --human: #A64B27;
  --human-dim: #7C3A1D;
  --human-glow: rgba(166, 75, 39, 0.14);
  --human-bg: rgba(166, 75, 39, 0.06);

  /* Humanoid side (Diversity) — muted sage-teal ink */
  --humanoid: #2E6B68;
  --humanoid-dim: #1E4A48;
  --humanoid-glow: rgba(46, 107, 104, 0.14);
  --humanoid-bg: rgba(46, 107, 104, 0.06);

  /* Shared — warm ivory editorial ground */
  --bg-deep: #FAF9F5;
  --bg-surface: #F3F1EA;
  --bg-card: #FFFFFF;
  --bg-elevated: #F0EEE6;
  --text: #1C1B18;
  --text-dim: #4A473F;
  --text-muted: #706B60;
  --border: #E5E1D6;
  --white-dim: rgba(28, 27, 24, 0.05);

  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;

  --speed: 0.3s;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Background hairline grid (very faint, paper-ruled) --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--white-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--white-dim) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 560;
  letter-spacing: -0.015em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 6vw, 3.9rem); line-height: 1.06; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.15; }
h3 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--humanoid);
  text-decoration: none;
  transition: color var(--speed);
}

a:hover { color: var(--human); }

::selection {
  background: var(--human-glow);
  color: var(--text);
}

/* --- Focus / Accessibility --- */
a:focus, button:focus, .btn:focus { outline: none; }

a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--humanoid);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--humanoid);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: top var(--speed);
}

.skip-link:focus { top: 10px; }

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section {
  padding: 88px 0;
  position: relative;
}