:root{
  --bg: #F6F2EA;
  --bg-alt: #EFE9DE;
  --ink: #17140F;
  --ink-soft: #5B5548;
  --line: rgba(23,20,15,0.12);
  --card: #FBF8F2;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg: #141210;
    --bg-alt: #1B1815;
    --ink: #F6F2EA;
    --ink-soft: #B8B0A0;
    --line: rgba(246,242,234,0.14);
    --card: #1E1B17;
  }
}
:root[data-theme="dark"]{
  --bg: #141210;
  --bg-alt: #1B1815;
  --ink: #F6F2EA;
  --ink-soft: #B8B0A0;
  --line: rgba(246,242,234,0.14);
  --card: #1E1B17;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Inter', -apple-system, sans-serif;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
h1,h2,h3{ font-family:'Sora','Inter',sans-serif; letter-spacing:-0.02em; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
.wrap{ max-width:1240px; margin:0 auto; padding:0 32px; }
@media (max-width:640px){ .wrap{ padding:0 20px; } }

/* ---------- Header ---------- */
header{
  position:sticky; top:0; z-index:50;
  background:var(--bg);
  border-bottom:1px solid var(--line);
}
header .wrap{
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  height:72px; column-gap:24px;
}
.logo-mark{ width:48px; height:48px; flex-shrink:0; object-fit:contain; }
@media (max-width:640px){
  header .wrap{ height:64px; }
  .logo-mark{ width:40px; height:40px; }
}
.brand-mark{ display:flex; align-items:center; gap:12px; justify-self:start; }
.header-right{ display:flex; align-items:center; gap:16px; justify-self:end; }
.brand-text{ display:flex; align-items:baseline; gap:10px; }
.brand-name{ font-family:'Sora',sans-serif; font-weight:700; font-size:19px; color:var(--ink); }
.brand-tagline{ font-size:12px; color:var(--ink-soft); font-weight:400; white-space:nowrap; }
@media (max-width:640px){ .brand-tagline{ display:none; } }

.main-nav{ display:flex; gap:36px; justify-self:center; }
.main-nav a{
  font-size:15px; color:var(--ink-soft); font-weight:500;
  position:relative; padding-bottom:4px;
}
.main-nav a.active{ color:var(--ink); }
.main-nav a.active::after{
  content:''; position:absolute; left:0; bottom:-4px; width:100%; height:1.5px; background:var(--ink);
}

.cta-btn{
  background:var(--ink); color:#fff;
  padding:12px 22px; border-radius:100px; font-size:14px; font-weight:600;
  display:inline-flex; align-items:center; gap:8px; white-space:nowrap;
  transition:transform .25s ease, opacity .25s ease;
  border:none; cursor:pointer;
}
.cta-btn:hover{ transform:translateY(-1px); opacity:.9; }

.menu-toggle{
  display:none; width:36px; height:36px; background:none; border:none; cursor:pointer;
  flex-direction:column; justify-content:center; gap:6px;
}
.menu-toggle span{
  display:block; width:100%; height:1.5px; background:var(--ink); transition:transform .25s ease, opacity .25s ease;
}
.menu-toggle[aria-expanded="true"] span:first-child{ transform:translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child{ transform:translateY(-3.75px) rotate(-45deg); }

.mobile-nav{
  display:none; flex-direction:column; gap:0; border-top:1px solid var(--line);
  max-height:0; overflow:hidden; transition:max-height .3s ease;
}
.mobile-nav.open{ max-height:400px; }
.mobile-nav a{
  padding:16px 20px; border-bottom:1px solid var(--line); font-size:15px; color:var(--ink-soft);
}
.mobile-nav a.cta-btn{
  margin:16px 20px; text-align:center; justify-content:center; border-bottom:none;
  color:#fff;
}

@media (max-width:860px){
  .main-nav, .desktop-only{ display:none; }
  .menu-toggle{ display:flex; }
  .mobile-nav{ display:flex; }

  header .wrap{
    display:flex; align-items:center; justify-content:space-between; height:64px;
  }
  .header-right{ order:0; }
  .brand-mark{ flex:none; }
}

/* ---------- Hero video ---------- */
.hero-video{
  width:100%; line-height:0; overflow:hidden;
  height:calc(100vh - 72px); min-height:360px; max-height:100vh;
}
.hero-video video{ width:100%; height:100%; object-fit:cover; display:block; }

/* No celular o vídeo é exibido inteiro (sem cortar em nenhuma direção),
   colado no header e ocupando só a altura da sua proporção real. */
@media (max-width:860px){
  .hero-video{
    height:auto; aspect-ratio:16/9; max-height:none; min-height:0;
    background:var(--bg);
  }
  .hero-video video{ height:100%; object-fit:contain; }
}

/* ---------- Solutions ---------- */
.solutions{
  padding:96px 0;
  background: rgba(251, 248, 242, 0.45);
  background: color-mix(in srgb, var(--card) 45%, transparent);
}
@media (max-width:860px){ .solutions{ padding:40px 0 72px; } }
.solutions-head{ display:grid; grid-template-columns:1fr 1fr; gap:48px; margin-bottom:64px; }
@media (max-width:860px){ .solutions-head{ grid-template-columns:1fr; gap:20px; } }
.solutions-head h2{ font-size:clamp(28px, 3.4vw, 40px); font-weight:600; line-height:1.15; }
.solutions-head p{ color:var(--ink-soft); font-size:16px; max-width:42ch; align-self:end; }

.sol-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:1px;
  background:var(--line); border:1px solid var(--line); border-radius:20px; overflow:hidden;
}
@media (max-width:760px){ .sol-grid{ grid-template-columns:1fr; } }
.sol-card{ background:var(--card); padding:44px 36px; }
.sol-label{ font-size:13px; color:var(--ink-soft); margin-bottom:28px; display:block; }
.sol-card h3{ font-size:20px; font-weight:600; margin-bottom:10px; }
.sol-card p{ color:var(--ink-soft); font-size:15px; max-width:28ch; }

/* ---------- About ---------- */
.about{
  padding:96px 0;
  background: rgba(251, 248, 242, 0.45);
  background: color-mix(in srgb, var(--card) 45%, transparent);
}
.about-inner{ display:grid; grid-template-columns:0.85fr 1.15fr; gap:64px; align-items:start; }
@media (max-width:860px){ .about-inner{ grid-template-columns:1fr; gap:28px; } }
.about h2{ font-size:clamp(26px,3vw,36px); font-weight:600; line-height:1.2; max-width:14ch; }
.page-banner-grid{ display:grid; grid-template-columns:1.1fr 0.9fr; gap:48px; align-items:center; }
.banner-video{
  border-radius:20px; overflow:hidden; border:1px solid var(--line);
  box-shadow:0 20px 40px rgba(0,0,0,0.12); aspect-ratio:16/9; background:var(--card);
}
.banner-video video{ width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }
@media (max-width:900px){ .page-banner-grid{ grid-template-columns:1fr; } }
.about-body p{ font-size:16px; color:var(--ink-soft); margin-bottom:18px; max-width:56ch; }
.about-stats{ display:grid; grid-template-columns:repeat(3,auto); gap:40px; margin-top:36px; }
@media (max-width:520px){ .about-stats{ grid-template-columns:1fr 1fr; } }
.stat b{ display:block; font-family:'Sora',sans-serif; font-size:28px; font-weight:600; }
.stat span{ font-size:13px; color:var(--ink-soft); }

/* ---------- Contact ---------- */
.contact{ border-top:1px solid var(--line); padding:110px 0 100px; }
.contact-inner{ display:grid; grid-template-columns:1.2fr 0.8fr; gap:48px; align-items:end; }
@media (max-width:860px){ .contact-inner{ grid-template-columns:1fr; } }
.contact h2{ font-size:clamp(30px,4vw,46px); font-weight:600; line-height:1.12; max-width:14ch; }
.contact-right{ display:flex; flex-direction:column; gap:18px; align-items:flex-start; }
@media (max-width:860px){ .contact-right{ align-items:stretch; } .contact-right .cta-btn{ justify-content:center; } }
.contact-right a.email{ font-size:16px; color:var(--ink-soft); border-bottom:1px solid var(--line); padding-bottom:2px; }

/* ---------- Footer ---------- */
footer{ padding:28px 0; }
footer .wrap{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
footer span{ font-size:13px; color:var(--ink-soft); }

/* ---------- Page banner (Serviços / Portfólio / Sobre / Contato) ---------- */
.page-banner{ padding:72px 0 56px; }
.page-banner .eyebrow{
  font-size:13px; color:var(--ink-soft); font-weight:500; letter-spacing:0.03em; margin-bottom:16px;
}
.page-banner h1{ font-size:clamp(32px, 4.4vw, 52px); font-weight:600; line-height:1.1; max-width:16ch; }
.page-banner p{ color:var(--ink-soft); font-size:16px; max-width:52ch; margin-top:18px; }

/* ---------- Solutions preview CTA (home) ---------- */
.solutions-cta{ margin-top:40px; display:flex; justify-content:center; }
@media (min-width:761px){ .solutions-cta{ justify-content:flex-start; } }

/* ---------- Portfolio placeholders ---------- */
.portfolio-grid{
  padding:96px 0; display:grid; grid-template-columns:repeat(3,1fr); gap:24px;
}
@media (max-width:860px){ .portfolio-grid{ grid-template-columns:1fr 1fr; padding:56px 0 72px; gap:16px; } }
@media (max-width:560px){ .portfolio-grid{ grid-template-columns:1fr; } }
.portfolio-card{
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  aspect-ratio:4/3; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; color:var(--ink-soft);
}
.portfolio-card .ph-icon{ width:36px; height:36px; opacity:0.35; }
.portfolio-card span{ font-size:13px; font-weight:500; letter-spacing:0.02em; }

/* ---------- Closing CTA band ---------- */
.closing-cta{
  padding:100px 0; text-align:center;
  background: rgba(251, 248, 242, 0.45);
  background: color-mix(in srgb, var(--card) 45%, transparent);
}
.closing-cta h2{ font-size:clamp(28px,4vw,44px); font-weight:600; max-width:20ch; margin:0 auto 30px; line-height:1.15; }

/* ---------- Budget modal ---------- */
.modal-overlay{
  position:fixed; inset:0; z-index:200;
  background:rgba(20,17,13,0.55);
  display:flex; align-items:center; justify-content:center; padding:24px;
  opacity:0; visibility:hidden; transition:opacity .25s ease;
}
.modal-overlay.open{ opacity:1; visibility:visible; }
.modal{
  position:relative; width:100%; max-width:480px; max-height:88vh; overflow-y:auto;
  background:var(--card); border-radius:20px; padding:40px 32px 32px;
  box-shadow:0 30px 70px rgba(0,0,0,0.3);
  transform:translateY(10px); transition:transform .25s ease;
}
.modal-overlay.open .modal{ transform:translateY(0); }
.modal-watermark{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:82%; max-width:340px; height:auto;
  opacity:0.08; pointer-events:none; z-index:0;
}
.modal-inner{ position:relative; z-index:1; }
.modal-close{
  position:absolute; top:16px; right:16px; width:32px; height:32px; z-index:2;
  background:none; border:none; cursor:pointer; font-size:22px; line-height:1; color:var(--ink-soft);
}
.modal h3{ font-size:24px; font-weight:600; margin-bottom:6px; }
.modal-sub{ color:var(--ink-soft); font-size:14px; margin-bottom:26px; }
.modal-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:16px; font-size:13px; color:var(--ink-soft); }
.modal-field input, .modal-field select, .modal-field textarea{
  font-family:'Inter',sans-serif; font-size:15px; color:var(--ink);
  background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:12px 14px;
  outline:none;
}
.modal-field textarea{ resize:vertical; min-height:88px; }
.modal-field select{ appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235B5548'%3E%3Cpath d='M5.5 7.5l4.5 5 4.5-5z'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; }
.bot-field{ position:absolute; left:-9999px; top:-9999px; }
.modal-submit{ width:100%; justify-content:center; margin-top:6px; }
.modal-status{ font-size:13px; margin-top:14px; text-align:center; min-height:18px; }
.modal-status.success{ color:#3E7A4C; }
.modal-status.error{ color:#B0453B; }
@media (max-width:520px){
  .modal{ padding:32px 22px 26px; border-radius:16px; }
  .modal-watermark{ width:76%; max-width:220px; }
}

/* ---------- Motion / accessibility ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .hero, .mobile-nav{ transition:none; }
}
a:focus-visible, button:focus-visible{
  outline:2px solid var(--ink); outline-offset:3px;
}
/* ---------- Fundo animado de rede ---------- */
#network-bg { position: fixed; inset: 0; z-index: -1; display: block; }

/* ---------- Banner da página Serviços ---------- */
.services-banner { padding: 72px 0 64px; }
.services-banner-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.services-banner .eyebrow { font-size: 13px; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.03em; margin-bottom: 16px; }
.services-banner h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 600; line-height: 1.15; max-width: 17ch; margin-bottom: 18px; }
.services-banner .lede { color: var(--ink-soft); font-size: 16px; max-width: 48ch; margin-bottom: 30px; }
.trust-badges { display: flex; gap: 26px; flex-wrap: wrap; }
.trust-badges span { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.trust-badges svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink); }
.banner-photo {
  aspect-ratio: 4 / 3; border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--bg-alt), var(--card));
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
}
.banner-photo svg { width: 68px; height: 68px; opacity: 0.4; }
@media (max-width: 900px) {
  .services-banner-grid { grid-template-columns: 1fr; }
  .banner-photo { order: -1; aspect-ratio: 16 / 9; }
}

/* ---------- Cards de serviço (página Serviços) ---------- */
.services-grid { padding: 72px 0 96px; }
.service-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 36px 32px; display: flex; flex-direction: column; gap: 14px;
}
.service-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 19px; font-weight: 600; }
.service-card p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; flex-grow: 1; }
.service-link {
  align-self: flex-start; background: none; border: none; padding: 0; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Inter', sans-serif;
}
.service-link:hover { text-decoration: underline; }
@media (max-width: 960px) { .service-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .service-cards { grid-template-columns: 1fr; } }

