@font-face {
  font-family: 'Doulos';
  font-style: normal;
  font-weight: 500;
  src: url(/fonts/DoulosSIL/DoulosSIL-Regular.woff2) format('woff2');
}

@font-face {
  font-family: 'Questrial';
  font-style: normal;
  font-weight: 500;
  src: url(/fonts/Questrial/Questrial-Regular.ttf) format('ttf');
}

:root {
  --title-font: "Doulos";
  --text-font: "Questrial";
  --primary-color: #f06f3e;
  --secondary-color: #f9b75f;
  --text-color: #313232;
  --light-text: #fcfdff;
  --background-color: #fcfdff;
  --footer-color: #f06f3e;

  --step--2: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8rem);
  --step--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
  --step-0: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
  --step-1: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
  --step-2: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
  --step-3: clamp(1.944rem, 1.771rem + 0.8651vw, 2.4414rem);
  --step-4: clamp(2.3328rem, 2.0827rem + 1.2504vw, 3.0518rem);
  --step-5: clamp(2.7994rem, 2.4462rem + 1.7658vw, 3.8147rem);

  /* --spacing-unit: 20px; */
  --space-s: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
  --space-m: clamp(1.6875rem, 1.6223rem + 0.3261vw, 1.875rem);
  --space-l: clamp(2.25rem, 2.163rem + 0.4348vw, 2.5rem);
  --space-xl: clamp(3.375rem, 3.2446rem + 0.6522vw, 3.75rem);
  --space-2xl: clamp(4.5rem, 4.3261rem + 0.8696vw, 5rem);
  --space-3xl: clamp(11.25rem, 10.8152rem + 2.1739vw, 12.5rem);

  /* One-up pairs */
  --space-s-m: clamp(1.125rem, 0.8641rem + 1.3043vw, 1.875rem);
  --space-m-l: clamp(1.6875rem, 1.4049rem + 1.413vw, 2.5rem);
  --space-l-xl: clamp(2.25rem, 1.7283rem + 2.6087vw, 3.75rem);
  --space-xl-2xl: clamp(3.375rem, 2.8098rem + 2.8261vw, 5rem);
  --space-2xl-3xl: clamp(4.5rem, 1.7174rem + 13.913vw, 12.5rem);

  /* Custom pairs */
  --space-s-l: clamp(1.125rem, 0.6467rem + 2.3913vw, 2.5rem);
}

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

body {
  display: block;
  margin: 0;
  font-family: var(--text-font);
  line-height: 1.4;
  color: var(--text-color);
  background: var(--background-color);
}

h1,
h2,
h3,
h4 {
  font-family: var(--title-font);
  font-weight: 300;
  margin-bottom: var(--space-l);
  letter-spacing: -0.08ch;
}

/* Typography */
h1 {
  font-size: var(--step-5);
  /* font-weight: bold; */
  /* letter-spacing: -0.02em; */
}

h2 {
  font-size: var(--step-4);
}

h3 {
  font-size: var(--step-3);
}

h4 {
  font-size: var(--step-2);
}

p {
  font-size: var(--step-0);
  margin-bottom: var(--spacing-unit);
}

a {
  text-decoration: none;
}


button {
  background: var(--primary-color);
  color: var(--light-text);
  padding: calc(var(--space-s)/1.5) var(--space-xl);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: var(--step-0);
}

button:hover {
  background: var(--secondary-color);
}

button {
  flex: 1 0 40%;
  margin-top: var(--space-xl);
  background-color: var(--footer-color);
}

textarea {
  flex: 0 0 100%;
}

input,
textarea {
  width: 100%;
  padding: var(--space-s);
  background-color: rgba(250, 205, 188, 1);
  border: none;
  font-size: var(--step-0);
  font-family: var(--text-font);
}

/* Footer */
footer {
  background: var(--footer-color);
  color: var(--light-text);
  padding: var(--space-l);
  display: flex;
  justify-content: space-between;

  h3,
  p {
    margin: 0;
    padding: 0;
  }
}

.footer-info {
  display: flex;
  flex-direction: row;
  vertical-align: center;

  img {
    width: 75px;
    height: 75px;
    filter: contrast(0%) brightness(0) invert(100%);
  }

  .container {
    margin-left: 2ch;
    vertical-align: center;
  }
}

.footer-contact a {
  color: var(--light-text);
  text-decoration: none;
}

/* Header */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--background-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-s) var(--space-m);
  vertical-align: center;

  img {
    fill: var(--text-color);
  }

  a.menu {
    display: none;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-unit);
}

.logo-img {
  height: var(--space-xl);
  width: auto;
}

.logo-text {
  color: var(--primary-color);
}

.logo-text:hover {
  color: rgb(164, 192, 216);
}

.nav-menu {
  display: flex;
  gap: var(--space-m);
  list-style: none;
}

.nav-menu a {
  color: var(--text-color);
  text-decoration: none;
  /* font-size: 15px; */
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-color);
}


#welcome,
#intro,
#bio-pic,
#about,
#testimonials,
#diploma,
#journey-pic,
#journey,
#tools-pic,
#tools,
#grid,
#contact,
#fireside {
  padding: var(--space-l) 0;
  /* height: 85vh; */
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  transition: background 0.5s ease-in-out;
}

