/* /fabrica-de-videos: the landing page of the Fábrica de Vídeos Agêntica.
 * On top of the design system's /ds/tokens.css only: the night background, Archivo / IBM Plex,
 * the marketing pillar's red for the one call to action per screen, and the single effect (the glow behind the title). */

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg-000);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--red-300); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--font-mono); font-size: 0.9em; color: var(--accent-soft); }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
img, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* ---------- the bar ---------- */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(20px, 5vw, 48px);
  background: var(--bg-000);
  border-bottom: 1px solid var(--line);
}
.barra .marca { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.06em; text-decoration: none; color: var(--ink-muted); }
.barra nav { display: flex; gap: clamp(12px, 2.5vw, 28px); font-size: 15px; }
.barra nav a { text-decoration: none; color: var(--ink-muted); white-space: nowrap; }
.barra nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .barra nav a:nth-child(-n+2) { display: none; } }

/* ---------- sections ---------- */
main { display: block; }
.secao, .topo { max-width: 1160px; margin: 0 auto; padding: clamp(56px, 9vw, 104px) clamp(20px, 5vw, 48px) 0; }
.secao h2 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.08; font-weight: 800; }
.secao h3 { font-size: clamp(21px, 2.6vw, 26px); font-weight: 700; margin-top: 56px; }
.secao h2 + p, .secao h3 + p { margin-top: 12px; color: var(--ink-muted); max-width: 68ch; }
.secao .abre { font-size: 19px; color: var(--ink); }
.nota { margin-top: 16px; font-size: 15px; color: var(--ink-muted); max-width: 72ch; }

/* ---------- the top ---------- */
.topo { display: grid; gap: 40px; align-items: center; padding-top: clamp(40px, 7vw, 88px); }
@media (min-width: 900px) { .topo { grid-template-columns: 1.2fr 0.8fr; gap: 64px; } }
.topo-texto { position: relative; }
/* the design system's only effect: a diffuse glow in the accent, behind the title */
.topo-texto::before {
  content: ""; position: absolute; z-index: -1; left: -6%; top: 6%; width: 78%; height: 46%;
  border-radius: 999px; background: var(--accent); filter: blur(110px); opacity: 0.16; pointer-events: none;
}
.rotulo { font-family: var(--font-display); font-weight: 500; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.topo h1 { margin-top: 14px; font-size: clamp(38px, 6.4vw, 70px); line-height: 1; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.topo h1 span { color: var(--accent); }
.topo .linha { margin-top: 22px; font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-muted); max-width: 54ch; }
.acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 26px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--bg-100); color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
}
.botao:hover { background: var(--bg-200); color: var(--ink); }
/* the one red call to action per screen */
.botao.principal { background: var(--red-500); border-color: var(--red-500); color: var(--bg-000); }
.botao.principal:hover { background: var(--red-300); border-color: var(--red-300); color: var(--bg-000); }
.botao.principal:active { background: var(--red-600); border-color: var(--red-600); }

.fatos { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 34px 0 0; padding: 0; font-size: 15px; color: var(--ink-muted); }
.fatos strong { font-family: var(--font-mono); font-weight: 700; color: var(--ink); }

.celular { margin: 0 auto; width: min(320px, 78vw); }
.celular video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 30px; border: 8px solid var(--bg-200); background: var(--bg-100); }
.celular figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-muted); text-align: center; }

/* ---------- three steps ---------- */
.passos { list-style: none; counter-reset: passo; display: grid; gap: 20px; margin: 32px 0 0; padding: 0; }
@media (min-width: 900px) { .passos { grid-template-columns: 1.5fr 1fr 1fr; } }
.passos > li { counter-increment: passo; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-100); min-width: 0; }
.passos > li::before { content: counter(passo, decimal-leading-zero); font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--accent-soft); }
.passos h3 { margin-top: 8px; font-size: 22px; }
.passos p { margin-top: 10px; color: var(--ink-muted); font-size: 16px; }

.copiavel { margin-top: 16px; display: grid; gap: 12px; }
.copiavel pre {
  margin: 0; padding: 16px 18px; max-height: 260px; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-000);
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink);
}
.copiar { justify-self: start; }
button.copiar:not(.botao) {
  min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--bg-200); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 15px; cursor: pointer;
}
button.copiar:not(.botao):hover { border-color: var(--ink-muted); }

/* ---------- what you ask for ---------- */
.tabela { margin-top: 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-100); }
table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 620px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 500; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
tbody tr:last-child td { border-bottom: 0; }
td:nth-child(2) { white-space: nowrap; }
td:nth-child(3) { color: var(--ink-muted); }

