/* ==========================================================================
   components.css — faixa do topo, filtros, cards e rodapé
   ========================================================================== */

/* --------------------------------------------------------------------------
   Faixa do topo
   -------------------------------------------------------------------------- */

/* O topo é dividido em três partes iguais: o texto ocupa duas sobre o
   vermelho, a foto ocupa a terceira, sangrando até a borda da tela. */

.hero {
  display: grid;
  grid-template-columns: 1fr; /* no celular a foto desce para baixo do texto */
  background: var(--vermelho);
}

.hero__text {
  padding: calc(var(--faixa) * 0.95) var(--margem) var(--faixa);
}

.hero__media {
  position: relative;
  aspect-ratio: 16 / 13;
}

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.hero__name {
  font-size: clamp(3.5rem, 17.5vw, 16rem);
  line-height: 1; /* respiro entre "Thales" e "Luanota" */
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.hero__sobrenome {
  color: var(--creme);
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 2fr 1fr;
  }

  .hero__media {
    aspect-ratio: auto; /* a altura passa a ser a da faixa inteira */
  }

  .hero__media img {
    object-position: center;
  }

  .hero__name {
    font-size: clamp(3.5rem, 11vw, 10rem);
  }
}

/* cada linha do nome sobe para a posição uma vez, ao carregar */
.hero__line {
  display: block;
  overflow: hidden;
}

.hero__line > span {
  display: block;
  animation: sobe 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__line:nth-child(2) > span {
  animation-delay: 90ms;
}

@keyframes sobe {
  from {
    transform: translateY(102%);
  }
  to {
    transform: translateY(0);
  }
}

.hero__tagline {
  font-size: clamp(1.125rem, 2.6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  max-width: 24ch;
}

.hero__bio {
  margin-top: 0.875rem;
  font-size: clamp(0.875rem, 1.35vw, 1rem);
  font-weight: 400;
  line-height: 1.55;
  max-width: 52ch;
}

/* --------------------------------------------------------------------------
   Barra de filtros
   -------------------------------------------------------------------------- */

.filterbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--creme);
  border-bottom: 2px solid var(--preto);
  padding: 0.875rem var(--margem);
}

.filterbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: var(--largura-max);
  margin: 0 auto;
}

.filter {
  padding: 0.5rem 1.125rem;
  border: 2px solid var(--preto);
  border-radius: 999px;
  background: transparent;
  color: var(--preto);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 140ms linear, color 140ms linear;
}

.filter:hover {
  background: var(--creme-fundo);
}

.filter[aria-pressed="true"] {
  background: var(--vermelho);
}

.filter[aria-pressed="true"]:hover {
  background: var(--vermelho-escuro);
  color: var(--creme);
}

/* --------------------------------------------------------------------------
   Área de trabalhos
   -------------------------------------------------------------------------- */

.works {
  padding: 0 var(--margem) var(--faixa);
}

.works__inner {
  max-width: var(--largura-max);
  margin: 0 auto;
}

.count {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.25rem, 3vw, 2rem);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.62);
}

.empty {
  padding: 1rem 0 3rem;
  font-size: 1.0625rem;
  max-width: 40ch;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.25rem, 5vw, 3.5rem) clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 620px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

.card__link {
  display: block;
  text-decoration: none;
}

/* o bloco preto atrás da imagem aparece quando o card se desloca */
.card__media {
  position: relative;
}

.card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--preto);
}

.card__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--creme-fundo);
  border: 2px solid var(--preto);
  transition: transform 160ms ease-out;
}

.card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* quando a miniatura do vídeo não carrega, o quadro vira um painel liso
   em vez de mostrar imagem quebrada */
.card__frame--sem-imagem {
  background: var(--creme-fundo);
}

.card__frame--sem-imagem::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-40%, -50%);
  border-left: 1.75rem solid var(--preto);
  border-top: 1.125rem solid transparent;
  border-bottom: 1.125rem solid transparent;
}

/* peças que não são 16:9 (cartaz, post, documento) aparecem inteiras,
   centradas no quadro, em vez de serem cortadas */
.card__frame--inteiro {
  padding: 0.625rem;
  background: var(--creme-fundo);
}

