/* Iteron Solo — drum (path) și profil.
 * „Tactile & Crisp Ocean”: tot ce e specific drumului e scoruit sub .ipath / .ipath-*.
 * Reguli:
 *   - doar variabile CSS din styles.css (:root) — paleta/fonturile nu se redeclară;
 *   - suprafețe albe, bordură 2px var(--line), colțuri var(--r-card);
 *   - elemente interactive cu lip solid 4px (var(--lip)) care se strânge la apăsare;
 *   - ținte tactile >= 44px, fără scroll orizontal.
 */

.ipath {
  --ip-node: 80px;
  --ip-node-lg: 96px;
  --ip-gap: 26px;
  --ip-ease: var(--spring);
  --ip-dur: var(--dur);
  color: var(--text);
  font-family: var(--f-body);
  -webkit-tap-highlight-color: transparent;
}
.ipath *, .ipath *::before, .ipath *::after { box-sizing: border-box; }
.ipath :is(button, input, a):focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
}
.ipath-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------- butoane tactile ---------------- */

.ipath-btn {
  font-family: var(--f-body);
  font-weight: 700; font-size: 14px; letter-spacing: .2px;
  border: var(--border); border-bottom-width: var(--lip);
  cursor: pointer; border-radius: var(--r-btn);
  padding: 12px 18px; min-height: 44px;
  color: var(--text);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-transform: none;
  transition: transform var(--dur-fast) ease-out, background var(--dur-fast) ease-out,
              border-color var(--dur-fast) ease-out, border-bottom-width var(--dur-fast) ease-out;
}
.ipath-btn:hover { background: var(--surface-2); }
.ipath-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
.ipath-btn-primary {
  background: var(--accent-hi);
  border-color: var(--accent-deep);
  border-bottom-width: var(--lip);
  color: var(--accent-ink);
  text-transform: uppercase;
}
.ipath-btn-primary:hover { background: var(--accent); }
.ipath-btn-primary:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
.ipath-btn:disabled {
  opacity: .5; cursor: default; transform: none;
  border-bottom-width: var(--lip);
}
.ipath-btn-sm { padding: 8px 14px; font-size: 13px; min-height: 44px; white-space: nowrap; }

/* ---------------- layout ---------------- */

.ipath-main {
  width: 100%; max-width: 600px;
  margin: 0 auto; padding: 6px 0 110px;
}
.ipath-hero { margin: 4px 0 20px; text-align: center; }
.ipath-hero h1 {
  font-family: var(--f-display);
  font-weight: 700; font-size: 32px; line-height: 1.18; letter-spacing: -.25px;
  margin: 0 0 6px;
}
.ipath-hero p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.ipath-eyebrow {
  font-family: var(--f-body);
  text-transform: uppercase; letter-spacing: .3px;
  font-size: 12px; line-height: 1.33; color: var(--accent); font-weight: 700;
  margin-bottom: 10px;
}

/* card „următorul pas" */
.ipath-next {
  width: 100%; margin: 0 auto 18px;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: var(--border);
}
.ipath-next-info { flex: 1; min-width: 0; }
.ipath-next-title {
  font-family: var(--f-body); font-weight: 700; font-size: 17px; line-height: 1.33;
  margin: 2px 0 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ipath-next-meta { color: var(--muted); font-size: 13px; line-height: 1.43; }

/* banner-ul sesiunii de recapitulare */
.ipath-review {
  width: 100%; margin: 0 auto 18px;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-card);
  background: var(--surface-2);
  border: var(--border);
}
.ipath-review-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: var(--r-btn);
  display: grid; place-items: center; color: var(--warning);
  background: var(--surface);
  border: 2px solid var(--gold);
  border-bottom-width: var(--lip);
}
.ipath-review-icon svg { width: 22px; height: 22px; }
.ipath-review-body { flex: 1; min-width: 0; }
.ipath-review-title { font-weight: 700; font-size: 16px; line-height: 1.33; margin-bottom: 2px; }
.ipath-review-sub { color: var(--muted); font-size: 13px; line-height: 1.43; }

/* ---------------- drumul ---------------- */

.ipath-trail { position: relative; margin-top: 14px; padding: 6px 0 10px; }
.ipath-wire {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: visible;
}
.ip-w-base { fill: none; stroke: var(--line-soft); stroke-width: 14; stroke-linecap: round; }
.ip-w-prog { fill: none; stroke: var(--accent-hi); stroke-width: 4; stroke-linecap: round; opacity: .9; }
.ip-w-dot {
  fill: none; stroke: var(--accent-hi); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: .1 9; opacity: .55;
}

.ipath-stop { position: relative; z-index: 1; display: flex; justify-content: center; margin-bottom: var(--ip-gap); }
.ipath-anchor {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  transform: translateX(var(--ip-off, 0px));
}
.ipath-nodewrap { position: relative; }

.ipath-node {
  position: relative;
  width: var(--ip-node); height: var(--ip-node);
  min-width: 44px; min-height: 44px;
  border-radius: 50%;
  border: var(--border); border-bottom-width: var(--lip);
  display: grid; place-items: center;
  font-family: var(--f-body); color: var(--muted);
  background: var(--surface-5);
  cursor: pointer;
  transition: transform var(--dur-fast) ease-out, box-shadow var(--dur-fast) ease-out,
              background var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out,
              border-bottom-width var(--dur-fast) ease-out;
}
.ipath-node svg { width: 26px; height: 26px; }
.ipath-node:hover { transform: translateY(-2px); }
.ipath-node:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

/* rezolvat — verde de success, cu lip */
.ipath-node-done {
  background: var(--success-bg);
  border-color: var(--success);
  border-bottom-width: var(--lip);
  color: var(--success-ink);
}
.ipath-node-done:hover { background: var(--success-bg); }

