/* ─── HageTag Landing Pages ──────────────────────────────────────────────────
   Tokens espelhados de src/theme/_brand.scss (TIER 1). Não usar hex avulso:
   se precisar de cor nova, ela deve existir na marca primeiro.
   Sem framework, sem runtime — só CSS. Alvo: LCP < 2,5s · INP < 200ms · CLS < 0,1
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Marca */
  --primary: #004cc1;
  --primary-shade: #0043aa;
  --primary-tint: #1a5ec7;
  --primary-rgb: 0, 76, 193;
  --secondary: #0dcaf0;
  --tertiary: #002768;
  --success: #4aba77;
  --warning: #ffc409;
  --danger: #eb445a;
  --dark: #17181c;
  --medium: #92949c;
  --light: #f1f2f3;
  --light-l: #fafbfc;
  --light-d: #e0e3eb;
  --white: #fff;

  /* Superfícies */
  --bg: var(--white);
  --bg-alt: var(--light-l);
  --bg-deep: var(--tertiary);
  --border: var(--light-d);
  --text: var(--dark);
  --text-soft: #5b5f6b;

  /* Escala tipográfica */
  --fs-hero: clamp(2rem, 5vw, 3.5rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.25rem);
  --fs-h3: clamp(1.125rem, 2vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* Espaço e forma */
  --gap: 1rem;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(23, 24, 28, .05), 0 1px 3px rgba(23, 24, 28, .06);
  --shadow: 0 4px 16px rgba(23, 24, 28, .07);
  --shadow-lg: 0 12px 40px rgba(23, 24, 28, .1);
  --wrap: 1140px;
  --nav-h: 68px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 650; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--deep { background: var(--bg-deep); color: #fff; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep p { color: rgba(255, 255, 255, .82); }

.eyebrow {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--primary);
  margin-bottom: .75rem;
}
.section--deep .eyebrow { color: var(--secondary); }
.lead { font-size: 1.15rem; color: var(--text-soft); max-width: 62ch; }
.section--deep .lead { color: rgba(255, 255, 255, .85); }
.muted { color: var(--text-soft); font-size: var(--fs-sm); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Acessibilidade — pular para o conteúdo */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--primary-tint); outline-offset: 2px; border-radius: 4px; }

/* ─── Navegação ───────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav__in { display: flex; align-items: center; gap: 1.25rem; height: var(--nav-h); }
/* Marca: logo HageLab, no mesmo padrão do site institucional */
.nav__brand { display: flex; align-items: center; flex: 0 0 auto; }
.nav__brand:hover { text-decoration: none; }
.nav__brand img { display: block; height: 34px; width: auto; }
@media (max-width: 575px) { .nav__brand img { height: 28px; } }
.foot__logo { display: block; height: 34px; width: auto; margin-bottom: 1.1rem; }
.nav__links { display: none; gap: 1.5rem; margin-left: auto; }
.nav__links a { color: var(--text-soft); font-size: var(--fs-sm); font-weight: 500; }
.nav__links a:hover { color: var(--primary); text-decoration: none; }
.nav__cta { margin-left: auto; }
@media (min-width: 992px) {
  .nav__links { display: flex; }
  .nav__cta { margin-left: 0; }
}

/* ─── Botões ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: var(--radius-pill); border: 1.5px solid transparent;
  font: inherit; font-size: var(--fs-sm); font-weight: 650; cursor: pointer;
  transition: transform .12s, box-shadow .12s, background-color .12s;
  text-align: center; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(var(--primary-rgb), .28); }
.btn--primary:hover { background: var(--primary-shade); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--light-d); }
.btn--ghost:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), .04); }
.btn--light { background: #fff; color: var(--tertiary); }
.btn--wa { background: var(--success); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { padding: 1rem 1.9rem; font-size: 1.0625rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 6vw, 5rem) var(--section-y); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 70%;
  background: radial-gradient(60% 60% at 30% 40%, rgba(var(--primary-rgb), .09), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(13, 202, 240, .12), transparent 70%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 992px) { .hero__grid { grid-template-columns: 1.05fr .95fr; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
/* Montagem do hero da home: respiro em cima e embaixo, e largura contida — sem isso
   a imagem encosta nos CTAs e sangra até o fim da seção. */
