/* =====================================================================
   AACEA-SACCO — public landing page design system
   Addis Ababa Code Enforcement Authority Saving & Credit Cooperative
   ---------------------------------------------------------------------
   Loaded after the Landkit base stylesheet and overrides it.
   Contains: tokens, dark mode, header, hero, sections, cards, forms.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------- */
:root {
  /* Brand — navy from the SACCO seal, teal + gold as accents */
  --sac-navy:      #0a2540;
  --sac-navy-700:  #123a63;
  --sac-blue:      #1565c0;
  --sac-blue-600:  #0d6efd;
  --sac-teal:      #0fb5ae;
  --sac-gold:      #f5b700;

  /* Surfaces */
  --bg:            #ffffff;
  --bg-subtle:     #f6f9fc;
  --bg-raised:     #ffffff;
  --border:        #e4eaf1;
  --border-strong: #cfd9e4;

  /* Text */
  --text:          #16202b;
  --text-muted:    #5b6b7c;
  --text-faint:    #8a99a8;
  --text-invert:   #ffffff;

  /* Feedback */
  --success:       #16a34a;
  --warning:       #d97706;
  --danger:        #dc2626;

  /* Gradients */
  --grad-hero:     linear-gradient(120deg, rgba(8,30,52,.95) 0%, rgba(10,37,64,.88) 38%, rgba(16,66,110,.74) 72%, rgba(21,101,192,.62) 100%);
  --grad-primary:  linear-gradient(135deg, #123a63 0%, #1565c0 100%);
  --grad-teal:     linear-gradient(135deg, #0d9488 0%, #0fb5ae 100%);
  --grad-gold:     linear-gradient(135deg, #d97706 0%, #f5b700 100%);

  /* Geometry */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(16,32,48,.06), 0 1px 3px rgba(16,32,48,.05);
  --shadow:    0 4px 6px -1px rgba(16,32,48,.07), 0 2px 4px -2px rgba(16,32,48,.05);
  --shadow-md: 0 12px 24px -8px rgba(16,32,48,.14), 0 4px 8px -4px rgba(16,32,48,.08);
  --shadow-lg: 0 24px 48px -16px rgba(16,32,48,.22);

  /* Motion */
  --ease:  cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur:   .28s;

  --header-h: 78px;
}

/* ---------------------------------------------------------------------
   2. Dark mode
   --------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg:            #0b1420;
  --bg-subtle:     #101d2e;
  --bg-raised:     #142234;
  --border:        #22334a;
  --border-strong: #2e445e;

  --text:          #e8eef5;
  --text-muted:    #9fb0c3;
  --text-faint:    #7b8ca0;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow:    0 4px 10px rgba(0,0,0,.35);
  --shadow-md: 0 12px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 48px rgba(0,0,0,.55);
}

[data-theme="dark"] #header {
  background: rgba(11,20,32,.88);
}

[data-theme="dark"] #about,
[data-theme="dark"] #membership {
  background: var(--bg-subtle);
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .benefit-content,
[data-theme="dark"] .contact-content,
[data-theme="dark"] .info,
[data-theme="dark"] .php-email-form .form-control {
  background: var(--bg-raised);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .section-title h2,
[data-theme="dark"] .section-title h3,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text);
}

[data-theme="dark"] .php-email-form button[type="submit"] {
  background: var(--grad-primary);
}

/* ---------------------------------------------------------------------
   3. Base
   --------------------------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

h1, h2, h3, h4, h5, h6 { color: var(--text); letter-spacing: -.02em; }

a { transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }

:focus-visible {
  outline: 3px solid var(--sac-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.sac-skip {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--sac-navy); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.sac-skip:focus { left: 0; }

/* ---------------------------------------------------------------------
   4. Header
   --------------------------------------------------------------------- */
#header {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  padding: 0;
  transition: height var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
#header.sac-scrolled {
  box-shadow: var(--shadow);
  background: rgba(255,255,255,.96);
}
#header.sac-scrolled .sac-brand__name { font-size: 1.05rem; }

#header .container { height: 100%; }

.sac-brand { display: flex; align-items: center; gap: 12px; }
.sac-brand img {
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; padding: 3px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out);
}
.sac-brand:hover img { transform: scale(1.06); }
.sac-brand__name {
  font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--sac-navy); line-height: 1.2;
  transition: font-size var(--dur) var(--ease);
}
[data-theme="dark"] .sac-brand__name { color: var(--text); }
.sac-brand__tag {
  display: block; font-size: .7rem; font-weight: 500;
  color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase;
}

