/* ================================================================
   STYLE.CSS — Reviva Bath Remodeling Landing Page
   Mobile-first layout with fluid responsiveness.
================================================================ */

/* ----------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (Variables)
---------------------------------------------------------------- */
:root {
  /* Color Palette */
  --color-navy:        #2b63b8;   /* Primary dark background/text */
  --color-navy-light:  #162D57;   /* Slightly lighter navy for cards */
  --color-navy-mid:    #1E3A6E;   /* Mid-tone navy for borders */
  --color-orange:      #ff6f00;   /* CTA accent — high contrast */
  --color-orange-dark: #D4600A;   /* Hover state for orange */
  --color-white:       #FFFFFF;
  --color-off-white:   #F6F8FC;   /* Page background */
  --color-gray-light:  #E8ECF2;
  --color-gray:        #06082b;
  --color-gray-dark:   #445566;
  --color-success:     #1DA462;   /* Green for success state */
  --color-error:       #E03434;   /* Red for form errors */
  --color-teal:        #E8ECF2;   /* Accent for Bath Remodeling tagline */

  /* Typography */
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body:    'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing & Layout */
  --max-width: 520px;             /* Max width of the form card */
  --border-radius: 14px;
  --border-radius-sm: 8px;

  /* Shadows */
  --shadow-card: 0 8px 40px rgba(11, 29, 58, 0.18);
  --shadow-btn:  0 4px 18px rgba(247, 113, 13, 0.45);
}

/* ----------------------------------------------------------------
   2. CSS RESET & BASE STYLES
---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-off-white);
  color: var(--color-navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  outline: none;
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ----------------------------------------------------------------
   3. SITE HEADER
---------------------------------------------------------------- */
.site-header {
  background-color: var(--color-navy);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.logo-re {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: -0.5px;
}
.logo-do {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--color-orange);
  letter-spacing: -0.5px;
}
.logo-tagline {
  font-size: 0.75rem;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 8px;
  align-self: center;
  display: none;
}
@media (min-width: 480px) {
  .logo-tagline { display: inline; }
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-orange);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s;
}
.header-phone:hover { color: #ffa256; }

/* ----------------------------------------------------------------
   4. HERO SECTION
---------------------------------------------------------------- */
.hero-section {
  position: relative;
  background: linear-gradient(rgba(22, 45, 87, 0.85), rgba(11, 29, 58, 0.95)), url('bathroom-bg.jpg') center center / cover no-repeat;
  padding: 20px 0 30px; /* Reduced padding */
  overflow: hidden;
  /* Removed the min-height so it hugs the content tighter */
}


.hero-bg-shape {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247,113,13,0.08) 0%, transparent 70%);
  top: -100px;
  right: -150px;
  pointer-events: none;
}
.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 5vw, 2.2rem); /* Slightly smaller for mobile */
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.2;
  margin-bottom: 8px; /* Reduced from 14px */
  letter-spacing: -0.5px;
}

/* Trust Bar */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.88);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.trust-divider {
  width: 1px;
  height: 18px;
  background-color: rgba(255,255,255,0.2);
}
.badge-icon {
  color: var(--color-orange);
  flex-shrink: 0;
}
.stars {
  display: flex;
  gap: 2px;
}
.star {
  display: inline-block;
  width: 14px;
  height: 14px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background-color: rgba(255,255,255,0.25);
}
.star.filled {
  background-color: #FFB800;
}
.small-stars .star {
  width: 12px;
  height: 12px;
}

/* Hero Headline */
.hero-text {
  text-align: center;
  margin-bottom: 28px;
}
.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 5.5vw, 2.4rem);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.hero-headline em {
  font-style: italic;
  color: var(--color-orange);
}
.hero-subheadline {
  font-size: 0.97rem;
  color: rgba(255,255,255,0.78);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.65;
}
.hero-subheadline strong {
  color: #fff;
}

/* ----------------------------------------------------------------
   5. FORM CARD
---------------------------------------------------------------- */
.form-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  padding: 18px 16px;
  max-width: var(--max-width);
  margin: 0 auto 24px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 480px) {
  .form-card { padding: 36px 36px; }
}

/* Progress Bar */
.progress-bar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}
.progress-bar-track {
  flex: 1;
  height: 6px;
  background-color: var(--color-gray-light);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-orange), #ffaa55);
  border-radius: 99px;
  width: 33%;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-gray);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Form Steps */
