/* ============================================================
   THE REFUGE HOUSE FOUNDATION — Global Stylesheet
   Aesthetic: Warm, organic, editorial — sanctuary meets hope
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

:root {
  --cream:       #faf7f2;
  --warm-white:  #fffdf9;
  --sand:        #e8dece;
  --tan:         #c9b89a;
  --sienna:      #8b6247;
  --forest:      #3d5a44;
  --forest-dark: #2c4232;
  --gold:        #c9963a;
  --charcoal:    #2e2e2e;
  --mid-gray:    #666;
  --light-gray:  #999;
  --border:      #ddd4c4;
  --shadow:      rgba(60, 40, 20, 0.10);
  --nav-height:  70px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
  color: var(--charcoal);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }

p { color: var(--charcoal); margin-bottom: 1.2em; }
a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--gold); }

strong { font-weight: 700; }

/* ── NAVIGATION ─────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px var(--shadow);
}

.nav-inner {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--sand); color: var(--forest-dark); }
.nav-links a.active { color: var(--forest); }

.nav-links .btn-donate {
  background: var(--forest);
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  transition: background 0.2s;
}
.nav-links .btn-donate:hover { background: var(--forest-dark); }

/* hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--forest-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.squarespace-cdn.com/content/v1/5d0acea0eb994700019ad44c/402e2a9a-b83e-4701-8ca6-a60ef74e6e9e/warm-rooms-homepolish-3.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.45;
  transform: scale(1.04);
  animation: slowZoom 16s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.10); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(30,50,35,0.55) 0%,
    rgba(30,50,35,0.30) 50%,
    rgba(30,50,35,0.65) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 780px;
  padding: 3rem 2rem;
  animation: fadeUp 1s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(201,150,58,0.5);
  padding-bottom: 0.4rem;
}

.hero-content h1 {
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-content p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  max-width: 580px;
  margin: 0 auto 2rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.22s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-primary:hover { background: #b5852e; border-color: #b5852e; color: #fff; }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

.btn-forest {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.btn-forest:hover { background: var(--forest-dark); border-color: var(--forest-dark); color: #fff; }

/* ── PAGE HERO (inner pages) ────────────────────────────── */
.page-hero {
  background: var(--forest-dark);
  padding: 5rem 2rem 4rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .eyebrow {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.8rem;
}
.page-hero h1 { color: #fff; position: relative; }
.page-hero p {
  color: rgba(255,255,255,0.80);
  max-width: 580px;
  margin: 1rem auto 0;
  font-size: 1.1rem;
  font-weight: 300;
  position: relative;
}

/* Optional hero image for inner pages */
.page-hero-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

/* ── SECTION WRAPPERS ───────────────────────────────────── */
.section {
  padding: 5rem 2rem;
}
.section-alt {
  background: var(--warm-white);
}
.section-dark {
  background: var(--forest-dark);
  color: #fff;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,0.82); }

.container {
  max-width: 900px;
  margin: 0 auto;
}
.container-wide {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── SECTION LABEL ──────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

/* ── DIVIDER ────────────────────────────────────────────── */
.divider {
  width: 52px;
  height: 3px;
  background: var(--gold);
  margin: 1.4rem 0;
  border-radius: 2px;
}
.divider-center { margin: 1.4rem auto; }

/* ── CARD GRID ──────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
  margin-top: 3rem;
}

.card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover { box-shadow: 0 8px 32px var(--shadow); transform: translateY(-3px); }
.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.6rem; font-size: 1.15rem; }
.card p { font-size: 0.95rem; color: var(--mid-gray); margin: 0; }

/* ── RULE LIST ──────────────────────────────────────────── */
.rule-list {
  list-style: none;
  counter-reset: rules;
  margin-top: 2rem;
}
.rule-list li {
  counter-increment: rules;
  display: flex;
  gap: 1.4rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.5s ease both;
}
.rule-list li:last-child { border-bottom: none; }

.rule-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--forest);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 2px;
}

/* ── AMENITIES / INCLUDED LIST ──────────────────────────── */
.check-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem 1.5rem;
  margin: 1.5rem 0;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.97rem;
}
.check-list li::before {
  content: '✓';
  color: var(--forest);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── FAQ ACCORDION ──────────────────────────────────────── */
.accordion { margin-top: 2rem; }
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.3rem 0;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--charcoal);
  user-select: none;
}
.accordion-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.accordion-item[open] summary::after { transform: rotate(45deg); }
.accordion-item p { padding: 0 0 1.3rem; color: var(--mid-gray); font-size: 0.97rem; }