.navbar ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 4px; }
.navbar ul li { margin: 0; }
.navbar a {
  display: block; padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: .95rem;
}
.navbar a:hover { color: var(--sac-blue); background: rgba(21,101,192,.07); }
.navbar .active a { color: var(--sac-blue); font-weight: 600; }
[data-theme="dark"] .navbar a:hover,
[data-theme="dark"] .navbar .active a { color: var(--sac-teal); background: rgba(15,181,174,.1); }

.getstarted {
  background: var(--grad-primary) !important;
  color: #fff !important;
  border-radius: var(--radius-pill) !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
  font-size: .92rem;
  box-shadow: 0 6px 16px -6px rgba(21,101,192,.5);
}
.getstarted:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(21,101,192,.6); }

/* Icon buttons are always visible; only the burger collapses. */
.sac-iconbtn {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.05rem;
  margin-left: 10px;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sac-iconbtn:hover { background: var(--bg-subtle); border-color: var(--border-strong); color: var(--sac-blue); }
[data-theme="dark"] .sac-iconbtn:hover { color: var(--sac-teal); }

.sac-burger { display: none; }

/* Scroll progress bar */
.sac-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad-teal);
  z-index: 1100;
  transition: width .1s linear;
}

/* ---------------------------------------------------------------------
   5. Hero
   --------------------------------------------------------------------- */
#hero { height: clamp(520px, 88vh, 860px); }
#hero .carousel, #hero .carousel-inner, #hero .carousel-item { height: 100%; }

.carousel-item {
  background-position: center 30%;
  background-size: cover;
}
#hero .carousel-item::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-hero);
}

.hero-container {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

#hero h2 {
  color: #fff;
  font-size: clamp(1.9rem, 4.4vw, 3.35rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.025em;
  margin-bottom: 18px;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
#hero p {
  color: rgba(255,255,255,.93);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 640px;
  margin-left: auto; margin-right: auto;
}

.sac-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 20px;
  border-radius: var(--radius-pill);
  background: rgba(15,181,174,.18);
  border: 1px solid rgba(15,181,174,.45);
  color: #7fe3dd;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.btn-get-started {
  background: var(--grad-primary);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 14px 38px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  font-family: inherit;
  box-shadow: 0 10px 26px -10px rgba(0,0,0,.6);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
/* The base template styles these with id specificity — match it. */
#hero .btn-get-started {
  background: var(--grad-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 14px 38px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  font-family: inherit;
  line-height: 1.4;
}
#hero .btn-get-started:hover {
  background: var(--grad-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px rgba(0,0,0,.7);
}
#hero .btn-get-started.btn-ghost,
.btn-get-started.btn-ghost {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  box-shadow: none;
}
#hero .btn-get-started.btn-ghost:hover,
.btn-get-started.btn-ghost:hover {
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.7);
  color: #fff;
}

.sac-hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

#hero .carousel-indicators { margin-bottom: 28px; }
#hero .carousel-indicators li {
  width: 30px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.45);
  border: 0;
  opacity: 1;
}
#hero .carousel-indicators li.active { background: var(--sac-teal); }

#hero .carousel-control-prev-icon,
#hero .carousel-control-next-icon {
  width: 48px; height: 48px;
  background: rgba(10,37,64,.35);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  color: rgba(255,255,255,.9);
  font-size: 1.1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
