/* ==========================================================================
   Project Scope & Cost Calculator - Ultra-Premium Agency Edition
   Digital Excellence - Optimized for All Screen Sizes
   ========================================================================== */

.calculator-page {
  background: #f6f9ff;
  color: #0f172a;
}

.calc-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

/* Header & Eyebrow */
.calc-header {
  text-align: center;
  margin-bottom: 36px;
}

.calc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #0284c7;
  letter-spacing: 0.4px;
  margin-bottom: 16px;
}

.calc-badge svg {
  width: 14px;
  height: 14px;
  color: #0284c7;
}

.calc-title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.16;
  color: #0f172a;
  margin-bottom: 14px;
  letter-spacing: -0.8px;
}

.calc-title span {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.calc-subtitle {
  font-size: clamp(15px, 1.8vw, 17px);
  color: #475569;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Master Card Container */
.calc-card {
  background: #ffffff;
  border: 1px solid rgba(29, 78, 216, 0.14);
  border-radius: 24px;
  box-shadow: 0 20px 50px -15px rgba(15, 76, 148, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: clamp(24px, 4vw, 44px);
  position: relative;
  overflow: hidden;
}

/* Progress Tracker */
.calc-progress-wrap {
  margin-bottom: 32px;
}

.calc-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 10px;
}

.calc-step-label {
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 12px;
}

.calc-progress-percent {
  color: #0f172a;
  font-weight: 800;
}

.calc-progress-bar {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.calc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Step Views */
.calc-step {
  display: none;
  animation: calcStepIn 0.32s ease-out forwards;
}

.calc-step.is-active {
  display: block;
}

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

.calc-question {
  font-size: clamp(20px, 2.6vw, 25px);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.calc-helper {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 24px;
}

/* Single Option Cards */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.calc-option {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  user-select: none;
}

.calc-option:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.calc-option.is-selected {
  border-color: #2563eb;
  background: #f8fbff;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}

.calc-opt-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 14px;
}

.calc-opt-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 5px;
  padding-right: 28px;
}

.calc-opt-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.calc-opt-check {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #ffffff;
  transition: all 0.2s ease;
}

.calc-opt-check svg {
  width: 13px;
  height: 13px;
}

.calc-option.is-selected .calc-opt-check {
  border-color: #2563eb;
  background: #2563eb;
}

/* Multi-Select Capabilities Grid */
.calc-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.calc-feature-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.calc-feature-pill:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.calc-feature-pill.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.calc-feature-pill .pill-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.calc-feature-pill .pill-box svg {
  width: 12px;
  height: 12px;
}

.calc-feature-pill.is-selected .pill-box {
  border-color: #2563eb;
  background: #2563eb;
}

.calc-feature-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
}

/* Card Navigation Actions */
.calc-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.calc-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: transparent;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calc-btn-back:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.calc-btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: all 0.2s ease;
  margin-left: auto;
}

.calc-btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   DIAGNOSTIC SCANNER (Replaces cheap AI spinner)
   ========================================================================== */
.calc-loader-screen {
  display: none;
  text-align: center;
  padding: 44px 16px;
}

.calc-loader-screen.is-active {
  display: block;
}

.calc-radar-box {
  width: 84px;
  height: 84px;
  margin: 0 auto 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-radar-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(14, 165, 233, 0.15);
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: radarSpin 1s linear infinite;
}

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

.calc-diagnostic-pct {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.calc-loader-title {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 24px;
}

.calc-diagnostic-terminal {
  max-width: 440px;
  margin: 0 auto;
  background: #091830;
  border-radius: 16px;
  padding: 18px 20px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px rgba(9, 24, 48, 0.16);
}

.calc-diag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #94a3b8;
  padding: 6px 0;
  opacity: 0.35;
  transition: all 0.3s ease;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.calc-diag-item.is-done {
  opacity: 1;
  color: #38bdf8;
}

.calc-diag-item.is-done svg {
  color: #22c55e;
}

/* ==========================================================================
   ULTRA-PREMIUM REVEAL SCREEN (Two-Column Executive Architecture)
   ========================================================================== */
.calc-result-screen {
  display: none;
  animation: calcStepIn 0.35s ease-out forwards;
}

.calc-result-screen.is-active {
  display: block;
}

.calc-blueprint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid #e2e8f0;
  margin-bottom: 28px;
}

.calc-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calc-locked-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.calc-doc-id {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  font-family: monospace;
}

/* Two Column Cockpit Layout */
.calc-cockpit-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
}

