/* ===================================================
   Riverkeep — River Calder Charity
   Palette: deep river blue, soft slate, river-glass green,
            warm pebble cream, clean white
   =================================================== */

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

/* ---------- Custom properties ---------- */
:root {
  --river:    #1A4A6B;   /* deep river blue */
  --current:  #2A7B9B;   /* mid blue */
  --ripple:   #4AADBB;   /* bright teal */
  --moss:     #4A7C59;   /* river-bank green */
  --pebble:   #F0EBE3;   /* warm cream */
  --foam:     #FFFFFF;
  --ink:      #1A2630;
  --muted:    #5A6A74;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Source Sans 3', system-ui, sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  --max-w: 1100px;
  --radius: 4px;
}

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

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

body {
  font-family: var(--ff-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--foam);
  line-height: 1.7;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  line-height: 1.15;
  color: var(--river);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { max-width: 68ch; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--river);
  color: var(--foam);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ===================================================
   NAVIGATION
   =================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--river);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foam);
  letter-spacing: 0.02em;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--ripple); }

.nav-cta {
  background: var(--ripple);
  color: var(--river) !important;
  padding: 0.45rem 1.1rem;
  border-radius: 2px;
  font-weight: 700 !important;
  transition: background 0.2s, color 0.2s !important;
}
.nav-cta:hover, .nav-cta:focus-visible {
  background: var(--foam) !important;
  color: var(--river) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--foam);
  transition: transform 0.3s, opacity 0.2s;
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--river);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.45rem 0; font-size: 1rem; }
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1502082553048-f009c37129b9?w=1400&h=900&fit=crop');
  background-size: cover;
  background-position: center 40%;
  filter: brightness(0.38);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-xl);
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ripple);
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--foam);
  max-width: 14ch;
  margin-bottom: 1.2rem;
}

.hero-sub {
  color: rgba(255,255,255,0.78);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 300;
  max-width: 50ch;
  margin-bottom: 2.2rem;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--ripple);
  color: var(--river);
  border-color: var(--ripple);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--foam);
  color: var(--river);
  border-color: var(--foam);
}

.btn-outline {
  background: transparent;
  color: var(--foam);
  border-color: rgba(255,255,255,0.55);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: rgba(255,255,255,0.12);
  border-color: var(--foam);
}

.btn-green {
  background: var(--moss);
  color: var(--foam);
  border-color: var(--moss);
}
.btn-green:hover, .btn-green:focus-visible {
  background: #3a6348;
  border-color: #3a6348;
}

.btn-river {
  background: var(--river);
  color: var(--foam);
  border-color: var(--river);
}
.btn-river:hover, .btn-river:focus-visible {
  background: #123550;
  border-color: #123550;
}

/* Wave divider */
.wave {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.wave svg { display: block; }

/* ===================================================
   MISSION STRIP
   =================================================== */
.mission-strip {
  background: var(--river);
  color: var(--foam);
  padding-block: var(--space-lg);
}

.mission-strip h2 { color: var(--foam); margin-bottom: 1rem; }
.mission-strip p { color: rgba(255,255,255,0.78); font-size: 1.1rem; max-width: 62ch; }

.mission-strip .stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: 2.5rem;
}

.stat-block {
  flex: 1;
  min-width: 150px;
  border-left: 3px solid var(--ripple);
  padding-left: 1rem;
}

.stat-block strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 2rem;
  color: var(--ripple);
  line-height: 1;
}

.stat-block span {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===================================================
   WHY IT MATTERS
   =================================================== */
.why-section {
  padding-block: var(--space-xl);
  background: var(--pebble);
}

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ripple);
  margin-bottom: 0.6rem;
}

.why-section h2 { margin-bottom: 1.2rem; }
.why-section > .container > p { font-size: 1.1rem; color: var(--muted); margin-bottom: var(--space-lg); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.why-card {
  background: var(--foam);
  border-radius: 6px;
  padding: 1.8rem 1.6rem;
  border-top: 4px solid var(--ripple);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.why-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(74,173,187,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.why-card .icon svg { width: 22px; height: 22px; color: var(--current); }

.why-card h3 { color: var(--river); margin-bottom: 0.5rem; }
.why-card p { font-size: 0.95rem; color: var(--muted); max-width: 100%; }

/* ===================================================
   HOW WE WORK (steps)
   =================================================== */
.how-section {
  padding-block: var(--space-xl);
  background: var(--foam);
}

.how-section h2 { margin-bottom: var(--space-lg); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--ripple), var(--moss));
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 1rem;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--river);
  color: var(--foam);
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 1.2rem;
  border: 4px solid var(--foam);
  box-shadow: 0 0 0 2px var(--river);
}

