:root {
  --bg: #07090d;
  --bg-alt: #0b0e14;
  --surface: #10141c;
  --surface-2: #171c26;
  --border: #1e2430;
  --border-strong: #2a3140;
  --border-hover: #3a4252;
  --text: #f4f6f9;
  --muted: #9aa3b2;
  --accent: #ffffff;
  --accent-hover: #e3e7ee;
  --on-accent: #07090d;
  --header-bg: rgba(7, 9, 13, 0.75);
  --grid-line: rgba(255, 255, 255, 0.045);
  --glow: rgba(140, 160, 200, 0.18);
  --glow-soft: rgba(140, 160, 200, 0.12);
  --mark-shadow: rgba(0, 0, 0, 0.6);
  --radius: 16px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", var(--font-body);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --border: #e3e7ee;
  --border-strong: #d3d9e2;
  --border-hover: #b9c1ce;
  --text: #0b0e14;
  --muted: #5a6475;
  --accent: #0b0e14;
  --accent-hover: #262c38;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.8);
  --grid-line: rgba(11, 14, 20, 0.06);
  --glow: rgba(120, 140, 180, 0.22);
  --glow-soft: rgba(120, 140, 180, 0.14);
  --mark-shadow: rgba(30, 40, 60, 0.18);
  color-scheme: light;
}

/* logo certo para cada tema */
.logo-on-light { display: none !important; }
:root[data-theme="light"] .logo-on-dark { display: none !important; }
:root[data-theme="light"] .logo-on-light { display: block !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand img { width: 26px; }
.brand-sm { font-size: 16px; }
.brand-sm img { width: 18px; }
.header-menu { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.header-controls { display: flex; align-items: center; gap: 12px; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--text); }
.lang { position: relative; display: flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
/* "pílula" que desliza entre EN e PT */
.lang::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px); border-radius: 999px; background: var(--text);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.lang[data-active="pt"]::before { transform: translateX(100%); }
.lang.no-anim::before, .lang.no-anim button { transition: none; }
.lang button {
  position: relative; z-index: 1; width: 36px;
  font: 600 12px var(--font-body); letter-spacing: .04em;
  background: none; border: 0; color: var(--muted);
  padding: 5px 0; border-radius: 999px; cursor: pointer;
  transition: color .3s ease;
}
.lang button[aria-pressed="true"] { color: var(--bg); }
.theme-toggle {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: none; border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-hover); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 112px; }
.iso-grid {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(30deg, transparent 0 47px, var(--grid-line) 47px 48px),
    repeating-linear-gradient(150deg, transparent 0 47px, var(--grid-line) 47px 48px);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 48px; }
.eyebrow {
  margin: 0 0 16px;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 700; }
.lead { color: var(--muted); font-size: 19px; max-width: 34em; margin: 24px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-hover); }
.btn-lg { height: 56px; padding: 0 28px; font-size: 17px; }

.hero-mark { position: relative; display: grid; place-items: center; }
.hero-mark img { position: relative; width: min(300px, 70%); filter: drop-shadow(0 30px 60px var(--mark-shadow)); animation: float 7s ease-in-out infinite; }
.glow {
  position: absolute; width: 120%; aspect-ratio: 1;
  background: radial-gradient(circle, var(--glow), transparent 60%);
}
@keyframes float { 50% { transform: translateY(-12px); } }

/* Sections */
.section { padding: 112px 0; border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
h2 { font-size: clamp(32px, 4.2vw, 48px); font-weight: 700; max-width: 18em; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.card h3 { font-size: 22px; margin: 24px 0 10px; }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { border-top: 1px solid var(--border-strong); padding-top: 24px; }
.step-num { font-family: var(--font-head); font-weight: 600; color: var(--muted); font-size: 14px; }
.steps h3 { font-size: 22px; margin: 12px 0 10px; }
.steps p { color: var(--muted); margin: 0; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--muted); font-size: 19px; margin: 0 0 20px; }
.about-text p:first-child { margin-top: 30px; }

.contact { text-align: center; background: radial-gradient(ellipse 60% 80% at 50% 100%, var(--glow-soft), transparent 70%); }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { margin-inline: auto; }
.contact .lead { margin-bottom: 36px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 14px; }
.footer-inner p a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 900px) {
  .header-inner { gap: 20px; }
  .header-menu { gap: 20px; }
  .nav { gap: 20px; }
  .hero { padding: 64px 0 80px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mark { order: -1; }
  .hero-mark img { width: 140px; }
  .cards, .steps, .about { grid-template-columns: 1fr; }
  .about-text p:first-child { margin-top: 0; }
  .section { padding: 80px 0; }
}

.menu-toggle { display: none; }

@media (max-width: 720px) {
  .menu-toggle {
    display: grid; place-items: center; margin-left: auto;
    width: 40px; height: 40px; border-radius: 10px;
    background: none; border: 1px solid var(--border); color: var(--text); cursor: pointer;
  }
  .menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  /* ☰ -> ✕ em duas etapas: as linhas se juntam no meio e depois giram (fechar faz o inverso) */
  .menu-toggle path {
    transform-box: view-box;
    transition: rotate .16s ease, translate .16s ease .16s, opacity .1s ease .16s;
  }
  .menu-toggle .bar1 { transform-origin: 12px 7px; }
  .menu-toggle .bar3 { transform-origin: 12px 17px; }
  .menu-open .menu-toggle path { transition: translate .16s ease, rotate .16s ease .16s, opacity .1s ease; }
  .menu-open .menu-toggle .bar1 { translate: 0 5px; rotate: 45deg; }
  .menu-open .menu-toggle .bar2 { opacity: 0; }
  .menu-open .menu-toggle .bar3 { translate: 0 -5px; rotate: -45deg; }

  .header-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 8px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px rgba(0, 0, 0, .25);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .menu-open .header-menu { visibility: visible; opacity: 1; transform: none; }
  .nav { flex-direction: column; gap: 0; }
  .nav a { padding: 14px 0; font-size: 17px; color: var(--text); border-bottom: 1px solid var(--border); }
  .header-controls { justify-content: space-between; padding-top: 16px; }
}

@media (max-width: 480px) {
  .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mark img { animation: none; }
  .lang::before, .lang button { transition: none; }
}
