/* ==========================================================================
   Aquecedores Carinás - Fundação visual
   Tokens, reset e componentes reutilizáveis.
   Paleta Opção A: âmbar dominante, grafite para texto, vermelho da marca
   como acento. Regra fixa: sobre âmbar, texto sempre grafite, nunca branco
   e nunca vermelho (vermelho sobre âmbar reprova em 2,63:1).
   ========================================================================== */

:root {
  /* --- Cor ------------------------------------------------------------- */
  --calor: #f0a800;
  --calor-claro: #f5c518;
  --calor-escuro: #d89400;
  --calor-fundo: #fdf3dc;

  --marca: #d80000;          /* vermelho do logo; branco sobre ele = 5,36:1 AA */
  --marca-texto: #b00000;    /* vermelho quando for texto; sobre branco = 7,38:1 AAA */

  --grafite: #16181d;        /* sobre branco = 17,76:1 AAA */
  --grafite-2: #2b2e35;      /* sobre branco = 13,59:1 AAA */
  --grafite-3: #3e434d;
  --texto-sec: #5a6169;      /* sobre branco = 6,27:1 AA */

  --branco: #ffffff;
  --superficie: #f4f5f7;
  --superficie-2: #e9ebef;
  --borda: #e3e5ea;          /* apenas decorativo: 1,26:1 contra branco */
  --borda-escura: #3a3f49;
  --aco: #909090;

  /* --- Tipografia ------------------------------------------------------ */
  --fonte-titulo: "Archivo", "Segoe UI", Helvetica, sans-serif;
  --fonte-corpo: "Archivo", "Segoe UI", Helvetica, sans-serif;
  --fonte-mono: "IBM Plex Mono", "Courier New", monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.125rem;
  --t-lg: clamp(1.25rem, 0.9rem + 1vw, 1.5rem);
  --t-xl: clamp(1.5rem, 1rem + 1.8vw, 2rem);
  --t-2xl: clamp(1.9rem, 1.2rem + 2.6vw, 2.75rem);
  --t-3xl: clamp(2.3rem, 1.3rem + 3.8vw, 3.6rem);
  --t-hero: clamp(2.6rem, 1.2rem + 2.2vw, 4.6rem);

  --peso-normal: 400;
  --peso-medio: 500;
  --peso-semi: 600;
  --peso-bold: 700;
  --peso-black: 800;

  --altura-titulo: 1.04;
  --altura-corpo: 1.50;
  --tracking-titulo: -0.03em;
  --tracking-mono: 0.14em;

  /* --- Espaçamento (escala de 4px) ------------------------------------- */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 0.75rem;
  --e-4: 1rem;
  --e-5: 1.5rem;
  --e-6: 2rem;
  --e-7: 2.5rem;
  --e-8: 3rem;
  --e-9: 4rem;
  --e-10: 5rem;
  --e-11: 6rem;
  --e-12: 8rem;

  --secao-y: clamp(3.5rem, 2rem + 6vw, 7rem);
  --largura-max: 1200px;
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);

  /* --- Raio ------------------------------------------------------------ */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* --- Sombra ---------------------------------------------------------- */
  --sombra-1: 0 1px 2px rgba(22, 24, 29, 0.06), 0 2px 8px rgba(22, 24, 29, 0.05);
  --sombra-2: 0 4px 12px rgba(22, 24, 29, 0.07), 0 12px 32px rgba(22, 24, 29, 0.07);
  --sombra-3: 0 12px 28px rgba(22, 24, 29, 0.1), 0 28px 64px rgba(22, 24, 29, 0.11);
  --sombra-produto: 0 32px 60px rgba(90, 55, 0, 0.28);

  /* --- Movimento ------------------------------------------------------- */
  --tr-rapida: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-lenta: 520ms cubic-bezier(0.22, 0.8, 0.3, 1);

  /* Grão sutil usado nos fundos de cor chapada. */
  --grao: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23r)' opacity='.42'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--fonte-corpo);
  font-size: var(--t-base);
  font-weight: var(--peso-normal);
  line-height: var(--altura-corpo);
  color: var(--grafite);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-weight: var(--peso-black);
  line-height: var(--altura-titulo);
  letter-spacing: var(--tracking-titulo);
  color: var(--grafite);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

iframe {
  border: 0;
  max-width: 100%;
}

/* ==========================================================================
   Acessibilidade
   ========================================================================== */

:focus-visible {
  outline: 3px solid var(--marca);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Sobre fundo âmbar ou escuro o vermelho do foco some; troca por grafite/branco. */
.sobre-calor :focus-visible {
  outline-color: var(--grafite);
}

.sobre-escuro :focus-visible {
  outline-color: var(--calor-claro);
}

.pular-para-conteudo {
  position: absolute;
  left: var(--e-4);
  top: -100px;
  z-index: 999;
  padding: var(--e-3) var(--e-5);
  background: var(--grafite);
  color: var(--branco);
  border-radius: var(--r-pill);
  font-weight: var(--peso-semi);
  transition: top var(--tr);
}

.pular-para-conteudo:focus {
  top: var(--e-4);
}

.so-leitor-de-tela {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--largura-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.secao {
  padding-block: var(--secao-y);
}

/* ==========================================================================
   Tipografia de apoio
   ========================================================================== */

/* Rótulo monoespaçado usado antes dos títulos. */
.sobrancelha {
  display: inline-flex;
  align-items: center;
  gap: var(--e-3);
  font-family: var(--fonte-mono);
  font-size: var(--t-xs);
  font-weight: var(--peso-medio);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--marca-texto);
}

.sobrancelha::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
  flex: none;
}

