/* ============ Base ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #05080f;
  --cream: #f2f4f8;
  --cream-muted: #a6b0c8;
  --purple: #a78bfa;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --card-border: rgba(255, 255, 255, 0.08);
}

html {
  background: var(--bg-deep);
}

body {
  position: relative;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(34, 60, 110, .35), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(50, 30, 90, .3), transparent 60%),
    linear-gradient(160deg, #05080f, #080d16, #0b1220 70%, #0a0f1c);
  color: var(--cream);
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.25rem 2rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ============ Language switcher ============ */
.lang-switcher {
  position: fixed;
  top: 1rem;
  inset-inline-end: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(8, 13, 22, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  backdrop-filter: blur(6px);
}

.lang-globe {
  width: 1rem;
  height: 1rem;
  color: var(--cream-muted);
  flex-shrink: 0;
}

.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: var(--cream);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  max-width: 11rem;
  text-overflow: ellipsis;
  padding-inline-end: 1.1rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6b0c8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 0.8rem;
}

[dir="rtl"] .lang-switcher select {
  background-position: left center;
}

.lang-switcher select option {
  background: #0b1220;
  color: var(--cream);
}

/* ============ Badge ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  color: var(--cream-muted);
  margin-bottom: 1.4rem;
}

/* ============ Logo ============ */
.logo {
  font-size: clamp(3.2rem, 10vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1.6rem;
  text-shadow: 0 4px 34px rgba(96, 165, 250, 0.2);
}

.logo-save {
  color: #ffffff;
}

.logo-lib {
  background-image: linear-gradient(135deg, #a78bfa, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ Hero illustration ============ */
.scene {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto 1.8rem;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.5));
}

@media (prefers-reduced-motion: no-preference) {
  .tv-glow {
    animation: glowPulse 3.4s ease-in-out infinite;
    transform-origin: center;
  }

  .lamp-glow {
    animation: glowPulse 4.2s ease-in-out infinite;
    animation-delay: 0.6s;
    transform-origin: center;
  }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ============ Tagline ============ */
.tagline {
  color: var(--cream-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 34rem;
  margin-bottom: 2.5rem;
}

/* ============ Hero card ============ */
.hero-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.14), rgba(167, 139, 250, 0.05));
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 1.1rem;
  padding: 1.6rem 1.8rem 1.8rem;
  text-align: start;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(96, 165, 250, 0.08);
  margin-bottom: 2.2rem;
}

.hero-chip {
  display: inline-block;
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.1rem;
}

.hero-body {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.hero-icon {
  flex-shrink: 0;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.85rem;
  background: rgba(96, 165, 250, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
}

.hero-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.hero-text h2 {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.55rem;
  color: var(--cream);
}

.hero-text p {
  color: var(--cream-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ============ Feature cards ============ */
.features {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-bottom: 2.4rem;
}

.feature {
  border-radius: 1rem;
  padding: 1.5rem 1.1rem 1.6rem;
  text-align: center;
  border: 1px solid var(--card-border);
}

.feature-icon {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.75rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.feature h3 {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--cream);
}

.feature p {
  color: var(--cream-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.feature-amber {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.16), rgba(167, 139, 250, 0.03));
  border-color: rgba(167, 139, 250, 0.3);
}

.feature-amber .feature-icon {
  background: rgba(167, 139, 250, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.32);
  color: #c4b5fd;
}

.feature-teal {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.16), rgba(96, 165, 250, 0.03));
  border-color: rgba(96, 165, 250, 0.3);
}

.feature-teal .feature-icon {
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.32);
  color: #93c5fd;
}

.feature-pink {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.14), rgba(34, 211, 238, 0.03));
  border-color: rgba(34, 211, 238, 0.28);
}

.feature-pink .feature-icon {
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #67e8f9;
}

/* ============ Bottom pill ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.07);
  color: #67e8f9;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.84rem;
  margin-bottom: 2.6rem;
}

.pill svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ============ Demo carousel ============ */
.demo {
  width: 100%;
  margin-bottom: 2.6rem;
}

.demo-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--cream);
}

.demo-subtitle {
  color: var(--cream-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 30rem;
  margin: 0 auto 1.4rem;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Screenshots verticais (~300x650): um slide por vez, em quadro vertical */
  aspect-ratio: 300 / 650;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: #0b1220;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  scrollbar-width: none;
  cursor: grab;
}

.carousel-track.dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(8, 13, 22, 0.75);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.carousel-btn:hover {
  background: rgba(96, 165, 250, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
}

.carousel-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.carousel-prev {
  left: 0.6rem;
}

.carousel-next {
  right: 0.6rem;
}

.carousel-counter {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 13, 22, 0.75);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.75rem;
  color: var(--cream-muted);
  backdrop-filter: blur(6px);
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 5, 10, 0.92);
  backdrop-filter: blur(8px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-track {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
}

.lightbox-track.dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
}

.lightbox-track::-webkit-scrollbar {
  display: none;
}

.lightbox-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.lightbox-slide img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox .carousel-btn {
  position: fixed;
  width: 2.8rem;
  height: 2.8rem;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(8, 13, 22, 0.75);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(96, 165, 250, 0.25);
}

.lightbox-close svg {
  width: 1.2rem;
  height: 1.2rem;
}

.lightbox-counter {
  bottom: 1rem;
}

/* No celular a altura é sempre a da tela; a largura acompanha a
   proporção da imagem (excesso lateral é cortado pelo centro) */
@media (max-width: 640px) {
  .lightbox-slide {
    overflow: hidden;
  }

  .lightbox-slide img {
    width: auto;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: none;
    border-radius: 0;
  }
}

/* ============ Footer ============ */
.footer {
  color: #6b7690;
  font-size: 0.8rem;
}

/* ============ Responsive ============ */
@media (max-width: 640px) {
  body {
    padding-top: 4.5rem;
  }

  .scene {
    max-width: 340px;
    margin-bottom: 1.4rem;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 1.4rem 1.2rem 1.5rem;
  }

  .hero-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-card {
    text-align: center;
  }
}
