/* ============================================================
   Mally — Soluções Empresariais
   Design minimalista e tecnológico
   ============================================================ */

:root {
  --bg: #070a14;
  --bg-soft: #0c1120;
  --bg-alt: #0a0f1d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2fb;
  --muted: #9aa6c0;
  --muted-2: #6c7896;
  --brand: #4f8cff;
  --brand-2: #22d3ee;
  --accent: #25d366; /* whatsapp */
  --grad: linear-gradient(120deg, #4f8cff 0%, #22d3ee 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand__name { font-family: "Sora", sans-serif; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Background canvas ===== */
#bg-network {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* subtle radial glow layered above canvas, below content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% -5%, rgba(79, 140, 255, 0.18), transparent 60%),
    radial-gradient(55% 45% at 5% 10%, rgba(34, 211, 238, 0.12), transparent 60%);
}
main, .nav, .footer { position: relative; z-index: 1; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad);
  color: #04122b;
  box-shadow: 0 10px 30px -10px rgba(79, 140, 255, 0.6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(79, 140, 255, 0.8); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface); transform: translateY(-2px); }
.btn--block { width: 100%; }

.link { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 10, 20, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { display: inline-flex; }
.brand__name { font-weight: 800; font-size: 22px; letter-spacing: -0.5px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--border-strong);
  padding: 9px 18px;
  border-radius: 999px;
}
.nav__cta:hover { background: var(--surface); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero__inner { text-align: center; max-width: 880px; margin: 0 auto; }
.hero__eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-2);
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 22px;
}
.hero__title { font-size: clamp(2.1rem, 5.4vw, 3.9rem); line-height: 1.08; font-weight: 800; letter-spacing: -1px; margin: 0 0 22px; }
.hero__sub { font-size: clamp(1rem, 2vw, 1.18rem); color: var(--muted); max-width: 680px; margin: 0 auto 34px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__stats {
  list-style: none; padding: 0; margin: 60px auto 0; max-width: 760px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.hero__stats li { text-align: center; }
.hero__stats strong { display: block; font-family: "Sora"; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__stats span { font-size: 13px; color: var(--muted-2); }

.hero__scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 24px; height: 38px; border: 2px solid var(--border-strong); border-radius: 14px; }
.hero__scroll span { position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--brand-2); border-radius: 2px; animation: scrolldot 1.8s infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ===== Sections ===== */
.section { padding: clamp(70px, 10vw, 120px) 0; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(10, 15, 29, 0.55) 12%, rgba(10, 15, 29, 0.55) 88%, transparent); }
.section__head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section__kicker { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--brand-2); margin: 0 0 12px; font-weight: 600; }
.section__title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.6px; margin: 0 0 16px; }
.section__lead { color: var(--muted); font-size: 1.06rem; margin: 0; }

/* ===== Grids ===== */
.grid { display: grid; gap: 22px; }
.grid--services { grid-template-columns: repeat(4, 1fr); }
.grid--split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid--gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid--testimonials { grid-template-columns: repeat(2, 1fr); }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background .35s;
}
.card--service .card__media {
  height: 140px;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  position: relative;
}
.card--service .card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, var(--bg-soft));
}
.card__body { padding: 22px 22px 26px; position: relative; }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(79, 140, 255, 0.12);
  border: 1px solid rgba(79, 140, 255, 0.25);
  margin: -46px 0 16px; position: relative;
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--brand-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card--service h3 { margin: 0 0 8px; font-size: 1.18rem; }
.card--service p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card--service:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); background: var(--surface-2); }

/* Diferenciais */
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 20px; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features .dot { flex: none; width: 11px; height: 11px; border-radius: 50%; margin-top: 7px; background: var(--grad); box-shadow: 0 0 0 4px rgba(79,140,255,.15); }
.features strong { display: block; font-size: 1.02rem; }
.features p { margin: 2px 0 0; color: var(--muted); font-size: .94rem; }

.panel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 26px 22px; text-align: left;
  transition: transform .3s var(--ease), border-color .3s;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.stat-card strong { display: block; font-family: "Sora"; font-size: 2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card span { color: var(--muted); font-size: .9rem; }

/* Gallery */
.gallery-item {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border); cursor: pointer;
  background-size: cover; background-position: center;
}
.gallery-item::after {
  content: attr(data-label); position: absolute; inset: 0;
  display: flex; align-items: flex-end; padding: 14px;
  font-size: .82rem; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, transparent 45%, rgba(4,8,18,.85));
  opacity: 0; transition: opacity .3s;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item:hover { transform: scale(1.01); }
.catalog__note { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--muted); margin-top: 28px; font-size: .92rem; }

/* Logos / Testimonials */
.logos { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 0 0 48px; }
.logo-chip {
  font-family: "Sora"; font-weight: 700; letter-spacing: .5px;
  padding: 10px 22px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 1.05rem;
  transition: color .3s, border-color .3s;
}
.logo-chip:hover { color: var(--text); border-color: var(--border-strong); }

.card--quote { padding: 30px; }
.card--quote blockquote { margin: 0 0 22px; font-size: 1.05rem; line-height: 1.6; color: var(--text); }
.card--quote figcaption { display: flex; align-items: center; gap: 14px; }
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-family: "Sora"; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
}
.card--quote figcaption strong { display: block; font-size: .98rem; }
.card--quote figcaption small { color: var(--muted-2); font-size: .85rem; }
.disclaimer { text-align: center; color: var(--muted-2); font-size: .8rem; margin-top: 32px; }

/* Contact */
.section--contact { padding-bottom: clamp(80px, 12vw, 140px); }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 16px; align-items: center; }
.contact-ic { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); }
.contact-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--brand-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list strong { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); }
.contact-list a { font-size: 1.05rem; font-weight: 600; transition: color .2s; }
.contact-list a:hover { color: var(--brand-2); }

.card--form { padding: 30px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,.25); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 15px; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,140,255,.18);
}
.field select { appearance: none; }
.form__hint { margin: 0; font-size: .9rem; min-height: 1.2em; color: var(--brand-2); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; background: var(--bg-soft); }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px 40px; align-items: start; }
.footer__tag { color: var(--muted); margin: 8px 0 0; max-width: 320px; font-size: .95rem; }
.footer__nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.footer__nav a { color: var(--muted); transition: color .2s; }
.footer__nav a:hover { color: var(--text); }
.footer__copy { grid-column: 1 / -1; color: var(--muted-2); font-size: .85rem; border-top: 1px solid var(--border); padding-top: 24px; margin: 12px 0 0; }

/* Floating WhatsApp */
.fab-wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 30px -8px rgba(37,211,102,.7);
  transition: transform .25s var(--ease);
  opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none;
}
.fab-wa.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fab-wa:hover { transform: translateY(-3px) scale(1.05); }
.fab-wa svg { fill: #fff; }

/* ===== Reveal on scroll (só esconde quando há JS ativo) ===== */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .grid--services { grid-template-columns: repeat(2, 1fr); }
  .grid--gallery { grid-template-columns: repeat(3, 1fr); }
  .grid--split { grid-template-columns: 1fr; gap: 36px; }
  .grid--testimonials { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__nav { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .nav__links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7,10,20,.96); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 24px; transform: translateY(-120%);
    transition: transform .35s var(--ease); pointer-events: none;
  }
  .nav__links.is-open { transform: translateY(0); pointer-events: auto; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav__cta { text-align: center; margin-top: 12px; border-bottom: 0 !important; }
  .nav__toggle { display: flex; }
  .grid--services { grid-template-columns: 1fr; }
  .grid--gallery { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 26px 18px; }
  .panel-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