#hero .carousel-control-prev-icon:hover,
#hero .carousel-control-next-icon:hover {
  background: rgba(15,181,174,.75);
  border-color: rgba(15,181,174,.9);
  color: #fff;
}
#hero .carousel-control-prev { width: 8%; }
#hero .carousel-control-next { width: 8%; }

.values-list { text-align: left; max-width: 460px; margin: 0 auto; }
.values-list li { font-size: 1.05rem; }

/* ---------------------------------------------------------------------
   6. Section scaffolding
   --------------------------------------------------------------------- */
#about, #membership { background: var(--bg-subtle); }
#about, #services, #membership, #contact { padding: 88px 0; }

.section-title { margin-bottom: 52px; }
.section-title h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 6px;
}
.section-title h2::after {
  content: '';
  position: absolute;
  width: 56px; height: 3px;
  background: var(--sac-teal);
  bottom: -12px; left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}
.section-title p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 640px;
  margin: 20px auto 0;
}
.section-title .sac-kicker {
  display: block;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sac-teal);
  margin-bottom: 10px;
}

/* ---------------------------------------------------------------------
   7. Stats
   --------------------------------------------------------------------- */
#stats {
  background: var(--grad-primary);
  color: #fff;
  padding: 56px 0;
}
#stats .stat-item { padding: 12px 8px; position: relative; }
#stats .stat-item + .stat-item::before {
  content: '';
  position: absolute; left: 0; top: 18%; bottom: 18%;
  width: 1px; background: rgba(255,255,255,.16);
}
.stat-number {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-text {
  font-size: .84rem;
  color: rgba(255,255,255,.78);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
  margin-top: 4px;
}

/* ---------------------------------------------------------------------
   8. Cards (services + benefits)
   --------------------------------------------------------------------- */
.service-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.service-card::before {
  content: '';
  position: absolute; inset: 0 auto 0 0;
  width: 4px;
  background: var(--grad-teal);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur) var(--ease-out);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.service-card:hover::before { transform: scaleY(1); }

.service-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
  color: var(--sac-blue);
  background: rgba(21,101,192,.09);
  margin-bottom: 20px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}
.service-card:hover .service-icon {
  background: var(--sac-blue); color: #fff; transform: scale(1.06);
}
[data-theme="dark"] .service-icon { background: rgba(15,181,174,.14); color: var(--sac-teal); }
[data-theme="dark"] .service-card:hover .service-icon { background: var(--sac-teal); color: #06242b; }

.service-card h4 { font-size: 1.12rem; font-weight: 600; margin-bottom: 12px; }
.service-card p { color: var(--text-muted); font-size: .95rem; margin: 0; }

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 26px;
}
.benefit-icon {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 12px;
  background: var(--grad-teal);
  color: #fff;
  font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -6px rgba(15,181,174,.65);
}
.benefit-content h4 { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }
.benefit-content p { color: var(--text-muted); font-size: .94rem; margin: 0; }

/* ---------------------------------------------------------------------
   9. About + contact
   --------------------------------------------------------------------- */
#about .img-fluid {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: #fff;
  padding: 18px;
}
#about p { text-align: left; color: var(--text-muted); font-size: .97rem; }
#about h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 18px; }

.btn {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 12px 30px;
  font-weight: 600;
  font-size: .95rem;
  border: 0;
}
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(21,101,192,.55);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(21,101,192,.6); }

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 12px;
  background: rgba(21,101,192,.09);
  color: var(--sac-blue);
  font-size: 1.05rem;
  float: none;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .contact-icon { background: rgba(15,181,174,.14); color: var(--sac-teal); }
.contact-content h4 { font-size: 1rem; font-weight: 600; margin: 0 0 6px; padding: 0; }
.contact-content p { color: var(--text-muted); font-size: .93rem; margin: 0; padding: 0 0 0 0; }

