/* ============================================================
   NMAZ CORP — Landing page
   Paleta oficial do brand kit:
   Ink #0B0B0D · Graphite #5C6064 · Mist #C9CCCE · Paper #F6F7F7
   Signal Blue #2F5CF6 (acento único)
============================================================ */

:root {
  --ink: #0B0B0D;
  --ink-soft: #121316;
  --graphite: #5C6064;
  --mist: #C9CCCE;
  --paper: #F6F7F7;
  --accent: #2F5CF6;
  --text-dim: #B7BABD;
  --line: rgba(255, 255, 255, 0.08);
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.125rem; letter-spacing: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--graphite);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #244BD6; }
.btn-ghost { border-color: var(--line); color: var(--text-dim); }
.btn-ghost:hover { border-color: var(--mist); color: var(--paper); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.brand .wm { font-size: 0.9rem; font-weight: 500; letter-spacing: 0.18em; white-space: nowrap; }
.brand .wm span { color: var(--graphite); font-weight: 300; }

.site-nav { display: flex; align-items: center; gap: 2rem; font-size: 0.85rem; font-weight: 300; color: var(--text-dim); }
.site-nav a:not(.nav-cta):hover { color: var(--paper); }
.nav-cta { background: var(--accent); color: #fff; font-weight: 500; padding: 0.5rem 1.15rem; border-radius: 999px; transition: background 0.2s ease; }
.nav-cta:hover { background: #244BD6; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
}
.hero-sub {
  max-width: 480px;
  margin-top: 1.6rem;
  font-weight: 300;
  color: var(--text-dim);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }

.hero-mark {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: min(52vw, 560px);
  color: var(--accent);
  opacity: 0.14;
  pointer-events: none;
}

/* ---------- Secções ---------- */
.section { padding: 6.5rem 0; }
.section-alt { background: var(--ink-soft); border-block: 1px solid var(--line); }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.split-body p { color: var(--text-dim); font-weight: 300; }
.split-body p + p { margin-top: 1rem; }

/* ---------- Stats ---------- */
.stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stats strong {
  display: block;
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stats span { font-size: 0.85rem; color: var(--graphite); }

/* ---------- Cards de serviços ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.card {
  padding: 2rem 1.75rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(47, 92, 246, 0.5); }
.card-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(47, 92, 246, 0.12);
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.9rem; font-weight: 300; color: var(--text-dim); }

/* ---------- Diferenciais ---------- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}
.feature { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.feature-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.2em;
}
.feature h3 { margin: 0.75rem 0 0.5rem; }
.feature p { font-size: 0.9rem; font-weight: 300; color: var(--text-dim); }

.quote {
  margin-top: 4.5rem;
  padding: 2.5rem;
  border-left: 3px solid var(--accent);
  background: var(--ink-soft);
  border-radius: 0 16px 16px 0;
}
.quote blockquote {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.quote figcaption { margin-top: 1.25rem; font-size: 0.85rem; color: var(--graphite); }

/* ---------- Badge "em breve" ---------- */
.soon-badge {
  margin-top: 2rem;
  padding: 0.9rem 1.15rem;
  border: 1px dashed rgba(47, 92, 246, 0.45);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-dim);
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}
.soon-badge .mono { color: var(--accent); flex-shrink: 0; }

/* ---------- Contacto ---------- */
.contact-lead { color: var(--text-dim); font-weight: 300; max-width: 380px; }
.contact-info { list-style: none; margin-top: 2.25rem; display: grid; gap: 1rem; }
.contact-info li { display: flex; align-items: baseline; gap: 1rem; font-size: 0.95rem; font-weight: 300; }
.contact-info .mono { min-width: 52px; }
.contact-info a:hover { color: var(--accent); }

.contact-form { display: grid; gap: 1.25rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 0.5rem;
}
.field-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

.field select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235C6064' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.field select:invalid { color: var(--graphite); }
.field select:focus { outline: none; border-color: var(--accent); }
.field select.invalid { border-color: #E5484D; }

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--graphite); }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); }
.field input.invalid,
.field textarea.invalid { border-color: #E5484D; }

.form-status { font-size: 0.85rem; min-height: 1.4em; color: var(--mist); }
.form-status.ok { color: #46C08A; }
.form-status.err { color: #E5484D; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand svg { width: 32px; height: 32px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; font-weight: 300; }
.footer-brand span { color: var(--graphite); font-size: 0.8rem; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: 0.85rem; font-weight: 300; color: var(--text-dim); }
.footer-nav a:hover { color: var(--paper); }

.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-dim);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-social svg { width: 16px; height: 16px; }

.footer-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer-legal p { font-size: 0.75rem; color: var(--graphite); font-family: var(--font-mono); letter-spacing: 0.04em; }

/* ---------- Animações de scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

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

/* ============================================================
   Responsivo — mobile-first: breakpoints alargam o layout
============================================================ */
@media (max-width: 767px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(11, 11, 13, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.25rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav .nav-cta { margin-top: 1rem; text-align: center; border-bottom: 0; }
  .nav-toggle { display: flex; }
  .hero-mark { right: -30%; opacity: 0.08; width: 90vw; }
}

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 6fr; gap: 4rem; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .footer-nav { justify-self: center; flex-direction: column; gap: 0.75rem; }
  .footer-social { justify-self: end; }
}

/* ============================================================
   Assistente IA (widget de chat)
============================================================ */
.chat-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.9rem;
}

.chat-toggle {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(47, 92, 246, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}
.chat-toggle:hover { background: #244BD6; transform: scale(1.05); }
.chat-toggle svg { width: 24px; height: 24px; }
.chat-toggle .icon-close { display: none; }
.chat-toggle[aria-expanded="true"] .icon-open { display: none; }
.chat-toggle[aria-expanded="true"] .icon-close { display: block; }

.chat-panel {
  width: min(360px, calc(100vw - 2.5rem));
  height: min(480px, calc(100dvh - 8rem));
  display: flex;
  flex-direction: column;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.chat-panel[hidden] { display: none; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.chat-header svg { width: 28px; height: 28px; flex-shrink: 0; }
.chat-header strong { display: block; font-size: 0.9rem; font-weight: 500; }
.chat-header .mono { font-size: 0.6rem; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.chat-msg.bot { background: var(--ink); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.typing { color: var(--graphite); font-family: var(--font-mono); font-size: 0.75rem; }

.chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line);
}
.chat-input input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-input .btn { padding: 0.55rem 0.9rem; display: grid; place-items: center; }
.chat-input .btn svg { width: 16px; height: 16px; }
