:root {
  --font-size-xs: 12px;
  --font-size-s: 14px;
  --font-size-m: 20px;
  --font-size-l: 36px;

  --color-primary: black;
  --color-secondary: #979797;
  --color-link: #0046FF;

  --gap-xs: 10px;
  --gap-s: 20px;
  --gap-m: 40px;
  --gap-l: 80px;
  --gap-xl: 160px;
}

@font-face {
  font-family: 'Neue Machina';
  src: url(../font/NeueMachina-Light.otf);
}

* {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Neue Machina';
  font-size: var(--font-size-s);
  line-height: 1.3;
  background: linear-gradient(180deg, rgba(238, 255, 0, 0.977) 0%, rgba(255, 255, 255, 0) 40%);
}

main {
  flex: 1;
  margin: 0 auto;
  max-width: 1600px;
  padding: 0 10px;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  font-size: var(--font-size-m);
  display: flex;
  margin: 0;
  padding: var(--gap-s) 0;
}

header a {
  color: var(--color-primary);
}

h1 {
  font-size: var(--font-size-l);
  margin: var(--gap-xl) 0;
}

h2 {
  font-size: var(--font-size-m);
  color: var(--color-secondary);
}

h3 {
  font-size: var(--font-size-m);
  padding-top: var(--gap-s);
  padding-bottom: var(--gap-m);
}

.text {
  font-size: var(--font-size-s);
  padding-bottom: var(--gap-l);
  padding-right: var(--gap-xs);
}

.project-content h3 {
  display: flex;
  align-items: center;
}

.project-content .text {
  padding-bottom: var(--gap-m);
}

.project-content .text strong {
  color: var(--color-secondary);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--color-link);
}

.logo {
  flex: 0 0 40%;
  max-width: 600px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: var(--gap-xs);
}

.nav-sep {
  pointer-events: none;
  user-select: none;
}

.hamburger {
  display: none;
}

.footer {
  width: 100%;
  overflow: hidden;
  padding: var(--gap-m) 0;
}

.loop_wrap {

  display: flex;
  overflow: hidden;
 
}

.loop_wrap div {
  flex: 0 0 auto;
  white-space: nowrap;
}

.loop_wrap div::after {
  content: "·";
  padding: 0 var(--gap-l);
  color: var(--color-link);
}

.loop_wrap div:nth-child(odd) {
  animation: loop1 10s -5s linear infinite;
}

.loop_wrap div:nth-child(even) {
  animation: loop2 10s linear infinite;
}

.grid-container {
  display: grid;
  grid-template-columns: 35% 25% 25% 15%;
  color: var(--color-primary);
}

.grid-container__header {
  color: var(--color-secondary);
}

.grid-item {
  border-bottom: 1px solid var(--color-secondary);
  font-size: var(--font-size-s);
  padding: var(--gap-xs) 0;
}

.home-table {
  margin: var(--gap-xl) 0;
}

.image {
  background-color: var(--color-secondary);
  border-radius: 12px;
  margin: var(--gap-l) 0;
}

.project-conteiner {
  display: flex;
  margin-top: var(--gap-l);
  gap: var(--gap-s);
}

.project-content {
  flex: 0 0 40%;
  max-width: 600px;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

.project-img {
  flex: 1;
  min-width: 0;
}

.project-img > * {
  margin-bottom: 24px;
}

.project-img > :last-child {
  margin-bottom: 0;
}

.project-img img {
  display: block;
  cursor: pointer;
  width: 100%;
}

.img-full {
  width: 100%;
}

.img-conteiner {
  display: flex;
  gap: 16px;
  height: 450px;
}

.img-half {
  width: 50%;
  height: 100%;
  object-fit: cover;
}

.project-img-wrapper {
  position: relative;
  display: block;
  line-height: 0;
}

.project-img-wrapper::after {
  content: "🔍";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #000;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.project-img-wrapper:hover::after {
  opacity: 1;
}

.info-conteiner {
  display: flex;
  margin-top: var(--gap-l);
  gap: var(--gap-s);
}

.info-section {
  margin-bottom: var(--gap-m);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-secondary);
  border-radius: 12px;
  padding: 0 10px;
  height: 22px;
  font-size: var(--font-size-xs);
  color: var(--color-secondary);
  margin-left: var(--gap-s);
  line-height: 1;
  box-sizing: border-box;
}

