/* Section shell — transparent, continues the global .site-bg canvas,
   same reasoning as every other section (no own background = no seam).
   isolation:isolate gives the decorative watermark its own local
   stacking context so a negative z-index can put it behind the text
   without any risk of it dropping behind .site-bg. */
.footer {
  position: relative;
  isolation: isolate;
  background: transparent;
  font-family: var(--font-body);
  padding: 44px 0 24px;
}

.footer__container {
  position: relative;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--section-padding);
}

/* Giant faint corner wordmark — same idiom as .portfolio__label-main
   (near-invisible oversized display text used as background texture),
   but alive: whenever the visitor is over any meaningful interactive
   element in the footer (.footer.is-interacting, toggled in footer.js),
   it answers with a faint acid-green tint and a soft diffuse glow. One
   shared transition in both directions so moving between adjacent
   elements reads as a continuous response, never a flicker. */
.footer__watermark {
  position: absolute;
  z-index: -1;
  right: var(--section-padding);
  bottom: -0.08em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(90px, 14vw, 230px);
  line-height: 1;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .035);
  text-shadow: 0 0 0 rgba(200, 255, 46, 0);
  pointer-events: none;
  user-select: none;
  transition: color 1.1s ease, text-shadow 1.1s ease;
}

.footer.is-interacting .footer__watermark {
  color: rgba(200, 255, 46, .09);
  text-shadow: 0 0 50px rgba(200, 255, 46, .35);
}

/* ===== MANIFESTO: the whole top zone is now just this one statement.
   Wide + centered on purpose — the only centered headline on the site,
   marking this as the closing "title card" rather than another
   left-aligned content section. */
.footer__manifesto {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 0 8px;
  text-align: center;
}

.footer__manifesto-cta {
  display: inline-flex;
  margin-top: 22px;
  background: none;
  border: none;
  cursor: pointer;
}

.footer__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 68px);
  line-height: 1.14;
  letter-spacing: var(--ls-heading);
  color: var(--color-text-primary-strong);
  text-wrap: balance;
}

.footer__title span {
  color: var(--color-accent);
}

/* ===== MID: contacts + socials, split ends of one row (not 4 columns) ===== */
.footer__mid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 40px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border-faint);
}

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__contact-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--color-text-dim);
  transition: color .2s ease;
}

.footer__contact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -.01em;
  color: var(--color-text-primary);
  transition: color .2s ease;
}

.footer__contact-row:hover .footer__contact-label,
.footer__contact-row:hover .footer__contact-value {
  color: var(--color-accent);
}

.footer__socials {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Brand lockup now lives directly above "МЫ НА СВЯЗИ", so the logo and
   the channels read as one group instead of two disconnected elements.
   Sized down from its old standalone-hero scale — here it's a label,
   not a headline. */
.footer__socials-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 2px;
}

.footer__brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--color-accent);
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-accent-on-accent);
  flex-shrink: 0;
}

.footer__brand-scan {
  position: absolute;
  inset: -50%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .8) 50%, transparent 58%);
  transform: translateX(-130%);
}

.footer__mid.is-revealed .footer__socials-brand .footer__brand-scan {
  animation: footerBrandScan 1.2s ease .45s 1;
}

@keyframes footerBrandScan {
  to { transform: translateX(130%); }
}

.footer__brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  color: var(--color-text-primary);
}

.footer__brand-name span {
  color: var(--color-accent);
}

.footer__socials-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--color-text-dim);
}

.footer__socials-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.footer__social-btn {
  width: 42px;
  height: 42px;
}

.footer__social-btn:hover {
  box-shadow: 0 0 18px rgba(200, 255, 46, .4);
}

/* ===== NAV strip — one slim wrapping row, not a column list ===== */
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  row-gap: 8px;
  margin-top: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--color-border-faint);
}

.footer__nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--color-text-muted);
  padding: 0 18px;
  transition: color .2s ease;
}

.footer__nav-link:first-child {
  padding-left: 0;
}

.footer__nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border-strong);
  transform: translateY(-50%);
}

.footer__nav-link:first-child::before {
  display: none;
}

.footer__nav-link:hover {
  color: var(--color-accent);
}

.footer__nav-link--accent {
  color: var(--color-accent);
}

/* ===== LEGAL ===== */
.footer__legal {
  margin-top: 0;
  padding-top: 11px;
  border-top: 1px solid var(--color-border-faint);
}

.footer__legal-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer__legal-entity,
.footer__legal-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--color-text-dim-2);
}

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 20px;
  margin-top: 12px;
}

.footer__legal-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-dim-2);
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.footer__legal-link:hover {
  color: var(--color-text-muted);
  border-color: var(--color-border-soft);
}

@media (prefers-reduced-motion: reduce) {
  .footer__brand-scan {
    animation: none;
  }
}

/* ============================================================
   Responsive — large screens down to phone
   ============================================================
   The DOM order here already matches the owner's mobile spec (CTA
   heading -> phone -> email -> socials -> nav -> legal entity/copy ->
   legal links), and most rows already use flex-wrap — so this is
   mostly "stop centering/right-aligning things that only made sense
   in a wide row" rather than a real restructure. */

@media (min-width: 1920px) {
  .footer__manifesto {
    max-width: 1400px;
  }
}

@media (max-width: 767px) {
  .footer__mid {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
  }

  /* Logo needs to land ABOVE phone/email (owner spec), but it lives
     inside .footer__socials, after .footer__contacts in the DOM —
     display:contents flattens .footer__socials so its three children
     (brand, label, row) become direct flex items of .footer__mid
     alongside .footer__contacts, and order:-1 on just the brand
     lockup alone is enough to pull it before contacts; everything
     else keeps its default DOM-order position (contacts, then the
     social label/icons row right after, unchanged relative order). */
  .footer__socials {
    display: contents;
  }

  .footer__socials-brand {
    order: -1;
    margin-bottom: 2px;
  }

  .footer__socials-label {
    text-align: left;
  }

  .footer__socials-row {
    justify-content: flex-start;
  }

  .footer__legal-row {
    flex-direction: column;
    gap: 10px;
  }

  .footer__contact-value {
    font-size: 20px;
  }
}

@media (max-width: 599px) {
  .footer__title {
    font-size: clamp(28px, 8vw, 40px);
  }

  .footer__manifesto {
    padding: 8px 0 4px;
  }

  .footer__manifesto-cta {
    margin-top: 18px;
  }
}
