/* =========================================================
   Ebedi Microfinance Bank — Design tokens
   Palette drawn from Iseyin's aso-oke weaving tradition:
   indigo cloth, ochre thread, and undyed cotton.
   ========================================================= */

:root{
  --indigo-900: #16233F;
  --indigo-700: #223A63;
  --indigo-500: #2F4E82;
  --ochre-500:  #B9852B;
  --ochre-600:  #9C6F20;
  --green-600:  #3E6B4D;
  --cloth-50:   #FAF7EF;
  --cloth-100:  #F1EBDC;
  --ink-900:    #211C15;
  --ink-600:    #4E4739;
  --ink-400:    #7A7161;
  --line:       #E3DAC4;
  --white:      #FFFFFF;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Public Sans", -apple-system, Segoe UI, Roboto, sans-serif;

  --max-width: 1120px;
  --radius: 4px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--cloth-50);
  line-height: 1.55;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }

h1, h2, h3, h4{
  font-family: var(--font-display);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
  color: var(--indigo-900);
}
h1{ font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2{ font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3{ font-size: 1.25rem; }
p{ margin: 0 0 1em; max-width: 62ch; }

.container{
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Weave motif (recurring graphic device) ---------- */
.weave-rule{
  height: 6px;
  width: 64px;
  background: repeating-linear-gradient(
    90deg,
    var(--ochre-500) 0 8px,
    var(--indigo-700) 8px 16px
  );
  border-radius: 2px;
  margin-bottom: 20px;
}

/* ---------- Header / nav ---------- */
.site-header{
  background: var(--cloth-50);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--indigo-900);
}
.brand-mark{
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--indigo-900);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::before{
  content: "";
  position: absolute;
  inset: 8px;
  background: repeating-linear-gradient(90deg, var(--ochre-500) 0 3px, transparent 3px 6px);
}
.brand small{
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--ink-400);
  letter-spacing: 0.02em;
}

nav.main-nav{ display: flex; align-items: center; gap: 28px; }
nav.main-nav a{
  font-size: 0.95rem;
  color: var(--ink-600);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover,
nav.main-nav a.active{
  color: var(--indigo-900);
  border-bottom-color: var(--ochre-500);
}
.header-cta{ display: flex; align-items: center; gap: 14px; }

.btn{
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary{ background: var(--indigo-900); color: var(--white); }
.btn-primary:hover{ background: var(--indigo-700); }
.btn-ochre{ background: var(--ochre-500); color: var(--white); }
.btn-ochre:hover{ background: var(--ochre-600); }
.btn-outline{ background: transparent; color: var(--indigo-900); border-color: var(--indigo-900); }
.btn-outline:hover{ background: var(--indigo-900); color: var(--white); }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{ width: 24px; height: 2px; background: var(--indigo-900); }

/* ---------- Hero ---------- */
.hero{
  background: var(--indigo-900);
  color: var(--cloth-50);
  position: relative;
  overflow: hidden;
}
.hero::after{
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 38%;
  background: repeating-linear-gradient(
    180deg,
    var(--ochre-500) 0 3px,
    transparent 3px 22px
  );
  opacity: 0.5;
}
.hero-inner{
  position: relative;
  z-index: 1;
  padding: 88px 24px 76px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-eyebrow{
  font-size: 0.85rem;
  color: var(--ochre-500);
  margin-bottom: 14px;
}
.hero h1{ color: var(--white); max-width: 16ch; }
.hero p.lead{
  color: #D8DEEA;
  font-size: 1.1rem;
  max-width: 46ch;
}
.hero-actions{ display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section{ padding: 72px 0; }
.section-head{ max-width: 60ch; margin-bottom: 40px; }
.section-alt{ background: var(--cloth-100); }

.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.grid-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product{
  border-top: 3px solid var(--ochre-500);
  padding-top: 18px;
}
.product h3{ margin-bottom: 8px; }

.stat-row{
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  margin: 40px 0;
}
.stat .num{
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--indigo-900);
  display: block;
}
.stat .label{ font-size: 0.85rem; color: var(--ink-400); }

.callout{
  background: var(--indigo-900);
  color: var(--cloth-50);
  border-radius: var(--radius);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.callout h2{ color: var(--white); margin-bottom: 6px; }
.callout p{ color: #D8DEEA; margin: 0; }

table.info-table{ width: 100%; border-collapse: collapse; }
table.info-table th, table.info-table td{
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.info-table th{ width: 40%; color: var(--ink-400); font-weight: 500; }

.team-card{ border-top: 1px solid var(--line); padding-top: 16px; }
.team-card h3{ margin-bottom: 2px; }
.team-role{ color: var(--ochre-600); font-size: 0.85rem; margin-bottom: 10px; display: block; }

form.form-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.field{ margin-bottom: 18px; }
.field label{ display: block; font-size: 0.85rem; color: var(--ink-600); margin-bottom: 6px; }
.field input, .field textarea, .field select{
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cloth-50);
}
.field input:focus, .field textarea:focus, .field select:focus{
  outline: 2px solid var(--ochre-500);
  outline-offset: 1px;
}
.notice{
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.notice-success{ background: #E7F0E9; color: var(--green-600); border: 1px solid #C6DBCB; }
.notice-error{ background: #F6E6E1; color: #8A3B24; border: 1px solid #E7C6BA; }

/* ---------- Photo frame (graceful placeholder until real photos land) ---------- */
.photo-frame{
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cloth-100);
}
.photo-frame img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-frame.is-empty{
  background: repeating-linear-gradient(
    135deg,
    var(--cloth-100) 0 14px,
    var(--line) 14px 15px
  );
}
.photo-frame.is-empty img{ display: none; }
.photo-frame.is-empty::after{
  content: attr(data-caption);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-400);
}
.hero .photo-frame{ aspect-ratio: 5 / 4; }
.photo-frame-round{
  aspect-ratio: 1 / 1;
  width: 84px;
  border-radius: 50%;
  margin-bottom: 14px;
}
.photo-frame-round.is-empty::after{ font-size: 0.6rem; padding: 6px; }

/* ---------- Hero image banner (rotates through several photos) ---------- */
.hero-banner{
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cloth-100);
}
.hero-banner .photo-frame{
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.hero-banner .photo-frame.is-active{ opacity: 1; }
.hero-banner-dots{
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-banner-dots button{
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
}
.hero-banner-dots button.is-active{ background: #fff; }


/* ---------- Footer ---------- */
footer.site-footer{
  background: var(--indigo-900);
  color: #B9C2D6;
  padding: 56px 0 28px;
}
footer.site-footer h4{ color: var(--white); font-size: 0.95rem; margin-bottom: 14px; }
footer .grid-4{ display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 32px; }
footer a{ color: #B9C2D6; }
footer a:hover{ color: var(--white); }
footer ul{ list-style: none; padding: 0; margin: 0; }
footer li{ margin-bottom: 8px; font-size: 0.9rem; }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  footer .grid-4{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px){
  nav.main-nav{
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cloth-50);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 14px;
  }
  nav.main-nav.open{ display: flex; }
  .nav-toggle{ display: flex; }
  .header-cta .btn-outline{ display: none; }
  .callout{ flex-direction: column; align-items: flex-start; }
  footer .grid-4{ grid-template-columns: 1fr; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}
