/* RainSoft of Charlotte - Carolina Water Systems, Inc. */
/* Fonts: Josefin Sans (headings) + Lora (body) */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4b90cd;
  --primary-dark: #2d6ea8;
  --primary-light: #7ab3de;
  --gold: #EDB800;
  --gold-dark: #c49500;
  --navy: #1a2744;
  --navy-light: #243358;
  --light: #f0f7ff;
  --white: #ffffff;
  --text: #2c3e50;
  --text-muted: #5a6a7e;
  --border: #d4e6f5;
  --shadow: 0 4px 24px rgba(27,57,112,0.10);
  --shadow-lg: 0 12px 40px rgba(27,57,112,0.16);
  --radius: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Lora', Georgia, serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 1rem;
}

.skip-link {
  position: absolute; top: -40px; left: 1rem; background: var(--navy);
  color: white; padding: .5rem 1rem; border-radius: 0 0 8px 8px;
  font-family: 'Josefin Sans', sans-serif; font-weight: 600; z-index: 9999;
  text-decoration: none; transition: top .3s;
}
.skip-link:focus { top: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700; color: var(--navy); line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
p { margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  box-shadow: 0 2px 16px rgba(27,57,112,0.10);
  border-bottom: 3px solid var(--gold);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1.5rem; max-width: 1140px; margin: 0 auto; gap: 1rem;
}
.header-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.header-logo img { height: 46px; width: auto; display: block; }

nav.main-nav { display: flex; align-items: center; gap: 1.75rem; }
nav.main-nav a {
  font-family: 'Josefin Sans', sans-serif; font-weight: 600; font-size: .88rem;
  color: var(--navy); text-transform: uppercase; letter-spacing: 1px;
  padding: .25rem 0; border-bottom: 2px solid transparent; transition: all .2s;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--primary); border-bottom-color: var(--gold); }

.header-cta {
  background: var(--gold); color: var(--navy); font-family: 'Josefin Sans', sans-serif;
  font-weight: 700; font-size: .82rem; letter-spacing: 1px; text-transform: uppercase;
  padding: .6rem 1.2rem; border-radius: 50px; white-space: nowrap; transition: all .2s;
}
.header-cta:hover { background: var(--gold-dark); color: var(--navy); transform: translateY(-1px); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: all .3s; }

/* Hero */
.hero {
  position: relative; min-height: 88vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, #243a6b 50%, var(--primary-dark) 100%);
  overflow: hidden;
}
.hero-bg-img {
  position: absolute; inset: 0;
  background: url('https://rainsoftofcharlotte.com/wp-content/uploads/sites/26/2024/02/shutterstock_165584678.jpg') center/cover no-repeat;
  opacity: .1;
}
.hero-glow {
  position: absolute; right: -5%; top: 50%; transform: translateY(-50%);
  width: 55vw; max-width: 700px; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(75,144,205,.22) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.hero-drop {
  position: absolute; right: 6%; top: 50%; transform: translateY(-55%);
  width: clamp(180px, 28vw, 400px); opacity: .12; pointer-events: none;
}
.hero-drop img { width: 100%; height: auto; }
.hero-content { position: relative; z-index: 2; max-width: 660px; padding: 4rem 0; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(237,184,0,.15); border: 1px solid rgba(237,184,0,.4);
  color: var(--gold); font-family: 'Josefin Sans', sans-serif; font-size: .78rem;
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  padding: .4rem 1rem; border-radius: 50px; margin-bottom: 1.5rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero h1 span { color: var(--gold); }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,.85); margin-bottom: 2.5rem; max-width: 540px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: 'Josefin Sans', sans-serif; font-weight: 700; font-size: .88rem;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
  padding: .875rem 2rem; border-radius: 50px;
  cursor: pointer; border: none; transition: all .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 4px 20px rgba(237,184,0,.35); }
.btn-gold:hover { background: var(--gold-dark); color: var(--navy); box-shadow: 0 6px 28px rgba(237,184,0,.45); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); color: var(--white); border-color: white; }
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 20px rgba(75,144,205,.3); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); color: var(--white); }

