@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2-variations"), url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #edf0ec;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #4d5a52;
  --line: #c9d1cb;
  --bus: #1e6b45;
  --bus-deep: #123f2a;
  --signal: #c62f3a;
  --wa: #128c4b;
  --measure: 68ch;
  --wrap: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; display: block; }
a { color: var(--bus); text-underline-offset: 0.18em; }
a:hover { color: var(--bus-deep); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--panel); padding: .5rem 1rem; z-index: 10; }

/* Type */
h1, h2, h3 {
  font-stretch: 78%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.45rem; font-stretch: 85%; font-weight: 700; line-height: 1.15; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lead { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 52ch; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-stretch: 80%; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--bus); }
.nav .btn { color: #fff; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } .brand { font-size: 1.05rem; } }
@media (max-width: 420px) { .nav .btn-sm { padding: .45rem .7rem; font-size: .92rem; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.35rem;
  border-radius: 6px;
  border: 2px solid transparent;
  font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
  background: var(--bus); color: #fff;
  transition: background .15s;
}
.btn:hover { background: var(--bus-deep); color: #fff; }
.btn-wa { background: var(--wa); }
.btn-wa:hover { background: #0c6a38; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-sm { padding: .5rem .95rem; }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-note { margin-top: 1.25rem; font-size: .95rem; color: var(--muted); }

/* Bus monitor: the signature element */
.monitor {
  margin: 0;
  background: var(--bus-deep);
  color: #d9eadf;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #0b2a1b, 0 24px 48px -24px rgba(18, 63, 42, .55);
  font-family: var(--mono);
  font-size: .84rem;
}
.monitor-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1rem;
  background: #0d3020;
  font-family: "Archivo", sans-serif;
  font-size: .85rem; color: #a9c9b5;
}
.monitor-bar .live { display: inline-flex; align-items: center; gap: .45rem; }
.monitor-bar .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4fd18b; }
.monitor table { width: 100%; border-collapse: collapse; }
.monitor th { text-align: left; font-weight: 400; color: #7fa891; padding: .55rem 1rem; border-bottom: 1px solid #1d5639; font-family: "Archivo", sans-serif; font-size: .8rem; }
.monitor td { padding: .5rem 1rem; border-bottom: 1px solid #184a31; white-space: nowrap; }
.monitor td.fn { font-family: "Archivo", sans-serif; white-space: normal; width: 100%; }
.monitor td.ga { color: #fff; }
.monitor td.val { color: #8ee0b2; text-align: right; }
.monitor tr.new td { animation: flash 1.6s ease-out; }
.monitor .cable { height: 6px; background: linear-gradient(to bottom, var(--signal) 0 50%, #222 50% 100%); }
@keyframes flash { from { background: rgba(142, 224, 178, .22); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .monitor tr.new td { animation: none; } }
@media (max-width: 480px) { .monitor .col-src { display: none; } .monitor td, .monitor th { padding-inline: .7rem; } }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--panel); }
.section-head { max-width: 720px; margin-bottom: 2.75rem; }

/* Audiences: rows, not cards */
.audiences { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 2px solid var(--ink); }
@media (max-width: 760px) { .audiences { grid-template-columns: 1fr; } }
.audience { padding: 1.75rem 2rem 1.75rem 0; border-bottom: 1px solid var(--line); }
.audience:nth-child(odd) { padding-right: 2.5rem; }
@media (min-width: 761px) { .audience:nth-child(even) { padding-left: 2.5rem; border-left: 1px solid var(--line); } }
.audience p { color: var(--muted); margin-bottom: .75rem; }
.audience ul { margin: 0; padding-left: 1.1rem; }
.audience li { margin: .2rem 0; }

/* Steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; position: relative; padding-top: 3.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bus); color: #fff; font-weight: 800;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.2rem; left: 3rem; right: -1.5rem; height: 2px; background: var(--line);
}
@media (max-width: 900px) { .steps li::after { display: none; } }
.steps h3 { font-size: 1.2rem; margin-bottom: .4em; }
.steps p { color: var(--muted); font-size: 1rem; }

/* Tech list */
.tech { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem; }
@media (max-width: 860px) { .tech { grid-template-columns: 1fr; gap: 1.75rem; } }
.tech h3 { font-size: 1.2rem; padding-bottom: .5rem; border-bottom: 2px solid var(--bus); }
.tech ul { list-style: none; margin: 0; padding: 0; }
.tech li { padding: .45rem 0; border-bottom: 1px solid var(--line); }

/* About */
.about { display: grid; grid-template-columns: 280px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }
.portrait {
  aspect-ratio: 4 / 5; background: var(--paper); border: 1px dashed var(--muted);
  border-radius: 8px; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: .9rem; padding: 1rem;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.work { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.work li { padding: .8rem 0; border-top: 1px solid var(--line); }
.work strong { display: block; }
.work span { color: var(--muted); font-size: .98rem; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-weight: 700; font-size: 1.12rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; width: 12px; height: 12px;
  border-right: 2px solid var(--bus); border-bottom: 2px solid var(--bus);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--muted); padding-bottom: 1rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.contact-direct { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; margin-top: 1.5rem; }
.form { display: grid; gap: 1.1rem; background: var(--panel); padding: clamp(1.25rem, 3vw, 2rem); border-radius: 10px; border: 1px solid var(--line); }
.section-alt .form { background: var(--paper); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; padding: .7rem .85rem;
  border: 1.5px solid #9aa79f; border-radius: 6px; background: #fff; color: var(--ink);
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--bus); box-shadow: 0 0 0 3px rgba(30, 107, 69, .2); }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.form .check input { width: auto; margin-top: .3rem; }
.form .check label { font-weight: 400; margin: 0; }
.form .hp { display: none; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: var(--bus); }
.form-status.err { color: var(--signal); }

/* Footer */
.site-footer { background: var(--ink); color: #c4cec7; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer p { margin: 0 0 .4rem; }

/* Floating WhatsApp on mobile */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 6;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); color: #fff; display: none; place-items: center;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .4);
}
.wa-float svg { width: 28px; height: 28px; }
@media (max-width: 760px) { .wa-float { display: grid; } }

/* Inner pages */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 2.5rem; }
.crumbs { font-size: .92rem; color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--muted); }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); margin-top: 2.5rem; }
.prose ul { padding-left: 1.2rem; max-width: var(--measure); }
.prose li { margin: .35rem 0; }
.cta-band { background: var(--bus-deep); color: #e3efe7; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #bcd5c5; }
.cta-band .hero-actions { margin-top: 1.25rem; }
.cta-band .btn-ghost { color: #fff; border-color: #fff; }
.cta-band .btn-ghost:hover { background: #fff; color: var(--bus-deep); }
.legal { max-width: 800px; font-size: 1rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.legal .todo { background: #fff3c4; padding: 0 .25em; }
