/*
  Footer Styles - aduki, Inc.
  Modern, Animated Footer with Cyber-Industrial Aesthetic
*/

a {
  color: var(--accent-primary);
}

a:hover {
  text-decoration: underline;
}

/* Footer Container */
footer.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-base);
  margin: 0;
  padding: 40px 0 20px 0;
  width: 100%;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.8s ease-in-out;
}

/* Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer Content Grid — logo + 3 link columns */
footer.footer > div.content {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 300px 1fr 1fr 1fr;
  align-items: start;
  gap: 40px;
  margin-bottom: 40px;
  padding: 0 40px;
  box-sizing: border-box;
}

/* Logo Section */
footer.footer > div.content > div.logo-section {
  display: flex;
  flex-flow: column;
  gap: 15px;
  justify-content: flex-start;
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

footer.footer div.logo-section > div.logo-info {
  display: flex;
  flex-flow: column;
  gap: 0;
}

footer.footer div.logo-section > div.logo-info > div.logo {
  max-height: max-content;
  position: relative;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 12px;
  flex-flow: row nowrap;
  width: max-content;
  align-items: center;
}

/* Accent Bar with Gradient */
footer.footer div.logo-section > div.logo-info > div.logo span.bar {
  display: inline-block;
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  border-radius: 15px;
  box-shadow: 0 0 10px var(--accent-primary);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 10px var(--accent-primary);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 20px var(--accent-primary);
    opacity: 0.8;
  }
}

footer.footer div.logo-section > div.logo-info > div.logo h2 {
  margin: 0;
  padding: 0;
  line-height: 1.2;
  color: var(--text-primary);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 20px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

footer.footer div.logo-section > div.logo-info > div.logo:hover h2 {
  color: var(--accent-primary);
}

footer.footer div.logo-section > div.logo-info > div.logo span.art {
  margin: 0;
  color: var(--text-tertiary);
  line-height: 1.2;
  font-family: var(--sans);
  letter-spacing: 3px;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
}

footer.footer div.logo-section > div.logo-info > div.logo:hover span.art {
  letter-spacing: 4px;
  color: var(--accent-secondary);
}

/* Slogan */
footer.footer div.logo-section > div.logo-info > p.slogan {
  margin: 10px 0 0 0;
  font-size: 13px;
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Footer Links Sections — each is one focused column */
footer.footer .footer-links {
  display: flex;
  flex-flow: column;
  gap: 0;
  color: var(--text-secondary);
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
}

footer.footer .footer-links:nth-child(2) { animation-delay: 0.1s; }
footer.footer .footer-links:nth-child(3) { animation-delay: 0.2s; }
footer.footer .footer-links:nth-child(4) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

div.footer-links > div.props {
  display: flex;
  flex-flow: column;
  gap: 15px;
  color: var(--text-secondary);
}

/* Modern Animated Heading */
div.footer-links > div.props > h2.title {
  margin: 5px 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: .08em;
  position: relative;
  padding-bottom: 8px;
  width: fit-content;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
}

/* Gradient Underline with Slide Effect */
div.footer-links > div.props > h2.title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 25px;
  height: 3px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  transition: all 0.4s ease;
  border-radius: 2px;
}

/* Hover State */
div.footer-links > div.props:hover > h2.title {
  color: var(--accent-primary);
}

div.footer-links > div.props:hover > h2.title::after {
  width: 100%;
  animation: linePulse 1.5s infinite;
}

@keyframes linePulse {
  0% {
    opacity: 0.8;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.3);
    box-shadow: 0 0 20px var(--accent-primary);
  }
  100% {
    opacity: 0.8;
    filter: brightness(1);
  }
}

footer.footer div.actions {
  display: flex;
  flex-flow: column;
  gap: 10px;
  width: 100%;
  height: max-content;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
}

footer.footer div.actions > a.action {
  display: flex;
  align-items: start;
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  color: var(--accent-primary);
  font-weight: 400;
  border-radius: 12px;
  background: var(--surface-base);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

footer.footer div.actions > a.action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--surface-overlay) 0%,
    var(--surface-sunken) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

footer.footer div.actions > a.action::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  opacity: 0;
  z-index: 0;
  transition: opacity 0.4s ease;
}

footer.footer div.actions > a.action > * {
  position: relative;
  z-index: 1;
}

footer.footer div.actions > a.action:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 24px rgba(8, 184, 111, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

footer.footer div.actions > a.action:hover::before {
  opacity: 1;
}

footer.footer div.actions > a.action:hover > span.info > span.title {
  color: var(--accent-primary);
}

footer.footer div.actions > a.action:hover > span.info > span.description {
  color: var(--text-tertiary);
}

footer.footer div.actions > a.action:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 4px 12px rgba(8, 184, 111, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.05);
}

footer.footer div.actions > a.action > svg {
  width: 32px;
  height: 32px;
  display: inline-block;
  margin-top: 2px;
  color: var(--accent-primary);
}

footer.footer div.actions > a.action > span.info {
  display: flex;
  flex-flow: column;
  gap: 4px;
  width: calc(100% - 35px);
}

footer.footer div.actions > a.action > span.info > span.title {
  font-weight: 500;
  color: var(--accent-primary);
  font-size: 13px;
}

footer.footer div.actions > a.action > span.info > span.description {
  font-weight: 500;
  font-size: 11px;
  color: var(--text-tertiary);
}

footer.footer div.actions > a.action > span.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  position: relative;
}

