/* ============================================================
   Laplace — landing page
   Direção: Observatório Violeta (escuro). Um único acento: violeta.
   Hero: galáxia interativa (Spline) + conteúdo à esquerda.
   ============================================================ */

:root {
  --bg:        #0A0913;   /* fundo principal — quase-preto violáceo */
  --bg-card:   #131020;   /* blocos sólidos (fallbacks) */
  --accent:    #A78BFA;   /* violeta-lavanda luminoso — ponto de luz */
  --accent-rgb: 167, 139, 250;
  --glass:     rgba(139, 92, 246, 0.14);  /* preenchimento translúcido dos pills */
  --glass-soft: rgba(255, 255, 255, 0.03); /* painéis de vidro neutros */
  --text:      #EDECF4;   /* texto principal */
  --muted:     #8D89A0;   /* texto secundário */
  --border:    #272138;   /* bordas finas */

  --radius:    20px;
  --radius-pill: 999px;
  --maxw:      1120px;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
}
.accent { color: var(--accent); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Layout helpers ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 7.5rem 1.5rem;
}
.section__head { max-width: 720px; margin-bottom: 3.5rem; }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.section__lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 1.1rem;
  max-width: 640px;
}

/* ---------- Nav (vidro, cantos inferiores arredondados) ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
  border-radius: 0 0 16px 16px;
}
/* sem backdrop-filter: re-desfocar a página inteira a cada frame de scroll
   é uma das maiores fontes de engasgo (sobretudo no mobile) */
.nav--scrolled {
  background: rgba(12, 10, 22, 0.92);
  border-bottom-color: var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}
.nav__logo { width: 40px; height: 40px; object-fit: contain; }
.nav__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--text); }
/* "vidro" simulado com opacidade — backdrop-filter sobre o canvas animado
   forçaria um re-blur a cada frame e derruba a fluidez */
.nav__cta {
  color: var(--text) !important;
  background: rgba(52, 36, 92, 0.5);
  border: 1px solid var(--border);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-pill);
  transition: border-color 0.2s ease, background 0.2s ease !important;
}
.nav__cta:hover { border-color: var(--accent); background: rgba(139, 92, 246, 0.24); }

/* ---------- Buttons (pill) ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-pill);
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
/* pill de vidro violeta — assinatura da hero (opacidade, sem backdrop-filter) */
.btn--glass {
  background: rgba(52, 36, 92, 0.55);
  color: var(--text);
  border-color: var(--border);
}
.btn--glass:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.26);
  box-shadow: 0 10px 40px -12px rgba(var(--accent-rgb), 0.35);
}
/* pill sólido — CTA de conversão */
.btn--primary {
  background: var(--accent);
  color: var(--bg);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px -8px rgba(var(--accent-rgb), 0.5);
}
.btn--ghost {
  background: rgba(10, 9, 19, 0.55);
  color: var(--muted);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--text); }
.btn--lg { padding: 1.05rem 2.4rem; font-size: 1.08rem; }

/* ---------- Hero (galáxia Spline) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* corpo difuso da nebulosa em CSS estático (o canvas só desenha as
     partículas — glow por frame custava caro em máquina fraca) */
  background:
    radial-gradient(ellipse 55% 45% at 66% 38%, rgba(var(--accent-rgb), 0.14), transparent 70%),
    radial-gradient(ellipse 45% 38% at 44% 56%, rgba(124, 58, 237, 0.12), transparent 70%),
    radial-gradient(ellipse 50% 40% at 30% 60%, rgba(88, 60, 160, 0.12), transparent 70%),
    var(--bg);
}
.hero__bg #galaxy {
  display: block;
  width: 100%;
  height: 100vh;
  transform: translateZ(0); /* camada própria no compositor */
}
.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(10, 9, 19, 0.88), transparent 40%, transparent 68%, rgba(10, 9, 19, 0.82)),
    linear-gradient(to bottom, transparent 45%, var(--bg));
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 7rem 1.5rem 4rem;
  pointer-events: none; /* deixa o mouse chegar na galáxia */
}
.hero__inner a { pointer-events: auto; }
.hero__title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  margin: 0.4rem 0 1.6rem;
  max-width: 760px;
}
.hero__sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: #B8B4C9; /* um degrau acima do muted: precisa vencer a faixa clara da galáxia */
  max-width: 520px;
  margin-bottom: 2.4rem;
}
/* legibilidade sobre a galáxia */
.hero__title, .hero__sub, .hero__note, .hero .eyebrow {
  text-shadow: 0 1px 22px rgba(10, 9, 19, 0.85), 0 0 4px rgba(10, 9, 19, 0.6);
}
.hero__actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}
.hero__note { color: var(--muted); font-size: 0.92rem; }

