/* UNICONNECT — site institucional. Motivo gráfico único: o traço de conexão (accent teal). */
:root {
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #ECE9E2;
  --text: #1B1F2A;
  --muted: #5B6270;
  --primary: #22304A;
  --primary-ink: #16213A;
  --accent: #0B6E7A;
  --accent-ink: #085763;
  --accent-soft: #DDEDEF;
  --line: rgba(27, 31, 42, .12);
  --line-strong: rgba(27, 31, 42, .28);
  --error: #A3301A;
  --success: #1F6B3A;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --max: 1160px;
  --r-sm: 4px; --r: 8px; --r-lg: 12px;
  --shadow-1: 0 1px 2px rgba(27, 31, 42, .06);
  --shadow-2: 0 8px 24px rgba(27, 31, 42, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { color: var(--primary); margin: 0 0 var(--s-4); }
h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; max-width: 18ch; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; max-width: 24ch; }
h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0 0 var(--s-4); max-width: 62ch; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .02em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: var(--r);
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* Kicker (traço + rótulo) */
.kicker {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); line-height: 1; margin-bottom: var(--s-4);
}
.kicker::before { content: ""; width: 24px; height: 2px; background: var(--accent); flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: var(--s-5); height: 72px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 6px; color: var(--primary);
  font-weight: 800; letter-spacing: -.02em; font-size: 1.25rem; text-decoration: none;
}
.wordmark:hover { color: var(--primary); }
.wordmark .bar { width: 24px; height: 2px; background: var(--accent); transition: width .25s var(--ease); }
.wordmark:hover .bar, .wordmark:focus-visible .bar { width: 32px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--primary); text-decoration: none; font-weight: 550; font-size: .95rem; }
.site-nav a:hover { color: var(--accent); }
.header-cta { margin-left: var(--s-2); }
.menu-button { display: none; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 12px 20px; border-radius: var(--r);
  font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.button svg { width: 18px; height: 18px; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-ink); color: #fff; }
.button.secondary { border-color: var(--primary); color: var(--primary); background: transparent; }
.button.secondary:hover { background: var(--accent-soft); color: var(--primary); }
.button.ghost { background: transparent; color: var(--accent-ink); padding-inline: var(--s-2); min-height: auto; }
.button.ghost:hover { color: var(--accent); }
.button[disabled] { opacity: .55; cursor: not-allowed; }

/* Sections */
main { display: block; }
.section { padding-block: var(--s-9); }
.section.alt { background: var(--surface-2); }
.section > .container > .kicker { margin-bottom: var(--s-4); }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 58ch; }
.section-intro { max-width: 62ch; color: var(--muted); }

/* Hero */
.hero { padding-block: clamp(var(--s-8), 10vw, var(--s-9)); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-8); align-items: center; }
.hero h1 { margin-bottom: var(--s-5); }
.hero .lede { margin-bottom: var(--s-6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero-visual { max-width: 520px; margin-inline: auto; width: 100%; }
.hero-visual svg { width: 100%; height: auto; display: block; }

/* Fatos */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 0; background: var(--surface); }
.facts > div { padding: var(--s-5); border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; }
.facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: var(--s-2); }
.facts dd { margin: 0; font-weight: 600; color: var(--text); }

/* Grid of cards (solucoes) */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); margin-top: var(--s-7); }
.solution-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3);
  box-shadow: var(--shadow-1); overflow: hidden; transition: box-shadow .2s var(--ease);
}
.solution-card::before {
  content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 32px;
  background: var(--accent); transition: width .25s var(--ease);
}
.solution-card:hover, .solution-card:focus-within { box-shadow: var(--shadow-2); }
.solution-card:hover::before, .solution-card:focus-within::before { width: 100%; }
.solution-card p { color: var(--muted); margin: 0; }
.solution-card .card-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--s-4); padding-top: var(--s-2); }
.solution-card .card-links a { font-size: .9rem; font-weight: 600; text-decoration: none; }

/* Exemplos */
.examples { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--s-6); }
.examples li { position: relative; padding-left: var(--s-4); color: var(--text); max-width: 52ch; }
.examples li::before { content: ""; position: absolute; left: 0; top: .35em; width: 2px; height: 1.2em; background: var(--accent); }

/* Trilho de etapas */
.steps { list-style: none; margin: var(--s-7) 0 0; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.steps li { position: relative; padding: 0 0 var(--s-6) var(--s-6); }
.steps li:last-child { padding-bottom: 0; }
.steps .node { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); transition: background .3s var(--ease), border-color .3s var(--ease); }
.steps li.is-visible .node { background: var(--accent); border-color: var(--accent); }
.steps .step-num { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.steps h3 { margin: var(--s-1) 0 var(--s-2); }
.steps p { color: var(--muted); margin: 0; }

/* Empresa */
.company-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-7); align-items: start; margin-top: var(--s-5); }
.ficha { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-1); }
.ficha > div { display: grid; grid-template-columns: 140px 1fr; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.ficha > div:last-child { border-bottom: 0; }
.ficha dt { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ficha dd { margin: 0; font-weight: 550; }
.ficha .code { font-family: var(--font-mono); font-size: .85rem; font-variant-numeric: tabular-nums; }

/* Alerta / transparência */
.notice { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--r-lg); padding: var(--s-5) var(--s-6); }
.notice h2 { margin-top: 0; }
.notice p { margin-bottom: var(--s-3); }

/* FAQ */
.faq { margin-top: var(--s-6); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0; font-size: 1.0625rem; font-weight: 600; color: var(--primary); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chevron { flex: none; transition: transform .2s var(--ease); }
.faq details[open] summary .chevron { transform: rotate(180deg); }
.faq details > p { color: var(--muted); padding: 0 0 var(--s-4); margin: 0; }
.faq-cta { margin-top: var(--s-6); }

/* Depois do contato */
.aftersteps { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-5); margin: var(--s-6) 0 0; padding: 0; counter-reset: af; }
.aftersteps li { flex: 1 1 200px; padding-left: var(--s-6); position: relative; color: var(--muted); }
.aftersteps li::before { counter-increment: af; content: "0" counter(af); position: absolute; left: 0; top: 0; font-family: var(--font-mono); color: var(--accent-ink); font-weight: 600; }
.aftersteps strong { display: block; color: var(--text); }

.cta-block { margin-top: var(--s-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.email-text { font-family: var(--font-mono); font-size: .95rem; color: var(--primary); user-select: all; }

/* Footer */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding-block: var(--s-8) var(--s-6); margin-top: var(--s-9); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.footer-cols h2 { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-4); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer-cols a { color: var(--primary); text-decoration: none; font-size: .95rem; }
.footer-cols a:hover { color: var(--accent); }
.footer-cols p { color: var(--muted); font-size: .9rem; }
.footer-legal { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); display: grid; gap: var(--s-2); }
.footer-legal .legal-line { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .02em; color: var(--text); }
.footer-legal small { color: var(--muted); font-size: .8rem; }

/* Página /servicos/ */
.svc-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--s-8); align-items: start; }
.svc-index { position: sticky; top: 88px; }
.svc-index ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.svc-index a { display: block; padding: 8px 0 8px var(--s-4); color: var(--muted); text-decoration: none; font-size: .9rem; border-left: 2px solid var(--line); }
.svc-index a:hover, .svc-index a[aria-current="true"] { color: var(--accent-ink); border-left-color: var(--accent); }
.svc-block { padding-block: var(--s-6); border-top: 1px solid var(--line); }
.svc-block:first-child { border-top: 0; padding-top: 0; }
.svc-block h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.deliverables { list-style: none; margin: var(--s-4) 0; padding: 0; display: grid; gap: var(--s-2); }
.deliverables li { position: relative; padding-left: var(--s-6); color: var(--text); }
.deliverables li svg { position: absolute; left: 0; top: .2em; color: var(--accent); }
.forwhom { color: var(--muted); font-style: normal; }
.table-wrap { overflow-x: auto; margin: var(--s-5) 0; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; min-width: 640px; background: var(--surface); }
caption { text-align: left; padding: var(--s-3) var(--s-4); color: var(--muted); font-size: .85rem; caption-side: top; }
th, td { padding: var(--s-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: .95rem; }
thead th { background: var(--surface-2); font-weight: 650; color: var(--primary); }
tbody th { font-weight: 650; color: var(--primary); }
.pill-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-top: var(--s-5); }
.pill { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); padding: var(--s-4); }
.pill h3 { margin-bottom: var(--s-2); }
.pill p { color: var(--muted); margin: 0; }
.swipe-hint { font-size: .8rem; color: var(--muted); margin: 0 0 var(--s-2); }

