/* ============================================================
   Landing Homeblox — "Loud and flat".
   Cada seção é um bloco de cor chapada, borda a borda, como as
   peças do nome. A barra fixa assume a cor do bloco embaixo dela.
   ============================================================ */

html:has(body.landing), body.landing { overflow-x: clip; }

.field-yellow { background: var(--field-yellow); color: var(--ink); }
.field-sky { background: var(--field-sky); color: var(--ink); }
.field-green { background: var(--field-green); color: var(--ink); }
.field-purple { background: var(--field-purple); color: #fff; }
.field-night { background: var(--field-night); color: #fff; }

/* contorno de foco legível em campo escuro (o padrão, cor de tinta, some no
   fundo noite/roxo); a barra fixa segue a tinta do capítulo embaixo dela */
.field-night :focus-visible,
.field-purple :focus-visible,
.footer-rich :focus-visible,
.cta-final :focus-visible,
.map-card :focus-visible { outline-color: var(--accent); }
.landing-header :focus-visible { outline-color: var(--header-ink, var(--ink)); }

/* ---------------- barra fixa (cor por capítulo) ---------------- */
.landing-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--header-bg, var(--field-yellow));
  color: var(--header-ink, var(--ink));
  transition: background-color 300ms ease, color 300ms ease;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 64px;
  padding: 0 var(--margin);
}

.navbar .wordmark { margin-right: auto; }

.nav-links { display: flex; gap: 28px; }

.nav-links a,
.nav-link {
  font-size: var(--step-small);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color var(--t-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover,
  .nav-link:hover { text-decoration-color: currentColor; }
}

.nav-actions,
.nav-account {
  display: flex;
  align-items: center;
  gap: 20px;
}

[data-guest][hidden],
[data-authed][hidden] { display: none; }

/* o botão da barra inverte com o capítulo: fundo = tinta da barra */
.nav-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  cursor: pointer;
  background: var(--header-ink, var(--ink));
  color: var(--header-bg, var(--field-yellow));
  font-size: var(--step-small);
  font-weight: 700;
  transition: background-color 300ms ease, color 300ms ease, transform var(--t-press) var(--ease-out);
}

.nav-btn:active { transform: scale(0.96); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .navbar { gap: 16px; }
  .nav-actions, .nav-account { gap: 14px; }
}

/* ---------------- HERO: céu em camadas ---------------- */
.field-sky-deep { background: #8ecbff; color: var(--ink); }

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: max(64px, 13svh);
}

.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.parallax-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* sol "bloco": miolo de peça de montar com carinha, raios de blocos
   girando devagar em volta (o miolo não gira, só balança) */
.sun {
  position: absolute;
  top: 13%;
  right: 7%;
  width: clamp(112px, 11vw, 176px);
  aspect-ratio: 1;
}

.sun-rays {
  position: absolute;
  inset: 0;
  animation: sun-spin 48s linear infinite;
}

.sun-rays i { position: absolute; inset: 0; }
.sun-rays i:nth-child(2) { rotate: 45deg; }
.sun-rays i:nth-child(3) { rotate: 90deg; }
.sun-rays i:nth-child(4) { rotate: 135deg; }

/* cada <i> desenha dois raios opostos; os diagonais são menores */
.sun-rays i::before,
.sun-rays i::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 14%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 30%;
  background: #f2a900;
}

.sun-rays i::before { top: 0; }
.sun-rays i::after { bottom: 0; }
.sun-rays i:nth-child(even)::before,
.sun-rays i:nth-child(even)::after { width: 10%; }
.sun-rays i:nth-child(even)::before { top: 5%; }
.sun-rays i:nth-child(even)::after { bottom: 5%; }

.sun-core {
  position: absolute;
  inset: 22%;
  border-radius: 30%;
  border-bottom: clamp(5px, 0.5vw, 8px) solid #f2a900; /* aresta de baixo da peça */
  background: var(--accent);
  animation: sun-bob 4s ease-in-out infinite;
}

