@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

@font-face{
  font-family:"bold";
  src: url('fonts/bold-regular.woff2') format('woff2'),
       url('fonts/bold-regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face{
  font-family:"brook";
  src: url('fonts/brook.woff2') format('woff2'),
       url('fonts/brook.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

*{
  padding:0;
  margin:0;
  box-sizing:border-box;
}

html, body{
  background:#050505;
}

body{
  user-select:none;
  color: rgb(245,245,245);
}

a{
  color: inherit;
  text-decoration: none;
  outline: none;
}

a:hover{
  color: inherit;
  text-decoration: none;
}

li{
  list-style:none;
  padding-left:40px;
}

ul{
  display:flex;
  flex-direction:row;
}

/* ===== Top Navigation (igual template) ===== */
.navigation{
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  color: rgb(245,245,245);
  font-family: 'brook', sans-serif;
  padding: 20px;
  padding-top: 40px;
  padding-left: 40px;
  font-size: 18px;
  width: 100%;
  pointer-events: auto;
}

.logo{
  display:inline-block;
  z-index:10;
  color: rgb(245,245,245);
  padding:10px;
  font-family: brook;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  border-radius: 4px;
}

.navigation-links{
  float:right;
  padding: 10px;
  padding-right: 40px;
}

.links{
  opacity:.9;
  transition: all .4s ease;
}

.links:hover{
  opacity:1;
}

/* ===== Minimal left menu (REC / 35MM / SOBRE) ===== */
.mini-nav{
  position: fixed;
  left: 40px;
  top: 110px;
  z-index: 11;
  display:flex;
  gap:18px;
  font-family: brook;
  font-size:14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .9;
}

.mini-item{
  transition: opacity .35s ease;
}

.mini-item:hover{ opacity:1; }

.rec-dot{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:99px;
  background:#ff3b3b;
  margin-right:8px;
  vertical-align:middle;
}

/* ===== Page wrap ===== */
#projects-page{
  min-height: 100vh;
  width: 100%;
  background:#050505;
}

/* ===== Grid ===== */
.grid{
  width: calc(100% - 80px);
  margin: 0 auto;
  padding-top: 140px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* Cards (A Moldura) */
.card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0b0b0b;
  border-radius: 6px;
  aspect-ratio: 2 / 1; /* Define o formato do card (pode mudar para 16 / 9 se quiser menos largo) */
  /* Removi o min-height para parar de deformar a caixa */
  outline: none;
}

/* A Imagem dentro do card */
.media {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Garante que preencha tudo sem distorcer */
  display: block;
  
  /* Juntei os dois transforms na mesma linha para um não anular o outro! */
  transform: scale(1.01) translateZ(0); 
  
  transition: transform .6s ease, filter .6s ease;
  will-change: transform, filter;
  /* Removi o aspect-ratio daqui, pois a imagem só precisa seguir o pai */
}

.card:hover .media{
  transform: scale(1.05);
}

/* Overlay (igual estética cinematográfica) */
.meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  
  /* Matemática SUAVE para 2 colunas: cresce mais devagar */
  padding-bottom: clamp(20px, 3vw, 80px); 
  padding-left: clamp(20px, 2.5vw, 40px);
  
  background: linear-gradient(to top, rgba(0,0,0,.80), rgba(0,0,0,0) 65%);
  opacity: 1; 
  pointer-events: none; 
}

/* Prepara os textos para a animação */
.title, 
.sub {
  transition: transform .4s ease;
}

.card:hover .title, 
.card:hover .sub {
  transform: translateY(-5px);
}

.title {
  font-family: bold;
  /* Matemática SUAVE: no notebook vai ficar com uns 28px-30px, e no PC bate 36px */
  font-size: clamp(20px, 2.2vw, 36px); 
  letter-spacing: .05em;
  text-transform: lowercase;
  line-height: 1.05;
}

.sub {
  /* Matemática SUAVE */
  font-size: clamp(12px, 1vw, 18px); 
  margin-top: 8px;
  font-family: brook;
  opacity: .9;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ===== Floating to-top ===== */
.to-top{
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgb(255,255,255,.18);
  background: rgb(0,0,0,.35);
  color: rgb(245,245,245);
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 30;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.to-top.show{
  opacity:1;
  transform: translateY(0);
}

.to-top:hover{
  background: rgb(245,245,245,.08);
}

/* ===== Responsive ===== */
@media all and (max-width: 900px){
  .grid{
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    padding-top: 150px;
  }
  .mini-nav{
    left: 16px;
    top: 106px;
  }
  .navigation{
    padding-left: 16px;
  }
  .navigation-links{
    padding-right: 16px;
  }
  li{
    padding-left: 20px;
  }
  /* =========================================
     AJUSTES DOS CARTÕES NO MOBILE / TABLET EM PÉ (1 Coluna)
     ========================================= */

  /* 1. Mantém o degradê cobrindo a foto toda e volta com o padding agressivo */
  .meta {
    opacity: 1; 
    padding-bottom: clamp(24px, 6vw, 80px);
    padding-left: clamp(20px, 4vw, 40px);
  }

  /* 2. Volta com a fonte que cresce rápido para preencher o cartão de 100% */
  .title {
    font-size: clamp(24px, 4vw, 36px);
  }

  .sub {
    font-size: clamp(14px, 1.8vw, 18px);
  }
  
}
#page-transition{
position: fixed;
top:0;
left:0;
width:100%;
height:100%;
background:#050505;
opacity:0;
pointer-events:none;
z-index:9999;
transition: opacity .6s cubic-bezier(0.19,1,0.22,1);
}

#page-transition.active{
opacity:1;
}

/* Hack para remover o blur pesado apenas no Firefox */
@-moz-document url-prefix() {
  .to-top {
    backdrop-filter: none;
    background: rgba(0, 0, 0, 0.8); /* Fundo um pouco mais escuro para compensar a falta do vidro */
  }
}



/* ===== Rodapé / Footer ===== */
footer {
  text-align: center;
  font-family: brook; /* Mantendo a mesma fonte dos subtítulos */
  font-size: 13px;
  color: rgba(245, 245, 245, 0.5); /* Branco com 50% de transparência para não roubar a atenção */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  
  /* Aqui está o segredo do respiro: */
  /* 60px de espaço em cima, 20px nas laterais, e 120px de espaço embaixo! */
  padding: 60px 20px 120px; 
}