/* ==========================================================================
   BASE — tokens, reset e componentes compartilhados (página do produto,
   Termos e Privacidade).
   Conceito: bancada de laboratório — fundo claro de papel milimetrado,
   filetes finos e o azul do sistema como único acento.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('../vendor/inter/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Cores */
  --ink: #0b1530;
  --bg: #f6f8fb;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --surface-3: #dfe6ef;
  --line: rgba(11, 21, 48, 0.08);
  --line-strong: rgba(11, 21, 48, 0.16);
  --grid: rgba(23, 107, 208, 0.06);
  --text: #0b1530;
  --text-2: #4b5568;
  --text-3: #5b6577;

  /* Azul do sistema: --blue é o tom da marca (decorativo); --primary é o
     tom de botões e links, um pouco mais escuro para manter o contraste. */
  --blue: #2994f2;
  --primary: #176bd0;
  --primary-ink: #ffffff;
  --primary-hover: #1460bb;
  --primary-soft: rgba(41, 148, 242, 0.1);
  --primary-line: rgba(41, 148, 242, 0.4);

  /* Status (os mesmos do sistema) */
  --success: #059669;
  --success-soft: rgba(16, 185, 129, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(245, 158, 11, 0.12);

  /* Tipografia */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;

  /* Espaçamento, raios e movimento */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: clamp(22px, 2.6vw, 36px);
  --container: 1180px;
  --gutter: 1rem;
  --header-h: 64px;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 640px) { :root { --gutter: 1.5rem; } }
@media (min-width: 1100px) { :root { --gutter: 2rem; --header-h: 68px; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.1; text-wrap: balance; }
p, li { text-wrap: pretty; }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 300;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 650;
}
.skip-link:focus { top: 12px; }

/* ---------- Botões ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn i { font-size: 1.05em; line-height: 1; transition: transform 0.35s var(--ease-out); }
.btn:hover .bi-arrow-up-right, .btn:hover .bi-arrow-right { transform: translate(2px, -2px); }
.btn-sm { min-height: 36px; padding: 0.4rem 0.9rem; font-size: 0.875rem; }
.btn-lg { min-height: 50px; padding: 0.75rem 1.4rem; font-size: 0.98rem; }
.btn-block { width: 100%; }
.btn-primary {
  --btn-bg: var(--primary);
  --btn-fg: var(--primary-ink);
  --btn-bd: var(--primary);
  box-shadow: 0 1px 2px rgba(11, 21, 48, 0.12);
}
.btn-primary:hover { --btn-bg: var(--primary-hover); --btn-bd: var(--primary-hover); }
.btn-outline { --btn-bg: transparent; }
.btn-outline:hover { --btn-bd: var(--primary); --btn-fg: var(--primary); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { --btn-bg: var(--surface-2); --btn-fg: var(--text); }
.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn-light:hover { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn-outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, 0.55); }
.btn-outline-light:hover { --btn-bg: rgba(255, 255, 255, 0.12); --btn-bd: #fff; }

/* ---------- Marca ---------- */
.p-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); }
.p-brand img { width: 28px; height: 28px; border-radius: 8px; }
.p-brand-name { font-weight: 700; font-size: 1.08rem; line-height: 1; letter-spacing: -0.03em; }
.p-brand-name span { font-weight: 400; color: var(--text-2); }

/* ---------- Cabeçalho ---------- */
.p-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.p-header.is-scrolled,
.p-header.is-open,
.p-header.is-solid {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}
.p-header.is-open { background: var(--bg); }
.p-header-inner { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--header-h); }
.p-nav { display: none; gap: 0.25rem; margin-left: var(--sp-6); }
.p-nav a {
  padding: 0.5rem 0.8rem;
  border-radius: 99px;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}
.p-nav a:hover { color: var(--text); background: var(--surface-2); }
.p-header-actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
@media (min-width: 1000px) { .p-nav { display: flex; } }
@media (max-width: 479px) { .p-header .p-login { display: none; } }

.p-menu-btn { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -6px; border-radius: 50%; }
.p-menu-icon, .p-menu-icon::before, .p-menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease-out);
}
.p-menu-icon { position: relative; background: transparent; }
.p-menu-icon::before, .p-menu-icon::after { content: ''; position: absolute; left: 0; }
.p-menu-icon::before { top: -4px; }
.p-menu-icon::after { top: 4px; }
.is-open .p-menu-icon::before { transform: translateY(4px) rotate(45deg); }
.is-open .p-menu-icon::after { transform: translateY(-4px) rotate(-45deg); }
@media (min-width: 1000px) { .p-menu-btn { display: none; } }

