/* ============================================================
   agrisphere — Main Stylesheet
   ============================================================ */

/* === TOKENS === */
:root {
  --lime:       #bef264;
  --lime-dark:  #65a30d;
  --lime-dim:   rgba(190, 242, 100, 0.15);
  --bg:         #050810;
  --bg-card:    #0f172a;
  --bg-section: rgba(15, 23, 42, 0.5);
  --text:       #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #475569;
  --border:     rgba(255, 255, 255, 0.08);
  --border-lime:rgba(190, 242, 100, 0.2);
  --glass-bg:   rgba(255, 255, 255, 0.03);
  --radius-sm:  12px;
  --radius-md:  20px;
  --radius-lg:  32px;
  --radius-xl:  40px;
  --transition: 0.2s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

/* === SHARED SECTION LABELS === */
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 12px;
  padding: 4px 12px;
  border: 1px solid var(--border-lime);
  border-radius: 9999px;
  background: var(--lime-dim);
}
.section-h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}
.section-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.75;
  margin-bottom: 48px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 68px;
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav.scrolled { background: rgba(5, 8, 16, 0.97); }

.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-icon {
  width: 34px; height: 34px;
  background: var(--lime);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #000; font-weight: 900; font-size: 17px;
  transform: rotate(12deg);
  box-shadow: 0 0 24px rgba(190, 242, 100, 0.35);
  flex-shrink: 0;
}
.nav-logo-text {
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--text);
}

.nav-links {
  display: none;
  gap: 36px;
}
.nav-links a {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--lime); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.btn-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--lime), var(--lime-dark));
  color: #000;
  padding: 9px 22px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 13px;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-cta:hover { opacity: 0.88; transform: translateY(-1px); }

.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav open */
.nav-links.nav-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 24px 32px;
  gap: 20px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 140px 24px 80px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(190, 242, 100, 0.13) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  padding: 7px 18px;
  margin-bottom: 28px;
  border-radius: 9999px;
  background: var(--lime-dim);
  border: 1px solid var(--border-lime);
  font-size: 11px; font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-h1 {
  font-size: clamp(56px, 11vw, 104px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.93;
  margin-bottom: 28px;
  color: var(--text);
}
.hero-h1 span { color: var(--lime); }
.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 52px;
  line-height: 1.75;
}

/* Store badges */
.store-badges, .cta-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 52px;
}
.badge-play img { height: 62px; transition: opacity var(--transition); }
.badge-play:hover img { opacity: 0.85; }

.badge-ios {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 8px 18px;
  height: 56px;
  transition: opacity var(--transition);
}
.badge-ios--dark { background: rgba(255,255,255,0.08); }
.badge-ios:hover { opacity: 0.85; }
.badge-ios svg { width: 24px; height: 24px; fill: #fff; flex-shrink: 0; }
.badge-ios-text { text-align: left; }
.badge-ios-text small {
  display: block;
  font-size: 10px; text-transform: uppercase;
  font-weight: 500; color: #fff; line-height: 1;
}
.badge-ios-text strong {
  display: block;
  font-size: 20px; font-weight: 700; color: #fff; line-height: 1.25;
}

/* Stats bar */
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 18px 36px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  justify-content: center;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 26px; font-weight: 800; color: var(--lime);
  letter-spacing: -0.03em; line-height: 1;
}
.stat-label {
  display: block;
  font-size: 11px; color: var(--text-faint);
  margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em;
}
.stat-divider {
  width: 1px; height: 36px;
  background: var(--border);
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: 100px 24px;
  background: var(--bg-section);
  text-align: center;
}
.features > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.features .section-sub { margin-left: auto; margin-right: auto; }

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
  border-color: var(--border-lime);
  transform: translateY(-3px);
}
.feature-card--large {
  grid-column: 1 / -1;
}
.feature-card--accent {
  background: var(--lime-dim);
  border-color: var(--border-lime);
}
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 {
  font-size: 20px; font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 14px; color: var(--text-muted); line-height: 1.7;
}
.feature-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 20px;
}
.feature-tags span {
  font-size: 11px; font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--lime-dim);
  color: var(--lime);
  border: 1px solid var(--border-lime);
}
.feature-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px; font-weight: 700;
  color: var(--lime);
  transition: gap var(--transition);
}
.feature-link:hover { text-decoration: underline; }

/* ============================================================
   AI AGENT
   ============================================================ */
