:root {
  /* Paleta (manual da marca: ciano #00bcd4 e cinza #323f45) */
  --color-cyan-200: #8eeaf2;
  --color-cyan-300: #79edf3;
  --color-cyan-400: #28ddea;
  --color-cyan-500: #00bcd4;
  --color-cyan-500-hover: #19cbe1;
  --color-teal-400: #19b4c2;
  --color-teal-500: #009fa3;
  --color-teal-600: #0c7c87;
  --color-teal-700: #0a6b75;
  --color-petrol-500: #085260;
  --color-petrol-700: #073440;
  --color-petrol-800: #042a34;
  --color-petrol-900: #04242d;
  --color-petrol-950: #021e26;
  --color-navy: #0f2a3a;
  --color-text: #33485a;
  --color-text-soft: #5b6f78;
  --color-text-on-dark: #e3eef0;
  --color-text-on-dark-soft: #c9dde1;
  --color-surface-alt: #f4f9fb;
  --color-surface-tint: #e4f2f5;
  --color-lime: #99eb5b;
  --color-success: #0f8f7f;
  --color-error: #c43d3d;
  --color-gray-700: #323f45;
  --color-gray-800: #2a353b;

  --bg: var(--color-gray-700);
  --bg-deep: var(--color-gray-800);
  --accent: var(--color-cyan-500);
  --accent-hover: var(--color-cyan-500-hover);
  --text: #ffffff;
  --text-soft: var(--color-text-on-dark);
  --text-nav: var(--color-text-on-dark);
  --glow: 0, 188, 212;

  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Escala única do cabeçalho das seções (selo, título h2 e descrição).
     Usada por M.IA, Ecossistema, Experiência, Desafios, Soluções, Parceiros
     e Contato; os valores mudam nos pontos de 1120 e 600 px, logo abaixo.
     O Hero tem o título principal (h1) e escala própria. */
  --section-badge-size: 14px;
  --section-title-size: 45px;
  --section-title-leading: 1.12;
  /* compensação óptica: título escuro sobre fundo claro parece menor que o
     branco sobre fundo escuro do mesmo tamanho; os escuros (M.IA, Desafios,
     Contato) usam --section-title-size + este valor */
  --section-title-optical: 2px;
  --section-text-size: 20px;
  --section-text-leading: 1.5;

  --gutter: 78px;
  --container: 1284px;
  --header-h: 82px;

  /* Espaçamento: escala base 8 (4 só para ajustes finos) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  /* respiro vertical das seções: 56 px no celular, até 104 px em telas largas */
  --section-space: clamp(56px, 6.5vw, 104px);

  /* Raios por hierarquia: traços, selos, ícones/campos, cards/painéis, pílulas */
  --radius-xs: 3px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }

