/* ============================================
   ÉPIUS Solutions — Landing Page Provisória
   Design System: TailAdmin v2.0
   ============================================ */

/* --- CSS Variables (Design Tokens) — Dark Mode (padrão) --- */
:root {
  --brand-500: #465fff;
  --brand-600: #3641f5;
  --brand-glow: rgba(70, 95, 255, 0.4);
  --brand-glow-strong: rgba(70, 95, 255, 0.6);
  --bg-primary: #0a0e1a;
  --bg-surface: #111827;
  --bg-gradient-start: #111c3a;
  --bg-gradient-end: #0a0e1a;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --orb-1-opacity: 0.35;
  --orb-2-opacity: 0.35;
  --orb-3-opacity: 0.2;
  --noise-opacity: 0.06;
  --logo-brightness: 1;
  --font-family: 'Inter', sans-serif;
}

/* --- CSS Variables — Light Mode --- */
.light-mode {
  --bg-primary: #e8eeff;
  --bg-surface: #dfe6ff;
  --bg-gradient-start: #dfe6ff;
  --bg-gradient-end: #f0f4ff;
  --text-primary: #475569;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: rgba(0, 0, 0, 0.08);
  --orb-1-opacity: 0.15;
  --orb-2-opacity: 0.12;
  --orb-3-opacity: 0.1;
  --noise-opacity: 0.03;
  --logo-brightness: 1;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- Landing Page Layout --- */
.landing {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* --- Background Layers --- */
.bg-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 70%);
  z-index: 0;
}

.bg-noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
}

/* --- Gradient Orbs --- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}

.orb--1 {
  width: 500px;
  height: 500px;
  background: var(--brand-500);
  top: -10%;
  left: -5%;
  opacity: var(--orb-1-opacity);
  animation: orbFloat1 12s ease-in-out infinite;
}

.orb--2 {
  width: 400px;
  height: 400px;
  background: var(--brand-600);
  bottom: -15%;
  right: -8%;
  opacity: var(--orb-2-opacity);
  animation: orbFloat2 15s ease-in-out infinite;
}

.orb--3 {
  width: 300px;
  height: 300px;
  background: #6366f1;
  top: 50%;
  left: 60%;
  opacity: var(--orb-3-opacity);
  animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, 60px) scale(1.1); }
  66% { transform: translate(-40px, 30px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-60px, -50px) scale(1.05); }
  66% { transform: translate(50px, -30px) scale(0.9); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, 40px) scale(1.15); }
}

/* --- Particles Canvas --- */
.particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* --- Content --- */
.content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 0 24px;
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* --- Logo --- */
.logo {
  width: 320px;
  max-width: 80%;
  height: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
  filter: drop-shadow(0 0 20px var(--brand-glow)) brightness(var(--logo-brightness));
}

.logo-glow {
  animation: fadeInUp 0.8s ease-out forwards, glowPulse 3s ease-in-out 1s infinite;
}

@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 20px var(--brand-glow)) brightness(var(--logo-brightness)); }
  50% { filter: drop-shadow(0 0 40px var(--brand-glow-strong)) brightness(var(--logo-brightness)); }
}

/* --- Tagline --- */
.tagline {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

/* --- Subtitle --- */
.subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

/* --- Badge "Em breve" --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-500);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out 0.9s forwards;
}

.badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-500);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--brand-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}

/* --- Footer --- */
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  text-align: center;
  padding: 20px 24px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeIn 0.8s ease-out 1.2s forwards;
}

/* --- Footer Nav --- */
.footer-nav {
  margin-bottom: 8px;
}

.footer-nav a,
.footer-nav a:visited {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: var(--brand-500);
}

.footer-nav span {
  margin: 0 8px;
  color: var(--text-muted);
  opacity: 0.4;
}

/* --- Fade Animations --- */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ============================================
   Glitch Transition Effect
   ============================================ */

/* Shake na tela inteira */
.glitching {
  animation: glitchShake 100ms steps(2) infinite;
}

@keyframes glitchShake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5px, 2px); }
  20% { transform: translate(3px, -1px); }
  30% { transform: translate(-3px, -2px); }
  40% { transform: translate(5px, 1px); }
  50% { transform: translate(-2px, -1px); }
  60% { transform: translate(4px, 2px); }
  70% { transform: translate(-4px, 0); }
  80% { transform: translate(2px, -2px); }
  90% { transform: translate(-1px, 1px); }
}

/* RGB split nos textos */
.glitching .tagline,
.glitching .subtitle {
  animation: glitchRGB 100ms steps(2) infinite !important;
}

