/* GameAgro — landing page. Depende de css/tokens.css (carregado antes). */

body {
  overflow-x: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(var(--container), calc(100% - 28px));
  min-height: 68px;
  margin: 14px auto 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 254, 251, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--forest);
  display: grid;
  place-items: center;
  color: var(--paper);
}

.brand-mark .icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.brand strong {
  display: block;
  color: var(--forest-strong);
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 150ms ease, color 150ms ease;
}

.site-nav a:hover {
  background: var(--forest-tint);
  color: var(--forest-strong);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--forest);
  align-items: center;
  justify-content: center;
}

.nav-toggle .icon {
  width: 20px;
  height: 20px;
}

.section-band,
.content-section {
  width: min(var(--container), calc(100% - 28px));
  margin: 0 auto;
}

/* ---------- hero ---------- */
.hero-section {
  padding: clamp(48px, 7vw, 88px) 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.86fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
}

.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

h1 {
  max-width: 660px;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 5vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--forest-strong);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  color: var(--forest-strong);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.28rem;
  color: var(--forest-strong);
}

.lead,
.about-section p,
.creator-card p,
.game-card p {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 30px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stat-strip span {
  padding: 16px 14px;
  background: var(--surface);
  display: grid;
  gap: 2px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.stat-strip strong {
  color: var(--forest-strong);
  font-family: var(--font-display);
  font-size: 1.7rem;
}

/* ---------- hero diagram panel ---------- */
.hero-panel {
  padding: 20px;
}

.hero-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.hero-panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-diagram {
  width: 100%;
  height: auto;
  display: block;
}

.hero-diagram-band {
  opacity: 0;
  animation: heroBandIn 620ms ease forwards;
}

@keyframes heroBandIn {
  to { opacity: var(--final-opacity, 1); }
}

.hero-diagram-root {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: heroRootGrow 1.3s 550ms ease forwards;
}

@keyframes heroRootGrow {
  to { stroke-dashoffset: 0; }
}

.hero-panel-facts {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.hero-panel-facts div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.hero-panel-facts strong {
  color: var(--forest-strong);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ---------- section heading ---------- */
.content-section {
  padding: clamp(56px, 7vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.hero-section {
  border-top: 0;
}

.section-heading {
  max-width: 640px;
  margin-bottom: 32px;
}

/* ---------- game grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.game-grid .game-card:nth-child(1) { transition-delay: 0ms; }
.game-grid .game-card:nth-child(2) { transition-delay: 50ms; }
.game-grid .game-card:nth-child(3) { transition-delay: 100ms; }
.game-grid .game-card:nth-child(4) { transition-delay: 150ms; }
.game-grid .game-card:nth-child(5) { transition-delay: 200ms; }
.game-grid .game-card:nth-child(6) { transition-delay: 250ms; }
.game-grid .game-card:nth-child(7) { transition-delay: 300ms; }
.game-grid .game-card:nth-child(8) { transition-delay: 350ms; }

.game-card:hover {
  transition-delay: 0ms;
}

.game-cover {
  position: relative;
  height: 108px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.game-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.18), transparent 46%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.12), transparent 55%);
}

.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.22) 48%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 650ms ease;
}

.game-card:hover .game-cover::after {
  transform: translateX(130%);
}

.game-cover-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  color: rgba(245, 243, 236, 0.95);
  stroke-width: 1.3;
  transition: transform 300ms ease;
}

.game-card:hover .game-cover-icon {
  transform: scale(1.12) rotate(-4deg);
}

.cover-pulveriza { background: linear-gradient(135deg, #2d6b78, #16342a); }
.cover-solos { background: linear-gradient(135deg, #8a5a3a, #4a3020); }
.cover-raizes { background: linear-gradient(135deg, #2f4a3a, #16342a); }
.cover-mercado { background: linear-gradient(135deg, #a97a2e, #6b4423); }
.cover-pomar { background: linear-gradient(135deg, #5a2a6b, #2f6b3a); }
.cover-pivo { background: linear-gradient(135deg, #145a63, #0c2733); }
.cover-agrocalc { background: linear-gradient(135deg, #1f3d2e, #a8592f); }
.cover-agroquest { background: linear-gradient(135deg, #2f6b3a, #a97a2e); }
.cover-feijoeiro { background: linear-gradient(135deg, #3f7a3a, #1a2e10); }

.game-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.game-body .tag {
  align-self: flex-start;
  margin-bottom: 10px;
}

.game-body h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.game-body p {
  flex: 1;
  margin-bottom: 16px;
  font-size: 0.89rem;
  line-height: 1.5;
}

.game-body .btn {
  align-self: flex-start;
  min-height: 40px;
  padding: 9px 16px;
  font-size: 0.86rem;
}

/* ---------- soon ---------- */
.soon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.soon-card {
  min-height: 130px;
  padding: 20px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.soon-card strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--forest-strong);
}

/* ---------- ranking ---------- */
.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 28px;
  align-items: start;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: end;
}

.podium-item {
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: center;
}

.podium-item span {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--forest);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}

.podium-item strong,
.podium-item small {
  display: block;
}

.podium-item strong {
  font-family: var(--font-display);
}

.podium-item small {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.podium-item.empty strong,
.podium-item.empty small {
  color: var(--ink-faint);
}

.first {
  padding-top: 26px;
  border-color: var(--forest);
}

.first span {
  background: var(--clay);
}

.table-card {
  overflow-x: auto;
  padding: 20px;
}

.code-note {
  margin: 14px 0 0;
  color: var(--ink-faint);
  font-size: 0.86rem;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.feature-list {
  padding: 4px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.feature-item {
  padding: 16px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.94rem;
}

.feature-item .icon {
  color: var(--clay-strong);
  width: 20px;
  height: 20px;
}

/* ---------- professor ---------- */
.creator-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding: 28px;
}

.avatar-mono {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-md);
  background: var(--forest);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.role {
  color: var(--clay-strong);
  font-weight: 600;
  font-size: 0.94rem;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 0;
  padding: 48px max(14px, calc((100vw - var(--container)) / 2)) 24px;
  color: rgba(245, 243, 236, 0.86);
  background: var(--forest-strong);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 24px;
}

.footer-brand strong,
.footer-brand small {
  color: var(--paper);
}

.footer-brand .brand-mark {
  background: var(--paper);
  color: var(--forest-strong);
}

.site-footer h3 {
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(245, 243, 236, 0.6);
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--paper);
  font-weight: 500;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--clay);
}

.site-footer p {
  line-height: 1.5;
  font-size: 0.92rem;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 243, 236, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.82rem;
  color: rgba(245, 243, 236, 0.6);
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-section,
  .ranking-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .creator-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .avatar-mono {
    width: 96px;
    height: 96px;
    font-size: 1.6rem;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: grid;
  }

  .soon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .site-header,
  .section-band,
  .content-section {
    width: min(100% - 18px, 540px);
  }

  .brand small {
    display: none;
  }

  .hero-actions,
  .stat-strip,
  .game-grid,
  .soon-grid,
  .footer-grid,
  .podium {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .creator-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
}
