/* Mushbit · bloco "O caminho do host" v2 (visual, sem valores) — seção .funnel da home
   Depende só das variáveis do styles.css (--cream, --orange, --display, --mono, --ease-out). */

.phases { position: relative; margin-top: clamp(48px, 6vw, 88px); }
.phases__title { margin: 0 0 clamp(28px, 3vw, 44px); font-family: var(--display); font-weight: 700; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.05; letter-spacing: -.01em; color: var(--cream); }

.phases__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 1 · os HDs */
.phase { display: flex; justify-content: center; padding: 0 6px; opacity: .25; transform: translateY(10px);
         transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.phases.is-on .phase.is-lit { opacity: 1; transform: none; }
.phase__art { height: clamp(64px, 7vw, 100px); max-width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.phase__art svg { height: 100%; width: auto; overflow: visible; }
.phase__art .phd--sm { height: auto; width: 30%; max-width: 50px; flex: 0 1 auto; min-width: 0; }
.phd__body { fill: rgba(244,239,230,.04); stroke: rgba(244,239,230,.38); stroke-width: 2; }
.phd__fill { fill: var(--orange); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform 1.1s var(--ease-out); }
.phases.is-on .phase.is-lit .phd__fill { transform: scaleY(var(--lvl, 0)); }
.phd__led { fill: rgba(244,239,230,.38); }
.phase.is-lit .phd__led { fill: var(--orange); }

/* 2 · a linha que sobe */
.phases__band { position: relative; height: clamp(180px, 21vw, 300px); margin: clamp(48px, 5vw, 64px) 0 10px; }
.phases__band svg.phases__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
                                clip-path: inset(0 100% 0 0); transition: clip-path 3.6s linear; }
.phases.is-on .phases__band svg.phases__svg { clip-path: inset(-30px -2% -30px 0); }
.phases__line { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round;
                vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(236,106,44,.55)); }
.phases__area { fill: url(#phasesGrad); }
.phases__grid-line { stroke: rgba(244,239,230,.07); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 5; }

/* o $ de cada fase: cresce de uma fase para a outra */
.phases__pt { position: absolute; width: 0; height: 0; --s: 24px; }
.phases__pt:nth-of-type(2) { --s: 32px; }
.phases__pt:nth-of-type(3) { --s: 42px; }
.phases__pt:nth-of-type(4) { --s: 58px; }
.phases__pt i { position: absolute; left: calc(var(--s) / -2); top: calc(var(--s) / -2); width: var(--s); height: var(--s);
                display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #0b0b0b;
                font: 800 calc(var(--s) * .56)/1 var(--display); font-style: normal;
                box-shadow: 0 0 0 4px #000, 0 0 24px rgba(236,106,44,.6);
                transform: scale(0); transition: transform .5s cubic-bezier(.3,1.7,.5,1); }
.phases.is-on .phases__pt.is-lit i { transform: scale(1); }

/* os $ pequenos que sobem quando a fase acende */
.phases__pt em { position: absolute; left: 0; top: 0; font: 700 calc(var(--s) * .42)/1 var(--display); font-style: normal;
                 color: var(--orange); opacity: 0; pointer-events: none; }
.phases.is-on .phases__pt.is-lit em { animation: phasesFloat 1.6s ease-out forwards; }
.phases.is-on .phases__pt.is-last.is-lit em { animation: phasesFloat 1.8s ease-out infinite; }
.phases__pt em:nth-of-type(1) { margin-left: -1.1em; animation-delay: .15s !important; }
.phases__pt em:nth-of-type(2) { margin-left: .3em;  animation-delay: .5s !important; }
.phases__pt em:nth-of-type(3) { margin-left: -.4em; animation-delay: .85s !important; }
@keyframes phasesFloat { 0% { opacity: 0; transform: translateY(calc(var(--s) * -.4)); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(calc(var(--s) * -.4 - 60px)); } }

.phases__pt.is-last.is-lit i::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--orange);
                                      opacity: 0; animation: phasesPing 2.2s ease-out 1s infinite; }
