@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&family=Vazirmatn:wght@400;500;600;700&display=swap');

:root{
  /* Design tokens */
  --indigo:      #1F3A5F;
  --indigo-deep: #142A45;
  --saffron:     #C98A2E;
  --saffron-lt:  #E3AE5C;
  --pomegranate: #A23B3B;
  --sandstone:   #EDE6D6;
  --sandstone-2: #E2D8C3;
  --ink:         #26221D;
  --ink-soft:    #5B564C;
  --sage:        #6B7A5E;
  --white:       #FFFFFF;

  --font-display: 'Fraunces', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-fa: 'Vazirmatn', 'Source Sans 3', sans-serif;

  --radius: 4px;
  --container: 1160px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  background: var(--sandstone);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body, body.lang-fa{
  font-family: var(--font-fa);
}
img{ max-width:100%; display:block; }
a{ color: inherit; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--indigo-deep);
}
body.lang-fa h1, body.lang-fa h2, body.lang-fa h3, body.lang-fa h4{
  font-family: var(--font-fa);
  font-weight: 700;
}
p{ margin: 0 0 1em; color: var(--ink-soft); }
.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow{
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron);
  font-weight: 700;
  margin-bottom: 0.6em;
  display:inline-block;
}

/* ---------- Stitch motif (signature element) ---------- */
.stitch{
  display:block;
  width: 100%;
  height: 14px;
  background-image: repeating-linear-gradient(
    to right,
    var(--saffron) 0 10px,
    transparent 10px 20px
  );
  background-position: center;
  background-repeat: repeat-x;
  background-size: 20px 2px;
  background-position-y: 6px;
  opacity: 0.9;
}
.stitch-v{
  width: 2px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--saffron) 0 10px,
    transparent 10px 20px
  );
}
.stitch-divider{
  border:0;
  height: 2px;
  margin: 3rem 0;
  background-image: repeating-linear-gradient(to right, var(--indigo) 0 9px, transparent 9px 18px);
  opacity: 0.35;
}

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: var(--sandstone);
  border-bottom: 1px solid rgba(38,34,29,0.12);
}
.nav-wrap{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand{
  display:flex; align-items:center; gap:12px;
  text-decoration:none;
}
.brand img{
  width:44px; height:44px; object-fit:cover; border-radius:50%;
  border: 2px solid var(--saffron);
}
.brand-name{
  font-family: var(--font-display);
  font-weight:700;
  font-size: 1.05rem;
  color: var(--indigo-deep);
  line-height:1.1;
}
.brand-sub{
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
nav.main-nav{ display:flex; align-items:center; gap: 26px; }
nav.main-nav a{
  text-decoration:none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
nav.main-nav a:hover, nav.main-nav a.active{ color: var(--pomegranate); }
nav.main-nav a.active::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-4px; height:2px;
  background: var(--pomegranate);
}
.nav-actions{ display:flex; align-items:center; gap:14px; }
.lang-toggle{
  border: 1.5px solid var(--indigo);
  background: transparent;
  color: var(--indigo);
  font-weight:700;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-family: var(--font-body);
}
.lang-toggle:hover{ background: var(--indigo); color: var(--white); }
.btn{
  display:inline-block;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight:700;
  text-decoration:none;
  font-size: 0.92rem;
  border: none;
  cursor:pointer;
  font-family: var(--font-body);
}
.btn-primary{ background: var(--pomegranate); color:var(--white); }
.btn-primary:hover{ background:#8a2f2f; }
.btn-outline{ background:transparent; border:1.5px solid var(--indigo); color:var(--indigo); }
.btn-outline:hover{ background:var(--indigo); color:var(--white); }
.btn-gold{ background: var(--saffron); color: var(--indigo-deep); }
.btn-gold:hover{ background: var(--saffron-lt); }

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

/* ---------- Hero ---------- */
.hero{
  position:relative;
  background: linear-gradient(120deg, var(--indigo-deep) 0%, var(--indigo) 100%);
  color: var(--white);
  overflow:hidden;
}
.hero-grid{
  display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px;
  align-items:center;
  padding: 70px 24px 60px;
  max-width: var(--container); margin:0 auto;
}
.hero h1{ color: var(--white); font-size: clamp(2rem, 4vw, 3rem); }
.hero p.lead{ color: rgba(255,255,255,0.85); font-size: 1.12rem; max-width: 46ch; }
.hero-stats{ display:flex; gap: 32px; margin-top: 2rem; flex-wrap:wrap; }
.hero-stat b{ display:block; font-family: var(--font-display); font-size: 1.9rem; color: var(--saffron-lt); }
.hero-stat span{ font-size: 0.82rem; color: rgba(255,255,255,0.75); }
.hero-media{ position:relative; }
.hero-media img{
  border-radius: 6px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
  border: 4px solid rgba(255,255,255,0.15);
}
.hero-cta{ display:flex; gap:14px; margin-top: 2rem; flex-wrap:wrap; }

/* ---------- Sections ---------- */
section{ padding: 74px 0; }
section.tight{ padding: 48px 0; }
.section-head{ max-width: 640px; margin-bottom: 2.6rem; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }

.bg-white{ background: var(--white); }
.bg-indigo{ background: var(--indigo-deep); color: var(--white); }
.bg-indigo h2, .bg-indigo h3{ color: var(--white); }
.bg-indigo p{ color: rgba(255,255,255,0.8); }
.bg-sandstone2{ background: var(--sandstone-2); }

/* ---------- Cards grid ---------- */
.grid{ display:grid; gap: 26px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }

.card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 26px;
  border: 1px solid rgba(38,34,29,0.08);
  position:relative;
}
.card .icon-tag{
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; border-radius:50%;
  background: var(--sandstone-2);
  color: var(--pomegranate);
  font-family: var(--font-display); font-weight:700;
  margin-bottom: 14px;
  font-size: 1.05rem;
}
.card h3{ font-size: 1.12rem; margin-bottom: 0.5em; }
.card p{ font-size: 0.94rem; margin-bottom:0; }

.stat-block{
  text-align:center;
  padding: 20px;
}
.stat-block b{
  display:block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--pomegranate);
}
.stat-block span{ font-size: 0.86rem; color: var(--ink-soft); }

/* Photo strip */
.photo-strip{ display:grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.photo-strip img{ border-radius: var(--radius); aspect-ratio: 1/1; object-fit:cover; width:100%; height:100%; }

.split{ display:grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items:center; }
.split img{ border-radius: 6px; }

/* Province tags */
.tag-cloud{ display:flex; flex-wrap:wrap; gap: 10px; }
.tag-cloud span{
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid rgba(38,34,29,0.12);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight:600;
  color: var(--indigo);
}

/* Board / person cards */
.person-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  border: 1px solid rgba(38,34,29,0.08);
  text-align:center;
}
.avatar-ring{
  width: 84px; height:84px; border-radius:50%;
  margin: 0 auto 16px;
  background: var(--sandstone-2);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700; font-size:1.6rem;
  color: var(--indigo);
  border: 3px solid var(--saffron);
}
.person-card h3{ font-size: 1.02rem; margin-bottom:0.2em; }
.person-role{ font-size: 0.82rem; color: var(--pomegranate); font-weight:700; margin-bottom: 0.5em; }
.person-desc{ font-size: 0.86rem; color: var(--ink-soft); }

/* Timeline for project experience */
.timeline{ border-inline-start: 2px solid var(--saffron); padding-inline-start: 26px; display:flex; flex-direction:column; gap: 28px; }
.timeline-item{ position:relative; }
.timeline-item::before{
  content:"";
  position:absolute; inset-inline-start: -32px; top: 4px;
  width:12px; height:12px; border-radius:50%;
  background: var(--pomegranate);
}

/* Donate page */
.donate-box{
  background: var(--white);
  border-radius: 8px;
  padding: 34px;
  border: 1px solid rgba(38,34,29,0.1);
}
.donate-box h3{ margin-bottom: 0.3em; }
.method-row{
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 0;
  border-bottom: 1px dashed rgba(38,34,29,0.15);
}
.method-row:last-child{ border-bottom:none; }
.pill-status{
  font-size: 0.74rem;
  font-weight:700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sandstone-2);
  color: var(--ink-soft);
  text-transform:uppercase;
  letter-spacing:0.04em;
}

