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

/* Body and Background */
body,
html {
  height: 100%;
  font-family: "Montserrat", sans-serif; /* Apply the Google Font */
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  overflow: hidden;
}

.background {
  position: absolute;
  width: 100%;
  height: 100%;
  background: url("photo.png") no-repeat center center/cover;
  filter: blur(20px);
  animation: backgroundBlur 2s forwards;
}

@keyframes backgroundBlur {
  0% {
    filter: blur(20px);
  }
  100% {
    filter: blur(0);
  }
}

/* Overlay Styling */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0); /* Start with 0% transparency */
  z-index: 1;
  animation: overlayFadeIn 2s forwards; /* Gradually reveal to 15% opacity */
  animation-delay: 0.5s; /* Start after backgroundBlur */
}

@keyframes overlayFadeIn {
  0% {
    background: rgba(0, 0, 0, 0); /* Fully transparent */
  }
  100% {
    background: rgba(0, 0, 0, 0.806); /* 15% transparency */
  }
}

/* Content Styling */
.content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;  /* Space between top and bottom elements */
  align-items: center;
  height: 100vh;  /* Prevent overflow and ensure breathing space */
  width: 100%;
  overflow: hidden; 
  padding: 20px 0;
  z-index: 2;
}

/* Center Container for Title and Tagline */
.center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center title-container and tagline */
  flex-grow: 1; /* Allow this container to grow and center itself */
  height: 100%;
  position: relative;
}

/* Title Animation */
.title {
  /* font-family: "Roboto Condensed", sans-serif; */
  font-size: 3rem;
  font-weight: 100; /* Thinner font */
  letter-spacing: 0.5rem;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255, 255, 255, 1.5);
}

.title span,
#our-story-content .title span {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  animation: revealLetter 2s forwards;
  animation-delay: calc(var(--char-index) * 0.2s);
}

@keyframes revealLetter {
  0% {
    opacity: 0;
    transform: translateX(-10px); /* Start slightly to the left */
    filter: blur(4px); /* Start blurred */
  }
  100% {
    opacity: 1;
    transform: translateX(0); /* Move into place */
    filter: blur(0); /* Remove blur */
  }
}

/* Start the reveal animation for the entire title after the background animations */
.title-container {
  opacity: 0;
  animation: titleContainerFadeIn 0.5s forwards; /* Quick fade-in of the container */
  animation-delay: 1s; /* Start after backgroundBlur and overlayFadeIn */
  padding-top: 300px;  /* Prevent title cut-off */
  padding: 300px 20px 0;
}

@keyframes titleContainerFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Tagline Animation */
.tagline {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 200;
  font-style: normal;
  font-size: 1rem;
  margin-top: 20px;
  opacity: 0;
  animation: fadeInUp 2.5s forwards;
  animation-delay: 2.5s;
  text-shadow: 0 0 8px rgba(255, 255, 255, 1.5);
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px); /* Start slightly below */
  }
  100% {
    opacity: 1;
    transform: translateY(0); /* Move into place */
  }
}

.about-link {
  margin-top: auto;  /* Pushes to the bottom */
  padding-bottom: 30px;
  /* position: absolute; */
  /* bottom: 3%; Position 20% up from the bottom of the .center-container */
  text-align: center;
  /* width: 100%; Center the link horizontally */
  padding-bottom: 40px;
}

.about-link a {
  font-size: 0.8em;
  color: #afafafba;
  text-decoration: none; /* Remove underline */
  display: inline-flex;
  opacity: 0;
  animation: revealForm 4s forwards 4s;
}

/* Arrow styling */
.about-link .arrow {
  font-size: 1em;
  margin-left: 5px; /* Space between text and arrow */
  transition: transform 0.3s ease; /* Smooth transition for the arrow */
}

.about-link a:hover {
  color: #afafaf;
}
/* Arrow move on hover */
.about-link a:hover .arrow {
  transform: translateX(
    5px
  ); /* Move the arrow slightly to the right on hover */
}

/* Email Form Styling */
.email-form {
  font-family: "Montserrat", sans-serif;
  margin-top: auto; /* Push to the bottom */
  margin-bottom: 50px; /* Set bottom margin */
  opacity: 0;
  animation: revealForm 3s forwards 3.5s;
  background: rgb(0 0 0 / 15%); /* Translucent black */
  border-radius: 5px;
  display: flex;
  overflow: hidden;
  width: 50%; /* Default width */
  max-width: 400px; /* Maximum width for larger screens */
}

