/* Impresoft Engage — RevOps Diagnostic · Component styles */

/* ─── Scala 1-10 (PULITA, no commenti) ─────────────────── */
.scale-wrap { position: relative; padding: 32px 0 16px; overflow: visible; }
.stage-scale {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0;
  position: relative;
  border-top: 2px solid var(--black);
  padding-top: 0;
}
.stage-scale .stage {
  position: relative;
  text-align: center;
  padding: 18px 4px 12px;
}
.stage-scale .stage::before {
  content: "";
  position: absolute;
  left: 0; top: -2px;
  width: 100%; height: 0;
  background: transparent;
  transition: all 0.2s ease;
}
.stage-scale .stage.active {
  background: var(--yellow);
}
.stage-scale .stage.active::before {
  height: 6px;
  background: var(--black);
}
.stage-scale .stage .num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stage-scale .stage.active .num { font-size: 38px; }
.stage-scale .stage .lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.stage-scale .stage.active .lbl { color: var(--black); font-weight: 700; }

.phase-bar {
  display: grid;
  grid-template-columns: 4fr 3fr 3fr;
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.phase-bar > div {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 0 12px;
  border-right: 1px solid var(--line);
}
.phase-bar > div:last-child { border-right: none; }
.phase-bar .p3 { color: var(--black); }

.stage-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}
.stage-marker .dot {
  width: 14px; height: 14px;
  background: var(--black);
  margin: 0 auto;
  transform: rotate(45deg);
  margin-top: -7px;
}
.stage-marker .lbl-pill {
  margin-top: 10px;
  padding: 6px 12px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 999px;
  text-align: center;
  line-height: 1.3;
}

/* ─── Lead form ─────────────────────────────────────────── */
.lead-form {
  display: flex; flex-direction: column; gap: 18px;
  max-width: 580px; margin: 0 auto;
  width: 100%;
}
.lf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lf-grid .lf-full { grid-column: 1 / -1; }
.lead-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
}
.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form input[type="tel"],
.lead-form input:not([type]) {
  border: 1.5px solid var(--line-strong);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  transition: border-color .15s;
}
.lead-form input:focus {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(253,195,0,0.4);
}
.lead-form .check {
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  font-weight: 500;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
}
.lead-form .check:has(input:checked) {
  border-color: var(--black);
  background: var(--white);
}
.lead-form .check input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--black);
  cursor: pointer;
}
.lead-form .check em { font-style: normal; opacity: .6; font-size: 11px; }
.lead-form .check u { color: var(--black); cursor: pointer; }

.lf-submit { width: 100%; justify-content: center; padding: 18px; font-size: 16px; }
.lf-err {
  padding: 12px 14px;
  background: #fff5f5;
  border-left: 3px solid var(--err);
  font-size: 13px;
  color: var(--err);
}

/* ─── Result screen ─────────────────────────────────────── */
.result-screen {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 32px 96px;
  overflow-x: hidden;
  width: 100%;
}
.r-hero { text-align: center; margin-bottom: 48px; }
.r-hero .kicker { justify-content: center; }

.r-scale {
  background: var(--paper);
  border: 1.5px solid var(--black);
  border-radius: var(--radius-md);
  padding: 32px 40px 28px;
  margin-bottom: 24px;
  position: relative;
}
.r-summary {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}
.r-phase-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-left: 5px solid var(--yellow);
  border-radius: var(--radius-sm);
  padding: 28px 32px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.r-risk {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--yellow-soft);
  border-left: 3px solid var(--yellow);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.r-global {
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 32px;
  display: flex; flex-direction: column; gap: 4px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.r-global::after {
  content: ">";
  position: absolute;
  right: -20px; bottom: -40px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 200px;
  color: var(--yellow);
  opacity: 0.15;
  line-height: 1;
}
.r-global .kicker { color: var(--yellow); }
.r-global .kicker::before { color: var(--white); }
.r-global .score-big {
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--yellow);
  margin: 8px 0 6px;
  position: relative;
  z-index: 1;
}
.r-global .score-big span {
  font-size: 28px;
  color: rgba(255,255,255,.5);
  font-weight: 500;
  margin-left: 4px;
  letter-spacing: 0;
}

