/* ============================================================
   DadosTech — Design System
   Engineering-grade dark UI. Data → Processos → Automação → Resultado
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&family=Caveat:wght@600;700&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* brand */
  --ink:        #07111A;   /* deepest background */
  --navy:       #0F2F4A;   /* primary corporate blue */
  --blue:       #58A9E0;   /* secondary / data */
  --green:      #00C896;   /* accent / results */
  --text:       #F8FAFC;

  /* derived surfaces (dark) */
  --bg:         #07111A;
  --surface-1:  #0B1722;
  --surface-2:  #0F2030;
  --surface-3:  #14283b;
  --elevated:   #112233;

  /* lines & text */
  --line:       rgba(248, 250, 252, 0.09);
  --line-2:     rgba(248, 250, 252, 0.16);
  --muted:      rgba(248, 250, 252, 0.62);
  --faint:      rgba(248, 250, 252, 0.40);
  --green-soft: rgba(0, 200, 150, 0.14);
  --blue-soft:  rgba(88, 169, 224, 0.14);

  /* type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Manrope', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* metrics */
  --maxw: 1240px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --pad: clamp(20px, 5vw, 40px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--green); color: var(--ink); }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: clamp(64px, 10vw, 128px); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--green);
  display: inline-block;
}
.eyebrow.blue { color: var(--blue); }
.eyebrow.blue::before { background: var(--blue); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
.display {
  font-size: clamp(40px, 6.2vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.h2 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.02; }
.h3 { font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); line-height: 1.55; max-width: 60ch; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .h2 { margin-top: 18px; }
.section-head .lead { margin-top: 18px; }

.grad-text {
  background: linear-gradient(100deg, var(--blue), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 14px 22px; border-radius: 999px;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary {
  background: var(--green); color: #042018; font-weight: 700;
  box-shadow: 0 0 0 0 rgba(0,200,150,0.4);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -10px rgba(0,200,150,0.55); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-2px); }
.btn--sm { padding: 10px 16px; font-size: 14px; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Admin edit widget ---------- */
.admin-edit-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 220;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border: 1px solid rgba(0, 200, 150, .42);
  border-radius: 999px;
  background: rgba(7, 17, 26, .86);
  color: var(--text);
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  font-size: 13.5px;
  font-weight: 700;
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.admin-edit-widget:hover {
  border-color: var(--green);
  background: rgba(15, 32, 48, .94);
  transform: translateY(-2px);
}
.admin-edit-widget svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .admin-edit-widget {
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }
  .admin-edit-widget span { display: none; }
}

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface-1), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-4px); }

/* badge / chip */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  background: rgba(255,255,255,0.02); white-space: nowrap;
}
.chip.green { color: var(--green); border-color: var(--green-soft); background: var(--green-soft); }
.chip.blue { color: var(--blue); border-color: var(--blue-soft); background: var(--blue-soft); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Decorative: grid + glow ---------- */
.grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
  opacity: 0.5;
}
.glow {
  position: absolute; border-radius: 50%; filter: blur(90px);
  pointer-events: none; z-index: 0; opacity: 0.4;
}
.glow.green { background: radial-gradient(circle, var(--green), transparent 70%); }
.glow.blue { background: radial-gradient(circle, var(--blue), transparent 70%); }

