/* ! SCROLLY STYLING */

#scrolly {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  flex-direction: row-reverse;
  background-color: #f8f7f2;
  padding: 1rem;
  min-height: 100vh;
}

#scrolly > * {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

#intro {
  background-image: url("assets/intro-title.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40%;
  background-color: #f8f7f2;
  padding: 1rem;
  min-height: 90vh;
  position: relative;
  /* cursor: pointer; */
}

/* #intro::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 33.33%;
  cursor: pointer;
}

#intro::after:hover {
  background-color: rgba(0, 0, 0, 0.05);
} */

article {
  position: relative;
  padding: 0;
  max-width: 20rem;
  /* Add this back but as margin-top instead of top */
  margin-top: 50vh; /* Makes steps start off-screen */
  margin-bottom: 100vh; /* Ensures scrolling room at bottom */
}

.sticky-thing {
  position: -webkit-sticky;
  position: sticky;
  width: 100%;
  margin: 0;
  /* background-color: #8a8a8a; */
  z-index: 0;
  top: 0;
  height: 100vh;
  /* Center everything inside */
  display: flex;
  align-items: center;
  justify-content: center;
}

.step {
  margin: 0 auto 20rem auto;
  background-color: #f8f7f2;
  color: #000000;
  position: relative;
  opacity: 0.3; /* Default dim state */
  transition: opacity 0.5s ease; /* Smooth transition */
}

.step:last-child {
  margin-bottom: 100vh;
}

.step.is-active {
  color: #3b3b3b;
  opacity: 1; /* Full opacity when active */
}

.step p.secondary-type {
  text-align: left;
  padding: 1rem;
  font-size: 1.5rem;
}

.step p.secondary-type.big-type {
  text-align: left;
  padding: 1rem;
  font-size: 2rem;
}

/* Add this to your CSS file */
.tooltip {
  position: absolute;
  text-align: center;
  padding: 6px;
  font-family: "VT323", monospace;
  font-size: 14px;
  letter-spacing: -0.175px;
  background: #f8f7f2;
  border: 0px;
  border-radius: 0px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

label text {
  pointer-events: none; /* Ensure text doesn't block mouse events */
}

/* ! TYPOGRAPHY */
.primary-type {
  color: #000;
  text-align: center;
  font-family: "VT323", monospace;
  font-weight: 400;
  font-style: normal;
  font-size: 50px;
  letter-spacing: -0.55px;
}

.divider {
  width: 100%;
  height: 1px;
  background-color: rgba(128, 128, 128, 0.5);
  margin: 1rem 0;
}

.secondary-type {
  color: #000;
  font-family: "VT323", monospace;
  font-weight: 400;
  font-style: normal;
  font-size: 25px;
  /* line-height: normal; */
  letter-spacing: -0.275px;
}
.annotation {
  font-size: 14px;
  display: block; /* Make each annotation take its own line */
  margin-bottom: 1em; /* Control spacing between annotations */
  margin-top: 1em;
  line-height: 1; /* Reset line height to natural */
  font-weight: 300; /* Light font weight */
}

.vector-icon {
  vertical-align: middle;
  height: 1em;
  margin: 0 2px; /* Add small horizontal spacing around the icon */
  transform: translateY(
    -1px
  ); /* Slight upward adjustment for better alignment */
}

.button-center {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  line-height: 0.8;
  margin-bottom: 20px;
}

.byline {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  line-height: 0.8;
  margin-bottom: 20px;
}

.byline a {
  color: #0143f0;
  text-decoration: none;
}

.company-name-type {
  color: #0143f0;
  text-align: center;
  font-family: "VT323", monospace;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  /* line-height: normal; */
  letter-spacing: -0.264px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ! COLORS */

.background-primary {
  background-color: #f8f7f2;
}

.color-primary {
  background-color: #0143f0;
}

.color-white {
  background-color: #ffffff;
}

.color-black {
  background-color: #000000;
}

.gradient-primary {
  background: radial-gradient(circle, #0143f0 0%, #4173f4 33%, #7fa1f7 100%);
}

.gradient-secondary {
  background: radial-gradient(circle, #0143f0 0%, #7fa1f7 100%);
}

/* For elements that need a border color */
.border-light {
  border-color: #f8f7f2;
}

.mne-select {
  position: relative;
  padding: 8px;
  font-family: "VT323", monospace;
  font-size: 14px;
  background: #f8f7f2;
  border: 1px solid #0143f0;
  border-radius: 4px;
  z-index: 10;
  text-align: left;
  max-width: 300px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0 auto; /* Center horizontally */
  left: 50%;
  transform: translateX(-50%); /* Center relative to container */
  display: block; /* Ensure block display for centering */
}

.bubbles-light {
  opacity: 0.1;
  transition: fill 0.3s ease;
}

/* #outro {
  height: 100px;
} */

.image-container {
  width: 50%;
  height: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float 2s ease-in-out infinite;
  transform-origin: center;
  /* filter: grayscale(30%); */
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Mobile styles for screens 700px or less */
@media screen and (max-width: 700px) {
  #scrolly {
    /* Make scrolly container full width/height */
    position: relative;
    width: 100vw;
    min-height: 100vh;
    padding: 0;
  }

  article {
    /* Position article as overlay */
    position: relative;
    width: 100%;
    max-width: none;
    margin-top: 50vh;
    margin-bottom: 100vh;
    padding: 0;
    z-index: 2; /* Ensure article is above sticky-thing */
    pointer-events: none; /* Allow clicks to pass through to visualization */
    background: transparent;
  }

  .sticky-thing {
    /* Make sticky container full screen */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    z-index: 1;
  }

  /* Style the step text containers */
  .step {
    width: 80%;
    max-width: 300px;
    margin: 0 auto 20rem auto;
    background: transparent;
    margin-bottom: 125%;
  }

  /* Style the text boxes */
  .step p.secondary-type {
    background-color: rgba(
      248,
      247,
      242,
      0.95
    ); /* Slightly transparent white */
    padding: 1rem;
    margin: 1rem;
    font-size: 1.1rem;
    line-height: 1.2;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    pointer-events: auto; /* Re-enable pointer events for text */
  }

  .step p.secondary-type.big-type {
    font-size: 1.1rem;
  }

  /* Keep last step spacing */
  .step:last-child {
    margin-bottom: 100vh;
  }

  /* Adjust active state for better visibility */
  .step.is-active p.secondary-type {
    background-color: rgba(248, 247, 242, 1); /* Fully opaque when active */
    transform: scale(1.02);
    transition: all 0.3s ease;
  }

  .mne-select {
    position: absolute;
    top: 40px; /* Margin from top of screen */
    left: 50%;
    transform: translateX(-50%);
    width: 80%; /* Adjust width for mobile */
    max-width: 250px;
    font-size: 12px; /* Slightly smaller font for mobile */
    z-index: 3; /* Ensure it's above the visualization and text overlay */
  }

  #intro {
    background-size: 70%;
  }
}
