/* ==========================================================================
   RATM REGIE AGAINST THE MACHINE - STYLE ARCHITECTURE
   Design System: Neo-Brutalist Editorial Hybrid
   Framework: Pure Fluid CSS Grid & Flexbox
   Color Palette:
     - Pure White: #FFFFFF
     - Editorial Cream: #F5F5F0
     - Structural Slate: #1E293B
     - Terracotta Earth (Accent): #C2410C
     - Forest Ochre: #4D7C0F
     - Border Structural: #1E293B
   ========================================================================== */

:root {
  --color-bg-pure: #FFFFFF;
  --color-bg-editorial: #F5F5F0;
  --color-ink-primary: #1E293B;
  --color-ink-muted: #475569;
  --color-ink-light: #64748B;
  --color-accent-terracotta: #C2410C;
  --color-accent-forest: #4D7C0F;
  --color-accent-sand: #FEF3C7;
  --color-border: #1E293B;
  --shadow-hard: 4px 4px 0px #1E293B;
  --shadow-hard-sm: 2px 2px 0px #1E293B;
  --shadow-hard-lg: 6px 6px 0px #1E293B;
  --radius-sm: 4px;
  --radius-md: 8px;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--color-bg-editorial);
  color: var(--color-ink-primary);
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 1rem;
  background-color: var(--color-bg-editorial);
  color: var(--color-ink-primary);
  -webkit-font-smoothing: antialiased;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ==========================================================================
   MASTER LAYOUT GRID (Strict Two-Column Anti-Cutoff & No Footer Overlap)
   ========================================================================== */
.master-layout-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Sidebar Column 1 */
.sidebar-header {
  width: 280px;
  background: var(--color-bg-pure);
  border-right: 2px solid var(--color-border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  z-index: 100;
}

/* Main Content Area Canvas Column 2 */
.main-content-canvas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
  background-color: var(--color-bg-editorial);
  width: 100%;
}

.page-content-wrapper {
  flex: 1 0 auto;
  padding: 40px 48px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   SIDEBAR NAVIGATION SYSTEM
   ========================================================================== */
.brand-identity-block {
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 20px;
}

.brand-badge {
  display: inline-block;
  background: var(--color-accent-sand);
  color: var(--color-border);
  border: 1px solid var(--color-border);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-ink-primary);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  margin-top: 4px;
  line-height: 1.35;
}

/* Metadata Registry Sub-Card */
.metadata-registry-card {
  background: var(--color-bg-editorial);
  border: 1px solid var(--color-border);
  padding: 12px;
  box-shadow: var(--shadow-hard-sm);
  font-size: 0.75rem;
  line-height: 1.45;
}

.registry-title {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent-terracotta);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}

.registry-item {
  margin-bottom: 4px;
}

.registry-item strong {
  color: var(--color-ink-primary);
}

.registry-link {
  color: var(--color-accent-terracotta);
  text-decoration: underline;
  font-weight: 600;
  display: inline-block;
  margin-top: 4px;
}

/* Navigation Groups */
.nav-category-group {
  margin-bottom: 18px;
}

.nav-category-heading {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-light);
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.nav-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-link-item a {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ink-primary);
  text-decoration: none;
  padding: 8px 10px;
  min-height: 44px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  line-height: 1.3;
}

.nav-link-item a:hover {
  background: var(--color-bg-editorial);
  border-color: var(--color-border);
  color: var(--color-accent-terracotta);
}

.nav-link-item.active a {
  background: var(--color-ink-primary);
  color: var(--color-bg-pure);
  border-color: var(--color-border);
}

.mobile-nav-toggle {
  display: none;
  background: var(--color-ink-primary);
  color: var(--color-bg-pure);
  border: 1px solid var(--color-border);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 44px;
  text-transform: uppercase;
  box-shadow: var(--shadow-hard-sm);
}

/* ==========================================================================
   MEGA FOOTER (Stable Extension Canvas)
   ========================================================================== */
