/* =========================================================
   IA.BR — Instituto Brasileiro de IA
   Estilos compartilhados por todas as páginas
   ========================================================= */

:root {
  --navy-900: #071a3d;
  --navy-800: #0a2257;
  --navy-700: #0d2c6e;
  --blue-700: #0a3fb8;
  --blue-600: #0b4fd6;
  --blue-500: #1677ff;
  --sky-400: #2ab3f5;
  --cyan-400: #12c8e6;
  --teal-400: #14d9c6;
  --ink: #0b1f4d;
  --text: #3a4766;
  --muted: #5d6987;
  --line: #e3e9f3;
  --line-2: #d4ddec;
  --bg: #ffffff;
  --bg-soft: #f3f7fd;
  --bg-soft-2: #eaf2fd;
  --grad: linear-gradient(90deg, #1677ff 0%, #12c8e6 60%, #14d9c6 100%);
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(11, 31, 77, .04), 0 6px 20px rgba(11, 31, 77, .06);
  --shadow-lg: 0 18px 50px rgba(11, 31, 77, .12);
  --container: 1440px;
  --gutter: clamp(16px, 3vw, 40px);
  --header-h: 72px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--blue-600);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Foco visível e link de pular */
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.site-footer :focus-visible, .hero--dark :focus-visible { box-shadow: 0 0 0 3px var(--navy-900), 0 0 0 5px var(--cyan-400); }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--blue-700); color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: 8px; transition: top .15s;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.text-blue { color: var(--blue-600); }

/* ---------- Eyebrow / títulos de seção ---------- */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 8px;
}
.sec-title { font-size: clamp(22px, 2.2vw, 28px); }
.sec-lead { margin-top: 10px; color: var(--text); max-width: 60ch; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  border-radius: 8px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn svg.i { width: 18px; height: 18px; }
.btn-primary { background: var(--blue-700); color: #fff; box-shadow: 0 8px 20px rgba(10, 63, 184, .22); }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-1px); }
.btn-outline { border-color: var(--blue-700); color: var(--blue-700); background: #fff; }
.btn-outline:hover { background: var(--bg-soft-2); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.btn-pill { border-radius: 999px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--blue-700); font-weight: 700; font-size: 13.5px; }
.link-arrow svg.i { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover svg.i { transform: translateX(3px); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  width: 100%;
  height: var(--header-h);
  padding: 0 clamp(16px, 3.2vw, 56px);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 46px; width: auto; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav ul { display: flex; gap: clamp(14px, 2.2vw, 36px); }
.main-nav a {
  position: relative; display: block; padding: 24px 0;
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: color .2s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 2px;
  background: var(--blue-600); border-radius: 2px;
  transform: scaleX(0); transition: transform .25s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue-600); }
.main-nav a[aria-current="page"]::after, .main-nav a:hover::after { transform: scaleX(1); }
.main-nav .nav-cta { display: none; }
.header-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--blue-500); color: var(--blue-600); }
.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 1080px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 18px; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .main-nav .nav-cta { display: none; padding-top: 16px; }
  .main-nav .nav-cta a { border: 0; padding: 0; }
  .main-nav .nav-cta .btn { display: inline-flex; padding: 0 22px; color: #fff; }
  .nav-toggle { display: inline-grid; }
  .site-header .bar { justify-content: space-between; }
}
/* Sem JS, o menu fica sempre visível no celular */
@media (max-width: 1080px) {
  html:not(.js) .main-nav { display: block; position: static; box-shadow: none; border: 0; }
  html:not(.js) .site-header .bar { height: auto; flex-wrap: wrap; padding-top: 10px; }
  html:not(.js) .nav-toggle { display: none; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .header-actions .btn { display: none; }
  .main-nav .nav-cta { display: block; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; overflow: hidden; background: #f3f8fe; }
.hero > .container { position: relative; z-index: 3; }
.hero-media {
  position: absolute; top: 0; right: 0; bottom: 0; width: 60%; z-index: 1;
  background: url("/assets/img/ondas-1.jpg") no-repeat center / cover;
}
.hero-media::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #f3f8fe 0%, rgba(243,248,254,.85) 18%, rgba(243,248,254,0) 45%);
}
@media (max-width: 900px) {
  .hero-media { position: relative; width: 100%; height: 200px; display: block; }
  .hero-media::before { background: linear-gradient(180deg, rgba(243,248,254,0) 60%, #f3f8fe 100%); }
}

/* Breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--ink); font-weight: 500; }
.crumbs a:hover { color: var(--blue-600); }
.crumbs svg.i { width: 14px; height: 14px; }
.crumbs [aria-current] { color: var(--ink); }

/* =========================================================
   Cards e componentes
   ========================================================= */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tag {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--blue-700);
}
.chip {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 14px;
  border-radius: 999px; background: var(--bg-soft-2); color: var(--navy-700);
  font-size: 12.5px; font-weight: 600; border: 1px solid transparent;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 12.5px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg.i { width: 15px; height: 15px; color: var(--blue-600); }

/* Acordeão */
.acc-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.acc-item + .acc-item { margin-top: 10px; }
.acc-item summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary svg.i { width: 18px; height: 18px; transition: transform .25s; color: var(--navy-700); }
.acc-item[open] summary svg.i { transform: rotate(180deg); }
.acc-item .acc-body { padding: 0 16px 16px; font-size: 14px; }
.acc-item .acc-body p + p { margin-top: 8px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--navy-900); color: #c3cee4; }
.site-footer .bar {
  width: 100%;
  padding: 34px clamp(16px, 3.2vw, 56px) 30px;
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px; align-items: start;
}
.site-footer .brand img { height: 50px; }
.f-id { font-size: 13.5px; line-height: 1.55; margin-top: 14px; max-width: 42ch; }
.f-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.f-cols h2 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0; margin-bottom: 6px; }
.f-cols a { display: inline-block; font-size: 13px; line-height: 1.9; color: #c3cee4; }
.f-cols a:hover { color: #fff; text-decoration: underline; }
.f-copy { border-top: 1px solid rgba(255,255,255,.1); padding: 14px clamp(16px, 3.2vw, 56px); font-size: 12.5px; color: #a9b7d3; display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .site-footer .bar { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .f-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   Utilidades de layout
   ========================================================= */
.section { padding: 40px 0; }
.section-soft { background: var(--bg-soft); }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g-4, .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g-4, .g-3, .g-2 { grid-template-columns: 1fr; } }

/* Animação de entrada (só com JS ativo) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
