/* ==========================================================================
   NAK MUAY 03 - STYLE.CSS
   Design System: Neo-Brutalist Editorial Hybrid
   Framework: Pure Fluid CSS Grid & Flexbox
   Color Palette:
     - Pure White: #FFFFFF
     - Soft Editorial Cream: #F5F5F0
     - Structural Slate Ink: #1E293B
     - Terracotta Earth Accent: #C2410C
     - Forest Ochre Accent: #4D7C0F
     - Border Structural: 1px solid #1E293B / 2px solid #1E293B
     - High Contrast Block Shadow: 4px 4px 0px #1E293B
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-canvas: #F5F5F0;
  --bg-white: #FFFFFF;
  --ink-primary: #1E293B;
  --ink-muted: #475569;
  --accent-terracotta: #C2410C;
  --accent-terracotta-hover: #9A3412;
  --accent-ochre: #4D7C0F;
  --border-structural: 1px solid #1E293B;
  --border-bold: 2px solid #1E293B;
  --shadow-block: 4px 4px 0px #1E293B;
  --shadow-block-lg: 6px 6px 0px #1E293B;
  --shadow-block-active: 1px 1px 0px #1E293B;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sidebar-width: 280px;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Master Layout Grid Wrapper */
.master-layout-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Left Sidebar Header Panel */
.sidebar-header-panel {
  width: var(--sidebar-width);
  background: var(--bg-white);
  border-right: var(--border-bold);
  padding: 30px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-muted) var(--bg-white);
}

.brand-badge-wrapper {
  border: var(--border-bold);
  background: var(--bg-canvas);
  padding: 16px 14px;
  box-shadow: var(--shadow-block);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  color: var(--ink-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.brand-title a {
  text-decoration: none;
  color: inherit;
}

.brand-title span {
  color: var(--accent-terracotta);
}

.brand-subtitle {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-ochre);
  display: block;
  line-height: 1.3;
}

.brand-tagline {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* Metadata Registry Sub-Card */
.metadata-registry-card {
  background: #FFFFFF;
  border: var(--border-structural);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 2px 2px 0px #1E293B;
}

.metadata-registry-card .reg-item {
  margin-bottom: 6px;
}

.metadata-registry-card .reg-item:last-child {
  margin-bottom: 0;
}

.metadata-registry-card strong {
  color: var(--ink-primary);
  font-weight: 700;
}

.metadata-registry-card a {
  color: var(--accent-terracotta);
  text-decoration: underline;
  font-weight: 600;
}

/* Directory Tree Navigation Links */
.nav-directory-tree {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.nav-category-heading {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  border-bottom: 1px solid #CBD5E1;
  padding-bottom: 4px;
  margin-bottom: 4px;
}

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

.nav-category-links a {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: var(--ink-primary);
  text-decoration: none;
  border: 1px solid transparent;
  transition: none; /* strict hover lock: preserve dimensions */
  min-height: 38px;
  display: flex;
  align-items: center;
}

.nav-category-links a:hover,
.nav-category-links a.active {
  background-color: var(--bg-canvas);
  border: var(--border-structural);
  box-shadow: 2px 2px 0px #1E293B;
  color: var(--accent-terracotta);
  transform: none; /* lock dimensions, no shake */
}

/* Mobile Sidebar Toggle Button */
.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: var(--bg-white);
  border: var(--border-bold);
  box-shadow: var(--shadow-block);
  color: var(--ink-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}

/* Main Content Area Canvas */
.main-content-canvas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
  width: 100%;
  overflow-x: hidden;
}

.content-inner-wrapper {
  padding: 40px 48px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ink-primary);
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  margin-bottom: 16px;
  font-weight: 800;
}

h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  margin-top: 36px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent-terracotta);
  padding-left: 14px;
}

h3 {
  font-size: clamp(18px, 2.2vw, 24px);
  margin-top: 24px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-primary);
  max-width: 80ch;
}

p.lead {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 500;
  color: var(--ink-primary);
}

/* Button & Link Component (Neo-Brutalist) */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background-color: var(--accent-terracotta);
  color: #FFFFFF !important;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  border: var(--border-bold);
  box-shadow: var(--shadow-block);
  cursor: pointer;
  min-height: 48px;
  white-space: nowrap;
}

.btn-cta:hover {
  background-color: var(--accent-terracotta-hover);
  box-shadow: 2px 2px 0px #1E293B;
  transform: translate(2px, 2px);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background-color: var(--bg-white);
  color: var(--ink-primary) !important;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  border: var(--border-bold);
  box-shadow: var(--shadow-block);
  cursor: pointer;
  min-height: 48px;
  white-space: nowrap;
}

.btn-cta-secondary:hover {
  background-color: var(--bg-canvas);
  box-shadow: 2px 2px 0px #1E293B;
  transform: translate(2px, 2px);
}

/* Hero Section Modules */
.hero-editorial-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  background: var(--bg-white);
  border: var(--border-bold);
  padding: 36px;
  box-shadow: var(--shadow-block-lg);
  margin-bottom: 48px;
  align-items: center;
}

.hero-text-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-badge-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 14px;
  background: var(--bg-canvas);
  border: var(--border-structural);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-ochre);
}

.hero-summary-statement {
  font-size: 17px;
  line-height: 1.65;
  font-weight: 600;
  color: var(--ink-primary);
  border-left: 3px solid var(--accent-ochre);
  padding-left: 14px;
  margin: 4px 0 12px 0;
}

