/* ==========================================================================
   Blog Fortal Executivo — Sessao 1 (header + hero + busca + categorias)

   A Sessao 1 e um BLOCO ESCURO CONTINUO: header, hero sobre a fotografia e a
   barra de categorias vivem no mesmo fundo. A partir da Sessao 2 a pagina fica
   clara. Por isso existem duas familias de token aqui: as claras (--surface-*,
   --text-*), que valem da Sessao 2 em diante, e as escuras (--dark-*,
   --on-dark-*), que valem SO dentro da Sessao 1.
   ========================================================================== */

:root {
  /* ======================================================================
     PAGINA CLARA — vale da Sessao 2 em diante
     ====================================================================== */

  /* superficies: a pagina e o tom quente; o card sobe para branco puro e e
     esse degrau que faz o card existir. Nao igualar os dois. */
  --surface-page: #F7F5F1;      /* off-white quente */
  --surface-elevated: #FFFFFF;  /* faixas e secoes que sobem do fundo */
  --surface-card: #FFFFFF;      /* cards e paineis */
  --surface-sunken: #F1EEE8;    /* slots de imagem, badges de contagem, campos */

  /* texto sobre --surface-card (#FFFFFF). Os cinzas sao QUENTES de proposito:
     cinza frio sobre off-white quente puxa para o azul e suja a pagina. */
  --text-primary: #1A1D22;      /* 16,0:1 */
  --text-secondary: #66625C;    /*  6,1:1 — corpo */
  /* o #8A857E da spec entrega 3,66:1 e reprova para texto normal (min 4,5).
     Escurecido o minimo necessario para passar, mantendo o mesmo matiz. */
  --text-muted: #78736C;        /*  4,7:1 — meta e apoio */

  --border-subtle: rgba(30, 24, 14, 0.12);
  --divisor: rgba(30, 24, 14, 0.08);

  /* ======================================================================
     BLOCO ESCURO — vale SO dentro da Sessao 1
     ====================================================================== */
  --dark-page: #06080B;         /* fundo do bloco */
  --dark-surface: #0D1015;      /* chip de categoria */
  --dark-surface-2: #12161C;    /* chip em hover, campo de busca */
  --dark-border: rgba(255, 255, 255, 0.10);

  --on-dark: #FFFFFF;
  --on-dark-2: rgba(255, 255, 255, 0.88);
  /* 0.68 caia para 4,22:1 sobre o brilho do capo. A foto tem pontos claros:
     o alfa do texto de apoio cobre o PIOR ponto, nao a media. */
  --on-dark-3: rgba(255, 255, 255, 0.80);

  /* ======================================================================
     VERMELHO FORTAL — tres tons, cada um com um trabalho
     ====================================================================== */
  /* PREENCHIMENTO (botao, badge, filete, icone). O #EA2B2E da spec entrega
     4,30:1 com branco em cima e reprova por 0,2; #E52328 entrega 4,56:1.
     A diferenca e imperceptivel a olho e resolve o AA. */
  --accent: #E52328;
  --accent-hover: #F33A3D;      /* hover de preenchimento */
  /* vermelho como TEXTO GRANDE (>=24px, onde o minimo cai para 3:1) */
  --accent-display: #EA2B2E;
  /* vermelho como TEXTO PEQUENO em fundo CLARO — 6,1:1 */
  --accent-text: #C2181D;
  --accent-strong: #8E1115;     /* estado ativo */
  --accent-on-dark: #FF5F6D;    /* vermelho como TEXTO em fundo ESCURO — 6,7:1 */

  --header-h: 78px;
  --gutter: 48px;
  --max: 1360px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }

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

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

/* dentro do bloco escuro o anel precisa do vermelho claro, senao some.
   O header e fixo e fica fora de .sessao-1 no DOM, mas e escuro tambem. */
.sessao-1 :focus-visible,
.site-header :focus-visible {
  outline-color: var(--accent-on-dark);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ==========================================================================
   SESSAO 1 — o bloco escuro
   ========================================================================== */

.sessao-1 {
  position: relative;
  background: var(--dark-page);
  color: var(--on-dark);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(6, 8, 11, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--dark-border);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { flex-shrink: 0; display: inline-flex; align-items: center; }
.brand img { height: 38px; width: auto; }

.main-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.main-nav a {
  position: relative;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--on-dark-3);
  padding: 6px 0;
  transition: color 0.18s ease;
}

.main-nav a:hover { color: var(--on-dark); }

.main-nav a[aria-current="page"] { color: var(--on-dark); font-weight: 600; }

.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--accent);
}

