/* ═══════════════════════════════════════════════════════
   HORIZON MUNDI — Profilo Investitore v2
   Premium fullscreen dark experience
═══════════════════════════════════════════════════════ */

/* ── Shell ─────────────────────────────────────────── */
#hm-profilo-tool {
  width: 100%;
}

#hm-pi-shell {
  position: relative;
  min-height: 100vh;
  background: #0D2020;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Canvas background */
#hm-pi-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Header ─────────────────────────────────────────── */
#hm-pi-header {
  position: relative;
  z-index: 10;
  padding: 2rem 2.5rem 1rem;
  transition: opacity 0.4s;
}

#hm-pi-progress-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#hm-pi-progress-track {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

#hm-pi-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #B8962E, #D4AF50);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(184,150,46,0.5);
}

#hm-pi-step-counter {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
  min-width: 36px;
  text-align: right;
}

/* ── Stage ──────────────────────────────────────────── */
#hm-pi-stage {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem 0;
  overflow: hidden;
}

/* ── Slide ──────────────────────────────────────────── */
.hm-pi-slide {
  width: 100%;
  max-width: 600px;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.hm-pi-slide-in {
  opacity: 1;
  transform: translateX(0);
}

.hm-pi-exit-left {
  opacity: 0;
  transform: translateX(-32px);
  pointer-events: none;
}

.hm-pi-exit-right {
  opacity: 0;
  transform: translateX(32px);
  pointer-events: none;
}

.hm-pi-enter-right {
  opacity: 0;
  transform: translateX(32px);
}

.hm-pi-enter-left {
  opacity: 0;
  transform: translateX(-32px);
}

/* ── Step content ───────────────────────────────────── */
.hm-pi-intro {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #B8962E;
  margin-bottom: 0.75rem;
}

.hm-pi-question {
  font-family: 'Jost', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 2.5rem;
}

/* ── Cards ──────────────────────────────────────────── */
.hm-pi-cards {
  display: grid;
  gap: 12px;
  margin-bottom: 1rem;
}

.hm-pi-cards.cols-2 { grid-template-columns: 1fr 1fr; }
.hm-pi-cards.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.hm-pi-cards.cols-4 { grid-template-columns: 1fr 1fr; }

.hm-pi-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  padding: 1.25rem 1rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  border-radius: 2px;
  overflow: hidden;
}

.hm-pi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184,150,46,0.06), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.hm-pi-card:hover {
  border-color: rgba(184,150,46,0.35);
  background: rgba(184,150,46,0.04);
  transform: translateY(-2px);
}

.hm-pi-card:hover::before { opacity: 1; }

.hm-pi-card.selected {
  border-color: #B8962E;
  background: rgba(184,150,46,0.08);
}

.hm-pi-card.selected::before { opacity: 1; }

.hm-pi-card-icon {
  font-size: 1.1rem;
  color: #B8962E;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.hm-pi-card.selected .hm-pi-card-icon { opacity: 1; }

.hm-pi-card-title {
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.35rem;
}

.hm-pi-card-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

.hm-pi-card-check {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  color: #B8962E;
  opacity: 0;
  transition: opacity 0.2s;
}

.hm-pi-card.selected .hm-pi-card-check { opacity: 1; }

/* ── Slider ─────────────────────────────────────────── */
.hm-pi-slider-wrap {
  text-align: center;
  margin-bottom: 1rem;
}

.hm-pi-capital-display {
  font-family: 'Jost', sans-serif;
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  transition: transform 0.12s ease;
  text-shadow: 0 0 60px rgba(184,150,46,0.2);
}

.hm-pi-slider-container {
  position: relative;
  padding: 0 0.5rem;
  margin-bottom: 0.75rem;
}

.hm-pi-slider {
  width: 100%;
  -webkit-appearance: none;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.hm-pi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #B8962E;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(184,150,46,0.15), 0 0 16px rgba(184,150,46,0.4);
  transition: box-shadow 0.2s, transform 0.15s;
}

.hm-pi-slider::-webkit-slider-thumb:hover,
.hm-pi-slider:active::-webkit-slider-thumb {
  box-shadow: 0 0 0 8px rgba(184,150,46,0.2), 0 0 24px rgba(184,150,46,0.5);
  transform: scale(1.15);
}

.hm-pi-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #B8962E;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 16px rgba(184,150,46,0.4);
}

.hm-pi-slider-glow {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,150,46,0.2) 0%, transparent 70%);
  pointer-events: none;
  transition: left 0s;
}

