/* ============================================================
   RUMO — direcao.css
   Diagnóstico de Direção · experiência de app
   ============================================================ */

html {
  scroll-behavior: auto;
}

body.app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 168, 76, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 92% 95%, rgba(45, 106, 79, 0.06) 0%, transparent 60%),
    var(--black);
  background-attachment: fixed;
}

/* ════════ BARRA SUPERIOR ════════ */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.app-bar__inner {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  height: 60px;
  width: min(720px, 100%);
  margin-inline: auto;
  padding-inline: 8px;
}

.app-bar .brand-lockup {
  justify-self: center;
}

.app-bar .brand-logo {
  height: 26px;
}

.app-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--gray-light);
  transition: background 0.4s, color 0.4s, opacity 0.4s, visibility 0.4s;
}

.app-back:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
}

.app-back svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-back[hidden] {
  display: none;
}

.app-bar__count {
  justify-self: end;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  padding-right: 10px;
  transition: opacity 0.45s;
}

/* Barra de progresso */
.app-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
}

.app-progress__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--gold-dim), var(--gold));
  border-radius: 0 3px 3px 0;
  transition: width 0.7s var(--ease-out);
}

/* ════════ PALCO ════════ */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(680px, 100% - 40px);
  margin-inline: auto;
  padding: 36px 0 48px;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen--top {
  justify-content: flex-start;
}

/* Transições entre telas */
@keyframes screen-fwd {
  from { opacity: 0; transform: translateX(36px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes screen-back {
  from { opacity: 0; transform: translateX(-36px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes screen-up {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen.anim-fwd { animation: screen-fwd 0.42s var(--ease-out) both; }
.screen.anim-back { animation: screen-back 0.42s var(--ease-out) both; }
.screen.anim-up { animation: screen-up 0.5s var(--ease-out) both; }

/* ════════ INTRO ════════ */
.intro,
.block-screen,
.loading-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
}

.intro__rose {
  width: 84px;
  height: 84px;
  margin-bottom: 28px;
  animation: compass-spin 120s linear infinite;
}

.intro__brand-sub {
  font-size: 10.5px;
  letter-spacing: 3px;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.intro__title {
  font-size: clamp(36px, 7vw, 52px);
  margin-bottom: 18px;
}

.intro__desc {
  font-size: 16px;
  color: var(--gray-light);
  line-height: 1.8;
  max-width: 460px;
  margin: 0 auto 32px;
}

.intro__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 30px;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: var(--gray-light);
}

.chip svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intro__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.intro__resume-note {
  font-size: 13px;
  color: var(--gray);
}

.intro__privacy {
  margin-top: 36px;
  font-size: 12px;
  color: var(--gray);
  max-width: 380px;
}

.link-ghost {
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--gray);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  transition: color 0.3s;
}

.link-ghost:hover {
  color: var(--cream);
}

/* ════════ INTERSTICIAL DE BLOCO ════════ */

.block-screen__num {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.block-screen__num::before,
.block-screen__num::after {
  content: '';
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}

.block-screen__num::after {
  background: linear-gradient(to left, transparent, var(--gold));
}

.block-screen__title {
  font-size: clamp(32px, 6vw, 44px);
  margin-bottom: 16px;
}

.block-screen__desc {
  font-size: 15.5px;
  color: var(--gray-light);
  max-width: 420px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* ════════ PERGUNTA ════════ */
.q-block-tag {
  font-size: 10.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.q-text:focus,
.result__title:focus {
  outline: none;
}

.q-text {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.6vw, 34px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--cream);
  margin-bottom: 34px;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.q-option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--gray-light);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
  transition: border-color 0.35s, background 0.35s, color 0.35s, transform 0.35s var(--ease-out);
}

@media (hover: hover) {
  .q-option:hover {
    border-color: rgba(201, 168, 76, 0.45);
    background: rgba(201, 168, 76, 0.05);
    color: var(--cream);
    transform: translateX(4px);
  }
}

.q-option:active {
  transform: scale(0.985);
}

.q-option__key {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gray);
  transition: all 0.35s;
}

.q-option.selected {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  color: var(--cream);
}

.q-option.selected .q-option__key {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

@keyframes option-confirm {
  0% { transform: scale(1); }
  45% { transform: scale(0.985); }
  100% { transform: scale(1); }
}

.q-option.confirming {
  animation: option-confirm 0.32s var(--ease-out);
}

/* entrada escalonada das opções */
@keyframes option-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.q-option {
  animation: option-in 0.45s var(--ease-out) both;
  animation-delay: calc(var(--i) * 0.055s + 0.08s);
}

.q-hint {
  margin-top: 28px;
  font-size: 12px;
  color: var(--gray);
  text-align: center;
  letter-spacing: 0.4px;
}

.q-hint kbd {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom-width: 2px;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--gray-light);
}

@media (hover: none) {
  .q-hint {
    display: none;
  }
}

/* ════════ CALCULANDO ════════ */

.loading-screen .rose {
  width: 96px;
  height: 96px;
  animation: compass-spin 3.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.loading-screen__text {
  margin-top: 30px;
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  color: var(--gold);
}

.loading-screen__sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--gray);
}

/* ════════ RESULTADO ════════ */
.result {
  padding-bottom: 24px;
}

.result > * {
  opacity: 0;
  animation: screen-up 0.6s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}

.result__head {
  text-align: center;
  padding: 16px 0 36px;
}

.result__badge {
  display: inline-block;
  padding: 8px 22px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  font-size: 10.5px;
  letter-spacing: 3.5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.result__title {
  font-size: clamp(34px, 6.4vw, 48px);
  margin-bottom: 14px;
}

.result__sub {
  font-size: 15.5px;
  color: var(--gray-light);
  line-height: 1.8;
  max-width: 520px;
  margin: 0 auto;
}

/* Medidor circular */
.result__gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 40px;
}

.gauge-ring {
  position: relative;
  width: 168px;
  height: 168px;
}

.gauge-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-ring__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 7;
}

.gauge-ring__fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s var(--ease-out);
}

.gauge-ring__value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-ring__num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.gauge-ring__num small {
  font-size: 22px;
  color: var(--gray);
}

.gauge-ring__label {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
}

.gauge-caption {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
}

.gauge-status {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
}

/* Seções do resultado */
.result__section-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 6px;
}

.result__section-sub {
  font-size: 13.5px;
  color: var(--gray);
  margin-bottom: 22px;
}

.result__areas {
  margin-bottom: 44px;
}

.area-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border-left: 3px solid var(--gold);
  background: rgba(201, 168, 76, 0.05);
  border-radius: 0 12px 12px 0;
  margin-bottom: 12px;
}

