/* ==============================================================================
   Upper Miramichi Non-Profit Housing (UMNPH)
   Timeless, Clean, Warm Aesthetic for a Rural Community Non-Profit
   ============================================================================== */

:root {
  /* Warm, organic, timeless palette */
  --color-bg: #f8f6f0;
  --color-surface: #ffffff;
  --color-surface-subtle: #f2eee5;
  --color-border: #e2dcd2;
  --color-border-hover: #c9bfb0;

  --color-forest: #234338;
  --color-forest-dark: #162c25;
  --color-forest-light: #eaf0ec;
  --color-cedar: #8c603e;

  --color-text-main: #242b27;
  --color-text-muted: #5e6962;
  --color-text-light: #7c8880;

  /* Typography */
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows & Radii */
  --shadow-subtle: 0 2px 12px rgba(35, 67, 56, 0.06);
  --shadow-card: 0 10px 30px -10px rgba(35, 67, 56, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==============================================================================
   Top Masthead / Header
   ============================================================================== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
}

.header-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-forest-dark);
  letter-spacing: -0.01em;
}

.brand-location {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.header-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-forest);
  background: var(--color-forest-light);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(35, 67, 56, 0.15);
}

/* ==============================================================================
   Hero Section with Natural Image & Timeless Overlay
   ============================================================================== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  padding: 4rem 1.5rem;
}

/* Soft, natural vignette overlay for readability without harsh dark mode */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(22, 44, 37, 0.55) 0%,
    rgba(22, 44, 37, 0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 840px;
  text-align: center;
  color: #ffffff;
}

.hero-pretitle {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d1dfd8;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: #e5ede8;
  max-width: 680px;
  margin: 0 auto;
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* ==============================================================================
   Main Content Layout
   ============================================================================== */
.main-wrapper {
  max-width: 1080px;
  margin: -2.5rem auto 4rem auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 3;
  width: 100%;
}

.content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 3rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 3.5rem;
}

/* Editorial Content Column */
.about-col h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-forest-dark);
  margin-bottom: 1.15rem;
  letter-spacing: -0.01em;
}

.about-col p {
  color: var(--color-text-main);
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about-col p.lead {
  font-size: 1.12rem;
  color: var(--color-forest);
  font-weight: 500;
}

.pillars-box {
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface-subtle);
  border-left: 3px solid var(--color-forest);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.pillars-box h3 {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-forest-dark);
  margin-bottom: 0.5rem;
}

.pillars-box ul {
  list-style: none;
}

.pillars-box li {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pillars-box li::before {
  content: "•";
  color: var(--color-cedar);
  font-size: 1.25rem;
  line-height: 1;
}

/* Sidebar / Quick Info Column */
.info-col {
  border-left: 1px solid var(--color-border);
  padding-left: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-block h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-forest-dark);
  margin-bottom: 0.65rem;
}

.info-block p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 0.5rem;
}

.meta-table tr {
  border-bottom: 1px solid var(--color-surface-subtle);
}

.meta-table tr:last-child {
  border-bottom: none;
}

.meta-table th {
  text-align: left;
  padding: 0.6rem 0;
  font-weight: 500;
  color: var(--color-text-light);
  width: 35%;
}

.meta-table td {
  padding: 0.6rem 0;
  color: var(--color-text-main);
  font-weight: 500;
}

/* ==============================================================================
   Email & Contact Details (Rot13 Scraper Resistant)
   ============================================================================== */
.contact-box {
  background: var(--color-forest-light);
  border: 1px solid rgba(35, 67, 56, 0.15);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
}

.contact-box h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-forest-dark);
  margin-bottom: 0.4rem;
}

.contact-box p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.85rem;
}

/* Rot13 contact link */
#contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-forest-dark);
  text-decoration: underline;
  text-decoration-color: rgba(35, 67, 56, 0.4);
  text-underline-offset: 3px;
  font-size: 1rem;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

#contact-email:hover {
  color: var(--color-cedar);
  text-decoration-color: var(--color-cedar);
}

/* Fallback state when JavaScript is disabled */
.email-nocopy {
  color: var(--color-text-light) !important;
  font-style: italic;
  font-size: 0.9rem !important;
  text-decoration: none !important;
}

/* ==============================================================================
   Footer
   ============================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  font-size: 0.88rem;
  color: var(--color-text-light);
}

.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==============================================================================
   Responsive Breakpoints
   ============================================================================== */
@media (max-width: 860px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .info-col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
  }

  .content-card {
    padding: 2rem 1.5rem;
  }

  .hero-section {
    padding: 3rem 1.25rem;
    min-height: 380px;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
}
