/* =========================================================================
   KQuality Cleaning Services — Design System
   Premium, Apple/Stripe/Linear-inspired styling.
   ========================================================================= */

:root {
  --color-blue: #1976D2;
  --color-green: #58B947;
  --color-white: #FFFFFF;
  --color-gray-light: #F6F8FA;
  --color-text: #16324F;
  --color-cyan: #22D3EE;

  --color-blue-dark: #125A9C;
  --color-green-dark: #3F8F35;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.35);
  --shadow-soft: 0 20px 60px rgba(22, 50, 79, 0.08);
  --shadow-lift: 0 30px 80px rgba(22, 50, 79, 0.16);

  --font-display: 'Clash Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;

  --section-padding: clamp(4rem, 8vw, 9rem);
  --container-width: min(1180px, 92vw);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.3s;
  --dur-med: 0.6s;
  --dur-slow: 1.1s;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
  line-height: 1.55;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: var(--container-width);
  margin-inline: auto;
}

section {
  position: relative;
  padding-block: var(--section-padding);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.75rem, 6vw, 5rem); font-weight: 700; line-height: 1.05; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 700; line-height: 1.1; }
h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); font-weight: 600; }
p  { margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out-soft), box-shadow var(--dur-fast) var(--ease-out-soft), background var(--dur-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  color: var(--color-white);
  box-shadow: 0 12px 30px rgba(25, 118, 210, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(25, 118, 210, 0.45); }

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: var(--color-text);
}
.btn-secondary:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }

.btn-block { width: 100%; }

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background var(--dur-fast), box-shadow var(--dur-fast), padding var(--dur-fast);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(22, 50, 79, 0.06);
  padding: 0.6rem 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 0.6rem; }
.nav-logo img { height: 42px; width: auto; }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a { opacity: 0.8; transition: opacity var(--dur-fast); }
.nav-links a:hover { opacity: 1; color: var(--color-blue); }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(25,118,210,0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(88,185,71,0.12), transparent 60%),
    linear-gradient(180deg, var(--color-white) 0%, var(--color-gray-light) 100%);
  overflow: hidden;
}
.hero-particles {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-particles span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25,118,210,0.35), rgba(88,185,71,0.05));
  filter: blur(1px);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(20px) translateX(0); opacity: 0; }
  10%  { opacity: 0.8; }
  100% { transform: translateY(-120vh) translateX(30px); opacity: 0; }
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero-content p.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: rgba(22,50,79,0.75);
  margin-top: 1.5rem;
  max-width: 560px;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.hero-visual {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 46%;
  max-width: 620px;
  z-index: 0;
  opacity: 0.9;
}

