/* Artes LiVESUB */

@font-face {
  font-family: "Akhand Soft";
  src: url("../assets/fontes/AkhandSoft-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --marinho: #20386E;      /* azul-escuro do logo */
  --azul: #2F73C7;         /* azul-claro do logo */
  --azul-forte: #245fa8;
  --azul-claro: #eaf2fb;
  --tinta: #1b2333;
  --tinta-2: #4a5263;
  --tinta-3: #6b7282;
  --linha: #dfe3ea;
  --papel: #ffffff;
  --papel-2: #f4f6f9;

  --natal: #96291c;
  --natal-fundo: #fbf5ee;
  --natal-linha: #ecdccb;

  --fonte: "Poppins", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fonte-titulo: "Akhand Soft", "Poppins", -apple-system, "Segoe UI", Arial, sans-serif;
  --margem: clamp(16px, 5vw, 40px);
  --largura: 1040px;
  --raio: 20px;
  --raio-p: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; color: var(--marinho); }
h1, h2 { font-family: var(--fonte-titulo); font-weight: 700; letter-spacing: 0; line-height: 1.02; }
p { margin: 0; }
a { color: var(--azul); }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; border-radius: 6px; }

/* Revisão */
.faixa-revisao {
  background: #fff4d6; color: #6b4a00; font-size: 13px; text-align: center; padding: 8px var(--margem);
}

/* Barra */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--margem);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--linha);
}
.barra__logo img { height: 34px; width: auto; }
.barra__link { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--marinho); padding: 8px 4px; }

/* Capa */
.capa {
  max-width: var(--largura); margin: 0 auto;
  padding: clamp(36px, 7vw, 72px) var(--margem) clamp(28px, 5vw, 48px);
}
.capa__selo {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--azul);
  background: var(--azul-claro); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.capa h1 { font-size: clamp(40px, 8.4vw, 72px); max-width: 15ch; }
.capa__texto { margin-top: 16px; font-size: clamp(16px, 2.2vw, 19px); color: var(--tinta-2); max-width: 54ch; }
.capa__passos {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 500; color: var(--tinta-2);
}
.capa__passos li { display: flex; align-items: center; gap: 8px; }
.capa__passos span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--marinho); color: #fff; font-size: 12px; font-weight: 600;
}

/* Pacote */
.pacote {
  max-width: calc(var(--largura) + 2 * var(--margem)); margin: 0 auto 24px;
  padding: 0 var(--margem);
}
.pacote > * { margin: 0; }
.pacote > :last-child { border-radius: 0 0 var(--raio) var(--raio); padding-bottom: clamp(20px, 3vw, 36px); }
.pacote__cab {
  border-radius: var(--raio) var(--raio) 0 0;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 40px) 12px;
  display: grid; gap: clamp(16px, 3vw, 36px); align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.pacote__capa img { width: 100%; height: auto; }
