/* ══════════════════════════════════════════════
   MATHEUS.SOARES — v2
   Mesma paleta e mesmo sistema tipográfico da v1:
   Bebas Neue (logo e rótulos curtos) · Instrument
   Serif (títulos) · IBM Plex Mono (corpo)

   Diferença em relação à v1: título em caixa normal,
   vídeos em grade no lugar do slider.
   ══════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --ink: #080808;
  --ink-2: #0c0c0c;
  --paper: #f0efe9;
  --acid: #d7ff3f;
  --rouge: #ff3d5a;
  --border: rgba(240, 239, 233, 0.12);
  /* corpo de texto: no --text-dim antigo (0.45) dava 4:1 sobre o fundo,
     abaixo do mínimo. 0.72 dá 9:1 e continua abaixo do branco do título. */
  --text-body: rgba(240, 239, 233, 0.72);
  --text-dim: rgba(240, 239, 233, 0.45);
  --text-faint: rgba(240, 239, 233, 0.3);
  --pad-x: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; }

::selection { background: var(--acid); color: var(--ink); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--acid); color: var(--ink);
  padding: 10px 18px; z-index: 2000; font-size: 12px;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

/* ══ NAV ══ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad-x);
  backdrop-filter: blur(12px);
  background: rgba(8, 8, 8, 0.7);
  transition: padding .35s cubic-bezier(.16, 1, .3, 1), background .35s;
}
.site-nav.scrolled { padding: 12px var(--pad-x); background: rgba(8, 8, 8, 0.92); }
.site-nav::after {
  content: ''; position: absolute; bottom: 0;
  left: var(--pad-x); right: var(--pad-x);
  height: 1px; background: var(--border);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px; letter-spacing: .12em;
  color: var(--paper); text-decoration: none;
}
.nav-logo span { color: var(--acid); }

.nav-links { display: flex; gap: 32px; list-style: none; }
/* 11px em caixa alta precisa de contraste alto para continuar legível:
   no cinza antigo (0.45) dava 4:1 sobre o fundo, abaixo do mínimo. */
.nav-links a {
  font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(240, 239, 233, 0.78); text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--paper); }

.nav-cta {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px; letter-spacing: .14em; line-height: 1;
  color: var(--ink); background: var(--acid);
  padding: 11px 20px 9px; border-radius: 2px; border: none;
  text-decoration: none; transition: background .2s;
}
.nav-cta:hover { background: #fff; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}
@media (max-width: 400px) {
  .nav-logo { font-size: 19px; }
  .nav-cta { padding: 8px 14px; font-size: 10px; }
}

/* ══ BOTÕES ══
   As duas variantes têm o mesmo tamanho, a mesma tipografia e o mesmo
   preenchimento sólido. Muda só a cor, para dar para diferenciar sem
   que um vire secundário. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 200px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px; letter-spacing: .14em;
  line-height: 1;
  /* o Bebas não tem descendente, então ganha um pouco menos embaixo
     para o rótulo ficar oticamente centrado */
  padding: 15px 30px 13px; border-radius: 2px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .15s, border-color .2s;
}
.btn-acid { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.btn-acid:hover { background: #fff; border-color: #fff; transform: translateY(-1px); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-paper:hover { background: #fff; border-color: #fff; transform: translateY(-1px); }
/* contorno, não preenchido: são links de apoio, não competem com o Enviar */
.btn-ghost {
  min-width: 160px;
  background: transparent; color: var(--paper);
  border-color: rgba(240, 239, 233, 0.3);
}
.btn-ghost:hover {
  background: var(--acid); border-color: var(--acid); color: var(--ink);
  transform: translateY(-1px);
}

/* ══ BLOCO 1 — TOPO ══ */
/* O topo é deliberadamente mais baixo que a tela: a seção de vídeos já
   aparece na primeira dobra, então o visitante vê que existe mais coisa
   sem precisar rolar no escuro. */
.hero {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  padding: 148px var(--pad-x) 76px;
  border-bottom: 1px solid var(--border);
}

#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

.hero-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 40%, rgba(8, 8, 8, 0.7) 100%);
}
.hero-vignette::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 180px;
  background: linear-gradient(transparent, var(--ink));
}