.info {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  height: 100%;
  width: 100%;
}

.php-email-form .form-control,
.form-control {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: .95rem;
  background: var(--bg-raised);
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-control:focus {
  border-color: var(--sac-blue);
  box-shadow: 0 0 0 4px rgba(21,101,192,.14);
  outline: none;
}
.php-email-form label { font-weight: 600; font-size: .88rem; color: var(--text); }
.php-email-form button[type="submit"] {
  background: var(--grad-primary);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 13px 34px;
  font-weight: 600;
  box-shadow: 0 8px 20px -8px rgba(21,101,192,.55);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease);
}
.php-email-form button[type="submit"]:hover { transform: translateY(-2px); }

/* ---------------------------------------------------------------------
   10. Footer + back to top
   --------------------------------------------------------------------- */
#footer {
  background: var(--sac-navy);
  color: rgba(255,255,255,.75);
  padding: 38px 0;
}
#footer .copyright { font-size: .92rem; }
#footer a { color: var(--sac-teal); font-weight: 500; }
#footer .credits { font-size: .85rem; color: rgba(255,255,255,.5); }

.back-to-top {
  background: var(--sac-navy);
  border-radius: 50%;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 999;
}
.back-to-top:hover { background: var(--sac-blue); }

/* ---------------------------------------------------------------------
   11. Scroll reveal
   Only hidden when JavaScript is available to reveal it again.
   --------------------------------------------------------------------- */
.sac-js .sac-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: opacity, transform;
}
.sac-js .sac-reveal.is-visible { opacity: 1; transform: none; }
.sac-js .sac-reveal[data-delay="1"] { transition-delay: .08s; }
.sac-js .sac-reveal[data-delay="2"] { transition-delay: .16s; }
.sac-js .sac-reveal[data-delay="3"] { transition-delay: .24s; }
.sac-js .sac-reveal[data-delay="4"] { transition-delay: .32s; }
.sac-js .sac-reveal[data-delay="5"] { transition-delay: .40s; }

/* ---------------------------------------------------------------------
   12. Responsive
   --------------------------------------------------------------------- */
@media (max-width: 991px) {
  .sac-burger { display: inline-flex; }
  .navbar {
    position: fixed;
    top: var(--header-h); right: 0;
    width: min(320px, 86vw);
    height: calc(100vh - var(--header-h));
    background: var(--bg-raised);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 18px 20px;
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease-out);
    overflow-y: auto;
    z-index: 999;
  }
  .navbar.sac-open { transform: translateX(0); }
  .navbar ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .navbar a { padding: 13px 14px; }
  .navbar .getstarted { text-align: center; margin-top: 10px; }
  .sac-scrim {
    position: fixed; inset: 0;
    background: rgba(8,20,33,.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur) var(--ease);
    /* Below the header (z-index 997) so the drawer, which lives inside the
       header's stacking context, still paints above the scrim. */
    z-index: 990;
  }
  .sac-scrim.is-on { opacity: 1; pointer-events: auto; }
  #stats .stat-item + .stat-item::before { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 68px; }
  #about, #services, #membership, #contact { padding: 64px 0; }
  .sac-brand__tag { display: none; }
  .sac-brand__name { font-size: 1.02rem; }
  #hero { height: clamp(460px, 82vh, 640px); }
  .service-card { padding: 24px 22px; }
  .benefit-item, .contact-info-item { flex-direction: column; text-align: left; }
  .contact-icon, .benefit-icon { margin-right: 0; margin-bottom: 12px; align-self: flex-start; }
  #footer { text-align: center; }
}

/* ---------------------------------------------------------------------
   13. Accessibility / motion preferences
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .sac-reveal { opacity: 1; transform: none; }
}

@media print {
  #header, .sac-progress, .back-to-top, .sac-scrim { display: none !important; }
  body { background: #fff; color: #000; }
  #hero { height: auto; }
}
