/* Página de apresentação da conexão do ArmazenAI com o Mercado Livre.
   Usa as mesmas cores e fontes do programa (src/renderer/src/styles.css). */

@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fontes/hanken-grotesk-latin-wght-normal.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fontes/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --page: #edeaf7;
  --dot: rgba(129, 140, 248, 0.42);
  --card: #ffffff;
  --well: #f8fafc;
  --border: #e4e8f1;
  --border-2: #cbd5e1;
  --text: #0f172a;
  --text-2: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --accent: #5b6bf0;
  --accent-ink: #4f46e5;
  --accent-soft: #eef0ff;
  --accent-line: #c7d2fe;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --face-a: #ffffff;
  --face-b: #dfe5ff;
  --tick: #94a3b8;
  --tick-major: #312e81;
  --shadow: 0 30px 70px -36px rgba(79, 70, 229, 0.45), 0 2px 8px rgba(15, 23, 42, 0.04);
  --font: 'Hanken Grotesk Variable', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono Variable', 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a0b14;
    --dot: rgba(129, 140, 248, 0.2);
    --card: #121829;
    --well: #0b0f1d;
    --border: #212a42;
    --border-2: #3a4763;
    --text: #f8fafc;
    --text-2: #e2e8f0;
    --muted: #94a3b8;
    --faint: #64748b;
    --accent: #818cf8;
    --accent-ink: #a5b4fc;
    --accent-soft: #1b2040;
    --accent-line: #343c78;
    --warn: #fbbf24;
    --warn-soft: #3a2a0a;
    --face-a: #1d2646;
    --face-b: #0f1530;
    --tick: #475569;
    --tick-major: #c7d2fe;
    --shadow: 0 30px 70px -36px rgba(0, 0, 0, 0.85), 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: clamp(14px, 3.2vw, 44px);
  background-color: var(--page);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.5px);
  background-size: 22px 22px;
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
  padding: 0;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Folha ---------- */

