/* ── PAGE: HOME ──────────────────────────────────────────── */

/* ── 1. HERO ─────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 82vh;
  min-height: 720px; /* Playing around with this vallue kidogo trying to see if it looks cleaner on devices up from 520px*/
  display: flex;
  flex-direction: column;
  overflow: visible;
  z-index: 2; /* Ensures it stays above the next section for the floating pill */
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden; /* Moved from hero so image/gradient stay clipped */
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* Black gradient scrim — bottom-left dark, fading to transparent right */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.55) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 1;
}

/* Bottom fade for depth */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 45%);
  z-index: 2;
}

/* Hero text content — left-aligned, vertically centred in upper portion */
.hero__content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: center;
  max-width: 100%;
}

.hero__content-inner {
  max-width: 580px;
  padding-top: calc(var(--header-height) + var(--space-10));
  padding-bottom: var(--space-10);
}

.hero__overline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gcib-gold);
  margin-bottom: var(--space-5);
}

.hero__overline-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-gcib-gold);
  flex-shrink: 0;
}

.hero__heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  font-weight: var(--fw-semibold);
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  color: var(--color-white);
  margin-bottom: var(--space-8);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* Quick links — static strip pinned to hero bottom */
.hero__quicklinks {
  position: relative;
  z-index: 4;
  flex-shrink: 0;
}

/* Override fixed positioning when quicklinks lives inside hero */
.hero__quicklinks .site-quicklinks {
  position: static;
  top: auto;
  height: auto;
  min-height: var(--quicklinks-height);
}

/* ── 2. ROOTED IN FAITH ──────────────────────────────── */
.section-rooted {
  background: var(--color-white);
}

.section-rooted__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: center;
}

/* Two-weight heading: line 1 regular, line 2 black */
.section-rooted__heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: var(--fw-regular);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  color: var(--color-cypress-darker);
  margin-bottom: var(--space-5);
}

/* Second line — black/bold weight */
.section-rooted__heading strong {
  display: block;
  font-weight: var(--fw-black);
  color: var(--color-gcib-gold);
}

.section-rooted__body {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-charcoal-mid);
  margin-bottom: var(--space-6);
  max-width: 52ch;
}

/* Trust badges row */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 14px;
  background: var(--color-off-gold);
  border: 1px solid rgba(0, 70, 67, 0.22);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  color: var(--color-charcoal-mid);
  white-space: nowrap;
}

.trust-badge img {
  width: 14px;
  height: 14px;
  opacity: 0.65;
}

/* ── Stacked image carousel (right column) ── */
.rooted-carousel {
  position: relative;
  width: 100%;
  height: 480px;
}

.rooted-carousel__slide {
  position: absolute;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  /* Much slower transition so the stack shift is barely perceptible */
  transition:
    transform 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    width 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    height 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    top 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    right 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* FRONT (active) slide */
.rooted-carousel__slide[data-pos="0"] {
  width: 72%;
  height: 82%;
  top: 0;
  left: 0;
  z-index: 3;
  transform: rotate(0deg);
  box-shadow: var(--shadow-xl);
}

/* MIDDLE slide — peeks from behind-right */
.rooted-carousel__slide[data-pos="1"] {
  width: 68%;
  height: 78%;
  top: 6%;
  right: 0;
  z-index: 2;
  transform: rotate(4deg);
  opacity: 0.9;
  box-shadow: var(--shadow-lg);
}

/* BACK slide — barely visible, bottom-right */
.rooted-carousel__slide[data-pos="2"] {
  width: 60%;
  height: 70%;
  top: 14%;
  right: 2%;
  z-index: 1;
  transform: rotate(8deg);
  opacity: 0.6;
  box-shadow: var(--shadow-md);
}

.rooted-carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

/* Nav dots — hidden (no visible controls, auto-advances quietly) */
.rooted-carousel__dots {
  display: none;
}

.rooted-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-grey-light);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
}

.rooted-carousel__dot.is-active {
  background: var(--color-cypress);
  width: 24px;
  border-radius: 4px;
  box-shadow: var(--shadow-cypress);
  z-index: 2;
}

.section-rooted__accent-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-black);
  color: var(--color-gcib-gold);
  line-height: 1;
}

.section-rooted__accent-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: var(--tracking-wide);
  margin-top: var(--space-1);
}

/* ── 3. OUR FUNDS ────────────────────────────────────────── */
.section-funds {
  background: var(--color-off-gold);
}

.section-funds__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section-funds__heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-3xl));
  font-weight: var(--fw-semibold);
  color: var(--color-cypress-darker);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-tight);
}

.section-funds__sub {
  font-size: var(--text-base);
  color: var(--color-charcoal-mid);
  line-height: var(--leading-relaxed);
  max-width: none;
}

/* Fund cards grid */
.funds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.fund-card {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-8), 3vw, var(--space-10));
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}

.fund-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}

.fund-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--border-color-gold);
}

.fund-card:hover::before {
  transform: scaleX(1);
}

.fund-card__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--color-cypress-subtle);
  border: 1px solid rgba(0, 70, 67, 0.15);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-cypress);
  width: fit-content;
  margin-bottom: var(--space-5);
}

.fund-card__tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gcib-gold);
  flex-shrink: 0;
}

.fund-card__name {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  font-weight: var(--fw-semibold);
  color: var(--color-cypress-darker);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-4);
}

