/* =============================================================
   Footer – Clearbox Strategies
   Sprocket Rocket compatible | v2 – logo/column padding + CTA buttons
   ============================================================= */

/* ─────────────────────────────────────────────────────────────
   CSS CUSTOM PROPERTY DEFAULTS
   (Runtime values injected by module.html inline <style>)
   ───────────────────────────────────────────────────────────── */
.cb-footer {
  --cbf-font: 'Lexend Deca', sans-serif;
  --cbf-bg: #0d1525;
  --cbf-heading-color: #f4f4f0;
  --cbf-heading-size: 13px;
  --cbf-heading-weight: 600;
  --cbf-heading-transform: uppercase;
  --cbf-heading-spacing: 0.15em;
  --cbf-text-color: rgba(244, 244, 240, 0.60);
  --cbf-link-color: rgba(244, 244, 240, 0.70);
  --cbf-link-hover: #c8a951;
  --cbf-accent: #c8a951;
  --cbf-pad-top: 72px;
  --cbf-pad-bottom: 0px;
  --cbf-pad-left: 48px;
  --cbf-pad-right: 48px;
  --cbf-max-width: 1280px;
  --cbf-cols-gap: 48px;
  --cbf-icons-gap: 12px;
  --cbf-bb-bg: transparent;
  --cbf-bb-text: rgba(244, 244, 240, 0.45);
  --cbf-bb-size: 12px;
  --cbf-bb-pad-top: 28px;
  --cbf-bb-pad-bottom: 28px;
  --cbf-divider: rgba(255, 255, 255, 0.10);
  --cbf-logo-opacity: 1;

  /* Logo padding */
  --cbf-logo-pad-top: 0px;
  --cbf-logo-pad-bottom: 0px;
  --cbf-logo-pad-left: 0px;
  --cbf-logo-pad-right: 0px;

  /* Brand area padding */
  --cbf-brand-pad-top: 0px;
  --cbf-brand-pad-bottom: 0px;

  /* CTA zone */
  --cbf-cta-gap: 12px;
  --cbf-cta-pad-top: 16px;
  --cbf-cta-pad-bottom: 0px;
}

/* ─────────────────────────────────────────────────────────────
   FOOTER BASE
   ───────────────────────────────────────────────────────────── */
.cb-footer {
  position: relative;
  width: 100%;
  background: var(--cbf-bg);
  font-family: var(--cbf-font);
  color: var(--cbf-text-color);
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   INNER CONTAINER
   ───────────────────────────────────────────────────────────── */
.cb-footer__inner {
  max-width: var(--cbf-max-width);
  margin: 0 auto;
  padding: var(--cbf-pad-top) var(--cbf-pad-right) var(--cbf-pad-bottom) var(--cbf-pad-left);
}

/* ─────────────────────────────────────────────────────────────
   ICONS — ABOVE COLUMNS (full-width row)
   ───────────────────────────────────────────────────────────── */
.cb-footer__icons--above {
  margin-bottom: var(--cbf-cols-gap);
  padding-bottom: var(--cbf-cols-gap);
  border-bottom: 1px solid var(--cbf-divider);
}

/* ─────────────────────────────────────────────────────────────
   MAIN GRID
   ───────────────────────────────────────────────────────────── */
.cb-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cbf-cols-gap);
}

/* ─────────────────────────────────────────────────────────────
   BRAND COLUMN
   ───────────────────────────────────────────────────────────── */
.cb-footer__brand {
  flex: 0 0 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: var(--cbf-brand-pad-top);
  padding-bottom: var(--cbf-brand-pad-bottom);
}

/* Logo */
.cb-footer__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: var(--cbf-logo-opacity);
  transition: opacity 0.2s;
}

.cb-footer__logo:hover { opacity: 0.75; }

.cb-footer__logo img {
  display: block;
  height: auto;
  width: 100%;
  max-width: 180px;
  object-fit: contain;
}

.cb-footer__logo-text {
  font-family: var(--cbf-font);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--cbf-heading-color);
  white-space: nowrap;
}

/* Brand description */
.cb-footer__brand-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--cbf-text-color);
  max-width: 260px;
}

.cb-footer__brand-desc p { margin: 0; }
.cb-footer__brand-desc a {
  color: var(--cbf-link-color);
  text-decoration: none;
  transition: color 0.2s;
}
.cb-footer__brand-desc a:hover { color: var(--cbf-link-hover); }

