/* Site do Wardline. Cores e fontes do app (packages/ui/src/tokens.css); o sistema de movimento
   segue a referência aprovada pelo Mikael (curva padrão, escada de entrada, ilha com mola). */

:root {
  --bg: #0f1012;
  --bg-deep: #0a0b0a;
  --panel: #151719;
  --panel-raised: #191b1d;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #e9ebe7;
  --text-secondary: #cfd4cc;
  --text-muted: #9aa097;
  --text-dim: #7d837a;
  --accent: oklch(0.88 0.19 125);
  --accent-ink: #10120e;
  --magic: oklch(0.78 0.13 290);
  --tint: rgba(233, 235, 231, 0.06);
  --tint-strong: rgba(233, 235, 231, 0.1);
  --glass: rgba(233, 235, 231, 0.1);
  --island: #050605;

  --std: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);

  --font-body: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 235, 231, 0.12) transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(233, 235, 231, 0.14);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Superfície com cantos de squircle: o fundo fica num span filho, recortado por clip-path no JS. */
.sq {
  position: relative;
  isolation: isolate;
}
.sq > .fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.focus-ring {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--std);
}
:focus-visible > .focus-ring {
  opacity: 0.9;
}
:focus-visible {
  outline: none;
}

/* Entrada na carga: cada bloco tem o seu atraso (escada fixa, não depende de rolagem). */
.rise {
  opacity: 0;
  transform: translateY(20px);
}
.rise.tilt {
  transform: translateY(32px) rotate(2deg);
}
.rise.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 500ms var(--std),
    transform 500ms var(--std);
}

/* ---------- Cabeçalho ---------- */

