/* Landing do PoupeJá — cores de poupeja_app/lib/app/core/theme/app_colors.dart (D12). */

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/roboto-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/roboto-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/roboto-700.woff2') format('woff2');
}

:root {
  --ink: #0f172a;        /* bgTop do app: texto e faixas */
  --muted: #475569;
  --line: #d5dbe5;
  --bg: #ffffff;
  --bg-alt: #eef1f6;
  --card: #ffffff;
  --dark-text: #cbd5e1;  /* texto secundário sobre o azul-escuro */
  --dark-line: #1e293b;
  /* Destaque do app. #6366F1 com texto branco fica abaixo do AA (4,47:1);
     o botão usa o primaryDark, e o hover escurece mais um passo. */
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --tag-bg: #eef2ff;
  --radius: 10px;
}

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

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

/* Enquanto o main.js confere a sessão de quem já tem crachá (routing.md §2). */
html.checking body {
  visibility: hidden;
}

body {
  margin: 0;
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(1.9rem, 5.2vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  font-weight: 500;
}

p {
  margin: 0 0 1em;
}

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

a:hover {
  color: var(--accent-hover);
}

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

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Texto longo em coluna estreita, alinhado à esquerda como as outras seções. */
.wrap--narrow > * {
  max-width: 760px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
  color: #fff;
}

/* ───── Botões ───── */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  line-height: 1.2;
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn--small {
  padding: 9px 14px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
}

.btn--ghost:hover {
  background: var(--tag-bg);
  color: var(--accent-hover);
}

.link-plain {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 4px;
}

.link-plain:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

/* ───── Topo ───── */

.topbar {
  border-bottom: 1px solid var(--dark-line);
  background: var(--ink);
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand img {
  border-radius: 8px;
}

.topbar__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

/* ───── Apresentação ───── */

.hero {
  padding: 40px 0 48px;
  background: var(--ink);
  color: #fff;
}

.hero .lead,
.hero .note,
.hero__login {
  color: var(--dark-text);
}

.hero a:not(.btn) {
  color: #c7d2fe;
}

.hero a:not(.btn):hover {
  color: #fff;
}

.hero .shot img,
.final .shot img {
  border-color: #334155;
}

.topbar :focus-visible,
.hero :focus-visible,
.final :focus-visible {
  outline-color: #a5b4fc;
}

.hero__inner {
  display: grid;
  gap: 36px;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36em;
}

.hero__cta {
  margin: 28px 0 10px;
}

.note {
  font-size: 0.95rem;
  color: var(--muted);
}

.hero__login {
  font-size: 0.95rem;
}

/* Capturas: moldura no azul-escuro do app, como a tela de um celular. */
.shot {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 280px;
}

.shot img {
  width: 100%;
  border: 6px solid var(--ink);
  border-radius: 22px;
  background: var(--ink);
}

/* ───── Seções ───── */

.section {
  padding: 56px 0;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 3px solid var(--ink);
  display: inline-block;
}

/* Seção branca com cartões cinza (fica entre duas seções cinza). */
.section--cards .feature,
.section--cards .more-features > div {
  background: var(--bg-alt);
}

/* Captura do app no computador: moldura de janela no azul-escuro do app. */
.desktop-shot {
  margin: 8px 0 0;
}

.desktop-shot img {
  width: 100%;
  border: 8px solid var(--ink);
  border-top-width: 22px;
  border-radius: 12px;
  background: var(--ink);
}

.section-intro {
  color: var(--muted);
  max-width: 40em;
  margin-top: -12px;
}

.problems,
.facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.problems li,
.facts li {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}

.feature {
  display: grid;
  gap: 24px;
  padding: 28px 22px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.feature__text {
  max-width: 34em;
}

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: #3730a3;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.more-features {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.more-features > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}

.more-features p {
  margin-bottom: 0;
}

.more-features p {
  color: var(--muted);
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 20px 20px 8px 70px;
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.steps p {
  color: var(--muted);
}

/* ───── Planos ───── */

.plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.plans--single {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.plan {
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.plan__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan__head h3 {
  margin: 0;
}

.plan__soon {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 10px;
}

.plan__price {
  margin: 10px 0 12px;
  color: var(--muted);
}

.plan__price strong {
  font-size: 1.6rem;
  color: var(--ink);
}

.plan ul {
  margin: 0 0 20px;
  padding-left: 1.2em;
  flex: 1;
}

.plan .btn {
  text-align: center;
}

.plans__more {
  margin-top: 18px;
}

/* ───── Perguntas frequentes ───── */

details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 18px;
  margin-bottom: 10px;
}

summary {
  cursor: pointer;
  font-weight: 500;
  padding: 16px 0;
  list-style-position: inside;
}

details p {
  color: var(--muted);
  margin-top: -4px;
}

/* ───── Chamada final e rodapé ───── */

.final {
  background: var(--ink);
  color: #fff;
}

.final .note {
  color: var(--dark-text);
}

.final__inner {
  text-align: center;
}

.final h2 {
  border-bottom: 0;
  display: block;
  max-width: 22em;
  margin-left: auto;
  margin-right: auto;
}

.footer {
  background: #0b1120;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-text);
  padding: 36px 0;
}

.footer a {
  color: #e2e8f0;
}

.footer a:hover {
  color: #fff;
}

.footer a:focus-visible {
  outline-color: #fff;
}

.footer__brand {
  font-weight: 700;
  color: #fff;
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  overflow-wrap: anywhere;
}

/* ───── Telas maiores ───── */

@media (min-width: 600px) {
  .problems,
  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .more-features {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .plans {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (min-width: 880px) {
  .hero {
    padding: 64px 0 72px;
  }

  .hero__inner {
    grid-template-columns: 1fr 320px;
    align-items: center;
    gap: 56px;
  }

  .hero__shot {
    max-width: 320px;
  }

  .feature {
    grid-template-columns: 1fr 300px;
    align-items: center;
    gap: 56px;
    padding: 36px 44px;
  }

  .feature:nth-of-type(even) {
    grid-template-columns: 300px 1fr;
  }

  .feature:nth-of-type(even) .shot {
    order: -1;
  }

  .shot {
    max-width: 300px;
  }
}

@media (max-width: 380px) {
  .topbar__nav {
    gap: 6px;
  }

  .btn--small {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .brand span {
    font-size: 1.05rem;
  }
}

/* Zoom de 200% num celular estreito: melhor quebrar o botão do que rolar de lado. */
@media (max-width: 260px) {
  .btn--small {
    white-space: normal;
  }
}