.hero-noise {
  position: absolute; inset: 0; opacity: .05; pointer-events: none; z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.hero-content { position: relative; z-index: 5; }

.hero-headline {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(29px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 33ch; /* a frase cabe em 2 linhas, não 3 */
  opacity: 0; transform: translateY(28px);
  animation: fade-up .9s .3s cubic-bezier(.16, 1, .3, 1) forwards;
}
.hero-headline em { font-style: italic; color: var(--acid); }

.hero-sub-wrap {
  margin-top: 22px; max-width: 90ch; /* a frase cabe numa linha só */
  opacity: 0; transform: translateY(16px);
  animation: fade-up .8s .6s forwards;
}
.hero-sub {
  font-size: 13px; line-height: 1.8;
  color: var(--text-body);
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 36px;
  opacity: 0; transform: translateY(16px);
  animation: fade-up .8s .75s forwards;
}

@keyframes fade-up { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 720px) {
  /* o canvas fica desligado no celular, por bateria e velocidade;
     um degradê estático ocupa o lugar */
  #hero-canvas { display: none; }
  .hero {
    padding: 116px var(--pad-x) 56px;
    background: radial-gradient(ellipse 90% 60% at 75% 20%, rgba(215, 255, 63, 0.08), transparent 60%);
  }
  .hero-headline { max-width: none; }
  .btn { min-width: 0; width: 100%; }
}

/* ══ SEÇÕES — base ══ */
.section-tag {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px; letter-spacing: .24em; line-height: 1;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.18; letter-spacing: -0.01em;
  max-width: 30ch;
}
.section-title em { font-style: italic; color: var(--acid); }

/* max-width largo de propósito: quanto mais coube por linha, menos
   linha a frase ocupa */
.section-text {
  margin-top: 16px; max-width: 78ch;
  font-size: 13px; line-height: 1.8;
  color: var(--text-body);
}

.reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s ease, transform .8s cubic-bezier(.16, 1, .3, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ══ BLOCO 2 — VÍDEOS ══ */
.videos { padding: 104px var(--pad-x); }
.videos-head { margin-bottom: 56px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.video-card {
  cursor: pointer;
  display: flex; flex-direction: column; gap: 14px;
}

.video-thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 2px;
}
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(85%) brightness(.8) saturate(.5) contrast(1.05);
  transition: filter .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1);
  user-select: none;
}
.video-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 8, 8, 0.55);
  border: 1px solid rgba(240, 239, 233, 0.35);
  backdrop-filter: blur(2px);
  transition: background .25s, border-color .25s, transform .25s;
}
.video-play i {
  font-style: normal; font-size: 13px; color: var(--paper);
  padding-left: 3px; transition: color .25s;
}
.video-card:hover .video-play,
.video-card:focus-visible .video-play {
  background: var(--acid); border-color: var(--acid);
  transform: translate(-50%, -50%) scale(1.08);
}
.video-card:hover .video-play i,
.video-card:focus-visible .video-play i { color: var(--ink); }
.video-card:not(.is-soon):hover .video-thumb img,
.video-card:not(.is-soon):focus-visible .video-thumb img {
  filter: grayscale(0%) brightness(1) saturate(1) contrast(1);
  transform: scale(1.03);
}
.video-card:not(.is-soon):hover .video-thumb,
.video-card:not(.is-soon):focus-visible .video-thumb { border-color: var(--acid); }

/* ── Vídeo que ainda não foi gravado ──
   O card fica na grade para mostrar o que vem, mas não clica e não abre
   nada: sem miniatura de verdade e sem botão de play. */
.video-card.is-soon { cursor: default; }
.video-card.is-soon .video-thumb { border-style: dashed; }
.video-card.is-soon .video-title { color: var(--text-body); }

.video-soon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 9px 18px; border-radius: 999px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-body);
  background: rgba(8, 8, 8, 0.55);
  border: 1px dashed rgba(240, 239, 233, 0.28);
  backdrop-filter: blur(2px);
}

.video-title {
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-weight: 400;
  font-size: clamp(17px, 1.4vw, 20px); line-height: 1.3;
  color: var(--paper);
  transition: color .25s;
}
.video-card:not(.is-soon):hover .video-title { color: var(--acid); }

.videos-more { margin-top: 48px; }
.videos-more a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  transition: color .2s, border-color .2s;
}
.videos-more a:hover { color: var(--acid); border-color: var(--acid); }

