/*
Theme Name: Farming Roots
Theme URI: https://farmingroots.in/
Author: Farming Roots
Author URI: https://farmingroots.in/
Description: Blog theme for FarmingRoots.in, matching the main website. Dark forest green, lime accents, cream pill buttons.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: farmingroots
*/

@font-face { font-family: "DM Serif Display"; src: url("assets/fonts/dm-serif-display-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("assets/fonts/manrope-variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #0D2318; --bg-deep: #0A1D13; --card: #132E20; --card-2: #1A3B2B;
  --lime: #84CC16; --lime-2: #A3E635; --cream: #F5E6C8; --cream-hover: #EBD9A8; --cream-fg: #10261A;
  --text: #F8FAF8; --muted: #A7BDB0; --border: #2B5A3E; --radius: 18px;
  --serif: "DM Serif Display", Georgia, serif; --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--lime-2); }
a:hover, a:focus-visible { color: var(--cream); }
:focus-visible { outline: 2px solid var(--lime-2); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; color: var(--text); line-height: 1.2; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--cream); color: var(--cream-fg); padding: .6rem 1rem; border-radius: 999px; }
.fr-container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .fr-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .fr-container { padding: 0 2rem; } }

/* Buttons */
.fr-btn { display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; background: var(--cream); color: var(--cream-fg); font-weight: 700; padding: .8rem 1.5rem; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; box-shadow: 0 10px 30px -12px rgba(234,179,8,.6); transition: background .15s, transform .15s; }
.fr-btn:hover, .fr-btn:focus-visible { background: var(--cream-hover); color: var(--cream-fg); transform: translateY(-1px); }
.fr-btn-outline { display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text); padding: .7rem 1.25rem; font-weight: 600; text-decoration: none; }
.fr-btn-outline:hover { border-color: var(--lime); color: var(--lime-2); }

/* Header */
.fr-header { position: relative; z-index: 30; background: rgba(10,29,19,.96); border-bottom: 1px solid var(--border); }
.fr-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.fr-brand { display: flex; align-items: center; gap: .875rem; text-decoration: none; color: var(--text); min-width: 0; }
.fr-brand img { width: 54px; height: 54px; object-fit: contain; flex-shrink: 0; }
.fr-brand-name { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.2; color: var(--text); white-space: nowrap; }
.fr-brand-tag { display: block; font-size: 10px; letter-spacing: .03em; color: var(--muted); }
@media (min-width: 768px) { .fr-brand img { width: 60px; height: 60px; } .fr-brand-name { font-size: 21px; } .fr-brand-tag { font-size: 11px; } }
.fr-nav { display: none; align-items: center; gap: 2rem; }
.fr-nav a { position: relative; padding: .5rem 0; font-size: 15px; font-weight: 600; color: rgba(248,250,248,.9); text-decoration: none; }
.fr-nav a:hover { color: var(--lime-2); }
.fr-nav a.is-active { color: var(--lime-2); }
.fr-nav a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--lime-2); }
.fr-header-search { display: none; width: 16rem; }
.fr-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: rgba(19,46,32,.7); color: var(--text); cursor: pointer; padding: 0; }
.fr-icon-btn:hover { border-color: var(--lime); }
.fr-icon-btn svg { width: 22px; height: 22px; }
.fr-mobile-controls { display: flex; gap: .5rem; }
.fr-mobile-panel { display: none; border-top: 1px solid var(--border); padding: .75rem 0 1rem; }
.fr-mobile-panel.is-open { display: block; }
.fr-mobile-panel nav a { display: block; padding: .85rem 1rem; border-radius: 10px; font-size: 1.1rem; font-weight: 600; color: var(--text); text-decoration: none; }
.fr-mobile-panel nav a:hover, .fr-mobile-panel nav a.is-active { background: var(--card); color: var(--lime-2); }
.fr-mobile-panel .fr-search { margin-bottom: .5rem; }
@media (min-width: 768px) { .fr-nav { display: flex; } .fr-mobile-controls .fr-menu-toggle { display: none; } .fr-mobile-panel nav { display: none; } }
@media (min-width: 1024px) { .fr-header-search { display: block; } .fr-mobile-controls { display: none; } .fr-mobile-panel { display: none !important; } }

/* Search form */
.fr-search { position: relative; }
.fr-search svg { position: absolute; left: .9rem; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.fr-search input[type="search"] { width: 100%; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: rgba(19,46,32,.85); color: var(--text); padding: 0 1rem 0 2.5rem; font: inherit; font-size: .9rem; }
.fr-search input[type="search"]::placeholder { color: var(--muted); }
.fr-search input[type="search"]:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(132,204,22,.3); }

