*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #06080f;
  --bg-elevated: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f2f8;
  --text-muted: #8b93a8;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --max-w: 1120px;
  --pad-x: clamp(1rem, 4vw, 2.5rem);
  --pad-y: clamp(1rem, 3vw, 2rem);
  --touch-min: 44px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: clip;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: clamp(32px, 8vw, 64px) clamp(32px, 8vw, 64px);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: min(600px, 120vw);
  height: min(600px, 120vw);
  top: max(-200px, -30vw);
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-glow);
  opacity: 0.5;
}

.bg-glow--2 {
  width: min(400px, 80vw);
  height: min(400px, 80vw);
  bottom: 10%;
  right: max(-100px, -15vw);
  background: rgba(99, 102, 241, 0.2);
}

/* Top bar */
.top-bar {
  position: relative;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  padding: max(var(--pad-y), env(safe-area-inset-top)) var(--pad-x) 0;
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: inherit;
  font-size: clamp(0.75rem, 2.5vw, 0.8rem);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.lang-toggle:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.lang-toggle__active {
  color: var(--accent-light);
}

.lang-toggle__sep {
  opacity: 0.4;
}

/* Main */
main {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Hero */
.hero {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(0.5rem, 2vw, 1.5rem) var(--pad-x) clamp(3rem, 8vw, 6rem);
  text-align: center;
}

.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto clamp(1.25rem, 4vw, 1.75rem);
}

.hero__logo {
  display: block;
  width: clamp(120px, 28vw + 3rem, 280px);
  max-width: 85vw;
  height: auto;
  margin-bottom: clamp(0.85rem, 3vw, 1.25rem);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
  animation: fadeUp 0.6s ease both;
}

.hero__badge {
  display: inline-block;
  max-width: 100%;
  padding: 0.35rem clamp(0.75rem, 3vw, 1rem);
  font-size: clamp(0.65rem, 2.5vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero__title {
  width: 100%;
  max-width: 100%;
  font-size: clamp(1.5rem, 5.5vw + 0.5rem, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 auto clamp(1rem, 3vw, 1.25rem);
  hyphens: none;
  word-break: normal;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero__title-line {
  display: block;
}

.hero__title-line--typed {
  white-space: nowrap;
}

.hero__typewriter {
  display: inline;
  color: var(--accent-light);
}

.hero__typewriter::after {
  content: "|";
  margin-left: 1px;
  font-weight: 400;
  color: var(--accent-light);
  animation: cursorBlink 0.9s step-end infinite;
}

@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

.hero__subtitle {
  width: 100%;
  max-width: min(52ch, 100%);
  font-size: clamp(0.9rem, 2.5vw + 0.25rem, 1.15rem);
  color: var(--text-muted);
  margin: 0 auto;
  overflow-wrap: break-word;
  animation: fadeUp 0.6s 0.3s ease both;
}

/* Features */
.features {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(3rem, 8vw, 5rem);
}

.features__title {
  text-align: center;
  font-size: clamp(1.2rem, 3.5vw + 0.25rem, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
  overflow-wrap: break-word;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.85rem, 3vw, 1.25rem);
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.25rem, 4vw, 1.75rem) clamp(1rem, 3vw, 1.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.25s;
}

.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-3px);
}

.feature-card__icon {
  width: clamp(40px, 10vw, 44px);
  height: clamp(40px, 10vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-light);
  flex-shrink: 0;
}

.feature-card__icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: clamp(0.9rem, 2.5vw + 0.15rem, 1rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2rem) var(--pad-x);
  padding-bottom: max(clamp(1.5rem, 4vw, 2.5rem), env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.footer__logo {
  width: clamp(28px, 8vw, 32px);
  height: clamp(28px, 8vw, 32px);
  object-fit: contain;
  opacity: 0.7;
}

.footer__copy {
  max-width: 100%;
  font-size: clamp(0.75rem, 2vw, 0.8rem);
  color: var(--text-muted);
  text-align: center;
  overflow-wrap: break-word;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet: 2 colunas nos cards */
@media (min-width: 540px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (min-width: 768px) {

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(4, 1fr);
  }

}

/* Telas muito pequenas */
@media (max-width: 359px) {
  :root {
    --pad-x: 0.85rem;
  }

  .hero__logo {
    width: clamp(100px, 32vw + 1.5rem, 240px);
  }
}

/* Landscape em mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding-top: 0.5rem;
    padding-bottom: 2rem;
  }

  .hero__brand {
    margin-bottom: 1rem;
  }

  .hero__logo {
    width: clamp(90px, min(22vw, 38vh), 180px);
    margin-bottom: 0.5rem;
  }

  .hero__subtitle {
    margin-bottom: 1.25rem;
  }
}

/* Telas grandes */
@media (min-width: 1440px) {
  :root {
    --max-w: 1200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .feature-card:hover {
    transform: none;
  }

  .hero__typewriter::after {
    content: none;
  }
}
