/*
 * Custom stylesheet for Crystal Clear Pool & Spas.
 * Modern, refined design with clean typography and polished details.
 */

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
    --brand-dark:   #005f8e;
    --brand-mid:    #0077b6;
    --brand-light:  #00b4d8;
    --accent:       #90e0ef;
    --bg-light:     #f0f6fa;
    --bg-white:     #ffffff;
    --text-dark:    #1a2733;
    --text-muted:   #5a6e7d;
    --shadow-sm:    0 2px 8px rgba(0, 119, 182, 0.10);
    --shadow-md:    0 6px 24px rgba(0, 119, 182, 0.14);
    --shadow-lg:    0 12px 40px rgba(0, 119, 182, 0.18);
    --radius:       10px;
    --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    color: var(--text-dark);
    background: var(--bg-white);
    scroll-behavior: smooth;
}

/* ── Navigation ─────────────────────────────────────────────────── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 119, 182, 0.10);
    box-shadow: 0 2px 16px rgba(0, 119, 182, 0.08);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
}

nav .logo {
    font-family: 'Nunito', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--brand-mid);
    letter-spacing: -0.3px;
}

nav .logo span {
    color: var(--text-dark);
    font-weight: 600;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 16px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    transition: background-color var(--transition), color var(--transition);
}

nav ul li a:hover {
    background-color: var(--brand-mid);
    color: #fff;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
    height: 100vh;
    background-image: url('images/cleaning.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(0, 50, 80, 0.62) 0%,
        rgba(0, 119, 182, 0.48) 100%
    );
}

.hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 0 24px;
    animation: fadeUp 0.9s ease both;
}

.hero h1 {
    font-family: 'Nunito', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 18px;
    line-height: 1.15;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 32px;
    line-height: 1.65;
    opacity: 0.92;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-mid) 100%);
    color: #fff;
    padding: 14px 34px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.97rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 18px rgba(0, 119, 182, 0.38);
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 119, 182, 0.45);
}

/* ── Services ───────────────────────────────────────────────────── */
.services {
    padding: 100px 20px;
    background-color: var(--bg-light);
    text-align: center;
}

.services h2 {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--brand-dark);
    letter-spacing: -0.4px;
}

.services .section-sub {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 56px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.service-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1160px;
    margin: 0 auto;
}

.service-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 34px 28px;
    width: 300px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 119, 182, 0.07);
    transition: transform var(--transition), box-shadow var(--transition);
    text-align: left;
}

.service-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service-item .icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    display: block;
}

.service-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--brand-dark);
}

.service-item p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ── About ──────────────────────────────────────────────────────── */
.about {
    padding: 100px 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    max-width: 1160px;
    margin: 0 auto;
    gap: 64px;
}

.about .text {
    flex: 1 1 400px;
    max-width: 540px;
}

.about .text h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--brand-dark);
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.about .text p {
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--text-muted);
}

/* Smaller, more refined about image */
.about .image {
    flex: 0 0 auto;
    width: 380px;
    max-width: 100%;
}

.about .image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    display: block;
}

/* ── Stat strip ─────────────────────────────────────────────────── */
.stats {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
    color: #fff;
    padding: 56px 20px;
    text-align: center;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    flex: 1 1 200px;
    padding: 20px 32px;
    border-right: 1px solid rgba(255,255,255,0.18);
}

.stat-item:last-child { border-right: none; }

.stat-item .num {
    font-size: 2.4rem;
    font-weight: 800;
    display: block;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-item .label {
    font-size: 0.85rem;
    opacity: 0.80;
    letter-spacing: 0.5px;
}

/* ── Call to action ─────────────────────────────────────────────── */
.call-to-action {
    background: var(--bg-light);
    padding: 88px 20px;
    text-align: center;
}

.call-to-action h2 {
    font-size: 1.95rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--brand-dark);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.call-to-action p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

.call-to-action a.cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-mid) 100%);
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(0, 119, 182, 0.35);
    transition: transform var(--transition), box-shadow var(--transition);
}

.call-to-action a.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 119, 182, 0.44);
}

/* ── Contact ────────────────────────────────────────────────────── */
.contact {
    padding: 100px 20px;
    background: var(--bg-white);
    text-align: center;
}

.contact h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--brand-dark);
    letter-spacing: -0.3px;
}

.contact .phone {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.contact .phone a {
    color: var(--brand-mid);
    text-decoration: none;
    transition: color var(--transition);
}

.contact .phone a:hover { color: var(--brand-dark); }

.contact p {
    font-size: 0.97rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 auto 8px;
    max-width: 480px;
}

/* ── Footer ─────────────────────────────────────────────────────── */
footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.55);
    text-align: center;
    padding: 22px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .service-item { width: 45%; }
    .about { flex-direction: column; gap: 36px; }
    .about .image { width: 100%; max-width: 420px; }
    .about .image img { height: 260px; }
    .stat-item { flex: 1 1 160px; }
}

@media (max-width: 600px) {
    nav ul { flex-direction: column; align-items: flex-start; }
    nav ul li { margin-left: 0; margin-top: 10px; }
    .service-item { width: 100%; }
    .hero h1 { font-size: 2.2rem; }
    .hero p  { font-size: 0.97rem; }
    .call-to-action h2 { font-size: 1.55rem; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.18); }
    .stat-item:last-child { border-bottom: none; }
}
