/* =========================================================================
   Template Ads — home v2 (proposta)
   Sistema: logo → tokens → componentes.
   Logo de referência: D "Bloco-Brasão" (escudo coral com T branco +
   "TEMPLATE" escuro + "ADS" branco em bloco coral com base de escudo).
   1) PRIMITIVOS  = as cores/fontes/formas que existem na logo
   2) SEMÂNTICOS  = o papel de cada cor no site (fundo, texto, ação, marca)
   3) COMPONENTES = botão, bloco-marca, bloco-brasão, moldura-escudo, marcador
   Formato de nome inspirado nas 3 camadas de tokens (primitivo/semântico/
   componente) — ver relatorio.md.
   ========================================================================= */


:root {
  /* ---------- 1. PRIMITIVOS (tirados da logo) ---------- */
  --ink-900: #2C2C2A;     /* "TEMPLATE" */
  --ink-800: #383835;     /* superfície sobre fundo escuro */
  --stone-600: #5F5E5A;   /* texto secundário (herdado da v1) */
  --stone-300: #B4B2A9;   /* texto secundário em fundo escuro */
  --stone-200: #D6D3C9;   /* linhas finas */
  --paper-100: #F6F4EE;   /* branco do "T" e do "ADS" */
  --paper-200: #ECE9E0;   /* fundo alternado */
  --coral-500: #D85A30;   /* escudo do T + bloco "ADS" */
  --coral-600: #AF431C;   /* coral de AÇÃO: 1 tom abaixo; AA (≥4,5:1) com texto claro e sobre os 2 fundos claros */
  --coral-300: #F08A62;   /* coral para texto pequeno sobre fundo escuro */

  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;   /* mantida da v1 */

  /* ---------- 2. SEMÂNTICOS ---------- */
  --bg: var(--paper-100);
  --bg-alt: var(--paper-200);
  --bg-inverse: var(--ink-900);
  --surface-inverse: var(--ink-800);
  --text: var(--ink-900);
  --text-muted: var(--stone-600);
  --text-inverse: var(--paper-100);
  --text-inverse-muted: var(--stone-300);
  --brand: var(--coral-500);          /* só em blocos/elementos grandes (como na logo) */
  --action: var(--coral-600);         /* botões, links, texto coral pequeno em fundo claro */
  --accent-on-dark: var(--coral-300);
  --line: var(--stone-200);

  /* ---------- 3. COMPONENTES ---------- */
  --radius: 0;                        /* trava de forma: tudo reto, como o bloco ADS */
  --btn-bg: var(--action);
  --btn-fg: var(--paper-100);
  --btn-icon-bg: rgba(0, 0, 0, 0.18);
  --mark-bg: var(--brand);            /* "bloco ADS" atrás de palavra-chave */
  --mark-fg: var(--paper-100);
  --step-size: 44px;
  /* formas tiradas dos paths da logo D (viewBox normalizado) */
  --brasao-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H100 V72.8 C100 89.7 74 94 50 100 C26 94 0 89.7 0 72.8 Z'/%3E%3C/svg%3E");
  --escudo-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 104' preserveAspectRatio='none'%3E%3Cpath d='M2 0 H98 Q100 0 100 2 V58.24 C100 86.61 74 97.76 50 104 C26 97.76 0 86.61 0 58.24 V2 Q0 0 2 0 Z'/%3E%3C/svg%3E");

  --wrap: 1200px;
  --gutter: 24px;
  --section-y: clamp(72px, 9vw, 120px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .serif { font-family: var(--font-display); font-optical-sizing: auto; }
h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; max-width: 24ch; text-wrap: balance; }
h3 { font-size: 21px; font-weight: 700; line-height: 1.25; }
p { max-width: 65ch; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: var(--section-y) 0; }
.section-sub { color: var(--text-muted); font-size: 18px; margin-top: 18px; max-width: 58ch; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--action); margin-bottom: 14px; }

