/* ============ Grimatic Automação e IoT ============ */
:root {
  --green: #14985f;
  --green-600: #0f7d4e;
  --green-800: #0a5a39;
  --green-900: #063d26;
  --green-100: #e4f4ec;
  --green-50: #f1f9f5;
  --ink: #131d18;
  --muted: #54635b;
  --bg: #f6f8f6;
  --paper: #ffffff;
  --line: #d8e2db;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 40, 25, .06), 0 8px 24px rgba(10, 40, 25, .06);
  --f-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.05; margin: 0; letter-spacing: .005em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 248, 246, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 18px rgba(10, 40, 25, .06); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; flex-direction: column; text-decoration: none; gap: 3px; }
.brand img { height: 26px; width: auto; }
.brand-sub { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15.5px; color: var(--ink); position: relative; }
.nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--green); transition: width .2s; }
.nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta { background: var(--green); color: #fff !important; padding: 9px 18px; border-radius: 999px; transition: background .2s; }
.nav-cta:hover { background: var(--green-600); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-body); font-weight: 600; font-size: 16px;
  padding: 14px 24px; border-radius: 999px; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(20, 152, 95, .28); }
.btn-primary:hover { background: var(--green-600); transform: translateY(-1px); }
.btn-ghost { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn-ghost:hover { background: var(--green-800); color: #fff; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 56px 0 72px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 500px at 20% 30%, rgba(246,248,246,.96), rgba(246,248,246,.55) 60%, rgba(246,248,246,.0));
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--green) 0 14px, var(--green-900) 14px 28px);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--green-800); background: var(--green-100); padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(20,152,95,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(20,152,95,0); } 100% { box-shadow: 0 0 0 0 rgba(20,152,95,0); } }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 700; text-transform: uppercase; color: var(--green-900); }
h1 em { font-style: normal; color: var(--green); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 54ch; margin: 22px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero-points li { position: relative; padding-left: 28px; margin-bottom: 8px; font-weight: 500; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 9px;
  border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg) scale(.9); transform-origin: center;
}

/* Painel ladder */
.panel { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow), 0 30px 60px -30px rgba(10,60,35,.25); overflow: hidden; }
.panel-bar { display: flex; align-items: center; gap: 14px; padding: 11px 16px; background: var(--green-900); color: #d6efe2; font-family: var(--f-mono); font-size: 12px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.28); }
.panel-title { flex: 1; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run { display: inline-flex; align-items: center; gap: 7px; color: #7ff0b8; font-weight: 500; }
.run .led { background: #7ff0b8; }
.ladder { width: 100%; height: auto; padding: 10px 14px 0; background: var(--green-50); }
.ladder .rail path { stroke: var(--green-900); stroke-width: 4; stroke-linecap: round; fill: none; }
.ladder .wire path { stroke: #7d9a8c; stroke-width: 2.5; fill: none; }
.ladder .el path, .ladder .el .coil, .ladder .el .box { stroke: var(--green-900); stroke-width: 3; fill: none; stroke-linecap: round; }
.ladder .el .slash { stroke-width: 2.5; }
.ladder .el .coil { fill: #fff; }
.ladder .el .box { fill: #fff; }
.ladder .node { fill: #7d9a8c; }
.ladder .wire.flow path { stroke: var(--green); stroke-width: 3; stroke-dasharray: 8 14; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -44; } }
.ladder .lbl text { font-family: var(--f-mono); font-size: 11.5px; fill: var(--green-900); text-anchor: middle; font-weight: 500; letter-spacing: .04em; }
.ladder .lbl .addr { fill: var(--muted); font-weight: 400; }
.ladder .lbl .boxt { font-size: 14px; font-weight: 500; }
.panel-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); background: #fff; }

/* ---------- Faixa de marcas ---------- */
.brands { background: var(--green-900); color: #cfe8db; }
.brands-row { display: flex; align-items: center; gap: 28px; padding: 22px 0; flex-wrap: wrap; }
.brands p { margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #8fc9ab; }
.brands ul { display: flex; flex-wrap: wrap; gap: 10px 34px; align-items: center; }
.brands li { font-family: var(--f-head); font-size: 1.55rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.brands li.more { font-family: var(--f-body); font-size: 1rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: #8fc9ab; }

/* ---------- Seções ---------- */
.section { padding: 96px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.kicker { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--green-600); margin-bottom: 14px; }
.kicker-light { color: #9fe3c0; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; text-transform: uppercase; color: var(--green-900); margin-bottom: 18px; }
.section-head p, .big { color: var(--muted); font-size: 1.1rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green); transform: scaleY(0); transform-origin: top; transition: transform .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #b9d3c5; }
.card:hover::before { transform: scaleY(1); }
.card h3 { font-size: 1.55rem; font-weight: 600; text-transform: uppercase; color: var(--green-900); margin: 18px 0 10px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }
.card-feature { grid-column: span 2; background: linear-gradient(135deg, var(--green-900), var(--green-800)); border-color: transparent; }
.card-feature h3 { color: #fff; font-size: 2rem; }
.card-feature p { color: #cfe8db; font-size: 1.05rem; max-width: 52ch; }
.card-feature .ico { background: rgba(255,255,255,.12); color: #7ff0b8; }
.card-feature::before { background: #7ff0b8; }
.ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--green-100); color: var(--green-600); }
.ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-cta { text-decoration: none; background: var(--green); border-color: var(--green); display: flex; flex-direction: column; justify-content: center; }
.card-cta h3 { color: #fff; margin-top: 0; }
.card-cta p { color: #e4f7ec; }
.card-cta .arrow { margin-top: 18px; font-size: 2rem; color: #fff; transition: transform .2s; line-height: 1; }
.card-cta:hover { background: var(--green-600); }
.card-cta:hover .arrow { transform: translateX(6px); }
.card-cta::before { display: none; }

/* Treinamentos */
.train-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.steps { counter-reset: s; margin: 28px 0 32px; display: grid; gap: 18px; }
.steps li { counter-increment: s; position: relative; padding-left: 62px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center; background: var(--green-100); color: var(--green-800); font-family: var(--f-head); font-weight: 700; font-size: 1.4rem;
}
.steps b { display: block; font-family: var(--f-head); font-size: 1.3rem; text-transform: uppercase; color: var(--green-900); letter-spacing: .02em; }
.steps span { color: var(--muted); }
.topics { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.topics h3 { font-size: 1.6rem; text-transform: uppercase; color: var(--green-900); margin-bottom: 18px; }
.topics ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topics li span {
  display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green);
  padding: 12px 14px; border-radius: 8px; font-weight: 500; font-size: 15.5px; line-height: 1.3;
}
.topics-note { margin: 18px 0 0; font-size: 15px; color: var(--muted); }

/* Sobre */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.about-grid p { color: var(--muted); font-size: 1.08rem; }
.facts { display: grid; gap: 14px; }
.facts li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; border-left: 5px solid var(--green); }
.facts b { display: block; font-family: var(--f-head); font-size: 1.35rem; text-transform: uppercase; color: var(--green-900); }
.facts span { color: var(--muted); font-size: 15.5px; }

/* Região */
.section-green { background: var(--green-800); color: #fff; position: relative; overflow: hidden; }
.section-green::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0/40px 40px, linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0/40px 40px; pointer-events: none; }
.section-green h2 { color: #fff; }
.region-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.region-grid p { color: #d3ecdf; font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); padding: 9px 18px; border-radius: 999px; font-weight: 500; }
.chips li.chip-alt { background: #fff; color: var(--green-900); border-color: #fff; }

/* Contato */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-grid p { color: var(--muted); font-size: 1.08rem; }
.contact-list { display: grid; gap: 20px; margin-top: 30px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.ci { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--green-100); color: var(--green-600); }
.ci svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list small { display: block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-list a, .contact-list span:not(.ci) { font-size: 1.2rem; font-weight: 500; color: var(--ink); text-decoration: none; line-height: 1.4; }
.contact-list a:hover { color: var(--green-600); text-decoration: underline; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form h3 { font-size: 1.8rem; text-transform: uppercase; color: var(--green-900); margin-bottom: 20px; }
.form label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 16px; }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--green); background: #fff; box-shadow: 0 0 0 4px rgba(20,152,95,.15); }
.form input.invalid { border-color: #c0392b; }
.form-note { margin: 14px 0 0; font-size: 13.5px !important; color: var(--muted); text-align: center; }

/* Rodapé */
.site-footer { background: var(--green-900); color: #b9d9c8; padding: 48px 0 40px; }
.footer-row { display: grid; gap: 14px; }
.footer-logo { height: 26px; width: auto; filter: brightness(0) invert(1); opacity: .95; }
.footer-row p { margin: 0; font-size: 15px; }
.footer-row strong { color: #fff; }
.footer-row .copy { opacity: .7; font-size: 13.5px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); margin-top: 8px; }

/* WhatsApp flutuante */
.fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.25); transition: transform .2s;
}
.fab svg { width: 30px; height: 30px; fill: currentColor; }
.fab:hover { transform: scale(1.08); }

/* Animação de entrada (só com JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .hero-grid, .train-grid, .about-grid, .region-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card-feature { grid-column: span 2; }
  .section { padding: 72px 0; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 18px;
    box-shadow: 0 16px 24px rgba(10,40,25,.08); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { margin-top: 14px; text-align: center; border-bottom: 0 !important; padding: 14px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 56px; }
  .cards { grid-template-columns: 1fr; }
  .card-feature { grid-column: auto; }
  .topics ul { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .brands-row { gap: 12px; }
  .brands li { font-size: 1.3rem; }
  .panel-foot span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
