/* Affinity Plus Credit — green and white theme.
   Bright green #77bc48 leads; deeper green for buttons/tabs; clean white backgrounds.
   No purple anywhere in the design (the logo keeps its own colours, unchanged). */

:root {
  --green: #77bc48;
  --green-deep: #4c8a24;
  --green-deeper: #3c6e1c;
  --green-soft: #eef7e6;
  --green-border: #cfe8bd;
  --ink: #1d2b16;
  --muted: #5c6b52;
  --white: #ffffff;
  --error: #b3261e;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--green);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.brand-name { font-weight: 800; font-size: 1.15rem; color: var(--green-deeper); }
.admin-link { color: var(--green-deep); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.admin-link:hover { text-decoration: underline; }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
  color: var(--white);
  padding: 44px 0 38px;
  text-align: center;
}
.hero h1 { margin: 0 0 10px; font-size: 2rem; line-height: 1.2; }
.hero-sub { margin: 0 auto 20px; max-width: 560px; font-size: 1.05rem; }
.benefits {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.benefits li {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 999px; padding: 6px 14px; font-size: 0.92rem; font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--green-deep); color: var(--white);
  border: none; border-radius: 10px;
  padding: 13px 26px; font-size: 1rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--green-deeper); }
.btn-hero { background: var(--white); color: var(--green-deeper); font-size: 1.08rem; padding: 14px 34px; }
.btn-hero:hover { background: var(--green-soft); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-light { background: var(--white); color: var(--green-deeper); border: 2px solid var(--green); }
.btn-light:hover { background: var(--green-soft); }
.btn-danger { background: var(--white); color: var(--error); border: 2px solid var(--error); padding: 8px 16px; font-size: 0.9rem; }
.btn-danger:hover { background: #fdecea; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Sections */
.section { padding: 30px 16px 6px; }
.section h2 { color: var(--green-deeper); margin-top: 0; }

.steps { display: grid; gap: 14px; }
.step { background: var(--green-soft); border: 1px solid var(--green-border); border-radius: var(--radius); padding: 16px; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: var(--white);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px; font-size: 1.05rem;
}
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; color: var(--muted); }

/* Cards (services + loan options) */
.cards { display: grid; gap: 14px; }
.card { background: var(--white); border: 1.5px solid var(--green-border); border-radius: var(--radius); padding: 18px; }
.card h3 { margin: 0 0 6px; color: var(--green-deeper); }
.card p { margin: 0 0 12px; color: var(--muted); }
.card-link { color: var(--green-deep); font-weight: 700; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* Community outreach box */
.care-box { background: var(--green-soft); border: 2px solid var(--green); border-radius: var(--radius); padding: 18px; }
.care-box p { color: var(--muted); }

/* Stats strip */
.stats-strip { background: var(--green-deep); color: var(--white); margin-top: 34px; padding: 22px 0; }
.stats-inner { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-around; text-align: center; }
.stat { display: grid; gap: 2px; }
.stat-num { font-size: 1.8rem; font-weight: 800; }
.stat-label { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.needs-box { background: var(--white); border: 2px solid var(--green); border-radius: var(--radius); padding: 18px; }
.needs { margin: 0; padding-left: 20px; }
.needs li { margin-bottom: 8px; }
.note { color: var(--muted); font-size: 0.93rem; }
.hint { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; margin-top: 2px; }

/* Form */
form { display: grid; gap: 18px; }
fieldset { border: 1px solid var(--green-border); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; margin: 0; }
legend { font-weight: 800; color: var(--green-deeper); padding: 0 6px; }
label { display: block; font-weight: 600; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"],
input[type="password"], select, textarea {
  width: 100%; margin-top: 5px; padding: 11px 12px;
  border: 1.5px solid var(--green-border); border-radius: 9px;
  font: inherit; font-weight: 400; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
input[type="file"] { display: block; margin-top: 6px; font-weight: 400; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green-deep); }

.error { color: var(--error); font-weight: 600; background: #fdecea; border: 1px solid #f3c2bf; border-radius: 9px; padding: 10px 12px; }
.success { background: var(--green-soft); border: 2px solid var(--green); border-radius: var(--radius); padding: 18px; }
.success h3 { margin-top: 0; color: var(--green-deeper); }

/* Footer */
.site-footer { border-top: 3px solid var(--green); margin-top: 36px; padding: 18px 0 26px; background: var(--green-soft); }
.site-footer p { margin: 4px 0; }

/* Admin */
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar-actions { display: flex; gap: 8px; }
.counts { font-weight: 700; color: var(--green-deeper); margin: 0; }
.reg-card { border: 1.5px solid var(--green-border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: var(--white); }
.reg-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; cursor: pointer; }
.reg-title { font-weight: 800; }
.reg-meta { color: var(--muted); font-size: 0.92rem; }
.badge { background: var(--green); color: var(--white); border-radius: 999px; padding: 2px 12px; font-size: 0.82rem; font-weight: 700; }
.reg-details { margin-top: 12px; border-top: 1px dashed var(--green-border); padding-top: 12px; display: grid; gap: 6px; }
.reg-details p { margin: 0; }
.doc-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.doc-list a { color: var(--green-deep); font-weight: 600; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.status-row select { width: auto; margin-top: 0; }

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2.5rem; }
}

/* Header links */
.header-links { display: flex; gap: 18px; align-items: center; }

/* Hero with photo */
.hero-photo {
  background:
    linear-gradient(160deg, rgba(76, 138, 36, 0.38) 0%, rgba(60, 110, 28, 0.55) 100%),
    url('/assets/barbados-town.jpg') center / cover no-repeat;
}
.hero-photo h1, .hero-photo .hero-sub { text-shadow: 0 1px 10px rgba(30, 60, 10, 0.55); }
.hero-photo h1 { animation: hero-rise 0.9s ease-out both; }
.hero-photo .hero-sub { animation: hero-rise 0.9s ease-out 0.15s both; }
.hero-photo .btn-hero { animation: hero-rise 0.9s ease-out 0.3s both; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveals (motion.js adds .reveal, then .in when visible) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Card and care photos */
.card-img { width: 100%; height: 170px; object-fit: cover; border-radius: 9px; margin-bottom: 12px; display: block; }
.care-img { width: 100%; height: 220px; object-fit: cover; border-radius: 9px; margin-bottom: 14px; display: block; }

/* Reviews slider */
.reviews { overflow: hidden; }
.review-track { display: flex; transition: transform 0.6s ease; }
.review-slide { min-width: 100%; margin: 0; padding: 20px; background: var(--green-soft); border: 1.5px solid var(--green-border); border-radius: var(--radius); }
.review-slide blockquote { margin: 0 0 10px; font-size: 1.05rem; font-style: italic; color: var(--ink); }
.review-slide figcaption { color: var(--green-deeper); font-weight: 700; font-size: 0.92rem; }
.review-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.review-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--green-deep); background: var(--white); cursor: pointer; padding: 0; }
.review-dot.active { background: var(--green-deep); }

/* Chat (customer + admin) */
.chat-box { border: 1.5px solid var(--green-border); border-radius: var(--radius); padding: 14px; background: var(--white); }
.chat-thread { display: grid; gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px; margin-bottom: 12px; }
.chat-msg { max-width: 82%; padding: 9px 12px; border-radius: 12px; }
.chat-msg p { margin: 0 0 3px; }
.chat-msg.mine { justify-self: end; background: var(--green); color: var(--white); border-bottom-right-radius: 3px; }
.chat-msg.theirs { justify-self: start; background: var(--green-soft); border: 1px solid var(--green-border); border-bottom-left-radius: 3px; }
.chat-meta { font-size: 0.76rem; opacity: 0.75; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; margin-top: 0; }
/* FAQ */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--white); border: 1.5px solid var(--green-border); border-radius: var(--radius); padding: 13px 16px; }
.faq-item summary { font-weight: 700; color: var(--green-deeper); cursor: pointer; }
.faq-item p { margin: 8px 0 2px; color: var(--ink); }

/* Loan tracking progress */
.progress { height: 12px; background: var(--green-soft); border: 1px solid var(--green-border); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--green-deep)); border-radius: 99px; transition: width 0.8s ease; }

.admin-chat { margin-top: 14px; border-top: 1px dashed var(--green-border); padding-top: 12px; }
.admin-chat h4 { margin: 0 0 8px; color: var(--green-deeper); }