/* brilho chapado no canto, como o reflexo de uma peça de plástico */
.sun-core::before {
  content: '';
  position: absolute;
  top: 11%;
  left: 13%;
  width: 24%;
  height: 11%;
  border-radius: 999px;
  background: #ffe28f;
}

.sun-eye {
  position: absolute;
  top: 38%;
  left: 30%;
  width: 10%;
  height: 17%;
  border-radius: 999px;
  background: var(--ink);
  transform-origin: center;
  animation: sun-blink 5s infinite;
}

.sun-eye + .sun-eye { left: auto; right: 30%; }

.sun-cheek {
  position: absolute;
  top: 58%;
  left: 14%;
  width: 15%;
  height: 9%;
  border-radius: 999px;
  background: #ff9f7a;
}

.sun-cheek + .sun-cheek { left: auto; right: 14%; }

.sun-smile {
  position: absolute;
  top: 56%;
  left: 50%;
  width: 26%;
  height: 13%;
  translate: -50% 0;
  border: clamp(3px, 0.32vw, 5px) solid var(--ink);
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

@keyframes sun-spin { to { transform: rotate(360deg); } }

@keyframes sun-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-5%) rotate(4deg); }
}

@keyframes sun-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

/* nuvens: três bolhas brancas que atravessam o céu */
.cloud {
  position: absolute;
  left: 0;
  width: 150px;
  height: 46px;
  border-radius: 999px;
  background: #fff;
  animation: cloud-drift var(--dur, 70s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: #fff;
}

.cloud::before { width: 64px; height: 64px; left: 24px; top: -32px; }
.cloud::after { width: 48px; height: 48px; left: 74px; top: -22px; }

.layer-far .cloud { opacity: 0.7; scale: 0.7; }
.cloud.c1 { top: 12%; --dur: 90s; --delay: -10s; }
.cloud.c2 { top: 30%; --dur: 110s; --delay: -60s; }
.cloud.c3 { top: 6%; --dur: 100s; --delay: -85s; }
.cloud.c4 { top: 22%; --dur: 60s; --delay: -20s; }
.cloud.c5 { top: 44%; --dur: 75s; --delay: -50s; }

@keyframes cloud-drift {
  from { transform: translateX(-200px); }
  to { transform: translateX(calc(100vw + 40px)); }
}

.layer-hills {
  top: auto;
  bottom: 40px;
  height: 30%;
}

.hills { width: 100%; height: 100%; display: block; }

/* árvores de blocos sobre as colinas */
.tree {
  position: absolute;
  bottom: 52%;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #3f9a3a;
}

.tree::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 34px;
  width: 8px;
  height: 18px;
  background: #8a5a33;
}

.tree.t1 { left: 44%; bottom: 38%; }
.tree.t2 { left: 49%; bottom: 46%; width: 26px; height: 26px; }
.tree.t2::after { left: 9px; top: 26px; }
.tree.t3 { right: 4%; bottom: 44%; }

/* chão de pinos, como uma placa de montar */
.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background-color: #5fae4f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='16' r='8' fill='%2374c463'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  border-top: 6px solid #4e9a3f;
}

.hero-title,
.hero-foot { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .sun-rays, .sun-core, .sun-eye, .cloud { animation: none; }
}

@media (max-width: 860px) {
  .sun { top: 9%; right: 4%; width: 92px; }
  .layer-hills { height: 18%; }
  .tree { display: none; }
  .cloud { width: 110px; height: 34px; }
  .cloud::before { width: 46px; height: 46px; left: 18px; top: -24px; }
  .cloud::after { width: 34px; height: 34px; left: 56px; top: -16px; }
}

/* frase do site original em três linhas; menor que o display gigante de
   antes, e cada linha pode quebrar em tela estreita */
