/* ==========================================================================
   bill-savers.com - CSS Stylesheet
   Designed for Visual Excellence, Rich Aesthetics, and Smooth Interactions
   ========================================================================== */

/* --- Design Tokens & Variables --- */
:root {
  /* Harmonious, Catchy HSL Color Palette */
  --color-primary: hsl(185, 85%, 40%);          /* Teal / Energy Cyan */
  --color-primary-dark: hsl(185, 90%, 30%);     /* Darker Teal for high contrast */
  --color-primary-light: hsl(185, 50%, 94%);    /* Tinted white-teal background */
  
  --color-secondary: hsl(42, 95%, 52%);         /* Bright Gold / Money Yellow */
  --color-secondary-dark: hsl(38, 90%, 42%);    /* Contrast Gold/Bronze */
  --color-secondary-light: hsl(42, 100%, 96%);  /* Tinted white-gold background */
  
  --color-dark: hsl(215, 45%, 15%);             /* Slate Blue for text & dark backgrounds */
  --color-dark-muted: hsl(215, 20%, 40%);       /* Subdued Slate for subtitles */
  --color-light: hsl(210, 25%, 98%);            /* Off-white background */
  --color-white: hsl(0, 0%, 100%);
  
  --color-border: hsl(210, 15%, 90%);           /* Subtle lines */
  --color-glass-bg: hsla(0, 0%, 100%, 0.75);    /* Glassmorphism background */
  --color-glass-border: hsla(0, 0%, 100%, 0.4);
  --color-texture-dot: hsla(215, 30%, 15%, 0.04); /* Subtlest background dot pattern color */
  
  /* Fonts */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Shadow Systems */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(13, 139, 193, 0.1);
  --shadow-glass: 0 8px 32px 0 rgba(13, 139, 193, 0.06);
  
  /* Transition Constants */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark);
  scroll-behavior: smooth;
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p {
  color: var(--color-dark-muted);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* --- Custom Utilities & Common Elements --- */
.section-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.text-center { text-align: center; }
.text-white { color: var(--color-white) !important; }
.text-light { color: hsl(210, 20%, 80%) !important; }
.relative { position: relative; }
.flex-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Section Headers */
.section-header {
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.title-underline {
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  margin: 0 auto 1.5rem auto;
  border-radius: 2px;
}

.title-underline.underline-secondary {
  background: var(--color-secondary);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-dark-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  gap: 0.6rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.05rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-dark);
}

.btn-secondary:hover {
  background-color: hsl(42, 95%, 45%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: transparent;
}

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

.btn-light {
  background-color: var(--color-white);
  color: var(--color-dark);
}

.btn-light:hover {
  background-color: var(--color-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- Header / Navigation Bar --- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-normal);
  border-bottom: 1px solid transparent;
}

/* Glassmorphism scroll style applied via JS */
#site-header.scrolled {
  background-color: var(--color-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-glass-border);
  box-shadow: var(--shadow-glass);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: inline-block;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 50px;
  height: 50px;
  transition: transform var(--transition-normal);
}

.logo-link:hover .logo-icon {
  transform: scale(1.05) rotate(-3deg);
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.logo-title .accent {
  color: var(--color-primary);
  font-weight: 900;
}

/* Desktop Navigation Link Styling */
.desktop-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.desktop-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-dark);
  position: relative;
  padding: 0.25rem 0;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.desktop-nav a:hover::after {
  width: 100%;
}

.desktop-nav a:hover {
  color: var(--color-primary);
}

/* Header CTA Phone button */
.header-cta .btn {
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

/* --- Section 1: Hero Section (Parallax) --- */
.parallax-section {
  position: relative;
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding-top: 6rem;
}

.parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(240, 248, 250, 0.88) 100%);
  z-index: 1;
}

.parallax-overlay.darkened {
  background: linear-gradient(135deg, rgba(13, 30, 43, 0.94) 0%, rgba(8, 20, 31, 0.96) 100%);
}

.parallax-section > .section-container {
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding-bottom: 2rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--color-dark);
  margin: 1.25rem 0;
  letter-spacing: -0.04em;
}

.hero-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-dark-muted);
  margin-bottom: 2.5rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 4rem;
}

/* Badge label */
.badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 1.25rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-radius: 50px;
}

/* Animated mouse scroll indicator */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-dark-muted);
  opacity: 0.8;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--color-dark-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse .wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel-anim 1.8s infinite;
}

@keyframes scroll-wheel-anim {
  0% { top: 6px; opacity: 1; }
  50% { top: 18px; opacity: 0; }
  100% { top: 6px; opacity: 1; }
}

/* --- Section 2: Why Compare Section (Grid + Textures) --- */
.textured-section {
  background-color: var(--color-light);
  /* CSS Texture: Subtle dot grid */
  background-image: radial-gradient(var(--color-texture-dot) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  position: relative;
}

.textured-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, var(--color-white), transparent);
  pointer-events: none;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 3rem 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.feature-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  transition: transform var(--transition-fast);
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(2deg);
}

/* Color codes for icons */
.circle-teal {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.circle-gold {
  background-color: var(--color-secondary-light);
  color: var(--color-secondary-dark);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Section 3: Why Switch Section (Dark Parallax Overlay) --- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem 3rem;
  margin-top: 2rem;
}

.benefit-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-normal);
}

