/* ============================================================
   Fomento Inteligente — Portal
   ============================================================ */

:root {
  --bg: #0b1014;
  --bg-elev: #11181f;
  --bg-elev-2: #161e26;
  --line: #1f2a34;
  --line-strong: #2b3a48;
  --fg: #e8eef5;
  --fg-dim: #9aa8b6;
  --fg-mute: #5c6b7a;
  --accent: oklch(0.78 0.13 175);
  --accent-soft: oklch(0.78 0.13 175 / 0.12);
  --accent-strong: oklch(0.85 0.16 175);
  --warn: oklch(0.78 0.14 70);
  --positive: oklch(0.78 0.16 150);
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1200px;
  --radius: 14px;
  --radius-lg: 20px;
}

[data-theme="light"] {
  --bg: #f5f3ee;
  --bg-elev: #ffffff;
  --bg-elev-2: #faf8f3;
  --line: #e6e2d8;
  --line-strong: #d4cfc2;
  --fg: #1a1f24;
  --fg-dim: #5c6b7a;
  --fg-mute: #8a98a6;
  --accent: oklch(0.55 0.13 175);
  --accent-soft: oklch(0.55 0.13 175 / 0.10);
  --accent-strong: oklch(0.45 0.15 175);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 96px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: none; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(48px, 7vw, 96px); }
h2 { font-size: clamp(36px, 4.5vw, 60px); }
h3 { font-size: 24px; line-height: 1.25; font-family: var(--sans); font-weight: 500; letter-spacing: -0.01em; }

[data-font-mode="sans"] h1,
[data-font-mode="sans"] h2 {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: -0.03em;
}

p { color: var(--fg-dim); margin: 0; text-wrap: pretty; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-text { display: inline; }
@media (max-width: 760px) {
  .brand-text { display: none; }
}
.brand-mark {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.nav-links {
  display: flex; gap: 24px;
  font-size: 14px;
  color: var(--fg-dim);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .nav-links { display: none; }
}
.nav-links a:hover { color: var(--fg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #061013;
}
.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--fg-mute); background: var(--bg-elev); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
}
.hero h1 { margin: 24px 0 28px; }
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-size: 18px;
  color: var(--fg-dim);
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.stat-num {
  font-family: var(--serif);
  font-size: 40px;
  color: var(--fg);
  line-height: 1;
}
.stat-lbl {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
  margin-top: 8px;
}

/* ---------- Dashboard mock ---------- */
.dash {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.5);
}
.dash-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.dash-title {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
}
.dash-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--positive) 30%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.dash-kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.kpi-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.kpi-lbl { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-mute); }
.kpi-val {
  font-family: var(--serif);
  font-size: 28px;
  margin-top: 4px;
  color: var(--fg);
  line-height: 1;
}
.kpi-delta {
  font-size: 11px;
  font-family: var(--mono);
  margin-top: 6px;
  color: var(--positive);
}
.kpi-delta.neg { color: oklch(0.7 0.18 25); }

.chart {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  height: 180px;
  position: relative;
}
.chart-svg { width: 100%; height: 100%; }

/* ---------- Services ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 56px;
  gap: 40px;
  flex-wrap: wrap;
}
.section-head h2 { max-width: 720px; margin-top: 14px; }
.section-head p { max-width: 360px; font-size: 15px; }

.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex; flex-direction: column;
  min-height: 480px;
  position: relative;
  overflow: hidden;
}
.service-card .eyebrow { margin-bottom: 16px; }
.service-card h3 { font-family: var(--serif); font-size: 32px; font-weight: 400; margin-bottom: 14px; }
.service-card .desc { font-size: 15px; margin-bottom: 24px; }
.service-bullets {
  list-style: none;
  padding: 0; margin: 0 0 28px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.service-bullets li {
  font-size: 14px;
  color: var(--fg-dim);
  display: flex; gap: 10px;
  align-items: flex-start;
}
.service-bullets li::before {
  content: "→";
  color: var(--accent);
  font-family: var(--mono);
}
.service-demo {
  margin-top: auto;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

/* WhatsApp demo */
.wpp {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px;
  min-height: 180px;
}
.wpp-row { display: flex; }
.wpp-bub {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 14px;
  line-height: 1.4;
  font-size: 13px;
}
.wpp-row.them { justify-content: flex-start; }
.wpp-row.them .wpp-bub {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--fg);
}
.wpp-row.us { justify-content: flex-end; }
.wpp-row.us .wpp-bub {
  background: color-mix(in oklab, var(--accent) 18%, var(--bg-elev));
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  border-bottom-right-radius: 4px;
  color: var(--fg);
}
.wpp-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-mute);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.wpp-typing {
  display: inline-flex; gap: 3px; align-items: center;
}
.wpp-typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--fg-mute);
  animation: bounce 1.2s infinite;
}
.wpp-typing span:nth-child(2) { animation-delay: 0.15s; }
.wpp-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- Como funciona ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elev);
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  position: relative;
}
.step:last-child { border-right: none; }
@media (max-width: 900px) {
  .step:nth-child(2n) { border-right: none; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
.step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}
.step h4 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 10px 0;
}
.step p { font-size: 14px; }

/* ---------- Sobre ---------- */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) { .sobre-grid { grid-template-columns: 1fr; gap: 40px; } }
.sobre-text h2 em { font-style: italic; color: var(--accent); }
.sobre-text p {
  font-size: 17px;
  margin-top: 28px;
  max-width: 540px;
}
.sobre-meta {
  display: flex; flex-direction: column; gap: 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.sobre-meta-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  font-size: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.sobre-meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.sobre-meta-key {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
  padding-top: 2px;
}
.sobre-meta-val { color: var(--fg); }

/* ---------- Differentials ---------- */
.diffs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 900px) { .diffs { grid-template-columns: 1fr; } }
.diff {
  background: var(--bg);
  padding: 36px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.diff-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  display: grid; place-items: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.diff h4 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 0;
  line-height: 1.2;
}
.diff p { font-size: 14px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.contact-text h2 { margin-bottom: 24px; }
.contact-text p { font-size: 17px; max-width: 480px; margin-bottom: 36px; }
.contact-channels {
  display: flex; flex-direction: column; gap: 14px;
}
.channel {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all 0.18s ease;
}
.channel:hover {
  border-color: var(--accent);
  background: var(--bg-elev-2);
}
.channel-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 16px;
  flex-shrink: 0;
}
.channel-key { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-mute); }
.channel-val { font-size: 15px; color: var(--fg); margin-top: 2px; }
.channel-arrow { margin-left: auto; color: var(--fg-mute); font-family: var(--mono); }
.channel:hover .channel-arrow { color: var(--accent); transform: translateX(4px); transition: transform 0.18s; }

/* Form */
.form {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
}
.form-input, .form-textarea, .form-select {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea { resize: vertical; min-height: 100px; font-family: var(--sans); }
.form-error { color: oklch(0.7 0.18 25); font-size: 12px; font-family: var(--mono); }
.form-success {
  background: color-mix(in oklab, var(--positive) 12%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--positive) 30%, transparent);
  color: var(--positive);
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 56px 0 36px;
}
.foot-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 700px) { .foot-inner { grid-template-columns: 1fr; gap: 32px; } }
.foot-tag { color: var(--fg-dim); font-size: 14px; max-width: 280px; margin-top: 14px; }
.foot-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
  margin: 0 0 16px 0;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col li { font-size: 14px; color: var(--fg-dim); }
.foot-col li:hover { color: var(--fg); }
.foot-bot {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }
