/* ============================================
   Helping Hands Domestics — Global Styles
   Taste Skill Parameters:
     DESIGN_VARIANCE: 5
     MOTION_INTENSITY: 4
     VISUAL_DENSITY: 3
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* --- Custom Properties --- */
:root {
  --navy: #1A3A5C;
  --navy-light: #234B73;
  --blue: #2E7AB8;
  --blue-hover: #2568A0;
  --sky: #5BA4D9;
  --sky-light: #A8D4F0;
  --light-blue: #E8F4FD;
  --warm-white: #FAFBFC;
  --white: #FFFFFF;
  --slate: #4A5568;
  --slate-light: #718096;
  --border: #E2E8F0;
  --green: #38A169;
  --green-light: #C6F6D5;

  --font-heading: "DM Serif Display", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --h1: clamp(2.25rem, 4vw + 1rem, 3.25rem);
  --h2: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
  --h3: clamp(1.25rem, 2vw + 0.25rem, 1.5rem);
  --h4: clamp(1.1rem, 1.5vw + 0.25rem, 1.25rem);
  --body: clamp(1rem, 0.5vw + 0.875rem, 1.125rem);
  --small: 0.875rem;

  --max-width: 1200px;
  --section-pad: clamp(3rem, 6vw, 6rem);
  --card-radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(26, 58, 92, 0.06), 0 1px 2px rgba(26, 58, 92, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 58, 92, 0.08), 0 2px 4px rgba(26, 58, 92, 0.04);
  --shadow-lg: 0 10px 30px rgba(26, 58, 92, 0.1), 0 4px 8px rgba(26, 58, 92, 0.05);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Typography --- */
body {
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.7;
  color: var(--slate);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); margin-bottom: 1rem; }
h3 { font-size: var(--h3); margin-bottom: 0.75rem; }
h4 { font-size: var(--h4); }

p { margin-bottom: 1rem; max-width: 65ch; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--blue-hover); }

ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2rem);
}

.section {
  padding: var(--section-pad) 0;
}

.section--alt {
  background: var(--light-blue);
}

.section--navy {
  background: var(--navy);
  color: var(--white);
}

.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--white);
}

.section--navy p {
  color: rgba(255, 255, 255, 0.85);
}

/* --- Grid Helpers --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .contact-grid__form {
    order: -1;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn--primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn--outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn--white:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-1px);
}

.btn--white-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--white-outline:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-1px);
}

.btn--small {
  padding: 0.5rem 1.25rem;
  font-size: var(--small);
}

/* =============================================
   SPARKLE BUBBLES — Get a Quote button
   ============================================= */
.btn--bubbles {
  position: relative;
  overflow: visible;
}
.btn--bubbles .bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(91,164,217,0.4));
  box-shadow: inset 0 -2px 4px rgba(91,164,217,0.2), 0 0 6px rgba(91,164,217,0.15);
  animation: bubble-rise 3s ease-in infinite;
}
.btn--bubbles .bubble:nth-child(1) {
  width: 6px; height: 6px;
  left: 15%;
  animation-delay: 0s;
}
.btn--bubbles .bubble:nth-child(2) {
  width: 4px; height: 4px;
  left: 45%;
  animation-delay: 0.8s;
}
.btn--bubbles .bubble:nth-child(3) {
  width: 5px; height: 5px;
  left: 75%;
  animation-delay: 1.6s;
}
.btn--bubbles .bubble:nth-child(4) {
  width: 3px; height: 3px;
  left: 30%;
  animation-delay: 2.2s;
}
.btn--bubbles .bubble:nth-child(5) {
  width: 5px; height: 5px;
  left: 60%;
  animation-delay: 0.4s;
}
@keyframes bubble-rise {
  0%   { bottom: 0; opacity: 0; transform: scale(0.5) translateX(0); }
  15%  { opacity: 0.8; transform: scale(1); }
  100% { bottom: 40px; opacity: 0; transform: scale(0.6) translateX(8px); }
}
[data-theme="dark"] .btn--bubbles .bubble {
  background: radial-gradient(circle at 30% 30%, rgba(168,212,240,0.9), rgba(91,164,217,0.5));
  box-shadow: inset 0 -2px 4px rgba(91,164,217,0.3), 0 0 8px rgba(168,212,240,0.25);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--blue);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

/* --- Image Cards --- */
.img-card {
  background: var(--white);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.img-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.img-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.img-card__body {
  padding: 1.5rem;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 251, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__logo img {
  height: 44px;
  width: auto;
  border-radius: 4px;
}

.header__nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex: 1 1 auto;
  max-width: 720px;
  margin: 0 1.25rem;
  gap: 0.5rem;
  white-space: nowrap;
}

.header__nav a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.8rem;
  position: relative;
  padding: 0.25rem 0;
  white-space: nowrap;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width var(--transition);
}

.header__nav a:hover::after,
.header__nav a.active::after {
  width: 100%;
}

.header__nav a:hover {
  color: var(--blue);
}

.header__cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.8rem;
}

.header__phone svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy);
}

.header__cta--mobile {
  display: none;
}

.theme-toggle.theme-toggle--mobile {
  display: none;
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

/* --- Mobile Nav --- */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  z-index: 999;
  padding: 0.75rem 1.25rem 1rem;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  display: block;
  padding: 0.5rem 0;
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:hover {
  color: var(--blue);
}

.mobile-nav .btn {
  margin-top: 0.5rem;
  text-align: center;
  justify-content: center;
  border-bottom: none !important;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .header__nav {
    display: none;
  }
  .header__cta {
    display: none;
  }
  .header__cta--mobile {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
  }
  .header__cta--mobile .btn--small {
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
  }
  .header__logo img {
    height: 36px;
  }
  .header__inner {
    height: 60px;
  }
  .menu-toggle svg {
    width: 24px;
    height: 24px;
  }
  .mobile-nav {
    max-height: calc(100vh - 60px);
  }
  .menu-toggle {
    display: block;
  }
  .theme-toggle.theme-toggle--mobile {
    display: none;
  }
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--section-pad) 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand img {
  height: 56px;
  margin-bottom: 1rem;
}

.footer__brand p {
  font-size: var(--small);
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
  line-height: 1.6;
}

.footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footer__links {
  list-style: none;
  padding: 0;
}

.footer__links li {
  margin-bottom: 0.6rem;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--small);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  font-size: var(--small);
}

.footer__contact svg {
  width: 18px;
  height: 18px;
  color: var(--sky);
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Contact Info (light bg variant) --- */
.contact-info {
  list-style: none;
  padding: 0;
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--slate);
}

.contact-info svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
  flex-shrink: 0;
}

.contact-info a {
  color: var(--navy);
  font-weight: 500;
}

.contact-info a:hover {
  color: var(--blue);
}

