@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&display=swap');

:root {
  --aqua: #75a9bd;
  --stone: #a7a198;
  --nav-bg: #0808083d;
  --raven: #242426;
  --cave: #030303;
  --vampire: #080808;
  --moss: #0e0f0f;

  --letter_space: 0.1em;
  --spacer: 2em;
  --spacer-short: 1em;
}


*, ::after, ::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  line-height: 1.7;
  letter-spacing: var(--letter_space);
  /* text-align: left; */
  font-family: "HelveticaNeueCyr";
  color: lightgrey;
  background-color: var(--vampire);
  min-height: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

img {
  width: 100%;
  display: block;
  object-fit: cover;
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);

}

/* ------ TYPOGRAPHY ------ */

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.2;
}

h1 {
  font-size: 2.2rem;
  color: var(--aqua);
}

h2 {
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--aqua);
}

h3 {
  font-size: 1.4rem; 
}

h4 {
  font-size: 1.35rem;
}

h5 {
  font-size: 1.25rem;
}

p {
  font-size: 0.95rem;
}

a {
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

i {
  background-color: transparent;
  color: lightgrey;
}

/* ------ TEXT REVEAL FADE-IN EFFECTS ------ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: transform 2s ease, opacity 2s ease;
}

.fade-in.reveal {
  opacity: 1;
  transform: translateY(0px);
}

/* ------ BUTTONS ------ */

.cta-btn {
  padding: 1em 0.8em;
  color: var(--aqua);
  display: inline-block;
  background: var(--aqua);
  color: white;
  cursor: pointer;
  position: relative;
  transition: 0.4s;
}
.cta-btn:hover {
  background: transparent;
  color: var(--aqua);
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0px;
  height: 0px;
  border-top: 3px solid var(--aqua);
  border-left: 3px solid var(--aqua);
  transition: 0.4s ease-in-out;
}

.cta-btn:hover::before {
  height: 100%;
  width: 100%;
}

.cta-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0px;
  height: 0px;
  border-bottom: 3px solid var(--aqua);
  border-right: 3px solid var(--aqua);
  transition: 0.4s ease-in-out;
}

.cta-btn:hover::after {
  height: 100%;
  width: 100%;
}

/* ------ LAYOUT ------ */

nav,
header,
section,
footer {
  position: relative;
  max-width: 2600px;
  width: 100%;
  margin: 0 auto;
}

.container-md {
  width: 85%;
  margin: 0 auto;
  padding: 4em 0;
  position: relative;
}

/* ------ NAVIGATION ------ */

nav {
  position: fixed;
  z-index: 99;
  top: 0;
  right: 0;
  left: 0;
  background-color: var(--nav-bg);
  transition: all 0.5s ease;
}

.nav-container {
  min-height: 2em;
  width: 85%;
  margin: 0 auto;
}

.navbar {
  display: flex;
  align-items: center;
  vertical-align: middle;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.nav-menu ul {
  position: absolute;
  background-color: var(--vampire);
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 100%;
  bottom: 0;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  padding: 4em;
  z-index: 1;
  overflow-x: hidden;
  transition: 0.5s ease left;
  text-align: right;
}

.nav-menu ul.active {
  left: 0;
}

.nav-menu ul a {
  font-size: 1.2rem;
  display: block;
  padding: 1em;
  font-weight: 600;
  color: var(--aqua);
  transition: 0.5s ease-in-out color;
}

.nav-menu ul a::after {
  content: attr(data-after);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: var(--cave);
  font-size: 8rem;
  letter-spacing: 0.08em;
  z-index: -1;
  transition: 0.5s ease letter-spacing;
}

.nav-menu ul li:hover a::after {
  transform: translate(-50%, -50%) scale(1);
  letter-spacing: initial; 
}

.nav-menu ul li {
  transition: 0.3s ease color;
}

.nav-menu ul li:hover a {
  color: lightgrey;
}

.hamburger {
  height: 40px;
  width: 40px;
  display: inline-block;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
}

.hamburger .bar {
  height: 2px;
  width: 30px;
  position: relative;
  background-color: var(--aqua);
  z-index: -1;
}

.hamburger .bar::before,
.hamburger .bar::after {
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  background-color: var(--aqua);
  transition: 0.3s ease;
  transition-property: top, bottom;
}

.hamburger .bar::before {
  bottom: 8px;
}

.hamburger .bar::after {
  top: 8px;
}

.hamburger.active .bar::before {
  bottom: 0;
}

.hamburger.active .bar::after {
  top: 0;
}

.sticky {
  top: 0;
  left: 0;
  right: 0;
  border-radius: 0;
  background-color: transparent;
}

.sticky img {
  visibility: hidden;
}

/* ------ HERO SECTION ------ */

.hero {
  min-height: 100vh;
  background-image: url(../images/silverbackherobg.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: -1;
}

.hero::before {
  position: absolute;
  content: '';
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to top left, #000000, transparent);
}

/* ------ ABOUT SECTION ------ */

.about-section .container-md {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacer);
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacer-short);
  min-width: 20ch;
}

