/* ========================================================================== 
   Patička – plnošířková tmavě zelená plocha
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: 0;
  width: 100%;
  margin: clamp(8rem, 12vw, 13rem) 0 0;
  background: var(--c-ink);
  color: var(--c-white);
}

.footer__mask {
  position: absolute;
  left: 0;
  /* Dvoupixelový přesah eliminuje subpixelovou mezeru mezi SVG a footerem. */
  bottom: calc(100% - 2px);
  width: 100%;
  max-width: none;
  height: auto;
  z-index: 1;
  pointer-events: none;
}

.footer__inner {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding-top: clamp(3.5rem, 7vw, 7rem);
}

.footer__top {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
}

.footer__lead,
.footer__col {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.5rem;
}

.footer__lead p {
  max-width: 19rem;
  font-size: var(--fs-body);
  line-height: 1.5;
}

.footer__lead span,
.footer__col > span {
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--fs-body);
  line-height: 1.5;
}

.footer__heading {
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-body);
  line-height: 1.5;
}

.footer__col > a {
  position: relative;
  overflow-wrap: anywhere;
  width: fit-content;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  transition: color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

/* aktuální stránka – zlatá značka vlevo, bez posunu */
.footer__col > a[aria-current="page"] {
  color: var(--c-white);
}

.footer__col > a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -0.875rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.25rem;
  border-radius: 1px;
  background: var(--c-gold);
}

@media (hover: hover) {
  .footer__col > a:hover {
    color: var(--c-white);
    transform: translateX(0.25rem);
  }
}

.footer__socials {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

.footer__social {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--c-white);
  opacity: 0.72;
  transition: color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out), transform var(--dur) var(--ease-spring);
}

.footer__social svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: currentColor;
}

.footer__social:first-child svg {
  fill: none;
}

.footer__social--yt svg {
  stroke: none;
  fill-rule: evenodd;
}

@media (hover: hover) {
  .footer__social:hover {
    color: var(--c-white);
    opacity: 1;
    transform: translateY(-0.2rem);
  }
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-1) var(--s-4);
  margin-top: clamp(4rem, 8vw, 8rem);
}

.footer__legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
}

.footer__legal {
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--fs-body);
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: color var(--dur) var(--ease-out), background-size var(--dur) var(--ease-out);
}

@media (hover: hover) {
  .footer__legal:hover {
    color: rgba(255, 255, 255, 0.8);
    background-size: 100% 1px;
  }
}

.footer__copyright {
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--fs-body);
}

/* podpis tvůrce webu: text + logo, celé je odkaz */
.footer__credit {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 2.75rem;
  margin-top: var(--s-3);
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--fs-body);
  transition: color var(--dur) var(--ease-out);
}

.footer__credit img {
  display: block;
  width: auto;
  height: 1.5rem;
  opacity: 0.6;
  transition: opacity var(--dur) var(--ease-out);
}

@media (hover: hover) {
  .footer__credit:hover {
    color: rgba(255, 255, 255, 0.8);
  }

  .footer__credit:hover img {
    opacity: 1;
  }
}

.footer__brand {
  /* Ořez na y ≈ 2110 z viewBoxu 0 61 7240 2909:
     celé „Vykupujeme“ + zhruba horní polovina „Trámy“. */
  aspect-ratio: 7240 / 2110;
  margin-top: var(--s-4);
  overflow: hidden;
}

.footer__logo {
  --logo-accent: currentColor;
  display: block;
  width: min(100%, 100rem);
  height: auto;
  color: var(--c-white);
  opacity: 0.12;
}

@media (max-width: 1199px) {
  .footer__top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1.3fr);
    row-gap: var(--s-6);
  }

  .footer__lead {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .site-footer {
    margin-top: 8rem;
  }

  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-5) var(--s-3);
  }

  .footer__bottom {
    margin-top: var(--s-7);
  }

  .footer__logo {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 479px) {
  .footer__contact {
    grid-column: 1 / -1;
  }
}