/* ---------- the gallery ---------- */
.estilos { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 800px) { .estilos { grid-template-columns: repeat(3, 1fr); } }
.efeitos { display: grid; gap: 16px; margin-top: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .efeitos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .efeitos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.estilo, .efeito {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-100); overflow: hidden;
}
.estilo video { width: 100%; aspect-ratio: 9 / 8; object-fit: cover; background: var(--bg-000); }
.efeito video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--bg-000); }
.estilo h4, .efeito h4 { padding: 16px 16px 0; font-size: 18px; font-weight: 700; }
.efeito h4 { font-size: 16px; }
.estilo p, .efeito p { padding: 6px 16px 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-muted); flex: 1; }
.efeito p { font-size: 13.5px; }

.escolher { margin: 0; }
.escolha {
  display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 14px 12px 12px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg-000);
  font-family: var(--font-display); font-weight: 700; font-size: 14px; cursor: pointer;
}
.escolha:hover { border-color: var(--ink-muted); }
.escolha input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
/* a chosen card: the accent on its border (main.js sets the class; :has covers a page without it) */
.estilo.marcado, .efeito.marcado, .estilo:has(input:checked), .efeito:has(input:checked) { border-color: var(--accent); }
.marcado .escolha, .escolha:has(input:checked) { border-color: var(--accent); color: var(--accent-soft); }

.larga { margin-top: 24px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-md); }

/* ---------- the request builder ---------- */
.montador { display: grid; gap: 28px; margin-top: 32px; align-items: start; }
@media (min-width: 980px) { .montador { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.opcoes { display: grid; gap: 16px; min-width: 0; }
fieldset { margin: 0; padding: 22px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-100); display: grid; gap: 10px; }
legend { padding: 0 8px; margin-left: -8px; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
fieldset > label { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; cursor: pointer; }
fieldset input[type="radio"], fieldset input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--accent); }
fieldset .campo { display: grid; gap: 6px; margin: 2px 0 6px 28px; font-size: 14px; color: var(--ink-muted); cursor: default; }
fieldset .campo input[type="text"], fieldset .campo input[type="url"], fieldset .campo select {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-000); color: var(--ink);
  font-family: var(--font-body); font-size: 16px;
}
fieldset .campo input::placeholder { color: var(--ink-muted); opacity: 0.6; }
.dica { font-size: 14.5px; color: var(--ink-muted); }

.cores { flex-wrap: wrap; align-items: center; gap: 10px; }
.cores:not([hidden]) { display: flex !important; }
.cores > span { flex-basis: 100%; }
.amostra { position: relative; display: inline-flex; cursor: pointer; }
.amostra input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.amostra span { display: block; width: 38px; height: 38px; border-radius: 999px; background: var(--cor); border: 3px solid var(--bg-100); box-shadow: 0 0 0 1px var(--line); font-size: 0; }
.amostra input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.amostra input:focus-visible + span { outline: 2px solid var(--red-300); outline-offset: 3px; }
.outra { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.outra input { width: 44px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-000); cursor: pointer; }

.saida { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-100); }
@media (min-width: 980px) { .saida { position: sticky; top: 84px; } }
.resumo { font-family: var(--font-mono); font-size: 13.5px; color: var(--accent-soft); }
.saida .copiavel pre { max-height: min(56vh, 520px); }
.saida .copiar { justify-self: stretch; }

/* ---------- needs, questions, closing ---------- */
.lista { margin: 24px 0 0; padding: 0 0 0 20px; display: grid; gap: 10px; color: var(--ink-muted); max-width: 76ch; }
.lista strong { color: var(--ink); }
.perguntas { margin: 28px 0 0; display: grid; gap: 4px; max-width: 76ch; }
.perguntas dt { margin-top: 18px; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.perguntas dd { margin: 6px 0 0; color: var(--ink-muted); }
.fecho { text-align: center; }
.fecho p { margin: 14px auto 0; color: var(--ink-muted); max-width: 52ch; }
.fecho .acoes { justify-content: center; }

.rodape { max-width: 1160px; margin: clamp(64px, 10vw, 120px) auto 0; padding: 28px clamp(20px, 5vw, 48px) 120px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-muted); display: grid; gap: 8px; }
.rodape a { color: var(--ink-muted); }

/* ---------- the floating reminder (main.js shows it once something is chosen) ---------- */
.flutuante {
  position: fixed; z-index: 30; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 20px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg-200);
  font-size: 14.5px; white-space: nowrap;
}
.flutuante span { overflow: hidden; text-overflow: ellipsis; }
.flutuante .botao { min-height: 42px; padding: 8px 18px; font-size: 15px; flex: none; }
