
  :root {
    --bg: #f5f0e8;
    --ink: #1a1610;
    --ink-light: #6b6355;
    --accent: #8b4513;
    --accent-dim: #c8956b;
    --paper: #ede8dc;
    --border: #c9bfad;
    --gap: 12px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'EB Garamond', Georgia, serif;
    min-height: 100vh;
    background: url("../../IMG/arquive/BGtile.png");
    background-repeat: repeat;
    animation: diagonalSlide 20s linear infinite;
}

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1000;
    opacity: 0.5;
  }

  header {
    padding: 60px 40px 30px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
  }

  .header-title h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--main-black-rgb);
    text-shadow: 0 4px var(--sec-black);
  }

  .header-title h1 em {
    font-style: italic;
    color: var(--purple);
  }

  .header-meta {
    display: flex;
    flex-direction: column;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    font-weight: 300;
    color: white;
    text-shadow: 0 4px 6px var(--sec-black-trans);
    text-align: right;
    line-height: 1.8;
  }
  header img{
    height: 4rem;
    width: 4rem;
  }

  /* ── FILTROS ─────────────────────────────── */
  .filters {
    padding: 20px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    backdrop-filter: blur(5px);
    background: linear-gradient(180deg,rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 100;
  }

  .filter-btn {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    padding: 5px 14px;
    border: 1px solid rgba(0, 0, 0, 0);
    background: rgba(255, 255, 255, 0.267);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 10px;
  }

  .filter-btn:hover {
    border-color: var(--purple);
    color: var(--purple);
  }

  .filter-btn.active {
    background: var(--purple);
    border-color: var(--sec-black);
    color: white;
  }

  .gallery-header {
    padding: 24px 40px 8px;
  }

  .count {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    color: white;
    letter-spacing: 0.08em;
    text-shadow: 0 4px 6px var(--sec-black-trans);
  }

  /* ── MASONRY ─────────────────────────────── */
  .gallery {
    padding: 16px 40px 60px;
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
  }

  .masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    min-width: 0;
  }

  /* ── CARD ────────────────────────────────── */
  .card {
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 1px 6px var(--main-black-trans);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: flip-in-diag-2-br 0.8s ease both;
  }

  .card img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
  }

  .card:hover img {
    transform: scale(1.03);
  }

  .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--sec-black-trans) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 14px;
  }

  .card:hover .card-overlay { opacity: 1; }

  .card-info { color: #f5f0e8; }

  .card-title {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.2;
  }

  .card-year {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    opacity: 0.75;
    margin-top: 2px;
    letter-spacing: 0.08em;
  }



  /* ── LIGHTBOX ────────────────────────────── */
  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .lightbox.open {
    opacity: 1;
    pointer-events: all;
  }

  .lb-backdrop {
    position: absolute;
    inset: 0;
    background: var(--sec-black-trans);
    backdrop-filter: blur(6px);
  }

  .lb-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: min(92vw, 920px);
  }

  .lb-img-wrap {
    position: relative;
  }

  .lb-img-wrap img {
    display: block;
    max-width: min(92vw, 920px);
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.8);
    transition: opacity 0.25s ease;
  }

  .lb-caption {
    color: white;
    text-align: center;
  }

  .lb-caption .title {
    font-size: 1.2rem;
  }

  .lb-caption .meta {
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    opacity: 0.6;
    letter-spacing: 0.1em;
    margin-top: 3px;
  }

  .lb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(245,240,232,0.1);
    border: 1px solid rgba(245,240,232,0.18);
    color: #f5f0e8;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 2px;
    font-size: 1.2rem;
    transition: background 0.2s;
  }

  .lb-btn:hover { background: rgba(245,240,232,0.22); }
  .lb-btn.prev { left: -58px; }
  .lb-btn.next { right: -58px; }

  .lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: rgba(245,240,232,0.55);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
    transition: color 0.2s;
  }

  .lb-close:hover { color: #f5f0e8; }

  .lb-counter {
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    color: rgba(245,240,232,0.35);
    letter-spacing: 0.12em;
  }

  /* ── RESPONSIVE ──────────────────────────── */
  @media (max-width: 900px) {
    header, .filters, .gallery, .gallery-header { padding-left: 24px; padding-right: 24px; }
  }

  @media (max-width: 600px) {
    header, .filters, .gallery, .gallery-header { padding-left: 14px; padding-right: 14px; }
    .lb-btn.prev { left: 6px; top: auto; bottom: -54px; transform: none; }
    .lb-btn.next { right: 6px; top: auto; bottom: -54px; transform: none; }
    .lb-close { top: 12px; right: 14px; }
  }

  /* ANIMISTA ANIMATION */
  .flip-in-diag-2-br {
	-webkit-animation: flip-in-diag-2-br 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
	        animation: flip-in-diag-2-br 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
@-webkit-keyframes flip-in-diag-2-br {
  0% {
    -webkit-transform: rotate3d(-1, 1, 0, -80deg);
            transform: rotate3d(-1, 1, 0, -80deg);
    opacity: 0;
  }
  100% {
    -webkit-transform: rotate3d(1, 1, 0, 0deg);
            transform: rotate3d(1, 1, 0, 0deg);
    opacity: 1;
  }
}
@keyframes flip-in-diag-2-br {
  0% {
    -webkit-transform: rotate3d(-1, 1, 0, -80deg);
            transform: rotate3d(-1, 1, 0, -80deg);
    opacity: 0;
  }
  100% {
    -webkit-transform: rotate3d(1, 1, 0, 0deg);
            transform: rotate3d(1, 1, 0, 0deg);
    opacity: 1;
  }
}
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
@keyframes diagonalSlide {
    from {
        background-position: 0 0;
    }
    to {
        /* Ajuste 200px para o tamanho real da sua imagem BGtile.png */
        background-position: 200px 200px; 
    }
}