@keyframes revealForm {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.email-form input {
  font-family: "Montserrat", sans-serif;
  padding: 15px;
  /* font-size: 1rem; */
  text-align: center;
  border: none;
  background: transparent;
  color: #afafaf;
  flex: 1;
  outline: none;
}

/* Change placeholder text color */
.email-form input::placeholder {
  font-family: "Montserrat", sans-serif;
  color: #afafaf7c; /* Desired color for the placeholder text */
  opacity: 1; /* Ensure the color applies fully */
}

.email-form button {
  font-family: "Montserrat", sans-serif;
  padding: 10px 20px;
  font-size: 0.8rem;
  border: none;
  background-color: rgb(0 0 0 / 17%); /* Translucent black */
  color: #afafaf;
  cursor: pointer;
  border-left: 1px solid #3333334a;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.email-form button:hover {
  background-color: rgb(0 0 0 / 80%);
}

/* Responsive Styling */
@media (max-width: 768px) {
  .title {
    font-size: 2.5rem; /* Smaller font for smaller screens */
    letter-spacing: 0.3rem;
  }

  .tagline {
    font-size: 0.9rem; /* Smaller font for smaller screens */
  }

  .about-link a {
    font-size: 0.8rem;
  }

  .email-form {
    max-width: 100%; /* Ensure it doesn't overflow on small screens */
  }

  .email-form input,
  .email-form button {
    font-size: 0.8rem; /* Adjust font size for input and button */
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 2rem; /* Smaller font for very small screens */
    letter-spacing: 0.2rem;
  }

  .tagline {
    font-size: 0.8rem; /* Smaller font for very small screens */
  }

  .about-link a {
    font-size: 0.8rem;
  }

  .email-form {
    width: 90%; /* Full width on very small screens */
  }

  .email-form input,
  .email-form button {
    font-size: 0.8rem; /* Adjust font size for input and button */
  }
}

/* newly added styles */

/* Centered and scrollable story container */
#our-story-content {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;  /* Start from top */
  text-align: center;
  margin: 0 auto;
  height: 100vh;  /* Full viewport height */
  overflow-y: scroll;  /* Enable scrolling */
  -ms-overflow-style: none;  /* Hide scrollbar for IE/Edge */
  scrollbar-width: none;  /* Hide scrollbar for Firefox */
  padding: 60px 0;
  padding: 60px 0;  /* Extra padding to avoid cut-off */
  box-sizing: border-box;
}


/* Smooth scroll behavior for better user experience */
#our-story-content::-webkit-scrollbar {
  width: 8px;
}

#our-story-content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

#our-story-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Scrollable story content */
.story-content {
  width: 800px; /* Fill the container width */
  max-width: 90%;  /* Responsive width */
  padding: 20px;
  margin:0 auto;
  margin-bottom: 50px;  /* Space above Go Back link */
}

/* H2 and P styles for story content */
.story-content h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  font-size: 1.6em;
  text-align: center;
  margin-bottom: 30px;
}

.story-content p {
  font-family: "Montserrat", sans-serif;
  color: #e0dfdfd4;
  font-size: 0.95em;
  margin-bottom: 45px;
  text-align: start;
  line-height: 1.6; 
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Resize title on reveal */
@keyframes resizeTitle {
  from {
    font-size: 3rem;
  }
  to {
    font-size: 2rem;
  }
}

/* Fade in story content from bottom */
@keyframes fadeInFromBottom {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Resize the Our Story title */
#our-story-content .title {
  animation: resizeTitle 1s forwards;
}

.story-content {
  opacity: 0;
  transform: translateY(30px);
  visibility: hidden;
  transition: opacity 1.5s ease, transform 1.5s ease, visibility 0s;
}

.story-content.fade-in {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* When Hidden */
.content.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* When Visible */
.content.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Ensure Display None After Fade-Out Completes */
.content.hidden-delay {
  display: none;
}

/* Tablets (Portrait and Landscape) */
@media (max-width: 1024px) {
  .story-content {
    max-width: 600px;
  }
}

/* Responsive Fix for Smaller Screens */
@media (max-width: 768px) {
  .story-content {
    max-width: 100%;
    padding: 15px;
  }
  .title-container {
    padding-top: 300px;  /* Smaller padding on mobile */
  }
}

/* Small Phones (Portrait View) */
@media (max-width: 480px) {
  .story-content {
    max-width: 100%;  /* Fill the screen */
    padding: 15px;  /* Adjust padding for smaller screens */
  }
}