/* Shared hero + quote form styles */

/* Remove legacy top padding from inline styles so hero hugs the header */
main {
  padding-top: 0;
}

.hero {
  position: relative;
  height: 940px; /* Increased 25% from 750px for more breathing room */
  padding: 4rem 0;
  margin-bottom: 4rem;
  overflow: hidden; /* Clip backgrounds to hero bounds */
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: linear-gradient(180deg, rgba(11, 11, 13, 0) 0%, rgba(11, 11, 13, 0.95) 90%);
  z-index: 0; /* Lowered to keep fade BEHIND all content */
  pointer-events: none;
}

.hero-bg-container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0; /* Lowered to ensure it's behind all content */
  /* Removed height: 100% and min-height: 100% - top/bottom handles sizing */
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1);
  transform-origin: center;
  will-change: opacity, transform;
  animation: heroFadeZoom 20s linear infinite;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 4s; }
.hero-slide:nth-child(3) { animation-delay: 8s; }
.hero-slide:nth-child(4) { animation-delay: 12s; }
.hero-slide:nth-child(5) { animation-delay: 16s; }

@keyframes heroFadeZoom {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  5% {
    opacity: 1;
    transform: scale(1.01);
  }
  18% {
    opacity: 1;
    transform: scale(1.08);
  }
  20% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0; /* Lowered from 2 to keep overlay BEHIND all content */
  /* Removed height: 100% and min-height: 100% - top/bottom handles sizing */
  background: rgba(11, 11, 13, 0.7);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start; /* Changed from center to start - prevents form from affecting hero height */
  max-height: 100%; /* Constrain content to hero bounds */
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  color: var(--highlight);
}

.hero-copy p {
  color: var(--muted);
  max-width: 32rem;
  font-size: 1.05rem;
}

.quote-box {
  background: var(--panel-dark);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(242, 182, 50, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  height: 680px; /* Fixed height based on tallest step (3 fields) */
  display: flex;
  flex-direction: column;
}

.quote-box h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.quote-box form {
  display: block; /* Changed from grid to block for natural sizing */
  /* Removed flex: 1 to prevent stretching/compression */
}

.quote-box label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--highlight);
}

.quote-box input,
.quote-box select,
.quote-box button {
  width: 100%;
  padding: 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 15, 20, 0.8);
  color: var(--text-light);
  font-size: 0.95rem;
  transition: border-color var(--transition), background var(--transition);
}

.quote-box input:focus,
.quote-box select:focus {
  outline: none;
  border-color: var(--accent-hover);
  background: rgba(20, 20, 28, 0.95);
}

.quote-box button {
  background: linear-gradient(135deg, var(--highlight), var(--accent-hover));
  color: #0b0b0d;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quote-box button:hover {
  filter: brightness(1.05);
}

.progress-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem; /* Reduced from 3rem for tighter layout */
  position: relative;
}

.progress-indicator::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(242, 182, 50, 0.2);
  z-index: 0;
}

.progress-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.progress-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel-dark);
  border: 2px solid rgba(242, 182, 50, 0.3);
  margin: 0 auto 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.progress-step-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

.progress-step.active .progress-step-circle {
  background: linear-gradient(135deg, var(--highlight), var(--accent-hover));
  color: #0b0b0d;
  border-color: var(--highlight);
}

.progress-step.active .progress-step-label,
.progress-step.completed .progress-step-label,
.progress-step.completed .progress-step-circle {
  color: var(--highlight);
  border-color: var(--highlight);
}

.progress-step.completed .progress-step-circle {
  background: var(--highlight);
}

.form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-step h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
  text-align: center;
}

.form-step-content {
  display: grid;
  gap: 1.5rem; /* Increased from 1rem for better spacing between fields */
}

.form-step-content > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Space between label and input within each field */
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.button-group.single {
  grid-template-columns: 1fr;
}

.btn-secondary {
  background: rgba(242, 182, 50, 0.1);
  border: 1px solid rgba(242, 182, 50, 0.3);
  color: var(--highlight);
}

.btn-secondary:hover {
  background: rgba(242, 182, 50, 0.15);
  border-color: var(--highlight);
}

@media (max-width: 900px) {
  .hero {
    min-height: 100vh; /* Allow expansion beyond viewport if content is tall */
    margin-bottom: 2.5rem;
    padding: 3rem 0 4rem; /* Extra bottom padding for form breathing room */
    overflow: visible; /* Allow content to be accessible */
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-height: 100%; /* Keep content constrained to hero bounds */
    align-items: start;
    overflow: visible; /* Allow quote box to be scrollable if needed */
  }

  .hero-slide {
    background-position: center 60%;
  }

  .hero-overlay {
    background: rgba(11, 11, 13, 0.75);
  }

  .hero-copy h1 {
    font-size: clamp(1.9rem, 6vw, 2.5rem);
    padding: 0 1.25rem;
    line-height: 1.2;
  }

  .hero-copy p {
    padding: 0 1.25rem;
    font-size: 1rem;
  }

  .quote-box {
    height: 550px; /* Fixed height on tablet/mobile - prevents step resize */
    overflow-y: auto; /* Internal scroll if content exceeds height */
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .quote-box {
    padding: 1.25rem;
    height: 500px; /* Fixed height on small mobile */
  }

  .quote-box h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
  }

  .progress-indicator {
    margin-bottom: 1.5rem;
  }

  .progress-step-circle {
    width: 32px; /* Reduced from 40px for 4 steps */
    height: 32px;
    font-size: 0.9rem;
  }

  .progress-step-label {
    font-size: 0.7rem; /* Reduced from 0.85rem */
  }

  .form-step h3 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
  }

  .form-step-content {
    gap: 1.25rem; /* Slightly tighter on very small screens */
  }

  .button-group {
    grid-template-columns: 1fr;
    margin-top: 1.5rem; /* Reduced from 2rem */
  }
}