/* Formulário */
.contact-layout { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s-8); align-items: start; }
form.contact { display: grid; gap: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); box-shadow: var(--shadow-1); }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; color: var(--primary); font-size: .95rem; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px;
  background: var(--surface); color: var(--text); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field .error-msg { display: none; color: var(--error); font-size: .85rem; align-items: center; gap: var(--s-2); }
.field .error-msg.show { display: flex; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); align-items: start; }
.check input { min-height: auto; width: 20px; height: 20px; margin-top: 3px; }
.check label { font-weight: 400; color: var(--text); font-size: .95rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-warning { color: var(--muted); font-size: .85rem; margin: 0; }
.form-status { min-height: 1.5em; margin: 0; font-weight: 550; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--error); }
.form-fallback { display: none; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.form-fallback.show { display: flex; }

.aside-block { display: grid; gap: var(--s-6); }
.channel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s-5); }
.channel .kicker { margin-bottom: var(--s-3); }
.aside-block h2 { font-size: 1.1rem; }
.aside-block .ficha { box-shadow: none; }

/* Legal shell */
.legal-heading { padding-block: var(--s-8) var(--s-5); border-bottom: 1px solid var(--line); }
.legal-heading .updated { color: var(--muted); font-size: .85rem; }
.legal-content { max-width: 72ch; margin-block: var(--s-7); }
.legal-content h2 { font-size: 1.25rem; margin-top: var(--s-7); }
.legal-content p { color: var(--text); }
.legal-content .alert { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-5); }
.legal-content strong.subhead { display: block; color: var(--primary); margin-top: var(--s-6); font-size: 1.05rem; }
.legal-aside { max-width: 72ch; margin-bottom: var(--s-7); color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--s-4); }

/* 404 / enviado */
.centered { padding-block: var(--s-9); text-align: left; }
.centered .button-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Hero traço animação */
.hero-visual .conn { stroke: var(--accent); stroke-width: 2; fill: none; }
.hero-visual.draw .conn { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: drawline 1.2s var(--ease) forwards; }
@keyframes drawline { to { stroke-dashoffset: 0; } }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-grid, .company-grid, .contact-layout { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .svc-layout { grid-template-columns: 1fr; }
  .svc-index { position: static; }
  .svc-index ul { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scroll-snap-type: x proximity; gap: var(--s-2); padding-bottom: var(--s-2); }
  .svc-index a { border-left: 0; border-bottom: 2px solid var(--line); scroll-snap-align: start; white-space: nowrap; padding: 8px var(--s-2); }
  .svc-index a:hover, .svc-index a[aria-current="true"] { border-bottom-color: var(--accent); }
  .pill-row { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .section { padding-block: var(--s-7); }
  .container { width: min(var(--max), calc(100% - 32px)); }
  .site-nav, .header-cta { display: none; }
  .menu-button { display: inline-flex; }
  .header-inner { height: 64px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(2n) { border-right: 0; }
  .facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .card-grid, .examples { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .ficha > div { grid-template-columns: 1fr; gap: var(--s-1); }
  h1 { font-size: clamp(2.1rem, 9vw, 3rem); }
}

/* Mobile menu */
.mobile-nav { display: none; }
.mobile-nav.open { display: block; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); box-shadow: var(--shadow-2); border-bottom: 1px solid var(--line); z-index: 99; }
.mobile-nav ul { list-style: none; margin: 0; padding: var(--s-3); display: grid; }
.mobile-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 var(--s-3); color: var(--primary); text-decoration: none; font-weight: 550; }
.mobile-nav a:hover { color: var(--accent); }
.mobile-nav .button { margin: var(--s-3); }
.menu-button { width: 44px; height: 44px; align-items: center; justify-content: center; margin-left: auto; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--primary); cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-visual.draw .conn { animation: none; stroke-dashoffset: 0; }
  * { transition-duration: .001ms !important; }
}
