/* ── Farmer's Rise — site stylesheet ───────────────────────────────
   Same farm palette as the sister sites: sunny sky, field grass, dirt
   brown, wheat-gold accents, deep barn-greens for the heavy sections.
   Fredoka display font throughout.
   ─────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/fredoka-latin.woff2') format('woff2');
}

:root {
  --font-display: 'Fredoka', 'Arial Rounded MT Bold', Arial, sans-serif;
  --font-body: 'Segoe UI', Arial, sans-serif;

  --sky: #7ec8f7;
  --sky-light: #d6f2ff;
  --grass: #5fa83c;
  --grass-dark: #55a037;
  --hill: #4d8f4d;
  --dirt: #a5773f;
  --dirt-dark: #8a5a2b;
  --rumble: #9e49ad;
  --rumble-dark: #7d3489;
  --wheat: #f2d15c;
  --gold: #ffd34d;
  --cream: #f5efe0;
  --ink: #22301c;
  --forest-1: #16221a;
  --forest-2: #24382a;
  --leaf: #7ddf64;
  --leaf-dark: #3d9a3d;
  --danger: #ff7a6b;
  --card: #ffffff;

  --radius-card: 18px;
  --radius-pill: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

img {
  max-width: 100%;
}

a {
  color: var(--rumble);
}

/* ── Navigation ─────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px clamp(14px, 4vw, 40px);
  background: rgba(245, 239, 224, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid rgba(95, 168, 60, 0.35);
}

/* Content is capped — the bar itself stays full-width. */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
}

.nav-brand em {
  font-style: normal;
  color: var(--rumble);
  transform: rotate(-2deg);
  display: inline-block;
}

.nav-brand img {
  border-radius: 10px;
  transition: transform 0.25s ease;
}

.nav-brand:hover img {
  transform: rotate(-6deg) scale(1.08);
}

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
}

.nav-links a:hover {
  background: rgba(95, 168, 60, 0.16);
}

.nav-links a.active {
  background: var(--leaf-dark);
  color: #ffffff;
}

/* Play Now — compact purple pill matching the site's accent. */
.nav-links a.nav-play {
  margin-left: 6px;
  background: linear-gradient(180deg, var(--rumble), var(--rumble-dark));
  color: #ffffff;
  box-shadow: 0 3px 0 #5e2567;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.12s ease;
}

.nav-links a.nav-play:hover {
  background: linear-gradient(180deg, var(--rumble), var(--rumble-dark));
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.nav-links a.nav-play:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #5e2567;
}

/* Hamburger — desktop hides it, mobile swaps the links for a dropdown. */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 3px solid rgba(95, 168, 60, 0.45);
  border-radius: 14px;
  background: var(--card);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-nav.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(var(--sky) 0%, var(--sky-light) 58%, var(--grass) 58%);
  /* background: linear-gradient(var(--sky) 5%, var(--sky-light) 40%, var(--grass) 80%, var(--forest-2) 100%); */
  padding: 120px 40px;
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 6vw, 80px);
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.hero-copy {
  max-width: 480px;
  text-align: center;
}

@keyframes title-sway {
  from { transform: rotate(-1.6deg); }
  to { transform: rotate(1.6deg); }
}

.hero-tagline {
  margin: 18px auto 26px;
  padding: 12px 26px;
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--ink);
  background-color: var(--card);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 0 rgba(34, 48, 28, 0.12);
}

.hero-tagline .tagline-em {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--rumble);
}

/* "Free to play" shout line. */
.free-note {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0 auto 30px auto;
  padding: 5px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.75;
  background: greenyellow;
  border-radius: 10px;
}

/* Sun + clouds */
.sun {
  position: absolute;
  top: 42px;
  /* Stay inside the 1200px content zone on wide screens. */
  right: max(9%, calc((100vw - 1200px) / 2));
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #f8e08e;
  box-shadow: 0 0 60px 26px rgba(248, 224, 142, 0.6);
  z-index: 1;
}

.cloud {
  position: absolute;
  background: #ffffff;
  border-radius: 999px;
  opacity: 0.9;
  z-index: 1;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-1 {
  top: 60px;
  left: -140px;
  width: 140px;
  height: 44px;
  animation: cloud-drift 55s linear infinite;
}
.cloud-1::before { width: 60px; height: 60px; top: -28px; left: 22px; }
.cloud-1::after { width: 44px; height: 44px; top: -20px; left: 72px; }

.cloud-2 {
  top: 140px;
  left: -100px;
  width: 100px;
  height: 34px;
  animation: cloud-drift 75s linear infinite;
  animation-delay: -30s;
}
.cloud-2::before { width: 44px; height: 44px; top: -20px; left: 16px; }
.cloud-2::after { width: 34px; height: 34px; top: -15px; left: 52px; }

.cloud-3 {
  top: 26px;
  left: -180px;
  width: 180px;
  height: 50px;
  opacity: 0.65;
  animation: cloud-drift 95s linear infinite;
  animation-delay: -60s;
}
.cloud-3::before { width: 76px; height: 76px; top: -34px; left: 30px; }
.cloud-3::after { width: 54px; height: 54px; top: -24px; left: 96px; }

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 300px)); }
}

