/* Complementos à landing — preferências de movimento e iframe hero */

/* Sem backdrop-filter: reduz custo de compositing na thread principal */
.no-blur-header {
  background-color: rgba(255, 255, 255, 0.97);
}
.no-blur-footer {
  background-color: #062a1b;
}

/* Montserrat self-host (latin + latin-ext, peso variável 300–800) — evita CSS externo do Google */
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(../fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(../fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Logo oculta para SEO de redes sociais — visível apenas para crawlers */
.seo-logo-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 100;
  border-radius: 0.5rem;
  background-color: #062a1b;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  transition: top 0.15s ease-out;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid #a5c7a9;
  outline-offset: 2px;
}

/* Foco visível consistente (WCAG 2.4.11 / 2.4.13) */
a:focus-visible:not(.skip-link),
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #62866d;
  outline-offset: 2px;
}

/* Alvo mínimo ~44×44px em controles compactos (WCAG 2.5.5) */
#mobile-menu-btn {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.gente-carousel__btn {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

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

#hero-animation iframe {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.hero-static-fallback {
  background: linear-gradient(145deg, #062a1b 0%, #62866d 45%, #a5c7a9 100%);
}

/* Carrossel de nossos engenheiros de software */
.gente-carousel {
  position: relative;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  overflow-x: clip;
}

.gente-carousel__track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.5rem 2.75rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gente-carousel__track::-webkit-scrollbar {
  display: none;
}

.gente-carousel .gente-card {
  scroll-snap-align: start;
  min-width: 280px;
  max-width: 320px;
}

/* Imagem: proporção quadrada, preenche o container, evita fundo vazando */
.gente-carousel .gente-card__img-wrap {
  aspect-ratio: 1 / 1;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gente-carousel .gente-card__img-wrap picture {
  display: block;
  width: 100%;
  height: 100%;
}

.gente-carousel .gente-card__img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Título: truncar em 1 linha se muito longo */
.gente-carousel .gente-card__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bio: fluxo natural, sem line-clamp que conflita com flex */

@media (min-width: 640px) {
  .gente-carousel .gente-card {
    min-width: 300px;
    max-width: 340px;
  }
}

.gente-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid #062a1b;
  background: #fff;
  color: #062a1b;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  box-shadow: 0 2px 8px rgba(6, 42, 27, 0.15);
}

.gente-carousel__btn:hover:not(:disabled) {
  background: #062a1b;
  color: #fff;
}

.gente-carousel__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gente-carousel__btn--prev {
  left: 0;
}

.gente-carousel__btn--next {
  right: 0;
}

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

.gente-carousel--static .gente-carousel__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  overflow: visible;
  scroll-snap-type: none;
  padding: 0.5rem 0;
}

.gente-carousel--static .gente-card {
  min-width: unset;
  max-width: unset;
}

.gente-carousel--static .gente-carousel__btn {
  display: none;
}

/* Footer flutuante — fixo no rodapé da tela, fino */
.footer-flutuante {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  width: 100%;
  box-shadow: 0 -4px 20px rgba(6, 42, 27, 0.12);
}

/* Erro de validação do formulário de contato */
.contact-field--error input,
.contact-field--error textarea {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626;
}

/* Conteúdo fora do hero: menos paint/layout até a seção aproximar da viewport */
.reveal-cv {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

/* Scroll reveal — seções montando conforme o usuário navega */
@media (prefers-reduced-motion: no-preference) {
  .reveal-section {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

  .reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  }

  .reveal-section.is-visible .reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(7) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(8) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(9) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger > *:nth-child(10) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

  .reveal-stagger-grid > * {
    opacity: 0;
    transform: translateY(0.75rem);
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
  }

  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(1) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(2) { transition-delay: 0.28s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(3) { transition-delay: 0.36s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(4) { transition-delay: 0.44s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(5) { transition-delay: 0.52s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(7) { transition-delay: 0.68s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(8) { transition-delay: 0.76s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(9) { transition-delay: 0.84s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(10) { transition-delay: 0.92s; opacity: 1; transform: translateY(0); }
  .reveal-section.is-visible .reveal-stagger-grid > *:nth-child(n+11) { transition-delay: 1s; opacity: 1; transform: translateY(0); }
}

/* Banner de consentimento de cookies — cartão inferior direito, acima do footer */
#cookie-consent-banner {
  position: fixed;
  right: 2rem;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  left: auto;
  max-width: 340px;
  z-index: 1000;
  display: none;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-radius: 0.75rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  background: #062a1b;
  color: #fff;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#cookie-consent-banner.cookie-consent-banner--visible {
  opacity: 0.98;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  #cookie-consent-banner {
    transition: none;
  }
}

#cookie-consent-banner .cookie-consent-banner__inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

#cookie-consent-banner .cookie-consent-banner__text {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

#cookie-consent-banner .cookie-consent-banner__text a {
  color: #a5c7a9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#cookie-consent-banner .cookie-consent-banner__text a:hover {
  color: #c5dcc9;
}

#cookie-consent-banner .cookie-consent-banner__text a:focus-visible {
  outline: 2px solid #a5c7a9;
  outline-offset: 2px;
  border-radius: 2px;
}

#cookie-consent-banner .cookie-consent-banner__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

@media (max-width: 600px) {
  #cookie-consent-banner {
    right: 0.5rem;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    max-width: min(98vw, 340px);
    font-size: 0.95rem;
  }

  #cookie-consent-banner .cookie-consent-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  #cookie-consent-banner .cookie-consent-banner__text {
    font-size: 0.98rem;
  }
}

#cookie-consent-banner button#cookie-consent-accept {
  flex-shrink: 0;
  margin: 0;
  align-self: center;
  background: linear-gradient(90deg, #a5c7a9 0%, #62866d 100%);
  color: #062a1b;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, color 0.2s, transform 0.1s;
  cursor: pointer;
}

#cookie-consent-banner button#cookie-consent-accept:hover {
  background: linear-gradient(90deg, #62866d 0%, #a5c7a9 100%);
  color: #fff;
  transform: translateY(-1px) scale(1.02);
}

#cookie-consent-banner button#cookie-consent-accept:focus-visible {
  outline: 2px solid #a5c7a9;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #cookie-consent-banner button#cookie-consent-accept:hover {
    transform: none;
  }
}

@media (max-width: 600px) {
  #cookie-consent-banner button#cookie-consent-accept {
    align-self: stretch;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 1rem;
  }
}