.header {
  position: fixed;
  top: 0;
  z-index: 40;
  width: 100%;
  outline: 1px solid rgba(233, 235, 231, 0);
  transition: box-shadow 300ms ease-in-out;
}
.header.scrolled {
  background: rgba(15, 16, 18, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  outline-color: rgba(233, 235, 231, 0.05);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 108rem;
  min-height: 56px;
  margin: 0 auto;
  padding: 20px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: header-rise 0.5s ease 75ms both;
  will-change: transform;
}
@keyframes header-rise {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.75) rotate(6deg);
  }
}
.logo {
  position: relative;
  display: flex;
  width: 40px;
  height: 40px;
  margin: -6px;
  padding: 6px;
  box-sizing: content-box;
  border-radius: 16px;
}
.logo-tile {
  position: relative;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 12px;
}
.logo-tile img {
  width: 40px;
  height: 40px;
  transition:
    transform 300ms var(--ease-out),
    opacity 300ms var(--ease-out);
  transition-delay: 50ms;
}
.logo-tile .tile-ring {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(233, 235, 231, 0.14);
  pointer-events: none;
}
.logo-tile .back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--panel-raised);
  color: var(--accent);
  opacity: 0;
  transform: translateX(2px) scale(0.5);
  transform-origin: right center;
  filter: blur(2px);
  transition:
    transform 300ms var(--ease-out),
    opacity 300ms var(--ease-out),
    filter 300ms var(--ease-out);
}
.logo:hover .logo-tile img {
  transform: translateX(-100%) scaleX(0.5) scaleY(0.75);
  opacity: 0.25;
  transition-delay: 0ms;
}
.logo:hover .back {
  opacity: 1;
  transform: none;
  filter: none;
  transition-delay: 50ms;
}
.wordmark {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.version {
  align-self: flex-start;
  margin-top: -6px;
  margin-left: -4px;
  padding: 1px 5px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.version > .fill {
  background: var(--tint);
}
.version.rise {
  transform: rotate(4deg) scale(0.75) translateY(8px);
}
.version.rise.in {
  transform: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: nav-fade 0.7s ease-in 75ms both;
}
@keyframes nav-fade {
  0% {
    opacity: 0;
  }
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 600;
}
.nav-link > .fill {
  background: var(--tint);
  opacity: 0;
  transition: opacity 300ms var(--std);
}
.nav-link:hover > .fill {
  opacity: 1;
}
.nav-link svg {
  width: 22px;
  height: 22px;
  overflow: visible;
}
.nav-link svg * {
  transition: transform 300ms var(--std);
}
.ic-grid .c1 {
  transform-origin: 30% 30%;
}
.ic-grid .c4 {
  transform-origin: 70% 70%;
}
.nav-link:hover .ic-grid .c1 {
  transform: translate(-1.5px, -1.5px);
}
.nav-link:hover .ic-grid .c4 {
  transform: translate(1.5px, 1.5px);
}
.nav-link:hover .ic-grid .c2 {
  transform: rotate(45deg);
  transform-box: fill-box;
  transform-origin: center;
  transition-delay: 50ms;
}
.ic-play .tri {
  transform-box: fill-box;
  transform-origin: center;
}
.nav-link:hover .ic-play .tri {
  transform: translateX(2px) scale(1.1);
}
.ic-play .frame {
  transform-box: fill-box;
  transform-origin: left bottom;
}
.nav-link:hover .ic-play .frame {
  transform: rotate(-6deg);
  transition-delay: 50ms;
}
.snap-back,
.snap-back * {
  transition-duration: 0s !important;
}

/* ---------- Botões ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-height: 60px;
  padding: 16px 20px 16px 52px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.btn .lead,
.btn .label,
.btn .arrow {
  transition:
    transform 300ms var(--std),
    opacity 300ms var(--std),
    filter 300ms var(--std);
}
.btn .lead {
  position: absolute;
  left: 20px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.btn .arrow {
  position: absolute;
  right: 20px;
  width: 24px;
  height: 24px;
  transform: translateX(100%) scaleX(0.5);
  opacity: 0;
  filter: blur(8px);
}
.btn:hover .lead {
  transform: translateX(-100%) scaleX(0.5);
  opacity: 0;
  filter: blur(8px);
}
.btn:hover .label {
  transform: translateX(-32px);
}
.btn:hover .arrow {
  transform: none;
  opacity: 1;
  filter: none;
}
.btn-primary {
  color: var(--accent-ink);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.45),
    0 8px 10px -6px rgba(0, 0, 0, 0.4);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  box-shadow: 0 25px 50px -12px oklch(0.88 0.19 125 / 0.22);
  pointer-events: none;
}
.btn-primary > .fill {
  background: var(--accent);
}
.btn-info {
  color: var(--text);
}
.btn-info > .fill {
  background: var(--tint);
}
.diamond {
  width: 14px;
  height: 14px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 1.5px;
}

.btn-seal {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.btn-seal > .fill {
  background: var(--tint);
}
.seal {
  width: 22px;
  height: 22px;
}
.seal .badge {
  fill: rgba(233, 235, 231, 0.22);
  stroke: rgba(233, 235, 231, 0.22);
  stroke-width: 2;
  stroke-linejoin: round;
  transform-origin: 12px 12px;
  animation: rotate 3.5s linear infinite paused;
  transition:
    fill 300ms var(--std),
    stroke 300ms var(--std);
}
.btn-seal:hover .seal .badge {
  animation-play-state: running;
  fill: oklch(0.88 0.19 125 / 0.8);
  stroke: oklch(0.88 0.19 125 / 0.8);
}
.seal .check {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
.chip {
  position: relative;
  isolation: isolate;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}
.chip > .fill {
  background: var(--panel-raised);
}

/* ---------- Página ---------- */

main {
  display: flex;
  justify-content: center;
  padding: 150px 32px 112px;
}
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1280px;
}

.hero {
  margin-bottom: 80px;
  text-align: center;
}
h1 {
  margin: 0;
  font-size: 96px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.035em;
}
h1 mark {
  position: relative;
  display: inline-block;
  background: none;
  color: inherit;
  font-weight: 700;
  isolation: isolate;
}
h1 mark::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: -0.45rem;
  height: 0.3em;
  z-index: -1;
  border-radius: 2px;
  background: var(--accent);
}
/* Ícone do Wardline em 3D (octaedro: de frente é o losango do logo), girando e pulando. */
.gem-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 210px;
  margin: -40px auto 24px;
  perspective: 900px;
}
.gem-hit {
  position: relative;
  width: 160px;
  height: 180px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  transform-style: preserve-3d;
}
.gem-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 24px;
}
.gem-hop {
  position: absolute;
  left: 50%;
  top: 92px;
  transform-style: preserve-3d;
  transform-origin: 50% 70px;
}
.gem {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
}
.gem .face {
  position: absolute;
  backface-visibility: hidden;
}
.gem-shadow {
  position: absolute;
  bottom: 6px;
  width: 112px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, oklch(0.88 0.19 125 / 0.28), transparent);
  filter: blur(2px);
}
.lede {
  max-width: 640px;
  margin: 28px auto 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-muted);
}
.cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-top: 44px;
}
.only-wide {
  display: inline;
}
.only-narrow {
  display: none;
}