/* ---------- Reveal on scroll (opt-in: visible by default) ---------- */
.reveal { opacity: 1; transform: none; }
.anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.anim .reveal.in { opacity: 1; transform: none; }
.anim .reveal[data-d="1"] { transition-delay: .08s; }
.anim .reveal[data-d="2"] { transition-delay: .16s; }
.anim .reveal[data-d="3"] { transition-delay: .24s; }
.anim .reveal[data-d="4"] { transition-delay: .32s; }
.anim .reveal[data-d="5"] { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .anim .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
@media print {
  .anim .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(7, 17, 26, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 32px; height: 74px; }
.nav__logo { display: flex; align-items: center; flex-shrink: 0; }
.nav__links { display: flex; align-items: center; gap: 30px; margin-left: 8px; }
.nav__links a {
  font-size: 15px; font-weight: 500; color: var(--muted);
  transition: color .2s; position: relative; padding: 4px 0;
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--green); transition: width .25s var(--ease);
}
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.lang {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; font-family: var(--font-mono); font-size: 12px;
}
.lang button { padding: 6px 11px; color: var(--faint); transition: color .2s, background .2s; }
.lang button.on { color: var(--ink); background: var(--blue); font-weight: 600; }

.nav__burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; align-items: center; justify-content: center; }
.nav__burger span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; transition: .3s; }
.nav__burger span::before, .nav__burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); transition: .3s; }
.nav__burger span::before { top: -6px; } .nav__burger span::after { top: 6px; }
.nav.open .nav__burger span { background: transparent; }
.nav.open .nav__burger span::before { top: 0; transform: rotate(45deg); }
.nav.open .nav__burger span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Logo wordmark ---------- */
.logo { display: inline-flex; align-items: flex-end; gap: 1px; position: relative; line-height: 1; }
.logo__word {
  font-family: var(--font-display); font-weight: 700; font-size: 25px;
  letter-spacing: 0.01em; color: var(--text); display: inline-flex; align-items: center;
}
.logo__lens { width: 24px; height: 24px; margin: 0 0px; transform: translateY(0); flex-shrink: 0; }
.logo__lens circle.ring { stroke: var(--blue); }
.logo__lens .bit { fill: var(--green); font-family: var(--font-mono); font-size: 8px; font-weight: 600; }
.logo__lens .handle { stroke: var(--text); }
.logo__tech {
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 27px;
  color: var(--blue); margin-left: 4px; transform: translateY(3px) rotate(-3deg);
}
.logo:hover .logo__lens .ring { stroke: var(--green); transition: stroke .3s; }
.logo--lg .logo__word { font-size: 34px; }
.logo--lg .logo__lens { width: 33px; height: 33px; }
.logo--lg .logo__tech { font-size: 37px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface-1); padding-block: 64px 36px; position: relative; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; }
.footer__links { display: flex; flex-direction: column; gap: 12px; }
.footer__links a { font-size: 15px; color: var(--muted); transition: color .2s; }
.footer__links a:hover { color: var(--green); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.footer__bottom p { font-size: 13px; color: var(--faint); font-family: var(--font-mono); }

/* ============================================================
   PIPELINE — signature visual (Dados → Proc → Auto → Resultado)
   ============================================================ */
.pipeline { --flow: 3s; }
.flow-line { stroke-dasharray: 6 8; animation: dash var(--flow) linear infinite; }
@keyframes dash { to { stroke-dashoffset: -140; } }
.flow-dot { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flow-line, .flow-dot { animation: none; } }

/* binary marquee texture */
.binary {
  font-family: var(--font-mono); color: var(--blue);
  opacity: 0.14; font-size: 13px; letter-spacing: 0.3em; user-select: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }

  .nav__mobile {
    position: fixed; inset: 74px 0 auto 0; background: var(--surface-1);
    border-bottom: 1px solid var(--line); padding: 20px var(--pad) 28px;
    display: none; flex-direction: column; gap: 4px; z-index: 99;
  }
  .nav.open .nav__mobile { display: flex; }
  .nav__mobile a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); color: var(--text); }
}
@media (min-width: 921px) { .nav__mobile { display: none; } }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer__top { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .hero__cta { flex-direction: column; width: 100%; }
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.cform { max-width: 620px; margin: 32px auto 0; text-align: left; }
.cform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cfield { display: flex; flex-direction: column; gap: 7px; }
.cfield--full { grid-column: 1 / -1; }
.cfield label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint);
}
.cfield input, .cfield textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--text);
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px; transition: border-color .2s, background .2s; resize: vertical;
}
.cfield input::placeholder, .cfield textarea::placeholder { color: var(--faint); }
.cfield input:focus, .cfield textarea:focus { outline: none; border-color: var(--green); background: var(--surface-2); }
.cfield.has-error input, .cfield.has-error textarea { border-color: #ff6b6b; }
.cfield__err { font-size: 12.5px; color: #ff8a8a; font-family: var(--font-mono); }
.cform__actions { display: flex; justify-content: center; margin-top: 24px; }
.cform__actions .btn { min-width: 240px; }
.cform__note { text-align: center; font-size: 12.5px; color: var(--faint); margin-top: 14px; font-family: var(--font-mono); }
.cform__ok {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1px solid var(--green-soft); background: var(--green-soft); color: var(--text);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 24px; font-size: 15px;
}
.cform__ok svg { width: 22px; height: 22px; color: var(--green); flex-shrink: 0; }
@media (max-width: 560px) {
  .cform__grid { grid-template-columns: 1fr; }
  .cform__actions .btn { width: 100%; min-width: 0; }
}