/* Parallax horizon — rolling hills, tiled. */
.hills {
  position: absolute;
  left: 0;
  right: 0;
  background-repeat: repeat-x;
  background-size: auto 100%;
  z-index: 2;
  pointer-events: none;
}

.hills-far {
  top: calc(58% - 74px);
  height: 80px;
  background-image: url('../img/hills-far.png');
  background-size: 512px 100%;
}

.hills-near {
  top: calc(58% - 26px);
  height: 90px;
  background-image: url('../img/hills-near.png');
  background-size: 384px 100%;
  background-position-x: 130px;
}

/* ── Hero visual — the game logo, swaying gently ──────────────────── */

.hero-visual {
  position: relative;
  flex-shrink: 0;
  align-self: center;
}

/* Two-layer logo — the farm-scene art underneath, the FARMER'S RISE
   badge pinned onto the wooden sign at its base. */
.hero-logo-stack {
  position: relative;
  width: min(420px, 80vw);
}

.hero-logo-base {
  display: block;
  width: 100%;
  filter: drop-shadow(0 10px 24px rgba(34, 48, 28, 0.35));
  animation: title-sway 4s ease-in-out infinite alternate;
  transform-origin: bottom center;
}

.hero-logo-badge {
  position: absolute;
  left: 50%;
  bottom: 3%;
  width: 82%;
  transform: translateX(-50%);
  animation: badge-wiggle 4.5s ease-in-out infinite;
}

/* A quick wiggle every ~4.5s — the badge settles most of the time. */
@keyframes badge-wiggle {
  0%, 82%   { transform: translateX(-50%) rotate(0deg); }
  85%       { transform: translateX(-50%) rotate(-3.5deg); }
  88%       { transform: translateX(-50%) rotate(3deg); }
  91%       { transform: translateX(-50%) rotate(-2deg); }
  94%       { transform: translateX(-50%) rotate(1deg); }
  97%, 100% { transform: translateX(-50%) rotate(0deg); }
}

/* ── Store buttons — the game's own green pill style ────────────── */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.store-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--leaf), var(--leaf-dark));
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-display);
  box-shadow:
    0 5px 0 #2a6e2a,
    0 12px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.12s ease;
}

.store-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.store-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #2a6e2a;
}

.store-btn svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 3px;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.store-btn-top {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  opacity: 0.85;
}

.store-btn-name {
  font-size: 19px;
  font-weight: 700;
}

.store-btn-soon {
  position: absolute;
  top: -10px;
  right: -8px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transform: rotate(6deg);
  box-shadow: 0 2px 0 rgba(34, 48, 28, 0.25);
}

/* Solo store-styled button (e.g. the delete-account mailto). */
.store-btn-solo {
  margin: 6px 0;
}

/* ── Generic sections & cards ────────────────────────────────────── */

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 80px) clamp(16px, 4vw, 32px);
}

.section-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: 2px;
  text-align: center;
  color: var(--ink);
}

.section-title .w {
  display: inline-block;
}

.section-title .w1 { transform: rotate(-1.5deg); }
.section-title .w2 { transform: rotate(1.5deg); }

.section-sub {
  margin: 0 auto 34px;
  max-width: 560px;
  text-align: center;
  font-size: 17px;
  opacity: 0.75;
}

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: 0 4px 0 rgba(34, 48, 28, 0.12);
}

/* ── How to farm ─────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.step-card {
  text-align: center;
  position: relative;
  padding-top: 40px;
}

.step-num {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--rumble);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 40px;
  box-shadow: 0 3px 0 var(--rumble-dark);
}

.step-card h3 {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 1px;
}

.step-card p {
  margin: 0;
  font-size: 15px;
  opacity: 0.8;
}

.step-icon-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  margin-bottom: 4px;
}

/* Actions atlas is a 100px-wide vertical strip of 100×100 frames; shown
   at 48px so the whole sheet scales to 48×1056 and each icon gets its
   frame via inline position-y. */
.action-sprite {
  display: block;
  width: 48px;
  height: 48px;
  background-image: url('../sprites/actions.webp');
  background-repeat: no-repeat;
  background-size: 48px 1056px;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.2));
}

/* Progression arrow between the action icons. */
.step-arrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--leaf-dark);
  opacity: 0.8;
  transform: rotate(-3deg);
}

.step-arrow::before {
  content: '→';
}

/* ── Meet the locals ─────────────────────────────────────────────── */