.footer__badges {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer__badges img {
  height: 40px;
  width: auto;
  opacity: 0.8;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-size: var(--small);
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* --- Hero Sections --- */
.hero {
  min-height: min(85dvh, 700px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero--compact {
  min-height: auto;
  padding: var(--section-pad) 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__tagline {
  display: inline-block;
  font-size: var(--small);
  font-weight: 600;
  color: var(--blue);
  background: var(--light-blue);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero__title {
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 1vw + 0.5rem, 1.2rem);
  color: var(--slate);
  max-width: 50ch;
  margin-bottom: 0;
}

.hero__image {
  position: relative;
  z-index: 1;
}

.hero__image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__subtitle {
    margin: 0 auto 1rem;
  }
  .btn-group {
    justify-content: center;
  }
  .hero__image {
    max-width: 500px;
    margin: 0 auto;
  }
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: 3rem;
}

.section-header--center {
  text-align: center;
}

.section-header--center p {
  margin-left: auto;
  margin-right: auto;
}

.section-header__accent {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin-bottom: 1rem;
}

.section-header--center .section-header__accent {
  margin-left: auto;
  margin-right: auto;
}

/* --- Bento Grid --- */
.bento {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.bento__large {
  grid-row: 1 / 3;
}

@media (max-width: 768px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .bento__large {
    grid-row: auto;
  }
}

/* --- Testimonials --- */
.testimonial {
  position: relative;
  padding: 2.5rem;
  background: var(--white);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
}

.testimonial__quote {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--sky-light);
  font-family: var(--font-heading);
}

.testimonial__text {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--slate);
  padding-top: 1.5rem;
}

.testimonial__author {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  font-style: normal;
}

.testimonial__location {
  font-size: var(--small);
  color: var(--slate-light);
}

.testimonials-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.testimonials-nav button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.testimonials-nav button.active {
  background: var(--blue);
  width: 28px;
  border-radius: 5px;
}

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  gap: 1rem;
}

.faq-question:hover {
  color: var(--blue);
}

.faq-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.faq-item.open .faq-toggle {
  background: var(--blue);
  color: var(--white);
  transform: rotate(45deg);
}

.faq-toggle svg {
  width: 16px;
  height: 16px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

.faq-answer p {
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- CTA Banner --- */
/* =============================================
   TRIAL BANNER — Try Before You Buy strip
   ============================================= */
.trial-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 1rem 0;
}
.trial-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.trial-banner__text {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
}
.trial-banner__text strong {
  color: #fff;
}
[data-theme="dark"] .trial-banner {
  background: linear-gradient(135deg, rgba(26,58,92,0.9) 0%, rgba(91,164,217,0.3) 100%);
}

.cta-banner {
  text-align: center;
  padding: clamp(3rem, 5vw, 5rem) 0;
}

.cta-banner h2 {
  margin-bottom: 0.75rem;
}

.cta-banner p {
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.8);
}

.cta-banner .btn-group {
  justify-content: center;
}

/* --- Service Detail --- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
  padding: var(--section-pad) 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:nth-child(even) {
  direction: rtl;
}

.service-detail:nth-child(even) > * {
  direction: ltr;
}

.service-detail__image {
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.service-detail__image img {
  width: 100%;
  object-fit: cover;
}

.service-detail__content h3 {
  font-size: var(--h3);
}

.service-detail__content ul {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.service-detail__content li {
  position: relative;
  padding-left: 0.25rem;
}

@media (max-width: 768px) {
  .service-detail,
  .service-detail:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

/* --- Stepper / Timeline --- */
.stepper {
  position: relative;
  padding-left: 3rem;
}

.stepper::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.stepper__item {
  position: relative;
  padding-bottom: 2.5rem;
}

.stepper__item:last-child {
  padding-bottom: 0;
}

.stepper__number {
  position: absolute;
  left: -3rem;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--small);
  font-weight: 700;
  z-index: 1;
}

.stepper__item h4 {
  margin-bottom: 0.5rem;
}

.stepper__item p {
  font-size: 0.95rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: var(--small);
  color: var(--navy);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 122, 184, 0.12);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Check list (for feature lists) --- */
.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.check-list svg {
  width: 20px;
  height: 20px;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 3px;
}

/* --- Page Hero (compact for inner pages) --- */
.page-hero {
  background: var(--navy);
  padding: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1rem, 1vw + 0.5rem, 1.2rem);
  max-width: 55ch;
  margin: 0 auto;
}

.page-hero .btn-group {
  justify-content: center;
}

/* --- Staggered Grid (avoids equal-column anti-pattern) --- */
.stagger-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
}

.stagger-grid > :nth-child(2) {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .stagger-grid {
    grid-template-columns: 1fr;
  }
  .stagger-grid > :nth-child(2) {
    margin-top: 0;
  }
}

/* --- Pill/Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge--green {
  background: var(--green-light);
  color: var(--green);
}

.badge--blue {
  background: var(--light-blue);
  color: var(--blue);
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Misc --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --navy: #E2E8F0;
  --navy-light: #CBD5E0;
  --warm-white: #0B1222;
  --white: #111B2E;
  --light-blue: #141F33;
  --slate: #A0AEC0;
  --slate-light: #718096;
  --border: #1E2D45;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.15);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.3), 0 4px 8px rgba(0,0,0,0.2);
}

[data-theme="dark"] .header {
  background: rgba(11, 18, 34, 0.92);
  border-bottom-color: var(--border);
}

[data-theme="dark"] .mobile-nav {
  background: var(--white);
}

[data-theme="dark"] .mobile-nav a {
  color: var(--navy);
  border-bottom-color: var(--border);
}

[data-theme="dark"] .header__nav a {
  color: var(--navy);
}

[data-theme="dark"] .header__phone {
  color: var(--navy);
}

[data-theme="dark"] .footer {
  background: #060D18;
}

[data-theme="dark"] .footer h4 {
  color: #FFFFFF;
}

[data-theme="dark"] .section--navy {
  background: #060D18;
}

/* Force readable text in always-dark sections */
[data-theme="dark"] .section--navy h1,
[data-theme="dark"] .section--navy h2,
[data-theme="dark"] .section--navy h3,
[data-theme="dark"] .section--navy h4 {
  color: #FFFFFF;
}

