/* ==========================================================================
   The site footer (footer.ckf): the brand blue gradient with one white card,
   identical on every page and every screen size.
   Markup is the same block on all pages; js/scripts.js injects the same footer
   on any page whose footer is missing it.
   The logo size still comes from css/site-footer.css (.footer-brand-logo);
   that file's other rules belong to the retired footer-wantace markup.
   ========================================================================== */

footer.ckf {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: 104px 0 40px;
  border-radius: 32px 32px 0 0;
  color: #111111;
  background-color: #1760ff;
  background-image:
    linear-gradient(180deg, rgba(239, 244, 255, .9) 0%, rgba(193, 211, 255, .95) 16%, rgba(93, 146, 255, .98) 54%, #1760ff 100%),
    url("../images/backgrounds/wantace-grid-pattern.png");
  background-position: center, left top;
  background-repeat: no-repeat, repeat;
  background-size: cover, 355px auto;
  text-align: left;
}
/* css/rhythm/<page>.css sets a different top padding and margin on each page's footer
   (0 to 56px, sometimes a negative margin). The footer keeps its own spacing everywhere. */
html body:not(#ckf-a):not(#ckf-b):not(#ckf-c):not(#ckf-d):not(#ckf-e):not(#ckf-f) > footer.ckf { padding-top: 104px !important; margin-top: 0 !important; }
footer.ckf *, footer.ckf *::before, footer.ckf *::after { box-sizing: border-box; }
footer.ckf a { text-decoration: none; }

.ckf-wrap { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }

.ckf-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 44px 22px;
  box-shadow: 0 30px 60px -36px rgba(15, 23, 42, .45);
}

/* Row 1: brand and page links */
.ckf-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 40px;
  padding-bottom: 26px;
}
footer.ckf .ckf-brand { display: inline-flex; align-items: center; gap: 10px; }
/* The phone header rule in styles.css makes .brand-name bold and bigger: same name, same size everywhere. */
footer.ckf .ckf-brand .brand-name { color: #111111 !important; font-size: 20px !important; font-weight: 500 !important; letter-spacing: -.02em !important; line-height: 1.2; }
.ckf-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; padding: 0; list-style: none; }
footer.ckf .ckf-links a { color: #334155; font-size: 15px; line-height: 1.4; transition: color .2s ease; }
footer.ckf .ckf-links a:hover { color: #2563eb; }

/* Row 2: contact and outside profiles */
.ckf-mid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 22px 0;
  border-top: 1px solid #edf1f7;
}
.ckf-contact { display: flex; flex-wrap: wrap; gap: 10px 26px; }
footer.ckf .ckf-contact a { display: inline-flex; align-items: center; gap: 10px; color: #111111; font-size: 15px; line-height: 1.3; transition: color .2s ease; }
footer.ckf .ckf-contact a:hover { color: #2563eb; }
.ckf-ico { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: #eff5ff; color: #2563eb; }
.ckf-ico svg { width: 14px; height: 14px; }

.ckf-social { display: flex; flex-wrap: wrap; gap: 8px; }
footer.ckf .ckf-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 34px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  line-height: 1;
  transition: color .2s ease, border-color .2s ease;
}
footer.ckf .ckf-social a.ckf-icon { padding: 0; width: 34px; }
footer.ckf .ckf-social a:hover { border-color: #2563eb; color: #2563eb; }
.ckf-social svg { width: 14px; height: 14px; flex: 0 0 auto; }
.ckf-star { color: #2563eb; }

/* Row 3: the full services and markets directory, closed by default */
.ckf-dir { border-top: 1px solid #edf1f7; border-bottom: 1px solid #edf1f7; }
.ckf-dir > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 0;
  color: #334155;
  font-size: 14px;
  list-style: none;
  cursor: pointer;
}
.ckf-dir > summary::-webkit-details-marker { display: none; }
.ckf-dir > summary svg { color: #2563eb; transition: transform .2s ease; }
.ckf-dir[open] > summary svg { transform: rotate(180deg); }
.ckf-dir > summary:hover { color: #2563eb; }
footer.ckf #services-hub { padding: 8px 0 24px !important; }
footer.ckf #services-hub .ck-services-container { max-width: none; padding: 0; }
footer.ckf .footer-taxonomy-bar { padding: 4px 0 22px; color: #94a3b8; font-size: 12px; line-height: 1.7; text-align: center; }
footer.ckf .footer-taxonomy-title { margin-bottom: 4px; color: #64748b; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

/* Row 4: copyright and legal */
.ckf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}
.ckf-copy { font-size: inherit; color: inherit; }
.ckf-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
footer.ckf .ckf-legal a { color: #64748b; transition: color .2s ease; }
footer.ckf .ckf-legal a:hover { color: #2563eb; }
footer.ckf .ckf-legal .link-separator { color: #cbd5e1; }

/* Under the card, on the blue: the other Curious Kaizer sites */
footer.ckf .ckf-network {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 28px 0 0;
  padding: 0 12px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}
.ckf-network > span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
footer.ckf .ckf-network a { color: #fff; font-size: 14px; transition: opacity .2s ease; }
footer.ckf .ckf-network a:hover { opacity: .8; text-decoration: underline; text-underline-offset: 3px; }

footer.ckf a:focus-visible, footer.ckf summary:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; border-radius: 6px; }
footer.ckf .ckf-network a:focus-visible { outline-color: #fff; }

@media (max-width: 900px) {
  footer.ckf { padding: 80px 0 32px; }
  html body:not(#ckf-a):not(#ckf-b):not(#ckf-c):not(#ckf-d):not(#ckf-e):not(#ckf-f) > footer.ckf { padding-top: 80px !important; }
  .ckf-card { padding: 30px 30px 20px; }
  footer.ckf .ckf-network { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  footer.ckf { padding: 56px 0 calc(28px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; }
  html body:not(#ckf-a):not(#ckf-b):not(#ckf-c):not(#ckf-d):not(#ckf-e):not(#ckf-f) > footer.ckf { padding-top: 56px !important; }
  .ckf-wrap { width: calc(100% - 32px); }
  .ckf-card { padding: 24px 20px 16px; border-radius: 18px; }
  .ckf-top { gap: 16px; padding-bottom: 20px; }
  .ckf-links { gap: 10px 20px; }
  footer.ckf .ckf-links a { font-size: 14.5px; }
  .ckf-mid { gap: 16px; padding: 18px 0; }
  .ckf-contact { flex-direction: column; gap: 10px; }
  footer.ckf .ckf-contact a { font-size: 14.5px; }
  footer.ckf #services-hub .ck-services-container { padding: 0; }
  .ckf-bottom { padding-top: 14px; font-size: 12.5px; }
  footer.ckf .ckf-network { gap: 14px 12px; margin-top: 22px; padding: 0; font-size: 12px; }
  footer.ckf .ckf-network a { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  footer.ckf *, footer.ckf *::before, footer.ckf *::after { transition: none !important; }
}