.locals-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.local-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 250px;
  padding: 18px 16px;
  border: 3px solid transparent;
  border-radius: var(--radius-card);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(34, 48, 28, 0.12);
  transition: transform 0.15s ease;
}

.local-card:hover {
  transform: translateY(-4px) rotate(-0.8deg);
  border-color: var(--leaf-dark);
}

/* Portraits are tall full-body shots — crop to head & shoulders. */
.local-card-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  background: var(--sky-light);
  border: 3px solid rgba(95, 168, 60, 0.35);
}

.local-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 1px;
}

/* Wooden-sign role chip. */
.local-card-role {
  padding: 3px 8px 6px 8px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    -45deg,
    var(--dirt),
    var(--dirt) 8px,
    var(--dirt-dark) 8px,
    var(--dirt-dark) 16px
  );
}

.local-card-role i {
  font-style: normal;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #1a1a1a;
  background: var(--cream);
  border-radius: 10px;
  white-space: nowrap;
}

.local-card-quote {
  margin: 4px auto 2px auto;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.75;
  font-style: italic;
  text-align: center;
}

.locals-outro {
  margin: 22px auto 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  opacity: 0.7;
}

/* ── The four farms ──────────────────────────────────────────────── */

.farms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.farm-card {
  padding: 0;
  overflow: hidden;
  text-align: center;
}

.farm-card-img {
  position: relative;
}

.farm-card-img img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.farm-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  box-shadow: 0 2px 0 rgba(34, 48, 28, 0.3);
  transform: rotate(-3deg);
}

.farm-badge-spring { background: #54b04a; }
.farm-badge-summer { background: #e8a13c; }
.farm-badge-autumn { background: #c96f2e; }
.farm-badge-winter { background: #5a9fd4; }

.farm-card-body {
  padding: 12px 14px 16px;
}

.farm-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 1px;
}

.farm-card-blurb {
  font-size: 15px;
  opacity: 0.7;
  font-style: italic;
}

.farm-card-meta {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ── Trailer ─────────────────────────────────────────────────────── */

/* ── Trailer band — full-bleed video straight after the hero ────── */

.trailer-band {
  background: #000000;
}

.trailer-band iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* ── Town ────────────────────────────────────────────────────────── */

.town-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.town-card {
  padding: 0;
  overflow: hidden;
  text-align: center;
}

.town-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.town-card-body {
  padding: 12px 14px 16px;
}

.town-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 1px;
}

.town-card-blurb {
  font-size: 15px;
  opacity: 0.7;
  font-style: italic;
}

/* ── Crops ───────────────────────────────────────────────────────── */

.crop-sub {
  margin: 10px auto 14px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.85;
}

.crops-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.crop-card {
  flex: 0 1 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  text-align: center;
  transition: transform 0.15s ease;
}

.crop-card:hover {
  transform: translateY(-3px) rotate(1.5deg);
}

/* Sprite strip is 100px wide; shown at 56px, so the whole sheet scales
   to 56×1400 and each card gets its frame via inline position-y. */
.crop-sprite {
  display: block;
  width: 56px;
  height: 56px;
  background-image: url('../sprites/crops.webp');
  background-repeat: no-repeat;
  background-size: 56px 1400px;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.2));
}

.crop-sprite-mystery {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest-2);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  filter: none;
}

.crop-card.mystery {
  background: linear-gradient(160deg, var(--forest-2), var(--forest-1));
  color: #eef5ea;
}

.crop-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.crop-outro {
  margin: 26px auto 0;
  max-width: 520px;
  text-align: center;
  font-size: 15px;
  font-style: italic;
  opacity: 0.7;
}

/* ── Features strip ──────────────────────────────────────────────── */

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0 auto 20px auto;
}

.feature-item {
  flex: 0 1 320px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: 0 4px 0 rgba(34, 48, 28, 0.12);
}

.feature-icon {
  flex-shrink: 0;
  font-size: 26px;
  line-height: 1.2;
}

.feature-item h3 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.feature-item p {
  margin: 0;
  font-size: 13px;
  opacity: 0.75;
}

/* ── CTA band ────────────────────────────────────────────────────── */

.cta-band {
  background: radial-gradient(120% 120% at 50% -10%, var(--forest-2), var(--forest-1));
  color: var(--cream);
  text-align: center;
  padding: clamp(70px, 8vh, 100px) 40px;
}

.cta-band .section-title {
  color: var(--gold);
}

.cta-band p {
  margin: 25px auto;
  max-width: 440px;
  opacity: 0.85;
}

.cta-band .free-note {
  color: var(--cream);
  background: black;
}

/* ── Top Farmers page ────────────────────────────────────────────── */

.scores-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(var(--sky), var(--sky-light) 70%, #cfeebf);
  padding: 60px 40px;
  text-align: center;
}

