/* =========================================================
   CHEMA IMPACT GROUP — stylesheet
   Type: "Fraunces" (display/serif) + "Karla" (body/sans)
   Palette: forest greens + warm gold, on a muted sage-ivory field
   ========================================================= */

:root {
  --purple-900: #2c2159;
  --purple-800: #3a2c78;
  --purple-700: #4e3595;
  --purple-600: #6348bb;
  --purple-500: #7b62ce;
  --purple-100: #eae5f7;
  --orange-500: #f56800;
  --orange-300: #ff9a52;
  --ivory: #f5f3fa;
  --ivory-2: #fbfaf7;
  --ink: #201c2b;
  --ink-soft: #4a4458;
  --line: #ded9ea;
  --white: #ffffff;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", "Segoe UI", Helvetica, Arial, sans-serif;

  --radius-s: 6px;
  --radius-m: 12px;
  --shadow-1: 0 2px 10px rgba(18, 51, 36, 0.08);
  --shadow-2: 0 12px 32px rgba(18, 51, 36, 0.14);
  --container: 1180px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--purple-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { max-width: 62ch; }
.container p { }

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

section { padding: 88px 0; }
.section-tight { padding: 56px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}
.section-head .kicker {
  display: inline-block;
  color: var(--orange-500);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.section-head p { color: var(--ink-soft); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--orange-500); color: var(--purple-900); }
.btn-gold:hover { background: var(--orange-300); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-green { background: var(--purple-700); color: var(--white); }
.btn-green:hover { background: var(--purple-800); }

/* -------------------- Header / Nav -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ivory-2);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: var(--purple-900);
  font-weight: 600;
}
.brand img { height: 40px; width: auto; }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--purple-800);
  border-color: var(--orange-500);
}
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--purple-900); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ivory-2);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 28px 26px;
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-cta .btn span.btn-label-full { display: none; }
}

/* -------------------- Hero slider -------------------- */
.hero {
  position: relative;
  height: 640px;
  max-height: 88vh;
  overflow: hidden;
  color: var(--white);
}
@media (max-width: 700px) {
  .hero { height: 560px; }
}
.hero-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-scrim {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(44,33,89,0.60) 0%, rgba(44,33,89,0.40) 45%, rgba(20,15,40,0.85) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 620px;
}
.hero-content .kicker {
  color: var(--orange-300);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.hero-content h1 { color: var(--white); margin-bottom: 18px; }
.hero-content p { color: rgba(255,255,255,0.88); font-size: 1.08rem; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-dots {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}
.hero-dots button {
  width: 34px; height: 4px;
  background: rgba(255,255,255,0.35);
  border: none; cursor: pointer;
  transition: background 0.2s ease;
}
.hero-dots button.active { background: var(--orange-500); }

/* -------------------- Stat strip -------------------- */
.stats {
  background: var(--purple-900);
  color: var(--white);
  padding: 46px 0;
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--orange-300);
  font-weight: 600;
}
.stat span { font-size: 0.88rem; color: rgba(255,255,255,0.78); }
@media (max-width: 760px) { .stats .container { grid-template-columns: repeat(2, 1fr); } }

/* -------------------- About split -------------------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.split-reverse { grid-template-columns: 0.95fr 1.05fr; }
.split-reverse .split-media { order: 2; }
@media (max-width: 860px) {
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-reverse .split-media { order: 0; }
}
.split-media img { border-radius: var(--radius-m); box-shadow: var(--shadow-2); }
.pillar-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.pillar-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.98rem; color: var(--ink-soft);
}
.pillar-list .dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange-500); margin-top: 8px;
}

/* -------------------- Cards: services -------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 30px 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover { box-shadow: var(--shadow-1); border-color: var(--purple-500); }
.service-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--purple-100);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--purple-700);
}
.service-card h3 { margin-bottom: 8px; font-size: 1.12rem; }
.service-card p { font-size: 0.94rem; color: var(--ink-soft); margin: 0; }

.page-hero {
  background: var(--purple-900);
  color: var(--white);
  padding: 76px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -100px;
  width: 340px; height: 340px;
  border-radius: 50%;
  border: 40px solid rgba(255,154,82,0.14);
}
.page-hero .kicker { color: var(--orange-300); font-family: var(--font-display); font-style: italic; }
.page-hero h1 { color: var(--white); max-width: 640px; }
.page-hero p { color: rgba(255,255,255,0.82); max-width: 560px; }
.crumbs { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.crumbs a { color: var(--orange-300); }

/* -------------------- Testimonials -------------------- */
.testimonials { background: var(--purple-100); }
.testi-track-wrap { overflow: hidden; }
.testi-track {
  display: flex;
  gap: 24px;
  transition: transform 0.6s ease;
}
.testi-card {
  flex: 0 0 calc(33.333% - 16px);
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 30px 26px;
  box-shadow: var(--shadow-1);
}
@media (max-width: 980px) { .testi-card { flex-basis: calc(50% - 12px); } }
@media (max-width: 640px) { .testi-card { flex-basis: 100%; } }
.testi-quote { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 20px; }
.testi-person { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--purple-700); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600;
}
.testi-name { font-weight: 700; font-size: 0.92rem; color: var(--purple-900); }
.testi-role { font-size: 0.8rem; color: var(--ink-soft); }
.testi-nav { display: flex; gap: 12px; margin-top: 32px; justify-content: center; }
.testi-nav button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--purple-700);
  background: transparent; color: var(--purple-700);
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.testi-nav button:hover { background: var(--purple-700); color: var(--white); }

/* -------------------- Partners slider -------------------- */
.partners { padding: 64px 0; }
.partners-track-wrap { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.partners-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: partner-scroll 26s linear infinite;
  align-items: center;
}
.partners-track img { height: 60px; width: auto; opacity: 0.85; }
@keyframes partner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* -------------------- Contact -------------------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 0;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
@media (max-width: 860px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-info {
  background: var(--purple-900);
  color: var(--white);
  padding: 48px 40px;
}
.contact-info h3 { color: var(--white); }
.contact-info p { color: rgba(255,255,255,0.78); }
.contact-line { display: flex; gap: 14px; margin: 22px 0; align-items: flex-start; }
.contact-line .ic { color: var(--orange-300); flex: none; margin-top: 3px; }
.contact-form { background: var(--white); padding: 48px 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--purple-900); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: 0.96rem;
  background: var(--ivory-2);
  transition: border-color 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--purple-600);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 10px; }
