/* Google Font: Poppins Light + Extra Light */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300&display=swap');

/* ==============================
   Text Overlay (Fluid + Responsive)
   ============================== */
#textOverlay {
  position: absolute;
  top: 50%;
  margin-left: 5vw;              
  transform: scaleX(1.25);       
  transform-origin: left center; 
  font-size: clamp(18px, 5vw, 50px);  /* fluid between 18px–50px */
  color: #fff;
  opacity: 0;                    
  line-height: 1.5;
  z-index: 2;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  letter-spacing: 0px;
  -webkit-font-smoothing: antialiased;
  white-space: nowrap;
}

/* Buttons inside overlay */
#textOverlay button {
  font-family: inherit;
  font-size: 0.5em;
  color: inherit;
  transform: scaleX(1.0);
  background-color: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 0.2em;
  padding: 0.25em 0.5em;
  cursor: pointer;
  outline: none;
  transition: border-color 0.25s ease, transform 0.2s ease;
  touch-action: manipulation;
}

#textOverlay button:hover,
#textOverlay button:focus {
  border-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.04);
}

/* Each line inside overlay */
#textOverlay div {
  display: block;
  margin-bottom: 0;
}

/* Links inside overlay */
#textOverlay a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.3s ease;
}

#textOverlay a:hover {
  color: #66ccff;
}

/* Text alignment modes */
#textOverlay div.left { text-align: left; }
#textOverlay div.right { text-align: right; }

/* ==============================
   Responsive Adjustments
   ============================== */

/* Tablets and medium screens */
@media (max-width: 1024px) {
  #textOverlay {
    top: 55%;
    transform: scaleX(1.1);
    transform-origin: left center;
    line-height: 1.65;       /* a bit more vertical space */
    white-space: normal;     /* allow wrapping */
  }
}

/* Phones and small tablets */
@media (max-width: 768px) {
  #textOverlay {
    top: 50%;
    margin-left: 5vw;
    width: 90vw;
    max-width: 90vw;
    transform: scaleX(1.0);
    transform-origin: center center;
    letter-spacing: 0.5px;
    line-height: 1.75;       /* looser line spacing for legibility */
    white-space: normal;
    text-align: center;
  }

  #textOverlay button {
    font-size: 0.8em;
    border-width: 1.5px;
    padding: 0.4em 0.8em;
    border-radius: 0.3em;
  }
}

/* Very small phones */
@media (max-width: 480px) {
  #textOverlay {
    font-weight: bold;
    top: 50%;
    line-height: 3.0;        /* even more breathing room */
    margin-left: 0;
    padding: 0 5vw;
  }
}

