/* ==========================================================================
   Cão Tranquilo — base.css
   Design system (variáveis), reset, tipografia e componentes compartilhados.
   Usado por index.html e resultado.html.
   ========================================================================== */

:root {
  /* ---- Cores da marca ---- */
  --color-deep: #14453D;          /* verde petróleo profundo */
  --color-primary: #1E6B5C;       /* verde petróleo */
  --color-primary-strong: #175447;
  --color-primary-soft: #7FB6A6;  /* verde suave */
  --color-accent: #E7B24C;        /* dourado suave (destaque) */
  --color-accent-strong: #C9922F;
  --color-alert: #C6553F;         /* vermelho suave (alertas / nível elevado) */

  /* ---- Neutros ---- */
  --color-bg: #FBFAF6;            /* branco quente */
  --color-cream: #F5F1E8;        /* creme */
  --color-surface: #FFFFFF;
  --color-gray-100: #EEF1EF;
  --color-gray-200: #E2E7E4;
  --color-gray-300: #D5DAD7;
  --color-text: #23302C;         /* verde-escuro quase preto */
  --color-text-soft: #5B6B65;
  --color-text-mute: #8A968F;

  /* ---- Tipografia ---- */
  --font-head: "Sora", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* ---- Espaçamento ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* ---- Formas ---- */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* ---- Sombras ---- */
  --shadow-sm: 0 1px 2px rgba(20, 69, 61, 0.06), 0 2px 8px rgba(20, 69, 61, 0.05);
  --shadow: 0 8px 24px rgba(20, 69, 61, 0.10);
  --shadow-lg: 0 18px 48px rgba(20, 69, 61, 0.16);

  /* ---- Layout ---- */
  --maxw: 640px;       /* largura de leitura confortável (mobile-first) */
  --maxw-wide: 960px;

  /* ---- Transições ---- */
  --t-fast: 140ms ease;
  --t: 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   Reset enxuto
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

/* Garante que [hidden] esconda mesmo elementos com display de classe (.btn). */
[hidden] { display: none !important; }

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

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

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

a { color: var(--color-primary); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

:focus-visible {
  outline: 3px solid var(--color-primary-soft);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Utilitários de layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.stack > * + * { margin-top: var(--space-4); }
.text-center { text-align: center; }
.muted { color: var(--color-text-soft); }
.small { font-size: 0.875rem; }
.hidden { display: none !important; }

/* ==========================================================================
   Selo / badge
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--color-cream);
  color: var(--color-primary-strong);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ==========================================================================
   Botões
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 56px;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: center;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: var(--color-primary-strong); }
.btn--primary:active { transform: translateY(1px); }

.btn--accent {
  background: var(--color-accent);
  color: var(--color-deep);
  box-shadow: 0 10px 28px rgba(231, 178, 76, 0.35);
}
.btn--accent:hover { background: var(--color-accent-strong); }
.btn--accent:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--color-text-soft);
  min-height: 48px;
  font-size: 0.95rem;
  box-shadow: none;
}
.btn--ghost:hover { color: var(--color-text); }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Rótulo único do botão: mantém o texto (com nome do pet) fluindo inline
   e centralizado, em vez de o nome virar um item de flex separado. */
.btn__label { display: inline-block; text-align: center; }

/* ==========================================================================
   Cartões
   ========================================================================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Aviso educativo / disclaimer
   ========================================================================== */
.disclaimer {
  font-size: 0.8rem;
  color: var(--color-text-mute);
  line-height: 1.5;
}

/* Aviso visível apenas em ambiente de desenvolvimento (analytics/checkout). */
.dev-note {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--color-accent-strong);
  border-radius: var(--radius-sm);
  background: #FFF9EC;
  color: var(--color-accent-strong);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==========================================================================
   Páginas legais (termos, privacidade, contato)
   ========================================================================== */
.legal h1 { font-size: 1.8rem; margin-bottom: var(--space-4); }
.legal h2 { font-size: 1.15rem; margin-top: var(--space-6); margin-bottom: var(--space-2); }
.legal p { margin-bottom: var(--space-3); color: var(--color-text); }
.legal .muted { color: var(--color-text-soft); }

/* ==========================================================================
   Rodapé compartilhado
   ========================================================================== */
.site-footer {
  padding: var(--space-6) 0 var(--space-7);
  text-align: center;
}
.site-footer p { color: var(--color-text-mute); font-size: 0.8rem; }

/* ==========================================================================
   Preferência por menos movimento
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Telas maiores: sobe um pouco o tamanho base para conforto de leitura. */
@media (min-width: 720px) {
  h1 { font-size: 2.4rem; }
}