/* ---------- COMPONENTE: bloco-marca (o "ADS" da logo repetido) ---------- */
.mark {
  background: var(--mark-bg); color: var(--mark-fg);
  padding: 0 0.14em 0.02em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- COMPONENTE: botão (retângulo reto + bloco da seta) ---------- */
.btn {
  display: inline-flex; align-items: stretch;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 16px; line-height: 1.2;
  border-radius: var(--radius); border: 0; cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
  white-space: nowrap;
}
.btn .btn-label { padding: 16px 20px 16px 22px; display: flex; align-items: center; }
.btn .btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 50px; background: var(--btn-icon-bg); font-size: 20px;
  transition: transform 0.35s var(--ease);
}
.btn:hover { background: #963816; }
.btn:hover .btn-icon i { transform: translateX(3px); transition: transform 0.35s var(--ease); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm .btn-label { padding: 11px 16px; font-size: 15px; }
.btn-sm .btn-icon { width: 40px; font-size: 17px; }
.btn-ink { --btn-bg: var(--ink-900); }
.btn-ink:hover { background: #1E1E1C; }

.link-arrow { font-weight: 600; color: var(--action); display: inline-flex; gap: 6px; align-items: center; border-bottom: 2px solid transparent; transition: border-color 0.3s var(--ease); }
.link-arrow:hover { border-color: currentColor; }

/* ---------- COMPONENTE: bloco-brasão (o "ADS" da logo D: bloco com base de escudo) ----------
   Mesma proporção do bloco ADS do lockup: laterais retas até 72,8% da altura e
   base curva até a ponta central. Usado SÓ em selos/números (marcadores, provas),
   nunca em botão ou card grande — para não virar enfeite repetido. */
.brasao {
  -webkit-mask: var(--brasao-mask) center / 100% 100% no-repeat;
          mask: var(--brasao-mask) center / 100% 100% no-repeat;
  padding-bottom: 0.42em !important;   /* reserva a ponta do escudo */
}

/* ---------- COMPONENTE: marcador numérico (mini bloco-brasão) ---------- */
.num-block {
  width: var(--step-size); height: calc(var(--step-size) * 1.22); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--paper-100);
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  position: relative; z-index: 1;
  -webkit-mask: var(--brasao-mask) center / 100% 100% no-repeat;
          mask: var(--brasao-mask) center / 100% 100% no-repeat;
  padding-bottom: 8px;
}

/* =========================== HEADER =========================== */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);                 /* opaco, não translúcido */
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand-logo img { height: 40px; width: auto; }
nav.main { display: flex; gap: 32px; font-size: 15px; font-weight: 500; color: var(--text-muted); }
nav.main a { padding: 6px 0; border-bottom: 2px solid transparent; transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
nav.main a:hover { color: var(--text); border-color: var(--brand); }

/* =========================== HERO =========================== */
.hero { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 {
  font-size: clamp(40px, 5.4vw, 70px); font-weight: 700; line-height: 1.16;
  letter-spacing: -0.022em; max-width: 15ch; text-wrap: balance;
}
.hero .lead { font-size: 19px; color: var(--text-muted); margin-top: 26px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 36px; }

.hero-proof {
  display: flex; align-items: center; gap: 16px; margin-top: 44px; padding-top: 24px;
  border-top: 1px solid var(--line); max-width: 520px;
}
.hero-proof .proof-num {
  background: var(--brand); color: var(--paper-100); flex: none;
  font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1;
  padding: 10px 14px 12px;
}
.hero-proof p { font-size: 15px; color: var(--text-muted); line-height: 1.45; }
.hero-proof p strong { color: var(--text); font-weight: 600; }
.hero-proof a { color: var(--action); font-weight: 600; white-space: nowrap; }

/* retrato do fundador em formato de escudo */
.founder { justify-self: end; width: 100%; max-width: 400px; }
/* Mesma geometria do ícone da logo D (escudo de topo reto, viewBox 100x104):
   escudo coral por fora, foto (ou placeholder) num escudo menor por dentro. */
.shield-photo {
  position: relative; aspect-ratio: 100 / 104; background: var(--brand);
  -webkit-mask: var(--escudo-mask) center / 100% 100% no-repeat;
          mask: var(--escudo-mask) center / 100% 100% no-repeat;
}
.shield-photo .inner {
  position: absolute; inset: 12px 12px 14px; background: var(--ink-800);
  -webkit-mask: var(--escudo-mask) center / 100% 100% no-repeat;
          mask: var(--escudo-mask) center / 100% 100% no-repeat;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; color: var(--text-inverse-muted); font-size: 14px; padding: 24px 36px 70px;
}
.shield-photo .inner i { font-size: 44px; color: var(--stone-300); }
.shield-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.founder figcaption { margin-top: 20px; text-align: center; }
.founder figcaption strong { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.founder figcaption span { font-size: 15px; color: var(--text-muted); }

/* marcação visível de pendência */
.todo {
  display: inline-block; font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; color: #7A2E12; background: #FBE3D6; border: 1px dashed var(--action);
  padding: 3px 8px; line-height: 1.3;
}

/* =========================== COMO FUNCIONA (caminho) =========================== */
#como-funciona { background: var(--bg-alt); }
.path { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; position: relative; list-style: none; }
.path::before { /* trilho que liga os 3 passos */
  content: ""; position: absolute; top: calc(var(--step-size) / 2 - 1px); left: 22px; right: 22px;
  height: 2px; background: var(--ink-900); opacity: 0.18;
}
.path-step h3 { margin: 22px 0 10px; }
.path-step p { color: var(--text-muted); font-size: 16px; }
.path-step .step-cta { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-size: 14px; font-weight: 600; padding: 8px 12px; background: var(--bg);
  border: 1px solid var(--line); color: var(--text);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.chip:hover { border-color: var(--brand); }
.chip.is-featured { background: var(--ink-900); color: var(--paper-100); border-color: var(--ink-900); }

/* =========================== POR QUÊ =========================== */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 56px; }
.why-item { border-top: 2px solid var(--ink-900); padding-top: 26px; position: relative; }
.why-item::before { content: ""; position: absolute; top: -2px; left: 0; width: 56px; height: 6px; background: var(--brand); }
.why-item i { font-size: 26px; color: var(--action); }
.why-item h3 { margin: 16px 0 10px; }
.why-item p { color: var(--text-muted); font-size: 16px; }

/* =========================== SERVIÇOS =========================== */
#servicos { background: var(--bg-alt); }
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 56px; }
.service { background: var(--bg); padding: 40px; display: flex; flex-direction: column; gap: 14px; }
.service i.ti { font-size: 28px; color: var(--action); }
.service p { color: var(--text-muted); font-size: 16px; }
.service .link-arrow { margin-top: auto; padding-top: 10px; }

.service-featured {
  grid-column: 1 / -1; background: var(--bg-inverse); color: var(--text-inverse);
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 48px; padding: 56px; align-items: center;
}
.service-featured .tag {
  display: inline-block; background: var(--brand); color: var(--paper-100);
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px;
}
.service-featured h3 { font-size: clamp(30px, 3.4vw, 44px); margin: 18px 0 14px; letter-spacing: -0.015em; }
.service-featured p { color: var(--text-inverse-muted); font-size: 17px; }
.service-featured .link-arrow { color: var(--accent-on-dark); margin-top: 22px; }
.seo-proof { background: var(--surface-inverse); padding: 36px 32px 40px; }
.seo-proof .big {
  font-family: var(--font-display); font-weight: 800; line-height: 0.95;
  font-size: clamp(56px, 7vw, 92px); letter-spacing: -0.03em;
}
.seo-proof .big .mark { display: inline-block; padding: 0.06em 0.14em 0; }
.seo-proof p { margin-top: 18px; font-size: 15px; color: var(--text-inverse-muted); }
.seo-proof p strong { color: var(--paper-100); }

/* =========================== CASES =========================== */
#cases { background: var(--bg-inverse); color: var(--text-inverse); }
#cases .eyebrow { color: var(--accent-on-dark); }
#cases .section-sub { color: var(--text-inverse-muted); }
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 56px; }
.case { background: var(--surface-inverse); padding: 44px 40px; }
.case .client { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-on-dark); }
.case .stat { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 6px; }
.case .stat b {
  font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1;
  background: var(--brand); color: var(--paper-100); padding: 4px 12px 8px; white-space: nowrap;
}
.case .stat span { font-size: 15px; color: var(--text-inverse-muted); }
.case h3 { color: var(--paper-100); margin: 18px 0 12px; font-size: 22px; }
.case p { color: var(--text-inverse-muted); font-size: 16px; }
.testimonial-slot {
  grid-column: 1 / -1; border: 1.5px dashed rgba(240, 138, 98, 0.6); padding: 32px 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--text-inverse-muted); font-size: 16px;
}
.testimonial-slot q { font-family: var(--font-display); font-size: 22px; color: var(--paper-100); font-style: italic; }