.hero-image-block {
  width: 100%;
  border: var(--border-bold);
  box-shadow: var(--shadow-block);
  overflow: hidden;
  background: #E2E8F0;
}

.hero-image-block img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

/* Dedicated Mission Block (Strict 120+ words) */
.mission-highlight-card {
  background: #FFFDF9;
  border: var(--border-bold);
  border-left: 8px solid var(--accent-terracotta);
  padding: 28px 32px;
  box-shadow: var(--shadow-block);
  margin: 32px 0;
}

.mission-highlight-card .mission-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.mission-highlight-card p {
  font-size: 16.5px;
  line-height: 1.75;
  font-weight: 500;
  margin-bottom: 0;
}

/* Reinvestment Notice Callout */
.reinvestment-callout {
  background: #F0FDF4;
  border: var(--border-bold);
  border-left: 6px solid var(--accent-ochre);
  padding: 18px 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-block);
  font-weight: 600;
  color: #166534;
}

/* Institutional Cards & Grids */
.cards-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 32px 0;
}

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

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

.editorial-card {
  background: var(--bg-white);
  border: var(--border-bold);
  box-shadow: var(--shadow-block);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.editorial-card:nth-child(even) {
  transform: translateY(6px); /* dynamic offset */
}

.card-img-header {
  border: var(--border-structural);
  margin-bottom: 18px;
  overflow: hidden;
  height: 200px;
  background: #E2E8F0;
}

.card-img-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editorial-card h3 {
  margin-top: 0;
  font-size: 20px;
}

.editorial-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* Statistics Matrix */
.stat-matrix-block {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: var(--bg-white);
  border: var(--border-bold);
  padding: 28px 20px;
  box-shadow: var(--shadow-block);
  margin: 40px 0;
  text-align: center;
}

.stat-item {
  border-right: 1px solid #CBD5E1;
  padding: 8px 14px;
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-terracotta);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-primary);
  line-height: 1.3;
}

/* Timeline Components */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 36px 0;
  position: relative;
  padding-left: 28px;
  border-left: 3px solid var(--ink-primary);
}

.timeline-event-card {
  background: var(--bg-white);
  border: var(--border-bold);
  padding: 24px;
  box-shadow: var(--shadow-block);
  position: relative;
}

.timeline-event-card::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 24px;
  width: 16px;
  height: 16px;
  background: var(--accent-terracotta);
  border: 2px solid var(--ink-primary);
}

.timeline-year-tag {
  display: inline-block;
  background: var(--ink-primary);
  color: #FFFFFF;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-heading);
  margin-bottom: 10px;
}

/* Administrative & Form Controls */
.form-card {
  background: var(--bg-white);
  border: var(--border-bold);
  padding: 36px;
  box-shadow: var(--shadow-block-lg);
  margin: 36px 0;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--ink-primary);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-canvas);
  border: var(--border-bold);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-primary);
  min-height: 48px;
}

.form-control:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--accent-terracotta);
  box-shadow: 2px 2px 0px #1E293B;
}

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

/* Universal Architectural Mega Footer */
.mega-footer-canvas {
  background: var(--bg-white);
  border-top: var(--border-bold);
  padding: 60px 40px 30px 40px;
  box-sizing: border-box;
  width: 100%;
  margin-top: 48px;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-terracotta);
  border-bottom: 2px solid var(--ink-primary);
  padding-bottom: 6px;
  margin-bottom: 4px;
}

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

.footer-links-list a {
  font-size: 14px;
  color: var(--ink-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 2px 0;
  display: inline-block;
}

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

.footer-contact-info {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-primary);
}

.footer-contact-info p {
  margin-bottom: 8px;
}

/* Bottom Trust Baseline Block */
.bottom-trust-baseline {
  border-top: var(--border-structural);
  padding-top: 24px;
  margin-top: 20px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.bottom-trust-baseline p {
  max-width: 100%;
  margin-bottom: 8px;
  font-size: 12.5px;
}

.bottom-trust-baseline a {
  color: var(--accent-terracotta);
  text-decoration: underline;
  font-weight: 600;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .master-layout-wrapper {
    grid-template-columns: 240px 1fr;
  }
  .sidebar-header-panel {
    width: 240px;
    padding: 20px 14px;
  }
  .content-inner-wrapper {
    padding: 30px 24px;
  }
  .cards-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .mega-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .master-layout-wrapper {
    display: flex;
    flex-direction: column;
  }
  .sidebar-header-panel {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: var(--border-bold);
    padding: 20px;
  }
  .mobile-nav-toggle {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
  }
  .nav-directory-tree {
    display: none;
  }
  .nav-directory-tree.mobile-open {
    display: flex;
  }
  .hero-editorial-section {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .cards-grid-3, .cards-grid-2, .cards-grid-4 {
    grid-template-columns: 1fr;
  }
  .editorial-card:nth-child(even) {
    transform: none;
  }
  .stat-matrix-block {
    grid-template-columns: repeat(2, 1fr);
  }
  .mega-footer-grid {
    grid-template-columns: 1fr;
  }
  .content-inner-wrapper {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .stat-matrix-block {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid #CBD5E1;
    padding-bottom: 12px;
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .btn-cta, .btn-cta-secondary {
    width: 100%;
  }
}