.fund-card__desc {
  font-size: var(--text-base);
  color: var(--color-charcoal-mid);
  line-height: var(--leading-relaxed);
  flex: 1;
  margin-bottom: var(--space-8);
  max-width: none;
}

.fund-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-color);
}

.fund-card__min {
  font-size: var(--text-sm);
  color: var(--color-cypress);
  letter-spacing: var(--tracking-wide);
}

.fund-card__min strong {
  display: block;
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--color-charcoal);
  font-family: var(--font-display);
}

/* ── 4. ADVISER CTA BAND ─────────────────────────────────── */
.section-adviser {
  position: relative;
  background: var(--color-cypress-dark);
  padding-block: var(--space-6);
  width: min(1200px, calc(100% - var(--space-8)));
  margin: 40px auto;
  border-radius: 24px;
  overflow: hidden;
}

.section-adviser::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/src/Branding/Green Pattern.png");
  background-size: 320px;
  background-repeat: repeat;
  opacity: 100%;
  z-index: 0;
}

.section-adviser__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.section-adviser__text {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
  font-weight: var(--fw-semibold);
  color: var(--color-gcib-gold-light);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  max-width: none;
}

.section-adviser__sub {
  font-size: var(--text-sm);
  color: var(--color-white);
  margin-top: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  max-width: none;
}

/* ── 5. HOW TO START + WHY INVEST ───────────────────────── */
.section-how {
  background: var(--color-white);
}

.section-how__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 6vw, var(--space-24));
  align-items: start;
}

/* Steps list */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-item {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.step-item__icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--color-off-gold);
  border: 1px solid rgba(0, 70, 67, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.step-item:hover .step-item__icon-wrap {
  background: var(--color-cypress);
  border-color: var(--color-cypress);
}

.step-item__icon-wrap img {
  width: 24px;
  height: 24px;
}

.step-item:hover .step-item__icon-wrap img {
  filter: brightness(0) invert(1);
}

.step-item__body {
  flex: 1;
  padding-top: var(--space-2);
}

.step-item__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--color-charcoal);
  margin-bottom: var(--space-1);
}

.step-item__desc {
  font-size: var(--text-sm);
  color: var(--color-charcoal-mid);
  line-height: var(--leading-relaxed);
  max-width: none;
}

.how__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* Why invest column */
.why-invest__heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: var(--fw-semibold);
  color: var(--color-cypress-darker);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-8);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: var(--color-off-gold);
  border: 1px solid var(--color-off-gold-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  transition: var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-color-gold);
  box-shadow: var(--shadow-gold);
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
  font-weight: var(--fw-black);
  color: var(--color-cypress);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-card__label {
  font-size: var(--text-base);
  color: var(--color-charcoal-mid);
  line-height: var(--leading-snug);
  font-weight: var(--fw-medium);
  max-width: none;
}

/* Certification badge */
.cert-badge {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-cypress-muted);
  border: 1px solid rgba(0, 70, 67, 0.2);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-3);
}

.cert-badge__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.cert-badge__text {
  font-size: var(--text-sm);
  color: var(--color-cypress-darker);
  line-height: var(--leading-snug);
  max-width: none;
}

.cert-badge__text strong {
  font-weight: var(--fw-bold);
  display: block;
}

/* ── 6. GRADIENT CTA SECTION ─────────────────────────────── */
.section-cta-gradient {
  background: var(--color-cypress-darker);
  position: relative;
  overflow: hidden;
}

/* Shariah pattern overlay */
.section-cta-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/src/Branding/Green Pattern.png");
  background-size: 320px;
  background-repeat: repeat;
  opacity: 1;
  z-index: 0;
}

.section-cta-gradient__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.section-cta-gradient__heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-5);
}

.section-cta-gradient__heading em {
  display: block;
  font-style: italic;
  font-weight: var(--fw-light);
  color: var(--color-gcib-gold);
}

.section-cta-gradient__sub {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.65);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
  max-width: none;
}

/* ── 7. PILLARS / FEATURES ───────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.pillar-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.pillar-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}

.pillar-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(212, 175, 53, 0.25);
  transform: translateY(-3px);
}

.pillar-card:hover::after {
  transform: scaleX(1);
}

.pillar-card__icon {
  width: 52px;
  height: 52px;
  background: rgba(212, 175, 53, 0.1);
  border: 1px solid rgba(212, 175, 53, 0.2);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  transition: var(--transition-base);
}

.pillar-card:hover .pillar-card__icon {
  background: rgba(212, 175, 53, 0.18);
  border-color: rgba(212, 175, 53, 0.35);
}

.pillar-card__icon img {
  width: 26px;
  height: 26px;
  filter: brightness(0) saturate(100%) invert(80%) sepia(30%) saturate(600%)
    hue-rotate(5deg);
}

.pillar-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-3);
}

.pillar-card__desc {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.55);
  line-height: var(--leading-relaxed);
  max-width: none;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .section-rooted__grid,
  .section-how__grid {
    grid-template-columns: 1fr;
  }

  .rooted-carousel {
    height: 360px;
    order: -1;
  }

  .funds-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero__heading {
    font-size: 1.9rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start; /* Aligned left to match text */
    width: 100%;
    gap: var(--space-3);
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 200px;
    padding: var(--space-3);
    font-size: var(--text-sm);
    text-align: center;
    justify-content: center;
  }

  .section-adviser__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rooted-carousel {
    height: 300px;
  }
}

/* ============================================================
