/* ============================================
   Reimagine Housing Society — Design System
   Trustworthy · Institutional · Warm
   ============================================ */

:root {
  --navy: #16283b;
  --navy-light: #24405e;
  --forest: #2e5245;
  --gold: #b98a2e;
  --gold-light: #d4aa4f;
  --cream: #faf7f1;
  --sand: #f0eadf;
  --ink: #24292f;
  --ink-soft: #4d5560;
  --white: #ffffff;
  --border: #e3ddd2;
  --radius: 10px;
  --shadow: 0 2px 20px rgba(22, 40, 59, 0.09);
  --shadow-lg: 0 10px 40px rgba(22, 40, 59, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3, h4, .serif {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
}

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

a { color: var(--forest); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 241, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem; font-weight: 700; color: var(--navy); line-height: 1.15;
}
.brand-name span { display: block; font-family: 'Inter', sans-serif; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; font-weight: 500;
  padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.main-nav a:hover { color: var(--navy); }
.main-nav a.active { color: var(--navy); border-bottom-color: var(--gold); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.7rem; color: var(--navy); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 13px 28px; border-radius: 6px; transition: transform .15s, box-shadow .15s, background .2s;
  font-family: 'Inter', sans-serif; cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-light); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); padding: 11px 26px; }
.btn-outline-light { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.7); padding: 11px 26px; }
.btn-lg { padding: 16px 38px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--white);
  background: linear-gradient(rgba(22,40,59,.72), rgba(22,40,59,.82)), var(--hero-img, var(--navy)) center/cover no-repeat;
  padding: 110px 0 120px;
}
.hero .eyebrow { color: var(--gold-light); }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 780px; margin-bottom: 22px; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 640px; color: rgba(255,255,255,.88); margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section.block { padding: 84px 0; }
section.block-tight { padding: 56px 0; }
.bg-white { background: var(--white); }
.bg-sand { background: var(--sand); }
.bg-navy { background: var(--navy); color: rgba(255,255,255,.88); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-forest { background: var(--forest); color: rgba(255,255,255,.9); }
.bg-forest h2, .bg-forest h3 { color: var(--white); }

.eyebrow {
  display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 16px; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Grids & Cards ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card img { height: 210px; object-fit: cover; width: 100%; }
.card-body { padding: 26px; flex: 1; }
.card-body h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card-body p { color: var(--ink-soft); font-size: 0.96rem; }
.card-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--forest); background: var(--sand);
  padding: 4px 12px; border-radius: 20px; margin-bottom: 14px;
}

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat .num { font-family: 'Fraunces', Georgia, serif; font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; color: var(--gold-light); }
.stat .label { font-size: 0.88rem; letter-spacing: .04em; opacity: .85; margin-top: 6px; }

/* ---------- Model chips (micro communities) ---------- */
.model {
  background: var(--white); border-left: 5px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px 30px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.model h3 { font-size: 1.3rem; margin-bottom: 8px; }
.model .model-kind { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--forest); }
.model p { color: var(--ink-soft); font-size: .98rem; margin-top: 8px; }

/* ---------- Population cards ---------- */
.pop-card {
  background: var(--white); border-radius: var(--radius); border-top: 5px solid var(--forest);
  padding: 32px 28px; box-shadow: var(--shadow);
}
.pop-card .icon { font-size: 2rem; margin-bottom: 14px; }
.pop-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.pop-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; border-left: 3px solid var(--gold); padding-left: 32px; }
.timeline li { position: relative; padding-bottom: 30px; }
.timeline li::before {
  content: ''; position: absolute; left: -41px; top: 6px; width: 15px; height: 15px;
  background: var(--gold); border-radius: 50%; border: 3px solid var(--cream);
}
.timeline .when { font-weight: 700; color: var(--navy); font-family: 'Fraunces', Georgia, serif; font-size: 1.05rem; }
.timeline p { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Fundraising ---------- */
.goal-band { text-align: center; }
.goal-amount { font-family: 'Fraunces', Georgia, serif; font-size: clamp(3rem, 7vw, 5rem); font-weight: 700; color: var(--gold-light); line-height: 1; }
.progress-track { background: rgba(255,255,255,.18); border-radius: 30px; height: 14px; max-width: 560px; margin: 30px auto 10px; overflow: hidden; }
.progress-fill { background: var(--gold); height: 100%; border-radius: 30px; }

.give-tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.give-tier {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 16px; text-align: center; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.give-tier:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.give-tier .amount { font-family: 'Fraunces', Georgia, serif; font-size: 1.85rem; font-weight: 700; color: var(--gold); line-height: 1.1; }
.give-tier h4 { margin: 8px 0 8px; font-size: .98rem; }
.give-tier p { font-size: .84rem; color: var(--ink-soft); line-height: 1.45; margin-top: auto; }
.give-tier.featured { border-top: 3px solid var(--gold); }

/* ---------- Figure / image treatments ---------- */
.figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure figcaption { background: var(--white); padding: 14px 20px; font-size: .85rem; color: var(--ink-soft); border-top: 3px solid var(--gold); }

.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo-strip img { height: 190px; width: 100%; object-fit: cover; border-radius: 8px; }

/* ---------- Callout / quote ---------- */
.callout {
  border-left: 5px solid var(--gold); background: var(--white); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 34px 38px; box-shadow: var(--shadow); font-size: 1.15rem;
  font-family: 'Fraunces', Georgia, serif; color: var(--navy); font-style: italic;
}
.callout .attribution { display: block; margin-top: 14px; font-family: 'Inter', sans-serif; font-style: normal; font-size: .88rem; color: var(--ink-soft); }

/* ---------- Fact table ---------- */
.fact-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.fact-table th, .fact-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--border); font-size: .95rem; }
.fact-table th { background: var(--navy); color: var(--white); font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: .03em; }
.fact-table tr:last-child td { border-bottom: none; }
.fact-table td:first-child { font-weight: 600; color: var(--navy); width: 38%; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; }
.cta-band p { max-width: 620px; margin: 0 auto 34px; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 64px 0 32px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 44px; }
.site-footer h4 { color: var(--white); font-family: 'Inter', sans-serif; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: rgba(255,255,255,.55); }

.fineprint { font-size: .8rem; color: var(--ink-soft); margin-top: 28px; }

/* ---------- Membership form ---------- */
.member-form {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 34px 30px; box-shadow: var(--shadow);
}
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-weight: 600; color: var(--navy); font-size: .92rem; margin-bottom: 7px; }
.member-form input, .member-form textarea {
  width: 100%; font-family: 'Inter', sans-serif; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--cream);
  transition: border-color .2s, box-shadow .2s;
}
.member-form input:focus, .member-form textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185, 138, 46, .15); background: var(--white);
}
.member-form textarea { resize: vertical; }
.form-check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 24px; }
.form-check input { margin-top: 5px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--gold); }
.form-check label { font-size: .92rem; color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .give-tiers { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); flex-direction: column; gap: 0; padding: 10px 24px 20px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; align-items: flex-start; }
  .main-nav a { padding: 12px 0; width: 100%; }
  .nav-toggle { display: block; }
  .grid-3, .grid-4, .photo-strip { grid-template-columns: 1fr; }
  .give-tiers { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 80px 0 90px; }
  section.block { padding: 60px 0; }
}
