<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Master Kleen Cleaning and Restoration, Inc.</title>
<meta name="description" content="Professional residential and commercial cleaning and restoration services by Master Kleen Cleaning and Restoration, Inc.">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Background Overlay -->
<div class="background-overlay"></div>
<!-- Floating Visit Now Popup -->
<div class="visit-popup" id="visitPopup">
<button class="popup-close" id="closePopup">×</button>
<div class="popup-image">
<img src="https://masterkleenpa.com/wp-content/uploads/2021/06/cta-image.png"
alt="Master Kleen Cleaning Services">
</div>
<div class="popup-content">
<span class="popup-label">Professional Cleaning</span>
<h3>Master Kleen Cleaning & Restoration</h3>
<p>
Professional cleaning and restoration services for a cleaner,
healthier home or business.
</p>
<a href="https://masterkleenpa.com/" target="_blank" class="popup-btn">
Visit Now
</a>
</div>
</div>
<!-- Main Profile -->
<main class="profile-container">
<!-- Header -->
<header class="profile-header">
<div class="logo-box">
<img
src="https://masterkleenpa.com/wp-content/uploads/2021/06/logo-main.png"
alt="Master Kleen Cleaning and Restoration Logo">
</div>
<div class="header-content">
<span class="eyebrow">Since 1984 • Family Owned & Operated</span>
<h1>Master Kleen Cleaning and Restoration, Inc.</h1>
<p class="tagline">
Professional Cleaning Services for a Cleaner,
Healthier Home and Business
</p>
<div class="header-buttons">
<a href="tel:7245239290" class="btn primary">
Call 724-523-9290
</a>
<a href="https://masterkleenpa.com/"
target="_blank"
class="btn secondary">
Visit Website
</a>
</div>
</div>
</header>
<!-- About -->
<section class="section about-section">
<div class="section-title">
<span>01</span>
<h2>About Master Kleen</h2>
</div>
<p>
Master Kleen Cleaning and Restoration, Inc. is a family-owned and
operated cleaning company serving Westmoreland County, Pittsburgh,
and surrounding areas since 1984.
</p>
<p>
The company provides professional residential and commercial cleaning
services using advanced equipment, industry-approved techniques, and
certified expertise. Master Kleen is committed to dependable service,
quality workmanship, and exceptional customer care while helping create
cleaner and healthier indoor environments.
</p>
</section>
<!-- Contact Information -->
<section class="info-grid">
<div class="info-card">
<div class="icon">☎</div>
<h3>Phone</h3>
<a href="tel:7245239290">724-523-9290</a>
</div>
<div class="info-card">
<div class="icon">✉</div>
<h3>Email</h3>
<a href="mailto:office@masterkleenpa.com">
office@masterkleenpa.com
</a>
</div>
<div class="info-card">
<div class="icon">⌖</div>
<h3>Location</h3>
<p>1607 Penn Avenue,<br>Jeannette, PA 15644, USA</p>
</div>
<div class="info-card">
<div class="icon">◷</div>
<h3>Hours</h3>
<p>Monday – Friday<br>8:00 AM – 5:00 PM</p>
</div>
</section>
<!-- Services -->
<section class="section">
<div class="section-title">
<span>02</span>
<h2>Professional Services</h2>
</div>
<div class="services-grid">
<div class="service-card">
<div class="service-number">01</div>
<h3>Carpet Cleaning</h3>
<p>Professional carpet cleaning for fresher and healthier indoor spaces.</p>
</div>
<div class="service-card">
<div class="service-number">02</div>
<h3>Air Duct Cleaning</h3>
<p>Cleaning solutions designed to improve the cleanliness of your air duct system.</p>
</div>
<div class="service-card">
<div class="service-number">03</div>
<h3>Dryer Vent Cleaning</h3>
<p>Professional dryer vent cleaning for cleaner and more efficient systems.</p>
</div>
<div class="service-card">
<div class="service-number">04</div>
<h3>Upholstery Cleaning</h3>
<p>Deep cleaning services for upholstered furniture and fabrics.</p>
</div>
<div class="service-card">
<div class="service-number">05</div>
<h3>Tile & Grout Cleaning</h3>
<p>Restore the clean appearance of tile surfaces and grout lines.</p>
</div>
<div class="service-card">
<div class="service-number">06</div>
<h3>Wood Floor Cleaning</h3>
<p>Professional cleaning for maintaining beautiful wood flooring.</p>
</div>
<div class="service-card">
<div class="service-number">07</div>
<h3>Pressure Washing</h3>
<p>Exterior pressure washing services for residential and commercial properties.</p>
</div>
<div class="service-card">
<div class="service-number">08</div>
<h3>Commercial Cleaning</h3>
<p>Reliable cleaning solutions for offices and commercial environments.</p>
</div>
<div class="service-card">
<div class="service-number">09</div>
<h3>Water Damage Restoration</h3>
<p>Professional restoration services when your property experiences water damage.</p>
</div>
<div class="service-card">
<div class="service-number">10</div>
<h3>Pet Odor Treatment</h3>
<p>Targeted cleaning solutions to help eliminate unwanted pet odors.</p>
</div>
<div class="service-card">
<div class="service-number">11</div>
<h3>Furniture Cleaning</h3>
<p>Deep cleaning solutions to refresh and maintain furniture surfaces.</p>
</div>
</div>
</section>
<!-- CTA Image -->
<section class="visual-cta">
<img
src="https://masterkleenpa.com/wp-content/uploads/2021/06/cta-image.png"
alt="Professional Master Kleen Cleaning and Restoration">
<div class="visual-content">
<span>Cleaner Spaces. Better Living.</span>
<h2>
Professional Cleaning & Restoration
</h2>
<p>
Dependable cleaning solutions for residential and commercial
properties.
</p>
<a href="https://masterkleenpa.com/"
target="_blank"
class="btn primary">
Visit Master Kleen
</a>
</div>
</section>
<!-- Service Areas -->
<section class="section">
<div class="section-title">
<span>03</span>
<h2>Service Areas</h2>
</div>
<div class="areas-grid">
<span>Irwin / North Huntingdon</span>
<span>Jeannette</span>
<span>Hempfield Township</span>
<span>Greensburg</span>
<span>Latrobe</span>
<span>Plum</span>
<span>Murrysville</span>
<span>Monroeville</span>
<span>Export</span>
<span>Delmont</span>
<span>Harrison City</span>
<span>Derry</span>
<span>Oakmont</span>
<span>Ligonier</span>
<span>Youngwood</span>
<span>Mt. Pleasant</span>
<span>Scottdale</span>
<span>New Stanton</span>
<span>Belle Vernon</span>
</div>
</section>
<!-- Business Hours -->
<section class="hours-section">
<div>
<span class="eyebrow">Business Hours</span>
<h2>We're Here Monday Through Friday</h2>
</div>
<div class="hours-list">
<div><strong>Monday</strong><span>8am – 5pm</span></div>
<div><strong>Tuesday</strong><span>8am – 5pm</span></div>
<div><strong>Wednesday</strong><span>8am – 5pm</span></div>
<div><strong>Thursday</strong><span>8am – 5pm</span></div>
<div><strong>Friday</strong><span>8am – 5pm</span></div>
<div><strong>Saturday</strong><span>Closed</span></div>
<div><strong>Sunday</strong><span>Closed</span></div>
</div>
</section>
<!-- Links -->
<section class="section">
<div class="section-title">
<span>04</span>
<h2>Explore Master Kleen</h2>
</div>
<div class="links-grid">
<a href="https://masterkleenpa.com/gallery-all/"
target="_blank"
class="large-link">
<span>Gallery</span>
<b>View Our Work →</b>
</a>
<a href="https://masterkleenpa.com/reviews/"
target="_blank"
class="large-link">
<span>Reviews</span>
<b>Read Customer Reviews →</b>
</a>
<a href="https://masterkleenpa.com/blog/"
target="_blank"
class="large-link">
<span>Blog</span>
<b>Read Our Latest Updates →</b>
</a>
<a href="https://masterkleenpa.com/"
target="_blank"
class="large-link">
<span>Website</span>
<b>Visit Master Kleen →</b>
</a>
</div>
</section>
<!-- Newsletter -->
<section class="newsletter">
<div class="newsletter-text">
<span class="eyebrow">Stay Connected</span>
<h2>Subscribe to Our Newsletter</h2>
<p>
Subscribe to our newsletter to receive the latest news and
updates from Master Kleen.
</p>
</div>
<form id="newsletterForm">
<label for="email">Email</label>
<div class="email-form">
<input
type="email"
id="email"
placeholder="Enter Email Address"
required>
<button type="submit">
Subscribe
</button>
</div>
<small id="formMessage"></small>
</form>
</section>
<!-- Final CTA -->
<section class="final-cta">
<div>
<span>Need Professional Cleaning?</span>
<h2>
Let's Create a Cleaner, Healthier Space.
</h2>
</div>
<div class="final-buttons">
<a href="tel:7245239290" class="btn white">
Call Now
</a>
<a href="https://masterkleenpa.com/"
target="_blank"
class="btn outline-white">
Visit Now
</a>
</div>
</section>
<!-- Footer -->
<footer>
<img
src="https://masterkleenpa.com/wp-content/uploads/2021/06/logo-main.png"
alt="Master Kleen Logo">
<p>
Master Kleen Cleaning and Restoration, Inc.
</p>
<p>
1607 Penn Avenue, Jeannette, PA 15644, USA
</p>
<div class="footer-links">
<a href="tel:7245239290">724-523-9290</a>
<a href="mailto:office@masterkleenpa.com">
office@masterkleenpa.com
</a>
<a href="https://masterkleenpa.com/" target="_blank">
masterkleenpa.com
</a>
</div>
<small>
© <span id="year"></span> Master Kleen Cleaning and Restoration, Inc.
All Rights Reserved.
</small>
</footer>
</main>
<script src="script.js"></script>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary: #0879b9;
--secondary: #0b4f71;
--dark: #082b3c;
--text: #4d6571;
--light: #f4f9fb;
--white: #ffffff;
--border: #dce9ee;
--shadow: 0 20px 60px rgba(5, 53, 76, 0.12);
}
html {
scroll-behavior: smooth;
}
body {
font-family: Arial, Helvetica, sans-serif;
background:
linear-gradient(
135deg,
rgba(232, 247, 252, 0.95),
rgba(255, 255, 255, 0.98)
);
color: var(--text);
line-height: 1.7;
}
/* Background Cleaning Pattern */
.background-overlay {
position: fixed;
inset: 0;
z-index: -1;
pointer-events: none;
background:
radial-gradient(circle at 10% 20%, rgba(8,121,185,.08) 0 70px, transparent 71px),
radial-gradient(circle at 90% 80%, rgba(8,121,185,.06) 0 120px, transparent 121px),
linear-gradient(120deg, transparent 0 48%, rgba(8,121,185,.025) 49% 50%, transparent 51%);
}
/* Main */
.profile-container {
width: min(1180px, calc(100% - 32px));
margin: 40px auto;
}
/* Header */
.profile-header {
position: relative;
overflow: hidden;
display: grid;
grid-template-columns: 270px 1fr;
gap: 50px;
align-items: center;
padding: 55px;
border-radius: 28px;
background:
linear-gradient(
120deg,
rgba(255,255,255,.98),
rgba(235,248,253,.95)
);
box-shadow: var(--shadow);
border: 1px solid rgba(255,255,255,.8);
}
.profile-header::after {
content: "";
position: absolute;
right: -100px;
top: -100px;
width: 300px;
height: 300px;
border-radius: 50%;
background: rgba(8,121,185,.07);
}
.logo-box {
position: relative;
z-index: 2;
background: white;
padding: 25px;
border-radius: 22px;
box-shadow: 0 15px 40px rgba(8,121,185,.12);
}
.logo-box img {
width: 100%;
display: block;
}
.header-content {
position: relative;
z-index: 2;
}
.eyebrow {
display: inline-block;
color: var(--primary);
font-size: 13px;
font-weight: 800;
letter-spacing: 2px;
text-transform: uppercase;
margin-bottom: 10px;
}
h1 {
color: var(--dark);
font-size: clamp(34px, 5vw, 58px);
line-height: 1.08;
margin-bottom: 18px;
letter-spacing: -1.5px;
}
.tagline {
max-width: 700px;
font-size: 20px;
color: #56717e;
margin-bottom: 28px;
}
.header-buttons,
.final-buttons {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 14px 24px;
border-radius: 8px;
text-decoration: none;
font-weight: 700;
transition: .3s ease;
}
.btn.primary {
color: white;
background: var(--primary);
}
.btn.primary:hover {
background: var(--secondary);
transform: translateY(-3px);
}
.btn.secondary {
color: var(--dark);
background: white;
border: 1px solid var(--border);
}
.btn.secondary:hover {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(0,0,0,.08);
}
/* Sections */
.section {
margin-top: 30px;
padding: 50px;
background: rgba(255,255,255,.96);
border-radius: 24px;
box-shadow: var(--shadow);
}
.section-title {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 25px;
}
.section-title span {
display: grid;
place-items: center;
width: 44px;
height: 44px;
color: white;
background: var(--primary);
border-radius: 50%;
font-size: 13px;
font-weight: 800;
}
.section-title h2 {
color: var(--dark);
font-size: 30px;
}
.about-section p {
margin-bottom: 15px;
font-size: 17px;
}
/* Info */
.info-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 18px;
margin-top: 30px;
}
.info-card {
padding: 28px 20px;
background: white;
border: 1px solid var(--border);
border-radius: 18px;
text-align: center;
transition: .3s;
}
.info-card:hover {
transform: translateY(-6px);
box-shadow: var(--shadow);
}
.icon {
width: 50px;
height: 50px;
margin: 0 auto 15px;
display: grid;
place-items: center;
color: white;
background: var(--primary);
border-radius: 50%;
font-size: 22px;
}
.info-card h3 {
color: var(--dark);
margin-bottom: 7px;
}
.info-card a {
color: var(--primary);
text-decoration: none;
font-weight: 700;
}
/* Services */
.services-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 18px;
}
.service-card {
position: relative;
overflow: hidden;
min-height: 180px;
padding: 28px;
background: var(--light);
border: 1px solid var(--border);
border-radius: 18px;
transition: .3s ease;
}
.service-card:hover {
transform: translateY(-6px);
background: white;
box-shadow: var(--shadow);
}
.service-number {
color: rgba(8,121,185,.2);
font-size: 42px;
font-weight: 900;
line-height: 1;
margin-bottom: 12px;
}
.service-card h3 {
color: var(--dark);
font-size: 19px;
margin-bottom: 7px;
}
.service-card p {
font-size: 14px;
}
/* Visual CTA */
.visual-cta {
position: relative;
overflow: hidden;
min-height: 430px;
margin-top: 30px;
border-radius: 25px;
box-shadow: var(--shadow);
}
.visual-cta img {
width: 100%;
height: 430px;
object-fit: cover;
display: block;
}
.visual-cta::after {
content: "";
position: absolute;
inset: 0;
background:
linear-gradient(
90deg,
rgba(4,42,61,.88),
rgba(4,42,61,.45),
rgba(4,42,61,.05)
);
}
.visual-content {
position: absolute;
z-index: 2;
left: 55px;
top: 50%;
transform: translateY(-50%);
max-width: 550px;
color: white;
}
.visual-content span {
color: #9fe3ff;
text-transform: uppercase;
letter-spacing: 2px;
font-weight: 800;
font-size: 13px;
}
.visual-content h2 {
font-size: clamp(30px, 4vw, 48px);
line-height: 1.1;
margin: 12px 0;
}
.visual-content p {
margin-bottom: 20px;
}
/* Areas */
.areas-grid {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.areas-grid span {
padding: 10px 15px;
background: var(--light);
border: 1px solid var(--border);
border-radius: 50px;
color: var(--secondary);
font-weight: 600;
font-size: 14px;
}
/* Hours */
.hours-section {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 50px;
align-items: start;
margin-top: 30px;
padding: 50px;
color: white;
background:
linear-gradient(
135deg,
var(--dark),
var(--secondary)
);
border-radius: 25px;
box-shadow: var(--shadow);
}
.hours-section h2 {
font-size: 36px;
line-height: 1.15;
}
.hours-list {
border-top: 1px solid rgba(255,255,255,.2);
}
.hours-list div {
display: flex;
justify-content: space-between;
padding: 11px 0;
border-bottom: 1px solid rgba(255,255,255,.15);
}
.hours-list strong {
color: white;
}
.hours-list span {
color: #c6e6f1;
}
/* Links */
.links-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 15px;
}
.large-link {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
padding: 25px;
text-decoration: none;
background: var(--light);
border: 1px solid var(--border);
border-radius: 15px;
transition: .3s;
}
.large-link:hover {
background: var(--primary);
color: white;
transform: translateY(-4px);
}
.large-link span {
color: var(--dark);
font-size: 20px;
font-weight: 800;
}
.large-link b {
color: var(--primary);
font-size: 13px;
}
.large-link:hover span,
.large-link:hover b {
color: white;
}
/* Newsletter */
.newsletter {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 50px;
margin-top: 30px;
padding: 45px 50px;
background: white;
border-radius: 24px;
box-shadow: var(--shadow);
}
.newsletter h2 {
color: var(--dark);
font-size: 34px;
line-height: 1.15;
margin-bottom: 10px;
}
.newsletter form {
align-self: center;
}
.newsletter label {
display: block;
margin-bottom: 8px;
color: var(--dark);
font-weight: 700;
}
.email-form {
display: flex;
gap: 8px;
}
.email-form input {
width: 100%;
min-width: 0;
padding: 14px 16px;
border: 1px solid var(--border);
border-radius: 8px;
outline: none;
font-size: 15px;
}
.email-form input:focus {
border-color: var(--primary);
}
.email-form button {
padding: 0 22px;
border: 0;
border-radius: 8px;
color: white;
background: var(--primary);
cursor: pointer;
font-weight: 700;
}
#formMessage {
display: block;
margin-top: 10px;
color: var(--primary);
}
/* Final CTA */
.final-cta {
display: flex;
justify-content: space-between;
align-items: center;
gap: 30px;
margin-top: 30px;
padding: 45px 50px;
background: var(--primary);
color: white;
border-radius: 24px;
box-shadow: var(--shadow);
}
.final-cta span {
font-size: 13px;
text-transform: uppercase;
letter-spacing: 2px;
}
.final-cta h2 {
max-width: 600px;
font-size: 35px;
line-height: 1.15;
margin-top: 8px;
}
.btn.white {
background: white;
color: var(--secondary);
}
.btn.outline-white {
border: 1px solid rgba(255,255,255,.7);
color: white;
}
.btn.white:hover,
.btn.outline-white:hover {
transform: translateY(-3px);
}
/* Footer */
footer {
margin-top: 30px;
padding: 40px;
text-align: center;
background: white;
border-radius: 24px;
box-shadow: var(--shadow);
}
footer img {
width: 180px;
max-width: 70%;
margin-bottom: 15px;
}
footer p {
margin-bottom: 4px;
}
.footer-links {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 18px;
margin: 20px 0;
}
.footer-links a {
color: var(--primary);
text-decoration: none;
font-weight: 700;
}
footer small {
color: #78909c;
}
/* =========================================
VISIT NOW POPUP
========================================= */
.visit-popup {
position: fixed;
z-index: 9999;
right: 25px;
bottom: 25px;
width: min(380px, calc(100% - 30px));
overflow: hidden;
background: white;
border-radius: 20px;
box-shadow: 0 25px 80px rgba(0,0,0,.25);
border: 1px solid rgba(8,121,185,.15);
opacity: 0;
visibility: hidden;
transform: translateY(30px) scale(.96);
transition: .45s ease;
}
.visit-popup.show {
opacity: 1;
visibility: visible;
transform: translateY(0) scale(1);
}
.popup-image {
height: 145px;
overflow: hidden;
}
.popup-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.popup-content {
padding: 22px;
}
.popup-label {
display: block;
color: var(--primary);
font-size: 11px;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 1.5px;
margin-bottom: 5px;
}
.popup-content h3 {
color: var(--dark);
font-size: 21px;
line-height: 1.2;
margin-bottom: 8px;
}
.popup-content p {
color: #607985;
font-size: 14px;
margin-bottom: 16px;
}
.popup-btn {
display: block;
padding: 12px 18px;
text-align: center;
text-decoration: none;
color: white;
background: var(--primary);
border-radius: 8px;
font-weight: 800;
transition: .3s;
}
.popup-btn:hover {
background: var(--secondary);
}
.popup-close {
position: absolute;
z-index: 3;
top: 10px;
right: 10px;
width: 32px;
height: 32px;
border: 0;
border-radius: 50%;
color: var(--dark);
background: rgba(255,255,255,.92);
cursor: pointer;
font-size: 20px;
line-height: 1;
}
/* =========================================
RESPONSIVE
========================================= */
@media (max-width: 1000px) {
.profile-header {
grid-template-columns: 210px 1fr;
padding: 40px;
}
.info-grid {
grid-template-columns: repeat(2, 1fr);
}
.services-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 750px) {
.profile-container {
width: min(100% - 20px, 600px);
margin: 20px auto;
}
.profile-header {
grid-template-columns: 1fr;
text-align: center;
padding: 30px 20px;
gap: 25px;
}
.logo-box {
width: 210px;
margin: auto;
}
.header-buttons {
justify-content: center;
}
.section {
padding: 30px 22px;
}
.info-grid,
.services-grid,
.links-grid,
.newsletter,
.hours-section {
grid-template-columns: 1fr;
}
.visual-cta img {
height: 500px;
}
.visual-content {
left: 25px;
right: 25px;
}
.hours-section {
padding: 35px 25px;
gap: 30px;
}
.newsletter {
padding: 35px 25px;
}
.final-cta {
flex-direction: column;
align-items: flex-start;
padding: 35px 25px;
}
.final-cta h2 {
font-size: 30px;
}
footer {
padding: 30px 20px;
}
}
@media (max-width: 480px) {
h1 {
font-size: 34px;
}
.tagline {
font-size: 17px;
}
.info-grid,
.services-grid {
grid-template-columns: 1fr;
}
.email-form {
flex-direction: column;
}
.email-form button {
padding: 13px;
}
.visit-popup {
right: 15px;
bottom: 15px;
width: calc(100% - 30px);
}
}
document.addEventListener("DOMContentLoaded", function () {
/* =====================================
VISIT NOW POPUP
===================================== */
const popup = document.getElementById("visitPopup");
const closePopup = document.getElementById("closePopup");
// Show popup after 2.5 seconds
setTimeout(function () {
popup.classList.add("show");
}, 2500);
// Close popup
closePopup.addEventListener("click", function () {
popup.classList.remove("show");
// Remember popup was closed during this browser session
sessionStorage.setItem("masterKleenPopupClosed", "true");
});
// Don't show popup again if user already closed it
if (sessionStorage.getItem("masterKleenPopupClosed") === "true") {
popup.classList.remove("show");
}
/* =====================================
NEWSLETTER
===================================== */
const newsletterForm = document.getElementById("newsletterForm");
const emailInput = document.getElementById("email");
const formMessage = document.getElementById("formMessage");
newsletterForm.addEventListener("submit", function (event) {
event.preventDefault();
const email = emailInput.value.trim();
if (email === "") {
formMessage.textContent = "Please enter your email address.";
return;
}
if (!emailInput.checkValidity()) {
formMessage.textContent = "Please enter a valid email address.";
return;
}
formMessage.textContent =
"Thank you for subscribing to Master Kleen!";
emailInput.value = "";
});
/* =====================================
CURRENT YEAR
===================================== */
document.getElementById("year").textContent =
new Date().getFullYear();
/* =====================================
SCROLL REVEAL
===================================== */
const revealElements = document.querySelectorAll(
".section, .info-card, .service-card, .visual-cta, .newsletter, .final-cta"
);
const observer = new IntersectionObserver(
function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting) {
entry.target.style.opacity = "1";
entry.target.style.transform = "translateY(0)";
observer.unobserve(entry.target);
}
});
},
{
threshold: 0.08
}
);
revealElements.forEach(function (element) {
element.style.opacity = "0";
element.style.transform = "translateY(25px)";
element.style.transition =
"opacity .7s ease, transform .7s ease";
observer.observe(element);
});
});