.p-sheet {
  display: flex;
  flex-direction: column;
  height: calc(100svh - var(--header-h));
  overflow-y: auto;
  padding: var(--sp-3) var(--gutter) var(--sp-6);
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.p-sheet[hidden] { display: none; }
.p-sheet a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.p-sheet a i { font-size: 1rem; color: var(--text-3); }
.p-header.is-open .p-sheet a { animation: p-up 0.5s var(--ease-out) both; }
.p-header.is-open .p-sheet a:nth-child(2) { animation-delay: 40ms; }
.p-header.is-open .p-sheet a:nth-child(3) { animation-delay: 80ms; }
.p-header.is-open .p-sheet a:nth-child(4) { animation-delay: 120ms; }
.p-header.is-open .p-sheet a:nth-child(5) { animation-delay: 160ms; }
.p-header.is-open .p-sheet a:nth-child(6) { animation-delay: 200ms; }
@keyframes p-up { from { opacity: 0; transform: translateY(14px); } }
@media (min-width: 1000px) { .p-sheet { display: none !important; } }

/* Progresso de leitura no pé do cabeçalho */
.p-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; }
.p-progress span {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: var(--primary);
}

/* ---------- Planos ---------- */
.plans {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  max-width: calc(var(--n, 3) * 420px);
  margin-inline: auto;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  padding: clamp(1.4rem, 2vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 24px 48px -40px rgba(11, 21, 48, 0.35);
}
.plan-card.is-featured { border-color: var(--primary-line); border-top: 3px solid var(--primary); }
.plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.6rem 1rem; }
.plan-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.plan-tag { padding: 4px 10px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.plan-price { display: flex; align-items: flex-start; gap: 0.15rem; }
.plan-price .cur { margin-top: 0.55em; color: var(--text-2); font-weight: 600; }
.plan-price strong { font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.plan-price .cents { display: grid; margin-top: 0.4em; font-size: 1.15rem; font-weight: 700; line-height: 1.1; }
.plan-price .cents small { color: var(--text-3); font-size: 0.78rem; font-weight: 500; }
.plan-price.is-quote strong { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.05rem); letter-spacing: -0.03em; line-height: 1.1; }
.plan-per { margin-top: -0.6rem; color: var(--text-3); font-size: 0.92rem; }
.plan-actions { display: grid; gap: 0.6rem; margin-top: auto; }

/* ---------- Rodapé ---------- */
.p-footer { position: relative; padding-top: clamp(3rem, 6vw, 4.5rem); color: var(--text-3); font-size: var(--fs-sm); }
.p-footer-top { display: grid; gap: var(--sp-6); padding-bottom: var(--sp-7); }
@media (min-width: 800px) { .p-footer-top { grid-template-columns: 1fr auto; } }
.p-footer-brand { display: grid; gap: 1rem; align-content: start; }
.p-footer-brand p { color: var(--text-2); font-size: 0.95rem; }
.p-footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: var(--sp-6) clamp(2rem, 6vw, 5rem); }
.p-footer-nav div { display: grid; gap: 0.6rem; align-content: start; }
.p-footer-nav span { margin-bottom: 0.3rem; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.p-footer-nav a { color: var(--text-2); font-size: 0.9rem; }
.p-footer-nav a:hover { color: var(--primary); }
@media (max-width: 479px) { .p-footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.p-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; padding-block: var(--sp-5); border-top: 1px solid var(--line); }
.p-footer-bottom a { color: var(--text-2); font-weight: 600; }
.p-footer-bottom a:hover { color: var(--primary); }

/* ---------- Menos movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Páginas de texto (Termos e Privacidade) ---------- */
.p-doc { max-width: 760px; padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4rem)); padding-bottom: var(--sp-8); }
.p-doc h1 { margin-bottom: 0.6rem; font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem); font-weight: 800; letter-spacing: -0.05em; }
.p-doc .updated { display: block; margin-bottom: var(--sp-6); color: var(--text-3); font-size: 0.92rem; }
.p-doc h2 { margin: 2.2rem 0 0.8rem; font-size: 1.18rem; font-weight: 700; letter-spacing: -0.03em; }
.p-doc p, .p-doc li { margin-bottom: 1rem; color: var(--text-2); }
.p-doc ul { margin: 0 0 1rem 1.4rem; list-style: disc; }
.p-doc li::marker { color: var(--primary); }
.p-doc strong { color: var(--text); font-weight: 650; }
.p-doc a { color: var(--primary); font-weight: 600; }
.p-legal .p-footer { padding-top: 0; }
@media (max-width: 399px) { .p-legal .p-header-actions .btn-ghost { display: none; } }
