/* ===== NAVBAR ===== */
.navbar {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; z-index: 100;
  background: rgba(244, 236, 220, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.navbar__marca { width: 34px; height: 34px; flex-shrink: 0; }
.navbar__cursor { animation: cursor-piscar 1.1s steps(1) infinite; }   /* cursor do "if" piscando */
@keyframes cursor-piscar { 50% { opacity: 0; } }

.navbar__menu { display: flex; gap: 32px; }
.navbar__menu a { color: var(--text-muted); font-weight: 600; transition: color .2s; }
.navbar__menu a:hover { color: var(--accent); }

.navbar__toggle {
  display: none; background: none; border: 0;
  color: var(--text); font-size: 1.6rem; cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: var(--nav-height);
  position: relative; isolation: isolate; overflow: hidden;
  background: #1c060a;
}
/* Camada 1: foto de fundo com zoom lento (efeito "Ken Burns") */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../assets/img/hero-bg.jpg") center / cover no-repeat;
  animation: hero-zoom 30s ease-in-out infinite alternate;
}
/* Camada 2: escurece o lado do texto, grade "tech" sutil e fade para a próxima seção */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, transparent 80%, var(--bg) 100%),
    linear-gradient(90deg, rgba(28, 6, 10, .94) 0%, rgba(40, 8, 14, .75) 50%, rgba(60, 10, 20, .35) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 48px);
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.12) translate(-1.5%, -1%); }
}

/* Texto e botões claros sobre o fundo escuro */
.hero h1 { color: #ffffff; }
.hero .hero__eyebrow { color: #e3c47a; }
.hero .hero__role { color: #cbd5e1; }
.hero .hero__text { color: #e2e8f0; }
.hero .btn--primary { background: var(--gold); color: #2a0a10; }
.hero .btn--primary:hover { background: #dbb866; color: #2a0a10; }
.hero .btn--ghost { border-color: rgba(255, 255, 255, .45); color: #f8f9fa; }
.hero .btn--ghost:hover { border-color: #ffffff; color: #ffffff; background: rgba(255, 255, 255, .08); }
.hero .hero__foto { border-color: rgba(255, 255, 255, .2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }

/* ===== FUNDO COM IMAGEM (Stack): código desfocado + véu claro + parallax ===== */
#stack {
  background:
    linear-gradient(rgba(237, 225, 202, .88), rgba(237, 225, 202, .93)),
    url("../assets/img/stack-bg.jpg") center / cover no-repeat;
  background-attachment: scroll, fixed;
}
/* iOS/celular não suporta "fixed" direito: volta ao normal */
@media (hover: none), (max-width: 800px) {
  #stack { background-attachment: scroll; }
}
.hero__eyebrow { font-family: var(--font-mono); color: var(--accent); margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1.1; }
.hero__role { font-size: 1.2rem; color: var(--text-muted); margin: 14px 0 20px; }
.hero__text { max-width: 560px; color: var(--text-soft); margin-bottom: 32px; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.hero__texto { flex: 1; }
.hero__imagem { flex: 1; display: flex; justify-content: flex-end; }
.hero__foto {
  max-width: 350px;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;               /* retrato; use 1 / 1 para quadrada */
  object-fit: cover;
  object-position: var(--foto-posicao);
  border-radius: 24px;               /* use 50% para voltar ao círculo (com aspect-ratio 1 / 1) */
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(31, 36, 41, .18);
}

/* ===== BOTÕES ===== */
.btn {
  padding: 14px 26px; border-radius: 8px; font-weight: bold;
  border: 1px solid transparent; transition: all .25s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== TÍTULOS DE SEÇÃO ===== */
.section__title {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 40px;
}
.section__title::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px;
}

/* ===== REVEAL (aparecer ao rolar) =====
   Só esconde se o JS estiver ativo (classe .js no <html>) */
.js .reveal { opacity: 0; transform: translateY(30px); transition: all .8s ease-out; }
.js .reveal.active { opacity: 1; transform: none; }

/* ===== TAGS (usadas em Sobre, Stack e Projetos) ===== */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  font-family: var(--font-mono);
  font-size: .85rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  transition: border-color .2s, transform .2s;
}
.tags li:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ===== SOBRE ===== */
.sobre {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: start;
}
.sobre__texto p { color: var(--text-soft); margin-bottom: 18px; }
.sobre__texto .tags { margin-top: 24px; }

/* ===== LINHA DO TEMPO ===== */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border);
}
.timeline__item { position: relative; padding-bottom: 32px; }
.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {            /* bolinha */
  content: "";
  position: absolute; left: -37px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--text-muted);
}
.timeline__item--atual::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(122, 31, 43, .15);
}

.timeline__periodo {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--accent);
}
.timeline__item h3 { font-size: 1.05rem; margin: 2px 0 4px; }
.timeline__item p { color: var(--text-muted); font-size: .95rem; }

/* ===== STACK ===== */
.stack { display: grid; gap: 28px; }
.stack__grupo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.stack__grupo h3 { font-size: 1rem; color: var(--text-muted); margin-bottom: 14px; }
.stack__grupo .tags li { background: var(--bg); }

/* ===== FILTROS ===== */
.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }

.filtro {
  font-family: var(--font-mono);
  font-size: .85rem;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.filtro:hover { border-color: var(--accent); color: var(--accent); }
.filtro--ativo { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: bold; }

/* ===== GRID E CARDS DE PROJETO ===== */
.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  animation: aparecer .5s ease-out both;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(31, 36, 41, .10);
}

.card__status {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(122, 31, 43, .08);
  color: var(--accent);
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--text-muted); font-size: .95rem; flex-grow: 1; }

.card__links { display: flex; gap: 18px; margin-top: 4px; }
.card__links a { color: var(--accent); font-weight: 600; }
.card__links a:hover { text-decoration: underline; }
.card__breve { color: var(--text-muted); font-size: .9rem; font-style: italic; }
.projetos-aviso { color: var(--text-muted); text-align: center; }

/* ===== FUNDO ANIMADO (Projetos): manchas de luz dourada/vinho flutuando + pontilhado ===== */
#projetos { position: relative; isolation: isolate; overflow: hidden; }
#projetos::before {
  content: ""; position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(circle at 15% 25%, rgba(201, 162, 75, .45), transparent 32%),
    radial-gradient(circle at 85% 30%, rgba(122, 31, 43, .22), transparent 30%),
    radial-gradient(circle at 60% 85%, rgba(201, 162, 75, .35), transparent 35%);
  filter: blur(30px);
  animation: manchas-flutuam 20s ease-in-out infinite alternate;
}
#projetos::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(rgba(122, 31, 43, .16) 1px, transparent 1.5px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
@keyframes manchas-flutuam {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(6%, -4%) rotate(8deg); }
}

