/* ============================================================
   Viavero — Site CSS (unificado)
   Baseado no Protótipo 3 com ajustes do documento Word
   ============================================================ */

:root {
  --bg: #101829;
  --bg2: #0b1120;
  --panel: #16203a;
  --panel2: #121b31;
  --white: #fff;
  --cyan: #56ACD4;
  --cyan-d: #2E7FA6;
  --ink: #0a1424;
  --muted: #b2bccd;
  --muted2: #8592a8;
  --line: rgba(255,255,255,.07);
  --nav-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
section { scroll-margin-top: var(--nav-h); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; width: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Logo ---- */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-mark { width: 30px; height: 34px; display: block; }
.logo-wordmark { font-weight: 500; font-size: 1.35rem; letter-spacing: .5px; }

/* ---- NAV ---- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: height .3s, background .3s, border-color .3s, backdrop-filter .3s;
}
header.scrolled {
  height: 64px;
  background: rgba(13,20,36,.8);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border-bottom: 1px solid var(--line);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: .95rem; color: var(--muted); position: relative;
  padding: 6px 0; transition: color .25s;
}
.nav-links a:not(.cta-btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 2px; background: var(--cyan); transition: right .3s;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after { right: 0; }

.cta-btn {
  background: var(--cyan); color: var(--ink); padding: 18px 40px;
  border-radius: 30px; font-weight: 600; font-size: .95rem;
  transition: transform .25s, background .25s, box-shadow .25s;
  box-shadow: 0 6px 18px rgba(86,172,212,.16);
  white-space: nowrap; line-height: 1.2;
}
.cta-btn:hover { transform: translateY(-2px); background: #6fbcda; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.burger span { width: 24px; height: 2px; background: #fff; display: block; }

/* ---- Buttons ---- */
.btn-solid {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cyan); color: var(--ink); padding: 14px 28px;
  border-radius: 30px; font-weight: 600;
  transition: transform .25s, background .25s;
  box-shadow: 0 8px 22px rgba(86,172,212,.2);
}
.btn-solid:hover { transform: translateY(-2px); background: #6fbcda; }
.btn-ghost {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(255,255,255,.18); padding: 13px 26px;
  border-radius: 30px; font-weight: 500; color: #fff;
  transition: border-color .25s, background .25s;
}
.btn-ghost:hover { border-color: var(--cyan); background: rgba(86,172,212,.07); }

/* ---- HERO ---- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding-top: var(--nav-h); overflow: hidden; background: var(--bg);
}
.hero-mark {
  position: absolute; right: -3%; top: 50%; transform: translateY(-50%);
  height: 118%; z-index: 0; pointer-events: none;
}
.hero-mark svg { height: 100%; display: block; }
#vg { transform-box: fill-box; transform-origin: center; opacity: 0; }
.hero-copy { position: relative; z-index: 2; max-width: 760px; opacity: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: rgba(86,172,212,.05);
  color: var(--cyan); padding: 8px 18px; border-radius: 30px;
  font-size: .85rem; font-weight: 500; margin-bottom: 28px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
h1 { font-size: clamp(2.6rem,6.2vw,5rem); font-weight: 600; line-height: 1.06; letter-spacing: -1.5px; margin-bottom: 24px; }
h1 .accent { color: var(--cyan); }
.lead { font-size: clamp(1.05rem,2vw,1.28rem); color: var(--muted); max-width: 600px; margin: 0 0 38px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- PINNED WRAPPERS (Método) ---- */
.pinwrap { position: relative; height: 220vh; }
.pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; background: var(--bg2); }
.flat { height: auto; }
.flat .pin { position: relative; }

/* ---- Section Shell ---- */
.sec { padding: 118px 0; }
.sec-head { max-width: 700px; margin: 0 auto 60px; text-align: center; }
.sec-tag { color: var(--cyan); font-weight: 600; font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; display: block; margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(2rem,4vw,2.9rem); font-weight: 600; letter-spacing: -1px; line-height: 1.12; }
.sec-head p { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }

/* ---- SOBRE (About) ---- */
#sobre { background: var(--bg2); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-text .sec-tag { margin-bottom: 14px; }
.about-text h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 600; letter-spacing: -0.5px; line-height: 1.15; margin-bottom: 1.5rem; }
.about-text h2 .accent { color: var(--cyan); }
.about-text p { font-size: 1rem; color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
.about-stats { display: flex; gap: 2rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; }
.stat-number { font-size: 1.5rem; font-weight: 700; color: var(--cyan); }
.stat-label { font-size: .75rem; color: var(--muted2); margin-top: .15rem; }
.about-image { position: relative; border-radius: 16px; overflow: hidden; }
.about-image img { width: 100%; height: 450px; object-fit: cover; border-radius: 16px; }
.about-image-badge {
  position: absolute; bottom: 1.5rem; left: 1.5rem;
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; background: rgba(22,32,58,.95);
  backdrop-filter: blur(8px); border-radius: 100px;
  font-size: .8rem; font-weight: 600; color: var(--white);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.about-image-badge svg { color: var(--cyan); }

/* ---- MÉTODO Diagram ---- */
#diag { width: 100%; max-width: 1000px; margin: 8px auto 0; display: block; overflow: visible; }
#diag text { font-family: 'Poppins', sans-serif; }
.node { transform-box: fill-box; transform-origin: center; }
.diag-cap { color: var(--muted); text-align: center; margin-top: 26px; font-size: 1.05rem; }
.diag-cap b { color: #fff; font-weight: 600; }

/* ---- SERVIÇOS (Cards) ---- */
#servicos { background: var(--bg); }
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.card {
  grid-column: span 2; background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 34px 30px; position: relative;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), border-color .35s, box-shadow .35s;
}
.card:nth-child(4) { grid-column: 2/4; }
.card:nth-child(5) { grid-column: 4/6; }
.card:hover { transform: translateY(-8px); border-color: rgba(86,172,212,.5); box-shadow: 0 20px 46px rgba(0,0,0,.4); }
.card .ic {
  width: 56px; height: 56px; border-radius: 14px; background: rgba(86,172,212,.1);
  display: flex; align-items: center; justify-content: center; margin-bottom: 22px;
  transition: transform .35s;
}
.card:hover .ic { transform: translateY(-3px) scale(1.05); }
.card .ic svg { width: 28px; height: 28px; stroke: var(--cyan); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.28rem; font-weight: 600; margin-bottom: 10px; }
.card .one { color: var(--muted); font-size: .98rem; }
.card .more-btn {
  margin-top: 18px; background: none; border: none; color: var(--cyan);
  font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; padding: 0;
}
.card .more-btn .chev { transition: transform .3s; }
.card.open .more-btn .chev { transform: rotate(180deg); }
.card .detail { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .45s, margin-top .45s, opacity .4s; }
.card.open .detail { max-height: 280px; margin-top: 16px; opacity: 1; }
.card .detail p { color: var(--muted2); font-size: .94rem; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---- TECNOLOGIA ---- */
#tecnologia { background: var(--bg2); }
.tech-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.tech-grid h2 { font-size: clamp(2rem,4vw,2.9rem); font-weight: 600; letter-spacing: -1px; line-height: 1.12; }
.tech-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.tech-pill {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  transition: border-color .3s, transform .3s, background .3s;
}
.tech-pill:hover {
  border-color: rgba(86,172,212,.4); transform: translateY(-2px);
  background: rgba(86,172,212,.06);
}
.tech-pill svg { color: var(--cyan); flex-shrink: 0; stroke: var(--cyan); }
.tech-pill span { font-size: .92rem; font-weight: 500; color: var(--white); }
.tech-visual {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 24px;
  background: var(--panel); display: flex; align-items: center; justify-content: center;
}
.tech-visual svg { width: 42%; height: 42%; }

/* ---- CONTATO ---- */
#contato { background: var(--bg); }
.contact-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 26px;
  padding: 64px 40px; text-align: center;
}
.contact-box h2 { font-size: clamp(1.9rem,3.6vw,2.7rem); font-weight: 600; letter-spacing: -.5px; }
.contact-box p { color: var(--muted); margin: 16px auto 32px; max-width: 480px; }
.contact-info {
  display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  margin-top: 28px; color: var(--muted2); font-size: .95rem;
}
.contact-info span { color: var(--cyan); font-weight: 600; margin-right: 6px; }
.contact-links {
  display: flex; gap: 1.25rem; justify-content: center; margin-top: 2rem;
}
.contact-links a {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted);
  transition: all .3s;
}
.contact-links a:hover {
  border-color: var(--cyan); color: var(--cyan);
  transform: translateY(-3px); box-shadow: 0 4px 15px rgba(86,172,212,.2);
}

/* ---- FOOTER ---- */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted2); font-size: .88rem; background: var(--bg2); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer .logo { gap: 8px; }
footer .logo svg { width: 24px; height: 27px; }
.footer-wm { font-weight: 500; font-size: 1rem; }
.footer-copy { color: var(--muted2); }

