:root {
  --bg-base: #1e1612;
  --bg-surface: #2c201a;
  --bg-surface-hover: #362820;
  --text-primary: #f5ecdf;
  --text-muted: #d0c5b5;
  --accent-primary: #f59e0b;
  --accent-secondary: #d97706;
  --border-subtle: rgba(245, 158, 11, 0.2);
  
  --font-family: Charter, Cambria, Georgia, serif;
  --space-unit: 8px;
  --radius: 0px;
  
  --ease-kinetic: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration: 400ms;
}

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

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

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.65;
  margin: 1.5rem;
  border: 1px solid var(--border-subtle);
  min-height: calc(100vh - 3rem);
  overflow-x: hidden;
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (max-width: 480px) {
  body {
    margin: 0.5rem;
    min-height: calc(100vh - 1rem);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--accent-primary);
  font-size: 0.9rem;
}

/* Header & Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: var(--bg-surface);
}

.top-bar a {
  text-decoration: underline;
  text-decoration-color: var(--border-subtle);
}

.top-bar a:hover {
  text-decoration-color: var(--accent-primary);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  position: static;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  font-size: 1.05rem;
  position: relative;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent-primary);
  transition: width var(--duration) var(--ease-kinetic);
}

.desktop-nav a:hover::after, .desktop-nav a[aria-current="page"]::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
  gap: 1rem;
}

.mobile-menu.active {
  display: flex;
}

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-toggle { display: block; }
  .top-bar { flex-direction: column; text-align: center; gap: 0.5rem; }
  .site-header { padding: 1rem; }
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: normal;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
p { margin-bottom: 1.25rem; }

/* Hero */
.hero {
  position: relative;
  width: 100%;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: var(--bg-surface);
}

.hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(30,22,18,0.3), rgba(30,22,18,0.9));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 2rem;
}

/* Layout Grid */
.main-content {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 769px) {
  .grid-layout {
    grid-template-columns: repeat(2, 1fr);
  }
  .lead-block {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2rem;
  }
}

.single-column {
  max-width: 72ch;
  margin: 0 auto;
}

/* Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid transparent;
  transition: transform var(--duration) var(--ease-kinetic), background-color 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  background-color: var(--bg-surface-hover);
  transform: translateY(-2px);
  border: 1px solid var(--border-subtle);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: var(--bg-base);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
}

.card-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: var(--accent-primary);
  color: var(--bg-base);
  padding: 0.25rem 0.75rem;
  font-variant: small-caps;
  font-weight: bold;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

/* Buttons & Links */
.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary);
  color: var(--bg-base);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: background-color 0.2s;
  margin-top: auto;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn-main:hover {
  background-color: var(--accent-secondary);
}

.txt-link {
  text-decoration: underline;
  text-decoration-color: var(--accent-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-thickness 0.2s;
  color: var(--text-primary);
}

.txt-link:hover {
  text-decoration-thickness: 3px;
}

/* Forms & Tables */
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.form-control {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--accent-primary);
  outline: none;
}

.table-responsive {
  overflow-x: auto;
  margin: 2rem 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  background-color: var(--bg-surface);
  font-weight: normal;
  color: var(--accent-primary);
}

/* Article specific */
.article-header {
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2rem;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.content-image {
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

figcaption {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.pull-quote {
  margin: 2rem 0;
  padding: 2rem;
  border-left: 4px solid var(--accent-primary);
  background-color: var(--bg-surface);
  font-size: 1.25rem;
  font-style: italic;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem;
  background-color: var(--bg-surface);
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-kinetic), transform 600ms var(--ease-kinetic);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}