/* ==========================================================================
   footer.css — Shared footer + closing CTA styles
   ========================================================================== */

/* ==========================================================================
   CLOSING CTA SECTION (appears on every page)
   ========================================================================== */

.closing-cta-block {
  margin-top: 140px;
  text-align: center;
  /* The MVC views render this block outside the page .container, so constrain
     it to the container width here (logical props for RTL). */
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.closing-cta-eyebrow-row {
  display: flex;
  justify-content: center;
}

.closing-cta-heading {
  margin: 20px 0 56px;
  font-weight: 800;
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.15;
  color: var(--text);
}

.script-gradient {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 400;
  background: var(--gradient-script);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.closing-cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}

.closing-cta-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.closing-cta-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 0;
}

.closing-cta-card-title--large {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  margin: 8px 0 0;
}

.closing-cta-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.closing-cta-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.closing-cta-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease;
}

.closing-cta-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .closing-cta-link {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .closing-cta-link:hover {
  background: rgba(0, 0, 0, 0.08);
}

.closing-cta-link-arrow {
  font-size: 16px;
}

/* GitHub card specific */
.closing-cta-github-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.closing-cta-github-icon {
  width: 22px;
  height: 22px;
  color: var(--text);
}

.closing-cta-github-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.closing-cta-latest-push {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.closing-cta-latest-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.closing-cta-latest-badge {
  font-size: 11px;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

.closing-cta-commit-msg {
  font-size: 14px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.closing-cta-commit-files {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.closing-cta-file-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.closing-cta-github-stats {
  display: flex;
  gap: 32px;
  margin-top: 8px;
}

.closing-cta-stat-number {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.closing-cta-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.closing-cta-social-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.closing-cta-social-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.closing-cta-social-icon:hover {
  color: var(--text);
}

/* Visitors / Guestbook card */
.closing-cta-avatars {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.closing-cta-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--bg);
  margin-left: -6px;
}

.closing-cta-avatar:first-child {
  margin-left: 0;
}

.closing-cta-avatar-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

@media (max-width: 860px) {
  .closing-cta-grid {
    grid-template-columns: 1fr;
  }

  .closing-cta-block {
    margin-top: 80px;
  }

  .closing-cta-heading {
    margin-bottom: 36px;
  }
}

@media (max-width: 480px) {
  .closing-cta-block {
    margin-top: 56px;
  }

  .closing-cta-heading {
    margin-bottom: 28px;
  }

  .closing-cta-card {
    padding: 22px 18px;
  }

  .closing-cta-link {
    padding: 12px 16px;
    min-height: 44px;
  }

  .closing-cta-github-stats {
    gap: 24px;
  }

  .closing-cta-stat-number {
    font-size: 24px;
  }
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */

.site-footer {
  padding: 48px var(--gutter) 24px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--container-w);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-logo {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.footer-logo span {
  color: var(--text-muted);
  font-weight: 400;
}

.footer-credit {
  font-size: 13px;
  color: var(--text-faint);
}

.footer-credit a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
}

.footer-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav-link:hover {
  color: var(--text);
}

.footer-social {
  display: flex;
  gap: 16px;
  justify-self: end;
  align-items: center;
}

.footer-social-link {
  color: var(--text-muted);
  transition: color 0.2s ease;
  display: flex;
}

.footer-social-link:hover {
  color: var(--text);
}

.footer-social-link svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}

.footer-bottom-sep {
  color: var(--text-faint);
  opacity: 0.4;
}

.footer-bottom a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: var(--text-muted);
}

.footer-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* Scroll-to-top / progress button */
.scroll-progress-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.scroll-progress-btn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-social {
    justify-self: center;
  }

  .footer-nav {
    justify-content: center;
  }

  .footer-bottom {
    flex-wrap: wrap;
    gap: 8px;
  }

  .site-footer {
    padding: 36px var(--gutter) 20px;
    margin-top: 56px;
  }

  .footer-social-link {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 28px var(--gutter) 16px;
    margin-top: 40px;
  }

  .footer-bottom {
    font-size: 12px;
  }

  .scroll-progress-btn {
    bottom: 16px;
    right: 16px;
  }
}