.pacote__selo { font-size: 13px; font-weight: 600; color: var(--azul); margin-bottom: 8px; }
.pacote__texto { margin-top: 10px; color: var(--tinta-2); max-width: 46ch; }
.pacote__fichas { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pacote__fichas li {
  font-size: 12.5px; font-weight: 600; color: var(--tinta-2);
  background: var(--papel); border: 1px solid var(--linha); border-radius: 999px; padding: 4px 10px;
}
.pacote__acoes { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 20px; }

.pacote__post { font-size: 15px; font-weight: 600; text-decoration: none; padding: 10px 0; }
.pacote__post::after { content: " ›"; }
.pacote__dica { margin-top: 12px; font-size: 13px; color: var(--tinta-2); background: var(--papel); border-radius: 10px; padding: 10px 12px; }

.pacote__sub {
  padding: 24px clamp(16px, 4vw, 40px) 0;
  font-family: var(--fonte-titulo); font-weight: 700; font-size: clamp(24px, 3.6vw, 30px); line-height: 1;
}
.pacote__subtexto { padding: 6px clamp(16px, 4vw, 40px) 0; font-size: 14px; color: var(--tinta-2); }

.artes {
  list-style: none; padding: 14px clamp(16px, 4vw, 40px) 4px;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.arte {
  background: var(--papel); border-radius: var(--raio-p); overflow: hidden;
  display: flex; flex-direction: column; border: 1px solid var(--linha);
}
.arte__previa { position: relative; aspect-ratio: 1; padding: 14px; background: radial-gradient(circle at 50% 45%, #fff 0%, #f3efe9 100%); }
.arte__previa img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; }
.arte__info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.arte h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--marinho); }
.arte__peca { font-size: 12.5px; color: var(--tinta-3); }
.arte__botoes { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.arte .baixar { flex: 1; }

.elementos {
  list-style: none; padding: 14px clamp(16px, 4vw, 40px) 4px;
  display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.elemento {
  position: relative; width: 100%; aspect-ratio: 1; padding: 12px;
  border: 1px solid var(--linha); border-radius: var(--raio-p); background: var(--papel);
  cursor: pointer; display: grid; place-items: center;
  transition: border-color 0.15s, transform 0.15s;
}
.elemento img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; }
.elemento:hover { border-color: var(--azul); transform: translateY(-1px); }
.elemento__n { position: absolute; left: 7px; top: 5px; font-size: 11px; font-weight: 600; color: var(--tinta-3); }
.elemento__baixar {
  position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--azul); color: #fff;
}
.elemento__baixar svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.elemento.baixar--pendente { opacity: 0.45; cursor: not-allowed; }
.elemento.baixar--pendente::after { content: none; }


/* Botão de baixar */
.baixar {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 0; background: var(--azul); color: #fff;
  font: 600 14px/1 var(--fonte); cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s;
}
.baixar:hover { background: var(--azul-forte); }
.baixar--grande { min-height: 52px; padding: 0 26px; font-size: 16px; }
.baixar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.arte .baixar--pendente { font-size: 12px; padding: 0 8px; }
.baixar--pendente::after { content: "· pendente"; font-weight: 500; white-space: nowrap; }

/* Seções */
.gabaritos, .comprar {
  max-width: var(--largura); margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) var(--margem) 0;
}
.gabaritos h2, .comprar h2 { font-size: clamp(32px, 5.6vw, 48px); }
.secao__texto { margin-top: 10px; color: var(--tinta-2); max-width: 58ch; }

.gabaritos__lista { margin-top: 24px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gabarito { border: 1px solid var(--linha); border-radius: var(--raio-p); padding: 16px 16px 6px; }
.gabarito h3 { font-family: var(--fonte-titulo); font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.gabarito ul { list-style: none; margin: 0; padding: 0; }
.gabarito li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linha); }
.gabarito li:first-child { border-top: 0; }
.gabarito__peca { display: flex; flex-direction: column; }
.gabarito__peca span { font-size: 15px; font-weight: 500; }
.gabarito__peca small { font-size: 12.5px; color: var(--tinta-3); }
.gabarito__botoes { display: flex; gap: 6px; }
.gabarito .baixar { min-width: 72px; padding: 0 12px; background: var(--papel); color: var(--azul); box-shadow: inset 0 0 0 1.5px var(--azul); }
.gabarito .baixar:hover { background: var(--azul-claro); }
.gabarito .baixar--pendente { box-shadow: none; }

.comprar { padding-bottom: clamp(48px, 8vw, 88px); }
.comprar__botoes { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  background: var(--azul); color: #fff; text-decoration: none;
  font: 600 15px/1.2 var(--fonte); border: 0; cursor: pointer;
}
.botao:hover { background: var(--azul-forte); }
.botao--contorno { background: transparent; color: var(--marinho); box-shadow: inset 0 0 0 1.5px var(--marinho); }
.botao--contorno:hover { background: var(--azul-claro); }
.botao svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.botao svg .cheio { fill: currentColor; stroke: none; }

