/* Rodapé de alto padrão da OZATI:
   - Fundo 100% #000000 puro (zero cinza)
   - Sem cards fechados: lista tipográfica limpa e aberta para contatos
   - Dedilhado fino em pontinhos (dot grid sutil) no canvas, sem linhas curvas tracejadas
   - Bounding box estilo Figma com handles e cursor em alto contraste
   - Marca d'água gigante de 3.5% de opacidade no fundo
*/

@layer components {
  .site-footer {
    position: relative;
    overflow: hidden;
    background: #000000 !important;
    color: #86868b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-block: clamp(4.5rem, 8vw, 7.5rem) clamp(2.5rem, 5vw, 4rem);
    font-size: var(--texto-apoio, 0.875rem);
    z-index: 3;
  }

  /* -------------------------------------------------------------
     Dedilhado em Pontinhos (Dot Grid Canvas sutil sem tracejado)
     ------------------------------------------------------------- */
  .f-ambient-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    user-select: none;
  }

  /* Grid dedilhado fino com pontos de 1.2px */
  .f-ambient-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    opacity: 0.45;
    mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 80%);
    pointer-events: none;
  }

  /* Nós e coordenadas flutuantes discretos */
  .f-node {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--fonte-codigo, monospace);
    font-size: 0.625rem;
    color: #86868b;
    letter-spacing: 0.04em;
    pointer-events: none;
  }

  .f-node-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  }

  .f-node-1 { top: 18%; right: 9%; }
  .f-node-2 { bottom: 24%; left: 5%; }
  .f-node-3 { top: 50%; right: 34%; }

  /* Animações de parallax suave guiadas por scroll */
  @keyframes f-float-drift-1 {
    from { transform: translateY(45px); }
    to { transform: translateY(-35px); }
  }
  @keyframes f-float-drift-2 {
    from { transform: translateY(60px); }
    to { transform: translateY(-40px); }
  }
  @keyframes f-float-drift-3 {
    from { transform: translateY(35px); }
    to { transform: translateY(-35px); }
  }

  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @media (prefers-reduced-motion: no-preference) {
      .f-node-1 {
        animation: f-float-drift-1 linear both;
        animation-timeline: view();
        animation-range: entry 0% exit 100%;
      }
      .f-node-2 {
        animation: f-float-drift-2 linear both;
        animation-timeline: view();
        animation-range: entry 10% exit 90%;
      }
      .f-node-3 {
        animation: f-float-drift-3 linear both;
        animation-timeline: view();
        animation-range: entry 20% exit 100%;
      }
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .f-node-1, .f-node-2, .f-node-3 {
      animation: none !important;
    }
  }

  /* -------------------------------------------------------------
     Marca d'Água Gigante no Fundo
     ------------------------------------------------------------- */
  .f-wm {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    pointer-events: none;
    z-index: 1;
    user-select: none;
    opacity: 0.035;
    color: #ffffff;
    line-height: 0;
  }

  .f-wm svg {
    width: 100%;
    height: auto;
    display: block;
  }

  /* -------------------------------------------------------------
     Estrutura e Grid Principal
     ------------------------------------------------------------- */
  .site-footer .wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--largura-conteudo, 76rem);
    margin-inline: auto;
    padding-inline: var(--espaco-4, 1.25rem);
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }

  @media (min-width: 48rem) {
    .footer-grid {
      grid-template-columns: 2fr 1fr 1.35fr;
      gap: 3rem;
    }
  }

  @media (min-width: 68rem) {
    .footer-grid {
      grid-template-columns: 2.3fr 1fr 1.4fr;
      gap: 4rem;
    }
  }

  /* -------------------------------------------------------------
     Coluna 1: Marca, Tagline e Seleção Figma
     ------------------------------------------------------------- */
  .f-brand .logo {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
  }

  .f-brand .logo svg {
    height: 30px;
    width: auto;
    max-width: 130px;
    display: block;
    color: #ffffff;
  }

  .f-brand .tagline {
    font-size: clamp(1.6rem, 1.25rem + 1.2vw, 2.35rem);
    font-weight: 600;
    line-height: 1.25;
    color: #ffffff;
    margin-top: 1.5rem;
    letter-spacing: -0.025em;
  }

  .tagline-highlight {
    color: #ffffff;
    display: inline-block;
  }

  .f-brand .about-line {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #86868b;
    margin-top: 1.25rem;
    max-width: 44ch;
  }

  /* Pílulas de Redes Sociais minimalistas */
  .f-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.75rem;
  }

  .f-soc {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.875rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .f-soc:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-2px);
  }

  .f-soc .f-ic {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }

  /* -------------------------------------------------------------
     Coluna 2: Navegação
     ------------------------------------------------------------- */
  .f-nav h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #86868b;
    margin-bottom: 1.25rem;
  }

  .f-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
  }

  .f-nav li a {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding-block: 0.2rem;
    color: #d1d1d6;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .f-nav li a:hover {
    color: #ffffff;
    transform: translateX(3px);
  }

  /* -------------------------------------------------------------
     Coluna 3: Contatos Ricos - LIMPOS, SEM CARDS PESADOS
     ------------------------------------------------------------- */
  .f-contact h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #86868b;
    margin-bottom: 1.25rem;
  }

  .f-contact ul.f-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Linha limpa: fundo transparente, sem borda de card */
  .f-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.35rem 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #d1d1d6;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  a.f-row:hover {
    color: #ffffff;
  }

  /* Emblema circular minimalista com traço fino */
  .f-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    color: #ffffff;
    transition: border-color 0.2s ease, background 0.2s ease;
  }

  a.f-row:hover .f-badge {
    border-color: rgba(255, 255, 255, 0.35);
    background: #161616;
  }

  .f-badge svg {
    width: 16px;
    height: 16px;
  }

  .f-txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
  }

  .f-txt small {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .f-txt span {
    font-size: 0.84rem;
    font-weight: 500;
    color: #f5f5f7;
    line-height: 1.35;
    transition: color 0.2s ease;
  }

  a.f-row:hover .f-txt span {
    color: #ffffff;
  }

  .f-go {
    width: 14px;
    height: 14px;
    color: #86868b;
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
  }

  a.f-row:hover .f-go {
    transform: translate(2px, -2px);
    opacity: 1;
    color: #ffffff;
  }

  /* -------------------------------------------------------------
     Linha Inferior do Rodapé: Copyright, Preferências e Assinatura
     ------------------------------------------------------------- */
  .footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: clamp(3.5rem, 6vw, 5rem);
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: #86868b;
  }

  .fb-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .fb-left p {
    margin: 0;
  }

  .fb-left a {
    color: #86868b;
    text-decoration: none;
    transition: color 0.2s;
  }

  .fb-left a:hover {
    color: #ffffff;
    text-decoration: underline;
  }

  /* Seletor de Tema Segmentado Minimalista */
  .f-theme-switch {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
  }

  .f-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #86868b;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .f-theme-btn:hover {
    color: #ffffff;
  }

  .f-theme-btn.active, .f-theme-btn[aria-checked="true"] {
    background: #ffffff;
    color: #000000;
  }

  .by {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #86868b;
    font-size: 0.75rem;
  }

  .by-mark {
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.02em;
  }

  .nw {
    white-space: nowrap;
  }
}
