/* Mobile and accessibility enhancements layered over the compiled application. */
:root {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  scrollbar-gutter: auto;
  overflow-y: auto;
}

body {
  min-width: 320px;
  height: auto;
  min-height: 100%;
  overflow-y: visible;
  overflow-x: clip;
}

#root {
  min-height: 100%;
  overflow-y: visible;
}

img,
video,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

main > section {
  overflow: clip;
}

#hero video {
  object-position: center center;
}

#hero {
  background: #0b2b1b;
  overflow-x: clip;
  overflow-y: clip;
}

#hero .container > section {
  background: linear-gradient(180deg, #143d2d 0%, #0b2b1b 100%);
  border-top: 1px solid rgba(183, 212, 63, .18);
}

@media (min-width: 64rem) {
  section[id] {
    scroll-margin-top: 0;
  }

  #hero .container > section {
    display: none;
  }
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid #b7d43f;
  outline-offset: 3px;
  border-radius: .35rem;
}

.mobile-skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  color: #0b2b1b;
  background: #fff;
  border-radius: .5rem;
  box-shadow: 0 8px 24px #0004;
  transform: translateY(-160%);
  transition: transform .2s ease;
}

.mobile-skip-link:focus {
  transform: translateY(0);
}

.back-to-top {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #58761b;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(7, 21, 15, .34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(.75rem) scale(.94);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background-color .2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: #6f8f2b;
  transform: translateY(-2px) scale(1);
}

.back-to-top svg {
  width: 1.35rem;
  height: 1.35rem;
}

#responsavel .grid.grid-cols-2.gap-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 26rem;
}

#responsavel .grid.grid-cols-2.gap-3 > div {
  min-width: 0;
  padding-inline: .75rem;
}

@media (max-width: 63.999rem) {
  html,
  body,
  #root {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  header > div,
  nav > div,
  .max-w-7xl,
  .max-w-5xl,
  .max-w-4xl {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }

  header button.lg\:hidden {
    box-sizing: content-box;
    min-width: 2.75rem;
    min-height: 2.75rem;
    margin-right: -.65rem;
    padding: .35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  section.py-24,
  section.py-20 {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  section[id] h2 {
    font-size: clamp(2rem, 8.5vw, 3rem);
    line-height: 1.08;
    text-wrap: balance;
  }

  section[id] h3 {
    text-wrap: balance;
  }

  section[id] p {
    overflow-wrap: anywhere;
  }

  .grid.gap-16 {
    gap: 3rem;
  }

  .solutions-chips {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: .25rem 0 .75rem;
    scroll-padding-inline: 0;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .solutions-chips::-webkit-scrollbar {
    display: none;
  }

  .solutions-chip {
    min-height: 2.75rem;
    white-space: normal;
    line-height: 1.2;
  }

  .solutions-panel {
    min-height: 0;
    background: #07150f;
  }

  .solutions-panel-content {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #07150f;
  }

  .solutions-panel-content > img {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center center;
    flex: 0 0 auto;
  }

  .solutions-panel-content > .absolute.inset-0:not(img) {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    height: min(70%, 25rem);
    background: linear-gradient(
      180deg,
      rgba(7, 21, 15, 0) 0%,
      rgba(7, 21, 15, .08) 44%,
      rgba(7, 21, 15, .78) 78%,
      #07150f 100%
    ) !important;
    pointer-events: none;
  }

  .solutions-panel-text {
    position: relative;
    inset: auto;
    z-index: 1;
    margin-top: -4.5rem;
    padding: 1.5rem;
    padding-top: 5.5rem;
    background: linear-gradient(180deg, rgba(7, 21, 15, 0) 0%, #07150f 4.5rem);
  }

  #metodologia button {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  footer a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding-block: .3rem;
  }
}

@media (max-width: 39.999rem) {
  .back-to-top {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: 3rem;
    height: 3rem;
  }

  section[id] {
    scroll-margin-top: 4.5rem;
  }

  section.py-24,
  section.py-20 {
    padding-top: 3.75rem;
    padding-bottom: 3.75rem;
  }

  .px-6 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .mb-16,
  .mb-14 {
    margin-bottom: 2.75rem;
  }

  .gap-16,
  .gap-12,
  .gap-10 {
    gap: 2.5rem;
  }

  #hero,
  #hero > section,
  #hero > section > div {
    min-height: 100svh;
  }

  #hero .h-\[100dvh\] {
    height: 100svh;
  }

  #hero video {
    object-position: 50% 45%;
  }

  .btn-primary,
  .btn-outline,
  .btn-outline-dark {
    min-height: 3rem;
    justify-content: center;
    text-align: center;
  }

  #contato .btn-primary {
    width: 100%;
  }

  #responsavel .grid.grid-cols-2.gap-3 {
    grid-template-columns: 1fr;
    max-width: 20rem;
  }

  #responsavel .grid.grid-cols-2.gap-3 > div {
    flex-direction: row;
    justify-content: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    text-align: left;
  }

  #responsavel .grid.grid-cols-2.gap-3 > div svg {
    flex: 0 0 auto;
    margin-bottom: 0 !important;
  }

  footer .grid {
    gap: 2rem;
  }

  footer .mt-12 {
    margin-top: 2rem;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn-primary,
  .btn-outline,
  .btn-outline-dark,
  .solutions-chip {
    transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
  }

  .btn-primary:hover,
  .btn-outline:hover,
  .btn-outline-dark:hover,
  .solutions-chip:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
  }
}

@media (max-width: 22.5rem) {
  .px-6,
  header > div,
  nav > div,
  .max-w-7xl,
  .max-w-5xl,
  .max-w-4xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  section[id] h2 {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .solutions-panel-text {
    padding: 1.15rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  video {
    display: none;
  }

  .back-to-top {
    transition: none;
  }
}

@media (prefers-contrast: more) {
  :where(a, button):focus-visible {
    outline-width: 4px;
  }
}