/* ---------- Steps (método) — linhas editoriais ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
}
.step {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  transition: border-color 0.3s ease;
}
.step:hover { border-top-color: var(--accent); }
.step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.step h3 { font-size: 1.2rem; margin: 0.7rem 0 0.5rem; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Cards (serviços) — células minimalistas ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.card {
  background: var(--glass-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -28px rgba(var(--accent-rgb), 0.4);
}
.card h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* ---------- IA — três pilares em linhas editoriais ---------- */
.ia__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
}
.ia__item {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  transition: border-color 0.3s ease;
}
.ia__item:hover { border-top-color: var(--accent); }
.ia__item h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.ia__item p { color: var(--muted); font-size: 0.96rem; }
.ia__note {
  margin-top: 3rem;
  padding-left: 1.2rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
}

/* ---------- Projetos (portfólio) ---------- */
.portfolio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.work {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  background: var(--glass-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.work:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -28px rgba(var(--accent-rgb), 0.4);
}
.work__tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.work h3 { font-size: 1.3rem; }
.work p { color: var(--muted); font-size: 0.96rem; }
.work__link {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
}
.work__link::after { content: " ↗"; }

/* ---------- Conceito ---------- */
.section--concept { position: relative; }
.concept__head { max-width: 880px; margin: 0 auto 3.5rem; text-align: center; }
.concept__title {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.22;
}
.concept__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}
.concept__visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--glass-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 100%; /* nunca alargar a página no mobile */
}
.concept__visual canvas { display: block; max-width: 100%; }
.concept__legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}
.concept__body {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}
.concept__manifesto {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: var(--text);
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}

/* ---------- Para quem é ---------- */
.standard {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}
.standard h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.checklist { list-style: none; margin-top: 1.8rem; }
.checklist li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.9rem;
  color: var(--text);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
}
.checklist--panel { margin-top: 0; }
.checklist--panel li { font-size: 1.05rem; margin-bottom: 1.3rem; line-height: 1.5; }
.checklist--panel li:last-child { margin-bottom: 0; }
.standard__panel {
  background: var(--glass-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
}

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta__inner { max-width: 660px; margin: 0 auto; }
.cta .section__lead { margin-left: auto; margin-right: auto; }
.cta h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.cta .btn { margin-top: 2.2rem; margin-bottom: 1.2rem; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
.footer__logo { width: 26px; height: 26px; object-fit: contain; }
.footer__tagline { color: var(--muted); font-style: italic; }
.footer__social {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.footer__social:hover { text-decoration: underline; }
.footer__copy { color: var(--muted); font-size: 0.85rem; margin-top: 0.4rem; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .ia__grid { grid-template-columns: 1fr; gap: 2rem; }
  .portfolio { grid-template-columns: 1fr; }
  .standard { grid-template-columns: 1fr; gap: 2.5rem; }
  .concept__grid { grid-template-columns: 1fr; gap: 2.5rem; justify-items: center; }
  .concept__text { max-width: 560px; }
}
@media (max-width: 680px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .section { padding: 5rem 1.3rem; }
  .hero__inner { padding-top: 6rem; }
  .steps, .cards { grid-template-columns: 1fr; }
  .steps { gap: 2rem; }
}
