/* pmeai.pt — PMEai Monolith design system, site build v1 */

@font-face { font-family: "Syne"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/syne-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/plex-mono-500.woff2") format("woff2"); }

:root {
  --bg-ground: #030606; --bg-slab: #0e1a1a; --bg-raised: #142424; --bg-well: #020404;
  --bg-pine: #123132; --bg-pine-bright: #2f4f4e;
  --ink: #f4f8f6; --ink-muted: #93a39e; --ink-faint: #7a8c86;
  --line-hair: rgba(255,255,255,0.16); --line-strong: rgba(255,255,255,0.40); --line-grid: rgba(255,255,255,0.045);
  --signal: #4dffc4; --signal-ink: #4dffc4; --signal-dim: rgba(77,255,196,0.12); --on-signal: #030606;
  --alert: #ff5a4a; --alert-ink: #ff7a6b; --alert-dim: rgba(255,90,74,0.15); --on-alert: #030606;
  --font-display: "Syne", "Arial Black", sans-serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius-0: 0px;
  --glow-signal: 0 0 24px rgba(77,255,196,0.45); --glow-signal-sm: 0 0 10px rgba(77,255,196,0.8); --glow-alert: 0 0 20px rgba(255,90,74,0.45);
  --stroke-hair: 1px; --stroke-rail: 2px; --stroke-rail-lg: 3px;
  --duration-snap: 120ms; --duration-resolve: 600ms; --duration-settle: 900ms; --ease-resolve: cubic-bezier(0.2, 0.8, 0.2, 1);
  --measure: 62ch; --gutter: var(--space-5); --max: 1200px;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
body {
  margin: 0; min-height: 100vh;
  background-color: var(--bg-ground);
  background-image: linear-gradient(90deg, var(--line-grid) 1px, transparent 1px);
  background-size: var(--space-9) 100%;
  color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--signal-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--signal); color: var(--on-signal); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
p { margin: 0 0 1em; max-width: var(--measure); }
h1, h2, h3, h4 { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 500; }

/* ---------- type ---------- */
.display { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: -0.04em; line-height: 0.98; color: var(--ink); }
.display--xl { font-size: clamp(34px, 8.6vw, 88px); line-height: 0.95; }
.display--lg { font-size: clamp(30px, 5.5vw, 64px); }
.display--h1 { font-size: clamp(32px, 4vw, 44px); }
.display--h2 { font-size: 28px; letter-spacing: -0.03em; line-height: 1.02; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1; color: var(--ink-faint); }
.eyebrow--signal { color: var(--signal-ink); }
.h3 { font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.subhead { font-size: clamp(17px, 2vw, 20px); font-weight: 400; line-height: 1.5; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.mono { font-family: var(--font-mono); }
.signal { color: var(--signal-ink); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-8) 0; }
.section--tight { padding: var(--space-7) 0; }
.section__head { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-6); max-width: 760px; }
.grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid > * { min-width: 0; }
.col-4 { grid-column: span 12; } .col-6 { grid-column: span 12; } .col-8 { grid-column: span 12; }
@media (min-width: 720px) { .col-6 { grid-column: span 6; } .col-4 { grid-column: span 6; } }
@media (min-width: 1000px) { .col-4 { grid-column: span 4; } .col-8 { grid-column: span 8; } :root { --gutter: var(--space-8); } }
.hr { height: 1px; border: 0; margin: 0; background: var(--line-hair); }
.hr--signal { background: linear-gradient(90deg, transparent, var(--signal) 30%, var(--signal) 70%, transparent); }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(3,6,6,0.9); backdrop-filter: blur(6px); border-bottom: var(--stroke-hair) solid var(--line-hair); }
.header::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--signal) 30%, var(--signal) 70%, transparent); }
.header__in { display: flex; align-items: center; gap: var(--space-4); height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { height: 26px; width: auto; }
.nav { display: none; margin-left: auto; gap: var(--space-1); }
.nav a { display: inline-flex; align-items: center; height: 64px; padding: 0 var(--space-3); margin-bottom: -1px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); text-decoration: none; border-bottom: var(--stroke-rail) solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--signal); }
.header__cta { display: none; margin-left: var(--space-3); }
.nav-toggle { margin-left: auto; height: 44px; width: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: var(--stroke-hair) solid var(--line-strong); color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; fill: none; }
.nav-mobile { display: none; border-top: var(--stroke-hair) solid var(--line-hair); background: var(--bg-slab); }
.nav-mobile[data-open="true"] { display: block; }
.nav-mobile a { display: block; padding: 16px var(--gutter); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: var(--stroke-hair) solid var(--line-hair); }
.nav-mobile a[aria-current="page"] { box-shadow: inset var(--stroke-rail-lg) 0 0 0 var(--signal); }
@media (min-width: 900px) { .nav, .header__cta { display: inline-flex; } .nav-toggle, .nav-mobile { display: none !important; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 48px; padding: 0 var(--space-5); font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1; border: var(--stroke-hair) solid transparent; border-radius: var(--radius-0); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--duration-snap) var(--ease-resolve), box-shadow var(--duration-snap) var(--ease-resolve), border-color var(--duration-snap) var(--ease-resolve); }
.btn--primary { background: var(--signal); color: var(--on-signal); border-color: var(--signal); box-shadow: var(--glow-signal); }
.btn--primary:hover { color: var(--on-signal); box-shadow: 0 0 36px rgba(77,255,196,0.6); }
.btn--secondary { border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink); background: var(--bg-raised); color: var(--ink); }
.btn--signal-outline { border-color: var(--signal); color: var(--signal-ink); }
.btn--signal-outline:hover { background: var(--signal-dim); color: var(--signal-ink); }
.btn--sm { height: 40px; padding: 0 var(--space-4); font-size: 11px; }
.btn-group { display: inline-flex; flex-wrap: wrap; }
.btn-group .btn + .btn { border-left-width: 0; }
@media (max-width: 480px) { .btn-group { flex-direction: column; align-items: stretch; } .btn-group .btn + .btn { border-left-width: 1px; border-top-width: 0; } }

