/* ==========================================================================
   1. Core Design System Variables & Posture
   ========================================================================== */
:root {
  --bg-primary:     #F8F7F4;  /* Warm Off-White Paper Stock */
  --text-primary:   #1D1D1B;  /* Deep Boardroom Charcoal */
  --text-secondary: #5F6368;  /* Muted Slate Accent */
  --border-subtle:  #E2E1DD;  /* Minimal Rule Line */
  --accent:         #1F365C;  /* Restrained Deep Navy */
  --bg-dark-block:  #1D1D1B;  
  --text-on-dark:   #F8F7F4;
  --canvas-max:     1400px;   
  --reading-max:    920px;    /* Balanced central content columns */
  --section-gap:    120px;    
  
  --font-header:    'Libre Baskerville', Georgia, serif;
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   2. Global Reset & Editorial Foundation (Editorial First)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.85; 
  letter-spacing: -0.01em;
}

/* Typography Scale */
h1, h2 {
  font-family: var(--font-header);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.3;
}

h3, h4, h5 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

p {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.85; 
  letter-spacing: -0.01em;
}

/* Utility Layout & Typographic Classes */
.container {
  width: 100%;
  max-width: var(--canvas-max);
  margin: 0 auto;
  padding: 0 40px;
}

.reading-conduit {
  max-width: var(--reading-max);
  margin-left: auto;
  margin-right: auto;
}

.text-secondary {
  color: var(--text-secondary);
}

.margin-zero {
  margin: 0;
}

.heading-large {
  font-size: 2rem;
}

.heading-medium {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: block;
  font-weight: 600;
}

section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--border-subtle);
}

section:last-of-type {
  border-bottom: none;
}

/* ==========================================================================
   3. Reusable UI Components (Restrained CTA Architecture)
   ========================================================================== */
.btn-primary {
  display: inline-block;
  background-color: var(--accent);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 14px 28px;
  border: none;
  border-radius: 0; 
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-submit {
  display: inline-block;
  background-color: var(--accent);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 16px 36px;
  border: none;
  border-radius: 0; 
  transition: opacity 0.2s ease;
  cursor: pointer;
  margin-top: 3rem;
}

.btn-submit:hover {
  opacity: 0.9;
}

/* ==========================================================================
   4. Navigation & Header Layout
   ========================================================================== */
/* Header type 1 (Header/Nav template) */
header {
  position: sticky;
  top: 0;
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background-color: rgba(248, 247, 244, 0.9); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-header);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a:hover, nav a.active {
  color: var(--text-primary);
}

nav a.nav-cta {
  color: var(--accent);
  font-weight: 500;
}

/* Header type 2 (site-nav template) */
.site-nav {
  position: sticky;
  top: 0;
  background-color: rgba(244, 243, 249, 0.95);
  border-bottom: 1px solid #E2E1DD;
  backdrop-filter: blur(8px);
  z-index: 1000;
  width: 100%;
}

.nav-container {
  width: 92%;
  max-width: var(--canvas-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  margin-left: 24px;
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a.active-link {
  font-weight: bold;
  color: #1F365C;
}

/* ==========================================================================
   5. Content Wrapper & Structure
   ========================================================================== */
main {
  width: 92%;
  max-width: var(--canvas-max);
  margin: 40px auto;
  background-color: #FFFFFF;
  border: 1px solid #E2E1DD;
  padding: 60px 80px !important;
  box-sizing: border-box;
}

/* ==========================================================================
   6. Footer Styling
   ========================================================================== */
footer {
  background-color: transparent;
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  margin-top: 3rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  text-align: left;
}

.footer-brand h5 {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.footer-creed {
  font-family: var(--font-header);
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: right;
}

/* ==========================================================================
   7. Bulletproof Responsive Mobile Engine (Mobile-First Sizing & Spacing)
   ========================================================================== */
@media screen and (max-width: 768px) {
  html {
    font-size: 15px !important; /* Slightly scale base font for mobile viewports */
  }

  body {
    padding: 0 !important;
    margin: 0 !important;
    background-color: #FFFFFF !important; /* Clean background for readability */
  }

  section {
    padding: 60px 0 !important;
  }

  /* Reset main wrapper card behavior on mobile */
  main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 40px 20px !important;
    border: none !important;
    box-shadow: none !important;
  }

  .container {
    padding: 0 20px !important;
  }

  /* Structural grids collapse to single columns */
  .case-hero, 
  .matrix-grid, 
  .concept-grid, 
  .editorial-row, 
  .grid-split,
  .meta-identity-grid,
  .ledger-row {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .editorial-row {
    padding: 24px 16px !important;
    align-items: flex-start !important;
  }

  .matrix-grid, .concept-grid {
    border-left: none !important;
  }

  .matrix-item, .concept-card {
    padding: 24px 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
  }

  .matrix-item:last-of-type, .concept-card:last-of-type {
    border-bottom: none !important;
  }

  /* Navigation 1: Header/Nav pattern mobile format */
  header {
    height: auto !important;
    position: relative !important;
  }

  header .container {
    flex-direction: column !important;
    gap: 16px !important;
    padding: 16px 20px !important;
    align-items: center !important;
  }

  nav {
    gap: 16px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  nav a {
    font-size: 0.95rem !important;
  }

  /* Navigation 2: site-nav pattern mobile format */
  .nav-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 20px !important;
  }

  .nav-links {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    margin: 0 !important;
  }

  .nav-links a {
    margin: 0 6px !important;
    font-size: 0.95rem !important;
  }

  /* Mobile Typography Scale */
  h1, .case-hero h1, .assessment-hero h1, .triage-hero h1, .insights-hero h1, .perspective-hero h1 {
    font-size: 2.1rem !important;
    line-height: 1.25 !important;
  }

  h2, .heading-large {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
  }

  p, .content-section p, .matrix-container p, .ledger-content p {
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
    max-width: 100% !important;
  }

  .section-label {
    margin-bottom: 1rem !important;
  }

  /* Footer Layout collapse */
  footer .container {
    flex-direction: column !important;
    text-align: center !important;
    gap: 16px !important;
  }

  .footer-brand, .footer-creed {
    text-align: center !important;
  }
}