.mega-footer {
  background: var(--color-bg-pure);
  border-top: 2px solid var(--color-border);
  padding: 60px 48px 40px;
  box-sizing: border-box;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 48px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-ink-primary);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 6px;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--color-ink-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link-list a {
  color: var(--color-ink-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 0;
  display: inline-block;
  min-height: 24px;
  transition: color 0.15s ease;
}

.footer-link-list a:hover {
  color: var(--color-accent-terracotta);
  text-decoration: underline;
}

.footer-contact-detail {
  font-size: 0.85rem;
  color: var(--color-ink-primary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-contact-detail a {
  color: var(--color-accent-terracotta);
  text-decoration: underline;
  font-weight: 600;
}

/* Bottom Trust Baseline Block */
.bottom-trust-block {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  font-size: 0.78rem;
  color: var(--color-ink-muted);
  line-height: 1.6;
}

.trust-registry-line {
  font-weight: 700;
  color: var(--color-ink-primary);
  margin-bottom: 8px;
}

.trust-statement {
  background: var(--color-bg-editorial);
  border-left: 3px solid var(--color-accent-terracotta);
  padding: 10px 14px;
  margin: 12px 0;
  font-weight: 600;
  color: var(--color-ink-primary);
}

.trust-legal-copy {
  margin-top: 10px;
}

.trust-legal-copy a {
  color: var(--color-accent-terracotta);
  text-decoration: underline;
}

/* ==========================================================================
   NEO-BRUTALIST EDITORIAL CONTENT MODULES
   ========================================================================== */

/* Page Header & Hero */
.editorial-hero {
  background: var(--color-bg-pure);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  padding: 36px 40px;
  margin-bottom: 40px;
}

.hero-tag {
  display: inline-block;
  background: var(--color-accent-terracotta);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-tag-green {
  background: var(--color-accent-forest);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-ink-primary);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-summary-2sent {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--color-ink-primary);
  font-weight: 600;
  margin-bottom: 20px;
  border-left: 4px solid var(--color-border);
  padding-left: 16px;
}

.hero-banner-image-wrap {
  width: 100%;
  margin: 24px 0 28px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-hard-sm);
  overflow: hidden;
  background: #000;
}

.hero-banner-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Mission Block Highlight */
.mission-callout-box {
  background: var(--color-accent-sand);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  padding: 28px 32px;
  margin: 32px 0;
}

.mission-callout-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent-terracotta);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.mission-callout-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-ink-primary);
  font-weight: 600;
}

/* Non-commercial Action Button */
.btn-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-ink-primary);
  color: var(--color-bg-pure);
  border: 2px solid var(--color-border);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 14px 28px;
  min-height: 48px;
  text-decoration: none;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-action-primary:hover {
  background: var(--color-accent-terracotta);
  color: #FFFFFF;
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard-lg);
}

.btn-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-pure);
  color: var(--color-ink-primary);
  border: 2px solid var(--color-border);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 14px 28px;
  min-height: 48px;
  text-decoration: none;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-action-secondary:hover {
  background: var(--color-bg-editorial);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard-lg);
}

/* Grid Frameworks */
.grid-4-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.grid-2-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin: 32px 0;
}

/* Feature Cards (Neo-Brutalist offset cards) */
.editorial-card {
  background: var(--color-bg-pure);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.editorial-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-lg);
}

.card-image-wrap {
  width: 100%;
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--color-bg-editorial);
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  margin-bottom: 10px;
  color: var(--color-ink-primary);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--color-ink-primary);
}

.card-body-text {
  font-size: 0.9rem;
  color: var(--color-ink-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Long-Form Editorial Prose Layout */
.editorial-prose {
  background: var(--color-bg-pure);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  padding: 44px;
  margin-bottom: 40px;
}

.editorial-prose h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--color-ink-primary);
  margin-top: 36px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 8px;
}

.editorial-prose h2:first-of-type {
  margin-top: 0;
}