.card__frame--inteiro img {
  object-fit: contain;
}

/* só os cards que de fato abrem alguma coisa reagem ao mouse */
@media (hover: hover) {
  a.card__link:hover .card__frame {
    transform: translate(-7px, -7px);
  }

  a.card__link:hover .card__title {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }
}

a.card__link:focus-visible .card__frame {
  transform: translate(-7px, -7px);
}

.card__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2; /* acima dos painéis de exemplo dos trabalhos de design */
  padding: 0.3125rem 0.75rem;
  background: var(--creme);
  border-top: 2px solid var(--preto);
  border-right: 2px solid var(--preto);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card__title {
  margin-top: 1.125rem;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.card__desc {
  margin-top: 0.4375rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.68);
  max-width: 44ch;
}

.card__autor {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
}

/* Painéis de exemplo para os trabalhos de design, enquanto não há imagem.
   Trocar por uma imagem em img/ remove o painel automaticamente. */

.card__frame--padrao-1 {
  background: var(--vermelho);
}

.card__frame--padrao-1::after {
  content: "";
  position: absolute;
  inset: 17% 24%;
  background: var(--creme);
  border-radius: 50%;
}

.card__frame--padrao-2 {
  background: var(--preto);
}

.card__frame--padrao-2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 56%;
  background: repeating-linear-gradient(
    90deg,
    var(--vermelho) 0 14px,
    var(--creme) 14px 28px
  );
}

.card__frame--padrao-3 {
  background: var(--creme-fundo);
}

.card__frame--padrao-3::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 45deg at 50% 50%,
    var(--vermelho) 0 25%,
    var(--creme) 0 50%,
    var(--preto) 0 75%,
    var(--creme-fundo) 0
  );
}

/* Painéis dos textos: linhas soltas que sugerem uma página escrita.
   Os três servem só para variar a cor entre um card e outro. */

.card__frame--padrao-texto-1 {
  background: var(--creme-fundo);
  --linha: var(--preto);
}

.card__frame--padrao-texto-2 {
  background: var(--vermelho);
  --linha: var(--creme);
}

.card__frame--padrao-texto-3 {
  background: var(--preto);
  --linha: var(--vermelho);
}

.card__frame--padrao-texto-1::after,
.card__frame--padrao-texto-2::after,
.card__frame--padrao-texto-3::after {
  content: "";
  position: absolute;
  inset: 21% 15%;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--linha), var(--linha)),
    linear-gradient(var(--linha), var(--linha)),
    linear-gradient(var(--linha), var(--linha)),
    linear-gradient(var(--linha), var(--linha)),
    linear-gradient(var(--linha), var(--linha));
  background-size: 100% 11%, 86% 11%, 95% 11%, 70% 11%, 38% 11%;
  background-position: 0 0, 0 25%, 0 50%, 0 75%, 0 100%;
}

.card__frame--padrao-4 {
  background: var(--vermelho);
}

.card__frame--padrao-4::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 18px,
    var(--preto) 18px 25px
  );
}

/* --------------------------------------------------------------------------
   Rodapé
   -------------------------------------------------------------------------- */

.footer {
  background: var(--preto);
  color: var(--creme);
  padding: var(--faixa) var(--margem);
}

.footer__inner {
  max-width: var(--largura-max);
  margin: 0 auto;
}

.footer__label {
  font-size: 0.9375rem;
  color: rgba(247, 237, 218, 0.72);
}

.footer__email {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--fonte-display);
  font-weight: 400;
  font-size: clamp(1.625rem, 6.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-decoration: none;
  word-break: break-word;
  transition: color 140ms linear;
}

@media (hover: hover) {
  .footer__email:hover {
    color: var(--vermelho);
  }
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.footer__links a {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  border: 2px solid var(--creme);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 140ms linear, color 140ms linear;
}

@media (hover: hover) {
  .footer__links a:hover {
    background: var(--vermelho);
    border-color: var(--vermelho);
    color: var(--preto);
  }
}

.footer__sign {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font-size: 0.8125rem;
  color: rgba(247, 237, 218, 0.56);
}