/* Contact page */
.contact-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-item{ display:flex; gap:14px; margin-bottom:22px; align-items:flex-start; }
.contact-item .ic{
  width:40px;height:40px;border-radius:50%;
  background:var(--indigo); color:var(--white);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  font-weight:700;
}
form.contact-form{ display:flex; flex-direction:column; gap: 14px; }
form.contact-form input, form.contact-form textarea, form.contact-form select{
  padding: 12px 14px;
  border: 1.5px solid rgba(38,34,29,0.18);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
}
body.lang-fa form.contact-form input, body.lang-fa form.contact-form textarea{ font-family: var(--font-fa); }
form.contact-form label{ font-size: 0.86rem; font-weight:700; color: var(--indigo-deep); }
form.contact-form textarea{ resize:vertical; min-height: 120px; }
.form-note{ font-size: 0.8rem; color: var(--ink-soft); }

/* Footer */
.site-footer{
  background: var(--indigo-deep);
  color: rgba(255,255,255,0.75);
  padding: 54px 0 26px;
}
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-grid h4{ color: var(--white); font-size:0.95rem; }
.footer-grid a{ display:block; text-decoration:none; color: rgba(255,255,255,0.72); font-size:0.9rem; margin-bottom:8px; }
.footer-grid a:hover{ color: var(--saffron-lt); }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 22px;
  display:flex; justify-content:space-between; align-items:center;
  font-size: 0.8rem;
  flex-wrap:wrap; gap:10px;
}