/* ---------- badges, LED ---------- */
.badge { display: inline-flex; align-items: center; gap: var(--space-2); padding: 7px var(--space-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1; border: var(--stroke-hair) solid var(--line-hair); color: var(--ink-muted); white-space: nowrap; }
.badge--solid { border-color: var(--signal); background: var(--signal); color: var(--on-signal); font-weight: 500; }
.badge--signal { border-color: var(--signal); background: var(--signal-dim); color: var(--signal-ink); }
.badge-strip { display: inline-flex; flex-wrap: wrap; border: var(--stroke-hair) solid var(--line-hair); }
.badge-strip .badge { border: 0; border-right: var(--stroke-hair) solid var(--line-hair); }
.badge-strip .badge:last-child { border-right: 0; }
.badge-strip .badge--solid { margin: -1px; padding: 8px 13px; }
.led { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; background: var(--ink-faint); }
.led--signal { background: var(--signal); box-shadow: var(--glow-signal-sm); }
.led--alert { background: var(--alert); box-shadow: var(--glow-alert); }

/* ---------- slab ---------- */
.slab { position: relative; background: var(--bg-slab); border: var(--stroke-hair) solid var(--line-hair); padding: var(--space-6); overflow: hidden; }
.slab--compact { padding: var(--space-5); }
.slab--rail::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: var(--stroke-rail-lg); background: var(--signal); box-shadow: var(--glow-signal); }
.slab--active { border-left: var(--stroke-rail-lg) solid var(--signal); }
.slab--pine { background: var(--bg-pine); border-color: var(--bg-pine-bright); }
.slab--link { display: block; color: inherit; text-decoration: none; transition: background-color var(--duration-snap) var(--ease-resolve); }
.slab--link:hover { background: var(--bg-raised); color: inherit; }
.slab__caption { position: absolute; right: var(--space-4); top: var(--space-3); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.watermark { position: absolute; right: var(--space-5); bottom: -0.12em; pointer-events: none; user-select: none; font-family: var(--font-display); font-weight: 700; font-size: 200px; line-height: 0.8; letter-spacing: -0.06em; color: var(--bg-pine); }
.slab > * { position: relative; }
.slab > .watermark { position: absolute; }

/* ---------- readout / log ---------- */
.readout { display: flex; flex-direction: column; border: var(--stroke-hair) solid var(--line-hair); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.readout__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-4); padding: 10px var(--space-3); border-bottom: var(--stroke-hair) solid var(--line-hair); }
.readout__row:last-child { border-bottom: 0; }
.readout__key { color: var(--ink-faint); }
.readout__val { color: var(--ink); display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--space-2); text-align: right; margin-left: auto; }
.readout__val--signal { color: var(--signal-ink); }
.readout__val--alert { color: var(--alert-ink); }
.log { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4); background: var(--bg-well); border-left: var(--stroke-rail) solid var(--signal); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; line-height: 1.6; color: var(--signal-ink); overflow-x: auto; }
.log .ok { color: var(--ink); } .log .dim { color: var(--ink-faint); }

/* ---------- metric ---------- */
.metric { display: flex; flex-direction: column; gap: var(--space-1); }
.metric__value { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 5vw, 52px); line-height: 0.95; letter-spacing: -0.05em; }
.metric__label { font-size: 13px; line-height: 1.5; color: var(--ink-muted); }