/* ---- WhatsApp Floating ---- */
.wa {
  position: fixed; bottom: 26px; right: 26px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37,211,102,.38);
  transition: transform .3s; animation: pop .5s ease .8s both;
}
.wa:hover { transform: scale(1.08); }
.wa svg { width: 32px; height: 32px; fill: #fff; }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---- Reveal animations ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }

/* ---- Método Mobile (vertical) ---- */
.diag-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0 20px;
  max-width: 320px;
  margin: 0 auto;
}
.diag-step {
  display: flex; align-items: flex-start; gap: 20px; position: relative;
  padding-bottom: 36px;
}
.diag-step:last-child { padding-bottom: 0; }
.diag-step::before {
  content: ''; position: absolute; left: 22px; top: 46px;
  width: 2px; height: calc(100% - 46px); background: var(--cyan); opacity: .3;
}
.diag-step:last-child::before { display: none; }
.diag-step-num {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: var(--cyan);
  background: var(--panel); border: 2px solid var(--cyan);
}
.diag-step:last-child .diag-step-num {
  background: var(--cyan); color: var(--ink);
}
.diag-step-text h4 {
  font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 4px;
}
.diag-step-text p {
  font-size: .9rem; color: var(--muted2); line-height: 1.4;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  .burger { display: flex; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(80%, 320px);
    background: rgba(11,17,32,.97); backdrop-filter: blur(18px);
    flex-direction: column; justify-content: center; gap: 24px;
    transform: translateX(100%); transition: transform .35s; padding: 40px;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.12rem; }

  .hero { min-height: auto; padding: 120px 28px 80px; }
  .hero-mark { opacity: .06 !important; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image img { height: 300px; }

  .pinwrap { height: auto; }
  .pin { position: relative; height: auto; min-height: auto; padding: 80px 0; }

  /* Método responsivo: diagrama vertical */
  #diag { display: none; }
  .diag-mobile { display: flex !important; }
  .diag-cap { font-size: .95rem; margin-top: 32px; }

  .cards { grid-template-columns: 1fr; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: 1 / -1; }

  .tech-grid { grid-template-columns: 1fr; gap: 32px; }
  .tech-pills { grid-template-columns: 1fr; }

  .sec { padding: 84px 0; }

  .contact-box { padding: 48px 24px; }

  footer .wrap { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  .about-image img { height: 220px; }
  .about-stats { flex-direction: column; gap: 1rem; }
  .contact-info { flex-direction: column; gap: 12px; }
}

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