@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Syne:wght@600;700;800&display=swap");

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: #fffcf8;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

::selection {
  background: #d6ff00;
  color: #202127;
}

body {
  margin: 0;
  background: transparent;
  color: #202127;
  font-family: Inter, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/></svg>"),
    radial-gradient(980px 560px at -12% -18%, rgba(214, 255, 0, 0.42), transparent 58%),
    radial-gradient(720px 480px at 112% -8%, rgba(32, 33, 39, 0.07), transparent 52%),
    radial-gradient(640px 460px at 78% 112%, rgba(214, 255, 0, 0.2), transparent 62%),
    #fffcf8;
  background-size: 180px 180px, auto, auto, auto, auto;
}

body::after {
  content: "";
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform-origin: left center;
  transform: scaleX(calc(var(--geral, 0) / 100));
  background: #d6ff00;
  box-shadow: 0 0 18px rgba(214, 255, 0, 0.9);
  pointer-events: none;
  animation: fio 1.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

button {
  font-family: inherit;
}

main {
  position: relative;
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 72px 0 calc(120px + env(safe-area-inset-bottom));
}

.topo {
  position: relative;
  max-width: 100%;
  min-width: 0;
  padding-bottom: 8px;
}

.rotulo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
  margin: 0 0 22px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: #202127;
  color: #fffcf8;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px -18px rgba(32, 33, 39, 0.8);
}

.rotulo::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d6ff00;
  box-shadow: 0 0 0 5px rgba(214, 255, 0, 0.22);
}

h1 {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 10px 0 0;
  font-family: Syne, Inter, sans-serif;
  font-size: clamp(76px, 13vw, 156px);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.9;
  padding-top: 0.04em;
}

h1::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.02em;
  bottom: 0.06em;
  width: 2.15ch;
  height: 0.16em;
  border-radius: 999px;
  background: #d6ff00;
  transform: rotate(-1.4deg);
  box-shadow: 0 10px 30px rgba(214, 255, 0, 0.45);
}

.resumo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
  color: #202127;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.resumo::after {
  content: "";
  width: 132px;
  height: 7px;
  border-radius: 999px;
  background:
    linear-gradient(#d6ff00, #d6ff00) left / calc(var(--geral, 0) * 1%) 100% no-repeat,
    #202127;
  box-shadow: 0 8px 18px -10px rgba(32, 33, 39, 0.7);
}

.resumo-pct {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #d6ff00;
  color: #202127;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  box-shadow:
    0 0 0 6px rgba(214, 255, 0, 0.16),
    0 12px 28px -10px rgba(214, 255, 0, 0.85);
}

.trilha {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 72px 0 0;
  padding: 0;
}

.etapa {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  animation: entra 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.etapa-texto {
  position: relative;
  z-index: 1;
  align-self: stretch;
  width: auto;
  max-width: 100%;
  min-width: 0;
  text-align: center;
  padding: 8px 12px 0;
}

.fase-nome {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(214, 255, 0, 0.28);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fase-nome::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #202127;
  box-shadow: 0 0 0 3px rgba(32, 33, 39, 0.12);
}

.fase-titulo {
  margin: 12px 0 0;
  font-family: Syne, Inter, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  width: min(18em, calc(100vw - 56px));
  margin-inline: auto;
  text-wrap: balance;
}

.fase-periodo {
  margin: 8px 0 0;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #5c5e66;
}

.liga {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 10px;
  height: 40px;
  margin-bottom: 0;
  background: none;
  flex-shrink: 0;
}

.liga::before {
  content: "";
  width: 2px;
  flex: 1;
  border-radius: 999px;
  background: #202127;
}

.liga::after {
  content: "";
  width: 0;
  height: 0;
  border: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #202127;
  background: none;
  box-shadow: none;
  transform: none;
}

.trilho {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px 4px 36px;
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 33, 39, 0.45) transparent;
}

.trilho::-webkit-scrollbar {
  height: 6px;
}

.trilho::-webkit-scrollbar-track {
  background: transparent;
}

.trilho::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(32, 33, 39, 0.35);
}

.trilho::-webkit-scrollbar-thumb:hover {
  background: #202127;
}

.ramo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  width: max-content;
  max-width: none;
  margin-inline: auto;
}

.ramo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 104px;
  right: 104px;
  height: 2px;
  border-radius: 999px;
  background: #202127;
}

.ramo.unico::before,
.ramo.unico .haste {
  display: none;
}