.sobrancelha--sobre-calor {
  color: var(--grafite);
}

.sobrancelha--sobre-escuro {
  color: var(--calor-claro);
}

.titulo-secao {
  font-size: var(--t-2xl);
  max-width: 50ch;
}

.texto-apoio {
  color: var(--texto-sec);
  font-size: var(--t-md);
  max-width: 62ch;
}

.sobre-escuro .texto-apoio {
  color: #fff;
}

/* ==========================================================================
   Botões
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-3);
  padding: 0.95rem 1.75rem;
  font-family: var(--fonte-titulo);
  font-size: var(--t-base);
  font-weight: var(--peso-bold);
  letter-spacing: -0.01em;
  line-height: 1.2;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--tr), background-color var(--tr),
              border-color var(--tr), color var(--tr), box-shadow var(--tr);
  will-change: transform;
}

.btn svg {
  flex: none;
  width: 19px;
  height: 19px;
}

.btn:hover {
  transform: translateY(-2px);
}

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

/* Grafite: é o botão do hero âmbar, igual à referência. */
.btn--grafite {
  background: var(--grafite);
  color: var(--branco);
  box-shadow: var(--sombra-2);
}

.btn--grafite:hover {
  background: #000;
  box-shadow: var(--sombra-3);
}

/* Vermelho da marca: só sobre fundo claro ou escuro, nunca sobre âmbar. */
.btn--marca {
  background: var(--marca);
  color: var(--branco);
  box-shadow: 0 6px 18px rgba(216, 0, 0, 0.24);
}

.btn--marca:hover {
  background: #bf0000;
  box-shadow: 0 10px 26px rgba(216, 0, 0, 0.32);
}

/* Âmbar: usado em seções claras e escuras, com texto grafite. */
.btn--calor {
  background: var(--calor);
  color: var(--grafite);
  box-shadow: 0 6px 18px rgba(216, 152, 0, 0.28);
}

.btn--calor:hover {
  background: var(--calor-claro);
  box-shadow: 0 10px 26px rgba(216, 152, 0, 0.36);
}

/* Contornado sobre âmbar. */
.btn--contorno-grafite {
  background: transparent;
  color: var(--grafite);
  border-color: rgba(22, 24, 29, 0.35);
}

.btn--contorno-grafite:hover {
  border-color: var(--grafite);
  background: rgba(22, 24, 29, 0.06);
}

/* Contornado sobre fundo escuro. */
.btn--contorno-claro {
  background: transparent;
  color: var(--branco);
  border-color: rgba(255, 255, 255, 0.32);
}

.btn--contorno-claro:hover {
  border-color: var(--branco);
  background: rgba(255, 255, 255, 0.08);
}

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

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--e-6);
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--r-lg);
  box-shadow: var(--sombra-1);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra-3);
  border-color: transparent;
}

/* Filete âmbar que cresce no hover, no topo do card. */
.card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 0;
  height: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--calor), var(--marca));
  transition: width var(--tr-lenta);
}

.card:hover::after {
  width: 100%;
}

.card__icone {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: var(--e-5);
  border-radius: var(--r-pill);
  background: var(--calor);
  color: var(--grafite);
  flex: none;
  transition: transform var(--tr-lenta), background-color var(--tr);
}

.card:hover .card__icone {
  transform: rotate(-8deg) scale(1.06);
  background: var(--calor-claro);
}

.card__icone svg {
  width: 28px;
  height: 28px;
}

.card__titulo {
  font-size: var(--t-lg);
  margin-bottom: var(--e-3);
}

.card__texto {
  color: var(--texto-sec);
  font-size: var(--t-sm);
  flex: 1 1 auto;
  margin-bottom: var(--e-5);
}

/* ==========================================================================
   Links de texto
   ========================================================================== */

.link-sublinhado {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-weight: var(--peso-semi);
  color: var(--marca-texto);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--tr), color var(--tr);
}

.link-sublinhado:hover {
  background-size: 100% 2px;
}

.sobre-escuro .link-sublinhado {
  color: var(--calor-claro);
}

/* ==========================================================================
   Lista com marcador âmbar (padrão da referência)
   ========================================================================== */

.lista-marcada {
  display: grid;
  gap: var(--e-4);
}

.lista-marcada li {
  position: relative;
  padding-left: 2.25rem;
  font-weight: var(--peso-medio);
}

.lista-marcada li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 14px;
  height: 14px;
  border-radius: var(--r-pill);
  background: var(--calor);
  box-shadow: 0 0 0 4px rgba(240, 168, 0, 0.2);
}

/* ==========================================================================
   Movimento de entrada (ativado por JS; sem JS tudo fica visível)
   ========================================================================== */

.revelar {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--tr-lenta), transform var(--tr-lenta);
}

.revelar.visivel {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .revelar {
    opacity: 1;
    transform: none;
  }
}
