/* ═══════════════════════════════════════════
   AGRO_ULTRA SIMULATOR — Site Stylesheet
   Palette:
     --soil   #0d0f0b  (fundo profundo)
     --dark   #131710  (fundo médio)
     --panel  #1a1f16  (painéis)
     --border #2a3224  (bordas)
     --green  #3acc14  (acento principal)
     --lime   #8eff5a  (acento claro)
     --wheat  #e5c158  (dourado palha)
     --text   #d8e4d0  (texto claro)
     --muted  #52695e  (texto apagado)
   Tipografia:
     Display: Black Han Sans (wide, bold)
     Mono/UI: Space Mono (terminal feel)
     Body:    Noto Sans (leitura)
═══════════════════════════════════════════ */

/* ── RESET & BASE ─────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --soil:   #0d0f0b;
  --dark:   #131710;
  --panel:  #1a1f16;
  --border: #2a3224;
  --green:  #3acc14;
  --lime:   #8eff5a;
  --wheat:  #e5c158;
  --text:   #d8e4d0;
  --muted:  #52695e;
  --red:    #c23815;
  --radius: 4px;
  --ff-display: 'Black Han Sans', sans-serif;
  --ff-mono:    'Space Mono', monospace;
  --ff-body:    'Noto Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--soil);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── GRAIN TEXTURE ────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ── SHARED LAYOUT ────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 96px 0;
}
.section.alt {
  background: var(--dark);
}

.section-label {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: #fff;
  margin-bottom: 52px;
}
.section-title em {
  font-style: normal;
  color: var(--green);
}

.accent { color: var(--green); }

/* ── BUTTONS ──────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 1px;
  padding: 14px 32px;
  border-radius: var(--radius);
  transition: background 0.18s, transform 0.14s;
}
.btn-primary:hover { background: var(--lime); transform: translateY(-2px); }
.btn-primary.large { font-size: 1rem; padding: 18px 44px; }

.btn-ghost {
  display: inline-block;
  color: var(--text);
  font-family: var(--ff-mono);
  font-size: 0.85rem;
  padding: 14px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s, color 0.18s;
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

.btn-play {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 10px 20px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.btn-play:hover { background: var(--lime); }

/* ── HEADER ───────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(13, 15, 11, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  letter-spacing: 1px;
  line-height: 1;
}
.logo-agro  { color: var(--green); }
.logo-under { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a:not(.btn-play) {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.15s;
}
.nav-links a:not(.btn-play):hover { color: var(--green); }

/* ── HERO ─────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 28px 80px;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 204, 20, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 204, 20, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}

/* scanline sweep */
.hero-scan {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(58,204,20,0.4), transparent);
  animation: scanline 6s linear infinite;
  pointer-events: none;
}
@keyframes scanline {
  0%   { top: 0;    opacity: 1; }
  80%  { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}

.hero-eyebrow {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--green);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-family: var(--ff-display);
  line-height: 0.92;
  margin-bottom: 28px;
}
.ht-line {
  font-size: clamp(4rem, 11vw, 9rem);
  color: #fff;
  opacity: 0;
  animation: fadeUp 0.5s forwards;
}
.ht-line.accent  { color: var(--green); animation-delay: 0.15s; }
.ht-line.small   { font-size: clamp(1.4rem, 3.5vw, 2.8rem); color: var(--muted); animation-delay: 0.25s; letter-spacing: 4px; }
.ht-line:nth-child(1) { animation-delay: 0.05s; }

.hero-sub {
  max-width: 560px;
  font-size: 1.05rem;
  color: var(--text);
  opacity: 0.85;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.6s 0.35s forwards;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 0.45s forwards;
}

/* hero stats bar */
.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 80px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.6s 0.55s forwards;
}
.hstat {
  flex: 1;
  padding: 20px 24px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.hstat:last-child { border-right: none; }
.hstat-num {
  display: block;
  font-family: var(--ff-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.hstat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* ── SOBRE ────────────────────────────── */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: start;
}

.sobre-text p {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 0.97rem;
}
.sobre-text strong { color: var(--green); font-weight: 600; }

.feature-list {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--text);
}
.fl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* terminal card */
.sobre-card {
  position: sticky;
  top: 88px;
}
.card-screen {
  background: #0a0f08;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 24px 22px;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  box-shadow: 0 0 40px rgba(58,204,20,0.12), inset 0 0 30px rgba(0,0,0,0.5);
}
.screen-line { color: var(--text); margin-bottom: 8px; }
.screen-line.dim { color: var(--muted); }
.screen-line .green { color: var(--green); }
.screen-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}
.screen-line.blink { color: var(--green); }
.screen-line.blink::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 13px;
  background: var(--green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 1s step-end infinite;
}
@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* ── VEÍCULOS ─────────────────────────── */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.vehicle-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px 22px;
  position: relative;
  transition: border-color 0.18s, transform 0.18s;
  overflow: hidden;
}
.vehicle-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}
.vehicle-card:hover { border-color: var(--green); transform: translateY(-4px); }
.vehicle-card:hover::before { transform: scaleX(1); }