/* ---------- Tecnologias principais ---------- */
.tech-section {
  padding: 96px 0;
  background: rgba(251, 248, 242, 0.45);
  background: color-mix(in srgb, var(--card) 45%, transparent);
}
.tech-section .eyebrow { font-size: 13px; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.03em; }
.tech-section h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; max-width: 18ch; margin: 14px 0 16px; line-height: 1.2; }
.tech-section .lede { color: var(--ink-soft); font-size: 16px; max-width: 52ch; margin-bottom: 44px; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 16px; }
.tech-badge { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 12px; }
.tech-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; }
.tech-mark svg { width: 26px; height: 26px; }
.tech-badge span:last-child { font-size: 12px; color: var(--ink-soft); font-weight: 500; }

/* ---------- Nosso processo ---------- */
.process-section {
  padding: 96px 0;
  background: rgba(251, 248, 242, 0.45);
  background: color-mix(in srgb, var(--card) 45%, transparent);
}
.process-section .eyebrow { font-size: 13px; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.03em; }
.process-section h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; max-width: 22ch; margin: 14px 0 48px; line-height: 1.2; }
.process-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; position: relative; }

.process-step { position: relative; z-index: 1; cursor: default; display: flex; flex-direction: column; align-items: center; text-align: center; }
.step-num { animation: step-pop 9s ease-in-out infinite; }
.process-step:nth-child(1) .step-num { animation-delay: 0s; }
.process-step:nth-child(2) .step-num { animation-delay: 1.5s; }
.process-step:nth-child(3) .step-num { animation-delay: 3s; }
.process-step:nth-child(4) .step-num { animation-delay: 4.5s; }
.process-step:nth-child(5) .step-num { animation-delay: 6s; }
.process-step:nth-child(6) .step-num { animation-delay: 7.5s; }
@keyframes step-pop {
  0%, 100% { transform: translateY(0); }
  3% { transform: translateY(-5px); }
  6% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .step-num { animation: none; } }