.info-section h3 {
  font-size: 24px;
  margin: 0;
  padding: 0;
  font-weight: normal;
}

.info-text {
  flex: 0 0 40%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
}

.info-text .info-section:nth-last-child(-n+2) {
  margin-bottom: 0;
}

.info-photo {
  flex: 1;
  min-width: 0;
}

.info-photo img {
  display: block;
  width: 100%;
}

@media (max-width: 800px) {
  .info-conteiner {
    flex-direction: column;
  }

  .info-text {
    flex: none;
    max-width: none;
    position: static;
    top: auto;
  }

  .info-photo {
    flex: none;
    width: 100%;
    order: -1;
  }
}

.info-section h2 {
  margin-bottom: var(--gap-s);
}

.info-section .text {
  padding: 0;
}

.info-text .info-section {
  padding: 0 0 30px;
  margin: 0;
}

.services-grid {
  display: flex;
  gap: var(--gap-l);
}

.services-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.services-grid li {
  margin-bottom: var(--gap-xs);
}

.title-conteiner {
  display: flex;
  justify-content: space-between;
}

.arrow {
  padding: 3px var(--gap-xs);
}
.arrow a:first-of-type{
  margin-right: var(--gap-s);
}


/* Home image display */

.image-wrapper {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.image-wrapper.visible {
  visibility: visible;
  opacity: 1;
}

.image-wrapper video {
  width: auto;
  height: 350px;
}

img.show {
  display: block;
}

@keyframes loop1 {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

@keyframes loop2 {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-200%);
  }
}



/* media query */

@media screen and (max-width: 800px) {
  :root {
    --font-size-l: 24px;
    --gap-xl: 80px;
    --gap-l: 40px;
  }

  header {
    align-items: center;
    font-size: var(--font-size-m);
  }

  .logo {
    flex: 1;
    max-width: none;
  }

  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
    font-size: 24px;
    width: 36px;
    height: 36px;
  }

  .hamburger .icon {
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
  }

  .hamburger .icon-burger {
    opacity: 1;
    transform: scale(1);
  }

  .hamburger .icon-close {
    opacity: 0;
    transform: scale(0);
  }

  header.menu-open .hamburger .icon-burger {
    opacity: 0;
    transform: scale(0);
  }

  header.menu-open .hamburger .icon-close {
    opacity: 1;
    transform: scale(1);
  }

  nav {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap-s);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    z-index: 150;
    font-size: 24px;
  }

  .nav-sep {
    display: none;
  }

  header.menu-open nav {
    opacity: 1;
    pointer-events: auto;
  }

  .project-conteiner {
    flex-direction: column;
    margin-top: var(--gap-m);
  }

  .project-content {
    flex: none;
    max-width: none;
    position: static;
  }

  .project-img {
    flex: none;
  }

  .img-conteiner {
    flex-direction: column;
    gap: 24px;
    height: auto;
  }

  .img-half {
    width: 100%;
    height: auto;
  }

  .image-wrapper {
    display: none;
  }

  .lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .lightbox-content {
    padding: 0;
    width: 100%;
    height: 100vh;
    justify-content: center;
  }

  .lightbox-content img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
  }

  .lightbox-content img + img {
    margin-top: 0;
  }
}

/* Lightbox */
.lightbox {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.75);
  z-index: 1000;
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: fixed;
  top: calc(var(--gap-s) + 4px);
  right: calc(10px + 4px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #000;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
}

.lightbox-content img {
  max-width: 96%;
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-content img + img {
  margin-top: 2rem;
}

@media (max-width: 425px) {
  .grid-container {
    grid-template-columns: 2fr 2fr 1fr;
  }

  .grid-item:nth-child(4) {
    display: none;
  }
}

