:root {
  --espaco: #03071A;
  --papel: #F3F6FB;
  --ouro: #FFB31A;
  --tinta: #003A74;
  --laranja: #EB7A0B;
  --ceu: #D9EAF6;
  --verde: #17703F;
  --display: 'Unbounded', system-ui, sans-serif;
  --texto: 'Instrument Sans', system-ui, sans-serif;
  --gutter: clamp(16px, 6vw, 96px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--espaco); }

body {
  font-family: var(--texto);
  color: var(--papel);
  background: var(--espaco);
  -webkit-font-smoothing: antialiased;
  transition: color 0.5s ease;
}

body[data-mode="day"] { color: var(--tinta); }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.film {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  visibility: hidden;
  background: #000;
}

.track { height: 1700vh; }

.scrim {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(3, 7, 26, 0.6), rgba(3, 7, 26, 0) 58%);
  transition: opacity 0.5s ease;
}

body[data-mode="day"] .beat { width: min(28rem, calc(100vw - 32px)); }

body[data-mode="day"] .scrim {
  background: linear-gradient(90deg, rgba(243, 246, 251, 0.86), rgba(243, 246, 251, 0) 58%);
}

.veil {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  visibility: hidden;
  z-index: 4;
}

/* header */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: auto;
  padding: 5px;
  border-radius: 10px;
  background: #ffffff;
}

.wordmark {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.wordmark span {
  margin-top: 5px;
  font-family: var(--texto);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  opacity: 0.75;
}

.btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-family: var(--texto);
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-ghost {
  padding: 10px 18px;
  font-size: 14px;
  border: 1.5px solid currentColor;
}

.btn-ghost:hover { background: rgba(235, 122, 11, 0.16); }

.btn-primary {
  margin-top: 28px;
  padding: 17px 28px;
  font-size: 16px;
  color: #ffffff;
  background: var(--tinta);
}

.btn-primary:hover { transform: translateY(-1px); background: #00468c; }

a:focus-visible {
  outline: 3px solid var(--laranja);
  outline-offset: 3px;
}

/* beats */

.beat {
  position: fixed;
  left: var(--gutter);
  top: 50%;
  z-index: 3;
  width: min(34rem, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-50% + var(--y, 0px)));
}

.beat h1,
.beat h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(27px, 3.3vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.beat p {
  margin-top: 18px;
  max-width: 30rem;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
  opacity: 0.82;
}

/* bill */

.bill {
  position: fixed;
  right: var(--gutter);
  top: clamp(92px, 15vh, 170px);
  z-index: 3;
  text-align: right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(var(--y, 0px));
}

.bill-valor {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 7.2vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--tinta);
  transition: color 0.6s ease;
}

.bill-rotulo {
  margin-top: 12px;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
}

.bill-nota {
  margin: 14px 0 0 auto;
  max-width: 21rem;
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.bill.saved .bill-valor { color: var(--verde); }
.bill.saved .bill-nota { opacity: 0.7; }

/* steps */

/* números em destaque na jornada */

.beat.big .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 6.2vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.beat.big h2 {
  margin-top: 10px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.beat.big .conta {
  margin-top: 22px;
  font-size: 17px;
  opacity: 1;
}

.beat.big .conta s { opacity: 0.55; margin: 0 6px; }

.beat.big .conta strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 36px);
  letter-spacing: -0.03em;
  color: var(--verde);
}

.beat.big .nota {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0.7;
}

/* foto real da sede, revelada em maquete por uma varredura */

.photo-reveal {
  position: fixed;
  inset: 0;
  z-index: 2;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  -webkit-mask-image: linear-gradient(100deg, transparent var(--w, -18%), #000 calc(var(--w, -18%) + 16%));
  mask-image: linear-gradient(100deg, transparent var(--w, -18%), #000 calc(var(--w, -18%) + 16%));
}

.photo-reveal canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
}

.photo-reveal figcaption {
  position: absolute;
  left: var(--gutter);
  bottom: 120px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--tinta);
  background: rgba(255, 255, 255, 0.92);
}

/* celular da Samanta */

.phone {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  top: 50%;
  z-index: 3;
  width: 272px;
  height: min(440px, calc(100vh - 240px));
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  border: 6px solid #0d1b33;
  background: #eef2f6;
  box-shadow: 0 24px 60px rgba(0, 30, 70, 0.28);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-50% - 30px + var(--y, 0px)));
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--tinta);
  color: #ffffff;
}

.avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: 160%;
  background-position: 50% 55%;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.phone-who { display: flex; flex-direction: column; line-height: 1.2; }