.editorial-prose h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent-terracotta);
  margin-top: 28px;
  margin-bottom: 12px;
}

.editorial-prose p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--color-ink-primary);
  margin-bottom: 20px;
}

.editorial-prose ul, .editorial-prose ol {
  margin: 16px 0 24px 24px;
  line-height: 1.75;
  color: var(--color-ink-primary);
}

.editorial-prose li {
  margin-bottom: 8px;
}

.editorial-prose blockquote {
  background: var(--color-bg-editorial);
  border-left: 4px solid var(--color-accent-terracotta);
  padding: 16px 20px;
  margin: 24px 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-ink-primary);
}

/* Data Table & Timeline */
.editorial-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.92rem;
}

.editorial-table th, .editorial-table td {
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  text-align: left;
}

.editorial-table th {
  background: var(--color-ink-primary);
  color: var(--color-bg-pure);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.editorial-table tr:nth-child(even) {
  background: var(--color-bg-editorial);
}

/* Timeline Components */
.timeline-block {
  border-left: 3px solid var(--color-border);
  margin-left: 12px;
  padding-left: 24px;
  margin-bottom: 32px;
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--color-accent-terracotta);
  border: 2px solid var(--color-border);
  border-radius: 50%;
}

.timeline-year {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-accent-terracotta);
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-ink-primary);
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--color-ink-muted);
  line-height: 1.6;
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--color-ink-primary);
  letter-spacing: 0.02em;
}

.form-input, .form-textarea, .form-select {
  border: 2px solid var(--color-border);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #FFFFFF;
  color: var(--color-ink-primary);
  border-radius: var(--radius-sm);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--color-accent-terracotta);
  box-shadow: var(--shadow-hard-sm);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* Metrics & Statistics Blocks */
.stat-box-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.stat-box {
  background: var(--color-bg-pure);
  border: 2px solid var(--color-border);
  padding: 20px;
  box-shadow: var(--shadow-hard);
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--color-accent-terracotta);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-ink-primary);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & MEDIA QUERIES
   ========================================================================== */

/* Tablet Breakpoint (max-width: 1024px) */
@media (max-width: 1024px) {
  .master-layout-wrapper {
    grid-template-columns: 240px 1fr;
  }
  .sidebar-header {
    width: 240px;
    padding: 24px 16px;
  }
  .page-content-wrapper {
    padding: 32px 28px;
  }
  .grid-4-col {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-box-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

/* Mobile Large Breakpoint (max-width: 768px) */
@media (max-width: 768px) {
  .master-layout-wrapper {
    grid-template-columns: 1fr;
    display: block;
  }

  .mobile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg-pure);
    border-bottom: 2px solid var(--color-border);
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .mobile-top-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .mobile-nav-toggle {
    display: inline-block;
  }

  .sidebar-header {
    width: 100%;
    height: auto;
    max-height: 80vh;
    position: fixed;
    top: 60px;
    left: 0;
    border-right: none;
    border-bottom: 3px solid var(--color-border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: none;
  }

  .sidebar-header.mobile-open {
    display: flex;
  }

  .page-content-wrapper {
    padding: 24px 16px;
  }

  .editorial-hero {
    padding: 24px 20px;
  }

  .hero-headline {
    font-size: 1.8rem;
  }

  .grid-2-col, .grid-3-col, .grid-4-col {
    grid-template-columns: 1fr;
  }

  .editorial-prose {
    padding: 24px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .mega-footer {
    padding: 40px 20px 30px;
  }
}

/* Mobile Small Breakpoint (max-width: 480px) */
@media (max-width: 480px) {
  .hero-headline {
    font-size: 1.5rem;
  }
  .stat-box-container {
    grid-template-columns: 1fr;
  }
  .btn-action-primary, .btn-action-secondary {
    width: 100%;
  }
  .mission-callout-box {
    padding: 20px 16px;
  }
  .stat-number {
    font-size: 2rem;
  }
}
