/* =====================================================================
   Tema "safety" — Instituto Tecnológico de Aeronáutica
   Todas as cores, fontes e medidas do site saem das variáveis abaixo.
   ===================================================================== */

:root {
  --navy-900: #071B36;
  --navy:     #0E2C55;
  --navy-600: #1B4A87;
  --gold:     #E0A81C;
  --gold-dim: #B8860F;
  --paper:    #F3F5F8;
  --white:    #FFFFFF;
  --ink:      #10161E;
  --slate:    #5C6C80;
  --line:     #D5DDE6;
  --closed:   #8A94A2;

  --display: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --body:    "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  --wrap: 1240px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy-600); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px; z-index: 99;
  background: var(--white); padding: 10px 16px; font-family: var(--display);
}

/* ---------------------------- Cabeçalho ---------------------------- */

.masthead { background: var(--white); border-bottom: 1px solid var(--line); }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.brand img { height: 42px; width: auto; display: block; }
.brand__safety { height: 34px !important; }
.brand__txt {
  font-family: var(--display); font-size: 12px;
  letter-spacing: .09em; text-transform: uppercase; color: var(--slate);
  border-left: 1px solid var(--line); padding-left: 16px;
  max-width: 216px; line-height: 1.35;
}
.brand__txt strong { color: var(--navy); font-weight: 600; display: block; }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  font-family: var(--display); font-size: 13.5px;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
  color: var(--navy); padding: 8px 9px; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--gold); }
.nav a.is-current { border-bottom-color: var(--navy); color: var(--navy-600); }
.nav__search { margin-left: 8px; }
.nav__search input {
  font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--line); background: var(--paper);
  padding: 8px 12px; width: 112px; color: var(--ink);
}
.nav__search input:focus { width: 180px; background: var(--white); }

/* ---------------------------- Hero ---------------------------- */

.hero {
  position: relative; background: var(--navy); color: var(--white);
  overflow: hidden; border-bottom: 4px solid var(--gold);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/hero-voo.jpg") right 45%/cover no-repeat;
  opacity: .62;
}
/* Véu navy: garante contraste do texto sobre a fotografia */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg,
    rgba(7,27,54,.93) 0%, rgba(7,27,54,.72) 38%, rgba(7,27,54,.30) 100%);
}
.hero__inner { z-index: 1; }
.hero__inner {
  position: relative; display: grid;
  grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  padding-top: 64px; padding-bottom: 64px;
}
.hero__inner > * { min-width: 0; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05;
  letter-spacing: -.01em; margin: 0 0 20px; text-wrap: balance;
}
.hero p { margin: 0 0 14px; max-width: 46ch; color: #D8E1EC; }
.hero__courses { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.pill {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none; color: var(--white);
  border: 1px solid rgba(255,255,255,.35); padding: 7px 12px;
}
.pill:hover { border-color: var(--gold); color: var(--gold); }

/* ------------------ Placa de dados: chamada em destaque ------------------ */

.plate {
  position: relative; background: var(--white); color: var(--ink);
  border: 2px solid var(--navy-900); box-shadow: 10px 10px 0 rgba(7,27,54,.35);
}
.plate::before, .plate::after {
  content: ""; position: absolute; width: 7px; height: 7px;
  border-radius: 50%; background: var(--navy-900); opacity: .5;
}
.plate::before { bottom: 9px; left: 9px; }
.plate::after  { bottom: 9px; right: 9px; }
.plate__head {
  background: var(--gold); color: var(--navy-900);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; padding: 9px 18px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.plate__body { padding: 20px 22px 22px; }
.plate h2 { font-family: var(--display); font-size: 22px; line-height: 1.2; margin: 0 0 4px; color: var(--navy); }
.plate__sub {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--slate); margin: 0 0 16px;
}
.rows { border-top: 1px solid var(--line); margin-bottom: 18px; }
.rows > div {
  display: flex; justify-content: space-between; gap: 14px;
  border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 15px;
}
.rows > div > span:first-child {
  font-family: var(--mono); font-size: 11px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--slate); padding-top: 3px;
}
.rows > div > span:last-child {
  font-family: var(--display); font-weight: 600; text-align: right; color: var(--navy);
}
.actions { display: grid; gap: 8px; }

.btn {
  display: block; text-align: center; font-family: var(--display);
  font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; padding: 12px 16px;
  border: 1px solid var(--navy); color: var(--navy); background: var(--white);
}
.btn:hover { background: var(--paper); }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-600); }

