/* ═══════════════════════════════════════
   PROJECTS.CSS — Grid de proyectos estilo FORMA
═══════════════════════════════════════ */

#projects {
  background: var(--black);
  padding: 9rem 0;
}

#projects .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  padding: 0 5vw;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

#projects .section-header h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--white);
}

.view-all-link {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.3s;
  flex-shrink: 0;
}
.view-all-link::after { content: '→'; font-size: 1rem; }
.view-all-link:hover { color: var(--accent); }

/* ── GRID ── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--dark);
  text-decoration: none;
  display: block;
}

/* Primer proyecto: ancho completo */
.project-card:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16/7;
}

.project-card:not(:first-child) {
  aspect-ratio: 4/3;
}

.project-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  transition: transform 0.9s cubic-bezier(.16,1,.3,1),
              filter 0.9s ease;
}
.project-card:hover img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

/* Overlay */
.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,10,0.9) 0%,
    rgba(10,10,10,0.2) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  transition: background 0.5s;
}

.project-card:hover .project-card-overlay {
  background: linear-gradient(
    to top,
    rgba(10,10,10,0.95) 0%,
    rgba(10,10,10,0.4) 60%,
    rgba(10,10,10,0.1) 100%
  );
}

.project-cat {
  font-size: 0.70rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.project-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 2.5vw, 2.3rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.project-loc {
  font-size: 0.80rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* Flecha que aparece en hover */
.project-arrow {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  opacity: 0;
  transform: translate(8px, -8px);
  transition: opacity 0.4s, transform 0.4s;
}
.project-card:hover .project-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

@media (max-width: 700px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card:first-child { aspect-ratio: 4/3; }
}