.header-acoes {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* lupa do topo — abre a busca do hero */
.btn-busca-topo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--on-dark-2);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.btn-busca-topo svg { width: 20px; height: 20px; }
.btn-busca-topo:hover { background: var(--dark-surface-2); color: var(--on-dark); }

/* botao WhatsApp — vermelho da marca, branco em cima (4,56:1) */
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 22px -12px rgba(229, 35, 40, 0.90);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn-wa:hover {
  background: #F2363B;
  box-shadow: 0 12px 28px -12px rgba(229, 35, 40, 1);
  transform: translateY(-1px);
}

.btn-wa .wa-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.btn-wa .wa-icon svg { width: 16px; height: 16px; }
.btn-wa .seta { width: 16px; height: 16px; opacity: 0.9; }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 660px;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* a foto agora e 16:9 contra um hero de ~1,9:1: descarta so ~7% da altura,
     e nada na largura. Leve vies para cima preserva o ceu e as cabecas. */
  object-position: 50% 44%;
}

/* dois overlays: um horizontal, que abre espaco para o texto a esquerda e
   libera a cena a direita; e um vertical, que assenta a barra de categorias */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(6, 8, 11, 0.72) 0%,
      rgba(6, 8, 11, 0.10) 24%,
      rgba(6, 8, 11, 0.10) 62%,
      rgba(6, 8, 11, 0.94) 100%
    ),
    linear-gradient(
      90deg,
      rgba(6, 8, 11, 0.94) 0%,
      rgba(6, 8, 11, 0.80) 32%,
      rgba(6, 8, 11, 0.34) 60%,
      rgba(6, 8, 11, 0.10) 100%
    );
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 72px;
}

/* --- eyebrow --- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  flex-shrink: 0;
  width: 34px; height: 2px;
  background: var(--accent);
}

.eyebrow span {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.sessao-1 .eyebrow span { color: var(--on-dark-2); }

/* --- titulo --- */
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 4.9vw, 66px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.028em;
  color: var(--on-dark);
  text-wrap: balance;
}

.hero h1 .em {
  display: block;
  color: #FF3B43;
}

/* --- copy --- */
.hero-lead {
  margin: 22px 0 0;
  max-width: 42ch;
  font-size: 17.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--on-dark-2);
}

/* --- busca --- */
.search {
  margin-top: 36px;
  max-width: 540px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
  background: rgba(13, 16, 21, 0.86);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.search:focus-within {
  border-color: rgba(229, 35, 40, 0.65);
  background: rgba(18, 22, 28, 0.94);
}

.search .search-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--on-dark-3);
}

.search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--on-dark);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
}

.search input::placeholder { color: var(--on-dark-3); }

/* o clique de mouse nao precisa de anel, mas o teclado precisa: sem isto a
   regra global de :focus-visible perde por especificidade e o campo fica sem
   nenhum indicador com contraste suficiente */
.search input:focus { outline: none; }

.search input:focus-visible {
  outline: 2px solid var(--accent-on-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

.search button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, gap 0.18s ease;
}

.search button svg { width: 16px; height: 16px; }
.search button:hover { background: #F2363B; gap: 13px; }
.search button:active { background: var(--accent-strong); }

/* --- acao do hero ---
   Entrou no lugar da busca, que foi retirada por nao existir pagina de
   resultados. E NAVEGACAO para o guia, nao conversao: por isso e contornado.
   O unico CTA vermelho cheio da home e o de WhatsApp, na Sessao 4. */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding: 17px 26px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  background: rgba(6, 8, 11, 0.40);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--on-dark);
  font-size: 15.5px;
  font-weight: 600;
  transition: background 0.22s ease, border-color 0.22s ease, gap 0.22s ease;
}

.hero-cta .seta { width: 17px; height: 17px; color: var(--accent-on-dark); }

.hero-cta:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.60);
  gap: 16px;
}

/* --- coluna direita sobre a foto --- */
.hero-aside {
  position: relative;
  align-self: center;
  text-align: right;
  padding-left: 24px;
}

/* Vel localizado atras da coluna.
   O overlay horizontal do hero abre a foto a direita de proposito — e e ali
   que fica o terminal iluminado. Medido: o texto da coluna caia para 1,4:1
   sobre os pontos claros. Escurecer o overlay inteiro mataria a foto, entao
   o vel e so aqui, com borda difusa para nao virar uma caixa. */
