/* Site do guia "Como editar vídeos com IA" (@orodmorais). Veja DESIGN.md.
   Layout: coluna única no celular; no desktop cada seção tem o título fixo à esquerda e o conteúdo à direita.
   Tokens: navy de fundo, off-white de texto, pêssego como acento do guia (tema IA). */

[hidden] { display: none !important; }

:root {
  --navy: #0B1426;
  --navy-2: #13203A;
  --navy-3: #0E182D;
  --code: #070D1A;
  --ink: #F4F1EA;
  --ink-dim: #A7B0C4;
  --peach: #FFB089;
  --peach-soft: rgba(255, 176, 137, .12);
  --lime: #D4FF3D;
  --line: rgba(244, 241, 234, .16);
  --display: 'Archivo', system-ui, sans-serif;
  --text: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { line-height: 1.5; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

img, svg { max-width: 100%; }
a { color: inherit; }
code, kbd { font-family: var(--mono); font-size: .875em; }
code { background: rgba(244, 241, 234, .09); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--navy-2); }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }

/* ---------- Topo ---------- */
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { font-weight: 800; text-decoration: none; font-size: 1rem; }
.brand:hover { text-decoration: underline; text-underline-offset: 4px; }
.langs { display: flex; gap: 4px; }
.langs a {
  text-decoration: none; font-weight: 700; font-size: .875rem; color: var(--ink-dim);
  padding: 8px 12px; border-radius: 999px; border: 1px solid transparent; min-height: 36px; display: inline-flex; align-items: center;
}
.langs a[aria-current="true"] { color: var(--ink); border-color: var(--line); }
.langs a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding-block: 56px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.hero-label { font-weight: 700; font-size: .9375rem; color: var(--peach); }
.hero h1 {
  margin: 0; max-width: 11ch;
  font-family: var(--display); font-weight: 900; font-stretch: 125%;
  font-size: clamp(2.6rem, 8.2vw, 6rem); line-height: .98; letter-spacing: -.02em; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--peach); }
.hero .lead { margin: 0; max-width: 56ch; font-size: clamp(1.0625rem, 2vw, 1.25rem); line-height: 1.5; color: #D9DCE3; text-wrap: pretty; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  border-radius: 999px; text-decoration: none; font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1rem;
  border: 1.5px solid var(--line); color: var(--ink); transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { border-color: var(--ink); }
.btn-main { background: var(--peach); border-color: var(--peach); color: var(--navy); }
.btn-main:hover { background: #FFC2A3; border-color: #FFC2A3; }

.tl-title { margin: 28px 0 0; font-weight: 700; color: var(--ink-dim); font-size: .9375rem; }
.timeline { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 4px; text-align: center; }
.timeline li::before {
  content: ""; position: absolute; top: 26px; left: -50%; width: 100%; height: 2px; background: #3A4458; z-index: 0;
}
.timeline li:first-child::before { display: none; }
.node {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: .9375rem;
  border: 2px solid var(--peach); color: var(--peach); background: var(--navy);
}
.timeline li:first-child .node, .timeline li:last-child .node { background: var(--peach); color: var(--navy); }
.timeline .t-label { font-size: .9375rem; max-width: 14ch; text-wrap: balance; }

/* ---------- Índice ---------- */
.toc { padding-block: 72px 0; }
.toc h2 { margin: 0 0 16px; font-weight: 700; font-size: .9375rem; color: var(--peach); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.toc a {
  display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line);
  text-decoration: none; color: #D9DCE3; font-size: 1.0625rem; transition: color .2s;
}
.toc a:hover { color: var(--ink); }
.toc .n { font-family: var(--mono); font-size: .875rem; color: var(--peach); font-variant-numeric: tabular-nums; }

/* ---------- Seções do guia ---------- */
.sec { padding-block: 104px 0; scroll-margin-top: 8px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); column-gap: 72px; row-gap: 32px; align-items: start; }
.sec-head { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.num {
  align-self: flex-start; background: var(--peach); color: var(--navy); font-family: var(--mono); font-weight: 600; font-size: .8125rem;
  padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.sec h2 { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 122%; font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; }
.sec-lead { margin: 0; color: var(--ink-dim); font-size: 1.0625rem; line-height: 1.55; text-wrap: pretty; max-width: 40ch; }
.sec-body { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.sec-body > p { margin: 0; font-size: 1.0625rem; line-height: 1.6; color: #D9DCE3; max-width: 62ch; text-wrap: pretty; }
.minor { font-weight: 700; font-size: .9375rem; color: var(--ink-dim); margin: 0; }

/* passos verticais */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stepper > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 18px; padding-bottom: 24px; position: relative; }
.stepper > li:last-child { padding-bottom: 0; }
.stepper > li::before { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--line); }
.stepper > li:last-child::before { display: none; }
.dot-n {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--navy);
  font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: .875rem;
}
.stepper.peach .dot-n, .stepper > li.hl .dot-n { background: var(--peach); }
.step-body { min-width: 0; padding-top: 6px; display: flex; flex-direction: column; gap: 12px; font-size: 1.0625rem; line-height: 1.55; }
.step-body p { margin: 0; text-wrap: pretty; }
.step-body .after { font-size: .9375rem; color: var(--ink-dim); }
.mini-logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--ink); vertical-align: -7px; margin-right: 10px; }
.mini-logo img { width: 16px; height: 16px; }

