@layer components {
  /*
    JPS Brand Footer V1.2.
    Compact, premium, professional.
  */

  .footer,
  .site-footer {
    margin-top: clamp(2.8rem, 5.6vw, 4.6rem);
    padding: clamp(2rem, 4.4vw, 3.1rem) 0 1.05rem;
    background:
      radial-gradient(circle at 10% 0%, rgba(221, 189, 119, 0.12), transparent 28%),
      linear-gradient(180deg, #0f3d37 0%, #07322e 100%);
    color: var(--base);
    border-top: 1px solid rgba(221, 189, 119, 0.22);
  }

  .footer .container,
  .site-footer .container {
    width: min(1420px, calc(100% - (var(--page-gutter) * 2)));
  }

  .footer-grid {
    display: grid;
    grid-template-columns: minmax(250px, 1.05fr) repeat(3, minmax(140px, 0.72fr));
    gap: clamp(1.35rem, 3.2vw, 2.65rem);
    align-items: start;
  }

  .footer-brand {
    max-width: 360px;
  }

  .footer-brand h3 {
    margin: 0 0 0.52rem;
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 1.9vw, 1.68rem);
    font-weight: 720;
    letter-spacing: -0.042em;
  }

  .footer-brand p {
    max-width: 32ch;
  }

  .footer-brand p,
  .footer-cop,
  .footer-credentials {
    color: rgba(250, 248, 245, 0.72);
    font-size: 0.88rem;
    line-height: 1.56;
  }

  .footer-credentials {
    display: grid;
    gap: 0.32rem;
    margin-top: 0.78rem;
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(221, 189, 119, 0.16);
    border-radius: 14px;
    background: rgba(255, 253, 248, 0.038);
  }

  .footer-cop {
    margin-top: 0.72rem;
  }

  .footer-cop img {
    width: 112px;
    height: auto;
    opacity: 0.86;
  }

  .footer-social {
    display: flex;
    gap: 0.52rem;
    margin-top: 0.82rem;
  }

  .footer-social a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(221, 189, 119, 0.22);
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.048);
    color: rgba(250, 248, 245, 0.78);
    text-decoration: none;
    transition:
      transform var(--transition-fast),
      background var(--transition-fast),
      color var(--transition-fast),
      border-color var(--transition-fast);
  }

  .footer-social a:hover {
    transform: translateY(-2px);
    border-color: rgba(221, 189, 119, 0.48);
    background: rgba(221, 189, 119, 0.11);
    color: var(--gold-light);
  }

  .footer-links h4 {
    margin: 0 0 0.68rem;
    color: var(--gold-light);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 820;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .footer-links ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .footer-links a {
    color: rgba(250, 248, 245, 0.71);
    font-size: 0.88rem;
    line-height: 1.3;
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
  }

  .footer-links a:hover {
    color: var(--gold-light);
    transform: translateX(2px);
  }

  .footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-top: clamp(1.45rem, 3.4vw, 2.3rem);
    padding-top: 0.82rem;
    border-top: 1px solid rgba(221, 189, 119, 0.16);
  }

  .footer-bottom p,
  .footer-legal,
  .footer-legal a {
    color: rgba(250, 248, 245, 0.55);
    font-size: 0.8rem;
    line-height: 1.42;
    text-decoration: none;
  }

  .footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.72rem;
  }

  .footer-legal a:hover {
    color: var(--gold-light);
  }

  @media (max-width: 980px) {
    .footer-grid {
      grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
      grid-column: 1 / -1;
      max-width: 590px;
    }
  }

  @media (max-width: 640px) {
    .footer {
      margin-top: 3rem;
      padding-top: 2.15rem;
    }

    .footer-grid {
      grid-template-columns: 1fr;
      gap: 1.32rem;
    }

    .footer-bottom {
      align-items: flex-start;
      flex-direction: column;
    }
  }
}

@layer components {
  .footer-cop--contact {
    margin-top: 0.95rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(221, 189, 119, 0.16);
  }

  .footer-cop--contact img {
    width: min(245px, 100%);
    max-width: 100%;
    height: auto;
    display: block;
    opacity: 0.95;
  }
}

@layer components {
  /*
    Brand footer premium gold accent test.
    Gold is used as accent, not as body color.
  */

  .footer {
    background:
      radial-gradient(circle at 12% 0%, rgba(201, 146, 42, 0.13), transparent 28%),
      radial-gradient(circle at 88% 8%, rgba(221, 189, 119, 0.10), transparent 24%),
      linear-gradient(135deg, #0f3d37 0%, #07342f 100%);
  }

  .footer-brand h3 {
    color: #f0cf88 !important;
    text-shadow: 0 12px 34px rgba(201, 146, 42, 0.16);
  }

  .footer-links h4 {
    color: #f0cf88 !important;
    letter-spacing: 0.14em;
  }

  .footer-credentials {
    border-color: rgba(201, 146, 42, 0.28) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 18px 48px rgba(0, 0, 0, 0.08);
  }

  .footer-credentials span i,
  .footer-links li i {
    color: #f0cf88 !important;
  }

  .footer-social a {
    border-color: rgba(201, 146, 42, 0.34) !important;
    color: rgba(250, 248, 245, 0.76) !important;
  }

  .footer-social a:hover {
    background: rgba(201, 146, 42, 0.16) !important;
    border-color: rgba(240, 207, 136, 0.72) !important;
    color: #f0cf88 !important;
    transform: translateY(-2px);
  }

  .footer-cop--contact {
    border-top-color: rgba(201, 146, 42, 0.24) !important;
  }

  .footer-bottom {
    border-top-color: rgba(201, 146, 42, 0.22) !important;
  }

  .footer a:hover {
    color: #f0cf88 !important;
  }
}