.game-title {
  position: relative;
  margin: 0 auto 20px auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 8vw, 72px);
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: 4px;
  animation: title-sway 4s ease-in-out infinite alternate;
  transform-origin: bottom center;
}

.title-word {
  display: block;
}

.title-word-1 {
  transform: rotate(-2.5deg);
}

.title-word-3 {
  transform: rotate(-1.5deg);
}

.scores-hero p {
  margin: 10px auto 0;
  max-width: 480px;
  font-size: 17px;
  opacity: 0.8;
}

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 200px;
  padding: 18px 14px;
  border-radius: var(--radius-card);
  background: var(--card);
  border: 3px solid transparent;
  box-shadow: 0 4px 0 rgba(34, 48, 28, 0.12);
  text-align: center;
}

.podium-card img {
  width: 96px;
  height: 84px;
  object-fit: contain;
}

.podium-first {
  border-color: var(--gold);
  transform: translateY(-14px);
  background: linear-gradient(170deg, #fff8e1, #ffffff 60%);
}

.podium-second { border-color: #b8c4cc; }
.podium-third { border-color: #d99a5b; }

.podium-medal {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 3px 12px;
  border-radius: 12px;
}

.podium-first .podium-medal { background: var(--gold); color: var(--ink); }
.podium-second .podium-medal { background: #b8c4cc; color: var(--ink); }
.podium-third .podium-medal { background: #d99a5b; color: #ffffff; }

.podium-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.5px;
}

.podium-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--rumble);
  line-height: 1;
}

.podium-meta {
  font-size: 12px;
  opacity: 0.7;
}

.scores-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 3px 0 rgba(34, 48, 28, 0.1);
}

.score-rank {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(126, 200, 247, 0.4);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-row:nth-child(-n + 3) .score-rank {
  background: var(--gold);
  color: var(--ink);
}

.score-tractor {
  width: 56px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.score-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.score-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-meta {
  font-size: 12px;
  opacity: 0.65;
}

.score-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--rumble);
  flex-shrink: 0;
}

.score-value small {
  font-size: 14px;
  opacity: 0.7;
}

.scores-empty {
  text-align: center;
  padding: 20px 10px 40px;
}

.scores-empty img {
  width: 190px;
  opacity: 0.9;
}

.scores-empty p {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  opacity: 0.7;
}

/* ── Legal pages ─────────────────────────────────────────────────── */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(30px, 6vh, 60px) clamp(16px, 4vw, 32px);
}

.legal-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: clamp(22px, 5vw, 44px);
  box-shadow: 0 4px 0 rgba(34, 48, 28, 0.12);
}

.legal-card h1 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: 2px;
}

.legal-updated {
  margin: 0 0 24px;
  font-size: 13px;
  opacity: 0.6;
}

.legal-card h2 {
  margin: 28px 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--leaf-dark);
}

.legal-card h3 {
  margin: 18px 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.legal-card p,
.legal-card li {
  font-size: 15px;
}

.legal-card ul,
.legal-card ol {
  padding-left: 22px;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  background: var(--forest-1);
  color: #cfe3b8;
  padding: 44px 20px 30px;
  text-align: center;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
}

.footer-links a {
  color: #cfe3b8;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(207, 227, 184, 0.12);
  color: #cfe3b8;
  transition: background 0.15s ease, transform 0.15s ease;
}

.footer-social a:hover {
  background: rgba(255, 211, 77, 0.25);
  color: var(--gold);
  transform: translateY(-2px);
}

.footer-quip {
  margin: 0;
  font-size: 13px;
  font-style: italic;
  opacity: 0.7;
}

.footer-legal {
  margin: 0;
  font-size: 12px;
  opacity: 0.5;
}

.footer-legal a {
  color: inherit;
}

.footer-legal a:hover {
  color: var(--gold);
}

/* ── Tablet ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero {
    padding: 70px 30px;
  }

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

/* ── Small screens ───────────────────────────────────────────────── */

@media (max-width: 640px) {
  .hero {
    padding: 50px 16px;
  }

  .farms-grid {
    grid-template-columns: 1fr;
  }

  .nav-brand span {
    font-size: 18px;
  }

  .nav-toggle {
    display: block;
  }

  /* Links become a floating dropdown card under the nav bar. */
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: var(--radius-card);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(34, 48, 28, 0.28);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .site-nav.nav-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    text-align: center;
    padding: 12px 16px;
  }

  .hero-logo-stack {
    width: min(300px, 88vw);
  }

  .hills-far {
    top: calc(58% - 54px);
    height: 60px;
  }

  .hills-near {
    top: calc(58% - 16px);
    height: 64px;
  }

  .podium-first {
    transform: none;
  }

  .score-value {
    font-size: 19px;
  }
}

/* ── Reduced motion ──────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-logo-base,
  .hero-logo-badge,
  .game-title,
  .cloud {
    animation: none;
  }
}