/* ---------- Chatbot widget ---------- */
#awevso-chat-launcher{
  position: fixed; bottom: 24px; inset-inline-end: 24px;
  width: 60px; height:60px; border-radius:50%;
  background: var(--pomegranate);
  color:#fff; border:none; cursor:pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  z-index: 999;
  display:flex; align-items:center; justify-content:center;
  font-size: 1.5rem;
}
#awevso-chat-launcher:hover{ background:#8a2f2f; }
#awevso-chat-panel{
  position: fixed; bottom: 96px; inset-inline-end: 24px;
  width: 340px; max-width: calc(100vw - 40px);
  height: 460px; max-height: 70vh;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display:none;
  flex-direction:column;
  overflow:hidden;
  z-index: 999;
  border: 1px solid rgba(38,34,29,0.1);
}
#awevso-chat-panel.open{ display:flex; }
.chat-head{
  background: var(--indigo-deep);
  color:#fff;
  padding: 14px 16px;
  display:flex; align-items:center; justify-content:space-between;
}
.chat-head strong{ font-family: var(--font-display); font-size:1rem; }
.chat-head small{ display:block; font-size:0.72rem; color: rgba(255,255,255,0.65); }
.chat-close{ background:none; border:none; color:#fff; font-size:1.1rem; cursor:pointer; }
.chat-body{ flex:1; overflow-y:auto; padding: 14px; display:flex; flex-direction:column; gap:10px; background: var(--sandstone); }
.chat-msg{ max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 0.87rem; line-height:1.45; }
.chat-msg.bot{ background:#fff; border:1px solid rgba(38,34,29,0.1); align-self:flex-start; border-bottom-left-radius:2px; }
.chat-msg.user{ background: var(--indigo); color:#fff; align-self:flex-end; border-bottom-right-radius:2px; }
.chat-suggestions{ display:flex; flex-wrap:wrap; gap:6px; padding: 0 14px 12px; background: var(--sandstone); }
.chat-suggestions button{
  font-size: 0.76rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(38,34,29,0.18);
  background: #fff;
  cursor:pointer;
  color: var(--indigo);
}
.chat-suggestions button:hover{ background: var(--sandstone-2); }
.chat-input-row{ display:flex; border-top: 1px solid rgba(38,34,29,0.1); }
.chat-input-row input{
  flex:1; border:none; padding: 12px 14px; font-size:0.88rem; font-family: var(--font-body);
  background: #fff;
}
.chat-input-row input:focus{ outline:none; }
.chat-input-row button{
  background: var(--pomegranate); color:#fff; border:none; padding: 0 18px; cursor:pointer; font-weight:700;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; padding-top: 44px; }
  .hero-media{ order:-1; }
  .grid-3, .grid-4, .grid-2{ grid-template-columns: 1fr 1fr; }
  .split{ grid-template-columns: 1fr; gap: 28px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
  .photo-strip{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px){
  nav.main-nav{
    position: fixed; top:76px; left:0; right:0;
    background: var(--sandstone);
    flex-direction:column; align-items:flex-start;
    padding: 20px 24px; gap:16px;
    border-bottom: 1px solid rgba(38,34,29,0.12);
    display:none;
  }
  nav.main-nav.open{ display:flex; }
  .menu-toggle{ display:flex; }
  .grid-3, .grid-4, .grid-2{ grid-template-columns: 1fr; }
  #awevso-chat-panel{ width: calc(100vw - 32px); inset-inline-end:16px; }
  #awevso-chat-launcher{ inset-inline-end:16px; }
  .brand-sub{ display:none; }
  .nav-wrap{ flex-wrap: nowrap; padding: 10px 16px; }
  .brand-name{ font-size: 0.92rem; }
  .brand img{ width:36px; height:36px; }
  .nav-actions{ gap:8px; }
  .lang-toggle{ padding: 5px 9px; font-size: 0.74rem; }
  .nav-actions .btn{ padding: 8px 12px; font-size: 0.8rem; }
}

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

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--pomegranate);
  outline-offset: 2px;
}