/* callouts */
.note { background: var(--peach-soft); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.note h3 { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.0625rem; }
.note p { margin: 0; line-height: 1.6; color: #E6E8EE; }
.note.dark { background: var(--navy-2); border: 1px solid var(--line); }
.note.dark h3 { color: var(--peach); }

/* cartões */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card { background: var(--navy-2); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card .c-label { font-weight: 700; font-size: .875rem; color: var(--ink-dim); }
.card .c-value { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.25rem; line-height: 1.2; text-wrap: balance; }
.card .c-note { font-size: .9375rem; line-height: 1.5; color: var(--ink-dim); }
.card.hl { background: var(--peach); border-color: var(--peach); color: var(--navy); }
.card.hl .c-label, .card.hl .c-note { color: #3A2A22; }

/* ferramentas */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.row.head { padding: 0 0 10px; border-bottom: 2px solid var(--ink); font-weight: 700; font-size: .875rem; color: var(--ink-dim); }
.row.hl { background: var(--peach-soft); margin-inline: -14px; padding-inline: 14px; border-radius: 12px; border-bottom-color: transparent; }
.tool { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.tile { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--ink); display: grid; place-items: center; }
.tile img, .tile svg { width: 20px; height: 20px; }
.tool .t-name { font-weight: 800; line-height: 1.25; }
.tool .t-note { display: block; font-size: .8125rem; color: var(--ink-dim); margin-top: 2px; }
.row .c { font-size: .9375rem; line-height: 1.5; color: #D9DCE3; min-width: 0; }

/* abas */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; align-self: flex-start; }
.tab { font: inherit; font-weight: 800; font-size: .9375rem; color: var(--ink-dim); background: none; border: 0; border-radius: 999px; padding: 10px 20px; min-height: 44px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--navy); }
.tab:hover:not([aria-selected="true"]) { color: var(--ink); }
.panel { display: flex; flex-direction: column; gap: 28px; }

/* blocos de código */
.code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; background: var(--code); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: .8125rem; line-height: 1.6; white-space: pre; color: var(--ink); }
.code code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.copy-btn {
  font: inherit; font-weight: 700; font-size: .8125rem; color: var(--ink); background: rgba(244, 241, 234, .08); border: 0; border-left: 1px solid var(--line);
  padding: 0 16px; min-width: 88px; min-height: 44px; cursor: pointer; transition: background-color .2s;
}
.copy-btn:hover { background: rgba(244, 241, 234, .16); }
.copy-btn.ok { color: var(--navy); background: var(--peach); }
.code.tagged { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tag btn" "pre pre"; }
.code.tagged .tag { grid-area: tag; align-self: center; font-family: var(--mono); font-size: .75rem; font-weight: 600; color: var(--peach); padding: 0 16px; }
.code.tagged .copy-btn { grid-area: btn; min-height: 38px; min-width: 80px; }
.code.tagged pre { grid-area: pre; border-top: 1px solid var(--line); margin-top: -1px; }
.again { display: flex; flex-direction: column; gap: 12px; }
.again p { margin: 0; }

/* prompt master */
.versions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opt { text-align: left; font: inherit; color: var(--ink); background: var(--navy-2); border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.opt strong { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.0625rem; }
.opt span { font-size: .9375rem; line-height: 1.45; color: var(--ink-dim); }
.opt[aria-pressed="true"] { border-color: var(--peach); box-shadow: inset 0 0 0 1.5px var(--peach); }
.copy-big {
  font: inherit; font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.25rem;
  background: var(--peach); color: var(--navy); border: 0; border-radius: 16px; padding: 22px 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; transition: transform .12s ease, background-color .2s;
}
.copy-big:hover { background: #FFC2A3; }
.copy-big:active { transform: scale(.985); }
.copy-big svg { width: 22px; height: 22px; flex: none; }
.status { min-height: 1.5em; margin: -14px 0 0; text-align: center; font-size: .9375rem; color: var(--ink-dim); }
.status.ok { color: var(--peach); font-weight: 700; }
.after-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.after-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 1rem; }
.after-steps b { font-family: var(--mono); font-weight: 600; font-size: .8125rem; background: var(--peach); color: var(--navy); border-radius: 999px; text-align: center; padding: 2px 0; }
.textbox { display: flex; flex-direction: column; gap: 10px; }
.textbox .meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.count { font-family: var(--mono); font-size: .8125rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.textbox pre { margin: 0; background: var(--code); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-family: var(--mono); font-size: .8125rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; min-width: 0; }
.p-note { font-size: .9375rem; color: var(--ink-dim); margin: 0; }
.phases { display: flex; flex-direction: column; }
.phase { display: grid; grid-template-columns: 34px 130px minmax(0, 1fr); column-gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.phase:first-child { border-top: 1px solid var(--line); }
.phase .pn { font-family: var(--mono); font-weight: 600; font-size: .8125rem; color: var(--peach); }
.phase strong { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1rem; }
.phase span { font-size: .9375rem; line-height: 1.5; color: #D9DCE3; }

/* depois do setup */
.big-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.big-steps > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; font-size: 1.0625rem; line-height: 1.55; }
.big-steps .bn { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 1.5rem; line-height: 1.1; color: var(--peach); font-variant-numeric: tabular-nums; }
.big-steps .in { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.big-steps .in p { margin: 0; }
.big-steps .after { font-size: .9375rem; color: var(--ink-dim); }
.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tip { background: var(--navy-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; font-size: .9375rem; line-height: 1.5; }

/* problemas */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 16px; padding: 16px 0; font-weight: 600; font-size: 1rem; line-height: 1.45; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%23FFB089' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item summary:hover > span { color: var(--peach); }
.faq-item summary > span { min-width: 0; }
.faq-a { padding: 0 48px 18px 0; color: #D9DCE3; font-size: .9375rem; line-height: 1.55; }

/* rodapé */
.foot { margin-top: 112px; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 28px; font-size: .9375rem; color: var(--ink-dim); }
.foot a { color: var(--ink); text-underline-offset: 4px; }
.foot-pad { height: 8px; }

/* ---------- Telas menores ---------- */
@media (max-width: 1023px) {
  .sec { grid-template-columns: minmax(0, 1fr); padding-block: 80px 0; }
  .sec-head { position: static; }
  .sec-lead { max-width: 56ch; }
}
@media (max-width: 719px) {
  .hero { padding-top: 32px; }
  .hero h1 { max-width: 9ch; }
  .btn { width: 100%; }
  .hero-btns { width: 100%; flex-direction: column; }
  /* linha do tempo na vertical */
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline li { flex-direction: row; align-items: center; text-align: left; padding: 0 0 22px; gap: 16px; }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline li::before { top: -22px; left: 21px; width: 2px; height: 22px; }
  .timeline .t-label { max-width: none; }
  .toc { padding-top: 56px; }
  .toc ol { grid-template-columns: 1fr; }
  .sec { padding-block: 64px 0; }
  .cards, .versions, .tips { grid-template-columns: 1fr; }
  /* tabelas viram blocos */
  .row.head { display: none; }
  .row { grid-template-columns: 1fr; row-gap: 8px; }
  .row .c::before { content: attr(data-label); display: block; font-size: .8125rem; font-weight: 700; color: var(--ink-dim); margin-bottom: 2px; }
  .row.hl { margin-inline: -12px; padding-inline: 12px; }
  .faq-a { padding-right: 0; }
  .phase { grid-template-columns: 30px minmax(0, 1fr); row-gap: 2px; }
  .phase span { grid-column: 2; }
  .copy-big { font-size: 1.125rem; padding: 20px; }
  .code { grid-template-columns: minmax(0, 1fr); }
  .copy-btn { border-left: 0; border-top: 1px solid var(--line); min-height: 46px; }
  .code.tagged .copy-btn { border-top: 0; border-left: 1px solid var(--line); min-height: 40px; }
  .big-steps > li { grid-template-columns: 32px minmax(0, 1fr); }
  .foot { margin-top: 80px; }
  body { padding-bottom: 88px; }
}
@media (prefers-reduced-motion: reduce) { .copy-big, .btn, .copy-btn { transition: none; } }

/* barra fixa: botão na cor do guia */
.cta-btn { background: var(--peach); }