/* Pillars */
.r-pillars { margin-bottom: 48px; }
.pillar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pillar-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  transition: all 0.15s ease;
}
.pillar-card:hover { border-color: var(--black); }
.pc-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.pc-n {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.pc-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  flex: 1;
  letter-spacing: -0.015em;
}
.pc-score {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pc-bar { height: 8px; background: var(--bg); border-radius: 0; overflow: hidden; margin-bottom: 14px; }
.pc-fill { height: 100%; transition: width 0.8s cubic-bezier(.4,0,.2,1); }
.pillar-card.t-low  .pc-fill { background: var(--ink-3); }
.pillar-card.t-mid  .pc-fill { background: var(--yellow); }
.pillar-card.t-high .pc-fill { background: var(--black); }
.pillar-card.t-low  .pc-score { color: var(--ink-3); }
.pillar-card.t-mid  .pc-score { color: var(--ink); }
.pillar-card.t-high .pc-score { color: var(--black); }
.pc-rec {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
  font-weight: 500;
  padding-top: 4px;
}

/* CTA + Meetings embed */
.r-cta {
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}
.r-cta::before {
  content: ">";
  position: absolute;
  top: -60px; left: -40px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 320px;
  color: var(--yellow);
  opacity: 0.06;
  line-height: 1;
  z-index: 0;
}
.r-cta-head {
  text-align: center;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}
.r-cta-head .kicker { justify-content: center; color: var(--yellow); }
.r-cta-head .kicker::before { color: var(--white); }
.r-meetings {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px;
  position: relative;
  z-index: 1;
  min-height: 720px;
}
.meetings-iframe-container { min-height: 720px; }
.meetings-iframe-container iframe {
  border: none !important;
  width: 100% !important;
  min-height: 720px !important;
}

/* 5 livelli Impresoft */
.r-impresoft { margin-bottom: 48px; }
.lvl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lvl-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
  transition: all 0.15s ease;
}
.lvl-card.active {
  background: var(--yellow);
  border-color: var(--black);
  border-width: 2px;
  transform: translateY(-6px);
  box-shadow: 0 8px 0 var(--black);
}
.lvl-n {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.1em;
}
.lvl-card.active .lvl-n { color: var(--black); opacity: 0.7; }
.lvl-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.lvl-tag {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}
.lvl-card.active .lvl-tag { color: var(--black); opacity: 0.7; }
.lvl-culture {
  font-size: 10px;
  color: var(--ink-soft);
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}
.lvl-card.active .lvl-culture {
  color: var(--black);
  opacity: 0.6;
  border-top-color: rgba(0,0,0,0.2);
}
.lvl-you {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--black);
  margin-top: 6px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 4px;
}

/* responsive */
@media (max-width: 820px) {
  .r-summary, .lf-grid { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .lvl-grid { grid-template-columns: repeat(2, 1fr); }
  .stage-scale .stage .num { font-size: 18px; }
  .stage-scale .stage.active .num { font-size: 24px; }
  .phase-bar > div { font-size: 9px; padding: 0 6px; }
  .r-cta { padding: 36px 20px; }
  .result-screen { padding: 32px 16px 60px; }
  .r-scale { padding: 24px 20px 20px; }
  .r-global .score-big { font-size: 72px; }

  /* scala: nascondi label tranne prima, ultima, attiva */
  .stage-scale .stage .lbl { display: none; }
  .stage-scale .stage:first-child .lbl,
  .stage-scale .stage:last-child .lbl,
  .stage-scale .stage.active .lbl { display: block; font-size: 8px; }
}

@media (max-width: 480px) {
  .result-screen { padding: 24px 14px 48px; }
  .r-hero { margin-bottom: 28px; }
  .r-scale { padding: 16px 12px 14px; }
  .r-summary { margin-bottom: 24px; }
  .r-phase-card { padding: 20px 18px; }
  .r-global { padding: 24px 20px; }
  .r-global .score-big { font-size: 56px; }
  .r-global .score-big span { font-size: 22px; }
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar-card { padding: 16px 18px; }
  .lvl-grid { grid-template-columns: 1fr 1fr; }
  .lvl-card { padding: 14px 10px; }
  .lvl-name { font-size: 12px; }
  .lvl-tag, .lvl-culture { font-size: 10px; }
  .r-impresoft { margin-bottom: 32px; }
  .r-pillars { margin-bottom: 32px; }
  .r-cta { padding: 28px 16px; }
  .stage-scale .stage .num { font-size: 14px; }
  .stage-scale .stage.active .num { font-size: 18px; }
  .stage-scale .stage:first-child .lbl,
  .stage-scale .stage:last-child .lbl,
  .stage-scale .stage.active .lbl { font-size: 7px; letter-spacing: 0; }
  .phase-bar { display: none; }
  .stage-marker .lbl-pill { font-size: 8px; padding: 5px 10px; white-space: nowrap; }
  .lead-form { gap: 14px; }
  .lf-submit { padding: 16px; font-size: 15px; }
}