.phone-who strong { font-size: 15px; }
.phone-who span { font-size: 12px; opacity: 0.8; }

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 36px);
}

.msg {
  display: none;
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.42;
  color: #1b2a40;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 30, 70, 0.08);
}

.msg.in { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; border-bottom-right-radius: 4px; background: #d7e6f7; }
.msg.show { display: block; animation: pop 0.32s ease-out; }

.typing {
  display: none;
  align-self: flex-start;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 14px;
  background: #ffffff;
}

.typing.show { display: inline-flex; }

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8a97a8;
  animation: blink 1s infinite ease-in-out;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* linha do tempo */

.timeline {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 26px;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  transform: translateY(var(--y, 0px));
}

.tl-track {
  position: relative;
  height: 4px;
  margin: 0 8%;
  border-radius: 2px;
  background: rgba(0, 58, 116, 0.16);
}

.tl-fill {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: var(--laranja);
  transform-origin: left;
  transform: scaleX(0);
}

.timeline ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: -9px;
}

.timeline li {
  position: relative;
  padding-top: 22px;
  text-align: center;
  font-size: 13px;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.timeline li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  border: 3px solid #eaf2fa;
  background: #b9c8d8;
  transition: background-color 0.3s ease;
}

.timeline li b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}

.timeline li.reached { opacity: 1; }
.timeline li.reached::before { background: var(--laranja); }

.tl-now { display: none; }

@media (prefers-reduced-motion: reduce) {
  .msg.show { animation: none; }
  .typing i { animation: none; }
}

/* stats */

.stats dl {
  margin-top: 26px;
  display: grid;
  gap: 18px;
}

.stats dd {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.stats dt {
  margin-top: 4px;
  font-size: 15px;
  opacity: 0.75;
}

.link {
  display: inline-block;
  margin-top: 18px;
  color: inherit;
  font-weight: 600;
  text-underline-offset: 4px;
}

/* reviews ancorados nas casas */

.review {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3;
  width: min(260px, 64vw);
  padding: 14px 16px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--tinta);
  box-shadow: 0 10px 30px rgba(16, 32, 63, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translate(var(--ax, 0px), var(--ay, 0px)) translate(-50%, calc(-100% - 14px + var(--y, 0px)));
}

.review::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.review blockquote {
  font-size: 14px;
  line-height: 1.45;
}

.review figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

.stars {
  margin-right: 6px;
  color: var(--laranja);
  letter-spacing: 1px;
}

/* hint */

.hint {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0;
  padding-bottom: 34px;
}

.hint::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1.5px;
  height: 26px;
  background: currentColor;
  transform-origin: top;
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hint::after { animation: none; }
}

/* mobile */

@media (max-width: 720px) {
  .topbar { padding: 16px; }
  .btn-ghost { padding: 9px 14px; font-size: 13px; }

  .scrim,
  body[data-mode="day"] .scrim {
    background: linear-gradient(0deg, rgba(3, 7, 26, 0.72), rgba(3, 7, 26, 0) 55%);
  }
  body[data-mode="day"] .scrim {
    background: linear-gradient(0deg, rgba(243, 246, 251, 0.92), rgba(243, 246, 251, 0) 60%);
  }

  .beat {
    left: 16px;
    top: auto;
    bottom: 40px;
    transform: translateY(var(--y, 0px));
  }

  .bill {
    right: 16px;
    top: 84px;
    transform: translateY(var(--y, 0px));
  }

  .beat h1,
  .beat h2 { font-size: clamp(23px, 6.4vw, 32px); }
  .beat p { margin-top: 12px; }

  .bill-nota { display: none; }
  .stats dl { gap: 10px; margin-top: 16px; }
  .stats dd { font-size: 28px; }
  .review { width: min(220px, 58vw); padding: 10px 12px; }
  .review blockquote { font-size: 12.5px; }
  .beat.big .num { font-size: 48px; }
  .beat.big .nota { display: none; }

  .phone {
    left: 16px;
    right: 16px;
    top: 128px;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    transform: translateY(var(--y, 0px));
  }
  .phone-top { display: none; }
  .chat { padding: 0; mask-image: none; -webkit-mask-image: none; }
  .msg.show:not(.latest) { display: none; }
  .msg { box-shadow: 0 6px 18px rgba(0, 30, 70, 0.16); }

  .timeline { top: 78px; bottom: auto; left: 16px; right: 16px; }
  .tl-track { margin: 0 4px; }
  .timeline ol { display: none; }
  .tl-now { display: block; margin-top: 8px; font-size: 13px; font-weight: 600; }
  .brand img { width: 34px; }
}