.alert { padding: 14px 18px; border-radius: var(--radius-s); font-size: 0.92rem; margin-bottom: 20px; }
.alert-success { background: #e4f2e8; color: var(--purple-800); border: 1px solid var(--purple-500); }
.alert-error { background: #fbe9e7; color: #8a2c1f; border: 1px solid #d98a7a; }

/* -------------------- Team -------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
.team-card {
  background: var(--white);
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
}
.team-photo { aspect-ratio: 1/1; overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-body { padding: 22px 22px 26px; }
.team-role { color: var(--orange-500); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.02em; margin-bottom: 4px; }
.team-name { font-family: var(--font-display); font-size: 1.2rem; color: var(--purple-900); margin-bottom: 8px; }
.team-body p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* -------------------- Gallery -------------------- */
.upload-panel {
  background: var(--white);
  border: 1.5px dashed var(--purple-500);
  border-radius: var(--radius-m);
  padding: 32px;
  margin-bottom: 52px;
}
.upload-panel h3 { margin-bottom: 6px; }
.upload-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.upload-row .field { margin-bottom: 0; flex: 1 1 220px; }
.file-field input[type=file] {
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--ivory-2);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item {
  position: relative;
  border-radius: var(--radius-s);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--purple-100);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(44,33,89,0.85), transparent);
  color: var(--white);
  font-size: 0.8rem;
  padding: 22px 12px 10px;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-m);
}

/* -------------------- Documents -------------------- */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .doc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .doc-grid { grid-template-columns: 1fr; } }
.doc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.doc-card:hover { box-shadow: var(--shadow-1); border-color: var(--purple-500); }
.doc-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--purple-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-700);
}
.doc-cat {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--orange-500); text-transform: uppercase;
}
.doc-title { font-family: var(--font-display); font-size: 1.08rem; color: var(--purple-900); margin: 0; }
.doc-card .btn { margin-top: auto; align-self: flex-start; }
.doc-empty { grid-column: 1 / -1; }

/* -------------------- Add-member panel (reuses upload-panel look) -------------------- */
.add-member-row { display: flex; gap: 16px; flex-wrap: wrap; }
.add-member-row .field { flex: 1 1 220px; margin-bottom: 16px; }
.add-member-row .field.wide { flex-basis: 100%; }
.cta-band {
  background: var(--orange-500);
  color: var(--purple-900);
  border-radius: var(--radius-m);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { margin: 0; color: var(--purple-900); }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--purple-900); color: rgba(255,255,255,0.86); }
.footer-top { padding: 70px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1.1fr;
  gap: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer-brand img { height: 36px; width: auto; }
.footer-brand span { font-family: var(--font-display); font-size: 1.15rem; color: var(--white); }
.social-links { display: flex; gap: 10px; margin-top: 20px; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
/* Each platform's own brand colour by default... */
.social-links a.whatsapp { background: #25D366; }
.social-links a.facebook { background: #1877F2; }
.social-links a.tiktok   { background: #010101; }
.social-links a.youtube  { background: #FF0000; }
.social-links a.linkedin { background: #0A66C2; }
.social-links a.x-twitter{ background: #000000; }
/* ...only changing to the site accent colour on hover. */
.social-links a:hover {
  background: var(--orange-500) !important;
  border-color: var(--orange-500) !important;
  color: var(--white);
  transform: translateY(-2px);
}
.site-footer p { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.site-footer h4 { color: var(--orange-300); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.03em; margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { font-size: 0.92rem; color: rgba(255,255,255,0.78); }
.footer-links a:hover { color: var(--orange-300); }
.footer-chart-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-m);
  padding: 20px;
}
.footer-chart-card canvas { max-width: 100%; }
.chart-legend { display: grid; gap: 8px; margin-top: 14px; font-size: 0.82rem; }
.chart-legend span.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

/* utility */
.mt-0 { margin-top: 0; }
.text-gold { color: var(--orange-500); }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
