:root {
  --bg: #060a08;
  --bg-2: #0c1410;
  --panel: rgba(10, 18, 14, 0.94);
  --border: rgba(163, 230, 53, 0.28);
  --lime: #a3e635;
  --yellow: #facc15;
  --bad: #f87171;
  --accent: #4ade80;
  --text: #eef6ea;
  --muted: #9ab8a0;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: radial-gradient(900px 480px at 10% -10%, #1a3a22 0%, var(--bg) 55%);
  line-height: 1.5;
}
a { color: var(--lime); text-decoration: none; }
a:hover { color: #d9f99d; }

.sg-banner {
  background: #102016; color: var(--yellow); font-size: 0.8rem;
  text-align: center; padding: 0.45rem 1rem; border-bottom: 1px solid #1e3324;
}
.sg-note, .disclaimer, .muted { color: var(--muted); font-size: 0.85rem; }
.sg-photo {
  display: grid; place-items: center; min-height: 220px; width: 100%; height: 100%;
  border: 1px dashed #355a40; border-radius: 12px; color: var(--yellow);
  background: repeating-linear-gradient(45deg, #0d1810, #0d1810 10px, #122016 10px, #122016 20px);
  font-size: 0.9rem; text-align: center; padding: 1rem;
  position: absolute; inset: 0;
}

.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 1.4rem;
  background: rgba(6,10,8,0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--text); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #a3e635, #22c55e);
  box-shadow: 0 0 16px rgba(163,230,53,0.4);
}
.nav-links { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 0.92rem; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  border-radius: 999px; padding: 0.65rem 1.15rem; cursor: pointer; font: inherit;
}
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.btn-primary { background: linear-gradient(135deg, #a3e635, #22c55e); border: 0; color: #0a1a0c; font-weight: 700; }
.btn-ghost { background: rgba(255,255,255,0.04); }

.hero {
  display: grid; grid-template-columns: 0.95fr 1.15fr; gap: 1.6rem;
  padding: 2.4rem 1.5rem 2rem; max-width: 1240px; margin: 0 auto;
}
.eyebrow { color: var(--lime); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; }
.hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); line-height: 1.15; margin: 0.4rem 0 1rem; }
.lead { color: var(--muted); max-width: 34rem; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.3rem 0; }
.stats-row { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.stats-row strong { display: block; font-size: 1.4rem; color: var(--lime); }
.stats-row span { color: var(--muted); font-size: 0.8rem; }

.title-banner {
  color: var(--lime); font-weight: 800; font-size: clamp(0.95rem, 2vw, 1.25rem);
  text-shadow: 0 0 18px rgba(163,230,53,0.45); margin-bottom: 0.55rem;
  letter-spacing: 0.01em;
}
.title-banner.thin { font-size: 0.95rem; margin: 0 0 0.6rem; }

.ranch-hud {
  display: grid; grid-template-columns: 1.5fr 0.85fr; gap: 0;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; overflow: hidden;
  background: #08110c; min-height: 360px;
}
.ranch-hud.tall { min-height: 440px; }
.ranch-stage { position: relative; min-height: 360px; }
.analytics-rail {
  background: rgba(6,12,9,0.92); border-left: 1px solid rgba(163,230,53,0.2);
  display: flex; flex-direction: column; max-height: 100%;
}
.analytics-rail header {
  font-size: 0.68rem; letter-spacing: 0.06em; color: var(--lime);
  padding: 0.65rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.analytics-rail ul { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.analytics-rail li {
  display: grid; grid-template-columns: 42px 1fr; gap: 0.55rem; align-items: center;
  padding: 0.55rem 0.7rem; border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.78rem;
}
.analytics-rail li.active { background: rgba(250,204,21,0.12); outline: 1px solid rgba(250,204,21,0.35); }
.thumb {
  width: 42px; height: 42px; border-radius: 8px;
  background: repeating-linear-gradient(45deg, #1a2a1c, #1a2a1c 6px, #243526 6px, #243526 12px);
  border: 1px solid #3a553e; color: var(--yellow); font-size: 0.55rem;
  display: grid; place-items: center; text-align: center;
}
.cattle-meta strong { display: block; color: var(--text); }
.cattle-meta span { color: var(--muted); }
.bars { display: flex; gap: 0.25rem; margin-top: 0.25rem; }
.bars i { height: 4px; border-radius: 2px; background: #2a3f30; flex: 1; }
.bars i.on { background: var(--lime); }
.bars i.warn { background: var(--yellow); }
.bars i.bad { background: var(--bad); }

.cow-box {
  position: absolute; z-index: 2; border: 2px solid var(--yellow); border-radius: 3px;
  box-shadow: 0 0 12px rgba(250,204,21,0.35);
}
.cow-box span {
  position: absolute; left: 0; top: -1.4rem; white-space: nowrap;
  font-size: 0.65rem; font-weight: 700; padding: 0.12rem 0.4rem;
  background: rgba(8,14,10,0.92); color: var(--yellow); border-radius: 3px;
}
.fence-line {
  position: absolute; z-index: 2; height: 0; border-top: 1px solid rgba(255,255,255,0.75);
}
.fence-line i {
  position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%;
  background: #fff;
}
.fence-line label {
  position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
  font-size: 0.65rem; color: #fff; background: rgba(0,0,0,0.55); padding: 0.1rem 0.35rem; border-radius: 3px;
  white-space: nowrap;
}
.predator-dot {
  position: absolute; z-index: 3; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bad); box-shadow: 0 0 16px 4px rgba(248,113,113,0.7);
  animation: pulse 1.2s infinite;
}
@keyframes pulse { 50% { opacity: 0.45; transform: scale(0.85); } }
.alert-pill {
  position: absolute; z-index: 3; left: 12px; bottom: 14px;
  background: rgba(120, 53, 15, 0.92); color: #fef3c7; border: 1px solid var(--yellow);
  border-radius: 8px; padding: 0.45rem 0.7rem; font-size: 0.78rem; font-weight: 700;
}

.section-head { max-width: 1100px; margin: 0 auto 1.4rem; padding: 0 1.5rem; }
.section-head h2 { margin: 0 0 0.35rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.hud-section, .how, .features, .faq, .cta { padding: 2.5rem 0; }

.pillars {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.pillars article, .feature-grid article {
  background: var(--bg-2); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius); padding: 1.2rem;
}
.pillars h3, .feature-grid h3 { margin: 0 0 0.4rem; color: var(--lime); font-size: 1.02rem; }
.pillars p, .feature-grid p { margin: 0; color: var(--muted); }

.steps {
  max-width: 900px; margin: 0 auto; padding: 0 1.5rem; list-style: none; counter-reset: step;
}
.steps li {
  counter-increment: step; position: relative; padding: 1rem 1rem 1rem 3.2rem;
  margin-bottom: 0.6rem; background: var(--bg-2); border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.steps li::before {
  content: counter(step); position: absolute; left: 0.9rem; top: 1rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--lime); color: #0a1a0c; font-weight: 700; font-size: 0.85rem;
  display: grid; place-items: center;
}
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: 0.9rem; }

.feature-grid {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}

.faq-list { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.faq-item {
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  margin-bottom: 0.6rem; background: var(--bg-2); overflow: hidden;
}
.faq-item button {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  padding: 0.95rem 1.1rem; font: inherit; cursor: pointer; font-weight: 600;
}
.faq-item .ans { display: none; padding: 0 1.1rem 1rem; color: var(--muted); }
.faq-item.open .ans { display: block; }

.cta { text-align: center; max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem; }
.cta h2 { margin-top: 0; }

.footer {
  border-top: 1px solid rgba(255,255,255,0.06); padding: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; color: var(--muted); font-size: 0.85rem;
}
.footer.compact { justify-content: space-between; }
.footer-links { display: flex; gap: 1rem; }
.footer strong { display: block; color: var(--text); }

.dash-body { background: #040706; }
.dash-layout {
  display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 1rem;
  max-width: 1280px; margin: 0 auto; padding: 1rem 1.2rem 2rem;
}
.dash-side {
  background: var(--panel); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 1rem; height: fit-content;
}
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.8rem 0 1rem; }
.kpi-grid div {
  background: #0a140e; border-radius: 10px; padding: 0.65rem;
  border: 1px solid rgba(255,255,255,0.06);
}
.kpi-grid span { display: block; color: var(--muted); font-size: 0.72rem; }
.kpi-grid strong { font-size: 1.15rem; color: var(--lime); }
.alert-log, .cam-list { list-style: none; padding: 0; margin: 0; }
.alert-log li, .cam-list li {
  padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.85rem;
}
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--bad); box-shadow: 0 0 8px var(--bad); margin-right: 0.35rem;
  animation: pulse 1.4s infinite;
}
.feed-meta {
  display: flex; justify-content: space-between; color: var(--muted);
  font-size: 0.85rem; padding: 0.55rem 0.15rem;
}

@media (max-width: 960px) {
  .hero, .pillars, .feature-grid, .ranch-hud, .dash-layout { grid-template-columns: 1fr; }
  .analytics-rail { max-height: 280px; border-left: 0; border-top: 1px solid rgba(163,230,53,0.2); }
  .nav-toggle { display: block; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; right: 1rem; top: 58px;
    background: #0c1410; padding: 1rem; border-radius: 12px; border: 1px solid #243528;
  }
}