.step-num {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--card); border: 1.5px solid var(--ink);
  font-size: 12px; font-weight: 700; margin-bottom: 16px; position: relative;
  transition: transform .35s ease, background .35s ease, color .35s ease, box-shadow .35s ease;
}
.step-num::before, .step-num::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid var(--ink); opacity: 0; transform: scale(.6);
  transition: opacity .5s ease, transform .5s ease;
}
.step-num::after { inset: -12px; transition-delay: .1s; }
.process-step:hover .step-num {
  transform: scale(1.15);
  background: var(--ink); color: var(--bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 12%, transparent), 0 0 20px color-mix(in srgb, var(--ink) 45%, transparent);
}
.process-step:hover .step-num::before { opacity: .6; transform: scale(1.35); }
.process-step:hover .step-num::after { opacity: .3; transform: scale(1.7); }
.process-step h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; transition: letter-spacing .35s ease, color .35s ease; }
.process-step:hover h4 { letter-spacing: .02em; }
.process-step p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 900px) { .process-track { grid-template-columns: repeat(3, 1fr); row-gap: 40px; } }
@media (max-width: 520px) { .process-track { grid-template-columns: 1fr 1fr; } }

/* ---------- CTA em faixa (Serviços) ---------- */
.cta-banner { padding: 0 0 96px; }
.cta-banner-inner {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 48px;
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 32px; align-items: center;
}
.cta-banner .eyebrow { font-size: 13px; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.03em; margin-bottom: 8px; }
.cta-banner h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1.25; }
.cta-banner-text { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 860px) { .cta-banner-inner { grid-template-columns: 1fr; padding: 36px 28px; } }