.hero__shot { margin-top: clamp(2.5rem, 5vw, 4rem); }
.hero__shot figure { margin: 0; }
.hero__shot .shot { max-width: 1000px; margin-inline: auto; }
.hero__shot figcaption { text-align: center; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: 1.5rem; font-size: var(--fs-sm); color: var(--text-soft); }
.hero__trust span { display: inline-flex; align-items: center; gap: .4rem; }

/* Bloco de resposta direta — o trecho que a IA extrai (GEO §2.1) */
.answer {
  margin-top: 1.25rem; padding: 1.15rem 1.35rem; border-radius: var(--radius);
  background: var(--light-l); border: 1px solid var(--border);
  border-left: 4px solid var(--primary); font-size: 1.05rem;
}
.answer p { margin: 0; }

/* ─── Alerta regulatório ──────────────────────────────────────────────────── */
.alert {
  display: flex; gap: .9rem; padding: 1.15rem 1.35rem; border-radius: var(--radius);
  background: #fff8e1; border: 1px solid #f5d97a; margin-top: 1.5rem;
}
.alert strong { display: block; margin-bottom: .25rem; }
.alert p { margin: 0; font-size: var(--fs-sm); }

/* ─── Cards e grids ───────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4rem; }
.card p { font-size: var(--fs-sm); color: var(--text-soft); margin: 0; }
.section--alt .card { background: #fff; }

/* Números */
.stat { text-align: left; }
.stat__v { display: block; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; color: var(--primary); line-height: 1.1; }
.stat__l { display: block; font-size: var(--fs-sm); margin-top: .35rem; }
.stat__f { display: block; font-size: var(--fs-xs); color: var(--medium); margin-top: .5rem; }
.section--deep .stat__v { color: var(--secondary); }
.section--deep .stat__l { color: rgba(255, 255, 255, .9); }
.section--deep .stat__f { color: rgba(255, 255, 255, .6); }

/* Passos numerados */
.step { display: grid; gap: .75rem; grid-template-columns: auto 1fr; align-items: start; }
.step__n {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: rgba(var(--primary-rgb), .08); color: var(--primary); font-weight: 800; font-size: var(--fs-sm);
}
.step h3 { margin-bottom: .3rem; }
.step p { font-size: var(--fs-sm); color: var(--text-soft); margin: 0; }

/* Listas de checagem */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.checks li { display: grid; grid-template-columns: 1.35rem 1fr; gap: .6rem; font-size: var(--fs-sm); }
.checks li::before { content: "✓"; color: var(--success); font-weight: 800; line-height: 1.5; }
.checks--neutral li::before { content: "—"; color: var(--medium); }
.section--deep .checks li { color: rgba(255, 255, 255, .88); }

/* Figuras */
figure { margin: 0; }
.shot {
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  overflow: hidden; box-shadow: var(--shadow-lg); background: var(--light-l);
}
.shot img { width: 100%; }
.shot--ph { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 1.5rem; text-align: center; color: var(--medium); font-size: var(--fs-xs); }
figcaption { margin-top: .7rem; font-size: var(--fs-sm); color: var(--text-soft); }