/* ─────────────────────────────────────────────────────────────
   STACKABLE TEXT BLOCKS
   ───────────────────────────────────────────────────────────── */
.cb-footer__text-blocks {
  display: flex;
  flex-direction: column;
}

.cb-footer__text-block {
  font-size: inherit;
  line-height: 1.7;
  color: var(--cbf-text-color);
}

.cb-footer__text-block p { margin: 0; }
.cb-footer__text-block a {
  color: var(--cbf-link-color);
  text-decoration: none;
  transition: color 0.2s;
}
.cb-footer__text-block a:hover { color: var(--cbf-link-hover); }

/* Text gradient effect */
.cb-footer__text-block--gradient,
.cb-footer__text-block--gradient p,
.cb-footer__text-block--gradient span {
  background: var(--blk-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─────────────────────────────────────────────────────────────
   FOOTER COLUMNS
   ───────────────────────────────────────────────────────────── */
.cb-footer__col {
  flex: 1 1 140px;
  min-width: 0;
}

/* Column heading */
.cb-footer__col-heading {
  font-family: var(--cbf-font);
  font-size: var(--cbf-heading-size);
  font-weight: var(--cbf-heading-weight);
  text-transform: var(--cbf-heading-transform);
  letter-spacing: var(--cbf-heading-spacing);
  color: var(--cbf-heading-color);
  margin: 0 0 18px;
  line-height: 1.3;
}

/* Column content */
.cb-footer__col-content {
  font-size: var(--col-size, 0.88rem);
  font-weight: var(--col-weight, 400);
  line-height: 1.7;
  color: var(--cbf-text-color);
}

.cb-footer__col-content p {
  margin: 0 0 10px;
}

.cb-footer__col-content p:last-child { margin-bottom: 0; }

.cb-footer__col-content a {
  color: var(--cbf-link-color);
  text-decoration: none;
  transition: color 0.2s;
}

.cb-footer__col-content a:hover {
  color: var(--cbf-link-hover);
}

/* ─────────────────────────────────────────────────────────────
   SOCIAL ICONS — shared
   ───────────────────────────────────────────────────────────── */
.cb-footer__icons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cbf-icons-gap);
}

.cb-footer__icons--left   { justify-content: flex-start; }
.cb-footer__icons--center { justify-content: center; }
.cb-footer__icons--right  { justify-content: flex-end; }

/* Individual icon */
.cb-footer__icon {
  --ico-size: 24px;
  --ico-opacity: 0.70;
  --ico-hover-opacity: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ico-size);
  height: var(--ico-size);
  opacity: var(--ico-opacity);
  transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.cb-footer__icon:hover {
  opacity: var(--ico-hover-opacity);
}

.cb-footer__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Icon Animations ── */

/* Pulse — continuous subtle scale throb */
.cb-footer__icon--pulse {
  animation: cbf-pulse 2.4s ease-in-out infinite;
}

@keyframes cbf-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* Bounce — on hover only */
.cb-footer__icon--bounce:hover {
  animation: cbf-bounce 0.5s ease;
}

@keyframes cbf-bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-6px); }
  50%  { transform: translateY(0); }
  70%  { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

/* Float — gentle continuous up/down */
.cb-footer__icon--float {
  animation: cbf-float 3s ease-in-out infinite;
}

@keyframes cbf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Spin — continuous rotation */
.cb-footer__icon--spin {
  animation: cbf-spin 4s linear infinite;
}

@keyframes cbf-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Glow — shadow pulse */
.cb-footer__icon--glow {
  animation: cbf-glow 2.4s ease-in-out infinite;
}

@keyframes cbf-glow {
  0%, 100% { filter: drop-shadow(0 0 0px var(--cbf-accent)); }
  50%      { filter: drop-shadow(0 0 10px var(--cbf-accent)); }
}

/* Tilt — rotate on hover */
.cb-footer__icon--tilt:hover {
  transform: rotate(-12deg) scale(1.1);
}

/* ─────────────────────────────────────────────────────────────
   ICONS — brand-area placement (below brand desc)
   ───────────────────────────────────────────────────────────── */
.cb-footer__icons--brand {
  margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────────
   BOTTOM BAR
   ───────────────────────────────────────────────────────────── */
.cb-footer__bottom {
  max-width: var(--cbf-max-width);
  margin: 0 auto;
  padding: 0 var(--cbf-pad-right) 0 var(--cbf-pad-left);
}

.cb-footer__divider {
  height: 1px;
  background: var(--cbf-divider);
}

.cb-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: var(--cbf-bb-pad-top) 0 var(--cbf-bb-pad-bottom);
  background: var(--cbf-bb-bg);
}

/* Copyright */
.cb-footer__copyright {
  font-family: var(--cbf-font);
  font-size: var(--cbf-bb-size);
  color: var(--cbf-bb-text);
  margin: 0;
  line-height: 1.5;
}

/* Bottom bar links */
.cb-footer__bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
}