/* curent — banner azure, nod mai mare, cu inel de accent */
.ipath-node-current {
  width: var(--ip-node-lg); height: var(--ip-node-lg);
  background: var(--accent-hi);
  border-color: var(--accent);
  border-bottom-width: var(--lip);
  color: var(--accent-ink);
  animation: ip-bob 2.2s var(--spring) infinite;
}
.ipath-node-current::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--surface);
  pointer-events: none;
}
.ipath-node-current::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid var(--accent-hi);
  animation: ip-halo 2.2s var(--spring) infinite;
  pointer-events: none;
}

/* blocat — deskuitat */
.ipath-node-locked {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--faint);
  cursor: not-allowed;
}
.ipath-node-locked:hover { transform: none; }
.ipath-node-locked:active { transform: none; border-bottom-width: var(--lip); }

.ipath-badge {
  position: absolute; top: -6px; right: -8px;
  min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--gold);
  border: 2px solid var(--surface);
  color: var(--warning);
  display: grid; place-items: center;
  font-family: var(--f-body); font-weight: 700; font-size: 12px; line-height: 1;
}

.ipath-tag-start {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; min-height: 44px; border-radius: var(--r-sm);
  background: var(--accent-hi);
  border: 2px solid var(--accent-deep);
  color: var(--accent-ink);
  font-family: var(--f-body);
  font-size: 12px; line-height: 1; font-weight: 700; letter-spacing: .2px;
  text-transform: uppercase;
  white-space: nowrap;
  animation: ip-bob 2.2s var(--spring) infinite;
}
.ipath-tag-start svg { width: 14px; height: 14px; }

.ipath-pips {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px; padding: 6px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: var(--border-soft);
}
.ipath-pip {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--surface-4);
}
.ipath-pip.on { background: var(--accent-hi); }

/* ---------------- unități și domenii ---------------- */

.ipath-unitstop { position: relative; z-index: 1; margin: 28px 0 var(--ip-gap); }
/* unitatea din drum = banner azure cu text alb și lip 4px (ca în mockup) */
.ipath-unit-card {
  width: 100%; margin: 0 auto; text-align: center;
  padding: 18px 22px;
  border-radius: var(--r-card);
  background: var(--accent-hi);
  border: 2px solid var(--accent);
  border-bottom-width: var(--lip);
  color: var(--accent-ink);
}
.ipath-unit-rib {
  font-family: var(--f-body);
  text-transform: uppercase; letter-spacing: .3px;
  font-size: 12px; line-height: 1.33; font-weight: 700;
  color: var(--accent-ink); opacity: .85;
  margin-bottom: 8px;
}
.ipath-unit-title {
  font-family: var(--f-display);
  margin: 0 0 6px; font-size: 24px; line-height: 1.25; letter-spacing: 0;
  color: var(--accent-ink);
}
.ipath-unit-blurb { margin: 0 0 10px; color: var(--accent-ink); opacity: .9; font-size: 14px; line-height: 1.43; }
.ipath-unit-meta {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 10px; color: var(--accent-ink); font-size: 13px; line-height: 1.43; font-weight: 600;
}
.ipath-meta-sep { opacity: .6; }
.ipath-trophy { color: var(--xp); display: inline-flex; align-items: center; gap: 5px; }
.ipath-trophy svg { width: 15px; height: 15px; flex: 0 0 auto; }

.ipath-domain {
  position: relative; z-index: 1;
  text-align: center; margin: 22px 0 -4px;
  color: var(--muted);
  font-family: var(--f-body);
  font-size: 12px; line-height: 1.33; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase;
}

/* ---------------- final de drum ---------------- */

.ipath-finish {
  margin: 10px 0 20px; text-align: center;
  padding: 26px 22px;
  border-radius: var(--r-card);
  background: var(--success-bg);
  border: 2px solid var(--success);
}
.ipath-finish .big { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.ipath-finish h2 {
  font-family: var(--f-display);
  margin: 0 0 6px; font-size: 22px; line-height: 1.3; letter-spacing: -.25px;
}
.ipath-finish p { margin: 0; color: var(--success-ink); }
.ipath-empty {
  text-align: center; padding: 26px 22px; color: var(--muted);
  border-radius: var(--r-card);
  background: var(--surface);
  border: var(--border);
}

/* ---------------- animații ---------------- */

@keyframes ip-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ip-halo { 0% { transform: scale(.92); opacity: .8; } 70% { transform: scale(1.18); opacity: 0; } 100% { opacity: 0; } }
@keyframes ip-pop { 0% { transform: scale(1); } 40% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes ip-deny { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.ipath-node.pop { animation: ip-pop .3s var(--ip-ease); }
.ipath-node.deny { animation: ip-deny .34s ease; }

/* ---------------- breakpoint-uri ---------------- */

@media (min-width: 901px) {
  .ipath-main { padding: 8px 0 80px; }
}

@media (max-width: 560px) {
  .ipath { --ip-node: 70px; --ip-node-lg: 84px; --ip-gap: 24px; }
  .ipath-main { padding: 4px 0 96px; }
  .ipath-hero { margin-bottom: 18px; }
  .ipath-hero h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.25px; }
  .ipath-hero p { font-size: 14px; }
  .ipath-next, .ipath-review { flex-wrap: wrap; row-gap: 10px; }
  .ipath-next .ipath-btn, .ipath-review .ipath-btn { width: 100%; }
  .ipath-unit-card { padding: 16px 16px; }
  .ipath-unit-title { font-size: 20px; line-height: 1.3; }
}

/* Fără scroll orizontal pe niciun breakpoint. */
.ipath-stop, .ipath-unitstop, .ipath-domain { max-width: 100%; }
.ipath-main, .ipath-trail { overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  .ipath * { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
