/* ==========================================================================
   Gestão de Gado — landing page
   Paleta reaproveitada do app (lib/core/theme/app_palette.dart): Tailwind emerald.
   ========================================================================== */

:root {
  /* Marca / esmeralda */
  --green-50:  #ECFDF5;
  --green-100: #D1FAE5;
  --green-200: #A7F3D0;
  --green-400: #34D399;
  --green-500: #10B981;
  --green-600: #059669;
  --green-700: #047857;
  --green-800: #065F46;
  --green-900: #064E3B;
  --green-950: #022C22;

  /* Status de validade (mesmas cores do app) */
  --amber-500: #F59E0B;
  --red-500:   #EF4444;

  /* Neutros — tema escuro */
  --ink:       #e9f3ed;   /* texto principal */
  --ink-soft:  #aec3b8;   /* texto secundário */
  --muted:     #7f958a;   /* texto terciário */
  --line:      #24352c;   /* bordas */
  --surface:   #0b1510;   /* fundo da página */
  --surface-2: #0e1a14;   /* seções alternadas */
  --card:      #12201a;   /* superfícies elevadas (cards, campos) */
  --card-2:    #16271f;   /* hover / realce */

  /* Tinta esmeralda translúcida (chips, ícones, realces) */
  --green-tint:      rgba(16, 185, 129, .13);
  --green-tint-line: rgba(16, 185, 129, .30);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 20px -12px rgba(0, 0, 0, .5);
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--green-400); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Ícones Material Symbols Rounded (mesma família do app — PRD RNF02) */
.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal;
  line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}
.btn .ms { font-size: 21px; }
.eyebrow .ms { font-size: 16px; }
.card .ic .ms { font-size: 26px; }
.chk .ms { font-size: 15px; font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 20; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--green-400);
  background: var(--green-tint);
  border: 1px solid var(--green-tint-line);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ------- Botões ------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  min-height: 52px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--green-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--green-700); }
.btn-ghost {
  background: var(--card);
  color: var(--green-100);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--green-tint-line); background: var(--card-2); }
.btn-lg { font-size: 17px; padding: 16px 28px; min-height: 58px; }

/* ------- Header ------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,21,16,.78);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 46px; height: 46px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--green-700); text-decoration: none; }
.nav-cta { display: inline-flex; gap: 10px; align-items: center; }

/* ------- Hero ------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 560px at 85% -10%, rgba(16,185,129,.16), transparent 62%),
    radial-gradient(900px 500px at 10% 110%, rgba(5,150,105,.10), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-block: 84px 92px;
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 800;
  margin-top: 22px;
}
.hero h1 .hl { color: var(--green-400); }
.hero-sub {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin-top: 20px;
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-trust {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 26px;
  color: var(--muted);
  font-size: 14.5px;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); }

/* Frame de dispositivo com screenshot real do app.
   Barra de status (topo) e barra de botões (base) desenhadas via ::before/::after —
   valem para todos os aparelhos sem repetir markup. */
.device {
  position: relative;
  justify-self: center;
  width: min(300px, 78vw);
  border: 10px solid #0f1b15;
  border-radius: 40px;
  background: #060b09;               /* cor das barras do sistema (chrome do celular) */
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 27px 0 20px;              /* espaço p/ barra de status + barra de gestos */
  line-height: 0;
}
.device img { width: 100%; height: auto; display: block; }
.device-hero { width: min(320px, 82vw); }

/* Barra de status: hora à esquerda, ícones (sinal · wi-fi · bateria) à direita */
.device::before {
  content: "14:30";
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  height: 27px; line-height: 27px; padding: 0 16px;
  font-family: var(--font);
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  color: #e9f3ed;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='52' height='14' viewBox='0 0 52 14'><g fill='%23e9f3ed'><rect x='0' y='7' width='2.4' height='4' rx='.8'/><rect x='3.6' y='5' width='2.4' height='6' rx='.8'/><rect x='7.2' y='3' width='2.4' height='8' rx='.8'/><rect x='10.8' y='1' width='2.4' height='10' rx='.8'/></g><g fill='none' stroke='%23e9f3ed' stroke-width='1.5' stroke-linecap='round'><path d='M17 6.6a6.4 6.4 0 0 1 10 0'/><path d='M19.7 9.1a3.1 3.1 0 0 1 4.6 0'/></g><circle cx='22' cy='11.4' r='.9' fill='%23e9f3ed'/><rect x='37' y='3.2' width='11' height='7.6' rx='2' fill='none' stroke='%23e9f3ed' stroke-width='1'/><rect x='38.2' y='4.4' width='7' height='5.2' rx='.7' fill='%23e9f3ed'/><rect x='48.6' y='5' width='1.4' height='4' rx='.7' fill='%23e9f3ed'/></svg>") no-repeat right 15px center;
}