[data-theme="dark"] .section--navy p,
[data-theme="dark"] .section--navy .stat__label {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .section--navy .stat__number {
  color: #FFFFFF;
}

[data-theme="dark"] .section--navy .stat__icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sky);
}

[data-theme="dark"] .page-hero {
  background: #060D18;
}

[data-theme="dark"] .page-hero h1 {
  color: #FFFFFF;
}

[data-theme="dark"] .page-hero p {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .cta-banner h2 {
  color: #FFFFFF;
}

[data-theme="dark"] .cta-banner p {
  color: rgba(255, 255, 255, 0.75);
}

/* Buttons in dark navy sections */
[data-theme="dark"] .btn--white {
  background: #FFFFFF;
  color: #0B1222;
  border-color: #FFFFFF;
}

[data-theme="dark"] .btn--white:hover {
  background: transparent;
  color: #FFFFFF;
  border-color: #FFFFFF;
}

[data-theme="dark"] .btn--white-outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .btn--white-outline:hover {
  background: #FFFFFF;
  color: #0B1222;
  border-color: #FFFFFF;
}

/* Bento large card (navy bg) stays readable */
[data-theme="dark"] .bento__large {
  background: #0A1628 !important;
}

[data-theme="dark"] .bento__large h3 {
  color: #FFFFFF !important;
}

[data-theme="dark"] .bento__large p {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .faq-question {
  color: var(--navy);
}

[data-theme="dark"] .faq-toggle {
  background: var(--border);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select {
  background: #141F33;
  border-color: var(--border);
  color: var(--navy);
}

[data-theme="dark"] .form-label {
  color: var(--navy);
}

[data-theme="dark"] .testimonial {
  background: var(--white);
}

[data-theme="dark"] .testimonial__author {
  color: var(--navy);
}

[data-theme="dark"] .img-card__image {
  background: #141F33;
}

[data-theme="dark"] .service-detail__image img {
  background: #141F33;
}

[data-theme="dark"] .hero__image img {
  box-shadow: none;
}

[data-theme="dark"] .footer__brand img {
  opacity: 0.85;
}

[data-theme="dark"] .contact-info li {
  color: var(--slate);
}

[data-theme="dark"] .contact-info a {
  color: var(--navy);
}

/* ============================================
   DARK MODE TOGGLE — Spray Bottle
   ============================================ */
.theme-toggle {
  position: relative;
  background: none;
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--blue);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--blue);
  background: var(--light-blue);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.theme-toggle:active svg {
  transform: rotate(-15deg);
}

/* Spray particles burst on toggle */
.spray-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: visible;
}

.spray-particles.spraying::before,
.spray-particles.spraying::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sky);
  animation: sprayBurst 0.6s ease-out forwards;
}

.spray-particles.spraying::before {
  top: -4px;
  left: 50%;
  animation-delay: 0s;
}

.spray-particles.spraying::after {
  top: -2px;
  right: 2px;
  animation-delay: 0.1s;
}

@keyframes sprayBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx, -8px), var(--ty, -20px)) scale(0.3); }
}

.spray-particles.spraying::before { --tx: -12px; --ty: -22px; }
.spray-particles.spraying::after { --tx: 10px; --ty: -18px; }

/* ============================================
   PAGE TRANSITIONS — Cleaning Wipe
   ============================================ */
body {
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.page-loaded {
  opacity: 1;
}

/* Sparkle transition overlay */
.wipe-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.wipe-spark {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(168,212,240,0.6) 40%, transparent 70%);
  box-shadow: 0 0 8px rgba(91, 164, 217, 0.6);
  animation: wipeSparkle 1s ease-out forwards;
  pointer-events: none;
}