.transform-section {
  background: var(--color-text);
  color: var(--color-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.transform-stage {
  position: relative;
  width: min(880px, 90vw);
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 3rem;
  box-shadow: var(--shadow-lift);
}
.transform-stage .layer {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.6s var(--ease-out-soft), filter 0.6s var(--ease-out-soft);
}
.transform-stage .layer.dirty   { background: linear-gradient(135deg,#6b5b45,#3f3830); filter: saturate(0.6) brightness(0.7); }
.transform-stage .layer.cleaner { background: linear-gradient(135deg,#3f6b8f,#274a63); filter: saturate(0.9) brightness(0.9); }
.transform-stage .layer.sparkling { background: linear-gradient(135deg,#1976D2,#58B947); filter: saturate(1.1) brightness(1.05); }
.transform-stage .layer.luxury  { background: linear-gradient(135deg,#22D3EE,#F6F8FA); filter: saturate(1.2) brightness(1.15); }
.transform-caption {
  margin-top: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

.section-header {
  max-width: 640px;
  margin: 0 auto 3.5rem;
  text-align: center;
}
.section-header p { color: rgba(22,50,79,0.65); margin-top: 1rem; font-size: 1.05rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
.service-card {
  padding: 2.25rem 1.75rem;
  transform-style: preserve-3d;
  transition: transform var(--dur-med) var(--ease-out-soft), box-shadow var(--dur-med);
  cursor: pointer;
}
.service-card:hover {
  transform: translateY(-10px) rotateX(4deg) rotateY(-4deg);
  box-shadow: var(--shadow-lift);
}
.service-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  color: white; font-size: 1.5rem; margin-bottom: 1.25rem;
}
.service-card h3 { margin-bottom: 0.6rem; }
.service-card .desc { color: rgba(22,50,79,0.65); font-size: 0.95rem; margin-bottom: 1.25rem; }
.service-meta {
  display: flex; justify-content: space-between;
  font-size: 0.85rem; font-weight: 600;
  color: var(--color-blue);
  border-top: 1px solid rgba(22,50,79,0.08);
  padding-top: 1rem;
  margin-bottom: 1rem;
}
.service-card .card-cta {
  font-size: 0.9rem; font-weight: 600; color: var(--color-green);
  display: inline-flex; align-items: center; gap: 0.4rem;
}

.trust-section { background: var(--color-gray-light); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.stat-card { padding: 2.25rem 1rem; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { margin-top: 0.5rem; font-size: 0.9rem; color: rgba(22,50,79,0.65); font-weight: 500; }

.process-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x proximity;
}
.process-step {
  flex: 0 0 220px;
  scroll-snap-align: start;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}
.process-step .step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  color: white; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.process-step h4 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.process-step p { font-size: 0.85rem; color: rgba(22,50,79,0.6); }

.ba-slider {
  position: relative;
  width: min(880px, 92vw);
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  user-select: none;
}
.ba-slider .ba-before, .ba-slider .ba-after {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end; padding: 1.25rem;
  font-weight: 700; color: white; font-size: 0.9rem;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.ba-slider .ba-before { background: linear-gradient(135deg,#5f544a,#332c26); }
.ba-slider .ba-after {
  background: linear-gradient(135deg,#1976D2,#58B947);
  clip-path: inset(0 0 0 50%);
}
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 4px; background: white;
  transform: translateX(-50%);
  cursor: ew-resize;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.3);
}
.ba-handle::after {
  content: '⇔';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--color-blue);
  box-shadow: var(--shadow-soft);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.testimonial-card { padding: 2rem; }
.testimonial-stars { color: #F5B301; font-size: 1rem; margin-bottom: 0.75rem; }
.testimonial-quote { font-size: 0.95rem; color: rgba(22,50,79,0.8); margin-bottom: 1.25rem; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.85rem;
}
.testimonial-source { font-size: 0.75rem; color: rgba(22,50,79,0.5); }

.funnel-section { background: linear-gradient(180deg, var(--color-gray-light), var(--color-white)); }
.funnel-shell {
  width: min(680px, 94vw);
  margin: 0 auto;
  padding: 2.5rem;
}
.funnel-progress {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 2rem;
}
.funnel-progress .bar {
  flex: 1; height: 6px; border-radius: 999px;
  background: rgba(22,50,79,0.1);
  overflow: hidden;
}
.funnel-progress .bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  transition: width var(--dur-med) var(--ease-out-soft);
}
.funnel-step { display: none; animation: stepIn var(--dur-med) var(--ease-out-soft); }
.funnel-step.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
.funnel-step h3 { margin-bottom: 1.5rem; }
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.9rem;
}
.option-card {
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(22,50,79,0.1);
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--dur-fast);
  background: white;
}
.option-card:hover { border-color: var(--color-blue); transform: translateY(-2px); }
.option-card.selected {
  border-color: var(--color-blue);
  background: linear-gradient(135deg, rgba(25,118,210,0.08), rgba(88,185,71,0.08));
  box-shadow: 0 8px 20px rgba(25,118,210,0.15);
}
.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.5rem; color: rgba(22,50,79,0.7); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(22,50,79,0.12);
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
  transition: border var(--dur-fast);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--color-blue);
}
.stepper { display: flex; align-items: center; gap: 1rem; }
.stepper button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(22,50,79,0.15);
  background: white; font-size: 1.2rem; cursor: pointer;
  font-weight: 700; color: var(--color-blue);
}
.stepper span { font-size: 1.1rem; font-weight: 700; min-width: 2ch; text-align: center; }
.funnel-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem;
}
.quote-preview {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(25,118,210,0.06);
  font-size: 0.9rem;
  color: var(--color-blue-dark);
  font-weight: 600;
}
.review-summary { font-size: 0.9rem; }
.review-summary div { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px dashed rgba(22,50,79,0.1); }
.funnel-success {
  text-align: center;
  padding: 3rem 1rem;
}
.funnel-success .check {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 2.2rem; margin: 0 auto 1.5rem;
  animation: popIn 0.5s var(--ease-out-soft);
}
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

.ai-assistant-toggle {
  position: fixed;
  bottom: 1.75rem; right: 1.75rem;
  z-index: 200;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  color: white; border: none; cursor: pointer;
  font-size: 1.6rem;
  box-shadow: 0 14px 34px rgba(25,118,210,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur-fast);
}
.ai-assistant-toggle:hover { transform: scale(1.08); }
.ai-assistant-panel {
  position: fixed;
  bottom: 6.5rem; right: 1.75rem;
  z-index: 200;
  width: min(340px, 88vw);
  max-height: 60vh;
  display: flex; flex-direction: column;
  padding: 1.25rem;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-fast) var(--ease-out-soft);
}
.ai-assistant-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.ai-msgs { flex: 1; overflow-y: auto; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.ai-msg { padding: 0.7rem 1rem; border-radius: 14px; font-size: 0.88rem; max-width: 85%; }
.ai-msg.bot { background: rgba(25,118,210,0.08); align-self: flex-start; }
.ai-msg.user { background: linear-gradient(135deg, var(--color-blue), var(--color-green)); color: white; align-self: flex-end; }
.ai-input-row { display: flex; gap: 0.5rem; }
.ai-input-row input {
  flex: 1; padding: 0.7rem 1rem; border-radius: 999px;
  border: 1.5px solid rgba(22,50,79,0.12); font-size: 0.9rem;
}
.ai-input-row button {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  color: white; cursor: pointer;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}
.contact-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; border-radius: var(--radius-lg); }
.contact-info { padding: 2.25rem; display: flex; flex-direction: column; gap: 1.5rem; }
.contact-row { display: flex; gap: 1rem; align-items: flex-start; }
.contact-row .icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  color: white; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-row h4 { margin-bottom: 0.25rem; font-size: 1rem; }
.contact-row p { font-size: 0.9rem; color: rgba(22,50,79,0.65); }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem;
  text-align: center;
  font-size: 0.85rem;
}
footer .footer-links {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
footer a:hover { color: white; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

[data-animate] { opacity: 0; transform: translateY(30px); }
[data-animate].is-visible { opacity: 1; transform: translateY(0); transition: opacity 0.8s var(--ease-out-soft), transform 0.8s var(--ease-out-soft); }