/* Stats Band */
.stats-band { background: var(--navy); padding: 3.5rem 0; position: relative; overflow: hidden; }
.stats-band::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(75,144,205,.06), transparent);
}
.stats-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 4rem; position: relative; z-index: 1; }
.stat-item { text-align: center; }
.stat-number { font-family: 'Josefin Sans', sans-serif; font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700; color: var(--gold); display: block; line-height: 1; }
.stat-label { font-family: 'Josefin Sans', sans-serif; font-size: .7rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: 2px; display: block; margin-top: .4rem; }
.stat-divider { width: 1px; background: rgba(255,255,255,.12); align-self: stretch; min-height: 55px; }

/* Section headings */
.section-label { display: inline-block; color: var(--primary); font-family: 'Josefin Sans', sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: .75rem; }
.section-title { margin-bottom: .75rem; }
.section-title span { color: var(--primary); }
.section-intro { font-size: 1rem; color: var(--text-muted); max-width: 600px; }
.text-center { text-align: center; }
.text-center .section-intro { margin: 0 auto; }
.section-divider { width: 56px; height: 4px; background: var(--gold); border-radius: 2px; margin: .75rem 0 2rem; }
.text-center .section-divider { margin: .75rem auto 2rem; }

/* Services Grid */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.service-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; transition: all .3s; position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--light); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; color: var(--primary); font-size: 1.5rem; }
.service-card h3 { color: var(--navy); margin-bottom: .5rem; }
.service-card p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* Features split */
.features-split { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.features-image { position: relative; }
.features-image img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: block; }
.features-badge {
  position: absolute; bottom: -1.5rem; right: -1.5rem;
  background: var(--gold); color: var(--navy); font-family: 'Josefin Sans', sans-serif;
  font-weight: 700; padding: 1.25rem 1.5rem; border-radius: var(--radius);
  text-align: center; box-shadow: var(--shadow);
}
.features-badge .badge-number { font-size: 1.9rem; line-height: 1; display: block; }
.features-badge .badge-text { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; }
.feature-list { list-style: none; margin: 1.5rem 0 2rem; }
.feature-list li { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--border); font-size: .97rem; }
.feature-list li:last-child { border-bottom: none; }
.feature-check { color: var(--primary); flex-shrink: 0; margin-top: .15rem; }

/* Testimonials */
.testimonials-section { background: var(--light); }
.testimonial-carousel { position: relative; max-width: 680px; margin: 2rem auto 0; overflow: hidden; }
.tc-track { display: flex; transition: transform .5s ease; }
.tc-slide { min-width: 100%; padding: 2.5rem; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); text-align: center; }
.tc-stars { color: var(--gold); font-size: 1.25rem; margin-bottom: 1rem; letter-spacing: 2px; }
.tc-quote { font-size: 1.05rem; line-height: 1.8; font-style: italic; color: var(--text); margin-bottom: 1.25rem; }
.tc-author { font-family: 'Josefin Sans', sans-serif; font-weight: 600; color: var(--navy); font-size: .88rem; }
.tc-source { color: var(--text-muted); font-size: .78rem; }
.tc-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.tc-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: var(--primary); opacity: .3; cursor: pointer; transition: opacity .3s; }
.tc-dot.active { opacity: 1; }

/* Before/After */
.ba-section { background: var(--navy); padding: 5rem 0; }
.ba-section h2 { color: var(--white); }
.ba-section .section-label { color: var(--gold); }
.ba-section .section-intro { color: rgba(255,255,255,.7); }
.ba-section .section-divider { background: var(--gold); }

