/* =========================================================
   Pinnacle – Estimate Page Styles
   ========================================================= */

/* ---------- Estimate tool scroll anchor ---------- */
#estimate-tool {
  scroll-margin-top: 0;
}

@media (max-width: 768px) {
  #estimate-tool {
    scroll-margin-top: -200px;
  }
}

/* ---------- Page background ---------- */
.estimate-landing {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 30%),
    linear-gradient(180deg, #fbfcfa 0%, #eef4f2 100%);
}

/* ---------- Nav override for estimate hero ---------- */
.estimate-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

/* Nav links — white on transparent dark background */
.estimate-nav .menu a {
  color: #fff;
}

/* Hover: keep white ghost, not the grey from site-pages.css */
.estimate-nav .menu a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Dropdown popup — white background, so text must be dark */
.estimate-nav .dropdown a {
  color: var(--c-text-weak, #495057);
}
.estimate-nav .dropdown a:hover {
  background: #e9ecef;
  color: #212529;
}

/* Get a Quote button — muted green, stays green on hover */
.estimate-nav .nav-cta .btn-quote,
.estimate-nav .nav-cta .btn-quote:link,
.estimate-nav .nav-cta .btn-quote:visited {
  background: linear-gradient(135deg, #2a7a52 0%, #185036 50%, #2a7a52 100%);
  background-size: 200% auto;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(42, 122, 82, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.estimate-nav .nav-cta .btn-quote:hover,
.estimate-nav .nav-cta .btn-quote:focus-visible {
  background-position: right center;
  color: #fff;
  box-shadow: 0 10px 28px rgba(42, 122, 82, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.estimate-nav .hamburger-btn span {
  background: #fff;
}

/* ---------- Hero ---------- */
.estimate-hero {
  padding-top: clamp(7rem, 12vw, 9rem);
}

.estimate-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
  gap: clamp(1.3rem, 4vw, 2.4rem);
  align-items: start;
}

.estimate-side-card {
  display: grid;
  gap: 1rem;
}

.estimate-side-card p:last-child {
  margin: 0;
}

/* Hero note */
.hero-note {
  margin: 1.2rem 0 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.68);
  max-width: 52ch;
}

/* Number list in side card */
.number-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.number-list li {
  counter-increment: steps;
  position: relative;
  padding-left: 2.2rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.55;
}

.number-list li::before {
  content: counter(steps);
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

/* Callout note in side card */
.callout-note {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------- Estimate buttons ---------- */

/* Primary: muted green gradient, asymmetric radius */
.btn-estimate-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 18px 8px 18px 8px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(135deg, #2a7a52 0%, #185036 50%, #2a7a52 100%);
  background-size: 200% auto;
  color: #fff;
  box-shadow: 0 8px 24px rgba(42, 122, 82, 0.28);
  cursor: pointer;
  transition:
    background-position 0.5s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.btn-estimate-primary:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(42, 122, 82, 0.36);
  color: #fff;
}

.btn-estimate-primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* Secondary: white bg, black text, subtle border */
.btn-estimate-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(33, 37, 41, 0.18);
  border-radius: 18px 8px 18px 8px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  background: #fff;
  color: #212529;
  box-shadow: 0 8px 20px rgba(33, 37, 41, 0.08);
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    border-color 0.2s ease;
}

.btn-estimate-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(33, 37, 41, 0.14);
  border-color: rgba(33, 37, 41, 0.28);
  color: #212529;
}

.btn-estimate-secondary:active {
  transform: translateY(-1px) scale(0.98);
}

/* Hero context: "Call Instead" — heating red */
.page-hero .btn-estimate-secondary {
  background: linear-gradient(135deg, #c44f47 0%, #7b2828 50%, #c44f47 100%);
  background-size: 200% auto;
  border: 1px solid transparent;
  color: #fff;
}

.page-hero .btn-estimate-secondary:hover {
  background-position: right center;
  color: #fff;
  box-shadow: 0 14px 30px rgba(196, 79, 71, 0.3);
}

/* CTA band context: primary btn white */
.cta-band .btn-estimate-primary {
  background: #fff;
  color: #212529;
}

.cta-band .btn-estimate-primary:hover {
  color: #212529;
}

.cta-band .btn-estimate-secondary {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.cta-band .btn-estimate-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ---------- Calculator layout ---------- */
.estimate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 1.5rem;
  align-items: start;
}

/* ---------- Tool card ---------- */
.estimate-tool-card {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--c-line, rgba(33, 37, 41, 0.1));
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ---------- Step indicators ---------- */
.step-indicator-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.6rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(33, 37, 41, 0.08);
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  opacity: 0.4;
  transition: opacity 0.35s ease;
}

.step-indicator.active {
  opacity: 1;
}

.step-indicator-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent, #2d5b56);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.step-indicator:not(.active) .step-indicator-num {
  background: #dee2e6;
  color: #868e96;
}

.step-indicator-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text, #212529);
}

.step-indicator:not(.active) .step-indicator-label {
  color: #adb5bd;
}

.step-indicator-line {
  flex: 1;
  height: 2px;
  margin: 0 0.8rem;
  background: #dee2e6;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.step-indicator-line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent, #2d5b56), var(--accent-strong, #1f403c));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* JS toggles step 2 active — this fills the line */
.step-indicator-bar:has(.step-indicator[data-for="2"].active) .step-indicator-line::after {
  width: 100%;
}

/* ---------- Form ---------- */
.estimate-form {
  display: grid;
}

.estimate-form .form-step {
  display: none;
}

.estimate-form .form-step.active {
  display: grid;
  gap: 1.2rem;
  animation: estFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

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

/* ---------- Form fields ---------- */
.estimate-field {
  display: grid;
  gap: 0.5rem;
}

.estimate-field span {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text, #212529);
}

.estimate-field--wide {
  grid-column: 1 / -1;
}

.estimate-field input,
.estimate-field select {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 2px solid rgba(33, 37, 41, 0.12);
  border-radius: 14px;
  background: #fff;
  color: var(--c-text, #212529);
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.estimate-field input::placeholder {
  color: #9aa3ac;
  font-weight: 500;
}

.estimate-field input:hover,
.estimate-field select:hover {
  border-color: rgba(33, 37, 41, 0.22);
}

.estimate-field input:focus,
.estimate-field select:focus {
  outline: none;
  border-color: var(--accent, #2d5b56);
  box-shadow: 0 0 0 4px var(--accent-soft, rgba(45, 91, 86, 0.12));
  background: #fff;
}

.estimate-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23495057' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.8rem;
  cursor: pointer;
}

/* ---------- Form actions ---------- */
.estimate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 0.4rem;
}

.estimate-actions .btn,
.estimate-actions .btn-estimate-primary,
.estimate-actions .btn-estimate-secondary {
  min-width: 200px;
}

/* ---------- Estimate result display ---------- */
.estimate-display {
  display: grid;
  gap: 0.65rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.6), transparent 40%),
    linear-gradient(135deg, rgba(45, 91, 86, 0.1), rgba(31, 64, 60, 0.06));
  border: 1px solid rgba(45, 91, 86, 0.16);
  position: relative;
  overflow: hidden;
}

.estimate-display::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(45, 91, 86, 0.08), transparent 70%);
  pointer-events: none;
}

.estimate-label {
  margin: 0;
  color: var(--c-text-weak, #495057);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.estimate-amount {
  margin: 0;
  color: var(--accent-strong, #1f403c);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.estimate-note {
  margin: 0;
  color: var(--c-text-weak, #495057);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- Estimate meta summary ---------- */
.estimate-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.estimate-meta-item {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(33, 37, 41, 0.08);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.estimate-meta-item:hover {
  border-color: rgba(45, 91, 86, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.estimate-meta-item strong,
.estimate-meta-item span {
  display: block;
}

.estimate-meta-item strong {
  margin-bottom: 0.35rem;
  color: var(--c-text, #212529);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.estimate-meta-item span {
  color: var(--c-text-weak, #495057);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- Post-estimate notes ---------- */
.estimate-mini-note {
  margin: 0;
  color: var(--c-text-weak, #495057);
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: #f8f9fa;
  border: 1px solid rgba(33, 37, 41, 0.06);
}

.estimate-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
}

.estimate-link-row a {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent, #2d5b56);
  text-decoration: none;
  transition: color 0.2s ease;
}

.estimate-link-row a:hover {
  color: var(--accent-strong, #1f403c);
  text-decoration: underline;
}

/* ---------- Sidebar: stacked cards ---------- */
.stacked-card-group {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.stacked-card-group .info-card {
  animation: estSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stacked-card-group .info-card:nth-child(1) { animation-delay: 0.15s; }
.stacked-card-group .info-card:nth-child(2) { animation-delay: 0.25s; }
.stacked-card-group .info-card:nth-child(3) { animation-delay: 0.35s; }

/* ---------- Mini list in info cards ---------- */
.estimate-mini-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.estimate-mini-list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--c-text-weak, #495057);
  font-size: 0.95rem;
  line-height: 1.55;
}

.estimate-mini-list li::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: 0;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--accent, #2d5b56);
}

/* ---------- Steps grid (what happens next) ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.steps-grid .step-card {
  animation: estSlideUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.steps-grid .step-card:nth-child(1) { animation-delay: 0.1s; }
.steps-grid .step-card:nth-child(2) { animation-delay: 0.2s; }
.steps-grid .step-card:nth-child(3) { animation-delay: 0.3s; }

/* ---------- Trust chips polish ---------- */
.estimate-landing .trust-chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.estimate-landing .trust-chip:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.32);
}

.estimate-landing .trust-chip:nth-child(4) { animation-delay: 0.65s; }

/* ---------- Animations ---------- */
@keyframes estSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Hero entrance animations */
.estimate-hero .page-hero-copy {
  animation: estFadeInHero 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.estimate-hero .estimate-side-card {
  animation: estSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.estimate-tool-card {
  animation: estSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .estimate-hero-grid,
  .estimate-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .estimate-grid,
  .estimate-meta {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .estimate-actions {
    width: 100%;
  }

  .estimate-actions .btn,
  .estimate-actions .btn-estimate-primary,
  .estimate-actions .btn-estimate-secondary {
    width: 100%;
    min-width: 0;
  }

  .step-indicator-label {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .estimate-landing *,
  .estimate-landing *::before,
  .estimate-landing *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
