/* ========================================================================
   TIME & ROI CALCULATOR — dark section, live estimate, email capture
   ======================================================================== */

.section-calculator {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

.calc-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.5;
}

.calc-glow--gold {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(212,175,55,0.18), transparent 70%);
}

.calc-glow--blue {
  width: 520px;
  height: 520px;
  bottom: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(30,58,138,0.18), transparent 70%);
}

.section-calculator .container {
  position: relative;
  z-index: 1;
}

/* Layout */
.calc {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 1.5rem;
  margin-top: 3rem;
  align-items: stretch;
}

.calc-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
}

.calc-panel--results {
  background: linear-gradient(160deg, rgba(212,175,55,0.06), rgba(255,255,255,0.02));
  border-color: rgba(212, 175, 55, 0.2);
}

/* ---------- Inputs ---------- */
.calc-input {
  margin-bottom: 2rem;
}

.calc-input:last-child {
  margin-bottom: 0;
}

.calc-input-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calc-input-head label {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
}

.calc-input-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.calc-input-hint {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.7rem;
}

/* Range slider */
.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad-gold);
  border: 3px solid var(--dark);
  box-shadow: 0 0 0 1px rgba(212,175,55,0.5), 0 2px 8px rgba(0,0,0,0.4);
  cursor: grab;
  transition: transform 0.15s ease;
}

.calc-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.15); }

.calc-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #D4AF37;
  border: 3px solid var(--dark);
  box-shadow: 0 0 0 1px rgba(212,175,55,0.5), 0 2px 8px rgba(0,0,0,0.4);
  cursor: grab;
}

.calc-slider:focus-visible {
  box-shadow: 0 0 0 3px rgba(212,175,55,0.25);
}

/* ---------- Results ---------- */
.calc-result-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
}

.calc-result-hero {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-bottom: 1.75rem;
}

.calc-result-currency {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.calc-result-num {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.calc-result-period {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  flex-basis: 100%;
  margin-top: 0.35rem;
}

.calc-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.calc-stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.calc-stat-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.3;
}

.calc-note {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.55;
  margin: 1.25rem 0 1.5rem;
}

/* ---------- Capture ---------- */
.calc-capture-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.calc-capture-title em {
  color: var(--gold);
  font-style: italic;
}

.calc-form {
  display: flex;
  gap: 0.6rem;
}

.calc-email {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calc-email::placeholder { color: rgba(255, 255, 255, 0.3); }

.calc-email:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}

.calc-email.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.calc-form .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.calc-form-error {
  display: none;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #fca5a5;
}

.calc-form-error.is-visible { display: block; }

.calc-capture-trust {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.85rem;
}

/* Success */
.calc-capture-success {
  display: none;
  animation: calcFade 0.4s var(--ease-out-quart);
}

.calc-capture-success.is-active { display: block; }

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

.calc-success-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.calc-success-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.calc-success-title span { color: var(--gold); }

.calc-success-sub {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.calc-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(17,17,17,0.3);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: calcSpin 0.7s linear infinite;
}

@keyframes calcSpin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .calc {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .calc-result-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .calc-stat {
    flex-direction: row;
    align-items: baseline;
    gap: 0.6rem;
  }
  .calc-form {
    flex-direction: column;
  }
  .calc-form .btn {
    justify-content: center;
  }
}
