/*
Theme Name: Palatehub
Theme URI: https://ng.palatehub.com
Description: Custom Palatehub blog theme — matches the palatehub.com brand system (Connecting the Food System). Manrope/Inter, cream & Deep Forest palette, node-and-connection motif.
Author: Palatehub
Version: 1.0.0
Requires at least: 5.2
Tested up to: 7.0
Requires PHP: 7.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: palatehub
*/

/* ---------- Brand fonts ---------- */
@font-face{font-family:'Manrope';font-weight:500;font-style:normal;font-display:swap;src:url('assets/fonts/manrope-500.woff2') format('woff2');}
@font-face{font-family:'Manrope';font-weight:700;font-style:normal;font-display:swap;src:url('assets/fonts/manrope-700.woff2') format('woff2');}
@font-face{font-family:'Manrope';font-weight:800;font-style:normal;font-display:swap;src:url('assets/fonts/manrope-800.woff2') format('woff2');}
@font-face{font-family:'Inter';font-weight:400;font-style:normal;font-display:swap;src:url('assets/fonts/inter-400.woff2') format('woff2');}
@font-face{font-family:'Inter';font-weight:500;font-style:normal;font-display:swap;src:url('assets/fonts/inter-500.woff2') format('woff2');}
@font-face{font-family:'Inter';font-weight:600;font-style:normal;font-display:swap;src:url('assets/fonts/inter-600.woff2') format('woff2');}

/* ---------- Tokens ---------- */
:root{
  --bg:#FAF8F1; --surface:#FFFFFF; --surface-2:#F3EFE4;
  --ink:#1F2E28; --ink-2:#586159; --ink-3:#6B7269;
  --forest:#174D3A; --forest-2:#123D2E; --forest-ink:#F5F2E9; --forest-ink-2:#AEC6B6;
  --green:#6FAE34; --green-2:#5f9a2b; --green-ink:#12331F; --green-bright:#81C141;
  --teal:#159A8C; --teal-text:#0C726A; --gold:#C68A22;
  --line:rgba(31,46,40,.11); --line-2:rgba(31,46,40,.18);
  --radius:20px; --radius-sm:13px;
  --shadow-sm:0 1px 2px rgba(23,77,58,.05);
  --shadow:0 1px 2px rgba(23,77,58,.05),0 18px 40px -20px rgba(23,77,58,.22);
  --maxw:1180px; --prose:72ch;
  --f-display:'Manrope',system-ui,sans-serif; --f-body:'Inter',system-ui,sans-serif;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{margin:0; background:var(--bg); color:var(--ink); font-family:var(--f-body); font-size:17px; line-height:1.65; -webkit-font-smoothing:antialiased;}
h1,h2,h3,h4{font-family:var(--f-display); font-weight:800; line-height:1.12; margin:0 0 .4em; letter-spacing:-.02em; text-wrap:balance;}
a{color:var(--teal-text); text-decoration:none;} a:hover{text-decoration:underline;}
img{max-width:100%; height:auto;}
p{margin:0 0 1.1em;}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 26px;}
.eyebrow{font-weight:600; font-size:12.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--teal-text);}
.skip-link{position:absolute; left:-999px;} .skip-link:focus{left:8px; top:8px; background:var(--green); color:var(--green-ink); padding:10px 16px; border-radius:8px; z-index:1000;}
:focus-visible{outline:3px solid var(--teal); outline-offset:2px; border-radius:6px;}

.btn{display:inline-flex; align-items:center; gap:8px; font-family:var(--f-body); font-weight:600; font-size:15px; padding:12px 20px; border-radius:100px; border:1.5px solid transparent; cursor:pointer; transition:background .2s,border-color .2s,transform .15s;}
.btn:hover{text-decoration:none; transform:translateY(-1px);}
.btn-primary{background:var(--green); color:var(--green-ink);} .btn-primary:hover{background:var(--green-2);}
.btn-ghost{background:transparent; color:var(--ink); border-color:var(--line-2);} .btn-ghost:hover{border-color:var(--ink);}

