@import "./reset.css";
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-bg-color: #f7fbfd;
  --primary-accent: #0c1618;
  --secondary-accent: #6f1d1b;

  --main-text-color: #0c1618;
  --supportive-text-color: #242d2f;
  --gray-text-color: #565a5b;

  --white-color: #fff;
  --gray-color: #e9e8e8;
  --gray-color-2: #c0c0c0;
  --gray-color-3: #e6e6e6;

  --color-preloader-bg: var(--white-color);
  --color-dots: #1a1a1a;
}

/* Common styles */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  color: var(--main-text-color);
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.15px;
}

.container {
  padding: 0 32px;
  max-width: 1200px;
  /* max-width: clamp(54.5rem, 38.125rem + 81.88vw, 120rem); */
  margin: 0 auto;
}

.container-lg {
  max-width: 1600px;
}

.title {
  font-size: 44px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 54px;
}

.btn {
  display: inline-block;
  height: 52px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  line-height: 52px;
  padding: 0 36px;
  margin: 30px 12px 16px 0;
  color: var(--white-color);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s;
  background-color: var(--primary-accent);
  border: 2px solid var(--primary-accent);
  transition: all 0.3s ease-in;
}

.btn:hover,
.btn:focus {
  background-color: var(--secondary-accent);
  border-color: var(--secondary-accent);
  color: var(--white-color);
  outline: 0;
}

.btn:active {
  background-color: #8b4a48;
}

.btn-white {
  background: transparent;
  font-weight: 700;
  border: 2px solid var(--primary-accent);
  color: var(--primary-accent);
  transition: all 0.3s ease-in;
}

.btn-white:hover,
.btn-white:focus {
  background: var(--primary-accent);
  border: 2px solid var(--primary-accent);
  color: var(--white-color);
}

.btn-white:active {
  background-color: #3c4446;
}

.btn-red {
  background: var(--secondary-accent);
  border: 2px solid var(--secondary-accent);
  color: var(--white-color);
  transition: all 0.3s ease-in;
}

.btn-red:hover,
.btn-red:focus {
  background: var(--primary-accent);
  border: 2px solid var(--primary-accent);
}

.btn-red:active {
  background-color: #3c4446;
}

h5 {
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 23px;
  font-weight: 600;
  text-transform: uppercase;
}

.white {
  color: var(--white-color);
}

/* Header */
.header {
  z-index: 100;
  background-color: transparent;
  height: 90px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  height: 90px;
}

.nav {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1999;
  background-color: rgba(255, 255, 255, 0.95);
  padding-top: 0;
  padding-bottom: 0;
  transition: all 0.3s ease-in-out;
}

.logo {
  position: relative;
  line-height: 1;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.011rem + 0.57vw, 1.375rem);
  color: var(--main-text-color);
}

.nav-list {
  display: flex;
  column-gap: 46px;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.15px;
}

.nav-btn {
  display: none;
}

.nav-link {
  color: var(--main-text-color);
}

.nav-link.active {
  text-decoration: underline;
  text-decoration-color: var(--secondary-accent);
  text-decoration-thickness: 1.2px;
  text-underline-offset: 7px;
}

/* Hero section */
.hero {
  position: relative;
  padding-top: 80px;
  padding-bottom: 120px;
  background-color: var(--primary-bg-color);
  overflow: visible;
  min-height: 600px;
}

.hero-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 60px;
  position: relative;
  padding-left: 450px;
  min-height: 500px;
}

.hero .container {
  padding-left: 0;
  padding-right: 32px;
}

.hero-content {
  text-align: left;
  align-self: center;
  padding: 20px;
  flex: 1;
  z-index: 2;
}

.hero-greeting {
  font-size: clamp(1rem, 0.929rem + 0.36vw, 1.25rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--secondary-accent);
}

.hero-heading {
  margin: 5px 0;
  font-weight: 500;
  font-size: clamp(2rem, 1.75rem + 1.25vw, 2.5rem);
  line-height: 1.2;
}

.hero-heading-subtitle {
  font-size: clamp(1.125rem, 1.054rem + 0.36vw, 1.375rem);
  font-weight: 400;
}

