/* ═══════════════════════════════════════════════════
   FINN — finnfarming.com
   Earthy, practical, built for farmers
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Earth palette */
  --soil:        #2C1810;
  --bark:        #3D2B1F;
  --clay:        #6B4226;
  --wheat:       #D4A843;
  --straw:       #E8D5A3;
  --cream:       #F5F0E6;
  --dust:        #FAF7F0;
  --sky:         #5B8FA8;
  --leaf:        #4A7C59;
  --leaf-dark:   #3A6347;
  --rust:        #A0522D;

  /* Functional */
  --text:        #2C1810;
  --text-light:  #6B5D52;
  --border:      #D6CCBE;
  --shadow:      rgba(44, 24, 16, 0.08);
  --shadow-lg:   rgba(44, 24, 16, 0.15);

  /* Type scale */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;
}

/* ── Reset & Base ────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--dust);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--leaf-dark); }

/* ── Texture overlay ─────────────────────────── */

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

/* ── Layout ──────────────────────────────────── */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { flex: 1; }

/* ── Header / Nav ────────────────────────────── */

.site-header {
  background: var(--soil);
  border-bottom: 3px solid var(--wheat);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.site-logo span {
  color: var(--wheat);
}

.site-nav { display: flex; gap: 0.2rem; }

.site-nav a {
  color: var(--straw);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--cream);
  background: rgba(255,255,255,0.08);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--soil);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 3px solid var(--wheat);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.6rem 1rem; }
}

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

.hero {
  background: linear-gradient(165deg, var(--soil) 0%, var(--bark) 50%, var(--clay) 100%);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--wheat), var(--leaf), var(--wheat));
}

.hero__content {
  max-width: 700px;
}

.hero__badge {
  display: inline-block;
  background: rgba(74, 124, 89, 0.3);
  color: var(--straw);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(74, 124, 89, 0.4);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.2rem;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero h1 em {
  color: var(--wheat);
  font-style: italic;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--straw);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  text-decoration: none;
}

.btn--primary {
  background: var(--leaf);
  color: white;
  box-shadow: 0 2px 8px rgba(74, 124, 89, 0.3);
}

.btn--primary:hover {
  background: var(--leaf-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(74, 124, 89, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--straw);
}

.btn--secondary:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.btn--outline {
  background: transparent;
  color: var(--leaf);
  border: 2px solid var(--leaf);
}

.btn--outline:hover {
  background: var(--leaf);
  color: white;
}

/* ── Section styling ─────────────────────────── */

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--cream);
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__header h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--soil);
  margin-bottom: 0.6rem;
}

.section__header p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Feature Cards ───────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--leaf);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.feature-card:hover {
  border-color: var(--leaf);
  box-shadow: 0 4px 20px var(--shadow);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--soil);
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── How it Works ────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: step;
}

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  text-align: center;
  counter-increment: step;
  position: relative;
}

.step__number {
  width: 56px;
  height: 56px;
  background: var(--soil);
  color: var(--wheat);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 auto 1rem;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--soil);
}

.step p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ── CTA Banner ──────────────────────────────── */

.cta-banner {
  background: linear-gradient(135deg, var(--soil) 0%, var(--clay) 100%);
  padding: 3.5rem 0;
  text-align: center;
}

.cta-banner h2 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.cta-banner p {
  color: var(--straw);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Blog List ───────────────────────────────── */

.blog-list {
  display: grid;
  gap: 1.5rem;
}

.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  display: flex;
  gap: 1.5rem;
  transition: all 0.25s;
}

.blog-card:hover {
  border-color: var(--leaf);
  box-shadow: 0 4px 16px var(--shadow);
}

.blog-card__date {
  flex-shrink: 0;
  text-align: center;
  padding: 0.5rem;
  background: var(--cream);
  border-radius: 6px;
  min-width: 70px;
}

.blog-card__date .day {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--soil);
  line-height: 1;
}

.blog-card__date .month {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  color: var(--soil);
}

.blog-card h3 a {
  color: inherit;
}

.blog-card h3 a:hover {
  color: var(--leaf);
}

.blog-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.blog-card__tag {
  display: inline-block;
  background: var(--cream);
  color: var(--clay);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}

/* ── Single Blog Post ────────────────────────── */

.post-header {
  padding: 3rem 0 1.5rem;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--soil);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.post-meta {
  color: var(--text-light);
  font-size: 0.9rem;
}

.post-content {
  padding: 2.5rem 0 4rem;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--soil);
  margin: 2rem 0 0.8rem;
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--bark);
  margin: 1.5rem 0 0.6rem;
}

.post-content p {
  margin-bottom: 1.2rem;
}

.post-content ul, .post-content ol {
  margin: 0 0 1.2rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.3rem;
}

.post-content code {
  font-family: var(--font-mono);
  background: var(--cream);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.88rem;
}

.post-content pre {
  background: var(--soil);
  color: var(--straw);
  padding: 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-content blockquote {
  border-left: 4px solid var(--wheat);
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  background: var(--cream);
  border-radius: 0 6px 6px 0;
  color: var(--text-light);
  font-style: italic;
}

.post-content img {
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 16px var(--shadow);
}

/* ── Page Content (About, Shop, etc) ─────────── */

.page-header {
  padding: 3rem 0 1.5rem;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--soil);
}

.page-header p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.page-content {
  padding: 2.5rem 0 4rem;
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--soil);
  margin: 2rem 0 0.8rem;
}

.page-content p {
  margin-bottom: 1.2rem;
}

.page-content ul {
  margin: 0 0 1.2rem 1.5rem;
}

.page-content li {
  margin-bottom: 0.3rem;
}

/* ── Product Card (Shop/Guidance) ────────────── */

.product-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.25s;
}

.product-card:hover {
  border-color: var(--leaf);
  box-shadow: 0 8px 30px var(--shadow-lg);
}

.product-card__image {
  background: var(--cream);
  padding: 2rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.product-card__body {
  padding: 1.5rem;
}

.product-card__body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--soil);
  margin-bottom: 0.4rem;
}

.product-card__price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--leaf);
  margin-bottom: 0.5rem;
}

.product-card__body p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ── Specs Table ─────────────────────────────── */

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.specs-table th,
.specs-table td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}

.specs-table th {
  background: var(--cream);
  font-weight: 600;
  color: var(--soil);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.specs-table tr:hover td {
  background: var(--cream);
}

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

.site-footer {
  background: var(--soil);
  color: var(--straw);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-grid h4 {
  font-family: var(--font-display);
  color: var(--cream);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.footer-grid p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--straw);
}

.footer-grid a {
  color: var(--straw);
  display: block;
  padding: 0.2rem 0;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--wheat);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(232, 213, 163, 0.6);
}

.footer-bottom a {
  color: rgba(232, 213, 163, 0.6);
}

/* ── Utility ─────────────────────────────────── */

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ── Responsive hero ─────────────────────────── */

@media (max-width: 768px) {
  .hero { padding: 3rem 0; }
  .hero h1 { font-size: 2.2rem; }
  .hero__subtitle { font-size: 1.05rem; }
  .section { padding: 2.5rem 0; }
  .section__header h2 { font-size: 1.8rem; }
  .features-grid { grid-template-columns: 1fr; }
}