@keyframes phasesPing { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* 3 · a linha do tempo */
.phases__axis { border-top: 1px solid rgba(244,239,230,.18); padding-top: 18px; }
.phases__axis .phases__grid > div { position: relative; text-align: center; padding: 0 6px; }
.phases__axis .phases__grid > div::before { content: ""; position: absolute; left: 50%; top: -23px; width: 9px; height: 9px; margin-left: -4.5px;
                                            border-radius: 50%; background: rgba(244,239,230,.3); transition: background .4s ease; }
.phases__axis .phases__grid > div.is-lit::before { background: var(--orange); }
.phases__axis span { display: block; font: 500 12px/1.2 var(--mono); letter-spacing: .12em; color: var(--orange); }
.phases__axis strong { display: block; margin-top: 6px; font-family: var(--display); font-weight: 600; font-size: clamp(15px, 1.6vw, 24px); line-height: 1.15; color: var(--cream); }
.phases__more { display: inline-block; margin-top: 28px; font: 500 13px/1.4 var(--mono); color: rgba(244,239,230,.55); text-decoration: none; border-bottom: 1px solid rgba(244,239,230,.2); }
.phases__more:hover { color: var(--orange); border-color: var(--orange); }

@media (max-width: 700px) {
  .phase__art { height: 56px; gap: 3px; }
  .phase { padding: 0 2px; }
  .phases__pt { --s: 18px; }
  .phases__pt:nth-of-type(2) { --s: 24px; }
  .phases__pt:nth-of-type(3) { --s: 30px; }
  .phases__pt:nth-of-type(4) { --s: 40px; }
  .phases__axis strong { font-size: 13px; }
  .phases__axis .phases__grid > div { padding: 0 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .phase, .phd__fill, .phases__band svg.phases__svg, .phases__pt i { transition: none !important; }
  .phases__pt em { display: none; }
  .phases__pt.is-last.is-lit i::after { animation: none; }
}

/* ───────── VERSÕES B, C e D (destaque do Dia 1, mesmo vazio) ───────── */
.phase { position: relative; }

/* B · Dia 1 em destaque: selo sobre o HD vazio + $ no próprio HD */
.phases__chip { position: absolute; left: 50%; top: -38px; transform: translate(-50%, 6px); white-space: nowrap;
                background: var(--orange); color: #0b0b0b; font: 600 12px/1 var(--mono); letter-spacing: .04em;
                padding: 7px 12px; border-radius: 999px; opacity: 0; transition: opacity .5s ease .5s, transform .5s var(--ease-out) .5s; }
.phases__chip::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--orange); }
.phases.is-on .phase.is-lit .phases__chip { opacity: 1; transform: translate(-50%, 0); }
.phd__coin { position: absolute; right: calc(50% - clamp(40px, 4vw, 56px)); bottom: -8px; width: 30px; height: 30px; border-radius: 50%;
             display: grid; place-items: center; background: var(--orange); color: #0b0b0b; font: 800 17px/1 var(--display);
             box-shadow: 0 0 0 4px #000, 0 0 22px rgba(236,106,44,.7); transform: scale(0); transition: transform .5s cubic-bezier(.3,1.7,.5,1) .3s; }
.phases.is-on .phase.is-lit .phd__coin { transform: scale(1); }
.phd__coin::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--orange); opacity: 0; animation: phasesPing 2.2s ease-out 1.2s infinite; }
.phases--b .phase:first-child .phd__body, .phases--d .phases__day1 .phd__body { stroke: var(--orange); stroke-dasharray: 5 4; filter: drop-shadow(0 0 8px rgba(236,106,44,.45)); }
.phases--b .phases__axis .phases__grid > div:first-child strong,
.phases--c .phases__axis .phases__grid > div:first-child strong { color: var(--orange); }
.phases__fine { margin-left: 14px; font: 400 12px var(--mono); color: rgba(244,239,230,.4); }