.hm-pi-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  padding: 0 0.25rem;
}

/* ── Market preview ─────────────────────────────────── */
.hm-pi-market-preview {
  margin-top: 2rem;
  min-height: 60px;
}

.hm-pi-market-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.hm-pi-market-dot {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px 12px;
  border-radius: 2px;
  transition: all 0.3s;
}

.hm-pi-market-label {
  font-size: 11px;
  color: #B8962E;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

/* ── Navigation ─────────────────────────────────────── */
#hm-pi-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem 2.5rem;
  gap: 1rem;
}

#hm-pi-back {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.3);
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 10px 0;
  transition: color 0.2s, opacity 0.3s;
}

#hm-pi-back:hover { color: rgba(255,255,255,0.6); }

#hm-pi-next {
  background: #B8962E;
  color: #0D2020;
  border: none;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 36px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.15s;
  border-radius: 1px;
}

#hm-pi-next:hover:not(:disabled) {
  background: #C4A842;
  transform: translateY(-1px);
}

#hm-pi-next:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  transform: none;
}

/* ── Form wrap ──────────────────────────────────────── */
.hm-pi-form-wrap {
  width: 100%;
  max-width: 580px;
  padding-bottom: 3rem;
}

.hm-pi-form-teaser {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: rgba(184,150,46,0.04);
  border: 1px solid rgba(184,150,46,0.15);
}

.hm-pi-teaser-icon {
  font-size: 2rem;
  color: #B8962E;
  margin-bottom: 0.5rem;
  display: block;
}

.hm-pi-teaser-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #B8962E;
  margin-bottom: 0.5rem;
}

.hm-pi-teaser-name {
  font-family: 'Jost', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: #fff;
  margin-bottom: 0.35rem;
}

.hm-pi-teaser-market {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.5rem;
}

.hm-pi-teaser-blur {
  position: relative;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 1rem;
}

.hm-pi-blurred-content {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.hm-pi-blur-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
}

.hm-pi-blur-row:last-child { border-bottom: none; }
.blurred { color: rgba(184,150,46,0.8); font-weight: 500; }

.hm-pi-unlock-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
  background: rgba(13,32,32,0.5);
  backdrop-filter: blur(1px);
}

/* ── Form fields ────────────────────────────────────── */
.hm-pi-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hm-pi-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hm-pi-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hm-pi-field label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  font-family: 'Jost', sans-serif;
}

.hm-pi-field input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  border-radius: 1px;
  -webkit-appearance: none;
}

.hm-pi-field input::placeholder { color: rgba(255,255,255,0.45); }

.hm-pi-field input:focus {
  border-color: rgba(184,150,46,0.5);
  background: rgba(255,255,255,0.06);
}

.hm-pi-privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
}

.hm-pi-privacy input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: #B8962E;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  appearance: checkbox;
  -webkit-appearance: checkbox;
  opacity: 1;
  visibility: visible;
}

.hm-pi-privacy label {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  cursor: pointer;
}

.hm-pi-privacy label a {
  color: #B8962E;
  text-decoration: none;
}

.hm-form-error {
  font-size: 12px;
  color: #E07070;
  padding: 8px 12px;
  background: rgba(200,60,60,0.08);
  border: 1px solid rgba(200,60,60,0.2);
}

.hm-pi-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #B8962E;
  color: #0D2020;
  border: none;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 18px 36px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.15s;
  border-radius: 1px;
}

.hm-pi-submit:hover:not(:disabled) {
  background: #C4A842;
  transform: translateY(-1px);
}

.hm-pi-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.hm-pi-submit-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.hm-pi-submit:hover .hm-pi-submit-arrow { transform: translateX(4px); }

.hm-pi-form-note {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  padding-top: 4px;
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 640px) {
  #hm-pi-header { padding: 1.5rem 1.25rem 0.75rem; }
  #hm-pi-stage  { padding: 1rem 1.25rem 0; }
  #hm-pi-nav    { padding: 1.25rem 1.25rem 2rem; }

  .hm-pi-question { font-size: 1.3rem; margin-bottom: 1.75rem; }
  .hm-pi-capital-display { font-size: 3.5rem; }

  .hm-pi-cards.cols-2,
  .hm-pi-cards.cols-3 { grid-template-columns: 1fr; }

  .hm-pi-form-row { grid-template-columns: 1fr; }

  #hm-pi-next { padding: 14px 24px; font-size: 11px; }
}

@media (max-width: 400px) {
  .hm-pi-capital-display { font-size: 2.8rem; }
}
