/* Build3DLab: página principal */

.hl {
  color: var(--orange);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-2);
}
.eyebrow .i {
  width: 18px;
  height: 18px;
}

.section {
  padding: clamp(80px, 11vw, 140px) 0;
  position: relative;
}
.section-title,
.section h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}
.section-lead {
  margin-top: 18px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.12rem;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: clamp(24px, 4vw, 56px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.hero::before {
  /* linhas de camada ao fundo, como uma peça vista de perto */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgb(150 180 235 / 0.035) 0 1px, transparent 1px 9px);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  min-height: min(calc(100dvh - 70px), 720px);
}
.hero-copy {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.3vw, 3.7rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero h1 .hl {
  display: inline-block;
  background: var(--grad-orange);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}
.hero-sub {
  margin-top: 24px;
  max-width: 44ch;
  font-size: clamp(1.06rem, 1.4vw, 1.22rem);
  color: var(--muted);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 0.92;
  width: 100%;
  touch-action: pan-y;
}
.hero-glow {
  position: absolute;
  inset: 4% 2% 10%;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgb(31 107 255 / 0.36), transparent 72%),
    radial-gradient(closest-side at 62% 70%, rgb(255 122 26 / 0.16), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
.hero-stage {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.hero-visual.is-ready .hero-stage {
  opacity: 1;
}
.hero-stage canvas {
  width: 100% !important;
  height: 100% !important;
}
/* foto do mascote: aparece na hora e sai quando o 3D fica pronto */
.hero-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: 82%;
  transform: translate(-50%, -50%);
  pointer-events: none; /* fica por cima do 3D: não pode roubar o mouse */
  filter: drop-shadow(0 30px 50px rgb(31 107 255 / 0.4));
  transition: opacity 0.8s var(--ease);
}
.hero-visual.is-ready .hero-fallback {
  opacity: 0;
}
.hero-visual.is-fallback .hero-fallback {
  opacity: 1;
}
.hero-visual.is-fallback .hero-hud,
.hero-visual.is-fallback .hero-replay,
.no-js .hero-hud {
  display: none;
}

.hero-hud {
  position: absolute;
  left: 4%;
  bottom: 3%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgb(10 19 36 / 0.66);
  box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 1px 0 rgb(255 255 255 / 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.hero-visual.is-ready .hero-hud {
  opacity: 1;
}
.hud-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange-2);
}
.hud-status::before {
  /* indicador de estado real: pisca enquanto imprime, verde quando pronta */
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: piscar 0.9s steps(2, jump-none) infinite;
}
[data-estado="pronto"] .hud-status {
  color: var(--ok);
}
[data-estado="pronto"] .hud-status::before {
  animation: none;
}
[data-estado="pronto"] .hud-layer {
  display: none;
}
.hero-visual.is-dragging {
  cursor: grabbing;
}
.hero-visual[data-estado="pronto"] .hero-stage {
  cursor: grab;
}
.hud-layer b {
  color: var(--text);
  font-weight: 800;
}
@keyframes piscar {
  50% {
    opacity: 0.25;
  }
}

.hero-replay {
  position: absolute;
  right: 4%;
  bottom: 3%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgb(10 19 36 / 0.66);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, color 0.2s, transform 0.5s var(--ease);
}
[data-estado="pronto"].is-ready .hero-replay {
  opacity: 1;
  pointer-events: auto;
}
.hero-replay:hover {
  color: var(--text);
  transform: rotate(-120deg);
}

/* ---------- FAIXA ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgb(31 107 255 / 0.08), rgb(255 122 26 / 0.06));
  overflow: hidden;
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: rolar 42s linear infinite;
}
.ticker ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticker li {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
}
.ticker li::after {
  content: "";
  width: 22px;
  height: 22px;
  margin: 0 30px;
  background: url("/assets/img/b-glossy.webp") center / contain no-repeat;
}
@keyframes rolar {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* ---------- BENTO ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(230px, auto);
  gap: 16px;
  margin-top: 56px;
}
.tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: 28px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgb(255 255 255 / 0.04);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-blue);
}
.tile h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  letter-spacing: -0.02em;
}
.tile p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 38ch;
}
.tile-art {
  position: absolute;
  top: 24px;
  left: 24px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.05);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--blue-2);
}
.tile-art .i {
  width: 30px;
  height: 30px;
}
.tile-go {
  position: absolute;
  top: 26px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background 0.3s, color 0.3s;
}
.tile:hover .tile-go {
  background: var(--orange);
  color: var(--orange-ink);
  box-shadow: none;
}

.tile-a {
  grid-column: span 2;
  grid-row: span 2;
  background:
    repeating-linear-gradient(180deg, rgb(0 0 0 / 0.07) 0 2px, transparent 2px 8px),
    var(--grad-orange);
  padding: 36px;
}
.tile-a h3 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  color: var(--orange-ink);
}
.tile-a p {
  color: rgb(29 13 0 / 0.78);
  font-size: 1.08rem;
}
.tile-a .tile-art {
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  transform: translate(-50%, -62%) rotate(-8deg);
  background: none;
  box-shadow: none;
  color: rgb(29 13 0 / 0.85);
}
.tile-a .tile-art .i {
  width: clamp(130px, 18vw, 220px);
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(0 24px 30px rgb(120 40 0 / 0.35));
  transition: transform 0.8s var(--ease);
}
.tile-a:hover .tile-art .i {
  transform: rotate(10deg) scale(1.05);
}
.tile-a .tile-go {
  background: rgb(29 13 0 / 0.88);
  color: #fff;
  box-shadow: none;
}

.tile-b {
  grid-column: span 2;
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(78 162 255 / 0.55), transparent 55%),
    linear-gradient(160deg, #1546c9, #0c2a78);
}
.tile-b p {
  color: rgb(230 240 255 / 0.82);
}
.tile-b .tile-art {
  color: #fff;
  background: rgb(255 255 255 / 0.12);
}

.tile-e {
  grid-column: span 2;
  padding-right: 42%;
}
.tile-e .tile-photo {
  position: absolute;
  right: -6%;
  bottom: -26%;
  width: 40%;
  height: auto;
  z-index: -1;
  filter: drop-shadow(0 20px 40px rgb(31 107 255 / 0.35));
  transition: transform 0.8s var(--ease);
}
.tile-e:hover .tile-photo {
  transform: rotate(-6deg) translateY(-6px);
}
.tile-f {
  grid-column: span 2;
  background:
    radial-gradient(90% 120% at 0% 100%, rgb(255 122 26 / 0.18), transparent 60%),
    var(--surface);
}
.tile-f .tile-art {
  color: var(--orange-2);
}

/* ---------- SEM ARQUIVO ---------- */
.no-file {
  background: linear-gradient(180deg, transparent, var(--bg-2) 30%, var(--bg-2) 70%, transparent);
}
.no-file-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}
.mascot-wrap {
  position: relative;
  aspect-ratio: 820 / 853;
  width: 100%;
  max-width: 470px;
  margin-inline: auto;
}
.mascot-ring {
  position: absolute;
  inset: 8% 0 0;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgb(31 107 255 / 0.4), transparent 70%);
  filter: blur(10px);
}
.mascot {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 40px 40px rgb(0 0 0 / 0.45));
}
@media (prefers-reduced-motion: no-preference) {
  .mascot {
    animation: flutuar 6s ease-in-out infinite;
  }
}
@keyframes flutuar {
  50% {
    transform: translateY(-14px) rotate(1.5deg);
  }
}
.mascot-bubble {
  position: absolute;
  top: 2%;
  right: -4%;
  padding: 12px 18px;
  border-radius: 20px 20px 20px 6px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.5);
}
.no-file h2 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
}
.starts {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.starts li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: inset 0 0 0 1px var(--line);
}
.starts b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.starts span:not(.start-ico) {
  color: var(--muted);
  font-size: 0.98rem;
}
.start-ico {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 15px;
  background: var(--grad-blue);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgb(31 107 255 / 0.8);
}
.start-ico .i {
  width: 26px;
  height: 26px;
}
.file-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.98rem;
}
.file-note .i {
  color: var(--orange-2);
}