.about-content-top {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.about-content-top > .about-text {
  flex: 1 1 20%;
  margin-right: -70px;
}

.about-content-top > .about-img {
  background: url(../svg/dust.svg) no-repeat center / cover;
  width: 70%;
  height: 420px;
  z-index: -1;
  filter: brightness(40%);
  -webkit-filter: brightness(40%);
}

.about-content-bottom {
  display: flex;
  align-items: flex-end;
  gap: 5em;
}

.about-content-bottom > .about-text {
  flex: 1 1 40%;
}

.about-content-bottom > .about-img {
  background: url(../images/about.png) no-repeat center / cover;
  height: 350px;
  flex: 1 1 20%;
  margin-top: -70px;
} 


/* ------  SERVICE SECTION ------ */

.services .container-md {
  display: flex;
  flex-direction: column;
  gap: var(--spacer);
}

.service-wrapper {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacer);
  margin: 1em 0;
}

.service-item {
  width: calc(28% - 2em);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  align-self: normal;
  transition: 0.3s ease;
  text-align: center;
}

.service-item h4  {
  margin-bottom: 0.5em;
}

.service-item i {
  font-size: 3.5rem;
}

.service-action {
  display: grid;
  place-items: center;
  gap: var(--spacer-short);
  text-align: center;
}

.service-action .cta-btn {
  margin-top: 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ------ PORTFOLIO SECTION ------ */

.portfolio .container-md > * {
  margin-bottom: 2em;
}

.portfolio h5 {
  position: relative;
  color: var(--aqua);
}

.portfolio h5::before {
  content: '';
  position: absolute;
  background: var(--aqua);
  height: 3px;
  width: 10%;
  left: 0;
  bottom: -50%;
}

.telco-wrapper {
  padding: 1em 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacer);
  flex-wrap: wrap;
  margin-bottom: 2em;
}

.svg-icon {
  width: 20%;
}

.portfolio-item {
  min-width: 25ch;
  align-self: normal;
  padding: 1em 0;
  display: flex;
  gap: var(--spacer-short);  
}

.portfolio-item a {
  color: var(--aqua);
  padding-bottom: 0.5em;
  border-bottom: 1px solid transparent;
  transition: 0.3s ease;
}

.portfolio-item a:hover {
  color: var(--stone);
}

.telco-item-top {
  flex-direction: column;
  gap: var(--spacer);
  width: calc(34% - 2em);
}

.telco-item-bottom {
  flex-direction: row;
  gap: var(--spacer);
  width: calc(65% - 2em);
}

.telco-item-bottom > *:nth-child(1) {
  width: 15%;
}

.telco-item-bottom > *:nth-child(2) {
  width: 80%;
}

/* ------ FOOTER CONTACT SECTION ------ */

footer {
  background-color: var(--moss);
  background: url(/images/footerbg.jpg);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

footer .container-md {
  padding: 2em 0 1em;
  display: flex;
  flex-direction: column;
  gap: var(--spacer);
}

.footer-heading {
  position: relative;
  font-size: 1rem;
  text-align: left;
}

.footer-heading::after {
  position: absolute;
  content: '';
  background: var(--aqua) ;
  bottom: -10px;
  left: 0;
  height: 1px;
  width: 40%;
}

footer .company-info {
  margin: 0 0 7em;
  display: flex;
  flex-direction: column;
}

footer .company-info img {
  width: 200px;
}

footer .cta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

footer .contact-btn {
  margin-bottom: 1em;
}

footer .contact-btn a {
  color: var(--aqua);
  cursor: pointer;
  position: relative;
  padding: 1em 0.8em;
  transition: 0.4s;
}

footer .contact-btn:hover a {
  background-color: var(--aqua);
  color: white;
  transition-delay: 0.4s;
}

footer .contact-btn a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-top: 3px solid var(--aqua);
  border-left: 3px solid var(--aqua);
  transition: 0.4s;
}

footer .contact-btn:hover a::before {
  width: 100%;
  height: 100%;
}

footer .contact-btn a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-bottom: 3px solid var(--aqua);
  border-right: 3px solid var(--aqua);
  transition: 0.4s;
}

footer .contact-btn:hover a::after {
  width: 100%;
  height: 100%;
}

footer .cta .social-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  vertical-align: middle;
  gap: 0.5em;
}