[data-theme="dark"] .wipe-spark {
  background: radial-gradient(circle, rgba(168,212,240,0.95) 0%, rgba(91,164,217,0.5) 40%, transparent 70%);
  box-shadow: 0 0 10px rgba(91, 164, 217, 0.8);
}

@keyframes wipeSparkle {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  25% {
    opacity: 1;
    transform: scale(1.5);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) translateY(-40px);
  }
}

/* ============================================
   SPARKLE CURSOR TRAIL — applies to all cards
   ============================================ */
.sparkle-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 164, 217, 0.9) 0%, rgba(91, 164, 217, 0) 70%);
  pointer-events: none;
  z-index: 10;
  animation: sparkleFloat 0.8s ease-out forwards;
}

@keyframes sparkleFloat {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.5) translateY(-8px);
  }
  100% {
    opacity: 0;
    transform: scale(0.5) translateY(-20px);
  }
}

/* Extra sparkle star shapes (every 3rd particle) */
.sparkle-particle:nth-child(3n) {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(168, 212, 240, 0.5) 40%, transparent 70%);
  box-shadow: 0 0 6px rgba(91, 164, 217, 0.5);
}

[data-theme="dark"] .sparkle-particle {
  background: radial-gradient(circle, rgba(168, 212, 240, 0.9) 0%, rgba(168, 212, 240, 0) 70%);
}

[data-theme="dark"] .sparkle-particle:nth-child(3n) {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(91, 164, 217, 0.6) 40%, transparent 70%);
  box-shadow: 0 0 8px rgba(91, 164, 217, 0.7);
}

/* ============================================
   CARD POLISH EFFECT — matte to glossy on hover
   ============================================ */
.polish-card {
  position: relative;
  overflow: hidden;
  filter: saturate(0.85) brightness(0.97);
  transition: filter 0.5s ease, box-shadow 0.5s ease, transform 0.3s ease;
}

/* The "wipe" shine effect */
.polish-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.12) 40%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.12) 60%,
    transparent 80%
  );
  transition: left 0.7s ease;
  z-index: 5;
  pointer-events: none;
}

.polish-card:hover {
  filter: saturate(1.1) brightness(1.02);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.polish-card:hover::after {
  left: 120%;
}

[data-theme="dark"] .polish-card::after {
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(168, 212, 240, 0.05) 40%,
    rgba(168, 212, 240, 0.12) 50%,
    rgba(168, 212, 240, 0.05) 60%,
    transparent 80%
  );
}

/* ============================================
   ANIMATED STAT COUNTERS
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat {
  padding: 2rem 1rem;
}

.stat__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-light);
}

.stat__icon svg {
  width: 26px;
  height: 26px;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3vw + 0.5rem, 2.75rem);
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat__label {
  font-size: var(--small);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PROGRESSIVE IMAGE LOADING (blur-up)
   ============================================ */
.img-blur {
  filter: blur(8px);
  transform: scale(1.02);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.img-sharp {
  filter: blur(0);
  transform: scale(1);
}

/* ============================================
   ANIMATED SVG ICONS (Lottie-style CSS)
   ============================================ */

/* Broom sweep — gentle rocking */
.anim-icon--broom {
  animation: broomSweep 3s ease-in-out infinite;
  transform-origin: 50% 85%;
}

@keyframes broomSweep {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(12deg); }
  75% { transform: rotate(-12deg); }
}

/* Sparkle pulse — twinkling star */
.anim-icon--sparkle {
  animation: sparklePulse 2s ease-in-out infinite;
}

@keyframes sparklePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* Bubbles — floating upward */
.anim-icon--bubbles {
  animation: bubbleFloat 4s ease-in-out infinite;
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Shield — gentle pulse */
.anim-icon--shield {
  animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* Heart — heartbeat */
.anim-icon--heart {
  animation: heartbeat 2.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.1); }
  28% { transform: scale(1); }
  42% { transform: scale(1.08); }
  56% { transform: scale(1); }
}

/* Leaf — gentle sway */
.anim-icon--leaf {
  animation: leafSway 4s ease-in-out infinite;
  transform-origin: 50% 100%;
}

