/* ============================================================
   FARM STORY MOBILE - Landing Page v7 "Pro"
   Premium blurred photo background + realistic glass cards
   Sticky glass header · gameplay showcase · scroll reveals
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  --g1: #1a5c3a;
  --g2: #2d8a56;
  --g3: #4caf50;
  --gold: #b8860b;
  --gold-light: #d4a017;
  --blue: #3b7fd4;
  --text: #142314;
  --muted: #2f452f;
  --dim: #52684f;
  --glass: rgba(255, 255, 255, .5);
  --glass-hover: rgba(255, 255, 255, .64);
  --border-glass: rgba(255, 255, 255, .5);
  --border-subtle: rgba(120, 160, 120, .18);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .08), 0 1px 0 rgba(255, 255, 255, .5) inset;
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, .05), 0 20px 50px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .6) inset;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px
}

body {
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background: #1a3a1a;
}

/* ========== BLURRED BACKGROUND LAYER ========== */
body::before {
  content: '';
  position: fixed;
  inset: -10px;
  background: url('../image/bg.png') center/cover no-repeat fixed;
  filter: blur(6px) brightness(.62) saturate(.85);
  z-index: -2;
}

/* Subtle grain overlay for realism */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 30%, rgba(255, 255, 255, .08), transparent 70%),
    radial-gradient(ellipse 60% 50% at 30% 80%, rgba(180, 220, 160, .06), transparent 70%),
    radial-gradient(ellipse 50% 40% at 75% 40%, rgba(255, 240, 200, .05), transparent 70%);
  pointer-events: none;
}

/* Remove legacy farm-bg (kept as hidden for JS compatibility) */
.farm-bg {
  display: none
}

/* ========== FLOATING EMOJIS (subtle decorative) ========== */
.floaties {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none
}

.floaty {
  position: absolute;
  font-size: 1.4rem;
  opacity: .2;
  animation: floatWander linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .15));
}

.floaty:nth-child(1) {
  top: 68%;
  left: 6%;
  animation-duration: 16s;
  font-size: 1.5rem
}

.floaty:nth-child(2) {
  top: 52%;
  right: 10%;
  animation-duration: 19s;
  animation-delay: 3s
}

.floaty:nth-child(3) {
  top: 72%;
  left: 82%;
  animation-duration: 17s;
  animation-delay: 6s;
  font-size: 1.6rem
}

.floaty:nth-child(4) {
  top: 58%;
  right: 20%;
  animation-duration: 21s;
  animation-delay: 2s
}

.floaty:nth-child(5) {
  top: 78%;
  left: 45%;
  animation-duration: 20s;
  animation-delay: 9s;
  font-size: 1.3rem
}

.floaty:nth-child(6) {
  top: 64%;
  right: 5%;
  animation-duration: 18s;
  animation-delay: 4s;
  font-size: 1.4rem
}

@keyframes floatWander {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg)
  }

  33% {
    transform: translateY(-20px) translateX(10px) rotate(3deg)
  }

  66% {
    transform: translateY(-12px) translateX(-8px) rotate(-3deg)
  }

  100% {
    transform: translateY(0) translateX(0) rotate(0deg)
  }
}

/* ========== FLOATING PARTICLES ========== */
#particles-container {
  display: none
}

/* ========== SITE HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(640px, calc(100% - 2rem));
  margin: 12px auto 0;
  padding: 8px 10px 8px 8px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: var(--shadow-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  flex-shrink: 0;
}

.brand-name {
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: #0b1f12;
}

.brand-name em {
  font-style: normal;
  font-weight: 600;
  color: var(--g2);
}

.brand-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(26, 92, 58, .3), 0 1px 0 rgba(255, 255, 255, .2) inset;
  transition: transform .2s ease, box-shadow .2s ease;
}

.brand-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(26, 92, 58, .4), 0 1px 0 rgba(255, 255, 255, .25) inset;
}

/* ========== PAGE ========== */
.page {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none
  }
}