/* ---------- Header ---------- */
.site-header{position:sticky; top:0; z-index:100; background:rgba(252,250,244,.86); backdrop-filter:saturate(180%) blur(14px); border-bottom:1px solid var(--line);}
.site-header .wrap{display:flex; align-items:center; gap:24px; min-height:112px;}
.site-brand{display:flex; align-items:center;}
.site-brand img, .site-brand .custom-logo{height:90px; width:auto; max-width:270px; display:block;}
.main-nav{display:flex; gap:2px; margin-left:8px; flex-wrap:wrap;}
.main-nav ul, .main-nav .menu{list-style:none; margin:0; padding:0; display:flex; gap:2px; flex-wrap:wrap; align-items:center;}
.main-nav li{margin:0; padding:0;}
.main-nav li::marker{content:"";}
.main-nav a{font-size:14.5px; font-weight:500; color:var(--ink); opacity:.82; padding:8px 12px; border-radius:9px;}
.main-nav a:hover{opacity:1; background:var(--surface-2); text-decoration:none;}
.main-nav .current-menu-item>a, .main-nav a[aria-current]{opacity:1; color:var(--forest);}
.header-cta{margin-left:auto; display:flex; gap:10px; align-items:center;}
.menu-toggle{display:none; width:42px; height:42px; border-radius:11px; background:var(--surface-2); border:1px solid var(--line); cursor:pointer; align-items:center; justify-content:center;}