.form-step {
  animation: slideInStep 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes slideInStep {
  from { opacity: 0; transform: translateX(32px); }
  to { opacity: 1; transform: translateX(0); }
}
.hidden { display: none !important; }

.step-question {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 6px;
  line-height: 1.3;
}
.step-hint {
  font-size: 0.87rem;
  color: var(--color-gray);
  margin-bottom: 12px;
}

/* Choice Buttons Grid (Handles the 7 Service Options) */
/* Choice Buttons Grid */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Allows buttons to be slightly narrower */
  gap: 8px; /* Reduced from 12px */
  margin-bottom: 10px;
}
.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px; /* Reduced from 10px */
  padding: 12px 8px; /* Reduced from 18px 10px */
  background: var(--color-off-white);
  border: 2px solid var(--color-gray-light);
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem; /* Slightly smaller text */
  font-weight: 600;
  color: var(--color-navy);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.choice-btn svg {
  color: var(--color-navy-mid);
  transition: color 0.2s;
}
.choice-btn:hover {
  border-color: var(--color-orange);
  background: #fff8f2;
  color: var(--color-orange);
}
.choice-btn:hover svg {
  color: var(--color-orange);
}
.choice-btn.selected {
  border-color: var(--color-orange);
  background: #fff3ea;
  color: var(--color-navy);
  box-shadow: 0 0 0 4px rgba(247, 113, 13, 0.12);
}
.choice-btn.selected svg {
  color: var(--color-orange);
}

/* Input Fields */
.input-group {
  margin-bottom: 16px;
  position: relative;
}
.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-gray-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.required-star {
  color: var(--color-error);
  margin-left: 2px;
}
.form-input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--color-gray-light);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-navy);
  background: var(--color-off-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 4px rgba(247, 113, 13, 0.12);
  background: #fff;
}
.form-input.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(224, 52, 52, 0.1);
}
.field-error {
  display: block;
  font-size: 0.78rem;
  color: var(--color-error);
  margin-top: 5px;
  font-weight: 500;
}
.name-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 400px) {
  .name-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Consent Checkbox & Legal Section */
.consent-container {
  margin-top: 16px;
  margin-bottom: 20px;
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f4f6f9;
  padding: 14px;
  border-radius: var(--border-radius-sm);
  border-left: 3px solid var(--color-gray-light);
  border: 1px solid transparent;
  transition: border-color 0.2s;
}
.consent-row.error {
  border-color: var(--color-error);
  background: #fff5f5;
}
.consent-checkbox {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-orange);
  cursor: pointer;
  flex-shrink: 0;
}
.tcpa-disclaimer {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0.70rem;
  color: var(--color-gray);
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
}
.disclaimer-link {
  color: var(--color-navy-mid);
  text-decoration: underline;
  font-weight: 600;
}
.disclaimer-link:hover { color: var(--color-orange); }

/* Buttons */
.btn-next,
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--color-orange), #ff9940);
  color: var(--color-white);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-btn);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.2px;
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
}
.btn-next:hover,
.btn-submit:hover {
  background: linear-gradient(135deg, var(--color-orange-dark), #e07a20);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(247,113,13,0.5);
}
.btn-next:active,
.btn-submit:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}

.btn-submit {
  padding: 18px 24px;
  font-size: 1.1rem;
  animation: pulseCTA 2.8s ease-in-out infinite;
}
@keyframes pulseCTA {
  0%, 100% { box-shadow: var(--shadow-btn); }
  50% { box-shadow: 0 6px 30px rgba(247, 113, 13, 0.65); }
}

.btn-back {
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--color-gray);
  font-size: 0.87rem;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
  transition: color 0.2s;
}
.btn-back:hover { color: var(--color-navy); }

/* ----------------------------------------------------------------
   6. SUCCESS SCREEN
---------------------------------------------------------------- */
.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #e8f7ef, #c6efdb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--color-success);
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes bounceIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.success-headline {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--color-navy);
  text-align: center;
  margin-bottom: 12px;
}
.success-body {
  font-size: 0.97rem;
  color: var(--color-gray-dark);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* ----------------------------------------------------------------
   7. FEATURES SECTION
---------------------------------------------------------------- */
.features-section {
  background: var(--color-white);
  padding: 50px 0;
  border-top: 1px solid var(--color-gray-light);
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 20px;
}
@media (min-width: 600px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); }
}

.feature-item { text-align: center; }
.feature-icon-wrap {
  width: 52px;
  height: 52px;
  background: #eef3fb;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--color-navy-mid);
}
.feature-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 6px;
}
.feature-desc {
  font-size: 0.82rem;
  color: var(--color-gray-dark);
  line-height: 1.55;
}