/* Page hero */
.fr-hero { background: radial-gradient(ellipse at top right, rgba(132,204,22,.12), transparent 60%), var(--bg-deep); border-bottom: 1px solid var(--border); padding: 2.5rem 0 2.25rem; }
.fr-crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 .75rem; }
.fr-crumbs a { color: var(--muted); text-decoration: none; }
.fr-crumbs a:hover { color: var(--lime-2); }
.fr-eyebrow { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--lime-2); }
.fr-hero h1 { margin: .5rem 0 0; font-size: clamp(2rem, 5vw, 3.25rem); }
.fr-hero p.fr-intro { max-width: 46rem; margin: .75rem 0 0; color: var(--muted); font-size: 1.05rem; }
.fr-hero .fr-search { max-width: 32rem; margin-top: 1.5rem; }

main.fr-main { padding: 2.5rem 0 4rem; }
.fr-section-title { font-size: 1.75rem; margin: 0 0 1.25rem; }

/* Featured */
.fr-featured { display: grid; gap: 1.5rem; background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); overflow: hidden; margin-bottom: 3rem; text-decoration: none; color: var(--text); transition: border-color .15s; }
.fr-featured:hover { border-color: rgba(132,204,22,.7); color: var(--text); }
.fr-featured-media { aspect-ratio: 16/10; background: var(--card-2); }
.fr-featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fr-featured-body { padding: 0 1.5rem 1.75rem; display: flex; flex-direction: column; justify-content: center; }
.fr-featured-body h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin: .5rem 0 .75rem; }
.fr-featured-body p { color: var(--muted); margin: 0 0 1.25rem; }
@media (min-width: 900px) { .fr-featured { grid-template-columns: 1.15fr 1fr; } .fr-featured-media { aspect-ratio: auto; min-height: 340px; } .fr-featured-body { padding: 2rem 2.25rem 2rem 0; } }

/* Cards */
.fr-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fr-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .fr-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.fr-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.fr-card:hover { border-color: rgba(132,204,22,.7); transform: translateY(-2px); }
.fr-card-media { display: block; aspect-ratio: 16/10; background: var(--card-2); }
.fr-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fr-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); }
.fr-placeholder svg { width: 40px; height: 40px; }
.fr-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.25rem 1.25rem; }
.fr-cat { font-size: .78rem; font-weight: 700; color: var(--lime-2); text-decoration: none; }
.fr-card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.1rem; line-height: 1.35; margin: .35rem 0 .5rem; letter-spacing: 0; }
.fr-card h3 a { color: var(--text); text-decoration: none; }
.fr-card h3 a:hover { color: var(--lime-2); }
.fr-card p { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fr-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .82rem; color: var(--muted); }
.fr-read { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--cream); text-decoration: none; }
.fr-read:hover { color: var(--lime-2); }
.fr-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .85rem; color: var(--muted); }

/* Pagination */
.fr-pagination { margin-top: 2.5rem; }
.fr-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.fr-pagination .page-numbers { display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center; padding: 0 .9rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; }
.fr-pagination a.page-numbers:hover { border-color: var(--lime); color: var(--lime-2); }
.fr-pagination .page-numbers.current { background: var(--cream); color: var(--cream-fg); border-color: var(--cream); }

/* Empty / notice box */
.fr-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; }
.fr-box p { color: var(--muted); }
.fr-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.25rem; }