/* ---------- Page hero ---------- */
.page-hero{position:relative; overflow:hidden; border-bottom:1px solid var(--line);
  background:
   radial-gradient(50% 70% at 90% 0%, rgba(21,154,140,.08), transparent 70%),
   radial-gradient(circle at 1px 1px, rgba(23,77,58,.05) 1px, transparent 1.7px) 0 0/24px 24px,
   linear-gradient(180deg,#FCFAF4 0%,#F3EFE4 100%);}
.page-hero .wrap{padding:64px 26px 54px;}
.page-hero h1{font-size:clamp(34px,5vw,54px); max-width:20ch;}
.page-hero .lead{margin-top:14px; font-size:clamp(17px,1.4vw,20px); color:var(--ink-2); max-width:60ch;}
.crumbs{color:var(--ink-3); font-size:13px; font-weight:500; margin-bottom:12px;}
.crumbs a{color:var(--ink-3);}

/* ---------- Content layout ---------- */
.site-main{padding:0 0 72px;}
.site-main > .wrap{padding-top:44px;}  /* content below the hero; hero itself stays flush under the header */
.layout{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:44px; align-items:start;}
.layout.full{grid-template-columns:1fr;}

/* ---------- Post cards grid ---------- */
.post-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:22px;}
.pcard{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; transition:transform .2s,box-shadow .2s;}
.pcard:hover{transform:translateY(-4px); box-shadow:var(--shadow);}
.pcard .thumb{aspect-ratio:16/10; background:var(--surface-2); overflow:hidden; display:block;}
.pcard .thumb img{width:100%; height:100%; object-fit:cover; transition:transform .5s;}
.pcard:hover .thumb img{transform:scale(1.05);}
.pcard .thumb.ph{background:linear-gradient(150deg,#1d5a44,#0f3527); position:relative;}
.pcard .thumb.ph::after{content:""; position:absolute; inset:0; background:radial-gradient(circle at 1px 1px, rgba(255,255,255,.12) 1px, transparent 1.6px) 0 0/22px 22px;}
.pcard .body{padding:20px 22px 22px; display:flex; flex-direction:column; gap:9px; flex:1;}
.pcard .cat{align-self:flex-start;}
.pcard h2, .pcard h3{font-size:20px; margin:0; line-height:1.25;}
.pcard h2 a, .pcard h3 a{color:var(--ink);} .pcard h2 a:hover, .pcard h3 a:hover{color:var(--teal-text); text-decoration:none;}
.pcard .excerpt{color:var(--ink-2); font-size:14.5px; line-height:1.55; margin:0;}
.pcard .meta{margin-top:auto; padding-top:8px; color:var(--ink-3); font-size:13px; display:flex; gap:8px; align-items:center;}
.cat{display:inline-block; font-size:11.5px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; padding:4px 10px; border-radius:100px; background:rgba(21,154,140,.12); color:var(--teal-text);}
.cat:hover{text-decoration:none;}

/* ---------- Single / page ---------- */
.article{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm); overflow:hidden;}
.article .a-head{padding:34px 40px 6px;}
.article .a-title{font-size:clamp(28px,4vw,44px);}
.article .a-meta{color:var(--ink-3); font-size:14px; margin-top:10px; display:flex; gap:10px; flex-wrap:wrap; align-items:center;}
.article .a-feat{margin:22px 0 0;}
.article .a-feat img{width:100%; max-height:460px; object-fit:cover; display:block;}
.prose{padding:30px 40px 40px; max-width:var(--prose); margin:0 auto;}
.prose > *{margin-left:auto; margin-right:auto;}
.prose h2{font-size:1.7em; margin-top:1.6em;}
.prose h3{font-size:1.35em; margin-top:1.4em;}
.prose p, .prose ul, .prose ol{font-size:1.06rem; line-height:1.75; color:#28352f;}
.prose ul, .prose ol{padding-left:1.3em;} .prose li{margin:.4em 0;}
.prose img{border-radius:var(--radius-sm); box-shadow:var(--shadow-sm);}
.prose a{color:var(--teal-text); text-decoration:underline; text-underline-offset:2px;}
.prose blockquote{margin:1.6em 0; padding:6px 0 6px 22px; border-left:3px solid var(--green); color:var(--forest); font-family:var(--f-display); font-weight:500; font-size:1.2em;}
.prose code{background:var(--surface-2); padding:2px 6px; border-radius:6px; font-size:.92em;}
.prose pre{background:var(--forest-2); color:#EAF1EC; padding:16px 18px; border-radius:var(--radius-sm); overflow:auto;}
.prose figure{margin:1.6em 0;} .prose figcaption{color:var(--ink-3); font-size:.85em; text-align:center; margin-top:8px;}
.a-foot{max-width:var(--prose); margin:0 auto; padding:0 40px 36px; display:flex; gap:12px; flex-wrap:wrap; align-items:center;}
.tags a{display:inline-block; font-size:12.5px; color:var(--ink-2); background:var(--surface-2); border:1px solid var(--line); padding:5px 11px; border-radius:100px; margin:0 4px 6px 0;}
.tags a:hover{text-decoration:none; border-color:var(--line-2);}

/* ---------- Sidebar / widgets ---------- */
.sidebar{position:sticky; top:130px; display:flex; flex-direction:column; gap:20px;}
.widget{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); padding:20px 22px; box-shadow:var(--shadow-sm);}
.widget-title{font-family:var(--f-display); font-weight:800; font-size:15px; margin:0 0 12px;}
.widget ul{list-style:none; margin:0; padding:0;}
.widget li{padding:7px 0; border-bottom:1px solid var(--line); font-size:14.5px;}
.widget li:last-child{border-bottom:0;}
.widget a{color:var(--ink);} .widget a:hover{color:var(--teal-text);}
.searchform{display:flex; gap:8px;}
.searchform input[type=search]{flex:1; min-width:0; font-family:var(--f-body); font-size:14.5px; border:1.5px solid var(--line-2); border-radius:10px; padding:10px 12px; background:var(--bg);}
.searchform input[type=search]:focus{outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(21,154,140,.14);}
.searchform button{border:0; background:var(--green); color:var(--green-ink); font-weight:600; border-radius:10px; padding:0 16px; cursor:pointer;}

/* ---------- Pagination ---------- */
.pager{display:flex; gap:6px; justify-content:center; flex-wrap:wrap; margin-top:40px;}
.pager .page-numbers{display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:40px; padding:0 12px; border-radius:10px; border:1px solid var(--line); background:var(--surface); color:var(--ink-2); font-weight:600; font-size:14px;}
.pager .page-numbers:hover{border-color:var(--line-2); text-decoration:none;}
.pager .page-numbers.current{background:var(--green); color:var(--green-ink); border-color:transparent;}
.post-nav{display:flex; justify-content:space-between; gap:16px; margin-top:26px; flex-wrap:wrap;}
.post-nav a{max-width:48%;}

/* ---------- Comments ---------- */
.comments{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:30px 40px; margin-top:26px; max-width:var(--prose); margin-left:auto; margin-right:auto;}
.comments h2, .comments h3{font-size:20px;}
.commentlist{list-style:none; margin:0; padding:0;}
.commentlist li{padding:16px 0; border-bottom:1px solid var(--line);}
.commentlist .children{list-style:none; padding-left:24px;}
.comment-meta{font-size:13px; color:var(--ink-3); margin-bottom:6px;}
.comment-form label{display:block; font-size:13px; font-weight:600; margin:12px 0 6px;}
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea{width:100%; font-family:var(--f-body); font-size:14.5px; border:1.5px solid var(--line-2); border-radius:10px; padding:11px 13px; background:var(--bg);}
.comment-form textarea:focus, .comment-form input:focus{outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(21,154,140,.14);}
.comment-form .submit{margin-top:14px; background:var(--green); color:var(--green-ink); border:0; font-weight:600; border-radius:100px; padding:12px 22px; cursor:pointer;}

/* ---------- CTA band ---------- */
.cta-band{margin-top:64px; margin-bottom:64px;}
.cta-band .panel{background:var(--green-bright); color:var(--green-ink); border-radius:26px; padding:44px 40px; display:flex; gap:24px; align-items:center; justify-content:space-between; flex-wrap:wrap;}
.cta-band h2{color:var(--green-ink); font-size:clamp(24px,3vw,34px); margin:0; max-width:20ch;}
.cta-band .btn-primary{background:var(--forest); color:var(--forest-ink);}

/* ---------- Footer ---------- */
.site-footer{background:var(--forest); color:var(--forest-ink); padding:56px 0 28px; border-top:4px solid var(--green-bright); margin-top:0;}
.foot-grid{display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:32px;}
.foot-brand img{height:44px;} .foot-brand p{color:var(--forest-ink-2); font-size:14.5px; margin-top:14px; max-width:34ch;}
.foot-col h4{font-family:var(--f-body); font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--forest-ink-2); font-weight:600; margin:0 0 12px;}
.foot-col a{display:block; color:var(--forest-ink); opacity:.82; padding:5px 0; font-size:14.5px;} .foot-col a:hover{opacity:1;}
.foot-social{display:flex; gap:9px; margin-top:16px;}
.foot-social a{width:38px; height:38px; border-radius:50%; border:1px solid rgba(245,242,233,.24); display:flex; align-items:center; justify-content:center; color:var(--forest-ink); opacity:.85;}
.foot-social a:hover{opacity:1; background:rgba(245,242,233,.1);}
.foot-bottom{margin-top:40px; padding-top:20px; border-top:1px solid rgba(245,242,233,.14); display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; color:var(--forest-ink-2); font-size:13px;}

/* ---------- 404 / empty ---------- */
.notice{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:48px 40px; text-align:center;}
.notice .big{font-family:var(--f-display); font-weight:800; font-size:64px; background:linear-gradient(120deg,var(--green),var(--teal)); -webkit-background-clip:text; background-clip:text; color:transparent; line-height:1;}

/* ---------- WP core alignments ---------- */
.aligncenter{margin-left:auto; margin-right:auto; display:block;}
.alignleft{float:left; margin:6px 22px 12px 0;} .alignright{float:right; margin:6px 0 12px 22px;}
.wp-caption{max-width:100%;} .sticky, .gallery-caption, .bypostauthor{}
.screen-reader-text{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px);}

@media (max-width:900px){
  .layout{grid-template-columns:1fr;}
  .sidebar{position:static;}
  .main-nav{display:none; position:absolute; top:112px; left:0; right:0; flex-direction:column; background:var(--surface); border-bottom:1px solid var(--line); padding:10px 20px 16px; box-shadow:var(--shadow);}
  .site-header.open .main-nav{display:flex;}
  .menu-toggle{display:inline-flex;}
  .header-cta .btn{display:none;}
  .article .a-head, .prose, .a-foot, .comments{padding-left:24px; padding-right:24px;}
  .foot-grid{grid-template-columns:1fr 1fr;}
}
@media (max-width:520px){ .foot-grid{grid-template-columns:1fr;} .post-nav a{max-width:100%;} }
@media (prefers-reduced-motion:reduce){*{animation:none!important; transition:none!important; scroll-behavior:auto!important;}}

/* ---------- Front page: featured lead + topics strip ---------- */
.section-head{display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin:8px 0 20px; flex-wrap:wrap;}
.section-head h2{font-size:clamp(22px,2.4vw,30px); margin:0;}
.section-head a{font-weight:600; font-size:14px;}

.feature{display:grid; grid-template-columns:1.12fr .88fr; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); margin-bottom:34px;}
.feature .f-img{position:relative; min-height:280px; background:var(--surface-2); overflow:hidden; display:block;}
.feature .f-img img{width:100%; height:100%; object-fit:cover;}
.feature .f-img.ph{background:linear-gradient(150deg,#174D3A,#0f3527);}
.feature .f-img.ph::after{content:""; position:absolute; inset:0; background:radial-gradient(circle at 1px 1px, rgba(255,255,255,.12) 1px, transparent 1.7px) 0 0/24px 24px;}
.feature .f-badge{position:absolute; top:16px; left:16px; background:rgba(214,166,65,.95); color:#3a2a06; font-size:11.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:5px 11px; border-radius:100px;}
.feature .f-body{padding:34px 36px; display:flex; flex-direction:column; gap:13px; justify-content:center;}
.feature h2{font-size:clamp(24px,2.7vw,36px); line-height:1.14; margin:0;}
.feature h2 a{color:var(--ink);} .feature h2 a:hover{color:var(--teal-text); text-decoration:none;}
.feature .excerpt{color:var(--ink-2); font-size:16px; line-height:1.6; margin:0;}
.feature .meta{color:var(--ink-3); font-size:13.5px; display:flex; gap:8px; align-items:center;}
.feature .f-body .btn{align-self:flex-start; margin-top:6px;}

.topics-strip{display:flex; gap:9px; flex-wrap:wrap; margin:0 0 34px;}
.topics-strip .cat{font-size:13px; padding:7px 15px;}

@media (max-width:820px){
  .feature{grid-template-columns:1fr;}
  .feature .f-img{aspect-ratio:16/9; min-height:0;}
  .feature .f-body{padding:24px;}
}

/* ---------- Extra widget areas: homepage + footer ---------- */
.home-widgets{margin-top:44px; display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:22px;}
.home-widgets .hp-widget{margin:0;} /* inherits .widget card styling */

.footer-widgets{display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:30px; padding-bottom:34px; margin-bottom:34px; border-bottom:1px solid rgba(245,242,233,.14);}
.foot-widget{background:transparent; border:0; box-shadow:none; padding:0;}
.foot-widget .widget-title{color:var(--forest-ink-2); font-family:var(--f-body); font-size:12px; letter-spacing:.14em; text-transform:uppercase; font-weight:600; margin-bottom:12px;}
.foot-widget, .foot-widget p, .foot-widget li{color:var(--forest-ink-2); font-size:14.5px;}
.foot-widget a{color:var(--forest-ink); opacity:.85;} .foot-widget a:hover{opacity:1;}
.foot-widget ul{list-style:none; margin:0; padding:0;}
.foot-widget li{padding:5px 0; border:0;}
.foot-widget .searchform input[type=search]{background:rgba(245,242,233,.08); border-color:rgba(245,242,233,.24); color:var(--forest-ink);}
@media (max-width:520px){ .footer-widgets{grid-template-columns:1fr;} }

/* ---------- Single-post centring + after-content widget area ---------- */
.single-narrow{max-width:900px; margin:0 auto;}
.after-content{margin-top:26px; display:grid; gap:20px;}
.after-content .ac-widget{margin:0;} /* inherits .widget card styling */