#bio-pic,
#testimonials,
#journey-pic,
#tools-pic,
#fireside {
  height: 85vh;
}

#welcome {
  height: 100vh;
  background-image: url("assets/paralax/paralax_1.avif");
}

#bio-pic {
  background-image: url("assets/paralax/paralax_2.avif");
}

#about {
  background-color: var(--background-color);
}

#testimonials {
  background-image: url("assets/paralax/paralax_3.avif");
  overflow: hidden;
}

#diploma {
  background-color: var(--primary-color);
}

#journey-pic {
  background-image: url("assets/paralax/paralax_4.avif");
}

#tools-pic {
  background-image: url("assets/paralax/paralax_5.avif");
}

#tools {
  text-align: center;
}

#fireside {
  background-image: url("assets/paralax/paralax_6.avif");
}

#welcome {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--light-text);

  h1,
  a {
    font-size: calc(var(--step-5)*1.5);
    text-shadow: 0px 0px 5px black;
    padding: var(--space-s);
    height: fit-content;
  }

  a {
    display: inline-box;
  }

  svg {
    width: var(--step-5);
    filter: drop-shadow(0px 0px 20px rgba(0, 0, 0, 1));
  }
}

#intro {
  padding: var(--space-xl);
  text-align: center;

  .intro-lines {
    max-width: 80%;
    position: relative;
    margin: auto;
    text-align: start;
    text-wrap: balance;
  }

  h3 {
    margin: var(--space-s) auto;
    text-align: start;
    text-wrap: balance;
  }

  h3:nth-child(2) {
    text-align: center;
  }

  h3:nth-child(3) {
    text-align: end;
  }

  span {
    font-size: var(--step-5);
    padding: 0 0.6ch;
  }

  span#pink {
    background: rgb(255, 0, 0);
    background: linear-gradient(0deg, rgba(255, 0, 0, 0) 16%, rgba(245, 179, 154, 1) 16%, rgba(245, 179, 154, 1) 40%, rgba(9, 255, 0, 0) 40%);
  }

  span#orange {
    background: rgb(255, 0, 0);
    background: linear-gradient(0deg, rgba(255, 0, 0, 0) 16%, rgba(249, 183, 95, 1) 16%, rgba(249, 183, 95, 1) 40%, rgba(9, 255, 0, 0) 40%);
  }

  span#pale {
    background: rgb(252, 219, 174);
    background: linear-gradient(0deg, rgba(252, 219, 174, 0) 16%, rgba(252, 219, 174, 1) 16%, rgba(252, 219, 174, 1) 40%, rgba(9, 9, 121, 0) 40%, rgba(2, 0, 36, 0) 100%);

  }

  button {
    margin-top: var(--space-xl);
  }
}

#diploma {

  h3 {
    justify-self: center;
  }
}

#journey {
  /* height: 185vh; */
  padding: var(--space-xl);
  text-align: center;

  p {
    width: 60%;
    margin: auto;
  }
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  color: var(--light-text);
  font-size: 40px;
  animation: bounce 2s infinite;
}

.section-content {
  padding: var(--space-m);
  display: flex;
  gap: var(--space-xl);
}

.section-title {
  flex: 1;
  text-align: center;
}

.section-text {
  flex: 1;
  display: box;
  text-align: left;

  p {
    margin-bottom: var(--space-s);
  }
}

.section-content {
  background-color: var(--background-color);
  padding: var(--space-xl);
  height: max-content;
}

.services-grid {
  display: grid;
  width: 80vw;
  margin: var(--space-m) auto 0 auto;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-m);
  /* margin-top: var(--space-m); */
}

.service-card {
  text-align: center;
  padding: var(--space-m);
  transition: transform 0.3s ease;

  p {
    width: 100%;
  }
}

.service-card img {
  border-radius: 500px;
}

.service-card:hover {
  transform: translateY(-5px);
}



/* Animations */
@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-30px);
  }

  60% {
    transform: translateY(-15px);
  }
}



/* Utility Classes */
.text-center {
  text-align: center;
}

#diploma {
  padding: var(--space-2xl) 0;

  h4 {
    text-align: center;
    margin: var(--space-l);
  }
}

.diploma-img {
  position: relative;
  width: 100%;
  height: 20vw;
  overflow: hidden;
  padding: 0 var(--space-s);
}

/* Both rows are stacked in the same space */
.row {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);

  img {
    width: var(--space-3xl);
    /* height: 20vw; */
  }
}

/* Row backgrounds for visibility */
.row-1 {
  -webkit-animation: fadeinout 16s linear forwards infinite;
  animation: fadeinout 16s linear forwards infinite;
  opacity: 0;
}

.row-2 {
  -webkit-animation: fadeinout 16s linear forwards infinite;
  animation: fadeinout 15s linear forwards infinite;
  animation-delay: 10s;
  opacity: 0;
}