/* C · pilhas de moedas embaixo da linha: o Dia 1 já tem a sua */
.phases--c .phases__pt { --s: 34px !important; }
.phases__stack { position: absolute; left: -15px; top: 0; width: 30px; border-radius: 5px 5px 0 0;
                 background: repeating-linear-gradient(to top, #EC6A2C 0 9px, #8f3712 9px 11px);
                 box-shadow: 0 0 18px rgba(236,106,44,.35); transform-origin: 50% 100%; transform: scaleY(0);
                 transition: transform .9s cubic-bezier(.2,1.2,.4,1); }
.phases.is-on .phases__pt.is-lit .phases__stack { transform: scaleY(1); }
.phases--c .phases__svg .phases__area { opacity: .45; }

/* D · o Dia 1 num cartão próprio, o resto do caminho ao lado */
.phases__d { display: grid; grid-template-columns: minmax(190px, 1fr) 3fr; gap: clamp(18px, 3vw, 44px); align-items: stretch; }
.phases__day1 { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center;
                border: 1px solid rgba(236,106,44,.55); border-radius: 22px; padding: 28px 18px; background: rgba(236,106,44,.07);
                box-shadow: 0 30px 80px -40px rgba(236,106,44,.55); }
.phases__day1 > span { white-space: nowrap; font: 500 12px/1 var(--mono); letter-spacing: .14em; color: var(--orange); }
.phases__day1 .phase__art { position: relative; height: clamp(80px, 8vw, 110px); }
.phases__day1 .phd__coin { transform: scale(1); right: -18px; }
.phases__day1 strong { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2vw, 30px); line-height: 1.1; color: var(--cream); }
.phases--d .phases__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.phases--d .phases__pt { --s: 30px; }
.phases--d .phases__pt:nth-of-type(2) { --s: 42px; }
.phases--d .phases__pt:nth-of-type(3) { --s: 58px; }

@media (max-width: 700px) {
  .phases__chip { font-size: 10px; padding: 5px 8px; top: -30px; }
  .phd__coin { width: 22px; height: 22px; font-size: 13px; right: calc(50% - 30px); }
  .phases__stack { left: -10px; width: 20px; }
  .phases--c .phases__pt { --s: 26px !important; }
  .phases__d { grid-template-columns: 1fr; }
  .phases__day1 { flex-direction: row; justify-content: flex-start; text-align: left; padding: 18px 20px; }
  .phases__day1 .phase__art { height: 64px; }
  .phases__fine { display: block; margin: 8px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .phases__chip, .phd__coin, .phases__stack { transition: none !important; }
  .phd__coin::after { animation: none; }
}

.phases--b .phases__title { margin-bottom: clamp(56px, 5vw, 72px); }

/* E · D + pilhas da C + ícone de computador */
.phd__stand { fill: rgba(244,239,230,.38); }
.phase.is-lit .phd__stand, .phases__day1 .phd__stand { fill: rgba(244,239,230,.55); }
.phases--e .phases__day1 .phd__body { stroke: var(--orange); stroke-dasharray: 6 5; filter: drop-shadow(0 0 8px rgba(236,106,44,.45)); }
.phases--e .phases__day1 .phd__coin { right: -14px; bottom: 6px; }
.phases--e .phases__day1 strong { line-height: 1.15; }
.phases__on { color: var(--orange); }
.phases--e .phases__pt, .phases--e .phases__pt:nth-of-type(n) { --s: 34px; }
.phases--e .phases__svg .phases__area { opacity: .45; }
.phases--e .phase__art { height: clamp(58px, 6vw, 86px); }
.phases--e .phases__day1 .phase__art { height: clamp(78px, 8vw, 108px); }
.phases--e .phase__art .phd--sm { max-width: 64px; width: 32%; }
@media (max-width: 700px) {
  .phases--e .phases__pt, .phases--e .phases__pt:nth-of-type(n) { --s: 26px; }
  .phases--e .phase__art { height: 44px; }
  .phases--e .phases__day1 .phase__art { height: 60px; }
  .phases--e .phases__day1 .phd__coin { right: -10px; bottom: 4px; }
}
