/* ==========================================================================
   INTERACTIONS
   Hover effects, open/closed states and the starting states of animations.
   The JavaScript in /js only adds or removes classes; the looks live here.
   ========================================================================== */

/* ---------- Page preloader (js/preloader.js) ---------- */

/* Visible from the very first paint, so the page never flashes before the intro */
.wrapper-transition {
  display: block;
  pointer-events: all;
  touch-action: none;
}

/* ---------- Navbar (js/navigation.js) ---------- */

/* Slides up out of view while scrolling down, comes back when scrolling up */
[data-hide-on-scroll] {
  transition:
    transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    visibility 0s;
}
[data-hide-on-scroll].is-hidden {
  transform: translateY(-120px);
  visibility: hidden;
  transition:
    transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    visibility 0s linear 0.4s;
}

/* Mobile menu drop-down animation */
@keyframes menu-open {
  from {
    transform: translateY(-100%);
    clip-path: inset(100% 0 0 0);
  }
  to {
    transform: none;
    clip-path: inset(0);
  }
}
@keyframes menu-close {
  from {
    transform: none;
    clip-path: inset(0);
  }
  to {
    transform: translateY(-100%);
    clip-path: inset(100% 0 0 0);
  }
}
@media (max-width: 991px) {
  /* the open menu is positioned against the whole navbar bar ([data-nav]) */
  [data-nav] .navbar-wrapper-three-4 {
    position: static;
  }
  [data-menu-open] {
    animation: menu-open 0.4s ease;
  }
  [data-menu-open].is-closing {
    animation: menu-close 0.4s ease forwards;
  }
}

/* ---------- Contact panel & WhatsApp popup (js/popups.js) ---------- */

.conntact-wrap.is-visible,
.whatsapp-wrapper.is-visible {
  display: flex;
}

/* Contact: panel slides in from the right, backdrop fades in */
.conntact-wrap .contact-modal {
  transform: translateX(100vw);
  transition: transform 0.15s ease;
}
.conntact-wrap .contact-backdrop {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.conntact-wrap .button-close-formular {
  transform: scale(0);
  transition: transform 0.15s ease;
}
.conntact-wrap.is-open .contact-modal,
.conntact-wrap.is-open .button-close-formular {
  transform: none;
  transition-duration: 0.3s;
}
.conntact-wrap.is-open .contact-backdrop {
  opacity: 1;
  transition: opacity 0.3s ease 0.1s;
}

/* WhatsApp: dark backdrop fades in */
.whatsapp-wrapper .blackdrop {
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.15s ease-out;
}
.whatsapp-wrapper.is-open .blackdrop {
  background-color: rgba(0, 0, 0, 0.6);
}

/* Service details modals on the home page (<dialog>) */
.modal_dialog::backdrop {
  opacity: 0;
}

/* Page can't scroll while a popup is open */
html.no-scroll,
html.no-scroll body {
  overflow: hidden;
}

/* ---------- Hover effects ---------- */

/* Project cards: "View project" overlay */
.project-preview-view-project {
  display: flex;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.3s ease-out,
    visibility 0s linear 0.3s;
}
.project-preview-image:hover .project-preview-view-project {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 0.3s ease-in,
    visibility 0s;
}

/* "Next project" banner: background zooms out and a white line grows */
.project_page_next_bk {
  transform: scale(1.2);
  transition: transform 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.horizontal_white_line_16 {
  width: 0%;
  transition: width 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.project_page-next:hover .project_page_next_bk {
  transform: scale(1);
}
.project_page-next:hover .horizontal_white_line_16 {
  width: 100%;
}

/* Case-study image rows: image zooms in a little on hover */
.images_row_image {
  transition: transform 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}
.images_row_wrap:hover .images_row_image {
  transform: scale(1.1);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ---------- Scroll states (js/animations.js adds .is-active) ---------- */

/* Home: the service row in the middle of the screen gets its photo + "Click on me" label */
.service-section .click-me-label,
.service-section .service-home-bg {
  opacity: 0;
}
.service-section .heading-style-h4.text-color-red {
  color: rgb(252, 65, 20);
}
.service-section.is-active .click-me-label,
.service-section.is-active .service-home-bg {
  opacity: 1;
}
.service-section.is-active .heading-style-h4.text-color-red {
  color: #fff;
}

/* Services page: background photo fades in for the card in the middle of the screen */
.service-outside .bk-service-page {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}
.service-outside.is-active .bk-service-page {
  opacity: 1;
  transition-timing-function: ease-out;
}

/* Home "Some of our work": background colour follows the project in view */
.projects-preview {
  transition: background-color 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ---------- Packages accordion (js/animations.js) ---------- */

.pachet {
  cursor: pointer;
  transform-style: preserve-3d;
  background-color: rgb(16, 20, 26);
  transition:
    transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
    background-color 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.pachet.is-open {
  transform: rotateX(20deg);
  background-color: rgb(22, 28, 36);
}
.pachet-descriere {
  display: none;
}
.pachet.is-open ~ .pachet-descriere {
  display: flex;
}

/* ---------- Animation starting states ----------
   Hidden only until js/animations.js has prepared them (it then adds .anim-ready to <html>).
   Without JavaScript everything is simply visible. */

html.js:not(.anim-ready)
  :is(
    [data-reveal],
    [data-anim="load-slide-up"],
    [data-anim="intro-title"],
    [data-anim="intro-text"],
    [data-anim="hero-zoom"],
    [data-anim="marquee"],
    [data-anim-group="headline"] [data-anim="headline-title"],
    [data-anim-group="headline"] [data-anim="headline-buttons"],
    [data-anim-group="packages"] [data-anim="packages-card"],
    [data-anim-group="words-fade"] [data-anim="words-fade"],
    [data-anim-group="slide-up"] [data-anim="slide-up"],
    [data-anim-group="slide-up"] [data-anim="slide-up-stagger"],
    [data-anim-group="big-title"] [data-anim="big-title"],
    [data-anim-group="project"] [data-anim^="project-"]
  ) {
  visibility: hidden;
}

/* "Move your mouse" hint over the 3D hero (animated on desktop only) */
@media (min-width: 992px) {
  html.js .hint-div {
    opacity: 0;
  }
}

/* Click-to-copy e-mail marquee */
[data-copy] {
  cursor: pointer;
}
