:root {
  --bg-color: #f8f7f2;
  --primary-color: #ffffff;
  --secondary-bg-color: #f0ede6;
  --border-color: #e0ddd5;
  --text-color: #3d405b;
  --text-secondary-color: #818396;
  --accent-color: #81b29a;
  --accent-hover-color: #6a9c81;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  --font-primary: 'Inter', sans-serif;
  --font-headings: 'Merriweather', serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

section {
  padding: 100px 0;
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.3;
}

h2.section-title {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

h2.section-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
  margin: 1.5rem auto;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary-color);
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s, visibility 0.5s;
}
.loader {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 25px 0;
  transition: all 0.4s ease;
}

.header.scrolled {
  background-color: rgba(248, 247, 242, 0.85);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-primary);
  color: var(--text-color);
  text-decoration: none;
}
.logo i {
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary-color);
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 5px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-color);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 30%;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}

#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

.hero-text {
  flex: 1.2;
}

.hero-text h1 {
  font-size: 3.8rem;
  margin-bottom: 1.5rem;
}
.hero-text h1 .highlight {
  color: var(--accent-color);
  font-style: italic;
}

.hero-text .subtitle {
  font-size: 1.1rem;
  font-family: var(--font-primary);
  margin-bottom: 2rem;
  color: var(--text-secondary-color);
}

.btn {
  display: inline-block;
  padding: 14px 35px;
  background-color: var(--accent-color);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 50px;
  transition: all 0.3s;
  border: 2px solid var(--accent-color);
  box-shadow: 0 4px 10px rgba(129, 178, 154, 0.3);
}

.btn:hover {
  background-color: var(--accent-hover-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(129, 178, 154, 0.4);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image img {
  max-width: 450px;
  width: 100%;
  border-radius: 12px;
}

.quote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary-color);
  margin-bottom: 1.5rem;
  text-decoration: underline;
  text-decoration-color: rgba(129, 178, 154, 0.8);
}

.footer {
  background-color: var(--secondary-bg-color);
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  text-align: center;
}
.social-links {
  margin-bottom: 1.5rem;
}
.social-links a {
  color: var(--text-secondary-color);
  font-size: 1.2rem;
  margin: 0 15px;
  transition: color 0.3s, transform 0.3s;
  display: inline-block;
}
.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}
.copyright {
  color: var(--text-secondary-color);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 992px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-image {
    margin-bottom: 3rem;
  }
  .hero-text h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  h2.section-title {
    font-size: 2.2rem;
  }
  .menu-toggle {
    display: block;
    z-index: 1001;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  }
  .nav-menu.active {
    right: 0;
  }
  .nav-item {
    margin: 1.5rem 0;
  }
  .nav-link {
    font-size: 1.5rem;
  }
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  .hero-text h1 {
    font-size: 2.5rem;
  }
}

/* TIMELINE CSS */

.timeline {
  position: relative;
  width: 660px;
  margin: 0 auto;
  margin-top: 20px;
  padding: 1em 0;
  list-style-type: none;
}

.timeline:before {
  position: absolute;
  left: 50%;
  top: 0;
  content: ' ';
  display: block;
  width: 6px;
  height: 100%;
  margin-left: -3px;
  background: rgb(80, 80, 80);
  background: -moz-linear-gradient(top, rgba(80, 80, 80, 0) 0%, rgb(80, 80, 80) 8%, rgb(80, 80, 80) 92%, rgba(80, 80, 80, 0) 100%);
  background: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0%, rgba(30, 87, 153, 1)),
    color-stop(100%, rgba(125, 185, 232, 1))
  );
  background: -webkit-linear-gradient(top, rgba(80, 80, 80, 0) 0%, rgb(80, 80, 80) 8%, rgb(80, 80, 80) 92%, rgba(80, 80, 80, 0) 100%);
  background: -o-linear-gradient(top, rgba(80, 80, 80, 0) 0%, rgb(80, 80, 80) 8%, rgb(80, 80, 80) 92%, rgba(80, 80, 80, 0) 100%);
  background: -ms-linear-gradient(top, rgba(80, 80, 80, 0) 0%, rgb(80, 80, 80) 8%, rgb(80, 80, 80) 92%, rgba(80, 80, 80, 0) 100%);
  background: linear-gradient(to bottom, rgba(80, 80, 80, 0) 0%, rgb(80, 80, 80) 8%, rgb(80, 80, 80) 92%, rgba(80, 80, 80, 0) 100%);

  z-index: 5;
}

.timeline li {
  padding: 1em 0;
}

.timeline li:after {
  content: '';
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

.direction-l {
  position: relative;
  width: 300px;
  float: left;
  text-align: right;
}

.direction-r {
  position: relative;
  width: 300px;
  float: right;
}

.flag-wrapper {
  position: relative;
  display: inline-block;

  text-align: center;
}

.flag {
  position: relative;
  display: inline;
  background: rgb(248, 248, 248);
  padding: 6px 10px;
  border-radius: 5px;

  font-weight: 600;
  text-align: left;
}

.direction-l .flag {
  -webkit-box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.15);
  -moz-box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.15);
  box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.15);
}