/* Barra de gestos (home indicator) — traço arredondado central */
.device::after {
  content: "";
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  width: 36%; max-width: 132px; height: 5px;
  border-radius: 3px;
  background: rgba(233, 243, 237, .5);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  justify-items: center;
  align-items: start;
}
.gallery .shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gallery .device { display: inline-block; }
.gallery figcaption {
  line-height: 1.5;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
  text-align: center;
  max-width: 30ch;
}
.device-sm { width: min(260px, 74vw); }

/* Mockup do telefone (legado — usado só se precisar de mock sem imagem) */
.phone {
  justify-self: center;
  width: min(320px, 82vw);
  aspect-ratio: 9 / 19;
  background: linear-gradient(180deg, var(--card), var(--surface-2));
  border: 10px solid #0f1b15;
  border-radius: 42px;
  box-shadow: var(--shadow);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phone-notch {
  width: 120px; height: 22px; background: #0f1b15;
  border-radius: 0 0 14px 14px; margin: -16px auto 4px;
}
.phone-appbar { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; border-bottom: 1px solid var(--line); }
.phone-appbar img { width: 26px; height: 26px; }
.phone-appbar b { font-size: 15px; }
.mini-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.mini-card .mc-top { display: flex; align-items: center; justify-content: space-between; }
.mini-card .mc-title { font-weight: 600; font-size: 14.5px; }
.mini-card .mc-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.pill.ok  { color: var(--green-400); background: var(--green-tint); }
.pill.warn{ color: #fbbf24; background: rgba(245, 158, 11, .16); }
.pill.bad { color: #f87171; background: rgba(239, 68, 68, .16); }
.phone-fab {
  margin-top: auto;
  align-self: flex-end;
  background: var(--green-600);
  color: #fff; font-weight: 600; font-size: 14px;
  padding: 12px 16px; border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; gap: 8px;
}

/* ------- Seções ------- */
section { padding-block: 88px; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; margin-top: 16px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; margin-top: 14px; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }

/* Diferenciais */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ic {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--green-tint); color: var(--green-400);
  font-size: 24px;
}
.card h3 { font-size: 1.2rem; }
.card p { color: var(--ink-soft); margin-top: 10px; font-size: 15.5px; }

/* Como funciona */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.step .num {
  counter-increment: step;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green-600); color: #fff; font-weight: 700;
  display: grid; place-items: center; margin-bottom: 16px;
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--ink-soft); margin-top: 8px; font-size: 15px; }

/* Split (MAPA / offline) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 800; }
.split .lead { color: var(--ink-soft); font-size: 1.1rem; margin-top: 16px; }
.feature-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: var(--ink-soft); }
.feature-list .chk {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-tint); color: var(--green-400);
  display: grid; place-items: center; font-size: 15px; font-weight: 700; margin-top: 1px;
}
.split-media {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.catalog-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; }
.catalog-item + .catalog-item { border-top: 1px solid var(--line); }
.catalog-item .ci-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--green-tint); color: var(--green-400); display: grid; place-items: center; font-size: 18px; }
.catalog-item .ci-name { font-weight: 600; font-size: 14.5px; }
.catalog-item .ci-meta { color: var(--muted); font-size: 12.5px; }
.catalog-search { display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:12px; padding:11px 14px; color:var(--muted); font-size:14px; margin-bottom:6px; }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  background: var(--card);
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16.5px;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "expand_more";
  font-family: 'Material Symbols Rounded';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px; line-height: 1; color: var(--green-400);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; font-size: 15.5px; }

/* CTA final */
.cta-final {
  text-align: center;
  background:
    radial-gradient(800px 400px at 50% 0%, var(--green-700), var(--green-900));
  color: #eafff5;
  border-radius: 28px;
  padding: 64px 28px;
  box-shadow: var(--shadow);
}
.cta-final h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; }
.cta-final p { color: #c9f2df; font-size: 1.12rem; margin-top: 16px; max-width: 48ch; margin-inline: auto; }
.cta-final .hero-cta { justify-content: center; margin-top: 30px; }
.cta-final .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.cta-final .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); padding-block: 44px; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-grid .brand { font-size: 16px; }
.footer-note { color: var(--muted); font-size: 13.5px; max-width: 52ch; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14.5px; }
.footer-links a { color: var(--ink-soft); }

/* ------- Responsivo ------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-block: 56px 64px; }
  .phone { order: -1; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 34px; }
  .split.reverse .split-media { order: 0; }
  .gallery { grid-template-columns: 1fr; gap: 44px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  section { padding-block: 60px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .hero-cta .btn, .cta-final .btn { width: 100%; }
  .nav-cta .btn-ghost { display: none; }
  /* CTA do header compacto para não estourar em telas estreitas */
  .nav { gap: 12px; }
  .brand { min-width: 0; }
  .brand img { width: 38px; height: 38px; }
  .nav-cta .btn-primary {
    font-size: 14px; padding: 10px 16px; min-height: 44px; white-space: nowrap;
  }
}
/* Muito estreito (ex.: 360px): mostra só o logo no header, garantindo o botão */
@media (max-width: 430px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