/* =========================== PROCESSO =========================== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 56px; list-style: none; }
.step { border-top: 1px solid var(--line); padding-top: 24px; }
.step .num-block { --step-size: 38px; font-size: 18px; }
.step h3 { font-size: 19px; margin: 18px 0 8px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* =========================== FAQ + GARANTIA =========================== */
#faq { background: var(--bg-alt); }
#faq .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.guarantee { display: flex; gap: 18px; align-items: flex-start; margin-top: 36px; background: var(--bg); padding: 26px; }
.guarantee img { width: 44px; height: auto; flex: none; }
.guarantee strong { display: block; font-family: var(--font-display); font-size: 19px; margin-bottom: 4px; }
.guarantee p { font-size: 15px; color: var(--text-muted); }
.faq-item { border-top: 1px solid var(--stone-300); }
.faq-item:last-child { border-bottom: 1px solid var(--stone-300); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 24px 0; font-weight: 600; font-size: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { font-size: 20px; color: var(--action); transition: transform 0.35s var(--ease); flex: none; }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); font-size: 16px; padding-bottom: 24px; margin-top: -6px; }

/* =========================== CTA FINAL =========================== */
.cta-band { background: var(--action); color: var(--paper-100); }
.cta-band .wrap { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; align-items: end; }
.cta-band h2 { color: var(--paper-100); max-width: 20ch; }
.cta-band p { margin-top: 16px; font-size: 18px; color: var(--paper-100); max-width: 48ch; }
.cta-band .btn { justify-self: end; }

