/* ── Base resets ── */
/* NOTE: Do NOT add unlayered * { margin/padding } resets here.
   Tailwind v4 handles resets in @layer base, and unlayered rules
   would override ALL Tailwind utility classes (mb-*, px-*, py-*, etc.)
   due to CSS Cascade Layers precedence rules. */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: #0A0F1A; color: #fff; overflow-x: hidden; }

/* ── Hero gradient mesh ── */
.hero-gradient {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(134,239,172,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(74,222,128,0.07) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(244,240,232,0.04) 0%, transparent 50%);
}

/* ── Animated grain overlay ── */
.grain::after {
  content: ''; position: fixed; inset: -50%; z-index: 9999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: 0.4;
}

/* ── Glow effects ── */
.glow-sage {
  box-shadow: 0 0 60px rgba(134,239,172,0.3), 0 0 120px rgba(134,239,172,0.1);
}
.glow-text {
  text-shadow: 0 0 40px rgba(134,239,172,0.4), 0 0 80px rgba(134,239,172,0.15);
}
.glow-line {
  background: linear-gradient(90deg, transparent, #86EFAC, transparent);
  height: 1px;
}

/* ── Badge button ── */
.cta-badge {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cta-badge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(134,239,172,0.35);
}

/* ── Feature cards ── */
.feature-card {
  background: linear-gradient(135deg, rgba(26,34,56,0.8), rgba(16,23,41,0.6));
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card:hover {
  border-color: rgba(134,239,172,0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(10,15,26,0.6), 0 0 40px rgba(134,239,172,0.08);
}
.feature-icon {
  background: linear-gradient(135deg, rgba(134,239,172,0.15), rgba(134,239,172,0.05));
  border: 1px solid rgba(134,239,172,0.2);
}

/* ── Phone mockup ── */
.phone-mockup {
  position: relative;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6)) drop-shadow(0 0 40px rgba(134,239,172,0.1));
}
.phone-frame {
  background: linear-gradient(160deg, #2A3350, #101729);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 36px;
  padding: 12px;
  position: relative;
}
.phone-frame::before {
  content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 6px; background: #101729; border-radius: 3px;
}
.phone-screen {
  border-radius: 26px; overflow: hidden; background: #0A0F1A;
}

/* ── Screenshot carousel ── */
.screenshot-carousel {
  --slide-width: 280px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.screenshot-viewport {
  width: 100%;
  overflow: hidden;
  /* Permite scroll vertical da página, captura gesto horizontal pro swipe. */
  touch-action: pan-y;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}
.screenshot-viewport.is-dragging { cursor: grabbing; }
.screenshot-track {
  display: flex;
  align-items: center;
  will-change: transform;
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.screenshot-track.is-instant {
  transition: none;
}
.screenshot-slide {
  flex: 0 0 var(--slide-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
  transform: scale(0.62);
  opacity: 0.25;
  filter: blur(1px);
  transition:
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 700ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.screenshot-slide.is-adjacent {
  transform: scale(0.78);
  opacity: 0.55;
  filter: none;
}
.screenshot-slide.is-active {
  transform: scale(1);
  opacity: 1;
  filter: none;
  pointer-events: auto;
}
.screenshot-image {
  width: 280px;
  height: auto;
  display: block;
  border-radius: 24px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(134, 239, 172, 0.08);
}
.screenshot-nav {
  position: absolute;
  top: calc(50% - 1rem);
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 28, 50, 0.7);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}
.screenshot-nav:hover {
  background: rgba(134,239,172,0.12);
  color: #86EFAC;
  border-color: rgba(134,239,172,0.3);
}
.screenshot-nav:focus-visible {
  outline: 2px solid #86EFAC;
  outline-offset: 2px;
}
.screenshot-nav-prev { left: 1rem; }
.screenshot-nav-next { right: 1rem; }
.screenshot-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.screenshot-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.screenshot-dot:hover { background: rgba(255,255,255,0.35); }
.screenshot-dot.is-active {
  width: 28px;
  background: #86EFAC;
}
.screenshot-dot:focus-visible {
  outline: 2px solid #86EFAC;
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .screenshot-carousel { --slide-width: 240px; }
  .screenshot-image { width: 220px; border-radius: 20px; }
  .screenshot-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screenshot-track,
  .screenshot-slide,
  .screenshot-dot { transition: none; }
}

/* ── Stats counter ── */
.stat-item {
  position: relative;
}
.stat-item::after {
  content: ''; position: absolute; right: 0; top: 15%; height: 70%;
  width: 1px; background: linear-gradient(180deg, transparent, rgba(134,239,172,0.2), transparent);
}
.stat-item:last-child::after { display: none; }

/* ── Scroll animations ── */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Lunar orbit decoration (replaces candle-wave) ── */
.orbit-line {
  position: absolute; width: 100%; height: 100px; opacity: 0.04; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent, transparent 8px, #86EFAC 8px, #86EFAC 9px);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100'%3E%3Cpath d='M0,50 Q300,0 600,50 T1200,50' fill='none' stroke='white' stroke-width='40'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100'%3E%3Cpath d='M0,50 Q300,0 600,50 T1200,50' fill='none' stroke='white' stroke-width='40'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
}

/* ── Moon glyph (CSS-only placeholder until painter PNG arrives) ── */
.moon-glyph {
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #F4F0E8 0%, #E5DCC4 40%, #B8A580 70%, #6B5D3E 100%);
  box-shadow:
    inset -8px -8px 24px rgba(0,0,0,0.35),
    0 0 60px rgba(244,240,232,0.18),
    0 0 120px rgba(134,239,172,0.08);
}
.moon-glyph::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, transparent 50%, rgba(0,0,0,0.15) 100%);
  pointer-events: none;
}

/* ── Pulse animation ── */
@keyframes pulse-sage {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.pulse-dot {
  animation: pulse-sage 2s ease-in-out infinite;
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-left { animation: slide-in-left 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.anim-right { animation: slide-in-right 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.anim-up-1 { animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }
.anim-up-2 { animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both; }
.anim-up-3 { animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-content { text-align: center; }
  .stat-item::after { display: none; }
}

/* ── Privacy / Terms / Support typography ── */
.privacy-intro p { font-feature-settings: 'ss01' on; }
.legal-section h2 { letter-spacing: -0.02em; }
.legal-section p,
.legal-section li { line-height: 1.75; }