.benefit-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.benefit-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background-color: var(--color-secondary);
  color: var(--color-dark);
  font-weight: 800;
  font-size: 0.85rem;
}

.benefit-text h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.benefit-text p {
  font-size: 0.925rem;
  color: hsl(210, 15%, 80%);
  line-height: 1.5;
}

/* --- Section 4: How It Works Section (Timeline Steps) --- */
.steps-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  position: relative;
  margin-bottom: 5rem;
}

/* Connecting dotted line decoration (hidden on smaller screens) */
.steps-timeline::after {
  content: '';
  position: absolute;
  top: 130px;
  left: 10%;
  right: 10%;
  height: 2px;
  border-top: 3px dotted var(--color-border);
  z-index: 1;
  pointer-events: none;
}

.step-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 3.5rem 2rem 2.5rem 2rem;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  z-index: 2;
  transition: all var(--transition-normal);
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-dark);
  color: var(--color-white);
  font-weight: 900;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 3px solid var(--color-white);
  transition: all var(--transition-normal);
}

.step-card:hover .step-number {
  background-color: var(--color-primary);
  transform: translateX(-50%) scale(1.1);
}

.step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem auto;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}

.step-card:hover .step-icon {
  transform: rotate(15deg);
}

.step-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.step-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Call To Action Banner */
.cta-banner-wrapper {
  margin-top: 4rem;
}

.cta-banner {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  border-radius: 28px;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-lg);
  color: var(--color-white);
}

.cta-text {
  max-width: 600px;
}

.cta-text h3 {
  font-size: 1.85rem;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.cta-text p {
  color: hsl(185, 20%, 90%);
  font-size: 1.05rem;
}

.cta-button-group {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

/* --- Footer & Contact Details --- */
footer {
  background-color: var(--color-dark);
  color: hsl(215, 15%, 75%);
  position: relative;
  overflow: hidden;
}

/* Subtlest grid line inside footer */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  background-image: linear-gradient(to right, #fff 1px, transparent 1px), linear-gradient(to bottom, #fff 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.footer-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5rem 0 4rem 0;
}

.footer-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 4rem;
}

.footer-brand .logo-wrapper {
  margin-bottom: 1.5rem;
}

.logo-white {
  color: var(--color-white);
}

.brand-desc {
  color: hsl(215, 12%, 70%);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 380px;
}

.office-hours {
  font-size: 0.875rem;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  display: inline-block;
}

.office-hours strong {
  color: var(--color-white);
}

.footer-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--color-secondary);
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-link-item {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact-link-item:hover .val {
  color: var(--color-white);
  text-decoration: underline;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  transition: all var(--transition-fast);
}

.contact-link-item:hover .contact-icon {
  background-color: var(--color-secondary);
  color: var(--color-dark);
}

.contact-link-item .label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(215, 12%, 55%);
}

.contact-link-item .val {
  font-size: 1.05rem;
  font-weight: 700;
  color: hsl(215, 12%, 85%);
}

.footer-address address {
  font-style: normal;
  line-height: 1.7;
  color: hsl(215, 12%, 70%);
}

.footer-address .address-item {
  display: flex;
  gap: 1rem;
}

.footer-address .contact-icon {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Footer Bottom links bar */
.footer-bottom {
  padding: 2rem 0;
  font-size: 0.875rem;
}

.footer-legal-links {
  display: flex;
  gap: 2rem;
}

.footer-legal-links a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

/* --- Floating quick-call widget (mobile) --- */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: var(--color-secondary);
  color: var(--color-dark);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(224, 159, 0, 0.4);
  display: none; /* Displayed via media query on mobile */
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all var(--transition-fast);
}

.floating-cta:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(224, 159, 0, 0.5);
}

/* --- Core Animation & Scroll triggers --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in-anim 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

@keyframes fade-in-anim {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Animation Trigger Styles */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  pointer-events: none; /* Prevent clicks before load */
}

.scroll-animate.animated {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Left/Right alternative translations if desired */
.scroll-animate.slide-left {
  transform: translateX(-40px);
}
.scroll-animate.slide-right {
  transform: translateX(40px);
}
.scroll-animate.animated.slide-left,
.scroll-animate.animated.slide-right {
  transform: translateX(0);
}

/* ==========================================================================
   Responsive Viewports / Media Queries
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.85rem;
  }
  .parallax-section {
    background-attachment: scroll; /* Fixes performance lag issues on tablet/mobile */
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .footer-address {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .section-container {
    padding: 3.5rem 1.25rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .hero-content h1 {
    font-size: 2.25rem;
  }
  .hero-lead {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .desktop-nav {
    display: none; /* Hide primary links */
  }
  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }
  .cta-button-group {
    flex-direction: column;
    width: 100%;
  }
  .cta-button-group .btn {
    width: 100%;
  }
  .steps-timeline::after {
    display: none; /* Hide timeline horizontal dotted lines */
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-address {
    grid-column: span 1;
  }
  .footer-bottom .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .footer-legal-links {
    justify-content: center;
  }
  .floating-cta {
    display: flex; /* Display quick-call widget on mobile */
  }
}