/* ---------------------------- Página ---------------------------- */

.page { display: grid; padding-top: 44px; padding-bottom: 72px; }
.page--home { grid-template-columns: minmax(0, 1fr); }
/* Na página inicial o título do documento é dispensável: o hero já o anuncia. */
.page--home .body > h1 {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.page--doc {
  grid-template-columns: 232px minmax(0, 1fr) 196px;
  gap: 48px; align-items: start;
}

.crumbs {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate); margin: 0 0 18px;
}
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--navy); }
.crumbs span { color: var(--line); }

/* Navegação lateral */
.sidebar, .onthispage { position: sticky; top: 24px; font-size: 15px; }
.sidebar__title {
  font-family: var(--display); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--slate);
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.sidebar ul, .onthispage ul { list-style: none; margin: 0; padding: 0; }
.sidebar li, .onthispage li { margin: 0; }
.sidebar ul ul, .onthispage ul ul { margin-left: 12px; border-left: 1px solid var(--line); padding-left: 10px; }
.sidebar a, .onthispage a {
  display: block; padding: 6px 0; text-decoration: none;
  color: var(--slate); font-family: var(--display); font-size: 15px; line-height: 1.3;
}
.sidebar a:hover, .onthispage a:hover { color: var(--navy); }
.sidebar .current > a, .onthispage a.current { color: var(--navy); font-weight: 600; }
.sidebar .caption {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold-dim); margin: 18px 0 4px;
}

/* ---------------------------- Corpo do texto ---------------------------- */

.body { max-width: 74ch; }
.page--home .body { max-width: none; }

.body h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1;
  color: var(--navy); margin: 0 0 20px; text-wrap: balance;
}
.body h2 {
  font-family: var(--display); font-weight: 600; font-size: 27px;
  line-height: 1.2; color: var(--navy); margin: 46px 0 14px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.body h3 { font-family: var(--display); font-weight: 600; font-size: 21px; color: var(--navy); margin: 30px 0 10px; }
.body h4 { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--navy); margin: 24px 0 8px; }
.body p { margin: 0 0 16px; }
.body ul, .body ol { margin: 0 0 18px; padding-left: 22px; }
.body li { margin-bottom: 6px; }
.body strong { font-weight: 600; }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

.body blockquote {
  margin: 0 0 20px; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold); color: var(--slate);
}
.body a.headerlink {
  color: var(--line); text-decoration: none; padding-left: 8px;
  font-size: .7em; opacity: 0; transition: opacity .15s;
}
.body h1:hover a.headerlink, .body h2:hover a.headerlink,
.body h3:hover a.headerlink, .body h4:hover a.headerlink,
.body a.headerlink:focus { opacity: 1; }
.headerlink:hover { color: var(--gold-dim); }

/* Listas de definição — usadas nas fichas de disciplina */
.body dl { margin: 0 0 20px; }
.body dt { font-family: var(--display); font-weight: 600; color: var(--navy); margin-top: 12px; }
.body dd { margin: 0 0 0 18px; }

/* Tabelas */
.body table {
  width: 100%; border-collapse: collapse; margin: 0 0 24px;
  font-size: 15px; background: var(--white);
}
.body table th {
  font-family: var(--display); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; text-align: left; color: var(--white);
  background: var(--navy); padding: 10px 12px; font-weight: 600;
}
.body table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.body table tr:last-child td { border-bottom: 0; }
.body table code { font-size: 13px; }