@keyframes leafSway {
  0%, 100% { transform: rotate(0deg); }
  33% { transform: rotate(8deg); }
  66% { transform: rotate(-5deg); }
}

/* Clock — tick */
.anim-icon--clock {
  animation: clockTick 2s steps(1) infinite;
}

/* Spray — spritz */
.anim-icon--spray {
  animation: sprayPump 3s ease-in-out infinite;
  transform-origin: 50% 50%;
}

@keyframes sprayPump {
  0%, 100% { transform: scale(1) rotate(0deg); }
  15% { transform: scale(1.05) rotate(-3deg); }
  30% { transform: scale(1) rotate(0deg); }
}

/* ============================================
   SPARKLE BORDER CARD — Try Before You Buy
   ============================================ */
.sparkle-border-card {
  position: relative;
  border-radius: var(--card-radius);
  padding: 3px;
  background: linear-gradient(
    var(--angle, 0deg),
    var(--blue),
    var(--sky-light),
    rgba(255, 255, 255, 0.9),
    var(--sky),
    var(--blue),
    var(--sky-light),
    rgba(255, 255, 255, 0.9),
    var(--sky)
  );
  background-size: 400% 400%;
  animation: sparkleRotate 4s linear infinite;
  box-shadow:
    0 0 20px rgba(91, 164, 217, 0.15),
    0 0 60px rgba(91, 164, 217, 0.08);
  transition: box-shadow 0.3s ease;
}

.sparkle-border-card:hover {
  box-shadow:
    0 0 25px rgba(91, 164, 217, 0.25),
    0 0 80px rgba(91, 164, 217, 0.12);
}

.sparkle-border-inner {
  background: var(--warm-white);
  border-radius: calc(var(--card-radius) - 2px);
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

/* Shimmer sparkle dots on the border */
.sparkle-border-card::before,
.sparkle-border-card::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 10px 2px rgba(168, 212, 240, 0.8), 0 0 20px 4px rgba(91, 164, 217, 0.4);
  animation: sparkleOrbit 4s linear infinite;
  z-index: 2;
  pointer-events: none;
}

.sparkle-border-card::before {
  animation-delay: 0s;
}

.sparkle-border-card::after {
  animation-delay: -2s;
}

@keyframes sparkleRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes sparkleOrbit {
  0%    { top: -4px;          left: 5%;           opacity: 0; }
  2%    {                                         opacity: 1; }
  /* Top edge: left to right */
  25%   { top: -4px;          left: 95%;          opacity: 1; }
  /* Right edge: top to bottom */
  26%   { top: 0%;            left: calc(100% - 4px); }
  50%   { top: calc(100% - 4px); left: calc(100% - 4px); opacity: 1; }
  /* Bottom edge: right to left */
  51%   { top: calc(100% - 4px); left: 95%; }
  75%   { top: calc(100% - 4px); left: 5%;        opacity: 1; }
  /* Left edge: bottom to top */
  76%   { top: calc(100% - 4px); left: -4px; }
  98%   { top: -4px;          left: -4px;          opacity: 1; }
  100%  { top: -4px;          left: 5%;            opacity: 0; }
}

[data-theme="dark"] .sparkle-border-card {
  box-shadow:
    0 0 25px rgba(91, 164, 217, 0.2),
    0 0 80px rgba(91, 164, 217, 0.1);
}

[data-theme="dark"] .sparkle-border-card:hover {
  box-shadow:
    0 0 30px rgba(91, 164, 217, 0.35),
    0 0 100px rgba(91, 164, 217, 0.15);
}

[data-theme="dark"] .sparkle-border-inner {
  background: var(--white);
}

[data-theme="dark"] .sparkle-border-card::before,
[data-theme="dark"] .sparkle-border-card::after {
  box-shadow: 0 0 12px 3px rgba(168, 212, 240, 0.9), 0 0 25px 5px rgba(91, 164, 217, 0.5);
}

/* Generic hover boost for all animated icons */
.card__icon:hover .anim-icon--broom,
.card__icon:hover .anim-icon--sparkle,
.card__icon:hover .anim-icon--bubbles,
.card__icon:hover .anim-icon--shield,
.card__icon:hover .anim-icon--heart,
.card__icon:hover .anim-icon--leaf {
  animation-duration: 0.8s;
}