/* Rodapé */
.rodape { background: var(--marinho); color: #c9d3e6; padding: 36px var(--margem) 44px; font-size: 13px; text-align: center; }
.rodape img { height: 34px; width: auto; margin: 0 auto 14px; }
.rodape p + p { margin-top: 8px; }
.rodape a { color: #fff; }

/* Janela de cadastro */
.liberar {
  width: min(440px, calc(100% - 24px)); max-height: calc(100% - 24px);
  border: 0; border-radius: var(--raio); padding: 0; color: var(--tinta);
  box-shadow: 0 24px 64px rgba(16, 30, 60, 0.28);
}
.liberar::backdrop { background: rgba(16, 26, 48, 0.55); }
.liberar__form { position: relative; padding: 28px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.liberar__fechar {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  border: 0; background: none; font-size: 28px; line-height: 1; color: var(--tinta-3); cursor: pointer; border-radius: 50%;
}
.liberar h2 { font-size: 34px; padding-right: 36px; }
.liberar__arquivo { font-size: 13px; font-weight: 600; color: var(--azul); }
.liberar__arquivo:empty { display: none; }
.liberar__texto { font-size: 14px; color: var(--tinta-2); }
.campo { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: var(--tinta-2); }
.campo input, .campo select {
  font: 400 16px/1.3 var(--fonte); color: var(--tinta);
  min-height: 48px; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid var(--linha); background: #fff;
}
.campo input:focus, .campo select:focus { outline: none; border-color: var(--azul); }
.campo [aria-invalid="true"] { border-color: #c0392b; }
.aceite { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--tinta-2); line-height: 1.45; }
.aceite input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--azul); }
.isca { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.botao--cheio { width: 100%; margin-top: 4px; }
.liberar__status { font-size: 13px; }
.liberar__status:empty { display: none; }
.liberar__status--erro { color: #b03224; }
.liberar__lgpd { font-size: 12px; color: var(--tinta-3); }

/* Aviso rápido */
.aviso {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(440px, calc(100% - 24px)); z-index: 30;
  background: var(--marinho); color: #fff; font-size: 14px; text-align: center;
  padding: 12px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(16, 30, 60, 0.3);
}

@media (max-width: 760px) {
  .pacote__cab { grid-template-columns: minmax(0, 1fr); }
  .pacote__acoes .baixar--grande { width: 100%; }
}

@media (max-width: 520px) {
  .elementos { grid-template-columns: repeat(3, 1fr); padding-left: 14px; padding-right: 14px; }
  .pacote__sub, .pacote__subtexto { padding-left: 16px; padding-right: 16px; }
  .capa { padding-top: 28px; }
  .capa h1 { font-size: 40px; }
  .capa__passos { flex-direction: column; margin-top: 20px; }
  .artes { grid-template-columns: 1fr 1fr; gap: 10px; padding-left: 14px; padding-right: 14px; }
  .arte__previa { padding: 8px; }
  .arte__info { padding: 10px 10px 12px; }
  .arte h3 { font-size: 14px; }
  .comprar__botoes .botao { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ——— Crítica de 05/11: compra, peça, grupos, sucesso ——— */
.barra__nav { display: flex; gap: 4px; }
.barra__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }

.pacote__comprar { margin-top: 14px; font-size: 14px; color: var(--tinta-2); }
.pacote__comprar a { font-weight: 600; white-space: nowrap; }
.pacote__comprar a::after { content: " ›"; }

.arte__encaixe { font-size: 13.5px; font-weight: 500; color: var(--tinta-2); }
.arte__gabarito { font-weight: 600; }

.elementos__grupo {
  margin: 0; padding: 18px clamp(16px, 4vw, 40px) 0;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--tinta-2);
}
.elementos__grupo span { font-weight: 500; color: var(--tinta-3); }
.pacote__subtexto + .elementos__grupo { padding-top: 12px; }
.elementos { padding-top: 8px; }

/* Janela na cor do kit */

/* Tela de sucesso */
.liberar__sucesso { position: relative; padding: 28px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.sucesso__icone { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #e5f3ea; color: #1f7a45; }
.sucesso__icone svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.liberar__sucesso h2 { font-size: 32px; padding-right: 36px; }
.sucesso__dica { font-size: 13px; background: #fff4d6; color: #5c4000; border-radius: 10px; padding: 10px 12px; }
.sucesso__comprar { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--linha); }
.sucesso__rotulo { font-size: 14px; font-weight: 600; color: var(--marinho); }
.sucesso__voltar {
  align-self: center; min-height: 44px; padding: 0 16px; border: 0; background: none;
  font: 600 14px/1 var(--fonte); color: var(--tinta-2); cursor: pointer;
}

@media (max-width: 520px) {
  .barra__link { font-size: 13px; padding: 0 6px; }
  /* etiquetas numa linha só */
  .pacote__fichas { flex-wrap: wrap; gap: 2px 0; }
  .pacote__fichas li { border: 0; background: none; padding: 0; font-size: 12.5px; white-space: nowrap; }
  .pacote__fichas li + li::before { content: "·"; margin: 0 6px; color: var(--tinta-3); }
  /* artes completas em uma coluna, cartão horizontal */
  .artes { grid-template-columns: 1fr; gap: 10px; }
  .arte { flex-direction: row; }
  .arte__previa { flex: none; width: 116px; aspect-ratio: 1; }
  .arte__previa img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
  .arte__info { padding: 10px 12px; }
  .arte__botoes { padding-top: 8px; }
}

[hidden] { display: none !important; }

/* ——— Tema do kit (variáveis --k-* vêm do kit.json; sem tema, azul LiVESUB) ——— */
.pacote > * { background: var(--k-fundo, var(--papel-2)); }
.pacote__selo { color: var(--k-cor, var(--azul)); }
.pacote__txt h1 { font-size: clamp(36px, 6vw, 56px); color: var(--k-titulo, var(--marinho)); }
.pacote__sub { color: var(--k-titulo, var(--marinho)); }
.pacote .arte, .pacote .elemento, .pacote .pacote__fichas li { border-color: var(--k-linha, var(--linha)); }
.pacote .baixar { background: var(--k-cor, var(--azul)); }
.pacote .baixar:hover { background: var(--k-forte, var(--azul-forte)); }
.pacote .baixar--pendente { background: #c9ccd3; }
.pacote .elemento { background: var(--papel); }
.pacote .elemento:hover { border-color: var(--k-cor, var(--azul)); }
.pacote .elemento__baixar { background: var(--k-cor, var(--azul)); }
.pacote__comprar a, .arte__gabarito { color: var(--k-cor, var(--azul)); }

.liberar .liberar__arquivo { color: var(--k-cor, var(--azul)); }
.liberar h2 { color: var(--k-titulo, var(--marinho)); }
.liberar .botao--cheio:not(.botao--contorno) { background: var(--k-cor, var(--azul)); }
.liberar .botao--cheio:not(.botao--contorno):hover { background: var(--k-forte, var(--azul-forte)); }
.liberar .aceite input { accent-color: var(--k-cor, var(--azul)); }
.liberar .campo input:focus, .liberar .campo select:focus { border-color: var(--k-cor, var(--azul)); }
.sucesso__rotulo { color: var(--k-titulo, var(--marinho)); }

/* ——— Vitrine e "Mais kits" ——— */
.vitrine, .mais-kits { max-width: var(--largura); margin: 0 auto; padding: 0 var(--margem); }
.mais-kits { padding-top: clamp(32px, 6vw, 56px); }
.mais-kits h2 { font-size: clamp(28px, 4.6vw, 40px); margin-bottom: 16px; }
.vitrine__grade { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.vitrine__vazia { color: var(--tinta-2); }
.cartao-kit {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--k-fundo, var(--papel-2)); border: 1px solid var(--k-linha, var(--linha));
  border-radius: var(--raio); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s;
}
.cartao-kit:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16, 30, 60, 0.12); }
.cartao-kit__capa { padding: 18px 18px 0; }
.cartao-kit__capa img { width: 100%; height: auto; aspect-ratio: 700 / 434; object-fit: contain; }
.cartao-kit__txt { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cartao-kit__selo { font-size: 12.5px; font-weight: 600; color: var(--k-cor, var(--azul)); }
.cartao-kit h3 { font-family: var(--fonte-titulo); font-size: 30px; line-height: 1; color: var(--k-titulo, var(--marinho)); }
.cartao-kit__info { font-size: 13px; color: var(--tinta-2); }
.cartao-kit__ver {
  margin-top: 10px; align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; background: var(--k-cor, var(--azul)); color: #fff; font-weight: 600; font-size: 14px;
}
.voltar-vitrine {
  display: flex; align-items: center; max-width: calc(var(--largura) + 2 * var(--margem)); margin: 0 auto;
  min-height: 44px; padding: 8px var(--margem) 4px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.voltar-vitrine::before { content: "‹ "; white-space: pre; }
.gabaritos__todos {
  margin-top: 14px; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--azul); background: none; color: var(--azul); font: 600 14px/1 var(--fonte);
}
.modo-kit .pacote { margin-top: 4px; }