/* ── CONTACT FORM ───────────────────────────────────────── */
.contact-form {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.8rem;
  box-shadow: 0 4px 24px var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.3rem;
}
.form-group label {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: 'Lato', sans-serif;
  font-size: 0.97rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--cream);
  color: var(--charcoal);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(61,90,68,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

/* ── RENTAL APPLICATION FORM ────────────────────────────── */
.app-section-title {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2.2rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.app-section-title:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

/* ── DONATE PAGE ────────────────────────────────────────── */
.donate-highlight {
  background: var(--forest);
  color: #fff;
  border-radius: 10px;
  padding: 2.8rem;
  text-align: center;
  margin: 2rem 0;
}
.donate-highlight h3 { color: #fff; margin-bottom: 0.8rem; }
.donate-highlight p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }

.qr-note {
  text-align: center;
  color: var(--mid-gray);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ── NOTICE BOX ─────────────────────────────────────────── */
.notice {
  border-left: 4px solid var(--gold);
  background: #fdf5e7;
  padding: 1.2rem 1.6rem;
  border-radius: 0 6px 6px 0;
  margin: 2rem 0;
}
.notice p { margin: 0; font-size: 0.97rem; }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.70);
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.footer-brand img { height: 42px; filter: brightness(0) invert(1); opacity: 0.85; }
.footer-brand p { margin-top: 1rem; font-size: 0.92rem; line-height: 1.6; max-width: 320px; }

.footer-col h4 {
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a {
  color: rgba(255,255,255,0.65);
  font-size: 0.93rem;
  transition: color 0.2s;
}
.footer-col ul a:hover { color: #fff; }

.footer-contact p {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}
.footer-contact a { color: rgba(255,255,255,0.65); }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.40);
  max-width: 1100px;
  margin: 0 auto;
}

/* ── NEWSLETTER STRIP ───────────────────────────────────── */
.newsletter-strip {
  background: var(--forest);
  padding: 3rem 2rem;
  text-align: center;
}
.newsletter-strip h3 { color: #fff; margin-bottom: 0.5rem; }
.newsletter-strip p { color: rgba(255,255,255,0.80); margin-bottom: 1.5rem; font-size: 0.97rem; }
.newsletter-form {
  display: flex;
  gap: 0.7rem;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  outline: none;
}
.newsletter-form button {
  padding: 0.75rem 1.4rem;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: #b5852e; }

/* ── FEATURE ROW ─────────────────────────────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-img {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px var(--shadow);
}
.feature-img img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.feature-img:hover img { transform: scale(1.03); }

/* ── POPULATION TAGS ────────────────────────────────────── */
.population-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.pop-tag {
  background: var(--sand);
  color: var(--forest-dark);
  font-size: 0.87rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  border: 1px solid var(--tan);
}

/* ── HIGHLIGHT STAT ─────────────────────────────────────── */
.stat-row {
  display: flex;
  gap: 2.5rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
}
.stat-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-top: 0.3rem;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .feature-row, .feature-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 2.5rem;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --nav-height: 62px; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--warm-white);
    flex-direction: column;
    padding: 1.5rem 2rem 2rem;
    border-bottom: 2px solid var(--border);
    box-shadow: 0 8px 24px var(--shadow);
    gap: 0.2rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.9rem; padding: 0.7rem 0.8rem; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .newsletter-form { flex-direction: column; }
  .hero { min-height: 70vh; }
  .contact-form { padding: 1.8rem; }
  .section { padding: 3.5rem 1.5rem; }
  .page-hero { padding: 3.5rem 1.5rem 3rem; }
}