/* ===== CLIENTES: print do site numa "janela de navegador" ===== */
.clientes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }

.cliente {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.cliente:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 20px 50px rgba(42, 10, 16, .15);
}

.cliente__tela { display: block; overflow: hidden; background: #1c060a; }
.cliente__barra {
  display: flex; gap: 6px; align-items: center;
  height: 28px; padding: 0 12px;
  background: linear-gradient(90deg, #2e0b12, #1a0609);
}
.cliente__barra i { width: 9px; height: 9px; border-radius: 50%; background: rgba(201, 162, 75, .55); }
.cliente__tela img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  transition: transform .6s ease;
}
.cliente:hover .cliente__tela img { transform: scale(1.04); }

.cliente__info { display: flex; flex-direction: column; gap: 10px; padding: 24px; flex-grow: 1; }
.cliente__info h3 { font-size: 1.2rem; }
.cliente__info p { color: var(--text-soft); flex-grow: 1; }
.cliente__link { align-self: flex-start; margin-top: 6px; color: var(--accent); font-weight: 700; }
.cliente__link:hover { text-decoration: underline; }

/* ===== FUNDO CLARO (Campo): luzes douradas flutuando + linhas de circuito sutis ===== */
#campo { position: relative; isolation: isolate; overflow: hidden; }
#campo::before {
  content: ""; position: absolute; inset: -25%; z-index: -2;
  background:
    radial-gradient(circle at 20% 15%, rgba(201, 162, 75, .35), transparent 30%),
    radial-gradient(circle at 85% 55%, rgba(122, 31, 43, .12), transparent 35%),
    radial-gradient(circle at 30% 90%, rgba(201, 162, 75, .25), transparent 30%);
  filter: blur(30px);
  animation: manchas-flutuam 24s ease-in-out infinite alternate-reverse;
}
#campo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(0deg, rgba(122, 31, 43, .05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(122, 31, 43, .05) 0 1px, transparent 1px 64px);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

/* Cards dos vídeos escuros: o vídeo se destaca como numa tela */
#campo .case {
  background: linear-gradient(150deg, #2e0b12, #1a0609);
  border-color: rgba(201, 162, 75, .35);
  box-shadow: 0 20px 50px rgba(42, 10, 16, .25);
}
#campo .case:hover { border-color: var(--gold); }
#campo .case__local { color: var(--gold); }
#campo .case__texto h3 { color: #ffffff; }
#campo .case__texto h4 { color: #e3c47a; }
#campo .case__texto p,
#campo .case__texto ul:not(.tags) { color: #e7d3d6; }
#campo .case .tags li { background: transparent; border-color: rgba(201, 162, 75, .5); color: #e3c47a; }
#campo .case .tags li:hover { border-color: var(--gold); }

/* ===== EXPERIÊNCIA DE CAMPO ===== */
.campo__intro { max-width: 640px; color: var(--text-muted); margin: -16px 0 40px; }

.cases { display: flex; flex-direction: column; gap: 40px; }