footer.footer div.actions > a.action > span.icon > svg {
  position: absolute;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

footer.footer div.actions > a.action > span.icon > svg.default {
  opacity: 1;
  transform: translateX(0);
}

footer.footer div.actions > a.action > span.icon > svg.hovered {
  opacity: 0;
  transform: translateX(8px);
}

footer.footer div.actions > a.action:hover > span.icon > svg.default {
  opacity: 0;
  transform: translateX(-8px);
}

footer.footer div.actions > a.action:hover > span.icon > svg.hovered {
  opacity: 1;
  transform: translateX(0);
}

/* Modern List Styles with colored SVG masks */
div.footer-links > div.props > ul.links {
  margin: 0;
  padding: 0;
  list-style-type: none;
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}

div.footer-links > div.props > ul.links > li.link-item {
  color: var(--text-secondary);
  position: relative;
  padding: 0;
  padding-left: 28px; /* Space for the icon */
  transition: all 0.3s ease;
  display: flex;
  cursor: pointer;
  align-items: center;
}

/* Common Icon Style using Mask */
div.footer-links > div.props > ul.links > li.link-item::before {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 18px;
  background-color: var(--text-tertiary); /* Default color */
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

/* Specific Icons using SVG masks */
div.footer-links > div.props.specs > ul.links > li.link-item::before {
  -webkit-mask-image: url(/static/svgs/li/tick.svg);
  mask-image: url(/static/svgs/li/tick.svg);
}

div.footer-links > div.props.developers > ul.links > li.link-item::before {
  -webkit-mask-image: url(/static/svgs/li/pin.svg);
  mask-image: url(/static/svgs/li/pin.svg);
}

div.footer-links > div.props.community > ul.links > li.link-item::before {
  -webkit-mask-image: url(/static/svgs/li/pin.svg);
  mask-image: url(/static/svgs/li/pin.svg);
}

/* Hover Effects */
div.footer-links > div.props > ul.links > li.link-item:hover::before {
  background-color: var(--accent-secondary);
  transform: scale(1.1);
}

div.footer-links > div.props > ul.links > li.link-item:hover {
  color: var(--accent-secondary);
}

div.footer-links > div.props > ul.links > li.link-item:hover > a {
  color: var(--accent-primary);
}

div.footer-links > div.props > ul.links > li.link-item > a {
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

div.footer-links > div.props > ul.links > li.link-item > a:hover {
  color: var(--accent-primary);
}

/* Bottom Links Section */
footer.footer > div.links {
  padding: 20px 0 0 0;
  width: 1200px;
  max-width: 100%;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-flow: row;
  align-items: center;
  justify-content: space-between;
  padding-left: 40px;
  padding-right: 40px;
  box-sizing: border-box;
  animation: fadeIn 1s ease-in-out 0.4s both;
}

/* Social Icons */
footer.footer > div.links .social {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}

footer.footer > div.links > .social > a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 8px;
  border-radius: 25px;
  background: transparent;
  transition: all 0.3s ease;
  position: relative;
}

footer.footer > div.links > .social > a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 25px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: -1;
}

footer.footer > div.links > .social > a:hover {
  color: var(--white);
  transform: translateY(-3px) scale(1.1);
}

footer.footer > div.links > .social > a:hover::before {
  opacity: 1;
}

footer.footer > div.links > .social > a svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

footer.footer > div.links > .social > a:hover svg {
  transform: rotate(5deg);
}

/* Right Section - Copyright */
footer.footer > div.links > .right {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

footer.footer > div.links > .right > a {
  text-decoration: none;
  color: var(--text-tertiary);
  font-size: 13px;
  font-family: var(--sans);
  transition: all 0.3s ease;
  position: relative;
}

footer.footer > div.links > .right > a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

footer.footer > div.links > .right > a:hover {
  color: var(--accent-primary);
}

footer.footer > div.links > .right > a:hover::after {
  width: 100%;
}

footer.footer > div.links > .right > span.copy {
  text-decoration: none;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--sans);
  padding-left: 20px;
  border-left: 1px solid var(--border-subtle);
}

footer.footer > div.links > .right > span.copy > span.year {
  color: var(--accent-primary);
  font-weight: 500;
  display: inline-block;
  padding: 0 3px 0 0;
  font-family: var(--sans);
  font-size: 13px;
}

@media (max-width: 1200px) {
  footer.footer {
    padding: 40px 20px 20px;
  }

  footer.footer > div.content {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  footer.footer > div.links {
    width: 100%;
    max-width: 100%;
  }
}

/* Tablet ; collapse to 2 cols: logo full width, then 3 link cols become a 3-col row */
@media (max-width: 1024px) {
  footer.footer > div.content {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    padding: 0;
  }

  footer.footer {
    padding: 40px 10px;
  }

  footer.footer > div.content > div.logo-section {
    grid-column: 1 / -1;
  }

  footer.footer > div.links {
    flex-flow: column;
    gap: 20px;
  }
}

/* Mobile ; single column */
@media (max-width: 700px) {
  footer.footer {
    padding: 30px 10px 20px;
  }

  footer.footer > div.content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 0;
  }

  footer.footer > .links {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 20px 10px;
  }

  footer.footer > .links > .right {
    flex-direction: column;
    gap: 10px;
  }

  footer.footer > div.links {
    display: flex;
    flex-flow: column;
    padding: 20px 0;
  }


  footer.footer > div.links > .right > span.copy {
    border-left: none;
    padding: 10px 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: 10px;
    font-size: 14px;
  }

  footer.footer > div.links > .right {
    gap: 10px;
  }

  footer.footer > .links > .right > span.copy {
    border-left: none;
    padding: 10px 0;
    border-top: 1px solid var(--border-subtle);
  }
}

@media (max-width: 430px) {
  footer.footer > div.content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0;
  }
}
