/* ============================================
   Nonprofit Alliance of Homelessness & Housing
   Providers of Alameda County — Website Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-charcoal: #2D3439;
  --color-red: #CF4520;
  --color-red-dark: #B53A1A;
  --color-red-light: rgba(207, 69, 32, 0.08);
  --color-warm-white: #FAFAF8;
  --color-light-gray: #F2F0ED;
  --color-mid-gray: #8A8A87;
  --color-border: #E0DDD8;
  --color-white: #FFFFFF;

  --font-display: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Source Serif 4', 'Georgia', serif;

  --max-width: 1120px;
  --header-height: 72px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background-color: var(--color-warm-white);
  line-height: 1.7;
  font-size: 17px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-red);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-red-dark);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-charcoal);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  letter-spacing: -0.01em;
}

p {
  max-width: 680px;
}

.purpose-section__inner p,
.content-block p {
  max-width: 100%;
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 96px 0;
}

.section--light {
  background: var(--color-light-gray);
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

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

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-warm-white);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 250, 248, 0.92);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--color-charcoal);
}

.header-logo img {
  height: 64px;
  width: auto;
}

.header-logo span {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.3;
  max-width: 560px;
  color: var(--color-charcoal);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.header-logo:hover span {
  border-bottom-color: var(--color-red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-charcoal);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-red);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--color-red);
}

/* Mobile hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-charcoal);
}

/* --- Hero Section --- */
.hero {
  padding: 64px 0 48px;
  text-align: center;
}

.hero__logo {
  width: 260px;
  height: auto;
  margin: 0 auto 40px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero h1 .accent {
  color: var(--color-red);
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--color-mid-gray);
  max-width: 620px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 14px 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}

.btn--primary {
  background: var(--color-red);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-red-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(207, 69, 32, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--color-charcoal);
  border: 2px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-charcoal);
  color: var(--color-charcoal);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Pillars / Feature Cards --- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
}

.pillar-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 40px 32px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.pillar-card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-red-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.pillar-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-red);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pillar-card h3 {
  margin-bottom: 12px;
}

.pillar-card p {
  color: var(--color-mid-gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Purpose Statement Section --- */
.purpose-section {
  padding: 96px 0 48px;
}

.purpose-section__inner {
  max-width: 760px;
  margin: 0 auto;
}

.purpose-section h2 {
  margin-bottom: 32px;
  text-align: center;
}

.purpose-section blockquote {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--color-charcoal);
  border-left: 3px solid var(--color-red);
  padding-left: 28px;
  margin: 32px 0;
  max-width: 100%;
}

.purpose-goals {
  list-style: none;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.purpose-goals li {
  padding-left: 28px;
  position: relative;
  line-height: 1.75;
}

.purpose-goals li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-red);
  opacity: 0.7;
}

/* --- Founding Members --- */
.members-section {
  padding: 48px 0 96px;
}

.members-section h2 {
  text-align: center;
  margin-bottom: 12px;
}

.members-section__subtitle {
  text-align: center;
  color: var(--color-mid-gray);
  margin: 0 auto 56px;
  font-size: 1.05rem;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.member-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  text-decoration: none;
  color: var(--color-charcoal);
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
}

.member-card__logo {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.member-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.member-card__logo--placeholder {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-red);
}

.member-card h4 {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

/* --- Dues Table --- */
.dues-table-wrapper {
  overflow-x: auto;
  margin-top: 40px;
}

.dues-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.dues-table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  text-align: left;
  padding: 16px 20px;
  background: var(--color-charcoal);
  color: var(--color-white);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dues-table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.dues-table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.dues-table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.dues-table tbody tr:nth-child(even) {
  background: var(--color-light-gray);
}

.dues-table tbody tr:hover {
  background: var(--color-red-light);
}

/* --- Contact / Get Involved --- */
.contact-section {
  padding: 96px 0;
  text-align: center;
}

.contact-section h2 {
  margin-bottom: 20px;
}

.contact-section p {
  margin: 0 auto 40px;
  color: var(--color-mid-gray);
  font-size: 1.05rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 48px;
  text-align: left;
}

.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 40px 32px;
}

.contact-card h3 {
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--color-mid-gray);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-charcoal);
  color: rgba(255, 255, 255, 0.6);
  padding: 48px 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-inner p {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

.footer-links a:hover {
  color: var(--color-white);
}

/* --- Divider --- */
.section-divider {
  width: 48px;
  height: 3px;
  background: var(--color-red);
  border: none;
  margin: 0 auto 32px;
  border-radius: 2px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .pillars {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .members-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-warm-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 24px 32px;
    gap: 20px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding: 40px 0 40px;
  }

  .hero__logo {
    width: 180px;
  }

  .section {
    padding: 56px 0;
  }

  /* Header: let text fill available space naturally */
  .header-logo span {
    font-size: 0.68rem;
    max-width: 220px;
    letter-spacing: 0.02em;
  }

  /* Hide forced line break — let text wrap naturally on small screens */
  .header-logo span br {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  /* Hide nav links, show only email */
  .footer-links li:not(:first-child) {
    display: none;
  }

  /* Reorder: email first, copyright second */
  .footer-links {
    order: -1;
  }

  /* Prepend "Contact us: " before the email link */
  .footer-links li:first-child::before {
    content: 'Contact us: ';
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
  }
}

@media (max-width: 480px) {
  .members-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    padding: 0 20px;
  }

  .header-inner {
    padding: 0 20px;
  }

  h1 {
    font-size: 1.9rem;
  }
}
