/* ==========================================================================
   Farm Game — landing page
   Loaded after base.css, which supplies the tokens, buttons, nav and footer.
   ========================================================================== */

/* --- Hero ----------------------------------------------------------------- */

.hero {
  /* One source of truth for the landscape band: the scene is this tall, and the
     hero text reserves (almost) the same space so the two never collide.
     20vw against a 16:3 viewBox means the SVG only ever trims its sides. */
  --scene-h: max(220px, 20vw);

  position: relative;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 62%, var(--sky-bottom) 100%);
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding-bottom: calc(var(--scene-h) * .92);
}

.eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, .8);
  border: 2px solid rgba(255, 255, 255, .95);
  color: #2f6b8f;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  letter-spacing: -.015em;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .6);
}
.hl {
  color: var(--barn);
  background: linear-gradient(180deg, transparent 64%, rgba(230, 169, 53, .55) 64%);
}

.hero__lede {
  margin: 1.25rem auto 0;
  max-width: 620px;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: #2c4356;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .85rem;
  margin-top: 2rem;
}

.hero__note {
  margin-top: 1rem;
  font-size: .9rem;
  color: #3f6076;
  opacity: .85;
}

/* Hero sky (sun + clouds) --------------------------------------------------*/

.sky {
  position: absolute;
  inset: 0 0 var(--scene-h) 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 12%;
  right: 7%;
  width: clamp(58px, 6vw, 104px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff6d2, #ffd75e 65%);
  box-shadow: 0 0 60px rgba(255, 210, 80, .55);
}

.sun::before {
  content: "";
  position: absolute;
  inset: -46%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
              rgba(255, 214, 90, .8) 0 4deg, transparent 4deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 46%, #000 47%);
          mask: radial-gradient(circle, transparent 46%, #000 47%);
  animation: spin 110s linear infinite;
}

.cloud {
  position: absolute;
  width: clamp(78px, 9vw, 150px);
  aspect-ratio: 3 / 1;
  background: #fff;
  border-radius: 999px;
  opacity: .9;
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.cloud::before { width: 52%; height: 130%; top: -58%; left: 14%; }
.cloud::after  { width: 36%; height: 92%;  top: -38%; left: 52%; }

.cloud--a { top: 13%; left: 6%;  animation: drift 62s ease-in-out infinite; }
.cloud--b { top: 46%; left: 80%; transform: scale(.72); animation: drift 84s ease-in-out infinite reverse; }
.cloud--c { top: 60%; left: 11%; transform: scale(.55); opacity: .72; animation: drift 96s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(46px); }
}
/* The scaled clouds need their scale preserved through the drift. */
@keyframes drift-sm {
  0%, 100% { transform: translateX(0) scale(var(--s, 1)); }
  50%      { transform: translateX(46px) scale(var(--s, 1)); }
}
.cloud--b { --s: .72; animation-name: drift-sm; }
.cloud--c { --s: .55; animation-name: drift-sm; }

/* Hero landscape -----------------------------------------------------------*/

.scene {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--scene-h);
  z-index: 1;
  pointer-events: none;
}

.scene__svg { display: block; width: 100%; height: 100%; }

.scene__tractor {
  position: absolute;
  bottom: 6%;
  left: -12%;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  animation: drive 26s linear infinite;
  z-index: 3;
}

@keyframes drive {
  0%   { transform: translateX(0); }
  100% { transform: translateX(130vw); }
}

/* --- Sections -------------------------------------------------------------- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section--chain {
  background: var(--cream-deep);
  border-block: 2px solid var(--line);
}

.section__title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  text-align: center;
}

.section__lede {
  max-width: 620px;
  margin: 1rem auto 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* --- Stages ---------------------------------------------------------------- */

.stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
  counter-reset: stage;
}

.stage {
  position: relative;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.stage__icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: .85rem;
}

.stage__step {
  font-family: Fredoka, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--wheat-deep);
  margin-bottom: .35rem;
}

.stage__title { font-size: 1.22rem; margin-bottom: .5rem; }
.stage__text { font-size: .96rem; color: var(--ink-soft); }

/* --- Production chain ------------------------------------------------------ */

.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 3rem;
}

.chain__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  min-width: 118px;
  box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.chain__node:hover { transform: translateY(-4px); }

.chain__node--gold {
  background: linear-gradient(180deg, #fff5dc, #ffe9b6);
  border-color: var(--wheat);
}

.chain__icon { font-size: 2rem; line-height: 1; }
.chain__label { font-family: Fredoka, sans-serif; font-weight: 600; }
.chain__price {
  font-size: .82rem;
  font-weight: 700;
  color: var(--grass-deep);
  letter-spacing: .04em;
}

.chain__arrow {
  font-size: 1.6rem;
  color: var(--wood);
  font-weight: 700;
}

.chain__foot {
  margin-top: 2rem;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
}

/* --- Feature cards ---------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--grass); }

.card__icon { font-size: 2.1rem; line-height: 1; margin-bottom: .75rem; }
.card__title { font-size: 1.2rem; margin-bottom: .45rem; }
.card__text { font-size: .96rem; color: var(--ink-soft); }

/* --- Closing CTA ------------------------------------------------------------ */

.cta {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 215, 94, .18), transparent 45%),
    linear-gradient(180deg, var(--grass) 0%, var(--grass-deep) 100%);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  text-align: center;
  overflow: hidden;
}

.cta::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 26px;
  background: repeating-linear-gradient(90deg, var(--grass-deep) 0 26px, #43801f 26px 52px);
  opacity: .5;
}

.cta__title {
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .12);
}

.cta__text { margin-top: .85rem; font-size: 1.08rem; opacity: .95; }

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .85rem;
  margin-top: 2rem;
}

/* --- Responsive ---------------------------------------------------------------- */

/* On a phone the hero text fills the sky, so there is nowhere for the sun and
   clouds to sit without colliding with it. The landscape carries the scene. */
@media (max-width: 700px) {
  .sky { display: none; }
}

@media (max-width: 560px) {
  .chain { flex-direction: column; }
  .chain__arrow { transform: rotate(90deg); }
  .chain__node { width: 100%; max-width: 260px; }
}
