/* ==========================================================================
   FOOTER SYSTEM (footer.css)
   thomascherickal.github.io
   Complete footer styles: Brand, KIT Newsletter, Social Links, Work Grid & Copyright.
   ========================================================================== */

footer,
#links {
  background: var(--bg-1, #060912);
  border-top: 1px solid var(--border, rgba(56, 189, 248, 0.22));
  padding: 4rem clamp(1.5rem, 6vw, 6rem) 2.5rem;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
}

.footer-top-divider {
  display: none;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

@keyframes tcLogoPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.3), 0 0 0 1px rgba(56, 189, 248, 0.2);
    filter: brightness(1) drop-shadow(0 2px 8px rgba(56, 189, 248, 0.25));
  }
  50% {
    transform: translateY(-3px) scale(1.04);
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.55), 0 0 16px rgba(245, 158, 11, 0.4), 0 0 0 1.5px rgba(245, 158, 11, 0.45);
    filter: brightness(1.12) drop-shadow(0 4px 14px rgba(245, 158, 11, 0.35));
  }
}

.footer-brand-logo-link {
  display: inline-flex;
  text-decoration: none;
  border-radius: 8px;
}

.footer-brand-logo {
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
  animation: tcLogoPulse 3.5s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform, box-shadow;
}

.footer-brand:hover .footer-brand-logo {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 0 32px rgba(56, 189, 248, 0.7), 0 0 18px rgba(245, 158, 11, 0.5);
  border-color: #38bdf8;
}

@media (prefers-reduced-motion: reduce) {
  .footer-brand-logo {
    animation: none;
  }
}

.footer-brand-name {
  font-family: var(--font-display, 'Open Sans', sans-serif);
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan, #38bdf8), var(--gold, #fbbf24));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.footer-brand-tagline {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan, #38bdf8);
  margin-bottom: 1.25rem;
}

/* Newsletter Pane & Card */
.footer-newsletter-wrap,
.footer-top > div:last-child {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  max-width: 680px;
  min-width: 0;
}

.footer-top .newsletter-card {
  margin-top: 0;
}

.newsletter-card {
  margin-top: 0;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card, linear-gradient(145deg, #0c111d 0%, #04060c 100%));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.newsletter-card .btn,
.newsletter-card a.btn {
  width: auto !important;
  max-width: max-content !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  padding: 0.55rem 1.15rem !important;
  font-size: 0.76rem !important;
  min-height: 38px !important;
  border-radius: 8px !important;
  margin-left: auto;
}

.newsletter-info {
  flex: 1 1 auto;
  min-width: 0;
}

.newsletter-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.newsletter-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold, #fbbf24);
  margin-bottom: 0.2rem;
  white-space: nowrap;
}

.newsletter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #F87171;
  flex-shrink: 0;
}

.newsletter-svg {
  width: 18px;
  height: 18px;
  fill: #F87171;
  display: block;
}

.location-svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  fill: var(--cyan);
  margin-right: 4px;
}