.cb-footer__bar-link {
  font-family: var(--cbf-font);
  font-size: var(--cbf-bb-size);
  color: var(--cbf-bb-text);
  text-decoration: none;
  transition: color 0.2s;
}

.cb-footer__bar-link:hover {
  color: var(--cbf-link-hover);
}

/* Icons inside bottom bar */
.cb-footer__icons--bar {
  margin-left: auto;
}

/* ─────────────────────────────────────────────────────────────
   CTA BUTTON GROUP
   ───────────────────────────────────────────────────────────── */
.cb-footer__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cbf-cta-gap);
  padding-top: var(--cbf-cta-pad-top);
  padding-bottom: var(--cbf-cta-pad-bottom);
}

/* Alignment modifiers */
.cb-footer__ctas--left   { justify-content: flex-start; }
.cb-footer__ctas--center { justify-content: center; }
.cb-footer__ctas--right  { justify-content: flex-end; }

/* Placement: above columns — full-width row with divider */
.cb-footer__ctas--above {
  margin-bottom: var(--cbf-cols-gap);
  padding-bottom: var(--cbf-cols-gap);
  border-bottom: 1px solid var(--cbf-divider);
}

/* Placement: brand-area — inside brand column */
.cb-footer__ctas--brand {
  margin-top: 4px;
}

/* Placement: own-column — inherits column sizing */
.cb-footer__ctas--column {
  flex-direction: column;
  align-items: flex-start;
}
.cb-footer__ctas--column.cb-footer__ctas--center { align-items: center; }
.cb-footer__ctas--column.cb-footer__ctas--right  { align-items: flex-end; }

/* Placement: below columns — full-width row with top divider */
.cb-footer__ctas--below {
  margin-top: var(--cbf-cols-gap);
  padding-top: var(--cbf-cols-gap);
  border-top: 1px solid var(--cbf-divider);
}

/* Placement: bottom-bar — inline in the bar */
.cb-footer__ctas--bar {
  margin-left: auto;
}

/* ─────────────────────────────────────────────────────────────
   CTA BUTTON BASE
   ───────────────────────────────────────────────────────────── */
.cb-footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--cbf-font);
  font-size: var(--fb-size, 13px);
  font-weight: var(--fb-weight, 600);
  letter-spacing: var(--fb-spacing, 0.1em);
  text-transform: var(--fb-transform, uppercase);
  line-height: 1.2;
  padding: var(--fb-pad-top, 12px) var(--fb-pad-right, 28px) var(--fb-pad-bottom, 12px) var(--fb-pad-left, 28px);
  border-radius: var(--fb-radius, 6px);
  border-style: solid;
  border-width: var(--fb-border-w, 2px);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease,
              transform 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.cb-footer__btn:focus-visible {
  outline: 2px solid var(--cbf-accent);
  outline-offset: 2px;
}

/* ── Solid variant ── */
.cb-footer__btn--solid {
  background: var(--fb-bg);
  color: var(--fb-txt, #ffffff);
  border-color: var(--fb-bg-flat);
}

.cb-footer__btn--solid:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.cb-footer__btn--solid:active {
  transform: translateY(0);
  filter: brightness(0.95);
  box-shadow: none;
}

/* ── Outline variant ── */
.cb-footer__btn--outline {
  background: transparent;
  color: var(--fb-txt, var(--cbf-link-color));
  border-color: var(--fb-bg-flat, var(--cbf-link-color));
}

.cb-footer__btn--outline:hover {
  background: var(--fb-bg-flat);
  color: var(--fb-txt, #ffffff);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.20);
}

.cb-footer__btn--outline:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Ghost variant ── */
.cb-footer__btn--ghost {
  background: transparent;
  color: var(--fb-txt, var(--cbf-link-color));
  border-color: transparent;
}

.cb-footer__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cbf-link-hover);
  transform: translateY(-1px);
}