/* =========================== FOOTER =========================== */
footer { background: var(--bg-inverse); padding: 48px 0; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; font-size: 14px; color: var(--text-inverse-muted); }
footer img { height: 36px; width: auto; }
footer nav a:hover { color: var(--paper-100); }
footer nav { display: flex; gap: 24px; }

/* =========================== CTA FIXO MOBILE =========================== */
.sticky-cta { display: none; }

/* =========================== ENTRADA (só no hero) =========================== */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.8s var(--ease) both; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
  .founder { animation: rise 0.9s 0.2s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* =========================== RESPONSIVO =========================== */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .service-featured { grid-template-columns: 1fr; padding: 44px; }
}

@media (max-width: 860px) {
  nav.main { display: none; }
  .hero .wrap, #faq .wrap, .cta-band .wrap { grid-template-columns: 1fr; }
  .founder { justify-self: center; max-width: 250px; }
  .path, .why-grid, .services, .cases { grid-template-columns: 1fr; }
  .path { gap: 36px; }
  .path::before { top: 22px; bottom: 22px; left: calc(var(--step-size) / 2 - 1px); right: auto; width: 2px; height: auto; }
  .path-step { display: grid; grid-template-columns: var(--step-size) 1fr; column-gap: 20px; }
  .path-step .num-block { grid-row: 1 / span 4; }
  .path-step h3 { margin-top: 8px; }
  .why-grid { gap: 40px; }
  .cta-band .btn { justify-self: start; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  footer { padding-bottom: 128px; }             /* espaço para o CTA fixo não cobrir o rodapé */
  .case .stat b { font-size: 44px; }
  header.site { position: relative; }            /* no mobile o que fica fixo é o CTA, não o menu */
  header.site .wrap { height: 64px; }
  header.site .btn { display: none; }
  .brand-logo img { height: 32px; }
  .hero .lead { font-size: 17px; }
  .service, .case { padding: 32px 26px; }
  .service-featured { padding: 36px 24px; gap: 32px; }
  .seo-proof { padding: 28px 24px 32px; }
  .testimonial-slot { padding: 26px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 38px 1fr; column-gap: 18px; padding: 22px 0; }
  .step .num-block { grid-row: 1 / span 2; }
  .step h3 { margin-top: 6px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }

  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--ink-900); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    transform: translateY(110%); transition: transform 0.4s var(--ease);
  }
  .sticky-cta.is-visible { transform: none; }
  .sticky-cta .btn { width: 100%; }
  .sticky-cta .btn .btn-label { flex: 1; justify-content: center; }
}

@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .hero h1 { font-size: 38px; }
  .hero-proof { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn .btn-label { padding: 15px 16px; }
  .service-featured .tag { font-size: 12px; }
}