/* ---------- lists ---------- */
.steps { counter-reset: step; display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { position: relative; padding: var(--space-5); background: var(--bg-slab); border: var(--stroke-hair) solid var(--line-hair); }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--signal-ink); margin-bottom: var(--space-4); }
.step h3 { font-size: 18px; font-weight: 500; line-height: 1.3; margin-bottom: var(--space-2); }
.step p { font-size: 14px; color: var(--ink-muted); margin: 0; }
.rows { border-top: var(--stroke-hair) solid var(--line-hair); }
.row { display: grid; grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-4) 0; border-bottom: var(--stroke-hair) solid var(--line-hair); }
@media (min-width: 720px) { .row { grid-template-columns: 220px 1fr; gap: var(--space-5); } }
.row__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal-ink); padding-top: 4px; }
.row__v { font-size: 15px; color: var(--ink-muted); }
.row__v strong { color: var(--ink); }
.check { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 15px; color: var(--ink-muted); padding: 10px 0; border-bottom: var(--stroke-hair) solid var(--line-hair); }
.check .led { margin-top: 9px; }

/* ---------- hero ---------- */
.hero { padding: var(--space-8) 0 var(--space-7); }
.hero__grid { display: grid; gap: var(--space-6); align-items: end; }
.hero__grid > * { min-width: 0; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }
.hero h1 { margin: var(--space-4) 0 var(--space-5); max-width: 13ch; font-size: clamp(34px, 6vw, 80px); }
.hero .subhead { max-width: 560px; margin-bottom: var(--space-6); }
.hero__panel { display: flex; flex-direction: column; gap: var(--space-4); }

/* ---------- details / FAQ ---------- */
.faq details { border-bottom: var(--stroke-hair) solid var(--line-hair); }
.faq summary { cursor: pointer; list-style: none; padding: var(--space-4) 0; font-size: 17px; font-weight: 500; display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--signal-ink); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-muted); padding-bottom: var(--space-4); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.input { width: 100%; height: 48px; padding: 0 var(--space-4); background: var(--bg-well); color: var(--ink); border: var(--stroke-hair) solid var(--line-strong); border-radius: var(--radius-0); font-family: var(--font-sans); font-size: 16px; outline: none; transition: border-color var(--duration-snap) var(--ease-resolve), box-shadow var(--duration-snap) var(--ease-resolve); }
.input::placeholder { color: var(--ink-faint); }
.input:focus { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.input { height: auto; min-height: 140px; padding: var(--space-3) var(--space-4); line-height: 1.5; resize: vertical; }
.help { font-size: 12px; color: var(--ink-faint); }
.form { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .form { grid-template-columns: 1fr 1fr; } .form .span-2 { grid-column: span 2; } }

/* ---------- testimonials (filled by site.js from /data/testemunhos.json; hidden when empty) ---------- */
.testimonials[hidden] { display: none; }
.quote { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.quote__text { font-size: 17px; line-height: 1.5; color: var(--ink); max-width: none; }
.quote__who { display: flex; align-items: center; gap: var(--space-3); font-size: 13px; color: var(--ink-muted); }
.quote__who img { width: 40px; height: 40px; object-fit: cover; border: var(--stroke-hair) solid var(--line-hair); }
.quote__metric { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--signal-ink); }

/* ---------- footer ---------- */
.footer { border-top: var(--stroke-hair) solid var(--line-hair); padding: var(--space-7) 0 var(--space-6); background: var(--bg-slab); }
.footer__grid { display: grid; gap: var(--space-6); }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer h2 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--space-3); }
.footer li { padding: 4px 0; font-size: 14px; }
.footer li a { color: var(--ink-muted); text-decoration: none; }
.footer li a:hover { color: var(--ink); }
.footer__legal { margin-top: var(--space-6); padding-top: var(--space-4); border-top: var(--stroke-hair) solid var(--line-hair); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-faint); }
.footer__legal a { color: var(--ink-faint); text-decoration: none; }

/* ---------- prose pages ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 22px; font-weight: 500; margin: var(--space-6) 0 var(--space-3); }
.prose h3 { font-size: 17px; font-weight: 500; margin: var(--space-5) 0 var(--space-2); }
.prose p, .prose li { color: var(--ink-muted); }
.prose ul { list-style: square; padding-left: 20px; margin-bottom: 1em; }
.prose li { margin: 4px 0; }
.placeholder { background: var(--alert-dim); color: var(--alert-ink); padding: 0 4px; font-family: var(--font-mono); font-size: 0.9em; }

/* ---------- brand resolve (hero mark) ---------- */
@keyframes led-on { from { opacity: 0.25; box-shadow: none; } to { opacity: 1; box-shadow: var(--glow-signal); } }
.mark-led { animation: led-on var(--duration-settle) var(--ease-resolve) both; }

/* header CTA only from 480px up */
@media (max-width: 479px) { .header__cta { display: none; } }
@media (max-width: 479px) { .btn { white-space: normal; height: auto; min-height: 48px; padding-top: 12px; padding-bottom: 12px; text-align: center; } }
@media (max-width: 359px) { .hero h1, .hero .display--lg { font-size: 28px; } }
html, body { overflow-x: clip; }