/* Left Column: Tech Spec Sheet */
.calc-spec-sheet {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-spec-block h4 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #64748b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-spec-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #ffffff;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.calc-spec-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calc-spec-k {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
}

.calc-spec-v {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* Dynamic Tech Stack Chips */
.calc-tech-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc-tech-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-chip-tag {
  font-size: 10px;
  font-weight: 700;
  color: #0284c7;
  text-transform: uppercase;
}

.calc-chip-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

/* Deliverables Checklist */
.calc-deliverables-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-deliv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.calc-deliv-item svg {
  width: 15px;
  height: 15px;
  color: #10b981;
  flex-shrink: 0;
}

/* Right Column: Founder Direct VIP Card */
.calc-founder-vip-card {
  background: linear-gradient(145deg, #091830 0%, #0f2b56 100%);
  border-radius: 20px;
  padding: 26px 22px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 36px -8px rgba(15, 43, 86, 0.4);
  position: relative;
  overflow: hidden;
}

.calc-founder-vip-card::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.22), transparent 70%);
  pointer-events: none;
}

.calc-founder-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.calc-founder-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.calc-founder-img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.calc-founder-live-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #091830;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4);
}

.calc-founder-meta {
  display: flex;
  flex-direction: column;
}

.calc-founder-name {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.calc-founder-role {
  font-size: 12px;
  color: #93c5fd;
  font-weight: 600;
}

.calc-founder-status {
  font-size: 11.5px;
  color: #86efac;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* Personal Quote Bubble */
.calc-founder-bubble {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.55;
  margin-bottom: 22px;
  position: relative;
}

.calc-founder-bubble strong {
  color: #ffffff;
}

/* Primary Glowing WhatsApp Action */
.calc-wa-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 800;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.calc-wa-primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.calc-wa-primary-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Quick Phone Capture */
.calc-quick-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.calc-quick-input {
  flex: 1;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.calc-quick-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.calc-quick-btn {
  padding: 11px 16px;
  background: #ffffff;
  color: #091830;
  border: none;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.calc-quick-btn:hover {
  background: #f1f5f9;
}

.calc-quick-status {
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
  min-height: 16px;
}

/* Recalculate Button */
.calc-recalc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.calc-recalc-btn:hover {
  color: #2563eb;
}

/* ==========================================================================
   HOMEPAGE EMBEDDED CALCULATOR SECTION
   ========================================================================== */
.home-calc-section {
  padding: clamp(48px, 7vw, 90px) 16px;
  background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.12), transparent 45%), #f8fafc;
  border-top: 1px solid rgba(29, 78, 216, 0.08);
  border-bottom: 1px solid rgba(29, 78, 216, 0.08);
  position: relative;
}

.home-calc-inner {
  max-width: 980px;
  margin: 0 auto;
}

.home-calc-header {
  text-align: center;
  margin-bottom: 36px;
}

.home-calc-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #2563eb;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  display: block;
}

.home-calc-title {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.home-calc-title span {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-calc-desc {
  font-size: 16px;
  color: #475569;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */
@media (max-width: 860px) {
  .calc-cockpit-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .calc-tech-chips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calc-card {
    padding: 20px 14px;
    border-radius: 18px;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .calc-features-grid {
    grid-template-columns: 1fr;
  }
  .calc-spec-table {
    grid-template-columns: 1fr;
  }
  .calc-quick-form {
    flex-direction: column;
  }
  .calc-quick-btn {
    width: 100%;
  }
}