.vc-key {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--border);
  color: var(--wheat);
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: 1px;
}
.vc-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  line-height: 1;
}
.vc-name {
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 700;
}
.vc-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.vc-specs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.vc-specs b { color: var(--green); }

/* ── CONTROLES ────────────────────────── */
.controls-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: start;
}

/* teclado visual */
.kb-visual {
  display: flex;
  flex-direction: column;
  gap: 8px;
  user-select: none;
}
.kb-row {
  display: flex;
  gap: 8px;
}
.kb-key {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  color: var(--muted);
  cursor: default;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  box-shadow: 0 3px 0 var(--border);
}
.kb-key.active { border-color: var(--green); color: var(--green); background: rgba(58,204,20,0.08); }
.kb-key.wide { width: 120px; font-size: 0.6rem; }
.kb-blank { width: 52px; height: 52px; }

.controls-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ct-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  padding: 12px 20px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.ct-row:last-child { border-bottom: none; }
.ct-row.header {
  background: var(--panel);
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.ct-key {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  color: var(--wheat);
  font-weight: 700;
}
.ct-row span:last-child { color: var(--text); }

.tip-box {
  margin-top: 36px;
  background: rgba(58,204,20,0.06);
  border: 1px solid rgba(58,204,20,0.25);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}
.tip-label {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--green);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── MUNDO ────────────────────────────── */
.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.world-card {
  background: var(--soil);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.18s;
}
.world-card:hover { border-color: var(--wheat); }
.wc-emoji { font-size: 2rem; margin-bottom: 14px; line-height: 1; }
.world-card h3 {
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 10px;
}
.world-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* ── CTA SECTION ──────────────────────── */
.cta-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  background: var(--dark);
  border-top: 1px solid var(--border);
}
.cta-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.cta-tag {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.cta-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
}
.cta-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 36px;
}

/* animated field in CTA */
.cta-field {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 6px;
  align-items: end;
}
.field-plant {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: growPlant linear forwards;
  opacity: 0;
}
.field-plant .stem {
  width: 3px;
  background: #3a6820;
  border-radius: 2px;
}
.field-plant .head {
  width: 10px;
  height: 14px;
  background: #4a8a28;
  border-radius: 3px 3px 0 0;
  position: relative;
}
.field-plant.ripe .stem { background: #5a8030; }
.field-plant.ripe .head { background: #e5c158; }

@keyframes growPlant {
  0%   { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
  20%  { opacity: 1; }
  100% { opacity: 1; transform: scaleY(1); transform-origin: bottom; }
}

/* ── FOOTER ───────────────────────────── */
.site-footer {
  background: var(--soil);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-logo {
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 1px;
}
.footer-logo span { color: var(--green); }
.footer-sub { font-size: 0.78rem; color: var(--muted); }
.footer-link {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--green);
  transition: color 0.15s;
}
.footer-link:hover { color: var(--lime); }

/* ── ANIMATIONS ───────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* scroll-triggered fade */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ───────────────────────── */
@media (max-width: 860px) {
  .nav-links a:not(.btn-play) { display: none; }

  .sobre-grid {
    grid-template-columns: 1fr;
  }
  .sobre-card { position: static; }

  .controls-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .kb-visual { align-items: center; }

  .cta-section .container {
    grid-template-columns: 1fr;
  }
  .cta-field { display: none; }

  .hero-stats { flex-wrap: wrap; }
  .hstat { min-width: 50%; border-bottom: 1px solid var(--border); }
}

@media (max-width: 540px) {
  .hero { padding: 100px 20px 60px; }
  .vehicles-grid { grid-template-columns: 1fr; }
  .world-grid { grid-template-columns: 1fr; }
}

/* Reduzir animações para quem prefere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}