/* ===== Página de projeto (FZ Optimizer) ===== */
.project-page {
  --rail: 0px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 200ms ease, background 200ms ease;
}

.ghost-button:hover {
  border-color: var(--cyan);
  background: rgba(35, 215, 255, 0.1);
}

/* Hero */
.p-hero {
  position: relative;
  padding: 140px 0 60px;
  overflow: hidden;
  text-align: center;
}

.p-hero-inner {
  position: relative;
}

.back-link {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.back-link:hover {
  color: var(--cyan);
}

.p-hero h1 {
  max-width: none;
  margin: 0 auto 18px;
  font-size: clamp(3.2rem, 11vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.p-hero-text {
  max-width: 680px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
}

.p-stats {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.p-stats div {
  min-width: 140px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 25, 55, 0.6);
  backdrop-filter: blur(8px);
}

.p-stats strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(35, 215, 255, 0.5);
}

.p-stats span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.p-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.p-hero-shot {
  position: relative;
  margin: 64px auto 0;
  max-width: 1040px;
  perspective: 1600px;
}

.p-hero-shot::before {
  content: "";
  position: absolute;
  inset: 10% 6% -6%;
  background: radial-gradient(ellipse at center, rgba(35, 215, 255, 0.4), rgba(198, 75, 255, 0.2) 45%, transparent 70%);
  filter: blur(50px);
  z-index: -1;
}

.p-hero-shot .window {
  transform: rotateX(var(--tilt, 22deg)) scale(var(--zoom, 0.92));
  transform-origin: 50% 0;
  transition: transform 120ms linear;
}

/* Janela estilo app */
.window {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(35, 215, 255, 0.35);
  background: #050d1d;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 70px rgba(35, 215, 255, 0.16);
  cursor: zoom-in;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(35, 215, 255, 0.18);
  background: linear-gradient(180deg, rgba(20, 40, 75, 0.95), rgba(8, 20, 42, 0.95));
}

.window-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(173, 196, 216, 0.35);
}

.window-bar i:first-child { background: #23d7ff; }

.window-bar span {
  margin-left: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.window img {
  width: 100%;
}

/* Trilho lateral (desktop) */
.app-rail {
  position: fixed;
  left: 18px;
  top: 50%;
  z-index: 15;
  width: 214px;
  padding: 18px 10px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 12, 28, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transform: translate(-130%, -50%);
  opacity: 0;
  transition: transform 500ms cubic-bezier(.2, .8, .2, 1), opacity 400ms ease;
}

.app-rail.show {
  transform: translate(0, -50%);
  opacity: 1;
}

.rail-brand {
  margin: 0 0 10px 10px;
  font-weight: 800;
}

.rail-brand b {
  color: var(--cyan);
  font-size: 1.3rem;
  margin-right: 4px;
}

.app-rail a {
  position: relative;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  transition: color 250ms ease, background 250ms ease;
}

.app-rail a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  transform: scaleY(0);
  transition: transform 300ms ease;
}

.app-rail a:hover {
  color: var(--white);
}

.app-rail a.active {
  color: var(--white);
  background: rgba(35, 215, 255, 0.12);
}

.app-rail a.active::before {
  transform: scaleY(1);
}

.rail-status {
  margin: 12px 0 0;
  text-align: center;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* Showcase */
.showcase {
  padding: 60px 0 40px;
}

.showcase-intro {
  text-align: center;
  margin-bottom: 30px;
}

.showcase-intro .section-copy {
  max-width: 560px;
  margin: 0 auto;
}

.feature {
  padding: 90px 0;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: center;
}

.feature.reverse .feature-text {
  order: 2;
}

.feature-text {
  position: relative;
}

.feature-num {
  position: absolute;
  top: -70px;
  left: -10px;
  z-index: -1;
  font-size: 9rem;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(35, 215, 255, 0.18);
}

.feature-code {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.feature-text h3 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  margin-bottom: 16px;
}

.feature-text > p {
  color: var(--muted);
  font-size: 1.06rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.chips li {
  padding: 6px 12px;
  border: 1px solid rgba(35, 215, 255, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(35, 215, 255, 0.07);
  font-size: 0.84rem;
  font-weight: 700;
}

.feature-media {
  position: relative;
  margin: 0;
}

.feature-media::before {
  content: "";
  position: absolute;
  inset: 12%;
  z-index: -1;
  background: radial-gradient(circle, rgba(35, 215, 255, 0.35), transparent 70%);
  filter: blur(40px);
}

.feature-ai .feature-media::before {
  background: radial-gradient(circle, rgba(198, 75, 255, 0.45), rgba(35, 215, 255, 0.2) 50%, transparent 72%);
}

.feature-ai .feature-code,
.feature-ai .chips li {
  color: #e08bff;
  border-color: rgba(198, 75, 255, 0.35);
}

.feature-media.stack {
  padding-bottom: 14%;
}

.feature-media.stack .window-back {
  position: absolute;
  width: 72%;
  right: -6%;
  bottom: 0;
  z-index: 1;
}

.feature-media.stack .window:first-child {
  width: 92%;
}

/* Animações suaves de entrada */
.feature .feature-text > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2, .8, .2, 1);
}

.feature .feature-media .window {
  opacity: 0;
  transform: translateX(60px) scale(0.94) rotateY(-8deg);
  filter: blur(6px);
  transition: opacity 900ms ease, transform 1000ms cubic-bezier(.2, .8, .2, 1), filter 900ms ease;
}

.feature.reverse .feature-media .window {
  transform: translateX(-60px) scale(0.94) rotateY(8deg);
}

.feature.in .feature-text > * {
  opacity: 1;
  transform: none;
}

.feature.in .feature-media .window {
  opacity: 1;
  transform: none;
  filter: none;
}

.feature.in .feature-media .window-back {
  transition-delay: 250ms;
}

.feature.in .feature-text > :nth-child(2) { transition-delay: 80ms; }
.feature.in .feature-text > :nth-child(3) { transition-delay: 160ms; }
.feature.in .feature-text > :nth-child(4) { transition-delay: 240ms; }
.feature.in .feature-text > :nth-child(5) { transition-delay: 320ms; }

.feature .window:hover {
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 90px rgba(35, 215, 255, 0.32);
}

/* CTA final */
.p-cta {
  padding: 60px 0 120px;
}

.p-cta-box {
  position: relative;
  padding: 70px 30px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(35, 215, 255, 0.22), transparent 60%),
    linear-gradient(145deg, rgba(20, 103, 255, 0.16), rgba(4, 15, 34, 0.92));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.p-cta-box h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.p-cta-box .section-copy {
  margin-bottom: 30px;
}

.primary-button.big {
  min-height: 60px;
  padding: 0 38px;
  font-size: 1.1rem;
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 16px 40px rgba(35, 215, 255, 0.25), 0 0 0 0 rgba(35, 215, 255, 0.45); }
  50% { box-shadow: 0 16px 40px rgba(35, 215, 255, 0.35), 0 0 0 14px rgba(35, 215, 255, 0); }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 5, 14, 0.9);
  backdrop-filter: blur(8px);
  animation: fade-in 250ms ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1400px, 100%);
  max-height: 88vh;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 0 80px rgba(35, 215, 255, 0.25);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.6rem;
  cursor: pointer;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@media (min-width: 1360px) {
  .project-page .showcase,
  .project-page .p-cta {
    padding-left: 220px;
  }
}

@media (max-width: 1359px) {
  .app-rail {
    display: none;
  }
}

@media (max-width: 900px) {
  .feature {
    padding: 56px 0;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .feature.reverse .feature-text {
    order: 0;
  }

  .feature-num {
    font-size: 6rem;
    top: -46px;
  }

  .feature .feature-media .window,
  .feature.reverse .feature-media .window {
    transform: translateY(40px) scale(0.96);
  }

  .feature-media.stack .window-back {
    right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature .feature-text > *,
  .feature .feature-media .window {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .p-hero-shot .window {
    transform: none !important;
  }

  .primary-button.big {
    animation: none;
  }
}

/* Logo do FZ Optimizer */
.p-logo {
  width: clamp(110px, 14vw, 160px);
  margin: 0 auto 22px;
  border-radius: 28px;
  box-shadow: 0 0 0 1px rgba(35, 215, 255, 0.35), 0 0 60px rgba(35, 215, 255, 0.45);
  animation: logo-float 5s ease-in-out infinite;
}

.cta-logo {
  width: 96px;
  margin: 0 auto 22px;
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(35, 215, 255, 0.4);
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .p-logo { animation: none; }
}

/* Download indisponível (em breve) */
.primary-button.is-disabled {
  gap: 12px;
  cursor: default;
  color: var(--cyan);
  background: rgba(35, 215, 255, 0.08);
  border: 1px solid rgba(35, 215, 255, 0.45);
}

.primary-button.is-disabled::after {
  background: linear-gradient(110deg, transparent 30%, rgba(35, 215, 255, 0.25) 50%, transparent 70%);
}

.primary-button.is-disabled:hover {
  transform: none;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: blink 1.6s ease-in-out infinite;
}