/* scroll-padding: âncoras e campos focados param abaixo do cabeçalho fixo */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.nowrap { white-space: nowrap; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  min-width: 173px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.btn::after {
  content: "→";
  display: inline-block;
  flex: none;
  font-size: 1.15em;
  line-height: 1;
  transition: transform .2s ease;
}

.btn:focus-visible,
.site-nav a:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* texto navy sobre o ciano: contraste 6,47:1 (WCAG 1.4.3) */
.btn-primary { background: var(--accent); color: var(--color-navy); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 24px rgba(var(--glow), .35); }

.btn-outline { border: 1px solid #fff; background: transparent; color: #fff; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn:hover::after { transform: translateX(3px); }

/* ---------- Header ---------- */


.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  height: var(--header-h);
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color .3s ease, backdrop-filter .3s ease;
}

.site-header.is-scrolled {
  background-color: color-mix(in srgb, var(--color-petrol-800) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo img { width: 106px; height: auto; }

.site-nav {
  display: flex;
  align-items: center;
  flex: 1;
}

.site-nav ul {
  display: flex;
  gap: 37px;
  margin: 0 auto;
  padding: 0 0 0 30px;
  list-style: none;
}

.site-nav ul a {
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 400;
  color: var(--text-nav);
  white-space: nowrap;   /* cada item numa linha só */
  transition: color .2s ease;
}

.site-nav ul a:hover,
.site-nav ul a[aria-current="page"]:hover { color: var(--accent); }

/* Item ativo (js/nav-spy.js): traço ciano curto, 8 px abaixo do texto e
   alinhado ao início dele. Posição absoluta: não ocupa espaço, então o texto
   não se mexe quando o traço aparece. */
.site-nav ul a { position: relative; }

.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 24px;
  height: 2px;
  border-radius: var(--radius-xs);
  background: var(--accent);
  opacity: 0;
  transform: scaleX(.4);
  transform-origin: left center;
  transition: opacity .3s ease, transform .35s ease;
  pointer-events: none;
}

.site-nav ul a.is-current::after {
  opacity: 1;
  transform: scaleX(1);
}

.menu-toggle { display: none; }

/* ---------- Hero ---------- */

.hero {
  /* extra space between the fixed header and the copy */
  --hero-offset: 58px;

  position: relative;
  isolation: isolate;
  min-height: clamp(620px, 78vh, 720px);
  min-height: clamp(620px, 78svh, 720px);
  padding: calc(70px + var(--hero-offset)) 0 96px;
  overflow: hidden;
  background: var(--color-petrol-700);
}

/* O plano de fundo (peixe, água, rede) é o módulo assets/marlin-hero-bg: uma camada
   absoluta (z-index 0) criada em [data-marlin-hero-bg]. O conteúdo fica acima dela
   (.hero-inner, z-index 1) e deixa o mouse passar nas áreas vazias, para os pontos
   e o peixe continuarem recebendo hover; só o que tem conteúdo captura o mouse. */
.hero-inner { pointer-events: none; }
.hero-copy > *,
.hero-actions .btn { pointer-events: auto; }
.hero-actions { pointer-events: none; }

/* Variáveis do módulo (ajustes permitidos pelo guia de integração) */
.hero {
  --mhb-next-bg: #f4f9fb; /* cor da próxima seção (a curva em papel usa o mesmo tom) */
}

/* Emenda Hero -> M.IA: o fundo do módulo termina reto, e a curva escura da M.IA (.mia-wave)
   começa logo abaixo. Este esmaecimento leva a base do Hero ao tom dessa curva (#002030),
   sem linha de corte. Altura de 64 px: fica abaixo da base do peixe (72 px acima da borda). */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(0, 32, 48, 0) 0%,
    rgba(0, 32, 48, .45) 45%,
    rgba(0, 32, 48, .85) 80%,
    #002030 100%);
}

/* Scroll cue: double chevron centred at the bottom of the hero */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 50%;
  color: #3fd8ec;
  filter: drop-shadow(0 0 4px rgba(var(--glow), .65));
  transition: color .2s ease, filter .2s ease;
}

.hero-scroll svg {
  width: 26px;
  height: 26px;
  animation: hero-scroll-bob 2.2s ease-in-out infinite;
}

.hero-scroll:hover { color: var(--color-cyan-200); filter: drop-shadow(0 0 7px rgba(var(--glow), .9)); }

.hero-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes hero-scroll-bob {
  0%, 100% { transform: translateY(-3px); opacity: .75; }
  50%      { transform: translateY(4px);  opacity: 1; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  column-gap: 40px;
  align-items: start;
}

.hero-copy { position: relative; z-index: 2; }

.hero-title {
  width: 600px;
  max-width: calc(100vw - 2 * var(--gutter));
  margin: 0;
  font-size: 58px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-title em { font-style: normal; color: var(--accent); }

.hero-subtitle {
  margin: 24px 0 0;
  max-width: 500px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.25;
}

.hero-text {
  margin: 34px 0 0;
  max-width: 490px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 44px;
  margin-top: 43px;
  padding-left: 2px;
}

/* ---------- Responsive ---------- */

/* escala do cabeçalho das seções (ver --section-* no :root) */
@media (max-width: 1120px) {
  :root { --section-title-size: 42px; --section-text-size: 18px; }
}

@media (max-width: 600px) {
  :root { --section-badge-size: 12px; --section-title-size: 34px; --section-title-optical: 1px; --section-title-leading: 1.15; --section-text-size: 17px; }
}

@media (max-width: 1240px) {
  :root { --gutter: 48px; }
  .site-nav ul { gap: 26px; }
  .hero-inner { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); }
  .hero-title { width: 520px; font-size: 50px; }
}

/* Hero em telas baixas (desktop e notebook). Ex.: notebook 1920×1080 com escala
   de 150% no Windows = área útil de ~1280×590. O conteúdo encolhe pela altura
   para os botões aparecerem sem rolar; telas altas continuam como acima.
   A transição em papel também protege esse caso (paper-transition.js). */
@media (min-width: 961px) and (max-height: 820px) {
  .hero {
    --hero-offset: 34px;
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: 76px;
  }
  .hero-title { width: 560px; font-size: 50px; }
  .hero-subtitle { margin-top: 18px; font-size: 21px; }
  .hero-text { margin-top: 22px; font-size: 17px; }
  .hero-actions { margin-top: 30px; }
}

@media (min-width: 961px) and (max-height: 680px) {
  .hero { --hero-offset: 36px; padding-bottom: 68px; }
  .hero-title { width: 520px; font-size: 44px; }
  .hero-subtitle { margin-top: 14px; font-size: 19px; }
  .hero-text { margin-top: 16px; font-size: 16px; line-height: 1.45; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .btn { height: 46px; }
}

/* Pontos de quebra do site: 1240 (desktop estreito), 1120 (notebook),
   960 (tablet: menu sanduíche e layouts em uma coluna) e 600 (celular).
   Com 5 itens o menu cabe inteiro até 961 px, sem ajustes de espaçamento. */
@media (max-width: 960px) {
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--radius-xs);
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    transition: transform .2s ease, opacity .2s ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 12px var(--gutter) 28px;
    background: var(--bg-deep);
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .25);
    display: none;
  }

  .site-nav.is-open { display: flex; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .site-nav ul a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }

  /* menu aberto (itens em bloco com 12 px de respiro): traço dentro do item,
     8 px abaixo do texto */
  .site-nav ul a::after { top: auto; bottom: 3px; }

  .nav-cta { align-self: flex-start; }
}