/* ---------- Palco ---------- */

.stage-wrap {
  width: 100%;
  max-width: 1152px;
  padding: 0 32px;
  scroll-margin-top: 120px;
}
.stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
}
.stage-frame {
  position: absolute;
  inset: 0;
  border-radius: 40px;
  overflow: hidden;
  background: var(--panel);
}
.stage-frame > .fill {
  background: var(--panel);
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 40px;
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
}

.bgs,
.screens {
  position: absolute;
  inset: 0;
}
.bg {
  position: absolute;
  top: 0;
  left: -4%;
  width: 108%;
  height: calc(100% + 90px);
  object-fit: cover;
  filter: blur(28px) brightness(0.5) saturate(1.2);
  opacity: 0;
  transition: opacity 700ms var(--std);
  will-change: transform;
}
.bg.on {
  opacity: 1;
}
.screens {
  top: 100px;
  bottom: 88px;
  left: 28px;
  right: 28px;
}
.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  filter: blur(6px);
  transition:
    opacity 500ms var(--std),
    transform 500ms var(--std),
    filter 500ms var(--std);
  pointer-events: none;
}
.stage.unlocked .screen.on {
  pointer-events: auto;
  cursor: zoom-in;
  opacity: 1;
  transform: none;
  filter: none;
}
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}
.topbar > div {
  padding: 20px;
}
.topbar .left {
  display: flex;
  justify-content: flex-start;
}
.topbar .right {
  display: flex;
  justify-content: flex-end;
}

.pill {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  transform: translateY(-20px);
  transition:
    opacity 400ms var(--ease-out) 100ms,
    transform 400ms var(--ease-out) 100ms;
}
.pill > .fill {
  background: rgba(15, 16, 18, 0.45);
  backdrop-filter: blur(24px) saturate(115%);
  -webkit-backdrop-filter: blur(24px) saturate(115%);
}
.pill > .edge {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(233, 235, 231, 0.16);
  mask-image: linear-gradient(to bottom, black 0%, black 24%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 24%, transparent 70%);
  pointer-events: none;
}
.stage.unlocked .pill {
  opacity: 1;
  transform: none;
}
.pill-left {
  width: 62px;
  justify-content: center;
  border-top-left-radius: 20px;
}
.pill-right {
  border-top-right-radius: 20px;
}
.pill-left .a,
.pill-left .b {
  position: absolute;
  display: grid;
  place-items: center;
  transition:
    transform 200ms var(--std),
    opacity 200ms var(--std),
    filter 200ms var(--std);
}
.pill-left .a {
  transition-delay: 150ms;
}
.pill-left .b {
  transform: scale(0.75);
  opacity: 0;
  filter: blur(2px);
}
.pill-left:hover .a {
  transform: scale(0.75);
  opacity: 0;
  filter: blur(2px);
  transition-delay: 0ms;
}
.pill-left:hover .b {
  transform: none;
  opacity: 1;
  filter: none;
  transition-delay: 150ms;
}
.pill-left img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
.pill .phase-name {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
}
.pill .clock {
  color: var(--accent);
}

