/* Farm Manager public homepage */

:root {
  --green-dark: #234f2e;
  --green: #2f6b2f;
  --text: #1f2520;
  --muted: #566052;
  --page-bg: #eef1e6;
  --page-bg-alt: #e9eddf;
  --surface: #ffffff;
  --surface-soft: #f8f9f4;
  --green-soft: #e6efe2;
  --khaki: #ded8c3;
  --border: #cfd8c6;
  --amber: #d99a24;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* ── Site header ── */
.site-header {
  background: rgba(238, 241, 230, 0.96);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav__link:hover,
.site-nav__link--active {
  color: var(--green-dark);
  border-bottom-color: var(--green);
}

/* ── Page layout ── */
.page-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3.5rem;
  background: linear-gradient(135deg, var(--page-bg) 0%, var(--green-soft) 100%);
  border-radius: 12px;
  padding: 1.75rem 1.25rem;
  border: 1px solid var(--border);
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--green);
}

.hero__content h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.6;
}

.hero__note {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero visual panel */
.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem 1.25rem;
  box-shadow: 0 18px 40px rgba(31, 37, 32, 0.10);
}

.hero-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.hero-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: -0.01em;
}

.hero-panel__badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(47, 107, 47, 0.24);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

.hero-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-panel__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.9rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.hero-panel__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.hero-panel__name {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
}

.hero-panel__meta {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.hero-panel__tag {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(47, 107, 47, 0.24);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
    padding: 2rem 1.75rem;
  }
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--green-dark);
  color: #ffffff;
  border: 1px solid var(--green-dark);
}

.btn-primary:hover {
  background: var(--green);
  border-color: var(--green);
}

.btn-secondary {
  background: var(--surface);
  color: var(--green-dark);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--green-soft);
  border-color: var(--green);
}

/* ── Sections ── */
.section {
  margin-bottom: 3rem;
}

.calculators-section {
  background: transparent;
}

.section__intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.25rem;
}

.section__intro h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: -0.01em;
}

.section__lead {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Calculator cards ── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tool-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: 0 14px 30px rgba(31, 37, 32, 0.08);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.tool-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
}

.tool-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--green), #6f7f3b);
}

.tool-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--green-dark), #566b3a);
}

.tool-card:nth-child(4)::before {
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(31, 37, 32, 0.12);
  border-color: rgba(47, 107, 47, 0.35);
}

.tool-card__top {
  margin-bottom: 0.9rem;
}

.tool-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(47, 107, 47, 0.24);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
}

.tool-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.tool-card p {
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  flex-grow: 1;
  line-height: 1.55;
}

.tool-card__btn {
  align-self: flex-start;
  font-size: 0.88rem;
  padding: 0.6rem 1.1rem;
  margin-top: auto;
}

/* ── App section ── */
.app-section {
  margin-bottom: 2.5rem;
  background: var(--green-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
}

.app-section__inner {
  max-width: 640px;
  margin: 0 auto;
}

.app-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: -0.01em;
}

.app-section p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.app-section__list {
  margin: 0 0 1.5rem;
  padding: 0 0 0 1.25rem;
  color: var(--text);
  font-size: 0.95rem;
}

.app-section__list li {
  margin-bottom: 0.45rem;
  padding-left: 0.25rem;
  color: var(--muted);
}

.app-section__list li::marker {
  color: var(--green);
}

/* ── Disclaimer ── */
.disclaimer {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin-bottom: 0;
}

.disclaimer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Footer ── */
.site-footer {
  background: var(--green-dark);
  color: #ffffff;
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  margin-top: 2.5rem;
}

.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.site-footer__brand {
  display: inline-block;
  margin-bottom: 1rem;
  line-height: 0;
  text-decoration: none;
}

.site-footer__logo-panel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8f9f4;
  border: 1px solid rgba(207, 216, 198, 0.45);
  border-radius: 14px;
  padding: 0.45rem 0.75rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.site-footer__nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e6efe2;
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
  color: #ffffff;
}

.copyright {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ── Mobile ── */
@media (max-width: 520px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem 1.25rem;
  }

  .hero {
    padding: 1.25rem 1rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero-panel__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .hero-panel__tag {
    align-self: flex-start;
  }
}