/* ========== GLASS SECTION ========== */
section {
  background: var(--glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transition: box-shadow .3s ease, border-color .3s ease;
}

/* ========== HERO ========== */
.hero {
  padding: 0;
  overflow: hidden;
  position: relative;
  background: linear-gradient(170deg, rgba(255, 255, 255, .55), rgba(240, 248, 235, .46) 50%, rgba(220, 240, 210, .48));
}

.hero-bg,
.hero-gradient,
.hero-hill {
  display: none
}

.hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 32px 24px 28px
}

@media(min-width:560px) {
  .hero-body {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 36px 30px 32px
  }
}

.hero-text {
  flex: 1;
  min-width: 0
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--g1);
  background: rgba(26, 92, 58, .12);
  border: 1px solid rgba(26, 92, 58, .2);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px
}

.hero-heading {
  font-size: clamp(2.1rem, 6.5vw, 3.1rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.025em;
  color: #0b1f12;
  margin-bottom: 12px
}

.hero-desc {
  font-size: .94rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 22px;
  max-width: 420px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .2), 0 1px 0 rgba(255, 255, 255, .15) inset
}

.btn-store:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .3), 0 1px 0 rgba(255, 255, 255, .2) inset
}

.btn-store i {
  font-size: 1.5rem;
  flex-shrink: 0
}

.btn-store span {
  display: flex;
  flex-direction: column;
  line-height: 1.12
}

.btn-store small {
  font-size: .56rem;
  letter-spacing: .6px;
  opacity: .8;
  font-weight: 500
}

.btn-store--google {
  background: linear-gradient(160deg, #202225, #0f0f12)
}

.btn-store--apple {
  background: linear-gradient(160deg, #1a1a1d, #000)
}

.hero-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px
}

.meta-divider {
  width: 1px;
  height: 30px;
  background: rgba(20, 50, 20, .14);
}

.meta-stars {
  color: var(--gold-light);
  font-size: .88rem;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .6);
}

.meta-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--g1)
}

.meta-label {
  font-size: .7rem;
  color: var(--dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px
}

.hero-phone {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  margin-top: 18px
}

@media(min-width:560px) {
  .hero-phone {
    margin-top: 0
  }
}

.phone-device {
  width: 138px;
  height: 262px;
  background: linear-gradient(160deg, #2c2c30, #1a1a1e);
  border-radius: 26px;
  padding: 8px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
  position: relative
}

.phone-device::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 4px;
  background: #111;
  border-radius: 4px;
  z-index: 3
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(175deg, #6dcff0, #a8e0c0 50%, #66bb6a 85%);
  border-radius: 19px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px
}

.phone-app-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28), 0 1px 0 rgba(255, 255, 255, .4) inset;
}

.phone-app-name {
  font-weight: 700;
  font-size: .8rem;
  color: var(--g1);
  background: rgba(255, 255, 255, .78);
  padding: 4px 14px;
  border-radius: 50px
}

.phone-get {
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .8px;
  color: rgba(10, 40, 20, .65);
  text-transform: uppercase;
}

/* ========== SECTION TITLES ========== */
.section-label {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--g2);
  margin-bottom: 8px
}

.section-heading {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0b1f12;
  margin-bottom: 8px;
  letter-spacing: -.01em
}

.section-sub {
  font-size: .88rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 480px;
  text-wrap: pretty;
}

/* ========== GAMEPLAY SHOTS ========== */
.shot-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .16), 0 1px 0 rgba(255, 255, 255, .5) inset;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, .2);
}

.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .5s ease;
}

.shot-frame:hover img {
  transform: scale(1.025);
}

.tutorial-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
  text-decoration: none;
}

.tutorial-card>img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(.72) saturate(1.05);
  transition: transform .5s ease, filter .3s ease;
}

.tutorial-card:hover>img {
  transform: scale(1.04);
  filter: brightness(.82) saturate(1.1);
}

.tutorial-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
}

.tutorial-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .92);
  color: var(--g1);
  font-size: 1rem;
  padding-left: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: transform .2s ease;
}

.tutorial-card:hover .tutorial-play {
  transform: scale(1.08);
}

.tutorial-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.tutorial-text strong {
  font-size: .95rem;
  font-weight: 800;
}

.tutorial-text small {
  font-size: .72rem;
  opacity: .9;
  font-weight: 500;
}

/* ========== FEATURES ========== */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px
}