/* Tablet: copy on top, fish below with full presence */
@media (max-width: 960px) {
  :root { --gutter: 40px; }

  /* O peixe do módulo fica ancorado na base (72 px acima dela). O palco tem proporção 2:1,
     então sua altura é 50% da largura do Hero; a % do padding é sobre a largura do Hero.
     Reserva: 72 px da base + palco (50%) + 40 px de respiro entre os botões e o palco. */
  .hero { --hero-offset: 70px; padding: calc(48px + var(--hero-offset)) 0 calc(72px + 50% + 40px); min-height: 0; }

  .hero-inner { grid-template-columns: minmax(0, 1fr); }

  .hero-copy { max-width: 600px; }
  .hero-title { width: auto; max-width: 600px; font-size: 46px; }
  .hero-subtitle { max-width: 560px; font-size: 21px; }
  .hero-text { font-size: 17px; }
}

/* Mobile */
@media (max-width: 600px) {
  :root { --gutter: 20px; --header-h: 68px; }

  .logo img { width: 95px; }

  /* celular: palco = 111,1% da largura × 0,5 = 55,56% do Hero; peixe a 88 px da base; 36 px de respiro */
  .hero { --hero-offset: 64px; padding: calc(32px + var(--hero-offset)) 0 calc(88px + 55.56% + 36px); }

  .hero-title { font-size: 36px; line-height: 1.12; }
  .nowrap { white-space: normal; }
  .hero-subtitle { margin-top: 18px; font-size: 18px; line-height: 1.3; }
  .hero-text { margin-top: 24px; font-size: 16px; line-height: 1.5; }

  .hero-actions { gap: 12px; margin-top: 32px; padding-left: 0; }
  .hero-actions .btn { flex: 1 1 100%; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn::after { transition: none; }
  .hero-scroll svg { animation: none; }
}

/* ---------- Link "Pular para o conteúdo" (WCAG 2.4.1) ----------
   Fica fora da tela e só aparece quando recebe foco pelo teclado. */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-navy);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline: 2px solid var(--color-teal-600); outline-offset: 2px; }
main:focus { outline: none; }

/* ---------- Pausar / retomar animações (WCAG 2.2.2) ----------
   Botão criado por js/motion-control.js. Fixo no canto inferior direito, acima
   do selo do reCAPTCHA (60px de altura, a 14px da borda): 14 + 60 + 12 = 86px. */
:root { --motion-toggle-bottom: 86px; }
.motion-toggle {
  position: fixed;
  right: 16px;
  bottom: var(--motion-toggle-bottom);
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-navy) 86%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease;
}
.motion-toggle:hover { background: color-mix(in srgb, var(--color-navy) 97%, transparent); }
.motion-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--color-navy);
}
.motion-toggle-icon { width: 16px; height: 16px; fill: currentColor; flex: none; }
.motion-toggle-play,
.motion-toggle.is-paused .motion-toggle-pause { display: none; }
.motion-toggle.is-paused .motion-toggle-play { display: block; }

@media (max-width: 600px) {
  .motion-toggle { width: 44px; height: 44px; padding: 0; justify-content: center; right: 12px; }
  .motion-toggle-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}

/* Animações contínuas de CSS param no quadro atual */
.motion-paused .hero-scroll svg,
.motion-paused .mia-tile,
.motion-paused .media-photo,
.motion-paused .challenges-wave-layer,
.motion-paused .challenges-wave-layer path,
.motion-paused .challenges-flow-lines path,
.motion-paused .challenges-wave-nodes circle,
.motion-paused .contact-flow path,
.motion-paused .contact-hub-ring {
  animation-play-state: paused !important;
}

/* Seção fora da tela (js/offscreen-motion.js): pausa as animações de CSS para não
   gerar recálculo de estilo e layout sem ninguém ver */
.motion-offscreen,
.motion-offscreen *,
.motion-offscreen *::before,
.motion-offscreen *::after {
  animation-play-state: paused !important;
}
