/* ==========================================================
   STN Systems — estilos do site
   Identidade: opção 1 "Conexão" (azul-marinho + ciano)
   ========================================================== */

:root {
  --navy: #0B1F3A;
  --navy-900: #071528;
  --navy-line: #253C5E;
  --accent: #19B8D6;
  --teal: #127F95;
  --teal-dark: #0E6577;
  --text: #0B1F3A;
  --muted: #4A5B74;
  --muted-on-dark: #C3CFDE;
  --line: #E6EBF2;
  --line-strong: #CDD6E2;
  --bg: #FFFFFF;
  --bg-soft: #F3F6FA;
  --bg-tint: #E6F5F8;
  --radius: 20px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; margin: 0; color: inherit; }
p { margin: 0; }

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.accent-fill { fill: var(--accent); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 28px; border-radius: 999px;
  font: 500 16px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { box-shadow: 0 12px 24px -12px rgba(11, 31, 58, .55); background: #12305A; }
.btn-ghost { color: var(--navy); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--navy); }
.btn-accent { background: var(--accent); color: var(--navy); font-weight: 600; }
.btn-accent:hover { box-shadow: 0 12px 24px -12px rgba(25, 184, 214, .7); }
.btn-sm { min-height: 44px; padding: 10px 20px; font-size: 15px; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s, background-color .3s;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -20px rgba(11, 31, 58, .35); background: rgba(255, 255, 255, .95); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-name { font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.brand-name span { font-weight: 400; color: var(--muted); }
.brand-mark { transition: transform .5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-light { color: #fff; }
.brand-light .brand-name span { color: #B9C6D8; }

.main-nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.main-nav a:not(.btn) {
  position: relative; text-decoration: none; color: #3B4A60; padding: 6px 0;
  transition: color .2s;
}
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.main-nav a:not(.btn):hover, .main-nav a.is-active { color: var(--navy); }
.main-nav a:not(.btn):hover::after, .main-nav a.is-active::after { transform: scaleX(1); }

.menu-toggle {
  display: none; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 14px;
  background: #fff; cursor: pointer; padding: 0; position: relative;
}
.menu-toggle span {
  position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: var(--navy);
  transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 23px; }
.menu-toggle span:nth-child(3) { top: 30px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

/* ---------- Tipografia de seção ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted);
}
.eyebrow-teal { color: var(--teal); }
.eyebrow-accent { color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }

h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -2px; }
h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -1.2px; }
h3 { font-size: 22px; letter-spacing: -.4px; line-height: 1.25; }

.hl { position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .14em; border-radius: 4px;
  background: var(--accent); opacity: .35; z-index: -1;
  transform: scaleX(0); transform-origin: left; transition: transform 1s .5s var(--ease);
}
.is-visible .hl::after, .hl.is-visible::after, .no-js .hl::after { transform: scaleX(1); }
h1.is-visible .hl::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 112px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero-visual { position: relative; }
.hero-svg { width: 100%; height: auto; overflow: visible; }

.svg-title { font: 600 14px var(--font-body); fill: var(--navy); }
.svg-badge { font: 600 11px var(--font-body); fill: var(--teal-dark); }
.svg-label { font: 500 14px var(--font-body); fill: var(--navy); }
.svg-sub { font: 400 12px var(--font-body); fill: #5A6B82; }

.trace { fill: none; stroke: #CFD8E4; stroke-width: 1.5; stroke-linejoin: round; }
.trace-flow {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 14 220; animation: trace 3.2s linear infinite;
}
@keyframes trace { from { stroke-dashoffset: 234; } to { stroke-dashoffset: 0; } }

.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(1.35); } }

.float { animation: float 7s ease-in-out infinite; }
.float-b { animation-delay: -2.3s; }
.float-c { animation-delay: -4.6s; animation-duration: 8s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.code rect { transform-box: fill-box; transform-origin: left center; animation: type 6s var(--ease) infinite; }
.code rect:nth-child(1) { animation-delay: 0s; }
.code rect:nth-child(2) { animation-delay: .15s; }
.code rect:nth-child(3) { animation-delay: .3s; }
.code rect:nth-child(4) { animation-delay: .45s; }
.code rect:nth-child(5) { animation-delay: .6s; }
.code rect:nth-child(6) { animation-delay: .75s; }
.code rect:nth-child(7) { animation-delay: .9s; }
.code rect:nth-child(8) { animation-delay: 1.05s; }
.code rect:nth-child(9) { animation-delay: 1.2s; }
.code rect:nth-child(10) { animation-delay: 1.35s; }
.code rect:nth-child(11) { animation-delay: 1.5s; }
@keyframes type {
  0% { transform: scaleX(0); opacity: 0; }
  10%, 85% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Etapas do fluxo (controladas por JS) */
.flow-progress { stroke: var(--accent); stroke-dasharray: 116; stroke-dashoffset: 116; transition: stroke-dashoffset .8s var(--ease); }
.step .step-ring { fill: #fff; stroke: var(--line-strong); stroke-width: 2; transition: fill .4s, stroke .4s; }
.step .step-check { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .4s .15s; }
.step .step-bar { fill: var(--accent); transform-box: fill-box; transform-origin: left; transform: scaleX(0); }
.step.is-active .step-ring { fill: var(--accent); stroke: var(--accent); }
.step.is-active .step-bar { animation: bar 1.6s var(--ease) forwards; }
.step.is-done .step-ring { fill: var(--navy); stroke: var(--navy); }
.step.is-done .step-check { stroke-dashoffset: 0; }
.step.is-done .step-bar { transform: scaleX(1); }
@keyframes bar { to { transform: scaleX(1); } }

/* Gráfico */
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 190; stroke-dashoffset: 190; }
.chart-area { fill: var(--accent); fill-opacity: 0; transition: fill-opacity 1s .8s; }
.chart-dot { fill: #fff; stroke: var(--accent); stroke-width: 2.5; opacity: 0; transition: opacity .4s 1.4s; }
.hero-visual.is-visible .chart-line { animation: draw 1.6s .4s var(--ease) forwards; }
.hero-visual.is-visible .chart-area { fill-opacity: .14; }
.hero-visual.is-visible .chart-dot { opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Seções ---------- */
.section { padding: 112px 0; }
.section-dark { background: var(--navy); color: #fff; }
.section-dark p, .section-dark dd { color: var(--muted-on-dark); }
.section-tint { background: var(--bg-tint); }
.section-soft { background: var(--bg-soft); }

.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 660px; margin-bottom: 56px; }
.section-head-row { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head-row > div { display: flex; flex-direction: column; gap: 16px; max-width: 620px; }
.section-intro { font-size: 17px; color: var(--muted); max-width: 400px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack > p { font-size: 17px; line-height: 1.7; }

/* Quem somos */
.facts { margin: 0; display: flex; flex-direction: column; }
.fact { display: flex; align-items: baseline; gap: 24px; padding: 28px 0; border-top: 1px solid var(--navy-line); }
.fact:last-child { border-bottom: 1px solid var(--navy-line); }
.fact-value { font-family: var(--font-head); font-size: 44px; font-weight: 500; letter-spacing: -1px; color: #fff; min-width: 140px; font-variant-numeric: tabular-nums; }
.fact-accent { color: var(--accent); }
.fact dd { margin: 0; font-size: 16px; line-height: 1.5; }

/* Como trabalhamos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 32px; counter-reset: none; }
.step-item { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; position: relative; }
.step-item::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: #B7DCE4; }
.step-item::after {
  content: ""; position: absolute; top: 0; left: 0; height: 2px; width: 100%; background: var(--teal);
  transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease);
}
.step-item.is-visible::after { transform: scaleX(1); }
.step-num { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 15px; color: var(--teal); }
.step-item p { font-size: 16px; color: var(--muted); }

/* Serviços */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -28px rgba(11, 31, 58, .35); border-color: #D3DDE9; }
.card p { font-size: 16px; color: var(--muted); }
.card-icon {
  width: 48px; height: 48px; padding: 10px; border-radius: 14px; background: #E8F4F8;
  fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: background-color .35s, stroke .35s, transform .35s var(--ease);
}
.card:hover .card-icon { background: var(--navy); stroke: #fff; transform: rotate(-6deg); }
.card-cta { background: var(--navy); border-color: var(--navy); color: #fff; justify-content: space-between; gap: 24px; }
.card-cta > div { display: flex; flex-direction: column; gap: 12px; }
.card-cta p { color: var(--muted-on-dark); }
.card-cta .btn { align-self: flex-start; }

/* Contato */
.contact-list { font-style: normal; display: flex; flex-direction: column; gap: 14px; padding-top: 12px; font-size: 16px; }
.contact-list a, .contact-list span { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; width: fit-content; }
.contact-list span { color: var(--muted-on-dark); }
.contact-list a:hover { color: var(--accent); }
.contact-list svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.contact-form {
  background: #fff; color: var(--text); border-radius: 24px; padding: 36px;
  display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .5);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; color: #3B4A60; }
.field input, .field textarea {
  font: inherit; font-size: 16px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: #FBFCFD; color: var(--text); width: 100%;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(25, 184, 214, .18); }
.field.has-error input, .field.has-error textarea { border-color: #C2410C; }
.field-error { font-size: 13px; color: #B53A0A; min-height: 0; }
.form-note { font-size: 13px; color: #5A6B82; }
.contact-form .btn { align-self: flex-start; }
.form-status { font-size: 15px; color: var(--teal-dark); }
.section-dark .contact-form .form-note { color: #5A6B82; }
.section-dark .contact-form .field-error { color: #B53A0A; }
.section-dark .contact-form .form-status { color: var(--teal-dark); }

/* Rodapé */
.site-footer { background: var(--navy-900); color: #9FB0C6; font-size: 14px; }
.footer-inner { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }

/* WhatsApp flutuante */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--navy);
  box-shadow: 0 14px 30px -12px rgba(11, 31, 58, .5);
  transform: translateY(120px); opacity: 0;
  transition: transform .45s var(--ease), opacity .3s, background-color .2s;
}
.whatsapp-float.is-shown { transform: translateY(0); opacity: 1; }
.whatsapp-float:hover { background: #fff; }
.whatsapp-float svg { width: 26px; height: 26px; fill: none; stroke: var(--navy); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Animação de entrada (só com JS ativo) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--delay, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.no-js .chart-line { stroke-dashoffset: 0; }
.no-js .chart-area { fill-opacity: .14; }
.no-js .chart-dot { opacity: 1; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { max-width: 620px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 24px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(11, 31, 58, .35);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .3s var(--ease), visibility .25s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a:not(.btn) { padding: 16px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav .btn { margin-top: 18px; }
  .split { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { padding: 56px 0 72px; }
  .section { padding: 80px 0; }
  .lead { font-size: 17px; }
  h1 { letter-spacing: -1.2px; }
  .hl { white-space: normal; }
  .hero-actions .btn { flex: 1 1 100%; }
  .cards, .steps, .form-row { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 40px; }
  .fact { gap: 16px; }
  .fact-value { font-size: 36px; min-width: 110px; }
  .contact-form { padding: 24px; }
  .contact-form .btn { align-self: stretch; }
  .brand-name { font-size: 20px; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .code rect { animation: none; }
  .chart-line { stroke-dashoffset: 0; }
}