.case {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: opacity .8s ease-out, transform .8s ease-out, border-color .3s;
}
/* só esconde se o JS estiver ativo */
.js .case { opacity: 0; transform: translateY(30px); }
.js .case.case--visivel { opacity: 1; transform: none; }
.case:hover { border-color: var(--accent); }

/* alterna o lado do vídeo em cada case */
.case:nth-child(even) .case__midia { order: 2; }

.case__midia {
  aspect-ratio: 3 / 4;
  max-height: 480px;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}
.case__midia { position: relative; }
.case__midia video { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
/* aparece por trás do vídeo enquanto ele baixa (some quando o primeiro quadro é desenhado) */
.case__midia::before {
  content: "Carregando vídeo…";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: .85rem; color: #e3c47a;
}

.case__local { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.case__texto h3 { font-size: 1.3rem; margin: 4px 0 8px; }
.case__texto h4 {
  margin: 16px 0 4px;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.case__texto p { color: var(--text-soft); }
.case__texto ul:not(.tags) { margin-left: 20px; color: var(--text-soft); }
.case__texto li { margin-bottom: 4px; }
.case__texto .tags { margin-top: 20px; }

/* ===== CONTATO ===== */
.contato { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }

.contato__form { display: flex; flex-direction: column; gap: 8px; }
.contato__form label { font-size: .85rem; color: var(--text-muted); margin-top: 8px; }

.contato__form input,
.contato__form textarea {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color .2s, background .2s;
}
.contato__form input:focus,
.contato__form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fffdf8;
}
.contato__form textarea { resize: vertical; min-height: 120px; }
.contato__form .btn { margin-top: 16px; cursor: pointer; }
.contato__erro { color: #b91c1c; font-size: .9rem; }

.contato__links { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.contato__links a {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 600;
  transition: border-color .2s, transform .2s, color .2s;
}
.contato__links a:hover { border-color: var(--accent); color: var(--accent); transform: translateX(6px); }

/* ===== FUNDO COM IMAGEM (Contato): código binário tingido de vinho + brilho pulsando ===== */
#contato { position: relative; isolation: isolate; overflow: hidden; background: #2a2022; }
/* Camada 1: imagem verde convertida para vermelho com filtro, deslizando devagar */
#contato::before {
  content: ""; position: absolute; inset: -10%; z-index: -2;
  background: url("../assets/img/contato-bg.jpg") center / cover no-repeat;
  filter: hue-rotate(230deg) saturate(.35) brightness(.9);
  opacity: .45;
  animation: contato-drift 40s ease-in-out infinite alternate;
}
/* Camada 2: véu vinho escuro + "luz" que pulsa atrás do formulário */
#contato::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(201, 162, 75, .12), transparent 70%),
    linear-gradient(rgba(30, 22, 24, .55), rgba(30, 22, 24, .7));
  animation: contato-glow 6s ease-in-out infinite alternate;
}
@keyframes contato-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-4%, 5%) scale(1.08); }
}
@keyframes contato-glow {
  from { opacity: .9; }
  to   { opacity: 1; }
}

/* Textos claros sobre o fundo escuro (cards e campos continuam brancos) */
#contato .section__title { color: #ffffff; }
#contato .section__title::after { background: var(--gold); }
#contato .campo__intro,
#contato .contato__form label { color: #e7d3d6; }
#contato .contato__erro { color: #fca5a5; }
#contato .btn--primary { background: var(--gold); color: #2a0a10; }
#contato .btn--primary:hover { background: #dbb866; color: #2a0a10; }
#contato .contato__links a { border-color: transparent; }

/* ===== RODAPÉ ===== */
.rodape {
  padding: 32px 0;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

/* ===== RESPONSIVO (breakpoint único: 800px) ===== */
@media (max-width: 800px) {
  /* navbar */
  .navbar__toggle { display: block; }
  .navbar__menu {
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden;
    visibility: hidden;   /* links fora do foco do teclado quando fechado */
    transition: max-height .3s ease, visibility .3s;
  }
  .navbar__menu.aberto { max-height: 400px; visibility: visible; }
  .navbar__menu a { padding: 16px 24px; }

  /* hero */
  .hero__content { flex-direction: column-reverse; text-align: center; }
  .hero__imagem { justify-content: center; margin-bottom: 2rem; }
  .hero__foto { max-width: 250px; }
  .hero__cta { justify-content: center; }
  .hero::after {
    background:
      linear-gradient(to bottom, transparent 85%, var(--bg) 100%),
      linear-gradient(rgba(28, 6, 10, .8), rgba(28, 6, 10, .8));
  }

  /* sobre / contato */
  .sobre { grid-template-columns: 1fr; gap: 40px; }
  .contato { grid-template-columns: 1fr; }

  /* cases */
  .case { grid-template-columns: 1fr; }
  .case:nth-child(even) .case__midia { order: 0; }
  .case__midia { aspect-ratio: 16 / 10; max-height: 320px; }
}