/* ----------------------------------------------------------------
   8. INFINITE PARTNERS CAROUSEL
---------------------------------------------------------------- */
.partners-carousel {
  background-color: var(--color-white);
  padding: 40px 0;
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--color-gray-light);
}
.carousel-title {
  font-size: 0.85rem;
  color: var(--color-gray-dark);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 24px;
}
.carousel-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  /* Soft fade on edges */
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.carousel-track {
  display: flex;
  /* 7 logos * 200px width each = 1400px */
  width: calc(200px * 14); 
  animation: scrollTrack 25s linear infinite;
}
.partner-logo {
  width: 200px;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #8c9bae;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes scrollTrack {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-200px * 7)); }
}

/* ----------------------------------------------------------------
   9. FOOTER
---------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy);
  padding: 36px 20px;
}
.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-logo .logo-re {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-white);
}
.footer-logo .logo-do {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-orange);
}
.footer-legal {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  max-width: 560px;
  line-height: 1.6;
}

/* ----------------------------------------------------------------
   10. LOADING STATE (on submit button)
---------------------------------------------------------------- */
.btn-submit.loading {
  pointer-events: none;
  opacity: 0.85;
  animation: none;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ========================================================
   NEW: "by ReDo" Sub-Brand Styling
   ======================================================== */
.logo-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-by {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--color-white);
  opacity: 0.8;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: -4px; /* Pulls it tight against the main logo */
  padding-left: 2px;
}

/* Centers the sub-brand specifically in the footer */
.footer-logo.logo-block {
  align-items: center;
}
.footer-by {
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0px;
}
/* ========================================================
   MODAL POP-UP STYLES
   ======================================================== */
.modal {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(11, 29, 58, 0.7); /* Dark Navy overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* Ensures it sits on top of everything */
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none !important;
  opacity: 0;
}

.modal-content {
  background: var(--color-white);
  padding: 30px;
  border-radius: var(--border-radius);
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease-out;
}

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

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--color-gray-dark);
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: var(--color-error);
}

.partners-list {
  margin-top: 15px;
  color: var(--color-gray-dark);
  font-size: 0.85rem; 
  line-height: 1.6;
  
  /* These lines create the scrollable box */
  max-height: 200px; 
  overflow-y: auto; 
  
  /* Adds a neat grey box around the list so it looks like terms & conditions */
  border: 1px solid var(--color-gray-light); 
  border-radius: var(--border-radius-sm);
  background: var(--color-off-white);
  padding: 12px 12px 12px 30px; 
}

/* Customizes the scrollbar to look premium */
.partners-list::-webkit-scrollbar {
  width: 6px;
}
.partners-list::-webkit-scrollbar-thumb {
  background-color: var(--color-gray-light);
  border-radius: 10px;
}
/* Radio Stacks for Step 2 */
.radio-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-option {
  width: 100%;
  padding: 14px 18px;
  background: var(--color-off-white);
  border: 2px solid var(--color-gray-light);
  border-radius: var(--border-radius-sm);
  text-align: left;
  font-weight: 600;
  color: var(--color-navy);
  transition: 0.2s;
  cursor: pointer;
  font-family: var(--font-body);
}

.radio-option:hover {
  border-color: var(--color-orange);
}

.radio-option.selected {
  background: #fff3ea;
  border-color: var(--color-orange);
  color: var(--color-orange);
}
/* Better spacing for Tablets/iPads */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-headline {
    font-size: 2.2rem; /* Slightly smaller than desktop so it fits nicely */
  }
  .form-card {
    max-width: 480px; /* Keeps the form from looking too "fat" on a tablet */
  }
}

/* Overview CTA Button in Header */
.header-btn-overview {
  background-color: var(--color-orange);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.2s, transform 0.1s;
}
.overview-headline {
      /* ... existing styles ... */
      text-shadow: 0 2px 10px rgba(0,0,0,0.8); /* ADD THIS FOR READABILITY */
    }
.header-btn-overview:hover {
  background-color: var(--color-orange-dark);
  transform: translateY(-1px);
}
/* Scrollable text container for Legal Modals */
.legal-text-scroll {
  max-height: 60vh; 
  overflow-y: auto;
  margin-top: 15px;
  font-size: 0.82rem;
  color: var(--color-gray-dark);
  line-height: 1.6;
  padding-right: 10px;
}
.legal-text-scroll h4 {
  margin-top: 15px;
  margin-bottom: 4px;
  color: var(--color-navy);
  font-size: 0.9rem;
}
.legal-text-scroll p {
  margin-bottom: 8px;
}
/* Scrollbar styling */
.legal-text-scroll::-webkit-scrollbar { width: 6px; }
.legal-text-scroll::-webkit-scrollbar-thumb { background-color: var(--color-gray-light); border-radius: 10px; }