.hero-aside::before {
  content: "";
  position: absolute;
  inset: -40px -32px -40px -56px;
  z-index: -1;
  background: radial-gradient(
    ellipse 115% 85% at 62% 50%,
    rgba(6, 8, 11, 0.88) 0%,
    rgba(6, 8, 11, 0.80) 48%,
    rgba(6, 8, 11, 0.40) 76%,
    rgba(6, 8, 11, 0) 100%
  );
  pointer-events: none;
}

.hero-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-aside li {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.95);
}

.hero-aside .rule {
  width: 46px; height: 2px;
  margin: 24px 0 0 auto;
  background: var(--accent);
}

.hero-aside .sig {
  margin: 16px 0 0 auto;
  max-width: 12ch;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.8;
  text-transform: uppercase;
  color: var(--on-dark-3);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.95);
}

/* ==========================================================================
   CATEGORIAS — dentro do bloco escuro, assentadas sobre a base da foto
   ========================================================================== */

/* Sem margem negativa: puxar a barra para dentro do hero fazia ela cobrir o
   campo de busca (31px de sobreposição, medidos). O overlay vertical do hero
   já dissolve a foto no --dark-page, então a barra continua lendo como parte
   do mesmo bloco escuro, sem risco de colisão quando a copy mudar de altura. */
.categorias {
  position: relative;
  z-index: 1;
  padding-top: 44px;
  padding-bottom: 60px;
}

.cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.cat-head .eyebrow { margin-bottom: 0; }

.cat-head .ver-todas {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-on-dark);
  transition: gap 0.2s ease, color 0.2s ease;
}

.cat-head .ver-todas svg { width: 15px; height: 15px; }
.cat-head .ver-todas:hover { gap: 13px; color: #FF8A93; }

.cat-scroll {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}

.cat-scroll::-webkit-scrollbar { display: none; }

.cat {
  flex: 1 1 0;
  min-width: max-content;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cat:hover {
  background: var(--dark-surface-2);
  border-color: rgba(229, 35, 40, 0.45);
  transform: translateY(-2px);
}

.cat svg {
  flex-shrink: 0;
  width: 19px; height: 19px;
  color: var(--accent);
}

.cat span {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--on-dark);
  white-space: nowrap;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

@media (max-width: 1200px) {
  :root { --gutter: 36px; }
  .main-nav { gap: 24px; }
  .hero .wrap { gap: 36px; }
  .categorias { margin-top: -120px; }
}

@media (max-width: 1024px) {
  .main-nav { display: none; }
  .site-header .wrap { justify-content: space-between; }

  .hero { min-height: 600px; }
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-bottom: 56px;
  }
  .hero-media img { object-position: 64% 50%; }

  .hero-aside {
    text-align: left;
    padding-left: 0;
    border-top: 1px solid var(--dark-border);
    padding-top: 24px;
  }
  .hero-aside ul { flex-direction: row; flex-wrap: wrap; gap: 10px 24px; }
  .hero-aside .rule { margin-left: 0; }
  .hero-aside .sig { margin-left: 0; max-width: none; }

  .categorias { margin-top: -100px; }
  .cat { flex: 0 0 auto; }

  /* a barra rola: sem a barra nativa, a mascara nas bordas e a unica pista
     de que ha mais categorias fora do enquadramento */
  .cat-scroll {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
  }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; --header-h: 68px; }

  .brand img { height: 30px; }
  .btn-wa { padding: 11px 16px 11px 11px; font-size: 13px; }
  .btn-wa .rotulo-longo { display: none; }

  .hero { min-height: 0; }
  .hero .wrap { padding-top: 52px; padding-bottom: 48px; }

  .hero-media img { object-position: 70% 50%; }
  .hero-media::after {
    background: linear-gradient(
      180deg,
      rgba(6, 8, 11, 0.76) 0%,
      rgba(6, 8, 11, 0.62) 40%,
      rgba(6, 8, 11, 0.90) 78%,
      rgba(6, 8, 11, 0.97) 100%
    );
  }

  .eyebrow { margin-bottom: 20px; gap: 12px; }
  .eyebrow span { font-size: 10.5px; letter-spacing: 0.22em; }

  .hero-lead { font-size: 16px; max-width: none; }

  .search {
    margin-top: 28px;
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 8px;
  }
  .search input { flex-basis: 100%; height: 40px; order: 2; }
  .search .search-icon { order: 1; }
  .search button { order: 3; width: 100%; justify-content: center; }

  .hero-cta { width: 100%; justify-content: center; margin-top: 28px; }

  .hero-aside ul { gap: 8px 18px; }
  .hero-aside li { font-size: 11px; letter-spacing: 0.20em; }

  .categorias { margin-top: -56px; padding-bottom: 40px; }
  .cat-head { flex-wrap: wrap; gap: 10px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