@media (max-width: 1000px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .videos { padding: 72px var(--pad-x); }
  .videos-head { margin-bottom: 44px; }
  .video-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ══ MODAL — só o vídeo ══ */
.modal { position: fixed; inset: 0; z-index: 2000; }
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(8px);
  animation: modal-fade .3s ease;
}
@keyframes modal-fade { from { opacity: 0; } }

.modal-dialog {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* o diálogo é só o player 16/9, então limitar a largura pela altura
     disponível garante que ele nunca passe da tela numa janela baixa */
  width: min(1100px, calc(100vw - 2 * var(--pad-x)), calc((100vh - 80px) * 16 / 9));
  background: var(--ink-2);
  border: 1px solid var(--border); border-radius: 4px;
  overflow: hidden;
  animation: modal-rise .4s cubic-bezier(.16, 1, .3, 1);
}
@keyframes modal-rise {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)); }
}

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 40px; height: 40px;
  background: rgba(8, 8, 8, 0.6);
  border: 1px solid var(--border); border-radius: 2px;
  color: var(--paper); font-size: 14px;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: background .25s, border-color .25s, color .25s;
}
.modal-close:hover { background: var(--acid); border-color: var(--acid); color: var(--ink); }

.modal-video { background: #000; aspect-ratio: 16 / 9; }
.modal-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ══ BLOCO 3 — SOBRE ══ */
.about {
  padding: 104px var(--pad-x);
  display: grid; grid-template-columns: minmax(200px, 290px) 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
  border-top: 1px solid var(--border);
}

.about-photo {
  aspect-ratio: 4 / 5;
  background: var(--ink-2);
  border: 1px solid var(--border);
  position: relative;
}
.about-photo > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.about-corner { position: absolute; width: 14px; height: 14px; border: 0 solid var(--acid); }
.ac-tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.ac-tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.ac-bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.ac-br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.about-headline {
  font-family: 'Instrument Serif', serif; font-weight: 400;
  font-size: clamp(25px, 3vw, 38px); line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.about-headline em { font-style: italic; color: var(--acid); }

.about-text {
  max-width: 78ch; color: var(--text-body);
  font-size: 13px; line-height: 1.8;
}
.about-text + .about-text { margin-top: 16px; }

@media (max-width: 880px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; }
}
@media (max-width: 620px) {
  .about { padding: 72px var(--pad-x); }
}

/* ══ BLOCO 4 — FORMULÁRIO ══ */
/* Mesmo ritmo do bloco Sobre: texto de um lado, o resto do outro, e o
   bloco inteiro usa a largura da página como as seções de cima. */
.contact {
  padding: 104px var(--pad-x);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
  border-top: 1px solid var(--border);
}

/* quem define a medida aqui é a coluna do grid, não um max-width fixo */
.contact-copy .section-title,
.contact-copy .section-text { max-width: none; }

.contact-social {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 32px;
}

.contact-form {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field label {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(240, 239, 233, 0.75);
}
.field input, .field textarea {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--border); border-radius: 2px;
  color: var(--paper);
  font-family: 'IBM Plex Mono', monospace; font-size: 13px;
  padding: 14px 16px;
  transition: border-color .25s;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: rgba(215, 255, 63, 0.6);
}
.field input.error, .field textarea.error { border-color: var(--rouge); }

.contact-submit { grid-column: 1 / -1; }
.contact-submit:disabled { opacity: .5; cursor: default; transform: none; }
.contact-status {
  grid-column: 1 / -1; min-height: 20px;
  font-size: 12px; color: var(--acid);
}
.contact-status.error { color: var(--rouge); }

@media (max-width: 880px) {
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .contact-copy .section-title,
  .contact-copy .section-text { max-width: none; }
}
@media (max-width: 620px) {
  .contact { padding: 72px var(--pad-x); }
  .contact-form { grid-template-columns: 1fr; }
}

/* ══ RODAPÉ ══ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px var(--pad-x) 32px;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none; transition: color .2s;
}
.footer-nav a:hover { color: var(--paper); }
.footer-copy { margin-top: 28px; font-size: 11px; color: rgba(240, 239, 233, 0.25); }

/* ══ MOVIMENTO REDUZIDO ══ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-headline, .hero-sub-wrap, .hero-actions,
  .reveal { opacity: 1 !important; transform: none !important; }
  #hero-canvas { display: none; }
}
