/* ===================================================================
   FarmTally landing — styles
   Palette taken from the app (lib/core/theme/app_colors.dart):
   earthy, warm, high-contrast. No neon.
   =================================================================== */

:root {
  --green:       #5C7A3E;
  --green-dark:  #496130;
  --barn:        #8B3A1F;
  --hay:         #D4A85A;
  --soil:        #6B4423;
  --cream:       #FAF6EC;
  --bone:        #F1EAD6;
  --charcoal:    #2A2620;
  --income:      #4A7A3A;
  --subtle:      #7A6F5C;

  --line: rgba(42, 38, 32, 0.12);
  --shadow: 0 1px 2px rgba(42,38,32,.06), 0 8px 24px rgba(42,38,32,.08);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.18rem; }

.lead { font-size: 1.12rem; color: var(--charcoal); }
.section-lead { font-size: 1.08rem; color: var(--subtle); }
.section-lead.strong { color: var(--charcoal); font-weight: 700; margin-top: 14px; }
.micro { font-size: 0.9rem; color: var(--subtle); margin-top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  transition: transform .12s ease, background-color .12s ease;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-sm { padding: 10px 18px; font-size: 0.95rem; }
.btn-block { display: block; width: 100%; text-align: center; padding: 16px; }

/* Google Play badge (official badge image) */
.store-badge { display: inline-block; transition: transform .12s ease, opacity .12s ease; }
.store-badge:hover { opacity: .92; }
.store-badge:active { transform: translateY(1px); }
.store-badge img { height: 58px; width: auto; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.center-row { justify-content: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 14px; height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; }
.brand-mark { font-size: 1.35rem; }
/* brand pushed left, everything else to the right — robust at any width */
.header-inner .brand { margin-right: auto; }
.nav { display: none; gap: 24px; }
.nav a { color: var(--subtle); font-weight: 600; font-size: 0.97rem; }
.nav a:hover { color: var(--charcoal); }

/* ---------- language switch ---------- */
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  font-size: 0.82rem; font-weight: 700;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px;
}
.lang-switch a, .lang-switch span {
  padding: 4px 9px; border-radius: 999px; line-height: 1;
}
.lang-switch .lang-current { background: var(--green); color: #fff; }
.lang-switch a { color: var(--subtle); }
.lang-switch a:hover { color: var(--charcoal); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; gap: 44px; align-items: center; }
.eyebrow {
  display: inline-block;
  background: var(--bone);
  color: var(--soil);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lead { max-width: 38ch; }

/* ---------- phone mockup ---------- */
.hero-visual { display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 290px;
  background: var(--charcoal);
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.phone img { border-radius: 32px; }
.phone-notch {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 22px;
  background: var(--charcoal);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-sm { width: 240px; }

/* ---------- bands ---------- */
.band { padding: 72px 0; }
.band-bone { background: var(--bone); }
.band-dark { background: var(--soil); color: var(--cream); }
.band-dark .section-lead { color: rgba(250,246,236,.82); }
.band-dark .micro { color: rgba(250,246,236,.7); }

.section-head { max-width: 640px; margin: 0 auto 44px; }
.section-head.center { text-align: center; }
.section-head h2 { margin-bottom: 12px; }

/* ---------- grids ---------- */
.grid { display: grid; gap: 22px; }
.features { grid-template-columns: 1fr; }
.why { grid-template-columns: 1fr; }

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--subtle); }
.card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 28px; height: 28px; }
.icon-pasture { background: rgba(92,122,62,.14); color: var(--green); }
.icon-hay     { background: rgba(212,168,90,.20); color: var(--soil); }
.icon-income  { background: rgba(74,122,58,.14); color: var(--income); }
.icon-barn    { background: rgba(139,58,31,.13); color: var(--barn); }

.why-item {
  padding: 24px 0;
  border-top: 2px solid var(--line);
}
.why-item h3 { margin-bottom: 6px; color: var(--soil); }
.why-item p { color: var(--subtle); }

/* ---------- screenshots ---------- */
.shots {
  display: flex; flex-wrap: wrap;
  gap: 36px 32px; align-items: flex-start; justify-content: center;
}
.shot { margin: 0; text-align: center; }
.shot figcaption {
  margin-top: 16px;
  font-weight: 700;
  color: var(--soil);
  font-size: 0.98rem;
}

/* ---------- pricing ---------- */
.price-card {
  background: var(--cream);
  border: 2px solid var(--green);
  border-radius: 22px;
  padding: 36px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 420px;
  margin: 0 auto;
}
.price-badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.price-amount { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.price-currency { font-size: 1.6rem; font-weight: 800; }
.price-number { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.03em; }
.price-period { font-size: 1.1rem; color: var(--subtle); font-weight: 600; }
.price-alt { color: var(--subtle); margin-top: 4px; }
.price-cad {
  color: var(--soil); font-size: 0.92rem; font-weight: 600;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}
.price-list { list-style: none; text-align: left; margin: 22px 0; }
.price-list li {
  padding: 9px 0 9px 30px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.price-list li:last-child { border-bottom: none; }
.price-list li::before {
  content: "";
  position: absolute; left: 2px; top: 15px;
  width: 16px; height: 9px;
  border-left: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green);
  transform: rotate(-45deg);
}
.price-card .btn-block { margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer { background: var(--charcoal); color: var(--cream); padding: 48px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.site-footer .brand { color: var(--cream); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: center; }
.footer-nav a { color: rgba(250,246,236,.82); font-weight: 600; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--cream); }
.copyright { color: rgba(250,246,236,.6); font-size: 0.88rem; }

/* ---------- consent banner ---------- */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: var(--charcoal); color: var(--cream);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 20px; padding: 14px 22px;
  box-shadow: 0 -4px 20px rgba(42,38,32,.20);
}
.consent p { font-size: 0.92rem; margin: 0; }
.consent a { color: var(--hay); text-decoration: underline; }
.consent button {
  background: var(--green); color: #fff; font-weight: 700;
  border: none; border-radius: 999px; padding: 9px 22px;
  font-size: 0.9rem; cursor: pointer; font-family: var(--font);
  transition: background-color .12s ease;
}
.consent button:hover { background: var(--green-dark); }
.consent[hidden] { display: none; }

/* ---------- legal pages (privacy / terms) ---------- */
.legal { padding: 56px 0 72px; }
.prose { max-width: 740px; margin: 0 auto; }
.prose h1 { margin-bottom: 8px; }
.prose .updated { color: var(--subtle); font-size: 0.95rem; margin-bottom: 32px; }
.prose h2 {
  font-size: 1.3rem;
  margin: 34px 0 10px;
  letter-spacing: -0.01em;
}
.prose p, .prose li { color: #423c33; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 14px 22px; }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--green); font-weight: 600; text-decoration: underline; }
.callout {
  background: var(--bone);
  border-left: 4px solid var(--hay);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 20px 0;
}
.callout p { margin: 0; font-size: 0.97rem; }

/* ---------- page transitions & scroll reveal ---------- */
@view-transition { navigation: auto; }

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

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

/* ---------- desktop ---------- */
@media (min-width: 820px) {
  body { font-size: 18px; }
  .nav { display: flex; }
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .phone { width: 320px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .why-item { padding: 0; border-top: 3px solid var(--hay); padding-top: 18px; }
}