/* Single article */
.fr-article-head { max-width: 760px; }
.fr-article-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: .5rem 0 1rem; }
.fr-article-media { max-width: 1000px; margin: 0 auto 2.5rem; border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 1px solid var(--border); }
.fr-article-media img { display: block; width: 100%; height: auto; }
.fr-article-media figcaption { padding: .6rem 1rem; font-size: .85rem; color: var(--muted); background: var(--card); }
.fr-content { max-width: 72ch; margin: 0 auto; font-size: 1.075rem; color: #D7E3DB; line-height: 1.8; overflow-wrap: break-word; }
.fr-content > * { margin-top: 0; margin-bottom: 1.25rem; }
.fr-content h2 { font-size: 1.85rem; margin-top: 2.5rem; }
.fr-content h3 { font-size: 1.4rem; margin-top: 2rem; }
.fr-content h4 { font-size: 1.15rem; margin-top: 1.5rem; font-family: var(--sans); font-weight: 700; }
.fr-content strong { color: var(--text); }
.fr-content a { text-decoration: underline; text-underline-offset: 3px; }
.fr-content ul, .fr-content ol { padding-left: 1.4rem; }
.fr-content li { margin-bottom: .4rem; }
.fr-content li::marker { color: var(--lime); }
.fr-content img, .fr-content .wp-block-image img { border-radius: 14px; }
.fr-content figure { margin-left: 0; margin-right: 0; }
.fr-content figcaption, .fr-content .wp-element-caption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .5rem; }
.fr-content blockquote, .fr-content .wp-block-quote { margin-left: 0; border-left: 4px solid var(--lime); background: var(--card-2); padding: 1rem 1.25rem; border-radius: 0 12px 12px 0; color: var(--text); }
.fr-content blockquote p:last-child { margin-bottom: 0; }
.fr-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.fr-content th, .fr-content td { border: 1px solid var(--border); padding: .6rem .8rem; text-align: left; }
.fr-content th { background: var(--card-2); color: var(--text); }
.fr-content hr, .fr-content .wp-block-separator { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.fr-content code { background: var(--bg-deep); color: var(--cream); padding: .1rem .35rem; border-radius: 6px; font-size: .9em; }
.fr-content pre { background: var(--bg-deep); color: var(--cream); padding: 1rem; border-radius: 12px; overflow-x: auto; }
.fr-content .wp-block-button__link { background: var(--cream); color: var(--cream-fg); border-radius: 999px; font-weight: 700; text-decoration: none; padding: .8rem 1.5rem; }
.fr-content .alignwide { max-width: 1000px; }
.fr-content .aligncenter { margin-left: auto; margin-right: auto; }
.fr-content .alignleft { float: left; margin: .3rem 1.25rem 1rem 0; }
.fr-content .alignright { float: right; margin: .3rem 0 1rem 1.25rem; }
.fr-content::after { content: ""; display: table; clear: both; }
.fr-tool-callout { background: var(--bg-deep); border: 2px solid rgba(132,204,22,.6); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 2rem 0; }
.fr-tags { max-width: 72ch; margin: 2rem auto 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.fr-tags a { border: 1px solid var(--border); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; text-decoration: none; color: var(--muted); }
.fr-tags a:hover { border-color: var(--lime); color: var(--lime-2); }
.fr-post-nav { max-width: 72ch; margin: 3rem auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.fr-related { margin-top: 4rem; }
.fr-page-links { max-width: 72ch; margin: 1rem auto; }

/* Comments */
.fr-comments { max-width: 72ch; margin: 3rem auto 0; }
.fr-comments .comment-list { list-style: none; padding: 0; }
.fr-comments .comment-body { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 1rem; color: var(--muted); }
.fr-comments .children { list-style: none; padding-left: 1.25rem; }
.fr-comments input[type="text"], .fr-comments input[type="email"], .fr-comments input[type="url"], .fr-comments textarea { width: 100%; background: var(--bg-deep); border: 1px solid var(--border); color: var(--text); border-radius: 12px; padding: .7rem .9rem; font: inherit; }
.fr-comments .submit { background: var(--cream); color: var(--cream-fg); border: 0; border-radius: 999px; padding: .8rem 1.5rem; font: inherit; font-weight: 700; cursor: pointer; }

/* Footer */
.fr-footer { background: var(--bg-deep); border-top: 1px solid var(--border); }
.fr-footer-grid { display: grid; gap: 2.5rem; padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 640px) { .fr-footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .fr-footer-grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
.fr-footer .fr-brand-name { font-size: 1.25rem; }
.fr-footer-about { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.fr-footer h2 { font-family: var(--sans); font-size: .9rem; font-weight: 700; margin: 0 0 .75rem; letter-spacing: 0; }
.fr-footer ul { list-style: none; margin: 0; padding: 0; }
.fr-footer li a { display: block; padding: .25rem 0; font-size: .9rem; color: var(--muted); text-decoration: none; }
.fr-footer li a:hover { color: var(--lime-2); }
.fr-footer-bottom { border-top: 1px solid var(--border); }
.fr-footer-bottom .fr-container { display: flex; flex-direction: column; gap: .5rem; padding-top: 1.25rem; padding-bottom: 1.25rem; font-size: .78rem; color: var(--muted); }
.fr-footer-bottom p { margin: 0; }
@media (min-width: 640px) { .fr-footer-bottom .fr-container { flex-direction: row; justify-content: space-between; } }

/* WordPress core classes */
.sticky .fr-card { border-color: rgba(132,204,22,.5); }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { color: var(--muted); font-size: .85rem; }
.bypostauthor { display: block; }