.area-card__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 50%;
  font-size: 18px;
}

.area-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
  margin: 4px 0 5px;
}

.area-card__desc {
  font-size: 13.5px;
  color: var(--gray-light);
  line-height: 1.65;
}

.area-card__spec {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--gold);
  margin-top: 9px;
  letter-spacing: 0.4px;
}

.area-card__spec::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--gold);
}

.urgency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.urgency::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.urgency--alta { background: rgba(192, 57, 43, 0.16); color: var(--red); }
.urgency--media { background: rgba(230, 126, 34, 0.16); color: var(--amber); }
.urgency--baixa { background: rgba(45, 106, 79, 0.18); color: var(--green-light); }

/* Plano de ação */
.result__plan {
  padding: 30px 28px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 14px;
  background: rgba(201, 168, 76, 0.035);
  margin-bottom: 26px;
}

.result__plan .result__section-title {
  color: var(--gold);
}

.plan-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 18px;
}

.plan-item__num {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.14);
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  color: var(--gold);
  font-weight: 600;
}

.plan-item__text {
  font-size: 14.5px;
  color: var(--gray-light);
  line-height: 1.7;
  padding-top: 4px;
}

.plan-item__text strong {
  color: var(--cream);
  font-weight: 500;
}

/* Tempo estimado */
.result__time {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: rgba(45, 106, 79, 0.1);
  border: 1px solid rgba(45, 106, 79, 0.35);
  border-radius: 12px;
  margin-bottom: 44px;
}

.result__time .rose {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.result__time-label {
  font-size: 10.5px;
  letter-spacing: 2px;
  color: var(--green-light);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.result__time-value {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--cream);
}

/* CTA WhatsApp */
.result__cta {
  position: relative;
  text-align: center;
  padding: 44px 28px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201, 168, 76, 0.09) 0%, transparent 70%),
    rgba(10, 10, 10, 0.7);
  overflow: hidden;
  margin-bottom: 28px;
}

.result__cta-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 20px;
  font-size: 10.5px;
  letter-spacing: 2.5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 22px;
}

.result__cta-title {
  font-size: clamp(28px, 5.4vw, 38px);
  margin-bottom: 14px;
}

.result__cta-desc {
  font-size: 14.5px;
  color: var(--gray-light);
  line-height: 1.75;
  max-width: 440px;
  margin: 0 auto 30px;
}

.result__cta .btn--wpp svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.result__cta-note {
  font-size: 12px;
  color: var(--gray);
  margin-top: 16px;
}

.result__footer-actions {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 8px 0 24px;
}

/* ════════ RODAPÉ DO APP ════════ */
.app-footer {
  text-align: center;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.app-footer__brand {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 6px;
  color: var(--gold);
  margin-bottom: 4px;
}

.app-footer__slogan {
  font-size: 12px;
  color: var(--gray);
  font-style: italic;
}

/* ════════ MOBILE ════════ */
@media (max-width: 560px) {
  .stage {
    padding-top: 24px;
  }

  .q-option {
    padding: 16px 16px;
    font-size: 14.5px;
    border-radius: 10px;
  }

  .q-option__key {
    display: none;
  }

  .result__footer-actions {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .block-screen .btn,
  .intro__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .q-option,
  .screen,
  .result > * {
    animation: none !important;
    opacity: 1 !important;
  }
}