.folha {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(22px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 680;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.marca img {
  width: 34px;
  height: 34px;
  display: block;
}

.endereco {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- Abertura ---------- */

.abertura {
  position: relative;
  padding: clamp(40px, 8vw, 96px) clamp(22px, 5vw, 56px) clamp(44px, 7vw, 84px);
}

.abertura-texto {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.sobrelinha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 26px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.estado {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 9px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  letter-spacing: 0.06em;
}

.estado::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

h1 {
  font-size: clamp(2.3rem, 6.1vw, 4.35rem);
  font-weight: 660;
  line-height: 1.02;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  color: var(--accent-ink);
}

.chamada {
  margin-top: 26px;
  max-width: 540px;
  font-size: 1.12rem;
  color: var(--muted);
  text-wrap: pretty;
}

/* O disco do cofre, o mesmo desenho do ícone do programa. */

.disco {
  position: absolute;
  top: 50%;
  right: -150px;
  width: 540px;
  height: 540px;
  margin-top: -270px;
  pointer-events: none;
}

.disco svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.disco .aro,
.disco .miolo {
  transform-origin: 200px 200px;
  transform-box: view-box;
}

.disco .aro {
  animation: girar-aro 2.6s var(--ease) both;
}

.disco .miolo {
  animation: girar-miolo 2.6s var(--ease) both;
}

@keyframes girar-aro {
  from {
    transform: rotate(-150deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes girar-miolo {
  from {
    transform: rotate(90deg);
  }
  to {
    transform: rotate(0deg);
  }
}

/* ---------- Blocos ---------- */

.bloco {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px 40px;
  padding: clamp(34px, 5vw, 60px) clamp(22px, 5vw, 56px);
  border-top: 1px solid var(--border);
}

.rotulo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Bloco em que o conteúdo ocupa a largura toda, com o rótulo em cima. */

.bloco.largo {
  grid-template-columns: minmax(0, 1fr);
  gap: 54px;
}

.bloco.largo .rotulo {
  flex-direction: row;
  align-items: baseline;
  gap: 14px;
}

.rotulo .num {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: var(--accent-ink);
}

h2 {
  font-size: 1.32rem;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h3 {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

/* Passos da conexão */

.passos {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 0;
  counter-reset: passo;
}

.passos li {
  position: relative;
  counter-increment: passo;
  padding: 26px 22px 0 0;
  border-top: 2px solid var(--accent-line);
}

.passos li::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent);
}

.passos li::after {
  content: counter(passo, decimal-leading-zero);
  position: absolute;
  top: -30px;
  left: 22px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0.06em;
}

.passos p {
  margin-top: 8px;
  font-size: 0.94rem;
  color: var(--muted);
}

/* Quadro do que o programa lê, propõe e aplica */

.matriz {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.matriz thead th {
  padding: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  border-bottom: 1px solid var(--border-2);
}

.matriz thead th:first-child {
  text-align: left;
}

.matriz tbody th {
  padding: 15px 16px 15px 0;
  text-align: left;
  font-weight: 620;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--border);
}

.matriz tbody th small {
  display: block;
  margin-top: 2px;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.matriz td {
  width: 84px;
  padding: 15px 0;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.matriz tbody tr:last-child th,
.matriz tbody tr:last-child td {
  border-bottom: 0;
}

.m {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: middle;
}

.m.sim {
  background: var(--accent);
}

.m.apr {
  border: 2px solid var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
}

.m.nao {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--border-2);
}

.legenda {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--muted);
}

.legenda li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.nota {
  margin-top: 18px;
  font-size: 0.94rem;
  color: var(--muted);
  max-width: 640px;
}

/* Cuidados */

.cuidados {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 40px;
}

.cuidados li {
  padding-left: 18px;
  border-left: 2px solid var(--accent-line);
}

.cuidados p {
  margin-top: 6px;
  font-size: 0.94rem;
  color: var(--muted);
}

/* Resumo em inglês */

.ingles {
  padding: 26px 28px;
  border-radius: 18px;
  background: var(--well);
  border: 1px solid var(--border);
  font-size: 0.97rem;
  color: var(--text-2);
}

.ingles p + p {
  margin-top: 12px;
}

/* Rodapé */

.rodape {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 40px;
  padding: 26px clamp(22px, 5vw, 56px) 30px;
  border-top: 1px solid var(--border);
  background: var(--well);
  font-size: 0.86rem;
  color: var(--muted);
}

.rodape p {
  max-width: 520px;
}

.rodape .mono {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

/* ---------- Página de retorno ---------- */

.retorno {
  min-height: calc(100vh - 2 * clamp(14px, 3.2vw, 44px));
  min-height: calc(100dvh - 2 * clamp(14px, 3.2vw, 44px));
  display: grid;
  place-items: center;
}

.retorno .folha {
  width: 100%;
  max-width: 560px;
}

.retorno-corpo {
  padding: clamp(30px, 6vw, 52px) clamp(24px, 6vw, 52px) clamp(32px, 6vw, 52px);
}

.retorno-corpo h1 {
  font-size: clamp(1.9rem, 5.2vw, 2.6rem);
}

.retorno-corpo p {
  margin-top: 16px;
  color: var(--muted);
}

.retorno-corpo .voltar {
  display: inline-block;
  margin-top: 26px;
  font-weight: 600;
}

/* ---------- Entrada ---------- */

.surge {
  animation: surgir 0.8s var(--ease) both;
}

.surge.a2 {
  animation-delay: 0.1s;
}

.surge.a3 {
  animation-delay: 0.2s;
}

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

@media (prefers-reduced-motion: reduce) {
  .surge,
  .disco .aro,
  .disco .miolo {
    animation: none;
  }
}

/* ---------- Telas menores ---------- */

@media (max-width: 960px) {
  .disco {
    right: -230px;
    opacity: 0.55;
  }

  .passos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 46px 0;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .bloco {
    grid-template-columns: minmax(0, 1fr);
  }

  .rotulo {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
  }

  .bloco.largo {
    gap: 46px;
  }

  .bloco.largo .rotulo {
    margin-bottom: 0;
  }

  .disco {
    top: 0;
    right: -170px;
    width: 340px;
    height: 340px;
    margin-top: -110px;
    opacity: 0.4;
  }

  .endereco {
    display: none;
  }

  .cuidados {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .matriz td {
    width: 58px;
  }
}

@media (max-width: 480px) {
  .passos {
    grid-template-columns: minmax(0, 1fr);
  }

  .matriz td {
    width: 46px;
  }

  .matriz thead th {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
  }
}