.direction-r .flag {
  -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.15);
  -moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.15);
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.15);
}

.direction-l .flag:before,
.direction-r .flag:before {
  position: absolute;
  top: 50%;
  right: -40px;
  content: ' ';
  display: block;
  width: 12px;
  height: 12px;
  margin-top: -10px;
  background: #fff;
  border-radius: 10px;
  border: 4px solid var(--accent-color);
  z-index: 10;
}

.direction-r .flag:before {
  left: -40px;
}

.direction-l .flag:after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  height: 0;
  width: 0;
  margin-top: -8px;
  border: solid transparent;
  border-left-color: rgb(248, 248, 248);
  border-width: 8px;
  pointer-events: none;
}

.direction-r .flag:after {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  height: 0;
  width: 0;
  margin-top: -8px;
  border: solid transparent;
  border-right-color: rgb(248, 248, 248);
  border-width: 8px;
  pointer-events: none;
}

.time-wrapper {
  display: inline;

  line-height: 1em;
  font-size: 0.66666em;
  color: var(--text-secondary-color);
  vertical-align: middle;
}

.direction-l .time-wrapper {
  float: left;
}

.direction-r .time-wrapper {
  float: right;
}

.time {
  display: inline-block;
  padding: 4px 6px;
  background: rgb(248, 248, 248);
}

.desc {
  margin: 1em 0.75em 0 0;

  font-size: 0.77777em;
  font-style: italic;
  line-height: 1.5em;
}

.direction-r .desc {
  margin: 1em 0 0 0.75em;
}

/* FORM CSS */

.content {
  position: center;
  width: 360px;
  height: 40px;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.2);
  border-radius: 60px;
  overflow: hidden;
}

.subscription {
  position: relative;
  width: 100%;
  height: 100%;
}

.subscription .add-email {
  margin-bottom: 1rem;
  color: var(--text-secondary-color);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 20px;
}

.subscription .submit-email {
  position: absolute;
  top: 0;
  right: 0;
  height: calc(100% - 2px);
  width: 100px;
  border: none;
  border-radius: 60px;
  outline: none;
  margin: 1px;
  padding: 0 20px;
  cursor: pointer;
  background: var(--accent-color);
  color: #ffffff;
  transition: width 0.35s ease-in-out, background 0.35s ease-in-out;
}

.subscription.done .submit-email {
  width: calc(100% - 2px);
  background: var(--accent-hover-color);
}

.subscription .submit-email .before-submit,
.subscription .submit-email .after-submit {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 38px;
  transition: visibility 0.35s ease-in-out, opacity 0.35s ease-in-out;
}

.subscription.done .submit-email .before-submit,
.subscription:not(.done) .submit-email .after-submit {
  visibility: hidden;
  opacity: 0;
}

.subscription .submit-email .after-submit {
  transition-delay: 0.35s;
}

.subscription:not(.done) .submit-email .before-submit,
.subscription.done .submit-email .after-submit {
  visibility: visible;
  opacity: 1;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: none; /* hidden by default */
  margin-left: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ================ Timeline Media Queries ================ */

@media screen and (max-width: 992px) {
  .timeline {
    width: 100%;
    padding: 4em 0 1em 0;
  }

  .timeline li {
    padding: 2em 0;
  }

  .direction-l,
  .direction-r {
    float: none;
    width: 100%;

    text-align: center;
  }

  .flag-wrapper {
    text-align: center;
  }

  .flag {
    background: rgb(255, 255, 255);
    z-index: 15;
  }

  .direction-l .flag:before,
  .direction-r .flag:before {
    position: absolute;
    top: -30px;
    left: 50%;
    content: ' ';
    display: block;
    width: 12px;
    height: 12px;
    margin-left: -9px;
    background: #fff;
    border-radius: 10px;
    border: 4px solid var(--accent-color);
    z-index: 10;
  }

  .direction-l .flag:after,
  .direction-r .flag:after {
    content: '';
    position: absolute;
    left: 50%;
    top: -8px;
    height: 0;
    width: 0;
    margin-left: -8px;
    border: solid transparent;
    border-bottom-color: rgb(255, 255, 255);
    border-width: 8px;
    pointer-events: none;
  }

  .time-wrapper {
    display: block;
    position: relative;
    margin: 4px 0 0 0;
    z-index: 14;
  }

  .direction-l .time-wrapper {
    float: none;
  }

  .direction-r .time-wrapper {
    float: none;
  }

  .desc {
    position: relative;
    margin: 1em 0 0 0;
    padding: 1em;
    background: rgb(245, 245, 245);
    -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);

    z-index: 15;
  }

  .direction-l .desc,
  .direction-r .desc {
    position: relative;
    margin: 1em 1em 0 1em;
    padding: 1em;

    z-index: 15;
  }
}

@media screen and (max-width: 660px) {
  .direction-l .desc,
  .direction-r .desc {
    margin: 1em 4em 0 4em;
  }
}