@keyframes glitchRGB {
  0% { text-shadow: -3px 0 rgba(255, 0, 0, 0.7), 3px 0 rgba(0, 0, 255, 0.7); }
  50% { text-shadow: 3px 0 rgba(255, 0, 0, 0.7), -3px 0 rgba(0, 0, 255, 0.7); }
  100% { text-shadow: -2px 0 rgba(255, 0, 0, 0.7), 2px 0 rgba(0, 0, 255, 0.7); }
}

/* RGB split no logo */
.glitching .logo {
  animation: glitchLogoRGB 80ms steps(2) infinite !important;
}

@keyframes glitchLogoRGB {
  0% { filter: drop-shadow(-3px 0 rgba(255, 0, 0, 0.5)) drop-shadow(3px 0 rgba(0, 0, 255, 0.5)); }
  50% { filter: drop-shadow(3px 0 rgba(255, 0, 0, 0.5)) drop-shadow(-3px 0 rgba(0, 0, 255, 0.5)); }
  100% { filter: drop-shadow(-2px 0 rgba(255, 0, 0, 0.5)) drop-shadow(2px 0 rgba(0, 0, 255, 0.5)); }
}

/* Scanlines overlay */
.glitching::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  opacity: 0.5;
  pointer-events: none;
  animation: glitchFlicker 80ms steps(1) infinite;
}

@keyframes glitchFlicker {
  0%, 100% { opacity: 0.5; }
  33% { opacity: 0.15; }
  66% { opacity: 0.4; }
}

/* Flash no momento da troca */
.glitch-flash {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: white;
  opacity: 0;
  animation: glitchFlashBang 300ms ease-out forwards;
}

@keyframes glitchFlashBang {
  0% { opacity: 0; }
  15% { opacity: 0.6; }
  100% { opacity: 0; }
}

/* ============================================
   Responsividade
   ============================================ */

/* Desktop large (1920px–1281px) — padrão, sem ajustes */

/* Desktop (1280px–1025px) */
@media (max-width: 1280px) {
  .tagline { font-size: 42px; }
  .logo { width: 290px; }
}

/* Tablet (1024px–769px) */
@media (max-width: 1024px) {
  .tagline { font-size: 36px; }
  .subtitle { font-size: 17px; }
  .logo { width: 260px; }
  .orb--3 { display: none; }
}

/* Mobile large (768px–481px) */
@media (max-width: 768px) {
  .tagline { font-size: 32px; }
  .subtitle { font-size: 16px; max-width: 90%; }
  .logo { width: 240px; }
  .content { gap: 24px; }
  .orb--1 { width: 350px; height: 350px; filter: blur(80px); }
  .orb--2 { width: 280px; height: 280px; filter: blur(80px); }
}

/* Mobile (480px–390px) */
@media (max-width: 480px) {
  .landing { min-height: 100svh; }
  .tagline { font-size: 28px; }
  .subtitle { font-size: 16px; }
  .badge { font-size: 13px; }
  .logo { width: 220px; }
  .content { gap: 20px; }
  .footer { font-size: 12px; padding: 16px 20px; }
  .orb--1 { width: 280px; height: 280px; filter: blur(60px); }
  .orb--2 { width: 220px; height: 220px; filter: blur(60px); }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .orb,
  .logo,
  .tagline,
  .subtitle,
  .badge,
  .footer {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .badge::before {
    animation: none !important;
  }
  .particles-canvas {
    display: none !important;
  }
}

/* ============================================
   Páginas Internas (Privacidade + Termos)
   ============================================ */
.page {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
}

.page-header {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-header .logo {
  width: 200px;
  opacity: 1;
  transform: none;
  animation: none;
  filter: none;
}

/* Toggle dark/light mode */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  transition: border-color 0.3s, color 0.3s;
}

.theme-toggle:hover {
  border-color: var(--brand-500);
  color: var(--brand-500);
}

.page-content {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.page-content h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.3;
}

.page-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.page-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 28px;
  margin-bottom: 12px;
}

.page-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.page-content strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.page-content ul,
.page-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.page-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.page-footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Responsividade páginas internas */
@media (max-width: 768px) {
  .page-content h1 { font-size: 26px; }
  .page-content h2 { font-size: 20px; }
  .page-content { padding: 32px 20px 48px; }
}

@media (max-width: 480px) {
  .page-content h1 { font-size: 24px; }
  .page-content h2 { font-size: 18px; }
  .page-header .logo { width: 160px; }
  .page-footer { font-size: 12px; }
}