/* Tabela — sempre <table> real, nunca imagem (GEO §7.1) */
.tw { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--light-l); font-weight: 650; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ─── Planos ──────────────────────────────────────────────────────────────── */
.plans { display: grid; gap: var(--gap); }
@media (min-width: 992px) { .plans { grid-template-columns: repeat(4, 1fr); align-items: stretch; } }
.plan { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.plan--hl { border-color: var(--primary); border-width: 2px; box-shadow: 0 10px 34px rgba(var(--primary-rgb), .14); position: relative; }
.plan__tag { position: absolute; top: -.75rem; left: 1.5rem; background: var(--primary); color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: .25rem .75rem; border-radius: var(--radius-pill); }
.plan__name { font-weight: 700; font-size: 1.0625rem; }
.plan__price { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; margin: .5rem 0 .1rem; }
.plan__price small { font-size: .9rem; font-weight: 500; color: var(--medium); }
.plan__cap { font-size: var(--fs-sm); color: var(--text-soft); }
.plan .checks { margin: 1.1rem 0; }
.plan .btn { margin-top: auto; }

/* ─── FAQ ─────────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: .6rem; max-width: 820px; margin-inline: auto; }
details {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
details[open] { border-color: var(--primary-tint); }
summary {
  cursor: pointer; font-weight: 650; list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.35rem; color: var(--primary); line-height: 1; flex: 0 0 auto; }
details[open] summary::after { content: "–"; }
details p { margin: .85rem 0 0; font-size: var(--fs-sm); color: var(--text-soft); }

/* Resposta longa do FAQ (ex.: tabela de serviços avulsos) */
.faq__body .tw { margin-top: .9rem; }
.faq__body h4 { margin: 1.4rem 0 0; font-size: var(--fs-sm); font-weight: 700; }
.faq__body table { font-size: var(--fs-xs); }
.faq__body th, .faq__body td { padding: .6rem .8rem; }

/* ─── Formulário de lead ──────────────────────────────────────────────────── */
.leadwrap { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 992px) { .leadwrap { grid-template-columns: .9fr 1.1fr; align-items: start; } }

.form {
  background: #fff; border-radius: var(--radius-lg); padding: clamp(1.35rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.form h3 { margin-bottom: .35rem; }
.form__hint { font-size: var(--fs-sm); color: var(--text-soft); margin-bottom: 1.25rem; }
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: .3rem; }
.field .req { color: var(--danger); }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .85rem; font: inherit; font-size: var(--fs-sm);
  border: 1.5px solid var(--light-d); border-radius: 10px; background: #fff; color: var(--text);
  transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); outline: none; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field textarea { resize: vertical; min-height: 84px; }
.field__err { display: none; font-size: var(--fs-xs); color: var(--danger); margin-top: .25rem; }
.field.has-err .field__err { display: block; }
.row2 { display: grid; gap: .9rem; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }

fieldset { border: 0; padding: 0; margin: 0 0 .9rem; }
legend { font-size: var(--fs-sm); font-weight: 600; padding: 0; margin-bottom: .45rem; }
.checkgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem .9rem; }
.checkgrid label { display: flex; align-items: center; gap: .45rem; font-size: var(--fs-sm); font-weight: 400; cursor: pointer; }
.checkgrid input { width: 1rem; height: 1rem; accent-color: var(--primary); }

.form__legal { font-size: var(--fs-xs); color: var(--medium); margin-top: .85rem; }
.form__msg { display: none; margin-top: 1rem; padding: .85rem 1rem; border-radius: 10px; font-size: var(--fs-sm); }
.form__msg.is-ok { display: block; background: #eaf7ef; border: 1px solid #b6e2c6; color: #1d6b3c; }
.form__msg.is-err { display: block; background: #fdeaec; border: 1px solid #f5b8bf; color: #8f2733; }
.form__msg a { font-weight: 650; }

/* ─── CTA final e rodapé ──────────────────────────────────────────────────── */
.cta { text-align: center; }
.cta .btn { margin: .35rem; }

.foot { background: var(--dark); color: rgba(255, 255, 255, .74); padding-block: 3rem 2rem; font-size: var(--fs-sm); }
.foot a { color: rgba(255, 255, 255, .74); }
.foot a:hover { color: #fff; }
.foot__grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h3 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .9rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.foot__social { display: flex; gap: .6rem; margin-top: 1rem; }
.foot__social a {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(255, 255, 255, .1); font-size: var(--fs-xs); font-weight: 700; color: #fff;
}
.foot__social a:hover { background: var(--primary); }
.foot__bottom { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: space-between; font-size: var(--fs-xs); color: rgba(255, 255, 255, .5); }

/* ─── Reveal (respeita prefers-reduced-motion) ────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ─── Índice de verticais (home) ──────────────────────────────────────────── */
.vgrid { display: grid; gap: var(--gap); }
@media (min-width: 720px) { .vgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .vgrid { grid-template-columns: repeat(3, 1fr); } }
.vcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; transition: border-color .15s, transform .15s, box-shadow .15s; }
.vcard:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.vcard h3 { color: var(--tertiary); }
.vcard p { font-size: var(--fs-sm); color: var(--text-soft); }
.vcard span { margin-top: auto; padding-top: .9rem; color: var(--primary); font-size: var(--fs-sm); font-weight: 650; }

@media print {
  .nav, .foot__social, .btn { display: none !important; }
  body { font-size: 11pt; }
}