.feature {
  background: rgba(255, 255, 255, .34);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px 18px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .6);
  background: var(--glass-hover)
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(26, 92, 58, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 1.1rem;
  color: var(--g1)
}

.feature h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text)
}

.feature p {
  font-size: .78rem;
  line-height: 1.55;
  color: var(--muted)
}

/* ========== REWARDS ========== */
.reward-pair {
  display: flex;
  gap: 12px;
  margin-bottom: 18px
}

.reward-badge {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .38);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5)
}

.reward-badge i {
  font-size: 1.4rem;
  flex-shrink: 0
}

.reward-badge:first-child i,
.reward-badge:first-child strong {
  color: #b8860b
}

.reward-badge:last-child i,
.reward-badge:last-child strong {
  color: var(--blue)
}

.reward-badge strong {
  font-size: 1.25rem;
  display: block;
  line-height: 1
}

.reward-badge span {
  font-size: .72rem;
  color: var(--dim)
}

/* ========== SOCIAL ========== */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .34);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s ease
}

.social-btn:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .6)
}

.social-btn i {
  font-size: 1.1rem
}

.tag-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--muted);
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(74, 144, 217, .1);
  border: 1px solid rgba(74, 144, 217, .18)
}

.tag-hint i {
  color: var(--blue)
}

.tag-hint strong {
  color: var(--text)
}

/* ========== SUPPORT ========== */
.support-code {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--muted);
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: rgba(26, 92, 58, .08);
  border: 1px solid rgba(26, 92, 58, .16)
}

.support-code i {
  color: var(--g2);
  font-size: 1.1rem;
  flex-shrink: 0
}

.support-code strong {
  color: var(--text)
}

.support-code code {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: .78rem;
  font-weight: 700;
  color: var(--g1);
  background: rgba(26, 92, 58, .1);
  padding: 3px 10px;
  border-radius: 5px
}

.support-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: rgba(255, 255, 255, .34);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  transition: all .2s ease
}

.btn:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05), inset 0 1px 0 rgba(255, 255, 255, .6)
}

.btn--primary {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(26, 92, 58, .3)
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--g2), var(--g3));
  color: #fff;
  box-shadow: 0 10px 28px rgba(26, 92, 58, .4)
}

/* ========== LEGAL ========== */
.legal {
  text-align: center;
  padding: 24px;
  background: rgba(255, 255, 255, .3)
}

.legal-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px
}

.legal-links a {
  font-size: .8rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s
}

.legal-links a:hover {
  color: var(--g2)
}

.legal-sep {
  color: var(--dim);
  font-size: .7rem
}

.legal-copy {
  font-size: .7rem;
  color: var(--dim)
}

/* ========== NAV BAR ========== */
.nav-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-top: 1px solid var(--border-glass);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .08);
  padding-bottom: env(safe-area-inset-bottom, 0)
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px 8px;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: inherit;
  font-size: .66rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s;
  position: relative
}

.nav-item i {
  font-size: 1.15rem;
  transition: transform .15s
}

.nav-item:hover,
.nav-item.active {
  color: var(--g2)
}

.nav-item:hover i,
.nav-item.active i {
  transform: translateY(-1px)
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28%;
  right: 28%;
  height: 2px;
  background: var(--g2);
  border-radius: 0 0 3px 3px
}

/* ========== RESPONSIVE ========== */
@media(max-width:480px) {
  section {
    padding: 18px 14px;
    border-radius: var(--radius)
  }

  .hero-body {
    padding: 22px 14px
  }

  .hero-actions {
    flex-direction: column
  }

  .btn-store {
    justify-content: center
  }

  .brand-name {
    font-size: .85rem
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  .feature {
    padding: 14px 12px
  }

  .social-grid {
    grid-template-columns: 1fr 1fr
  }

  .tutorial-card>img {
    height: 104px
  }
}

@media(min-width:768px) {
  .page {
    width: min(680px, 100%)
  }

  .site-header {
    width: min(680px, calc(100% - 2rem))
  }

  section {
    padding: 28px 26px
  }

  .hero-body {
    padding: 40px 34px
  }

  .feature-grid {
    grid-template-columns: repeat(4, 1fr)
  }

  .phone-device {
    width: 150px;
    height: 290px
  }
}