/* Ilha */
.island-cell {
  display: flex;
  justify-content: center;
}
.island-hit {
  position: relative;
  display: flex;
  justify-content: center;
}
.island {
  position: relative;
  isolation: isolate;
  width: 112px;
  height: 40px;
  border-radius: 12px;
  transform-origin: top center;
  color: var(--text);
  transition: box-shadow 300ms var(--std);
}
.island.hover {
  box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.5);
}
.island > .fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--island);
}
.island .ring-line {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(233, 235, 231, 0.09);
  pointer-events: none;
}
.slot {
  position: absolute;
  top: 0;
  height: 40px;
  display: flex;
  align-items: center;
}
.slot-left {
  left: 0;
  padding-left: 9px;
}
.slot-right {
  right: 0;
  padding-right: 10px;
}
.slot > * {
  transition:
    opacity 300ms var(--std),
    filter 300ms var(--std),
    transform 300ms var(--std);
}
.slot-left > * {
  transform-origin: left center;
}
.slot-right > * {
  transform-origin: right center;
}
.slot > .enter-from {
  opacity: 0;
  filter: blur(10px);
  transform: scaleX(0);
  transition: none;
}
.slot > .leave {
  position: absolute;
  opacity: 0;
  filter: blur(8px);
  transform: scaleX(0.25);
  transition-duration: 250ms;
}
.slot-left > .leave {
  left: 9px;
}
.slot-right > .leave {
  right: 10px;
}
.q-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.q-icon i {
  width: 10px;
  height: 10px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 1px;
  transition: transform 300ms var(--std);
}
.stage.unlocked .q-icon i {
  transform: rotate(0deg) scale(0.9);
}
.art {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  transition:
    transform 300ms var(--std),
    opacity 500ms var(--std);
  transform-origin: 20% 0%;
}
.art img {
  width: 100%;
  height: 100%;
  transform: scale(1.12);
}
.island.peek .art {
  transform: scale(1.2);
}
.ring {
  display: block;
  width: 20px;
  height: 20px;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.ring .track {
  stroke: oklch(0.88 0.19 125 / 0.25);
}
.ring .arc {
  stroke: var(--accent);
  stroke-dasharray: 38px;
  stroke-dashoffset: 38px;
  transition: stroke-dashoffset 1100ms var(--std) 250ms;
}
.ring.done .arc {
  stroke-dashoffset: 0;
}
.bars {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5px;
  height: 20px;
  cursor: pointer;
}
.bars i {
  width: 2px;
  height: 3px;
  max-height: 20px;
  border-radius: 1px;
  background: linear-gradient(to top, var(--accent), var(--magic));
  animation: playing 1s ease infinite;
  transition: max-height 500ms var(--std);
}
.bars i:nth-child(1) {
  animation-duration: 0.95s;
}
.bars i:nth-child(2) {
  animation-duration: 1.46s;
}
.bars i:nth-child(3) {
  animation-duration: 0.82s;
}
.bars i:nth-child(4) {
  animation-duration: 1.24s;
}
@keyframes playing {
  0%,
  100% {
    height: 3px;
  }
  50% {
    height: 12px;
  }
}
.bars.paused i {
  animation-play-state: paused;
  max-height: 2px;
}
.bars .glyph-eye {
  position: absolute;
  inset: -2px -4px;
  display: grid;
  place-items: center;
  color: var(--text);
  opacity: 0;
  transform: scale(0);
  filter: blur(8px);
  transition:
    opacity 400ms var(--std),
    transform 400ms var(--std),
    filter 400ms var(--std);
}
.bars:hover i {
  transform: scale(1.25);
  filter: blur(3.5px) brightness(1.25) saturate(1.5);
}
.bars:hover .glyph-eye {
  opacity: 1;
  transform: none;
  filter: none;
}
.peek-row {
  position: absolute;
  top: 40px;
  left: 14px;
  right: 14px;
  height: 32px;
  overflow: hidden;
  padding-bottom: 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: rgba(207, 212, 204, 0.85);
  opacity: 0;
  filter: blur(10px);
  transform: scaleX(0.75);
  transform-origin: top center;
  mask-image: linear-gradient(270deg, transparent 4%, #000 11% 89%, transparent 96%);
  -webkit-mask-image: linear-gradient(270deg, transparent 4%, #000 11% 89%, transparent 96%);
  pointer-events: none;
}
.marquee {
  position: relative;
  display: flex;
  height: 21px;
  align-items: center;
}
.marquee span {
  flex: none;
  padding-right: 32px;
  animation: marquee-first var(--marquee-duration, 10s) linear infinite;
}
.marquee span + span {
  position: absolute;
  top: 0;
  left: 0;
  height: 21px;
  line-height: 21px;
  animation-name: marquee-second;
}
@keyframes marquee-first {
  0% {
    transform: translate(0%);
  }
  100% {
    transform: translate(-100%);
  }
}
@keyframes marquee-second {
  0% {
    transform: translate(100%);
  }
  100% {
    transform: translate(0%);
  }
}

/* Tela de "partida encontrada" */
.lock {
  position: absolute;
  inset: 88px 0 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: opacity 400ms var(--std);
}
.stage.unlocked .lock {
  opacity: 0;
  pointer-events: none;
}
.lock-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: oklch(0.9 0.12 125 / 0.92);
}
.lock-date {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lock-time {
  font-size: 96px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.lock-widgets {
  display: flex;
  gap: 28px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
}
.lock-widgets span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shimmer {
  background:
    radial-gradient(circle, oklch(0.97 0.1 125), #0000) -200% 100% / 200% 100% no-repeat,
    oklch(0.88 0.19 125 / 0.55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: saturate(140%);
  font-size: 18px;
  font-weight: 600;
  animation: shine 2s linear infinite;
  cursor: pointer;
}
@keyframes shine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Odômetro: cada dígito é um span; o que sai fica absoluto no lugar. */
.roll {
  position: relative;
  display: inline-flex;
}
.roll > span {
  position: relative;
  display: inline-block;
}
.roll > span.out {
  position: absolute;
  top: 0;
}

/* Faixa de fases (o "dock") */
.phases {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 15;
  display: flex;
  gap: 6px;
  padding: 8px;
  border-radius: 24px;
  transform: translate(-50%, 318px);
  transition: transform 400ms var(--ease-out);
}
.stage.unlocked .phases {
  transform: translate(-50%, 0);
}
.phases > .fill {
  background: rgba(15, 16, 18, 0.5);
  backdrop-filter: blur(24px) saturate(115%);
  -webkit-backdrop-filter: blur(24px) saturate(115%);
}
.phases > .edge {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(233, 235, 231, 0.16);
  mask-image: linear-gradient(to bottom, black 0%, black 24%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 24%, transparent 70%);
  pointer-events: none;
}
.phase {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 300ms var(--std);
}
.phase:hover {
  color: var(--text);
}
.phase.on {
  color: var(--accent);
}
.phase:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 12px;
}
.phase-slider {
  position: absolute;
  top: 8px;
  left: 0;
  height: calc(100% - 16px);
  border-radius: 16px;
  transition:
    transform 400ms var(--ease-spring),
    width 400ms var(--ease-spring);
}
.phase-slider > .fill {
  background: rgba(233, 235, 231, 0.1);
}

.psst {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  user-select: none;
}
.psst svg {
  width: 14px;
  height: 14px;
}

/* ---------- Recursos ---------- */

.features {
  margin-top: 48px;
  width: 100%;
  max-width: 1024px;
  scroll-margin-top: 140px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 56px 12px;
}
.cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cell svg.icon {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  overflow: visible;
  color: var(--text);
}
.cell svg.icon * {
  transition: transform 300ms var(--std);
  transform-box: view-box;
}
.cell h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cell p {
  margin: 10px 0 0;
  max-width: 220px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* 0: estatística e IA se fundem (metaballs) */
.f-goo circle {
  transition: cx 700ms var(--std) !important;
}
.cell:hover .f-goo .big {
  cx: 50;
}
.cell:hover .f-goo .small {
  cx: 22;
}
/* 1: mira */
.f-target .cross {
  transform-origin: 36px 36px;
}
.f-target .dot {
  transform-origin: 36px 36px;
  transition-duration: 350ms !important;
  transition-delay: 25ms;
}
.cell:hover .f-target .cross {
  transform: rotate(90deg);
}
.cell:hover .f-target .dot {
  transform: scale(1.6);
}
/* 2: balão com o visto que se redesenha */
.f-coach .bubble {
  transform-origin: 14px 60px;
}
.f-coach .tick {
  stroke-dasharray: 30;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 400ms var(--std) 75ms !important;
}
.cell:hover .f-coach .bubble {
  transform: rotate(-8deg);
}
.cell:hover .f-coach .tick {
  stroke-dashoffset: 60;
}
/* 3: barras de vitória */
.f-bars rect {
  transform-box: fill-box !important;
  transform-origin: bottom;
}
.f-bars .b2 {
  transition-delay: 50ms !important;
}
.f-bars .b3 {
  transition-delay: 100ms !important;
}
.cell:hover .f-bars .b1 {
  transform: scaleY(1.45);
}
.cell:hover .f-bars .b2 {
  transform: scaleY(0.7);
}
.cell:hover .f-bars .b3 {
  transform: scaleY(1.25);
}
/* 4: relógio dos objetivos */
.f-clock .min {
  transform-origin: 36px 38px;
  transition-duration: 350ms !important;
}
.f-clock .hour {
  transform-origin: 36px 38px;
}
.cell:hover .f-clock .min {
  transform: rotate(180deg);
}
.cell:hover .f-clock .hour {
  transform: rotate(45deg);
}
/* 5: camadas do overlay */
.cell:hover .f-layers .front {
  transform: translate(-3.75px, -3.75px);
}
.cell:hover .f-layers .back {
  transform: translate(3.75px, 3.75px);
}
/* 6: celular */
.f-phone .body {
  transform-origin: 36px 66px;
}
.f-phone .badge {
  transform-origin: 50px 14px;
  transition-delay: 50ms !important;
}
.cell:hover .f-phone .body {
  transform: rotate(-10deg);
}
.cell:hover .f-phone .badge {
  transform: translate(-6px, 1px) scale(1.35);
}
/* 7: raio fantasma */
.f-bolt .ghost {
  opacity: 0;
  transform: scale(0.25);
  transform-origin: 36px 36px;
  filter: blur(8px);
  transition:
    transform 300ms var(--std),
    opacity 300ms var(--std),
    filter 300ms var(--std) !important;
}
.f-bolt .main {
  transition-delay: 100ms !important;
}
.cell:hover .f-bolt .ghost {
  opacity: 1;
  transform: translate(-4px, -8px) scale(0.5);
  filter: none;
}
.cell:hover .f-bolt .main {
  transform: translateX(4px);
}

.circled {
  position: relative;
  display: inline-block;
}
.circled svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 176px;
  height: 55px;
  transform: translate(-50%, -46%);
  overflow: visible;
  pointer-events: none;
}
.circled path {
  fill: none;
  stroke: var(--magic);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
}
.circled path.draw {
  animation: draw 0.8s ease-in forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 96px;
}
.caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
}
.caption .diamond {
  width: 9px;
  height: 9px;
  color: var(--accent);
}

/* ---------- Rodapé ---------- */

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.socials {
  display: flex;
  gap: 12px;
}
.social {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: rgba(233, 235, 231, 0.5);
  transition: color 300ms var(--std);
}
.social > .fill {
  background: var(--tint);
}
.social svg {
  width: 20px;
  height: 20px;
  transition: transform 300ms var(--ease-out);
}
.social:hover {
  color: rgba(233, 235, 231, 0.8);
}
.social:hover svg {
  transform: scale(1.05);
}
.legal {
  max-width: 720px;
  margin: 28px 32px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
}
.giant {
  height: 224px;
  margin-top: 8px;
  overflow: hidden;
  font-size: 20rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
  background: linear-gradient(to bottom, rgba(233, 235, 231, 0.09) 25%, transparent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

/* ---------- Telas menores ---------- */

@media (max-width: 1535px) {
  .giant {
    font-size: 18rem;
    height: 192px;
  }
}
@media (max-width: 1279px) {
  .lock-time {
    font-size: 80px;
  }
}
@media (max-width: 1023px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lock-widgets,
  .nav-link.hide-md {
    display: none;
  }
  .giant {
    font-size: 14rem;
    height: 144px;
  }
}
@media (max-width: 767px) {
  .lock-head {
    display: none;
  }
  .lock {
    justify-content: flex-end;
  }
  h1 {
    font-size: 64px;
  }
  .only-wide {
    display: none;
  }
  .only-narrow {
    display: inline;
  }
}
@media (max-width: 639px) {
  main {
    padding: 128px 32px 64px;
  }
  .header-inner {
    padding: 20px 20px;
  }
  .header.scrolled {
    background: var(--bg);
    backdrop-filter: none;
  }
  .nav-link {
    display: none;
  }
  .nav .btn {
    display: none;
  }
  .hero {
    margin-bottom: 56px;
  }
  .gem-stage {
    transform: scale(0.75);
    margin: -56px auto -8px;
  }
  h1 {
    font-size: 48px;
    line-height: 1.05;
  }
  h1 mark::after {
    bottom: -0.3rem;
  }
  .lede {
    font-size: 17px;
  }
  .cta-row {
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
  }
  .stage-wrap {
    padding: 0;
  }
  .stage {
    aspect-ratio: auto;
    height: 192px;
    transition: height 500ms var(--std);
  }
  .stage.unlocked {
    height: 400px;
  }
  .screens {
    top: 88px;
    bottom: 72px;
    left: 12px;
    right: 12px;
  }
  .phases {
    bottom: 14px;
    padding: 6px;
  }
  .phase {
    padding: 8px 10px;
    font-size: 13px;
  }
  .topbar {
    display: flex;
    justify-content: center;
  }
  .topbar .left,
  .topbar .right {
    display: none;
  }
  .lock {
    inset: 0 0 28px;
  }
  .shimmer {
    font-size: 24px;
    font-weight: 700;
  }
  .psst {
    display: none;
  }
  .features {
    margin-top: 64px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .giant {
    display: none;
  }
  footer {
    padding-bottom: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rise,
  .rise.tilt,
  .version.rise {
    transform: none;
  }
  .rise.in {
    transition: opacity 200ms linear;
  }
  .brand,
  .nav,
  .shimmer,
  .bars i,
  .marquee span,
  .seal .badge {
    animation: none;
  }
  .circled path {
    stroke-dashoffset: 0;
  }
  .circled path.draw {
    animation: none;
  }
}

/* Tela ampliada: clicar numa tela do palco abre ela inteira, sem corte. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(10, 11, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--std);
  cursor: zoom-out;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: min(1600px, 100%);
  max-height: calc(100vh - 64px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96) translateY(12px);
  transition: transform 400ms var(--ease-spring);
}
.lightbox.open img {
  transform: none;
}
.lightbox p {
  margin: 0;
  position: absolute;
  bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