/* FAQ */
.faq-list { max-width: 720px; margin: 2rem auto 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.faq-item summary { cursor: pointer; font-family: 'Josefin Sans', sans-serif; font-weight: 600; font-size: .97rem; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--navy); gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; content: ''; }
.faq-chevron { transition: transform .3s; flex-shrink: 0; color: var(--primary); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-item[open] summary { color: var(--primary); }
.faq-answer { padding: .75rem 0 .25rem; color: var(--text-muted); line-height: 1.8; font-size: .97rem; }

/* CTA Band */
.cta-band { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 5rem 0; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ''; position: absolute; width: 500px; height: 500px; background: rgba(255,255,255,.05); border-radius: 50%; top: -180px; right: -80px; pointer-events: none; }
.cta-band h2, .cta-band p { color: var(--white); }
.cta-band p { opacity: .9; margin-bottom: 2rem; font-size: 1.05rem; }

/* Map */
#service-area-map { height: 360px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; }
.contact-info-card { background: var(--navy); color: var(--white); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-lg); }
.contact-info-card h3 { color: var(--white); margin-bottom: 1.5rem; }
.contact-detail { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-icon { color: var(--gold); font-size: 1.2rem; flex-shrink: 0; margin-top: .1rem; }
.contact-detail strong { display: block; font-family: 'Josefin Sans', sans-serif; font-size: .75rem; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: .2rem; }
.contact-detail a { color: var(--white); }
.contact-detail a:hover { color: var(--gold); }
.contact-form-wrap { background: var(--white); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-family: 'Josefin Sans', sans-serif; font-size: .76rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--navy); margin-bottom: .4rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: .75rem 1rem; border: 2px solid var(--border); border-radius: 8px; font-family: 'Lora', serif; font-size: .97rem; color: var(--text); background: var(--white); transition: border-color .2s; -webkit-appearance: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(75,144,205,.12); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-success { display: none; background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; padding: 1rem 1.25rem; border-radius: 8px; font-family: 'Josefin Sans', sans-serif; font-weight: 600; margin-top: 1rem; }

/* Cert badges */
.cert-badges { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: stretch; margin-top: 1.5rem; }
.cert-badge { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; text-align: center; }
.cert-badge span { font-family: 'Josefin Sans', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--navy); display: block; }

/* Page hero */
.page-hero { background: linear-gradient(135deg, var(--navy), var(--primary-dark)); padding: 5rem 0 4rem; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: url('https://rainsoftofcharlotte.com/wp-content/uploads/sites/26/2024/02/shutterstock_165584678.jpg') center/cover no-repeat; opacity: .07; }
.page-hero h1, .page-hero p { color: var(--white); position: relative; z-index: 1; }
.page-hero p { opacity: .85; font-size: 1.05rem; max-width: 560px; }
.page-hero .section-label { color: var(--gold); position: relative; z-index: 1; }

/* Gallery lightbox */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.gallery-img { width: 100%; height: 210px; object-fit: cover; border-radius: var(--radius); cursor: pointer; transition: transform .3s, box-shadow .3s; display: block; }
.gallery-img:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }
#lightbox { display: none; position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.92); align-items: center; justify-content: center; cursor: zoom-out; }
#lightbox-img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.lb-close { position: absolute; top: 1rem; right: 1.5rem; background: none; border: none; color: white; font-size: 2.5rem; cursor: pointer; line-height: 1; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 3.5rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-brand img { height: 42px; width: auto; margin-bottom: 1rem; filter: brightness(10); opacity: .8; }
.footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 300px; }
.footer-col h4 { font-family: 'Josefin Sans', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col a { color: rgba(255,255,255,.65); font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: .78rem; color: rgba(255,255,255,.4); }
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--gold); }

/* Floating CTA */
.floating-cta {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  background: var(--primary); color: white; width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(27,57,112,.35); text-decoration: none;
  border: 3px solid var(--gold); transition: transform .2s, box-shadow .2s;
}
.floating-cta:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(27,57,112,.45); color: white; }

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: .1s; }
.reveal:nth-child(3) { transition-delay: .2s; }
.reveal:nth-child(4) { transition-delay: .3s; }
.reveal:nth-child(5) { transition-delay: .4s; }
.reveal:nth-child(6) { transition-delay: .5s; }

/* Responsive */
@media (max-width: 900px) {
  .features-split { grid-template-columns: 1fr; gap: 2.5rem; }
  .features-badge { bottom: .75rem; right: .75rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  nav.main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 1.5rem; box-shadow: var(--shadow-lg); gap: 1rem; }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { font-size: 1rem; padding: .5rem 0; }
  .nav-toggle { display: block; }
  .stat-divider { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero { min-height: 70vh; }
  .hero-drop { display: none; }
  .hero-glow { display: none; }
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
@media print { .floating-cta, .nav-toggle { display: none; } }
