/* ============================================
   SimulaRescisão — Design Fintech Mobile First
   Paleta moderna: azul marinho, accent azul/verde
   ============================================ */

:root {
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-primary: #0b1f3b;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-error: #dc2626;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(11, 31, 59, 0.08);
  --shadow-hover: 0 4px 12px rgba(11, 31, 59, 0.12);
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header — estilo escritório: logo com subtítulo + nav horizontal + CTA em pílula */
.header {
  position: relative;
  background: var(--color-primary);
  color: #fff;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.header__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: 
    linear-gradient(135deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%);
  background-size: 24px 24px;
  background-position: 0 0, 12px 0, 12px 12px, 0 12px;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: 600px;
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.header__brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: #fff;
}

.header__logo-main {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.header__logo-line {
  display: block;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, #d4af37, #c9a227);
  border-radius: 1px;
  margin: 0.15rem 0 0.2rem;
}

.header__logo-sub {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: color var(--transition);
}

.header__link:hover {
  color: #fff;
  text-decoration: underline;
}

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.header__cta:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.header__cta-arrow {
  font-size: 1.1em;
  line-height: 1;
}

/* Compatibilidade: manter .logo para páginas que ainda usem */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 1.125rem;
}

.logo-icon {
  font-size: 1.5rem;
}

/* Main */
.main {
  flex: 1;
  padding: 1.5rem 0 3rem;
}

.main--checkout {
  padding: 2rem 0 3rem;
}

/* Hero */
.hero {
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
}

.hero__paid-banner {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.06) 100%);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.hero__paid-banner-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 0.75rem 0;
}

.hero__paid-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color var(--transition), transform var(--transition);
}

.hero__paid-banner-cta:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Card */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

/* Form */
.form-section {
  margin-bottom: 1.5rem;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-group input,
.form-group select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-group input::placeholder {
  color: var(--color-text-muted);
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-error {
  font-size: 0.875rem;
  color: var(--color-error);
  min-height: 1.25rem;
}

.form-error:empty {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn--full {
  width: 100%;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: var(--color-primary);
  color: #fff;
}

.btn--secondary:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn--lg {
  min-height: 52px;
  padding: 1rem 1.5rem;
  font-size: 1.0625rem;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Result section */
.result-section {
  margin-bottom: 2rem;
}

.result-section.hidden {
  display: none;
}

.loader {
  text-align: center;
  padding: 2rem;
}

.loader.hidden {
  display: none;
}

.loader__spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader__text {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.result-card {
  animation: fadeIn 0.4s ease;
}

.result-card.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

.result-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.result-row span {
  color: var(--color-text-muted);
}

.result-row strong {
  color: var(--color-text);
  font-weight: 600;
}

.result-row--total {
  font-size: 1.125rem;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  border-top: 2px solid var(--color-border);
}

.result-row--total span,
.result-row--total strong {
  color: var(--color-primary);
  font-weight: 700;
}

.result-row--total strong {
  color: var(--color-accent);
  font-size: 1.25rem;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* SEO content */
.seo-content {
  margin-top: 2rem;
}

.content-card {
  padding: 1.5rem;
}

.content-card h2 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.content-card h3 {
  font-size: 1.0625rem;
  color: var(--color-text);
  margin: 1rem 0 0.5rem;
}

.content-card p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

/* Checkout */
.checkout-section {
  padding: 0.5rem 0;
}

.checkout-card {
  padding: 1.75rem;
}

.checkout__title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.checkout__price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.checkout__price-note {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.checkout__features {
  list-style: none;
  margin-bottom: 1.5rem;
  padding-left: 0;
}

.checkout__features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.checkout__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout__disclaimer {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Página Relatório completo (premium) */
.premium-page {
  padding: 2rem 0 3rem;
}

.premium-card {
  text-align: center;
  padding: 2rem;
}

.premium-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.premium-card__text {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.premium-card__note {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* Footer — layout em colunas (estilo Contabilizei) */
.footer {
  margin-top: auto;
  background: var(--color-primary);
  color: #fff;
  padding: 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer__column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

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

.footer__tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  max-width: 280px;
}

.footer__link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color var(--transition);
}

.footer__link:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0.5rem 0;
  border: 0;
}

.footer__bottom {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer__bottom-text {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  max-width: 800px;
  margin: 0 auto;
}

/* Cookie banner — barra fixa inferior */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #0f172a 0%, var(--color-primary) 100%);
  color: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-width: 1200px;
  margin: 0 auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-banner.is-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner__content {
  flex: 1;
  min-width: 200px;
}

.cookie-banner__content h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #fff;
}

.cookie-banner__content p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  margin: 0;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.cookie-banner__actions .btn--primary {
  background: #fff;
  color: var(--color-primary);
}

.cookie-banner__actions .btn--primary:hover {
  background: #f1f5f9;
}

.cookie-banner__actions .btn--secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.cookie-banner__actions .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Página Termos de Uso / legal */
.page-legal {
  padding: 1.5rem 0 3rem;
}

.page-legal h1 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.page-legal__updated {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.page-legal__section {
  margin-bottom: 1.5rem;
}

.page-legal__section h2 {
  font-size: 1.0625rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.page-legal__section p,
.page-legal__section ul {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.page-legal__section ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.page-legal__section li {
  margin-bottom: 0.25rem;
}

.page-legal__footer-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* link-back mantido para compatibilidade em páginas que ainda usem */
.link-back {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 500;
}

.link-back:hover {
  text-decoration: underline;
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* Mobile: botão fixo opcional (área de toque confortável) */
@media (max-width: 480px) {
  .main {
    padding-bottom: 5rem;
  }

  .result-actions .btn:first-child {
    position: sticky;
    bottom: 1rem;
    z-index: 10;
  }
}

/* Desktop: card centralizado 600px */
@media (min-width: 600px) {
  .hero__title {
    font-size: 1.75rem;
  }

  .hero__subtitle {
    font-size: 1.0625rem;
  }

  .card {
    padding: 2rem;
  }

  .result-card__title {
    font-size: 1.375rem;
  }
}

@media (min-width: 768px) {
  .header {
    padding: 1.25rem 1.5rem;
  }

  .main {
    padding: 2rem 0 3rem;
  }

  .main--checkout {
    padding: 3rem 0;
  }

  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .cookie-banner {
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 600px) {
  .header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header__nav {
    width: 100%;
    gap: 0.75rem;
  }

  .header__link {
    font-size: 0.875rem;
  }

  .header__cta {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-banner__content {
    min-width: 100%;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn {
    width: 100%;
  }
}