footer .cta i {
  font-size: 1.5rem;
  transition: 0.3s ease;
}

footer .cta i:hover {
  color: var(--aqua);
}

.copyright {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2em 0;
  position: relative;
  font-size: 0.7rem;
}

.copyright::before {
  position: absolute;
  content: '';
  background: var(--aqua);
  height: 1px;
  top: 0;
  left: 0;
  right: 0;
  width: 85%;
  margin: 0 auto;
}

/* ------  CONTACT PAGE ------ */

header.contact-page {
  background-image: linear-gradient(
  180deg,
  hsl(240deg 98% 82%) 0%,
  hsl(209deg 69% 67%) 42%,
  hsl(197deg 35% 60%) 99%
  );
  height: 220px;
}

.contact-page .visibility-hidden {
  visibility: hidden;
}

.contact {
  display: grid;
  place-items: center;
  background-color: var(--cave);
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  margin-top: -6.25em;
  position: relative;
}

.form-header {
  padding: 1em 2em 2em;
  background-color: var(--moss);
  border-radius: 0.2em;
}

.form-header img {
  width: 220px;
}

.form-header h1 {
  margin-bottom: 0.5em;
  font-size: 1.8rem;
}

.contact-form {
  padding: 2em;
  background-color:transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  text-align: center;
  gap: 0.8em;
}

.form-close {
  position: absolute;
  right: -1.2em;
  top: -0.5em;
  color: var(--cave);
  font-size: 2rem;
  cursor: pointer;
}

.fill-note {
  color: #585858;
  font-size: 0.9rem;
  font-style: italic;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  outline: none;
  border: none;
  border-radius: 0.2em;
  resize: none;
  padding: 1em;
  font-family: inherit;
  border: 2px solid var(--stone);
  background-color: var(--moss);
  font-size: 1.1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  font-style: italic;
}

input[type="text"]:focus,
textarea:focus {  
  border: 2px solid var(--aqua);
  color: white;
}

textarea::-webkit-scrollbar {
  width: 4px;
}

textarea::-webkit-scrollbar-thumb {
  cursor: pointer;
  background-color: var(--aqua);
}

.submit-btn {
  width: 30%;
  margin: 0 auto;
  letter-spacing: var(--letter_space);
  padding: 1em 0;
  cursor: pointer;
  transition: 0.3s ease;
  border: none;
  border-radius: 0.2em;
  background: linear-gradient(
    180deg,
    hsl(240deg 98% 82%) 0%,
    hsl(209deg 69% 67%) 42%,
    hsl(197deg 35% 60%) 99%
    );
  color: var(--cave);
  font-weight: 600;
}

/* Media query for mobile */
@media (max-width: 850px) {

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.4rem;
    letter-spacing: 0.25em;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.2rem;
  }
  h5 {
    font-size: 1.15rem;
  }

  p {
    font-size: 0.9rem;
  }

  /* End of Typography */

  .about-text {
    margin-bottom: 2em;
  }

  .about-content-top,
  .about-content-bottom {
    display: block;
  }

  .about-content-top > .about-text {
    margin-right: 0;
  }

  .about-content-top > .about-img {   
    height: 350px;
    width: 100%;
  }

  .about-content-bottom > .about-img {
    margin-top: 0;
    height: 300px;
  }
  /* End of About Section */

  .service-item {
    width: 100%;
    text-align: center;
  }

  .service-action h2,
  .service-action h3 {
    font-size: 1.35rem;
  }

  .cta-btn {
    display: block;  
  }
  /* End of Services section */

  .portfolio h5::before {
    width: 30%;
  }

  .telco-wrapper {
    justify-content: center;
  }

  .telco-item-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
  }

  .telco-item-bottom {
    width: 100%;
    justify-content: space-between;
  }

  .telco-item-top > *:nth-child(1),
  .telco-item-bottom > *:nth-child(1)  {
    width: 15%;
  }

  .telco-item-top > *:nth-child(2),
  .telco-item-bottom > *:nth-child(2) {
    width: 80%;
  }
  /* End of Portfolio section */

  .footer-heading {
    font-size: 0.9rem;
  }

  .footer-heading::after {
    width: 100%;
  }

  footer .cta i {
    font-size: 1.2rem;
  }
  /* End of Footer section */

  .form-header {
    border-radius: 0;
  }

  .form-container {
    max-width: 400px;
    margin: 0 auto;
    margin-top: -8em;
  }

  .contact-form input,
  .contact-form textarea {
  font-size: 0.9rem;
  }

  .form-close {
    right: 0.2em;
    top: 0;
    color: white;
  }
  /* End of Contact Page */
}

