/*
  Global styles for the page.  
  Remove default margins and padding, set height to 100% so the video fills the viewport.
*/
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

/*
  Styling for the video element.  
  It is positioned fixed so it stays in place while scrolling, and given a negative
  z‑index so it sits behind all other content.  The object‑fit property ensures
  the video covers the entire viewport while preserving its aspect ratio.
*/
#bgVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/*
  Overlay containing the heading, description and form.  
  It is centered using absolute positioning and transform, and has a semi‑transparent
  background for readability.  The border‑radius softens the corners.
*/
.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.overlay h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 32px;
}

.overlay p {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
}

/*
  Style the form to stack its children vertically and align them centrally.
*/
#subscribeForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/*
  Input styling:  
  The width will stretch to a reasonable size on desktop and automatically
  fill the container on small screens due to the media query below.  
  A slight padding and border‑radius make the input user‑friendly.
*/
#subscribeForm input[type="email"] {
    padding: 10px;
    width: 280px;
    max-width: 100%;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

/*
  Button styling:  
  Use a distinct colour for the call to action.  Remove default borders, and
  change the colour on hover for interactivity.
*/
#subscribeForm button {
    padding: 10px 24px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#subscribeForm button:hover {
    background-color: #0056b3;
}

/*
  Message styling:  
  Show success or error messages in a consistent style below the button.
*/
#message {
    margin: 0;
    font-size: 14px;
    min-height: 20px;
}

/*
  Responsive adjustments for smaller screens (less than 600px wide).  
  Narrow the overlay and allow the email input to take the full width.
*/
@media (max-width: 600px) {
    .overlay {
        width: 90%;
        padding: 20px;
    }
    #subscribeForm input[type="email"] {
        width: 100%;
    }
    .overlay h1 {
        font-size: 28px;
    }
    .overlay p {
        font-size: 14px;
    }
    #subscribeForm button {
        width: 100%;
    }
}