.hero-img {
  position: absolute;
  left: 0;
  top: -100px;
  height: calc(100% + 200px);
  width: 400px;
  z-index: 1;
}

.hero-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-scroll-arrow {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: wavy-bounce 2s ease-in-out infinite;
  cursor: pointer;
  z-index: 3;
}

.hero-scroll-arrow svg {
  width: 40px;
  height: 40px;
  stroke: var(--primary-accent);
  fill: none;
  stroke-width: 2;
}

@keyframes wavy-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }
  25% {
    transform: translateX(-50%) translateY(-10px) rotate(-5deg);
  }
  50% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }
  75% {
    transform: translateX(-50%) translateY(-10px) rotate(5deg);
  }
}

.about-social-list {
  display: flex;
}

.social-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 20px;
  margin: 40px 0 40px;
  height: 24px;

  img {
    height: 24px;
    width: 24px;
  }
}

.social-links-row a {
  filter: invert(35%) sepia(11%) saturate(160%) hue-rotate(145deg)
    brightness(88%) contrast(80%);
  transition: all 0.3s ease-in-out;
}

.social-links-row a:hover {
  filter: invert(0%) sepia(0%) saturate(7500%) hue-rotate(305deg)
    brightness(97%) contrast(103%);
}

/* About section */
.about {
  padding: 7rem 0;
}

.about-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  justify-content: center;
  gap: 90px;
  margin-bottom: 80px;
  color: var(--supportive-text-color);
}

.about-descr {
  font-size: clamp(1rem, 0.964rem + 0.18vw, 1.125rem);
  line-height: 1.7;
  font-weight: 400;
  margin-bottom: 10px;
}

/* Service intro section */
.service-intro {
  text-align: center;
  margin-bottom: 60px;
}

.service-intro-text {
  font-size: clamp(1.125rem, 1.089rem + 0.18vw, 1.25rem);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
  color: var(--supportive-text-color);
}

.services-content {
  max-width: 900px;
  margin: 0 auto;
}

.services-content h3 {
  font-size: clamp(1.25rem, 1.179rem + 0.36vw, 1.5rem);
  font-weight: 600;
  font-style: italic;
  margin-top: 2.5rem;
  /* margin-bottom: 1.25rem; */
  color: var(--text-color);
}

.services-content h3:first-child {
  margin-top: 0;
}

.services-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--supportive-text-color);
}

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

/* How It Works Section */
.how-it-works {
  padding: 7rem 0;
  background-color: var(--white-color);
}

.how-it-works-content {
  max-width: 900px;
  margin: 0 auto;
}

.how-it-works-content h3 {
  font-size: clamp(1.25rem, 1.179rem + 0.36vw, 1.5rem);
  font-weight: 600;
  font-style: italic;
  margin-top: 2.5rem;
  /* margin-bottom: 1.25rem; */
  color: var(--text-color);
}

.how-it-works-content h3:first-child {
  margin-top: 0;
}

.how-it-works-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--supportive-text-color);
}

.how-it-works-content p:last-child {
  margin-bottom: 0;
}

/* Practicalities Section */
.practicalities {
  padding: 7rem 0;
  background-color: var(--primary-bg-color);
}

.practicalities-box {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  border: 2px solid var(--gray-color-2);
  background-color: #fefbf3;
  border-radius: 8px;
}

.practicalities-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.practicalities-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.practicalities-col p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 15px;
  color: var(--supportive-text-color);
}

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

/* About Me Section */
.about-me {
  padding: 7rem 0;
  background-color: var(--white-color);
}

.about-me-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.about-me-img img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.about-me-content {
  color: var(--supportive-text-color);
}

.about-me-intro {
  font-size: clamp(1.125rem, 1.089rem + 0.18vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: 30px;
  font-weight: 500;
}

.about-me-subheading {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  margin-top: 30px;
}

.about-me-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  max-width: 700px;
}

.about-me-content p:last-child {
  margin-bottom: 0;
}

/* Works */
.projects {
  padding: 7rem 0;
  background-color: var(--primary-bg-color);
}

.projects-title {
  text-align: center;
}

.projects-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.project-box {
  position: relative;
  overflow: hidden;
  display: block;
  max-width: 510px;
}

.project-box a {
  display: block;
  position: relative;
}