.step h3 { color: var(--river); margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--muted); max-width: 100%; margin-inline: auto; }

/* ===================================================
   VOLUNTEER
   =================================================== */
.volunteer-section {
  padding-block: var(--space-xl);
  background: var(--pebble);
}

.volunteer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.volunteer-image {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  aspect-ratio: 4/3;
}

.volunteer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.volunteer-text .section-label { margin-bottom: 0.6rem; }
.volunteer-text h2 { margin-bottom: 1rem; }
.volunteer-text p { color: var(--muted); margin-bottom: 1.5rem; max-width: 100%; }

.role-list {
  list-style: none;
  margin-bottom: 2rem;
}
.role-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--river);
  margin-bottom: 0.5rem;
}
.role-list li::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss);
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .volunteer-inner { grid-template-columns: 1fr; }
  .volunteer-image { max-height: 260px; }
}

/* ===================================================
   DONATE
   =================================================== */
.donate-section {
  padding-block: var(--space-xl);
  background: var(--river);
  color: var(--foam);
  text-align: center;
}

.donate-section h2 { color: var(--foam); margin-bottom: 0.75rem; }
.donate-section > .container > p {
  color: rgba(255,255,255,0.72);
  margin-inline: auto;
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.donate-amounts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.amount-btn {
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  color: var(--foam);
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.amount-btn:hover, .amount-btn.active {
  background: var(--ripple);
  border-color: var(--ripple);
  color: var(--river);
}

.donate-note {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1.5rem;
  max-width: 100%;
  margin-inline: auto;
}

/* ===================================================
   CONTACT / VOLUNTEER FORM
   =================================================== */
.contact-section {
  padding-block: var(--space-xl);
  background: var(--foam);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-lg);
  align-items: start;
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info p { color: var(--muted); margin-bottom: 1.5rem; max-width: 100%; }

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.contact-detail svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ripple); margin-top: 3px; }

.contact-form-card {
  background: var(--pebble);
  border-radius: 6px;
  padding: 2rem 2rem 2.2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--river);
  letter-spacing: 0.03em;
}

.field input,
.field select,
.field textarea {
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #C8D8E0;
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--foam);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--current);
  box-shadow: 0 0 0 3px rgba(42,123,155,0.15);
}

.field textarea { resize: vertical; min-height: 110px; }

.form-submit { width: 100%; margin-top: 0.5rem; }

.form-msg {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
}
.form-msg.success { background: #d4edda; color: #155724; }
.form-msg.error   { background: #f8d7da; color: #721c24; }

@media (max-width: 720px) {
  .contact-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===================================================
   NEWSLETTER
   =================================================== */
.newsletter-section {
  padding-block: var(--space-md) var(--space-lg);
  background: var(--current);
  color: var(--foam);
}

.newsletter-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.newsletter-text h3 { color: var(--foam); font-size: 1.4rem; margin-bottom: 0.3rem; }
.newsletter-text p { color: rgba(255,255,255,0.7); max-width: 45ch; font-size: 0.95rem; }

.newsletter-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 1;
  max-width: 440px;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.newsletter-form input[type="email"]:focus {
  outline: 2px solid var(--ripple);
  outline-offset: 2px;
}

.newsletter-form button {
  padding: 0.7rem 1.4rem;
  background: var(--river);
  color: var(--foam);
  border: none;
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: #123550; }

#newsletter-msg {
  display: none;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--ripple);
  font-weight: 600;
  width: 100%;
}

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.55);
  padding-block: var(--space-lg) var(--space-md);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-brand .nav-logo { margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; max-width: 34ch; }

.footer-col h4 {
  font-family: var(--ff-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.8rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--ripple); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: var(--ripple); }

@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ===================================================
   SCROLL REVEAL
   =================================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}