/* Código */
.body code { font-family: var(--mono); font-size: .88em; background: #E9EEF4; padding: 1px 5px; }
.body pre {
  font-family: var(--mono); font-size: 14px; line-height: 1.5;
  background: var(--navy-900); color: #D8E1EC;
  padding: 18px 20px; overflow-x: auto; margin: 0 0 22px;
}
.body pre code { background: none; padding: 0; color: inherit; }

/* Avisos */
.body .admonition {
  background: var(--white); border: 1px solid var(--line);
  border-left: 5px solid var(--navy); padding: 16px 20px; margin: 0 0 22px;
}
.body .admonition-title {
  font-family: var(--display); font-weight: 600; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--navy); margin: 0 0 8px;
}
.body .admonition > :last-child { margin-bottom: 0; }
.body .attention, .body .warning, .body .caution { border-left-color: var(--gold); }
.body .attention .admonition-title,
.body .warning .admonition-title,
.body .caution .admonition-title { color: var(--gold-dim); }

/* ------------------ Componentes reaproveitáveis nas páginas ------------------ */

/* Cartões: ::: {.cards} com um bloco por cartão */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0 0 28px; }
.cards > div {
  background: var(--white); border: 1px solid var(--line);
  border-top: 4px solid var(--navy); padding: 24px 26px 26px;
}
.cards > div > :last-child { margin-bottom: 0; }
.cards h3 { margin-top: 0; }
.cards > div:first-child { border-top-color: var(--gold); }
.cards > div > p:first-child { font-family: var(--display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.cards > div > p:first-child strong { color: var(--navy); font-weight: 600; }
.cards > div > p:last-child a {
  font-family: var(--display); font-size: 15px; letter-spacing: .05em;
  text-transform: uppercase; text-decoration: none; color: var(--navy-600);
  border-bottom: 2px solid var(--gold); padding-bottom: 2px;
}

/* Chamadas: ::: {.call} / {.call .call--closed} */
.call {
  background: var(--white); border: 1px solid var(--line);
  border-left: 5px solid var(--gold); padding: 20px 24px; margin: 0 0 14px;
}
.call.encerrada { border-left-color: var(--closed); background: #FAFBFC; }
.call > :last-child { margin-bottom: 0; }
.call h3 { margin: 0 0 6px; font-size: 20px; }
.call .status, .body p.status {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dim); margin: 0 0 6px;
}
.call.encerrada .status { color: var(--closed); }

/* Lista de documentos: ::: {.docs} com links em lista */
.docs ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.docs li { margin: 0; }
.docs a {
  display: block; background: var(--white); border: 1px solid var(--line);
  padding: 15px 18px; text-decoration: none; color: var(--navy);
  font-family: var(--display); font-size: 17px; font-weight: 600;
}
.docs a:hover { border-color: var(--navy); }
.docs a::after {
  content: "PDF"; float: right; font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; color: var(--gold-dim); padding-top: 4px;
}

/* Ficha técnica: ::: {.facts} com lista de definição */
.facts { background: var(--white); border: 1px solid var(--line); padding: 18px 22px; margin: 0 0 24px; }
.facts dl { margin: 0; }
.facts dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--slate); font-weight: 400; margin-top: 10px;
}
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--navy); }

/* Apoiadores: ::: {.apoiadores} com um bloco por organização */
.apoiadores {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px; margin: 0 0 28px;
}
.apoiadores > div {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line);
  border-top: 4px solid var(--navy); padding: 24px 26px 26px;
}
.apoiadores > div:first-child { border-top-color: var(--gold); }
.apoiadores > div > :last-child { margin-bottom: 0; }

