:root {
  --navy-950: #031525;
  --navy-900: #061b2e;
  --navy-800: #08263b;
  --blue: #1464d2;
  --cyan: #08b6d5;
  --yellow: #f4c430;
  --paper: #f4f8fa;
  --white: #ffffff;
  --ink: #071f3b;
  --muted: #60788b;
  --line: #d9e4e9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Manrope, Arial, Helvetica, sans-serif;
}

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

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

.site-header {
  align-items: center;
  background: var(--navy-950);
  opacity: 95% ;
  border-top: 8px solid var(--yellow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  height: 140px;
  width: 100%;
  justify-content: space-between;
  padding: 0 clamp(28px, 5vw, 80px);
  position: fixed;
  z-index: 5;
}

.brand {
  /* background: white; */
  padding: 7px 10px;
  width: min(360px, 38vw);
}

.site-header nav {
  align-items: center;
  display: flex;
  gap: clamp(20px, 2.8vw, 44px);
}

.site-header nav a {
  color: #f7fbff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 16px 0;
  position: relative;
  text-transform: uppercase;
}

.site-header nav a::after {
  background: var(--cyan);
  bottom: 8px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
  width: 100%;
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after {
  transform: scaleX(1);
}

.hero {
  background: var(--navy-900);
  color: white;
  min-height: calc(100vh - 140px);
  border-top: 1300px;
  overflow: hidden;
  padding: clamp(72px, 9vh, 118px) clamp(28px, 5vw, 80px) 150px;
  position: relative;
}

.hero-map {
  background-image: url("assets/dol-bathymetry-hero.png");
  background-position: center right;
  background-repeat: no-repeat;
  background-size: cover;
  inset: 0;
  opacity: 0.92;
  position: absolute;
}

.hero-shade {
  background:
    linear-gradient(90deg, #031525 0%, rgba(3, 21, 37, 0.98) 31%, rgba(3, 21, 37, 0.58) 62%, rgba(3, 21, 37, 0.08) 100%),
    linear-gradient(0deg, rgba(3, 21, 37, 0.78) 0%, transparent 46%);
  inset: 0;
  position: absolute;
}

.hero-content {
  max-width: 680px;
  margin-top: 14vh;
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 26px;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: #087e99;
}

.hero h1 {
  font-size: clamp(52px, 6vw, 88px);
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
  max-width: 780px;
}

.hero h1 span {
  color: #b9d0df;
  display: block;
}

.hero-copy {
  color: #c5d5e0;
  font-size: clamp(18px, 1.5vw, 23px);
  line-height: 1.5;
  margin: 32px 0 38px;
  max-width: 580px;
}

.primary-button {
  align-items: center;
  background: var(--cyan);
  color: var(--navy-950);
  display: inline-flex;
  font-size: 17px;
  font-weight: 800;
  gap: 48px;
  justify-content: space-between;
  min-width: 270px;
  padding: 20px 24px;
  transition: transform 220ms ease, background 220ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #20c8e3;
  transform: translateY(-2px);
}

.primary-button span {
  font-size: 24px;
}

.capability-strip {
  backdrop-filter: blur(14px);
  background: rgba(5, 27, 46, 0.88);
  border: 1px solid rgba(8, 182, 213, 0.2);
  bottom: 38px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  left: clamp(28px, 5vw, 80px);
  position: absolute;
  right: clamp(28px, 5vw, 80px);
  z-index: 3;
}

.strip-item {
  align-items: center;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  gap: 20px;
  min-height: 96px;
  padding: 26px 30px;
}

.strip-item:last-child {
  border-right: 0;
}

.strip-item span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}

.strip-item strong {
  font-size: clamp(14px, 1.35vw, 20px);
}

.section {
  padding: 120px clamp(28px, 5vw, 80px);
}

.section-label {
  align-items: center;
  color: #6d8393;
  display: flex;
  gap: 18px;
  grid-column: 1 / -1;
  margin-bottom: 70px;
}

.section-label span {
  color: #0b8fa8;
  font-size: 12px;
  font-weight: 800;
}

.section-label p {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin: 0;
  text-transform: uppercase;
}

.section-label::after {
  background: var(--line);
  content: "";
  height: 1px;
  flex: 1;
}

.section-label.light {
  color: #9eb3c1;
}

.section-label.light::after {
  background: rgba(255, 255, 255, 0.14);
}

.intro {
  display: grid;
  gap: 48px;
  grid-template-columns: 1.15fr 0.85fr;
}

.intro-copy h2,
.section-heading h2,
.principles h2,
.contact h2 {
  font-size: clamp(40px, 5vw, 70px);
  letter-spacing: -0.05em;
  line-height: 1.03;
  margin: 0;
}

.intro-copy .lead {
  color: #1b3c53;
  font-size: 21px;
  line-height: 1.55;
  margin: 32px 0 20px;
}

.intro-copy > p:last-child {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 720px;
}

.infrastructure-card {
  align-self: end;
  background: var(--navy-900);
  margin: 0;
  padding: 14px;
}

.infrastructure-card img {
  aspect-ratio: 1.45;
  object-fit: cover;
  width: 100%;
}

.infrastructure-card figcaption {
  color: white;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 24px 12px 12px;
}

.infrastructure-card figcaption span {
  color: #9eb3c1;
  font-size: 13px;
}

.dark-section {
  background: var(--navy-950);
  color: white;
}

.section-heading {
  margin: 0 0 70px;
  max-width: 900px;
}

.section-heading.dark-heading {
  color: var(--ink);
}

.capability-grid {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.capability-grid article {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 330px;
  padding: 34px 28px;
}

.capability-grid article:last-child {
  border-right: 0;
}

.cap-number {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.capability-grid h3 {
  font-size: 23px;
  margin: 100px 0 18px;
}

.capability-grid p {
  color: #a9c1d2;
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.products {
  background: white;
}

.product-layout {
  align-items: start;
  display: grid;
  gap: 65px;
  grid-template-columns: 1fr 0.9fr;
}

.product-list {
  border-top: 1px solid var(--line);
}

.product-list article {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 28px;
  grid-template-columns: 90px 1fr;
  padding: 30px 0;
}

.product-list article > span {
  color: #087e99;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-list h3 {
  font-size: 26px;
  margin: 0 0 12px;
}

.product-list p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.model-figure {
  background: #e9f0f3;
  margin: 0;
  padding: 20px;
}

.model-figure img {
  background: white;
  width: 100%;
}

.model-figure figcaption {
  color: #486276;
  font-size: 14px;
  line-height: 1.6;
  padding: 22px 5px 5px;
}

.principles {
  align-items: center;
  background: #08364b;
  color: white;
  display: grid;
  gap: 90px;
  grid-template-columns: 1fr 0.85fr;
}

.principles-copy > p:last-child {
  color: #b8ccd7;
  font-size: 18px;
  line-height: 1.65;
  margin-top: 30px;
  max-width: 680px;
}

.principle-list {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.principle-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 17px;
  font-weight: 700;
  padding: 21px 0;
}

.principle-list span {
  color: var(--cyan);
  display: inline-block;
  font-size: 11px;
  margin-right: 24px;
  width: 20px;
}

.team {
  background: var(--paper);
}

.team-grid {
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.team-grid div {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 18px;
  font-weight: 700;
  padding: 25px;
}

.team-note {
  color: var(--muted);
  font-size: 14px;
  margin: 24px 0 0;
}

.contact {
  align-items: end;
  background: var(--navy-950);
  color: white;
  display: grid;
  gap: 60px;
  grid-template-columns: 1fr auto;
}

.contact-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.primary-button.yellow {
  background: var(--yellow);
}

.contact-actions p {
  color: #9eb3c1;
  line-height: 1.6;
  margin: 0;
  text-align: right;
}

footer {
  align-items: center;
  background: #020f1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #8ea5b5;
  display: grid;
  font-size: 12px;
  gap: 28px;
  grid-template-columns: auto 1fr auto;
  padding: 28px clamp(28px, 5vw, 80px);
}

/* =========================================
   Estilos atualizados do Rodapé (Footer)
   ========================================= */
.footer-logo-main {
  padding: 4px;
  width: 190px;
}

.footer-text p {
  margin: 4px 0; /* Remove o espaçamento excessivo entre as linhas de texto */
}

.footer-institutions {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}

.footer-institutions img {
  /* height: 45px; */
  width: auto;
  transition: opacity 220ms ease;
}
.footer-institutions .logo-usp {
  height: 45px; /* Mantive o tamanho original para não ficar gigante */
}

/* Tamanho específico para o logo do IOUSP */
.footer-institutions .logo-io {
  height: 100px; /* Aumentado para compensar a proporção do logo */
}

/* Efeito de hover suave nos logos institucionais */
.footer-institutions a:hover img,
.footer-institutions a:focus-visible img {
  opacity: 0.7;
}

@media (max-width: 900px) {
  .site-header {
    height: auto;
    min-height: 110px;
  }

  .site-header nav {
    display: none;
  }

  .brand {
    width: 300px;
  }

  .hero {
    min-height: 820px;
  }

  .hero-map {
    background-position: 65% center;
    opacity: 0.65;
  }

  .hero-shade {
    background: linear-gradient(90deg, #031525 0%, rgba(3, 21, 37, 0.91) 70%, rgba(3, 21, 37, 0.55));
  }

  .capability-strip,
  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .strip-item:nth-child(2),
  .capability-grid article:nth-child(2) {
    border-right: 0;
  }

  .intro,
  .product-layout,
  .principles {
    grid-template-columns: 1fr;
  }

  .contact {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .contact-actions {
    align-items: flex-start;
  }

  .contact-actions p {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .site-header {
    border-top-width: 6px;
    padding: 24px;
  }

  .brand {
    width: min(300px, 100%);
  }

  .hero {
    min-height: 900px;
    padding-bottom: 280px;
  }

  .hero h1 {
    font-size: 49px;
  }

  .capability-strip {
    bottom: 24px;
    grid-template-columns: 1fr;
  }

  .strip-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    border-right: 0;
    min-height: 58px;
    padding: 14px 20px;
  }

  .strip-item:last-child {
    border-bottom: 0;
  }

  .section {
    padding-bottom: 82px;
    padding-top: 82px;
  }

  .section-label {
    margin-bottom: 44px;
  }

  .capability-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .capability-grid article {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 0;
    min-height: auto;
  }

  .capability-grid h3 {
    margin-top: 54px;
  }

  .product-list article {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: start;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

/* =========================================
   Botão Flutuante: Voltar ao Topo
   ========================================= */
.back-to-top {
  align-items: center;
  background: var(--cyan);
  border-radius: 50%;
  bottom: 30px;
  box-shadow: 0 4px 12px rgba(3, 21, 37, 0.4);
  color: var(--navy-950);
  display: flex;
  font-size: 24px;
  font-weight: 800;
  height: 55px;
  justify-content: center;
  opacity: 0;
  position: fixed;
  right: 30px;
  text-decoration: none;
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease, background 220ms ease;
  visibility: hidden;
  width: 55px;
  z-index: 50;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #20c8e3;
  transform: translateY(-4px);
}

/* Ajuste para telas menores */
@media (max-width: 600px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    height: 45px;
    width: 45px;
    font-size: 20px;
  }
}

/* =========================================
   Barra de Progresso (Scroll)
   ========================================= */
.progress-container {
  background: transparent;
  height: 5px; /* Espessura da barra */
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50; /* Maior que o z-index do header para ficar por cima */
}

.progress-bar {
  background: var(--cyan); /* Você pode trocar por var(--yellow) se preferir */
  height: 100%;
  width: 0%; /* Inicia zerada */
  transition: width 0.1s ease-out; /* Deixa o preenchimento mais fluido */
}