@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;1,9..40,400&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bar-opaque-height: calc(2.75rem + env(safe-area-inset-bottom, 0px));
  --bar-fade-height: 2.25rem;
  --bar-total-height: calc(var(--bar-opaque-height) + var(--bar-fade-height));
  --bar-transition: 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  --skin: #f4efe6;
  --skin-rgb: 244, 239, 230;
  --bottom-safe: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-padding-bottom: calc(1rem + var(--bottom-safe));
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
  color: #000;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
}

.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #fff;
}

.video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 56.25vw;
  min-width: 177.78vh;
  min-height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: none;
}

.home {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.home .video-bg {
  position: absolute;
  inset: 0;
}

.home-page {
  overflow: hidden;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  height: var(--bar-opaque-height);
  padding: 0 1.25rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  border: none;
  background: transparent;
  pointer-events: none;
}

.bottom-bar.is-visible {
  pointer-events: auto;
}

.bottom-bar.is-instant .bottom-bar__link,
.bottom-bar.is-instant .bottom-bar__title {
  transition: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bar-fade-height);
  z-index: 9;
  pointer-events: none;
  opacity: 0.42;
  background: linear-gradient(
    to top,
    var(--skin) 0%,
    rgba(var(--skin-rgb), 0.96) 35%,
    rgba(var(--skin-rgb), 0.78) 52%,
    rgba(var(--skin-rgb), 0.48) 70%,
    rgba(var(--skin-rgb), 0.2) 86%,
    rgba(var(--skin-rgb), 0) 100%
  );
  transition:
    height var(--bar-transition),
    opacity var(--bar-transition);
}

body:has(.bottom-bar.is-visible)::after {
  height: var(--bar-total-height);
  opacity: 1;
}

body:has(.bottom-bar.is-instant)::after {
  transition: none;
}

.bottom-bar__link,
.bottom-bar__title {
  color: #000;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity var(--bar-transition);
}

.bottom-bar.is-visible .bottom-bar__link,
.bottom-bar.is-visible .bottom-bar__title {
  opacity: 1;
}

.bottom-bar__link {
  display: inline-flex;
  align-items: center;
}

.bottom-bar__link:first-child {
  justify-self: start;
}

.bottom-bar__link:last-child {
  justify-self: end;
}

.bottom-bar__link.is-active {
  font-style: italic;
}

.bottom-bar__title {
  justify-self: center;
  text-align: center;
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 500;
}

a.bottom-bar__link:hover,
a.bottom-bar__title:hover {
  opacity: 0.55;
}

.page {
  position: relative;
  z-index: 5;
  max-width: 32rem;
  margin: 0 auto;
  padding: 3rem 1.5rem calc(1.5rem + var(--bottom-safe));
}

.sobre p {
  font-size: 1.125rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
  text-align: justify;
  hyphens: auto;
}

.sobre p:last-child {
  margin-bottom: 0;
}

.arquivo-page {
  overflow-x: hidden;
}

.arquivo {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 100dvh;
  padding-bottom: var(--bottom-safe);
  overflow: visible;
}

.arquivo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.arquivo-item {
  position: absolute;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.arquivo-item.is-loading {
  visibility: hidden;
  pointer-events: none;
}

.arquivo-item.is-placed {
  animation: arquivo-fade-in 0.35s ease forwards;
}

@keyframes arquivo-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.arquivo-item:hover {
  opacity: 0.75;
}

.arquivo-item:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

.arquivo-modal {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  background: #fff;
  color: #000;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.arquivo-modal::-webkit-scrollbar {
  display: none;
}

.arquivo-modal::backdrop {
  background: #fff;
}

.arquivo-modal__close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: 1.25rem;
  z-index: 2;
  border: none;
  background: none;
  color: #000;
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.6;
}

.arquivo-modal__close:hover {
  opacity: 1;
}

.arquivo-modal__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 100dvh;
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.5rem calc(1.5rem + var(--bottom-safe));
  text-align: center;
}

.arquivo-modal__image {
  width: 100%;
  max-width: 22rem;
  height: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.arquivo-modal__image.is-loading {
  opacity: 0.35;
}

.arquivo-modal__title {
  font-size: inherit;
  font-weight: 400;
  margin-bottom: 1rem;
}

.arquivo-modal__text {
  width: 100%;
}

.arquivo-modal__text p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: center;
  hyphens: auto;
}

.arquivo-modal__text p:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .arquivo-modal__content {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: 52rem;
    gap: 2.5rem;
    text-align: left;
  }

  .arquivo-modal__image {
    flex: 0 1 45%;
    max-width: none;
  }

  .arquivo-modal__text {
    flex: 1;
  }

  .arquivo-modal__text p {
    text-align: left;
  }
}

@media (max-width: 639px) {
  .arquivo-modal__image {
    max-width: 100%;
    max-height: 38vh;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .arquivo-modal__content {
    max-width: 46rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arquivo-item {
    transition: none;
  }

  .arquivo-item.is-placed {
    animation: none;
  }

  body::after {
    transition: none;
  }

  .bottom-bar__link,
  .bottom-bar__title {
    transition: none;
  }

  .video-bg iframe {
    display: none;
  }
}