/* Social Grid & Links */
.social-icon {
  font-size: 1rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.social-icon svg,
.social-svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.social-link:hover .social-icon svg,
.social-link:hover .social-svg {
  transform: scale(1.22);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
}

.social-link {
  background: var(--bg-card, linear-gradient(145deg, #0c111d 0%, #04060c 100%));
  border-radius: var(--radius, 10px);
  text-decoration: none;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.03em;
  color: var(--text-secondary, #e2e8f0);
  border: 2px solid rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35), 0 0 28px rgba(56, 189, 248, 0.18), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem !important;
  font-size: 0.82rem !important;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.9), 0 0 45px rgba(56, 189, 248, 0.5), 0 4px 14px rgba(0, 0, 0, 0.5) !important;
  color: #ffffff;
  transform: translateY(-2px);
}

.social-link.highlight {
  background: rgba(245, 158, 11, 0.1);
  border: 2px solid rgba(251, 191, 36, 0.75) !important;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  color: var(--gold, #fbbf24);
  font-weight: 600;
}

.social-link.highlight:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24 !important;
  box-shadow: 0 0 26px rgba(251, 191, 36, 0.85), 0 4px 14px rgba(0, 0, 0, 0.5) !important;
  color: #ffffff;
  transform: translateY(-2px);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 0.6rem;
}

@media (min-width: 1750px) {
  .social-grid {
    grid-template-columns: repeat(10, 1fr);
  }
}

/* Work With Me Grid (.wg) */
.tc-label {
  font-size: 13.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

.wg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 1.5rem;
}

/* Work With Me Desktop/Laptop 6-Pane Single Row (.footer-work-row) */
.footer-work-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .footer-work-row {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 8px !important;
  }

  .footer-work-row .wl {
    padding: 10px 8px !important;
    gap: 4px !important;
  }

  .footer-work-row .wl-head {
    gap: 6px !important;
  }

  .footer-work-row .wl-ic {
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
  }

  .footer-work-row .wl-ic svg {
    width: 14px !important;
    height: 14px !important;
  }

  .footer-work-row .wl-name {
    font-size: clamp(11.5px, 0.82vw, 13px) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.25 !important;
  }

  .footer-work-row .wl-desc {
    font-size: clamp(10px, 0.7vw, 11.2px) !important;
    color: #94a3b8 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }

  .footer-work-row .wl-url {
    font-size: clamp(9px, 0.62vw, 10.2px) !important;
    color: #38bdf8 !important;
    font-family: var(--font-mono, monospace) !important;
    opacity: 0.85 !important;
    margin-top: auto !important;
    word-break: break-all !important;
    line-height: 1.25 !important;
  }
}

.wl {
  border: 1px solid #253147;
  border-radius: 10px;
  padding: 13px 15px;
  text-decoration: none;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #131926;
  min-width: 0;
  transition: background .14s, border-color .14s, transform .12s, box-shadow .14s;
}

.wl:hover {
  background: #1c2539;
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.wl-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wl-ic {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1c2436;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wl-ic svg {
  display: block;
}

.wl-name {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.wl-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.wl-url {
  font-size: 12.5px;
  color: #38bdf8;
  font-family: var(--font-mono, monospace);
  opacity: .85;
  margin-top: auto;
  word-break: break-all;
}

.wl:hover .wl-url {
  opacity: 1;
  text-decoration: underline;
}

/* Divider & Copyright */
.dv {
  border: none;
  border-top: 1px solid #232d42;
  margin: 1.45rem 0;
}

.tc-copy {
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.8;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 0 10px;
}

.tc-copy a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  transition: color .14s;
}

.tc-copy a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.tc-copy span.tc-sep {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #10b981);
  vertical-align: middle;
  border-radius: 2px;
  margin: 0 8px;
}

/* Footer Responsive Breakpoints */
@media (max-width: 1366px) {
  .wg:not(.footer-work-row) {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
}

@media (max-width: 1023px) {
  .footer-work-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }

  .footer-work-row .wl-name {
    font-size: 13px !important;
  }

  .footer-work-row .wl-desc {
    font-size: 11.5px !important;
  }

  .footer-work-row .wl-url {
    font-size: 10.5px !important;
  }
}

@media (max-width: 1024px) {
  .footer-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.5rem !important;
  }

  .footer-newsletter-wrap,
  .footer-top > div:last-child {
    justify-content: flex-start !important;
    width: 100% !important;
  }

  .newsletter-card {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  .wg,
  .footer-work-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  .footer-work-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

@media (max-width: 600px) {
  .newsletter-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    width: 100%;
    max-width: 100%;
  }

  .newsletter-name {
    font-size: 0.82rem;
    white-space: normal;
  }

  .newsletter-desc {
    font-size: 0.74rem;
  }

  .newsletter-card .btn,
  .newsletter-card a.btn {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.72rem !important;
    min-height: 34px !important;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .wg {
    grid-template-columns: 1fr !important;
  }
}