.cb-footer__btn--ghost:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.03);
}

/* ── Button Arrow ── */
.cb-footer__btn-arrow {
  display: inline-block;
  font-size: 1.25em;
  line-height: 1;
  transition: transform 0.2s ease;
}

.cb-footer__btn:hover .cb-footer__btn-arrow {
  transform: translateX(3px);
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET (max 1024px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cb-footer__brand {
    flex: 0 0 240px;
  }

  .cb-footer__col {
    flex: 1 1 120px;
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE (max 768px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cb-footer__inner {
    padding-left: clamp(20px, 5vw, var(--cbf-pad-left));
    padding-right: clamp(20px, 5vw, var(--cbf-pad-right));
  }

  .cb-footer__grid {
    flex-direction: column;
    gap: 36px;
  }

  .cb-footer__brand {
    flex: 0 0 auto;
    width: 100%;
  }

  .cb-footer__brand-desc { max-width: 100%; }

  .cb-footer__col {
    flex: 0 0 auto;
    width: 100%;
  }

  /* Stack columns in 2-column grid on tablet-ish mobile */
  @supports (display: grid) {
    .cb-footer__grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 32px;
    }

    .cb-footer__brand {
      grid-column: 1 / -1;
    }
  }

  .cb-footer__bottom {
    padding-left: clamp(20px, 5vw, var(--cbf-pad-left));
    padding-right: clamp(20px, 5vw, var(--cbf-pad-right));
  }

  .cb-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cb-footer__icons--bar { margin-left: 0; }

  /* CTA responsive adjustments */
  .cb-footer__ctas--bar { margin-left: 0; }

  .cb-footer__ctas--column {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cb-footer__btn {
    flex: 0 1 auto;
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — SMALL MOBILE (max 480px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  @supports (display: grid) {
    .cb-footer__grid {
      grid-template-columns: 1fr;
    }
  }
}

/* ─────────────────────────────────────────────────────────────
   ENTRANCE ANIMATION ON SCROLL
   ───────────────────────────────────────────────────────────── */
.cb-footer[data-entrance="True"] .cb-footer__brand,
.cb-footer[data-entrance="True"] .cb-footer__col,
.cb-footer[data-entrance="True"] .cb-footer__icons--above,
.cb-footer[data-entrance="True"] .cb-footer__bottom-inner,
.cb-footer[data-entrance="true"] .cb-footer__brand,
.cb-footer[data-entrance="true"] .cb-footer__col,
.cb-footer[data-entrance="true"] .cb-footer__icons--above,
.cb-footer[data-entrance="true"] .cb-footer__bottom-inner {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
              transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.cb-footer[data-entrance="True"] .cb-footer__brand.is-visible,
.cb-footer[data-entrance="True"] .cb-footer__col.is-visible,
.cb-footer[data-entrance="True"] .cb-footer__icons--above.is-visible,
.cb-footer[data-entrance="True"] .cb-footer__bottom-inner.is-visible,
.cb-footer[data-entrance="true"] .cb-footer__brand.is-visible,
.cb-footer[data-entrance="true"] .cb-footer__col.is-visible,
.cb-footer[data-entrance="true"] .cb-footer__icons--above.is-visible,
.cb-footer[data-entrance="true"] .cb-footer__bottom-inner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cb-footer__icon,
  .cb-footer__logo,
  .cb-footer__bar-link,
  .cb-footer__col-content a,
  .cb-footer__brand-desc a,
  .cb-footer__btn,
  .cb-footer__btn-arrow {
    transition: none;
  }

  .cb-footer__icon--pulse,
  .cb-footer__icon--float,
  .cb-footer__icon--spin,
  .cb-footer__icon--glow {
    animation: none;
  }

  .cb-footer__btn:hover,
  .cb-footer__btn:active {
    transform: none;
  }

  .cb-footer[data-entrance="True"] .cb-footer__brand,
  .cb-footer[data-entrance="True"] .cb-footer__col,
  .cb-footer[data-entrance="True"] .cb-footer__icons--above,
  .cb-footer[data-entrance="True"] .cb-footer__bottom-inner,
  .cb-footer[data-entrance="true"] .cb-footer__brand,
  .cb-footer[data-entrance="true"] .cb-footer__col,
  .cb-footer[data-entrance="true"] .cb-footer__icons--above,
  .cb-footer[data-entrance="true"] .cb-footer__bottom-inner {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