/* ---------- COMO FUNCIONA ---------- */
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.how-head {
  position: sticky;
  top: 120px;
}
.how-head h2 {
  margin-bottom: 34px;
}
.steps {
  --progresso: 0;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 76px;
  display: grid;
  gap: 54px;
}
/* trilho: a linha laranja "extrude" conforme a rolagem */
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
}
.steps::before {
  background: var(--line-strong);
}
.steps::after {
  background: var(--grad-orange);
  transform-origin: top;
  transform: scaleY(var(--progresso));
  box-shadow: 0 0 18px rgb(255 122 26 / 0.6);
}
.step {
  position: relative;
}
.step-ico {
  position: absolute;
  left: -76px;
  top: -6px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--muted);
  z-index: 1;
  transition: background 0.5s var(--ease), color 0.5s, box-shadow 0.5s;
}
.step.is-lit .step-ico {
  background: var(--grad-orange);
  color: var(--orange-ink);
  box-shadow: 0 0 0 6px rgb(255 122 26 / 0.14);
}
.step-ico .i {
  width: 26px;
  height: 26px;
}
.step h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  letter-spacing: -0.02em;
}
.step p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- DÚVIDAS ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq-list {
  display: grid;
  gap: 10px;
}
.faq details {
  border-radius: 18px;
  background: rgb(255 255 255 / 0.03);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.3s;
}
.faq details[open] {
  background: rgb(255 255 255 / 0.05);
}
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  font-weight: 700;
  font-size: 1.06rem;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .i {
  color: var(--orange-2);
  transition: transform 0.4s var(--ease);
}
.faq details[open] summary .i {
  transform: rotate(45deg);
}
.faq details p {
  padding: 0 24px 22px;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- CHAMADA FINAL ---------- */
.final {
  padding: 40px 0 clamp(80px, 10vw, 130px);
}
.final-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(44px, 7vw, 96px);
  border-radius: 32px;
  background:
    repeating-linear-gradient(180deg, rgb(255 255 255 / 0.03) 0 1px, transparent 1px 10px),
    radial-gradient(90% 120% at 100% 0%, rgb(31 107 255 / 0.5), transparent 60%),
    radial-gradient(70% 100% at 0% 100%, rgb(255 122 26 / 0.22), transparent 60%),
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.final-card h2 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  max-width: 14ch;
}
.final-card > p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.12rem;
}
.final-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.final-b {
  position: absolute;
  right: -3%;
  top: 50%;
  width: min(44%, 460px);
  height: auto;
  transform: translateY(-50%) rotate(8deg);
  z-index: -1;
  filter: drop-shadow(0 40px 60px rgb(0 0 0 / 0.5));
}
@media (prefers-reduced-motion: no-preference) {
  .final-b {
    animation: girar-leve 9s ease-in-out infinite;
  }
}
@keyframes girar-leve {
  50% {
    transform: translateY(-52%) rotate(2deg);
  }
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 1000px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile-a {
    grid-row: span 1;
    min-height: 360px;
  }
  .tile-a,
  .tile-b,
  .tile-e,
  .tile-f {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 8px;
  }
  .hero-copy {
    padding-top: 12px;
  }
  .hero-visual {
    order: -1;
    aspect-ratio: 1 / 0.84;
    margin-inline: -16px;
    width: calc(100% + 32px);
  }
  .no-file-grid,
  .how-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .how-head {
    position: static;
  }
  .mascot-wrap {
    max-width: 320px;
  }
  .final-b {
    opacity: 0.35;
    width: 70%;
    right: -20%;
  }
}

@media (max-width: 560px) {
  .bento {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tile,
  .tile-a,
  .tile-b,
  .tile-e,
  .tile-f {
    grid-column: auto;
    min-height: 230px;
    padding: 24px;
  }
  .tile-a {
    min-height: 330px;
  }
  .tile-e {
    padding-right: 24px;
  }
  .tile-e .tile-photo {
    width: 46%;
    right: -12%;
    bottom: -22%;
    opacity: 0.35;
  }
  .hero-ctas .btn {
    flex: 1 1 auto;
  }
  .steps {
    padding-left: 66px;
    gap: 42px;
  }
  .step-ico {
    left: -66px;
    width: 48px;
    height: 48px;
  }
  .steps::before,
  .steps::after {
    left: 22px;
  }
  .hero-hud {
    padding: 7px 12px;
    font-size: 0.72rem;
    gap: 10px;
  }
  .hero-replay {
    width: 36px;
    height: 36px;
  }
  .mascot-bubble {
    right: 0;
    font-size: 0.85rem;
  }
}

@media (max-width: 860px) {
  .br-lg {
    display: none;
  }
}