.project-img {
  transform: scale(1);
  width: 100%;
  transition: all 2s cubic-bezier(0.23, 1, 0.32, 1) 0s;
}

.project-img.rotate-ccw {
  transform: rotate(-90deg);
  transform-origin: center;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 22, 24, 0) 0%, rgba(12, 22, 24, 0.8) 70%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}

.project-box:hover .project-overlay {
  opacity: 1;
  visibility: visible;
}

.project-caption {
  color: var(--white-color);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  text-align: left;
  width: 100%;
}

.project-box:hover .project-img.rotate-ccw {
  transform: rotate(-90deg);
}

/* Contact */
.contact {
  padding: 7rem 0;
  text-align: center;
}

.contact-content {
  font-size: clamp(1rem, 0.964rem + 0.18vw, 1.125rem);
  color: var(--supportive-text-color);
  margin: 0 auto 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 600px;
  margin: 50px auto;
  align-items: center;
  padding: 40px;
  background-color: var(--primary-bg-color);
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.contact-link {
  font-size: 1.25rem;
  color: var(--primary-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--secondary-accent);
}

.contact form {
  max-width: 500px;
  margin: 20px auto;
  text-align: center;
}

.contact form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
  width: 100%;
  padding: 15px;
  font-size: 15px;
  color: var(--gray-text-color);
  border: 1px solid var(--gray-color-2);
  margin: 7px 0;
}

.contact form .input-box input {
  width: 100%;
}

.contact form textarea {
  resize: none;
}

.contact-button {
  margin-top: 20px;
}

/* Footer */
.footer {
  background-color: var(--primary-accent);
  color: var(--gray-color-3);
}

.footer-row {
  display: flex;
  flex-direction: column;
  column-gap: 20px;
  align-items: center;
  padding: 40px 0;
}

.footer-social {
  margin-top: 0;
}

.footer-social a:hover {
  filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg)
    brightness(102%) contrast(102%);
}

.footer-copyright {
  font-size: clamp(0.75rem, 0.679rem + 0.36vw, 1rem);
}

.response {
  position: fixed;
  display: inline-block;
  background-color: var(--primary-accent);
  color: var(--white-color);
  border: 1px solid var(--white-color);
  min-width: 280px;
  padding: 20px 40px;
  bottom: -100px;
  left: 50%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
  z-index: 5;
}

.response.open {
  bottom: 20px;
  opacity: 1;
  visibility: visible;
}

/* "go to top" button */
.goToTop {
  z-index: 599;
  position: fixed;
  width: 40px;
  height: 40px;
  background-color: var(--gray-color);
  top: auto;
  left: auto;
  right: 30px;
  bottom: 30px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  border-radius: 2px;
  transition: opacity 350ms, visibility 350ms;
}

.goToTop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  filter: invert(4%) sepia(23%) saturate(2306%) hue-rotate(148deg)
    brightness(91%) contrast(90%);
}

.goToTop img {
  height: 16px;
  width: 16px;
}

.goToTop:hover {
  filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg)
    brightness(102%) contrast(102%);
}

.goToTop.reveal {
  display: block;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s;
}

/* Preloader with jumping dots */
#preloader {
  position: fixed;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  background: var(--color-preloader-bg);
  z-index: 3000;
  height: 100vh;
  width: 100vw;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.5s ease-out;
}

.jumping-dots {
  position: relative;
  width: 6px;
  height: 6px;
  padding: 0;
  display: inline-block;
}

.jumping-dots > div {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--color-dots);
  border-radius: 50%;
}

.jumping-dots > div:nth-of-type(1) {
  left: 20px;
}

.jumping-dots > div:nth-of-type(3) {
  left: -20px;
}

.jumping-dots > div {
  animation: jumping-dots 1.2s infinite ease;
  animation-delay: 0.2s;
}

.jumping-dots > div:nth-of-type(1) {
  animation-delay: 0.4s;
}

.jumping-dots > div:nth-of-type(3) {
  animation-delay: 0s;
}

@keyframes jumping-dots {
  0% {
    top: 0;
  }

  40% {
    top: -6px;
  }

  80% {
    top: 0;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 50px;
  font-weight: 300;
  transition: 0.3s;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
}
