/* ── Hero do index ── */
.hero {
  padding: var(--space-16) 0 var(--space-8) var(--space-12);
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.25rem);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: 1;
  max-width: 14ch;
}

.hero__title em {
  font-style: italic;
  color: var(--color-accent);
}

/* ── Work list ── */
.work-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ── Project card ── */
.project-card {
  border-radius: var(--radius-card);
  padding: var(--space-12) var(--space-12) 0 var(--space-12);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-base) ease;
}

.project-card:hover {
  transform: translateY(-2px);
}

/* Cor de fundo de cada card */
.project-card--1 { background: var(--color-card-1); }
.project-card--2 { background: var(--color-card-2); }
.project-card--3 { background: var(--color-card-3); }
.project-card--4 { background: var(--color-card-4); }
.project-card--5 { background: var(--color-card-5); }
.project-card--6 { background: var(--color-card-6); }

/* Todos os cards usam texto escuro (definido via tokens semânticos) */
.project-card__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-on-card-eyebrow);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 3.6vw, 40px);
  font-weight: var(--weight-bold);
  color: var(--color-text-on-card);
  line-height: 1.2;
}

.project-card__title-link {
  color: inherit;
  text-decoration: none;
}
.project-card__title-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 2px;
}

.project-card__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.project-card__role,
.project-card__where {
  font-family: var(--font-body);
  font-size: clamp(var(--text-base), 1.5vw, var(--text-md));
  font-weight: var(--weight-regular);
  color: var(--color-text-on-card-muted);
}

.project-card__role strong,
.project-card__where strong {
  font-weight: var(--weight-bold);
  color: var(--color-text-on-card);
}

.project-card__role span,
.project-card__where span {
  font-weight: var(--weight-medium);
  color: var(--color-text-on-card);
}

/* ── Card link overlay (whole card clickable) ── */
.card-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: var(--radius-card);
}

/* Foco por teclado envolve o card inteiro, não só o texto do título */
.project-card__title-link:focus-visible {
  outline: none;
}
.project-card__title-link:focus-visible .card-link-overlay {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 4px;
}

.project-card__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 1;
}

.project-card__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  height: 100%;
}

.project-card__title {
  margin: 0;
}

.project-card__text .project-card__eyebrow {
  margin-top: auto;
}

/* Card do Via tem imagem em contain, mais estreita */
.project-card--4 .project-card__media img {
  object-fit: contain;
  width: 90%;
}

/* ── Container de media ── */
.project-card__media {
  width: 100%;
  margin-top: var(--space-8);
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  order: 2;
  flex-shrink: 0;
}

/* Wrapper com vídeo autoplay precisa de posicionamento relativo pra o botão */
.project-card__media--video {
  position: relative;
}

/* Botão de pausar/tocar vídeo — WCAG 2.2.2 */
.video-toggle {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition-fast), opacity var(--transition-fast);
}
.video-toggle:hover { background: rgba(0, 0, 0, 0.85); }

.video-toggle__play  { display: none; }
.video-toggle__pause { display: block; }
.video-toggle.is-paused .video-toggle__play  { display: block; }
.video-toggle.is-paused .video-toggle__pause { display: none; }

.project-card__media img,
.project-card__media video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Placeholder quando não há imagem ainda */
.media-placeholder {
  width: 320px;
  height: 280px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(0, 0, 0, 0.35);
  letter-spacing: 0.05em;
}

.media-placeholder--light-on-dark {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.3);
}

/* ── Página wrapper (só do index) ── */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
  padding-bottom: var(--space-24);
}

/* ── Desktop: grid com áreas nomeadas ── */
@media (min-width: 900px) {
  .project-card {
    display: grid;
    grid-template-columns: 380px 1fr;
    grid-template-areas: "content media";
    padding: var(--space-12);
    height: 600px;
    gap: 0 var(--space-12);
  }

  .project-card__content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
  }

  .project-card__text {
    flex: 1;
  }

  .project-card__eyebrow {
    margin-top: auto;
  }

  .project-card__media {
    grid-area: media;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .project-card__media img,
  .project-card__media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .project-card__media .media-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

/* ── Mobile / tablet portrait ── */
@media (max-width: 899px) {
  .project-card {
    padding: var(--space-10) var(--space-8) 0 var(--space-8);
  }

  .project-card__role,
  .project-card__where {
    font-weight: var(--weight-medium);
  }

  .project-card__role strong,
  .project-card__where strong {
    font-weight: var(--weight-bold);
  }

  .media-placeholder {
    width: 100%;
    height: 200px;
  }

  .page {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}