.ai-section {
  padding: 100px 24px;
  background: #000;
}
.ai-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.ai-text p {
  font-size: 16px; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 24px;
}
.ai-bullets {
  display: flex; flex-direction: column; gap: 10px;
}
.ai-bullets li {
  font-size: 14px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.ai-bullets li::before { content: none; }

/* Chat widget */
.ai-chat {
  background: var(--bg-card);
  border: 1px solid var(--border-lime);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
}
.chat-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.chat-dot.red    { background: #ef4444; }
.chat-dot.yellow { background: #f59e0b; }
.chat-dot.green  { background: #22c55e; }
.chat-header span { margin-left: 4px; }

.chat-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.chat-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.chat-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.chat-av--user { background: var(--lime-dim); color: var(--lime); }
.chat-av--ai   { background: rgba(59,130,246,0.15); color: #60a5fa; }

.chat-bubble {
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.65;
  flex: 1;
}
.chat-bubble--user {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-style: italic;
  border-radius: 4px 16px 16px 16px;
}
.chat-bubble--ai {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 16px 4px 16px 16px;
}
.chat-bubble--ai strong {
  display: block; color: var(--text);
  font-size: 13px; margin-bottom: 8px;
}
.chat-bubble--ai p { color: var(--text-muted); }
.chat-source {
  margin-top: 10px;
  font-size: 11px; color: var(--text-faint);
}

/* Typing indicator */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 48px;
}
.chat-typing span {
  display: block;
  width: 7px; height: 7px;
  background: var(--text-faint);
  border-radius: 50%;
  animation: bounce 1.3s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ============================================================
   LEGAL HUB
   ============================================================ */
.legal { padding: 100px 24px; background: var(--bg); }
.legal-inner { max-width: 960px; margin: 0 auto; }

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.tab-btn {
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-weight: 700; font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
}
.tab-btn:hover {
  border-color: var(--border-lime);
  color: var(--lime);
}
.tab-btn--active {
  background: var(--lime);
  color: #000;
  border-color: var(--lime);
  transform: scale(1.04);
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-lime);
  border-radius: var(--radius-xl);
  padding: 48px;
  min-height: 440px;
}

.tab-panel { animation: fadeIn 0.3s ease; }
.tab-panel--hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tab-panel h3 {
  font-size: 22px; font-weight: 700;
  color: var(--lime); margin-bottom: 20px;
}
.tab-panel p, .tab-panel li {
  font-size: 14px; color: var(--text-muted); line-height: 1.85;
}
.tab-panel p + p { margin-top: 14px; }
.tab-panel em { color: var(--text-faint); }
.tab-panel strong { color: #e2e8f0; }
.tab-panel a { color: var(--lime); }
.tab-panel ul { list-style: disc; padding-left: 20px; margin-top: 12px; }
.tab-panel li + li { margin-top: 6px; }

/* Safety grid */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.safety-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.safety-item strong {
  display: block; color: var(--text);
  font-size: 13px; margin-bottom: 5px;
}
.safety-item span { font-size: 11px; color: var(--text-faint); }

/* Deletion */
.deletion-h3 { color: #f87171 !important; }
.btn-delete {
  display: inline-block;
  margin-top: 20px;
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13px;
  transition: background var(--transition);
}
.btn-delete:hover { background: rgba(239,68,68,0.22); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(180deg, #000 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-banner h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}
.cta-banner p {
  font-size: 17px; color: var(--text-muted);
  max-width: 480px; margin: 0 auto 40px; line-height: 1.7;
}
.cta-badges { margin-bottom: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 72px 32px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  padding-bottom: 48px;
}
.footer-brand .footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.footer-logo-icon {
  width: 28px; height: 28px;
  background: var(--lime);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #000; font-weight: 900; font-size: 13px;
}
.footer-brand .footer-logo span {
  font-size: 17px; font-weight: 800; letter-spacing: -0.04em;
}
.footer-brand p { font-size: 13px; color: var(--text-faint); }

.footer-links { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 13px; color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--lime); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-faint);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-hamburger { display: none; }
}

@media (max-width: 900px) {
  .ai-inner { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large { grid-column: 1; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
}

@media (max-width: 640px) {
  .hero { padding: 120px 20px 60px; }
  .hero-stats { gap: 20px; padding: 16px 24px; }
  .stat-divider { display: none; }
  .legal-card { padding: 28px 20px; }
  .legal-tabs { gap: 8px; }
  .tab-btn { padding: 8px 14px; font-size: 12px; }
  .nav { padding: 0 20px; }
  .features, .ai-section, .legal, .cta-banner { padding: 72px 20px; }
  .chat-box { padding: 20px; }
}