/* Faixa do logotipo: altura fixa para alinhar cartões de proporções diferentes */
.apoiadores > div > p:first-child {
  margin: 0 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.apoiadores img {
  display: block; width: 100%; height: 108px;
  object-fit: contain; object-position: center;
}

.apoiadores__nome {
  margin: 0 0 6px !important;
  font-family: var(--display); font-size: 20px; line-height: 1.25;
}
.apoiadores__nome strong { color: var(--navy); font-weight: 600; }
.apoiadores__desc { margin: 0 0 18px !important; font-size: 15.5px; color: var(--slate); }

.apoiadores__links {
  list-style: none; margin: auto 0 0 !important; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 10px;
}
.apoiadores__links li { margin: 0; }
.apoiadores__links li p { margin: 0; }
.apoiadores__links a {
  display: inline-block; text-decoration: none; color: var(--navy-600);
  font-family: var(--display); font-size: 13px; letter-spacing: .07em;
  text-transform: uppercase; padding: 6px 12px; border: 1px solid var(--line);
}
.apoiadores__links a:hover { border-color: var(--navy); background: var(--paper); }

/* Convite ao final da página */
.convite {
  margin: 36px 0 0 !important; padding: 20px 24px; text-align: center;
  background: var(--white); border: 1px solid var(--line);
  border-top: 3px solid var(--gold); font-size: 15.5px;
}

/* ---------------------------- Fotografia ---------------------------- */

/* Faixa larga: ::: {.faixa} com uma imagem e um parágrafo de legenda */
.faixa { margin: 0 0 30px; }
.faixa img {
  display: block; width: 100%; height: 300px;
  object-fit: cover; border: 1px solid var(--line);
}
.faixa p:last-child {
  margin: 10px 0 0; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--slate);
}
.faixa p:last-child img { display: none; }

/* Figura no corpo do texto */
.body figure { margin: 0 0 26px; }
.body figure img {
  display: block; width: 100%; height: auto; border: 1px solid var(--line);
}
.body figcaption {
  margin-top: 10px; font-size: 14.5px; line-height: 1.5; color: var(--slate);
  border-left: 3px solid var(--gold); padding-left: 12px;
}
.body figcaption p { margin: 0; }

/* ---------------------------- Busca ---------------------------- */

#search-results h2 { border-top: 0; padding-top: 0; }
.search li { margin-bottom: 14px; }
.search input[type="text"] { font-family: var(--mono); border: 1px solid var(--line); padding: 8px 12px; }
.highlighted { background: #FBEDC2; padding: 0 2px; }

/* ---------------------------- Rodapé ---------------------------- */

.foot {
  background: var(--navy-900); color: #C9D5E3;
  border-top: 4px solid var(--gold); padding: 54px 0 30px; font-size: 15px;
}
.foot__grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 40px; }
.foot h4 {
  font-family: var(--display); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 14px;
}
.foot p { margin: 0 0 10px; line-height: 1.55; }
.foot a { color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); }
.foot a:hover { border-bottom-color: var(--gold); }
.foot__name { color: var(--white); font-family: var(--display); font-size: 17px; }
.foot__role { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #8FA3BA; }
.foot__mark { margin-bottom: 20px; }
.foot__mark img { height: 56px; width: auto; }
.foot__bottom {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: #8FA3BA;
}

/* ---------------------------- Responsivo ---------------------------- */

@media (max-width: 1100px) {
  .page--doc { grid-template-columns: 210px minmax(0, 1fr); gap: 36px; }
  .onthispage { display: none; }
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 48px; }
  .page--doc { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static; border-bottom: 1px solid var(--line);
    padding-bottom: 16px; margin-bottom: 28px;
  }
  .cards, .docs ul, .apoiadores, .foot__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand__txt { display: none; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .nav__search { display: none; }
  .plate { box-shadow: 6px 6px 0 rgba(7,27,54,.35); }
  .faixa img { height: 200px; }
  .page { padding-top: 32px; padding-bottom: 48px; }
}

@media print {
  .masthead, .sidebar, .onthispage, .crumbs { display: none; }
  .hero { background: none; color: #000; border: 0; }
  .hero::before, .plate { box-shadow: none; }
  .foot { background: none; color: #000; }
  .page--doc { display: block; }
}