@-webkit-keyframes fadeinout {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  50% {
    opacity: 1;
  }

  65% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

@keyframes fadeinout {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  50% {
    opacity: 1;
  }

  60% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

#testimonials {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl);
}

.carousel {
  flex: 2 1 60%;
  position: relative;
  transform: translateY(var(--space-xl));
  height: 80%;
  text-align: center;
  overflow: hidden;
  list-style: none;
  align-self: center;
}

button.carousel-button {
  /* flex: 1 1 5%; */
  flex: auto;
  min-width: 5px;
  max-width: 300px;
  width: 5px;
  padding: 0;
  height: var(--space-l);
  /* width: 5vw; */
  margin: auto;
}

button.carousel-button:nth-child(1) {
  /* justify-self: flex-start; */
  /* margin-right: var(--space-m); */
}

button.carousel-button:nth-child(2) {
  /* justify-self: flex-end; */
  /* margin-right: var(--space-xl); */

}

button:hover {
  /* background-color: var(--secondary-color); */
  background-color: red;
  color: green;
}


.testimonial {
  background-color: var(--background-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: absolute;
  height: max-content;
  padding: var(--space-l);
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.5s, transform 0.5s;
  vertical-align: middle;

  .testimonial-author {
    color: var(--primary-color);
    margin-top: var(--space-l);
    padding-top: var(--space-l);
  }
}

.active {
  opacity: 1;
  transform: translateX(0);
}

.exit-left {
  transform: translateX(-100%);
  opacity: 0;
}

#grid {
  height: auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  padding: var(--space-s) 0 var(--space-s) var(--space-s);
  margin: var(--space-xl) 0;

  img {
    width: calc(33.333% - var(--space-s));
    background-color: blue;
  }

}

#contact {
  text-align: center;

  h2 {
    width: fit-content;
    margin: auto;
    padding: 0 0.6ch;
    background: rgb(255, 0, 0);
    background: linear-gradient(0deg, rgba(255, 0, 0, 0) 16%, rgba(250, 205, 188, 1) 16%, rgba(250, 205, 188, 1) 40%, rgba(9, 255, 0, 0) 40%);
  }

  p {
    margin: 2ch auto;
    width: 40%;
  }
}

.form-group {
  display: flex;
  gap: var(--space-s);
  margin: var(--space-l) auto;
  max-width: 60%;
  flex-wrap: wrap;
}

/*                   */
/* Responsive Design */
/*                   */

@media (max-width: 768px) {

  nav {
    max-width: 100vw;
    margin: 0;
    padding: var(--space-s) 0;
    height: auto;
    text-align: center;
    gap: var(--space-s);
    flex-direction: column;
  }

  .logo-text,
  .nav-menu {
    display: none;
  }

  .flex {
    display: flex;
    flex-direction: row;
    font-size: var(--step-0);
  }

  .logo {
    /* justify-items: left; */
    display: inline-flex;
    /* gap: 10%; */

    img {
      /* max-width: 85%; */
      /* max-height: 60%; */
      flex: 1 1 50%;
    }

    a {
      /* width: 100%; */
    }

    a.menu {
      display: inline-block;
      /* flex: 1 2 10%; */
      z-index: 999;

      svg {
        width: var(--space-xl);
        color: var(--primary-color);
      }
    }
  }


  .nav-menu {
    width: 80%;
    margin: var(--space-s) auto;
    gap: var(--space-s);
    justify-content: space-between;
  }

  .section-content {
    flex-direction: column;
  }

  #grid {
    gap: 0;
    padding: 0;

    img {
      /* width: calc(100% - var(--space-s)); */
      width: 100%
    }
  }

  #intro .intro-lines h3 {
    margin-left: auto;
    text-align: center;
  }

  .diploma-img {
    height: 40vh;
    /* width: 50vh; */
  }

  .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: var(--space-l);
    /* gap: var(--space-l); */
  }

  .row img {
    flex: 0 0 40%;
    /* height: 13vh; */
    width: 25%;
  }

  .form-group {
    max-width: 80%;
    margin: auto;
  }

  footer {
    padding: var(--space-m);
  }

  footer,
  .footer-info {
    /* padding: var(--space-s); */
    flex-direction: column;
    text-align: center;
    gap: var(--space-s);

    img {
      margin: 0 auto;
    }

    .container {
      margin: 0;
    }
  }

  /* .about-content, */
  .services-grid {
    grid-template-columns: 1fr;
  }

  #testimonials {
    padding: var(--space-xl) 0;

    .carousel li {
      background-color: rgba(0, 0, 0, 0.6);
      color: var(--light-text);
      backdrop-filter: blur(30px);
    }

    button {
      display: none;
    }
  }

  #welcome {
    height: 100vh;
    background-image: url("assets/paralax_mobile/01.avif");
  }

  #bio-pic {
    background-image: url("assets/paralax_mobile/02.avif");
  }

  #testimonials {
    background-image: url("assets/paralax_mobile/03.avif");
    overflow: hidden;
  }

  #journey-pic {
    background-image: url("assets/paralax_mobile/04.avif");
  }

  #tools-pic {
    background-image: url("assets/paralax_mobile/05.avif");
  }

  #fireside {
    background-image: url("assets/paralax_mobile/06.avif");
  }
}