.hero-title {
  padding: 0 var(--margin);
  font-size: clamp(3rem, 6.2vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.hero-title .ink-pale { color: var(--field-purple); }

/* folga em cima e embaixo pro acento do Í e a cedilha do Ç não serem
   cortados pelo overflow da animação de entrada */
.lines .line { display: block; overflow: hidden; padding-block: 0.1em; margin-block: -0.1em; }
.lines [data-line] { display: block; }

.hero-foot {
  flex: 1;
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: end;
  gap: var(--gutter);
  padding: 0 var(--margin);
}

.hero-copy {
  align-self: end;
  padding-bottom: clamp(64px, 9svh, 96px);
}

.hero-lead {
  max-width: 30ch;
  font-size: var(--step-lead);
  line-height: 1.3;
  margin-bottom: 24px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.hero-ctas .btn { min-height: 60px; padding: 0 32px; }

.hero-link {
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.hero-stage {
  position: relative;
  align-self: stretch;
  min-height: 380px;
}

#robot-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* painel do app, plano, sem sombra: fragmento real da interface */
.hud {
  position: absolute;
  left: 0;
  bottom: clamp(56px, 8svh, 88px);
  display: grid;
  gap: 4px;
  pointer-events: none;
}

.hud-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  font-size: var(--step-small);
  font-variant-numeric: tabular-nums;
}

.hud-item b { color: var(--field-purple); }

.hud-bar {
  width: 56px;
  height: 8px;
  background: var(--surface);
}

.hud-bar span { display: block; height: 100%; background: var(--field-green); }

.canvas-hint {
  position: absolute;
  right: 0;
  bottom: clamp(56px, 8svh, 88px);
  font-size: var(--step-small);
  font-weight: 700;
  pointer-events: none;
}

@media (max-width: 860px) {
  .hero { padding-top: 96px; }
  .hero-title { font-size: min(11vw, 4.5rem); }
  .hero-foot { grid-template-columns: 1fr; align-items: start; gap: 0; }
  .hero-copy { padding: 32px 0 0; }
  .hero-stage { min-height: 360px; }
  .hud { bottom: 20px; }
  .canvas-hint { bottom: 20px; }
}

/* ---------------- NÚMEROS ---------------- */
.stats {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 90svh;
  padding: 120px var(--margin) clamp(40px, 6vw, 80px);
}

.stats-claim {
  font-size: var(--step-sub);
  line-height: 1;
}

.stats-body {
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: end;
  gap: var(--gutter);
  margin-top: 22vh;
}

.stats-figure {
  display: flex;
  align-items: flex-start;
  font-size: var(--step-giant);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.06em;
  font-variant-numeric: lining-nums;
}

.stats-figure sup {
  margin-left: 0.06em;
  font-size: 0.3em;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--accent);
}

.stats-caption {
  max-width: 32ch;
  margin-top: 24px;
  font-size: var(--step-body);
}

.stats-list { display: grid; gap: 28px; margin: 0; }

.stats-list dt {
  font-size: var(--step-figure);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.stats-list dd { margin: 6px 0 0; font-size: var(--step-body); }

@media (max-width: 860px) {
  .stats { min-height: 80svh; padding-top: 96px; }
  .stats-body { grid-template-columns: 1fr; margin-top: 12vh; gap: 56px; }
  .stats-figure { font-size: 46vw; }
}

/* ---------------- MAPA ---------------- */
.map-section { padding: 120px 0 0; }

.map-head {
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: end;
  gap: var(--gutter);
  padding: 0 var(--margin);
}

.map-head h2 { font-size: var(--step-head); }
.map-head p { max-width: 36ch; font-size: var(--step-body); }

.map3d-wrap {
  position: relative;
  overflow: clip;
  height: clamp(420px, 62vw, 680px);
  margin-top: 24px;
}

#map-canvas {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

#map-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map3d-label {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  font-family: var(--font);
  font-size: var(--step-small);
  font-weight: 700;
  white-space: nowrap;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.map3d-label:hover,
.map3d-label.active { background: var(--accent); color: var(--ink); }

.map-card {
  position: absolute;
  left: var(--margin);
  bottom: var(--margin);
  z-index: 5;
  width: min(420px, calc(100% - 2 * var(--margin)));
  padding: 24px;
  background: var(--field-purple);
  color: #fff;
}

.map-card h3 {
  margin: 0 0 10px;
  padding-right: 64px;
  font-size: var(--step-row);
}

.map-card p { font-size: var(--step-body); }

.map-card-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--step-small);
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (prefers-reduced-motion: no-preference) {
  .map-card:not([hidden]) { animation: card-in var(--t-ui) var(--ease-out); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
}

@media (max-width: 860px) {
  .map-section { padding-top: 96px; }
  .map-head { grid-template-columns: 1fr; gap: 16px; }
  .map3d-wrap { height: 440px; }
  .map3d-label { min-height: 34px; padding: 0 10px; }
  .map-card { position: relative; left: auto; bottom: auto; width: auto; margin: 0 var(--margin) var(--margin); }
}

/* ---------------- UM DIA DE MISSÕES: cards do app ---------------- */
.board-section { padding: 120px var(--margin) clamp(64px, 8vw, 120px); }

.board-head {
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: end;
  gap: var(--gutter);
  margin-bottom: 40px;
}

.board-head h2 { font-size: var(--step-head); }
.board-head p { max-width: 38ch; font-size: var(--step-body); }

.mission-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* o card é o mesmo do app: ícone redondo, nome, XP e moedas, status */
.mission-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 3px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 150ms ease, border-color var(--t-hover) ease, background-color var(--t-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
  .mission-card:hover { transform: translateY(-3px) rotate(-0.5deg); }
}

.mission-card:active { transform: scale(0.98); }
.mission-card.done { border-color: var(--field-green); background: #f4fbf5; }

.mission-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 26px;
}

.mi-blue { background: #e3f0ff; }
.mi-purple { background: #ede4fb; }
.mi-green { background: #e1f7e6; }
.mi-orange { background: #ffebd6; }

.mission-info { flex: 1; min-width: 0; }
.mission-info strong { display: block; margin-bottom: 6px; font-size: var(--step-body); line-height: 1.2; }

.mission-rewards { display: flex; flex-wrap: wrap; gap: 6px; }

.rw {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--step-small);
  font-weight: 700;
  white-space: nowrap;
}

.rw-xp { background: #fff1cc; color: #8a6400; }
.rw-coin { background: #e1f7e6; color: #1f7a37; }

.mission-status {
  flex-shrink: 0;
  font-size: var(--step-small);
  font-weight: 700;
  color: #1f7a37;
  white-space: nowrap;
}

.mission-status.todo { color: #c9bceb; font-size: 1.5rem; line-height: 1; }

@media (prefers-reduced-motion: no-preference) {
  .mission-card.just-done .mission-status { animation: stamp 420ms var(--ease-out); }
}

@keyframes stamp {
  0% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* recompensa diária: cada missão feita empilha um bloco */
.daily-reward {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--ink);
}

.dr-gift, .dr-chest { flex-shrink: 0; font-size: 40px; line-height: 1; }
.dr-chest { margin-left: auto; }
.dr-text { display: grid; gap: 8px; }

.sum-blocks {
  display: grid;
  grid-template-columns: repeat(9, 24px);
  gap: 4px;
}

.sum-blocks span {
  height: 24px;
  border-radius: 6px;
  background: rgba(43, 33, 64, 0.15);
  transition: background-color var(--t-ui) ease;
}

.sum-blocks span.on { background: var(--field-green); }

.sum-today {
  font-size: var(--step-lead);
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.sum-today b, .sum-week b { color: #4e2f94; }
.sum-week { font-size: var(--step-body); }

@media (max-width: 1100px) {
  .mission-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .board-section { padding-top: 96px; }
  .board-head { grid-template-columns: 1fr; gap: 12px; }
  .mission-board { grid-template-columns: 1fr; }
  .daily-reward { padding: 18px; gap: 14px; }
  .dr-chest { display: none; }
  .sum-blocks { grid-template-columns: repeat(9, 1fr); }
}

/* ---------------- FAIXA: blocos de montar ---------------- */
.bricks {
  position: relative;
  margin: 0;
  height: 78svh;
  min-height: 420px;
  overflow: hidden;
}

.bricks img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bricks-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: end;
  gap: var(--gutter);
  width: min(100%, 1100px);
  padding: 28px var(--margin);
}

.bricks-line {
  font-size: var(--step-sub);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.bricks-note { font-size: var(--step-body); }

@media (prefers-reduced-motion: no-preference) {
  .js .bricks img { transform: scale(1.12); transition: transform 1800ms var(--ease-out); }
  .js .bricks.is-in img { transform: scale(1); }
}

@media (max-width: 860px) {
  .bricks { height: 64svh; }
  .bricks-bar { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
}

/* ---------------- COMO FUNCIONA: quatro cards ---------------- */
.how { padding: 120px var(--margin) clamp(64px, 8vw, 112px); }

.how-head {
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: end;
  gap: var(--gutter);
  margin-bottom: 40px;
}

.how-head h2 { font-size: var(--step-head); }
.how-head p { max-width: 38ch; font-size: var(--step-body); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.how-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 380px;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  transition: transform 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .how-card:hover { transform: translateY(-6px) rotate(-0.5deg); }
}

.how-clause {
  font-size: var(--step-row);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-transform: none;
}

.mcard {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 18px;
  background: #fff;
  color: var(--ink);
}

.mc-name { font-size: var(--step-body); font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; }
.mc-meta { font-size: var(--step-small); color: var(--muted); }
.mc-reward { justify-self: start; padding: 4px 8px; background: var(--accent); font-size: var(--step-small); font-weight: 700; }
.mc-state { justify-self: start; padding: 4px 8px; background: var(--field-green); color: var(--ink); font-size: var(--step-small); font-weight: 700; }
.mc-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mc-total { font-size: var(--step-sub); font-weight: 900; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .how { padding-top: 96px; }
  .how-head { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 560px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-card { min-height: 0; }
}

/* ---------------- PLANOS: baú + dois campos ---------------- */
.chest-band {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  gap: var(--gutter);
  padding: 104px var(--margin) 0;
}

.chest-copy h2 { font-size: var(--step-head); margin-bottom: 20px; }
.chest-copy p { max-width: 34ch; font-size: var(--step-lead); line-height: 1.3; }

.chest-canvas-wrap { height: clamp(320px, 38vw, 480px); }

#chest-canvas {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* o baú esconde os planos até ser aberto (scene-chest.js põe .locked ao
   iniciar e .open ao abrir); sem WebGL a classe nunca entra e os planos
   aparecem direto */
.plans-reveal.locked:not(.open) { display: none; }

.plans-reveal {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.plan-field {
  display: flex;
  flex-direction: column;
  min-height: 90svh;
  padding: 40px;
  cursor: pointer;
  transition: none;
}

.plan-field.field-sky { background: var(--field-sky); }
.plan-field.field-yellow { background: var(--field-yellow); }
.plan-field:active { transform: none; }

.plan-field { position: relative; }

.plan-name {
  font-size: var(--step-head);
  line-height: 0.9;
}

/* foto recortada e levemente girada, colada no alto do campo, sem cobrir texto */
.plan-photo {
  align-self: flex-end;
  width: clamp(140px, 16vw, 260px);
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 24px;
  transform: rotate(4deg);
  transition: transform var(--t-ui) var(--ease-out);
}

.plan-field.field-sky .plan-photo { transform: rotate(-5deg); width: clamp(120px, 12vw, 200px); }

@media (hover: hover) and (pointer: fine) {
  .plan-field:hover .plan-photo { transform: rotate(0deg) scale(1.03); }
}

.plan-for {
  max-width: 26ch;
  margin-top: 16px;
  font-size: var(--step-lead);
  line-height: 1.3;
}

.plan-includes {
  max-width: 40ch;
  margin-top: 16px;
  font-size: var(--step-body);
}

.plan-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: auto;
  padding-top: 40px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: var(--step-figure);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.plan-price span {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plans-reveal.open .plan-price { animation: price-pop 700ms var(--ease-out) both; }
.plans-reveal.open .plan-field + .plan-field .plan-price { animation-delay: 90ms; }

@keyframes price-pop {
  from { opacity: 0; transform: translateY(28px); }
}

/* o campo de um plano em tela larga cabe o preço de 9 caracteres a 10vw só
   quando é o campo maior; o menor encolhe para não estourar */

@media (max-width: 860px) {
  .chest-band { grid-template-columns: 1fr; padding-top: 96px; }
  .chest-canvas-wrap { height: 320px; }
  .plans-reveal { grid-template-columns: minmax(0, 1fr); }
  .plan-field { min-height: 70svh; padding: 28px 20px 20px; }
  .plan-field.field-yellow { order: -1; }
  .plan-name { font-size: 12vw; }
  .plan-price { flex-wrap: wrap; font-size: min(15vw, 5.5rem); white-space: normal; }
  .plan-bottom .btn { width: 100%; }
}

/* ---------------- CTA FINAL (como no site original) ---------------- */
.cta-section { padding: 24px var(--margin) clamp(64px, 8vw, 112px); }

.cta-final {
  position: relative;
  overflow: hidden;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) 24px;
  border-radius: var(--radius-lg);
  background: var(--field-purple);
  color: #fff;
  text-align: center;
}

.cta-final h2 {
  position: relative;
  margin: 0 auto 14px;
  max-width: 18ch;
  font-size: clamp(1.75rem, 1rem + 3.2vw, 4rem);
}

@media (max-width: 560px) {
  .cta-final h2 { max-width: none; }
}

.cta-final p {
  position: relative;
  max-width: 44ch;
  margin: 0 auto 28px;
  font-size: var(--step-body);
}

.cta-mascot {
  position: relative;
  margin-bottom: 12px;
  font-size: 56px;
  line-height: 1;
}

.btn-cta {
  position: relative;
  min-height: 60px;
  padding: 0 34px;
  background: var(--accent);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .btn-cta:hover { background: #fff; color: var(--ink); }
}

.cta-final .cta-small {
  margin: 16px auto 0;
  font-size: var(--step-small);
}

/* blocos coloridos flutuando no fundo do card */
.cta-block {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  opacity: 0.45;
}

.cb1 { top: 18%; left: 7%; background: var(--accent); rotate: 12deg; }
.cb2 { bottom: 16%; left: 14%; width: 22px; height: 22px; background: #9b7be0; }
.cb3 { top: 24%; right: 9%; width: 26px; height: 26px; background: var(--field-green); }
.cb4 { bottom: 12%; right: 16%; background: var(--accent); rotate: -10deg; }

@media (prefers-reduced-motion: no-preference) {
  .cta-mascot { animation: floaty 3s ease-in-out infinite; }
  .cta-block { animation: floaty 4s ease-in-out infinite; }
  .cb2 { animation-delay: 1s; }
  .cb3 { animation-delay: 0.5s; }
  .cb4 { animation-delay: 1.6s; }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------------- RODAPÉ (como no site original) ---------------- */
.footer-rich {
  background: var(--field-night);
  color: #c9bceb;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px var(--margin) 40px;
}

.footer-brand .wordmark { color: #fff; font-size: 1.5rem; }
.footer-brand p { max-width: 30ch; margin-top: 12px; font-size: var(--step-body); }

.footer-mail {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col strong { margin-bottom: 4px; color: #fff; }

.footer-col a {
  width: max-content;
  color: #c9bceb;
  font-size: var(--step-small);
  text-decoration: none;
  transition: color var(--t-hover) ease;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px var(--margin) 28px;
  font-size: var(--step-small);
}

.footer-bottom p { max-width: 60ch; }
.footer-bottom p + p { margin-top: 8px; }
.footer-credits { color: #9d92b8; }
.footer-credits a { color: inherit; }

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------------- MODAL do cadastro ---------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(43, 33, 64, 0.72);
  overscroll-behavior: contain;
}

/* o título da etapa recebe foco por script (ver goToStep): sem contorno */
.modal-card h2[tabindex="-1"]:focus { outline: none; }

.modal-overlay[hidden] { display: none; }

.modal-card {
  position: relative;
  width: min(580px, 100%);
  max-height: min(90svh, 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 72px 36px 36px;
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .modal-overlay:not([hidden]) .modal-card { animation: modal-in 320ms var(--ease-out); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px); }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--step-small);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.modal-success { padding: 8px 0; }
.pix-qrcode { max-width: 220px; margin: 0 0 12px; }

@media (max-width: 560px) {
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal-card { max-height: none; padding: 64px 20px 28px; }
}

/* ---------------- movimento ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] {
    transform: translateY(105%);
    animation: line-up 900ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 110ms + 150ms);
  }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* as linhas do quadro entram uma a uma */
  .js .mission-board .mission-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out), border-color var(--t-hover) ease, background-color var(--t-hover) ease;
    transition-delay: calc(var(--i, 0) * 60ms);
  }

  .js .mission-board.is-in .mission-card { opacity: 1; transform: none; }
  .js .mission-board.is-in .mission-card:hover { transition-delay: 0ms; }

  /* os quatro cards sobem em sequência, da esquerda pra direita */
  .js .how .how-card { opacity: 0; transform: translateY(28px); }
  .js .how.is-in .how-card {
    opacity: 1;
    transform: none;
    transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out);
  }
  .js .how.is-in .how-card:nth-child(2) { transition-delay: 90ms; }
  .js .how.is-in .how-card:nth-child(3) { transition-delay: 180ms; }
  .js .how.is-in .how-card:nth-child(4) { transition-delay: 270ms; }

  .js .plans-reveal .plan-field > * { opacity: 0; transform: translateY(24px); }
  .js .plans-reveal.is-in .plan-field > * {
    opacity: 1;
    transform: none;
    transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out);
  }
  .js .plans-reveal.is-in .plan-field > :nth-child(2) { transition-delay: 70ms; }
  .js .plans-reveal.is-in .plan-field > :nth-child(3) { transition-delay: 140ms; }
  .js .plans-reveal.is-in .plan-field > :nth-child(4) { transition-delay: 210ms; }


  .hud-item { animation: hud-in 700ms var(--ease-out) both; animation-delay: calc(600ms + var(--n, 0) * 90ms); }
  .hud-item:nth-child(2) { --n: 1; }
  .hud-item:nth-child(3) { --n: 2; }
  .hud-item:nth-child(4) { --n: 3; }
}

@keyframes line-up { to { transform: none; } }
@keyframes hud-in { from { opacity: 0; transform: translateX(-16px); } }

/* ---------------- cantos arredondados ---------------- */
.nav-btn,
.hud-item,
.hud-bar,
.hud-bar span,
.map3d-label,
.mc-reward,
.mc-state { border-radius: var(--pill); }

.map-card,
.modal-card { border-radius: var(--radius-lg); }

.mcard,
.plan-photo { border-radius: var(--radius); }

.mc-photo { border-radius: var(--radius-sm); }

/* planos: os dois campos viram cartões grandes dentro da seção */
.plans-reveal {
  gap: 16px;
  padding: 0 var(--margin) clamp(48px, 6vw, 96px);
  scroll-margin-top: 80px;
}

.plan-field { min-height: 80svh; border-radius: var(--radius-lg); }

@media (max-width: 860px) {
  .plan-field { min-height: 64svh; }
}

@media (max-width: 560px) {
  .modal-card { border-radius: 0; }
}
