:root {
  --green-dark: #0F241D;
  --green: #1B4332;
  --gold: #C9A468;
  --gold-light: #E4CFA0;
  --cream: #FAF8F4;
  --cream-alt: #F0EEE7;
  --text: #26281F;
  --text-muted: #6B6B63;
  --border: #E3E0D6;
  --radius: 10px;
  --shadow: 0 12px 32px rgba(15, 36, 29, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--green-dark);
  margin: 0 0 0.5em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--text); }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.75em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.8em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold);
  color: var(--green-dark);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201,164,104,0.35); }
.btn-ghost {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-full { width: 100%; text-align: center; border: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(15, 36, 29, 0.07); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand-logo { height: 40px; display: block; transition: transform 0.25s ease; }
.brand:hover .brand-logo { transform: scale(1.03); }
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--green-dark);
}
.main-nav a:not(.btn) {
  position: relative;
  padding-bottom: 3px;
}
.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.main-nav a:hover { color: var(--gold); }
.main-nav a:not(.btn):hover::after { width: 100%; }
.nav-cta { padding: 0.6em 1.4em; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--green-dark);
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background-size: cover;
  background-position: center;
  min-height: 86vh;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.hero h1 { color: #fff; }
.hero-sub { font-size: 1.15rem; color: rgba(255,255,255,0.88); max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 16px; margin-top: 1.5em; flex-wrap: wrap; justify-content: center; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--cream-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(15, 36, 29, 0.12); }
.service-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--green);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}
.service-card:hover .service-icon { transform: scale(1.1) rotate(-4deg); }

/* ---------- How It Works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step-card { text-align: center; padding: 0 12px; transition: transform 0.3s ease; }
.step-card:hover { transform: translateY(-4px); }
.step-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}
.step-card:hover .step-number { transform: scale(1.12); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li {
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.contact-list span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.contact-list a { font-weight: 600; color: var(--green); font-size: 1.05rem; }

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--green-dark);
}
.optional-tag { font-weight: 400; color: var(--text-muted); }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 164, 104, 0.18);
}
.radio-row { display: flex; gap: 24px; }
.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
}
.checkbox-field { display: flex; }
.checkbox-label { align-items: flex-start; }
.checkbox-label input { margin-top: 4px; }
.checkbox-label a { text-decoration: underline; }
.form-status { font-size: 0.9rem; margin-top: 10px; min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 32px;
}
.disclaimer {
  font-size: 0.8rem;
  border-color: var(--gold);
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.05);
  margin-bottom: 32px;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
}
.footer-logo { height: 30px; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-links { display: flex; gap: 24px; font-size: 0.9rem; }
.footer-links a:hover { color: var(--gold); }
.copyright { font-size: 0.82rem; margin: 0; color: rgba(255,255,255,0.55); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Directional variants for a bit of variety instead of everything rising the same way */
.reveal-left { transform: translateX(-32px); }
.reveal-left.is-visible { transform: translateX(0); }
.reveal-right { transform: translateX(32px); }
.reveal-right.is-visible { transform: translateX(0); }
.reveal-scale { transform: scale(0.94); }
.reveal-scale.is-visible { transform: scale(1); }

/* Staggered entrance: container itself is always visible, its direct children
   animate in one after another once .is-visible lands on the container. */
.reveal.stagger { opacity: 1; transform: none; }
.reveal.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal.stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal.stagger.is-visible > *:nth-child(2) { transition-delay: 0.17s; }
.reveal.stagger.is-visible > *:nth-child(3) { transition-delay: 0.29s; }
.reveal.stagger.is-visible > *:nth-child(4) { transition-delay: 0.41s; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid, .contact-grid, .services-grid, .form-row, .steps-grid {
    grid-template-columns: 1fr;
  }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 0 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.3s ease, padding 0.35s ease;
  }
  .main-nav.is-open {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
    padding: 20px 24px 28px;
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
  .nav-cta { align-self: flex-start; }
  .section { padding: 64px 0; }
  .hero { min-height: 76vh; }
  .application-container { max-width: 100%; }
}

/* ---------- Funding application wizard ---------- */
.application-section { padding-top: 64px; }
.application-container { max-width: 720px; }
.btn-ghost-dark {
  border-color: var(--border);
  color: var(--green-dark);
  background: transparent;
}
.btn-ghost-dark:hover { background: var(--cream-alt); }

.wizard {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  margin-top: 24px;
}
.wizard-progress {
  height: 6px;
  background: var(--cream-alt);
  border-radius: 999px;
  overflow: hidden;
}
.wizard-progress-bar {
  height: 100%;
  background: var(--gold);
  width: 25%;
  transition: width 0.3s ease;
}
.wizard-step-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 10px 0 28px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.wizard-step h2 { font-size: 1.5rem; margin-bottom: 24px; }
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
}
.callout-box {
  background: var(--cream-alt);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 24px;
}
.callout-box p { margin-bottom: 0.6em; font-size: 0.92rem; }
.callout-box p:last-child { margin-bottom: 0; }

/* Step entrance animation — restarted via JS each time a step becomes active */
.wizard-step.step-enter { animation: stepFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Smooth collapse/expand for conditional field groups (Individual/Business,
   security offered, ownership "Other"), using the grid-rows 0fr/1fr trick so
   variable-height content can animate without JS measuring pixel heights. */
.collapsible {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.collapsible.is-open { grid-template-rows: 1fr; }
.collapsible-inner { overflow: hidden; }

@media (max-width: 600px) {
  .wizard { padding: 24px; }
}

/* ---------- Legal pages (privacy policy) ---------- */
.legal-section { padding-top: 64px; }
.legal-container { max-width: 720px; }
.legal-container h2 { margin-top: 1.6em; font-size: 1.3rem; }
.legal-container h2:first-of-type { margin-top: 1.2em; }