.encaixe {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.haste {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 10px;
  height: 20px;
  margin-bottom: 0;
  background: none;
  position: relative;
  flex-shrink: 0;
}

.haste::before {
  content: "";
  width: 2px;
  flex: 1;
  border-radius: 999px;
  background: #202127;
}

.haste::after {
  content: "";
  width: 0;
  height: 0;
  border: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #202127;
  background: none;
  box-shadow: none;
  transform: none;
}

.no {
  --p: 0;
  position: relative;
  width: 208px;
  min-height: 168px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: #fffcf8;
  background:
    linear-gradient(165deg, rgba(255, 252, 248, 0.14), transparent 42%),
    #202127;
  border: 0;
  border-radius: 28px;
  cursor: pointer;
  box-shadow: 0 16px 28px -18px rgba(32, 33, 39, 0.55);
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.45s ease;
}

.no-nome {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.no-pct {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #202127 0 57%, transparent 58%),
    conic-gradient(from -90deg, #d6ff00 calc(var(--p) * 1%), rgba(255, 252, 248, 0.16) 0);
  color: #d6ff00;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  box-shadow: inset 0 0 0 1px rgba(214, 255, 0, 0.08);
}

.no:has(.tag.feito) {
  box-shadow: 0 16px 28px -18px rgba(32, 33, 39, 0.55);
}

.no:has(.tag.feito) .no-pct {
  box-shadow:
    0 0 22px rgba(214, 255, 0, 0.45),
    inset 0 0 0 1px rgba(214, 255, 0, 0.2);
}

.tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.1);
  color: #fffcf8;
}

.tag.feito {
  background: #d6ff00;
  color: #202127;
}

.modal[hidden] {
  display: none;
}

.modal {
  --p: 0;
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.modal-fundo {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(32, 33, 39, 0.58);
  backdrop-filter: blur(16px) saturate(1.2);
  cursor: pointer;
  animation: vela 0.35s ease both;
}

.modal-caixa {
  position: relative;
  width: min(620px, 100%);
  max-height: min(82dvh, 760px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #d6ff00 transparent;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(214, 255, 0, 0.2), transparent 46%),
    linear-gradient(180deg, #2a2c34 0%, #202127 28%);
  color: #fffcf8;
  border: 0;
  border-radius: 32px;
  padding: 28px 26px 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 248, 0.16),
    0 40px 90px -30px rgba(32, 33, 39, 0.85),
    0 0 0 1px rgba(214, 255, 0, 0.18);
  animation: surge 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-caixa::-webkit-scrollbar {
  width: 8px;
}

.modal-caixa::-webkit-scrollbar-track {
  margin: 18px 0;
  background: transparent;
}

.modal-caixa::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d6ff00;
}

.modal-topo {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto auto;
  gap: 4px 16px;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 252, 248, 0.1);
}

.modal-fase {
  margin: 0;
  grid-column: 1;
  grid-row: 1;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d6ff00;
}

#modal-titulo {
  margin: 2px 0 0;
  grid-column: 1;
  grid-row: 2;
  font-family: Syne, Inter, sans-serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.modal-pct {
  margin: 0;
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #202127 0 58%, transparent 59%),
    conic-gradient(from -90deg, #d6ff00 calc(var(--p) * 1%), rgba(255, 252, 248, 0.14) 0);
  font-size: 16px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: #d6ff00;
  box-shadow: 0 0 28px rgba(214, 255, 0, 0.28);
}

.fechar {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  margin: 0;
  min-height: 42px;
  padding: 8px 18px;
  background: #d6ff00;
  color: #202127;
  border: 0;
  border-radius: 999px;
  font-weight: 750;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.grupo + .grupo {
  margin-top: 26px;
}

.grupo h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d6ff00;
}

.topico {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 252, 248, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 248, 0.04);
  transition: background 0.25s ease, transform 0.25s ease;
}

.topico:has(.tag.feito) {
  background: rgba(255, 252, 248, 0.05);
}

.topico span:first-child {
  min-width: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

button:focus-visible {
  outline: 2px solid #d6ff00;
  outline-offset: 3px;
}

@media (hover: hover) {
  .no:hover {
    transform: translateY(-10px);
    background:
      linear-gradient(165deg, rgba(214, 255, 0, 0.16), transparent 46%),
      #2a2c34;
    box-shadow: 0 18px 28px -16px rgba(32, 33, 39, 0.5);
  }

  .no:active {
    transform: translateY(-2px) scale(0.985);
  }

  .fechar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(214, 255, 0, 0.9);
  }

  .topico:hover {
    background: rgba(255, 252, 248, 0.09);
  }
}

@media (max-width: 980px) {
  main {
    width: calc(100% - 32px);
    padding-top: 36px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  h1 {
    font-size: clamp(52px, 15vw, 88px);
  }

  .trilha {
    margin-top: 48px;
  }

  .ramo {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 18px;
  }

  .ramo::before,
  .haste {
    display: none;
  }

  .ramo:not(.unico) .encaixe + .encaixe .haste {
    display: flex;
    height: 20px;
  }

  .no {
    width: min(100%, 320px);
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-caixa {
    width: 100%;
    max-height: min(92dvh, 100%);
    border-radius: 28px 28px 0 0;
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
  }

  .modal-topo {
    grid-template-columns: 1fr auto;
  }

  .modal-pct {
    width: 72px;
    height: 72px;
    font-size: 14px;
  }

  .fechar {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
    width: 100%;
    margin-top: 10px;
  }
}

@media (max-width: 380px) {
  main {
    width: calc(100% - 20px);
  }

  .no {
    width: 100%;
  }

}

@keyframes entra {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes surge {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes vela {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fio {
  from {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .etapa,
  .modal-caixa,
  .modal-fundo,
  .no,
  .fechar,
  .topico,
  body::after {
    animation: none;
    transition: none;
  }
}
